monaco-editor-core 0.55.0 → 0.56.0-dev-20251121

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 (416) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.cs.js +2 -2
  3. package/esm/nls.messages.de.js +2 -2
  4. package/esm/nls.messages.es.js +2 -2
  5. package/esm/nls.messages.fr.js +2 -2
  6. package/esm/nls.messages.it.js +2 -2
  7. package/esm/nls.messages.ja.js +2 -2
  8. package/esm/nls.messages.js +1 -1
  9. package/esm/nls.messages.json +1 -1
  10. package/esm/nls.messages.ko.js +2 -2
  11. package/esm/nls.messages.pl.js +2 -2
  12. package/esm/nls.messages.pt-br.js +2 -2
  13. package/esm/nls.messages.ru.js +2 -2
  14. package/esm/nls.messages.tr.js +2 -2
  15. package/esm/nls.messages.zh-cn.js +2 -2
  16. package/esm/nls.messages.zh-tw.js +2 -2
  17. package/esm/nls.metadata.json +27 -8
  18. package/esm/vs/base/browser/dom.js +31 -34
  19. package/esm/vs/base/browser/dom.js.map +1 -1
  20. package/esm/vs/base/browser/dompurify/dompurify.js +0 -1
  21. package/esm/vs/base/browser/keyboardEvent.js +3 -3
  22. package/esm/vs/base/browser/keyboardEvent.js.map +1 -1
  23. package/esm/vs/base/browser/markdownRenderer.js +5 -2
  24. package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
  25. package/esm/vs/base/browser/pixelRatio.js +5 -5
  26. package/esm/vs/base/browser/pixelRatio.js.map +1 -1
  27. package/esm/vs/base/browser/trustedTypes.js +1 -1
  28. package/esm/vs/base/browser/trustedTypes.js.map +1 -1
  29. package/esm/vs/base/browser/ui/actionbar/actionbar.js +3 -0
  30. package/esm/vs/base/browser/ui/actionbar/actionbar.js.map +1 -1
  31. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  32. package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +7 -0
  33. package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js.map +1 -1
  34. package/esm/vs/base/browser/ui/hover/hoverWidget.css +0 -13
  35. package/esm/vs/base/browser/ui/inputbox/inputBox.js +7 -0
  36. package/esm/vs/base/browser/ui/inputbox/inputBox.js.map +1 -1
  37. package/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css +4 -2
  38. package/esm/vs/base/browser/ui/list/listView.js +7 -2
  39. package/esm/vs/base/browser/ui/list/listView.js.map +1 -1
  40. package/esm/vs/base/browser/ui/selectBox/selectBox.js +4 -0
  41. package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
  42. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.css +12 -32
  43. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +8 -18
  44. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
  45. package/esm/vs/base/browser/ui/toolbar/toolbar.js +41 -14
  46. package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
  47. package/esm/vs/base/browser/ui/tree/abstractTree.js +11 -0
  48. package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
  49. package/esm/vs/base/browser/ui/tree/asyncDataTree.js +1 -0
  50. package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
  51. package/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js.map +1 -1
  52. package/esm/vs/base/browser/ui/tree/dataTree.js.map +1 -1
  53. package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
  54. package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
  55. package/esm/vs/base/browser/ui/tree/objectTreeModel.js.map +1 -1
  56. package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
  57. package/esm/vs/base/common/arrays.js +10 -0
  58. package/esm/vs/base/common/arrays.js.map +1 -1
  59. package/esm/vs/base/common/async.js +34 -0
  60. package/esm/vs/base/common/async.js.map +1 -1
  61. package/esm/vs/base/common/buffer.js +1 -1
  62. package/esm/vs/base/common/buffer.js.map +1 -1
  63. package/esm/vs/base/common/cancellation.js.map +1 -1
  64. package/esm/vs/base/common/codiconsLibrary.js +3 -0
  65. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  66. package/esm/vs/base/common/collections.js.map +1 -1
  67. package/esm/vs/base/common/equals.js.map +1 -1
  68. package/esm/vs/base/common/event.js +32 -15
  69. package/esm/vs/base/common/event.js.map +1 -1
  70. package/esm/vs/base/common/filters.js +22 -3
  71. package/esm/vs/base/common/filters.js.map +1 -1
  72. package/esm/vs/base/common/hotReload.js +2 -2
  73. package/esm/vs/base/common/hotReload.js.map +1 -1
  74. package/esm/vs/base/common/iterator.js +1 -1
  75. package/esm/vs/base/common/iterator.js.map +1 -1
  76. package/esm/vs/base/common/keyCodes.js +7 -6
  77. package/esm/vs/base/common/keyCodes.js.map +1 -1
  78. package/esm/vs/base/common/linkedList.js.map +1 -1
  79. package/esm/vs/base/common/map.js.map +1 -1
  80. package/esm/vs/base/common/marked/marked.js +0 -1
  81. package/esm/vs/base/common/network.js +26 -1
  82. package/esm/vs/base/common/network.js.map +1 -1
  83. package/esm/vs/base/common/normalization.js +19 -6
  84. package/esm/vs/base/common/normalization.js.map +1 -1
  85. package/esm/vs/base/common/observableInternal/debugLocation.js +1 -2
  86. package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
  87. package/esm/vs/base/common/observableInternal/debugName.js +0 -1
  88. package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
  89. package/esm/vs/base/common/observableInternal/index.js +4 -4
  90. package/esm/vs/base/common/observableInternal/index.js.map +1 -1
  91. package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js +38 -10
  92. package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js.map +1 -1
  93. package/esm/vs/base/common/observableInternal/observables/baseObservable.js +3 -3
  94. package/esm/vs/base/common/observableInternal/observables/baseObservable.js.map +1 -1
  95. package/esm/vs/base/common/observableInternal/utils/utils.js +46 -5
  96. package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
  97. package/esm/vs/base/common/path.js +1 -0
  98. package/esm/vs/base/common/path.js.map +1 -1
  99. package/esm/vs/base/common/strings.js +27 -19
  100. package/esm/vs/base/common/strings.js.map +1 -1
  101. package/esm/vs/editor/browser/config/elementSizeObserver.js +5 -5
  102. package/esm/vs/editor/browser/config/elementSizeObserver.js.map +1 -1
  103. package/esm/vs/editor/browser/config/fontMeasurements.js.map +1 -1
  104. package/esm/vs/editor/browser/config/migrateOptions.js +6 -0
  105. package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
  106. package/esm/vs/editor/browser/config/tabFocus.js +4 -2
  107. package/esm/vs/editor/browser/config/tabFocus.js.map +1 -1
  108. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +8 -0
  109. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
  110. package/esm/vs/editor/browser/coreCommands.js +1 -2
  111. package/esm/vs/editor/browser/coreCommands.js.map +1 -1
  112. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  113. package/esm/vs/editor/browser/observableCodeEditor.js +32 -1
  114. package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
  115. package/esm/vs/editor/browser/services/contribution.js +9 -0
  116. package/esm/vs/editor/browser/services/contribution.js.map +1 -0
  117. package/esm/vs/editor/browser/services/editorWorkerService.js +27 -14
  118. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  119. package/esm/vs/editor/browser/services/openerService.js +5 -1
  120. package/esm/vs/editor/browser/services/openerService.js.map +1 -1
  121. package/esm/vs/editor/browser/view/domLineBreaksComputer.js +1 -1
  122. package/esm/vs/editor/browser/view/domLineBreaksComputer.js.map +1 -1
  123. package/esm/vs/editor/browser/view/renderingContext.js +1 -1
  124. package/esm/vs/editor/browser/view/renderingContext.js.map +1 -1
  125. package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +10 -3
  126. package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js.map +1 -1
  127. package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +3 -4
  128. package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js.map +1 -1
  129. package/esm/vs/editor/browser/viewParts/minimap/minimap.js +1 -1
  130. package/esm/vs/editor/browser/viewParts/minimap/minimap.js.map +1 -1
  131. package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +1 -1
  132. package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js.map +1 -1
  133. package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +4 -2
  134. package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js.map +1 -1
  135. package/esm/vs/editor/browser/viewParts/rulers/rulers.js +1 -3
  136. package/esm/vs/editor/browser/viewParts/rulers/rulers.js.map +1 -1
  137. package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +1 -1
  138. package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js.map +1 -1
  139. package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js +2 -1
  140. package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js.map +1 -1
  141. package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +6 -18
  142. package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js.map +1 -1
  143. package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +0 -7
  144. package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js.map +1 -1
  145. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +7 -2
  146. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  147. package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +1 -0
  148. package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js.map +1 -1
  149. package/esm/vs/editor/common/commands/replaceCommand.js +2 -2
  150. package/esm/vs/editor/common/commands/replaceCommand.js.map +1 -1
  151. package/esm/vs/editor/common/config/editorOptions.js +374 -360
  152. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  153. package/esm/vs/editor/common/core/2d/rect.js +7 -0
  154. package/esm/vs/editor/common/core/2d/rect.js.map +1 -1
  155. package/esm/vs/editor/common/core/2d/size.js +20 -0
  156. package/esm/vs/editor/common/core/2d/size.js.map +1 -0
  157. package/esm/vs/editor/common/core/editorColorRegistry.js +69 -68
  158. package/esm/vs/editor/common/core/editorColorRegistry.js.map +1 -1
  159. package/esm/vs/editor/common/core/ranges/offsetRange.js +9 -0
  160. package/esm/vs/editor/common/core/ranges/offsetRange.js.map +1 -1
  161. package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
  162. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  163. package/esm/vs/editor/common/editorContextKeys.js +47 -47
  164. package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
  165. package/esm/vs/editor/common/languages.js +56 -56
  166. package/esm/vs/editor/common/languages.js.map +1 -1
  167. package/esm/vs/editor/common/model/editStack.js +1 -1
  168. package/esm/vs/editor/common/services/languagesAssociations.js +6 -8
  169. package/esm/vs/editor/common/services/languagesAssociations.js.map +1 -1
  170. package/esm/vs/editor/common/standaloneStrings.js +11 -10
  171. package/esm/vs/editor/common/standaloneStrings.js.map +1 -1
  172. package/esm/vs/editor/common/textModelEditSource.js +1 -1
  173. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  174. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
  175. package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  176. package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
  177. package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  178. package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  179. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
  180. package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  181. package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
  182. package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  183. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  184. package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  185. package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  186. package/esm/vs/editor/contrib/codelens/browser/codelens.js.map +1 -1
  187. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  188. package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
  189. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
  190. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
  191. package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
  192. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  193. package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
  194. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
  195. package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  196. package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js +14 -0
  197. package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js.map +1 -1
  198. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
  199. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
  200. package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  201. package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  202. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
  203. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  204. package/esm/vs/editor/contrib/find/browser/findController.js +17 -17
  205. package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
  206. package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
  207. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
  208. package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
  209. package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
  210. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  211. package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  212. package/esm/vs/editor/contrib/format/browser/format.js +21 -6
  213. package/esm/vs/editor/contrib/format/browser/format.js.map +1 -1
  214. package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
  215. package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  216. package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  217. package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  218. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  219. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
  220. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  221. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
  222. package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  223. package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  224. package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  225. package/esm/vs/editor/contrib/hover/browser/contentHoverController.js +5 -10
  226. package/esm/vs/editor/contrib/hover/browser/contentHoverController.js.map +1 -1
  227. package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js +11 -6
  228. package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js.map +1 -1
  229. package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  230. package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  231. package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
  232. package/esm/vs/editor/contrib/hover/browser/hoverUtils.js +24 -0
  233. package/esm/vs/editor/contrib/hover/browser/hoverUtils.js.map +1 -1
  234. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
  235. package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
  236. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  237. package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  238. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  239. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +20 -20
  240. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
  241. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +18 -16
  242. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
  243. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  244. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  245. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +42 -37
  246. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  247. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +3 -3
  248. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +1 -1
  249. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +8 -8
  250. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
  251. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +54 -43
  252. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  253. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +12 -12
  254. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
  255. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +74 -48
  256. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  257. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +8 -36
  258. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
  259. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js +10 -11
  260. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js.map +1 -1
  261. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +105 -119
  262. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
  263. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
  264. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +8 -36
  265. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
  266. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js +95 -0
  267. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js.map +1 -0
  268. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +17 -9
  269. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
  270. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +415 -0
  271. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -0
  272. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +253 -0
  273. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -0
  274. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
  275. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js +103 -0
  276. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js.map +1 -0
  277. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js +32 -0
  278. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js.map +1 -0
  279. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +44 -11
  280. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
  281. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +181 -0
  282. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -0
  283. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  284. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  285. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -31
  286. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
  287. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  288. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  289. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  290. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  291. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  292. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  293. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  294. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  295. package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +2 -2
  296. package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js.map +1 -1
  297. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +18 -13
  298. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
  299. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  300. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  301. package/esm/vs/editor/contrib/rename/browser/rename.js +12 -12
  302. package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
  303. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  304. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  305. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  306. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  307. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  308. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -1
  309. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
  310. package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
  311. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
  312. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
  313. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
  314. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  315. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  316. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  317. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  318. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  319. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  320. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +29 -29
  321. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
  322. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  323. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  324. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +4 -4
  325. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js.map +1 -1
  326. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
  327. package/esm/vs/editor/editor.all.js +1 -0
  328. package/esm/vs/editor/editor.all.js.map +1 -1
  329. package/esm/vs/editor/editor.api.d.ts +9 -5
  330. package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js +22 -2
  331. package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js.map +1 -1
  332. package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js +39 -0
  333. package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js.map +1 -0
  334. package/esm/vs/editor/standalone/browser/standaloneEditor.js +2 -1
  335. package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
  336. package/esm/vs/editor/standalone/browser/standaloneServices.js +3 -21
  337. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  338. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js +4 -4
  339. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
  340. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  341. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  342. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  343. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  344. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +7 -9
  345. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
  346. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  347. package/esm/vs/platform/actions/common/actions.js +2 -0
  348. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  349. package/esm/vs/platform/actions/common/menuService.js +2 -2
  350. package/esm/vs/platform/configuration/common/configuration.js +5 -4
  351. package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
  352. package/esm/vs/platform/configuration/common/configurationModels.js +21 -10
  353. package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
  354. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  355. package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
  356. package/esm/vs/platform/configuration/common/configurations.js.map +1 -1
  357. package/esm/vs/platform/contextkey/browser/contextKeyService.js +3 -3
  358. package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +1 -1
  359. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  360. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  361. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  362. package/esm/vs/platform/contextview/browser/contextViewService.js.map +1 -1
  363. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  364. package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
  365. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  366. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  367. package/esm/vs/platform/list/browser/listService.js +27 -27
  368. package/esm/vs/platform/list/browser/listService.js.map +1 -1
  369. package/esm/vs/platform/markers/common/markerService.js +2 -2
  370. package/esm/vs/platform/markers/common/markers.js +6 -6
  371. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +11 -32
  372. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
  373. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  374. package/esm/vs/platform/quickinput/browser/media/quickInput.css +9 -3
  375. package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
  376. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  377. package/esm/vs/platform/quickinput/browser/quickInputController.js +35 -14
  378. package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
  379. package/esm/vs/platform/quickinput/browser/quickInputList.js +4 -1
  380. package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
  381. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  382. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  383. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js +71 -40
  384. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js.map +1 -1
  385. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +21 -8
  386. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js.map +1 -1
  387. package/esm/vs/platform/telemetry/common/gdprTypings.js.map +1 -1
  388. package/esm/vs/platform/telemetry/common/telemetry.js.map +1 -1
  389. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  390. package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
  391. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  392. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  393. package/esm/vs/platform/theme/common/colors/editorColors.js.map +1 -1
  394. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  395. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  396. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  397. package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
  398. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  399. package/esm/vs/platform/theme/common/colors/miscColors.js.map +1 -1
  400. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  401. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  402. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  403. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  404. package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js +12 -0
  405. package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js.map +1 -0
  406. package/esm/vs/platform/webWorker/browser/webWorkerService.js +7 -0
  407. package/esm/vs/platform/webWorker/browser/webWorkerService.js.map +1 -0
  408. package/esm/vs/{base/browser/webWorkerFactory.js → platform/webWorker/browser/webWorkerServiceImpl.js} +47 -66
  409. package/esm/vs/platform/webWorker/browser/webWorkerServiceImpl.js.map +1 -0
  410. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  411. package/monaco.d.ts +9 -5
  412. package/package.json +2 -2
  413. package/version.txt +1 -1
  414. package/esm/vs/base/browser/webWorkerFactory.js.map +0 -1
  415. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js +0 -82
  416. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js.map +0 -1
@@ -32,10 +32,10 @@ export class ElementSizeObserver extends Disposable {
32
32
  // The first time the resize observer fires, we will react to it immediately.
33
33
  // Otherwise we will postpone to the next animation frame.
34
34
  // We'll use `observeContentRect` to store the content rect we received.
35
- let observedDimenstion = null;
35
+ let observedDimension = null;
36
36
  const observeNow = () => {
37
- if (observedDimenstion) {
38
- this.observe({ width: observedDimenstion.width, height: observedDimenstion.height });
37
+ if (observedDimension) {
38
+ this.observe({ width: observedDimension.width, height: observedDimension.height });
39
39
  }
40
40
  else {
41
41
  this.observe();
@@ -60,10 +60,10 @@ export class ElementSizeObserver extends Disposable {
60
60
  };
61
61
  this._resizeObserver = new ResizeObserver((entries) => {
62
62
  if (entries && entries[0] && entries[0].contentRect) {
63
- observedDimenstion = { width: entries[0].contentRect.width, height: entries[0].contentRect.height };
63
+ observedDimension = { width: entries[0].contentRect.width, height: entries[0].contentRect.height };
64
64
  }
65
65
  else {
66
- observedDimenstion = null;
66
+ observedDimension = null;
67
67
  }
68
68
  shouldObserve = true;
69
69
  update();
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/config/elementSizeObserver.ts","vs/editor/browser/config/elementSizeObserver.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,OAAO,EAAE,OAAO,EAAS,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAEvF,MAAM,OAAO,mBAAoB,SAAQ,UAAU;IAUlD,YAAY,mBAAuC,EAAE,SAAiC;QACrF,KAAK,EAAE,CAAC;QATD,iBAAY,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,OAAO,EAAQ,CAAC,CAAC;QAC3C,gBAAW,GAAgB,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;QASlE,IAAI,CAAC,oBAAoB,GAAG,mBAAmB,CAAC;QAChD,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;QAClB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,0BAA0B,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IACnD,CAAC;IAEe,OAAO;QACtB,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,KAAK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AC,CAAC;QAC3C,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,MAAM,KAAK,aAAa,IAAI,IAAI,CAAC,OAAO,KAAK,cAAc,EAAE,CAAC;YACtE,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC;YAC5B,IAAI,CAAC,OAAO,GAAG,cAAc,CAAC;YAC9B,IAAI,SAAS,EAAE,CAAC;gBACf,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;YAC1B,CAAC;QACF,CAAC;IACF,CAAC;CACD","file":"elementSizeObserver.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\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\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { IDimension } from '../../common/core/2d/dimension.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { getWindow, scheduleAtNextAnimationFrame } from '../../../base/browser/dom.js';\n\nexport class ElementSizeObserver extends Disposable {\n\n\tprivate _onDidChange = this._register(new Emitter<void>());\n\tpublic readonly onDidChange: Event<void> = this._onDidChange.event;\n\n\tprivate readonly _referenceDomElement: HTMLElement | null;\n\tprivate _width: number;\n\tprivate _height: number;\n\tprivate _resizeObserver: ResizeObserver | null;\n\n\tconstructor(referenceDomElement: HTMLElement | null, dimension: IDimension | undefined) {\n\t\tsuper();\n\t\tthis._referenceDomElement = referenceDomElement;\n\t\tthis._width = -1;\n\t\tthis._height = -1;\n\t\tthis._resizeObserver = null;\n\t\tthis.measureReferenceDomElement(false, dimension);\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis.stopObserving();\n\t\tsuper.dispose();\n\t}\n\n\tpublic getWidth(): number {\n\t\treturn this._width;\n\t}\n\n\tpublic getHeight(): number {\n\t\treturn this._height;\n\t}\n\n\tpublic startObserving(): void {\n\t\tif (!this._resizeObserver && this._referenceDomElement) {\n\t\t\t// We want to react to the resize observer only once per animation frame\n\t\t\t// The first time the resize observer fires, we will react to it immediately.\n\t\t\t// Otherwise we will postpone to the next animation frame.\n\t\t\t// We'll use `observeContentRect` to store the content rect we received.\n\n\t\t\tlet observedDimenstion: IDimension | null = null;\n\t\t\tconst observeNow = () => {\n\t\t\t\tif (observedDimenstion) {\n\t\t\t\t\tthis.observe({ width: observedDimenstion.width, height: observedDimenstion.height });\n\t\t\t\t} else {\n\t\t\t\t\tthis.observe();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tlet shouldObserve = false;\n\t\t\tlet alreadyObservedThisAnimationFrame = false;\n\n\t\t\tconst update = () => {\n\t\t\t\tif (shouldObserve && !alreadyObservedThisAnimationFrame) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tshouldObserve = false;\n\t\t\t\t\t\talreadyObservedThisAnimationFrame = true;\n\t\t\t\t\t\tobserveNow();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tscheduleAtNextAnimationFrame(getWindow(this._referenceDomElement), () => {\n\t\t\t\t\t\t\talreadyObservedThisAnimationFrame = false;\n\t\t\t\t\t\t\tupdate();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._resizeObserver = new ResizeObserver((entries) => {\n\t\t\t\tif (entries && entries[0] && entries[0].contentRect) {\n\t\t\t\t\tobservedDimenstion = { width: entries[0].contentRect.width, height: entries[0].contentRect.height };\n\t\t\t\t} else {\n\t\t\t\t\tobservedDimenstion = null;\n\t\t\t\t}\n\t\t\t\tshouldObserve = true;\n\t\t\t\tupdate();\n\t\t\t});\n\t\t\tthis._resizeObserver.observe(this._referenceDomElement);\n\t\t}\n\t}\n\n\tpublic stopObserving(): void {\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t\tthis._resizeObserver = null;\n\t\t}\n\t}\n\n\tpublic observe(dimension?: IDimension): void {\n\t\tthis.measureReferenceDomElement(true, dimension);\n\t}\n\n\tprivate measureReferenceDomElement(emitEvent: boolean, dimension?: IDimension): void {\n\t\tlet observedWidth = 0;\n\t\tlet observedHeight = 0;\n\t\tif (dimension) {\n\t\t\tobservedWidth = dimension.width;\n\t\t\tobservedHeight = dimension.height;\n\t\t} else if (this._referenceDomElement) {\n\t\t\tobservedWidth = this._referenceDomElement.clientWidth;\n\t\t\tobservedHeight = this._referenceDomElement.clientHeight;\n\t\t}\n\t\tobservedWidth = Math.max(5, observedWidth);\n\t\tobservedHeight = Math.max(5, observedHeight);\n\t\tif (this._width !== observedWidth || this._height !== observedHeight) {\n\t\t\tthis._width = observedWidth;\n\t\t\tthis._height = observedHeight;\n\t\t\tif (emitEvent) {\n\t\t\t\tthis._onDidChange.fire();\n\t\t\t}\n\t\t}\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\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\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { IDimension } from '../../common/core/2d/dimension.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { getWindow, scheduleAtNextAnimationFrame } from '../../../base/browser/dom.js';\n\nexport class ElementSizeObserver extends Disposable {\n\n\tprivate _onDidChange = this._register(new Emitter<void>());\n\tpublic readonly onDidChange: Event<void> = this._onDidChange.event;\n\n\tprivate readonly _referenceDomElement: HTMLElement | null;\n\tprivate _width: number;\n\tprivate _height: number;\n\tprivate _resizeObserver: ResizeObserver | null;\n\n\tconstructor(referenceDomElement: HTMLElement | null, dimension: IDimension | undefined) {\n\t\tsuper();\n\t\tthis._referenceDomElement = referenceDomElement;\n\t\tthis._width = -1;\n\t\tthis._height = -1;\n\t\tthis._resizeObserver = null;\n\t\tthis.measureReferenceDomElement(false, dimension);\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis.stopObserving();\n\t\tsuper.dispose();\n\t}\n\n\tpublic getWidth(): number {\n\t\treturn this._width;\n\t}\n\n\tpublic getHeight(): number {\n\t\treturn this._height;\n\t}\n\n\tpublic startObserving(): void {\n\t\tif (!this._resizeObserver && this._referenceDomElement) {\n\t\t\t// We want to react to the resize observer only once per animation frame\n\t\t\t// The first time the resize observer fires, we will react to it immediately.\n\t\t\t// Otherwise we will postpone to the next animation frame.\n\t\t\t// We'll use `observeContentRect` to store the content rect we received.\n\n\t\t\tlet observedDimenstion: IDimension | null = null;\n\t\t\tconst observeNow = () => {\n\t\t\t\tif (observedDimenstion) {\n\t\t\t\t\tthis.observe({ width: observedDimenstion.width, height: observedDimenstion.height });\n\t\t\t\t} else {\n\t\t\t\t\tthis.observe();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tlet shouldObserve = false;\n\t\t\tlet alreadyObservedThisAnimationFrame = false;\n\n\t\t\tconst update = () => {\n\t\t\t\tif (shouldObserve && !alreadyObservedThisAnimationFrame) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tshouldObserve = false;\n\t\t\t\t\t\talreadyObservedThisAnimationFrame = true;\n\t\t\t\t\t\tobserveNow();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tscheduleAtNextAnimationFrame(getWindow(this._referenceDomElement), () => {\n\t\t\t\t\t\t\talreadyObservedThisAnimationFrame = false;\n\t\t\t\t\t\t\tupdate();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._resizeObserver = new ResizeObserver((entries) => {\n\t\t\t\tif (entries && entries[0] && entries[0].contentRect) {\n\t\t\t\t\tobservedDimenstion = { width: entries[0].contentRect.width, height: entries[0].contentRect.height };\n\t\t\t\t} else {\n\t\t\t\t\tobservedDimenstion = null;\n\t\t\t\t}\n\t\t\t\tshouldObserve = true;\n\t\t\t\tupdate();\n\t\t\t});\n\t\t\tthis._resizeObserver.observe(this._referenceDomElement);\n\t\t}\n\t}\n\n\tpublic stopObserving(): void {\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t\tthis._resizeObserver = null;\n\t\t}\n\t}\n\n\tpublic observe(dimension?: IDimension): void {\n\t\tthis.measureReferenceDomElement(true, dimension);\n\t}\n\n\tprivate measureReferenceDomElement(emitEvent: boolean, dimension?: IDimension): void {\n\t\tlet observedWidth = 0;\n\t\tlet observedHeight = 0;\n\t\tif (dimension) {\n\t\t\tobservedWidth = dimension.width;\n\t\t\tobservedHeight = dimension.height;\n\t\t} else if (this._referenceDomElement) {\n\t\t\tobservedWidth = this._referenceDomElement.clientWidth;\n\t\t\tobservedHeight = this._referenceDomElement.clientHeight;\n\t\t}\n\t\tobservedWidth = Math.max(5, observedWidth);\n\t\tobservedHeight = Math.max(5, observedHeight);\n\t\tif (this._width !== observedWidth || this._height !== observedHeight) {\n\t\t\tthis._width = observedWidth;\n\t\t\tthis._height = observedHeight;\n\t\t\tif (emitEvent) {\n\t\t\t\tthis._onDidChange.fire();\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/config/elementSizeObserver.ts","vs/editor/browser/config/elementSizeObserver.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,OAAO,EAAE,OAAO,EAAS,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAEvF,MAAM,OAAO,mBAAoB,SAAQ,UAAU;IAUlD,YAAY,mBAAuC,EAAE,SAAiC;QACrF,KAAK,EAAE,CAAC;QATD,iBAAY,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,OAAO,EAAQ,CAAC,CAAC;QAC3C,gBAAW,GAAgB,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;QASlE,IAAI,CAAC,o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AC,KAAK,CAAC;YAChC,cAAc,GAAG,SAAS,CAAC,MAAM,CAAC;QACnC,CAAC;aAAM,IAAI,IAAI,CAAC,oBAAoB,EAAE,CAAC;YACtC,aAAa,GAAG,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC;YACtD,cAAc,GAAG,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC;QACzD,CAAC;QACD,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;QAC3C,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,MAAM,KAAK,aAAa,IAAI,IAAI,CAAC,OAAO,KAAK,cAAc,EAAE,CAAC;YACtE,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC;YAC5B,IAAI,CAAC,OAAO,GAAG,cAAc,CAAC;YAC9B,IAAI,SAAS,EAAE,CAAC;gBACf,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;YAC1B,CAAC;QACF,CAAC;IACF,CAAC;CACD","file":"elementSizeObserver.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\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\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { IDimension } from '../../common/core/2d/dimension.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { getWindow, scheduleAtNextAnimationFrame } from '../../../base/browser/dom.js';\n\nexport class ElementSizeObserver extends Disposable {\n\n\tprivate _onDidChange = this._register(new Emitter<void>());\n\tpublic readonly onDidChange: Event<void> = this._onDidChange.event;\n\n\tprivate readonly _referenceDomElement: HTMLElement | null;\n\tprivate _width: number;\n\tprivate _height: number;\n\tprivate _resizeObserver: ResizeObserver | null;\n\n\tconstructor(referenceDomElement: HTMLElement | null, dimension: IDimension | undefined) {\n\t\tsuper();\n\t\tthis._referenceDomElement = referenceDomElement;\n\t\tthis._width = -1;\n\t\tthis._height = -1;\n\t\tthis._resizeObserver = null;\n\t\tthis.measureReferenceDomElement(false, dimension);\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis.stopObserving();\n\t\tsuper.dispose();\n\t}\n\n\tpublic getWidth(): number {\n\t\treturn this._width;\n\t}\n\n\tpublic getHeight(): number {\n\t\treturn this._height;\n\t}\n\n\tpublic startObserving(): void {\n\t\tif (!this._resizeObserver && this._referenceDomElement) {\n\t\t\t// We want to react to the resize observer only once per animation frame\n\t\t\t// The first time the resize observer fires, we will react to it immediately.\n\t\t\t// Otherwise we will postpone to the next animation frame.\n\t\t\t// We'll use `observeContentRect` to store the content rect we received.\n\n\t\t\tlet observedDimension: IDimension | null = null;\n\t\t\tconst observeNow = () => {\n\t\t\t\tif (observedDimension) {\n\t\t\t\t\tthis.observe({ width: observedDimension.width, height: observedDimension.height });\n\t\t\t\t} else {\n\t\t\t\t\tthis.observe();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tlet shouldObserve = false;\n\t\t\tlet alreadyObservedThisAnimationFrame = false;\n\n\t\t\tconst update = () => {\n\t\t\t\tif (shouldObserve && !alreadyObservedThisAnimationFrame) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tshouldObserve = false;\n\t\t\t\t\t\talreadyObservedThisAnimationFrame = true;\n\t\t\t\t\t\tobserveNow();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tscheduleAtNextAnimationFrame(getWindow(this._referenceDomElement), () => {\n\t\t\t\t\t\t\talreadyObservedThisAnimationFrame = false;\n\t\t\t\t\t\t\tupdate();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._resizeObserver = new ResizeObserver((entries) => {\n\t\t\t\tif (entries && entries[0] && entries[0].contentRect) {\n\t\t\t\t\tobservedDimension = { width: entries[0].contentRect.width, height: entries[0].contentRect.height };\n\t\t\t\t} else {\n\t\t\t\t\tobservedDimension = null;\n\t\t\t\t}\n\t\t\t\tshouldObserve = true;\n\t\t\t\tupdate();\n\t\t\t});\n\t\t\tthis._resizeObserver.observe(this._referenceDomElement);\n\t\t}\n\t}\n\n\tpublic stopObserving(): void {\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t\tthis._resizeObserver = null;\n\t\t}\n\t}\n\n\tpublic observe(dimension?: IDimension): void {\n\t\tthis.measureReferenceDomElement(true, dimension);\n\t}\n\n\tprivate measureReferenceDomElement(emitEvent: boolean, dimension?: IDimension): void {\n\t\tlet observedWidth = 0;\n\t\tlet observedHeight = 0;\n\t\tif (dimension) {\n\t\t\tobservedWidth = dimension.width;\n\t\t\tobservedHeight = dimension.height;\n\t\t} else if (this._referenceDomElement) {\n\t\t\tobservedWidth = this._referenceDomElement.clientWidth;\n\t\t\tobservedHeight = this._referenceDomElement.clientHeight;\n\t\t}\n\t\tobservedWidth = Math.max(5, observedWidth);\n\t\tobservedHeight = Math.max(5, observedHeight);\n\t\tif (this._width !== observedWidth || this._height !== observedHeight) {\n\t\t\tthis._width = observedWidth;\n\t\t\tthis._height = observedHeight;\n\t\t\tif (emitEvent) {\n\t\t\t\tthis._onDidChange.fire();\n\t\t\t}\n\t\t}\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\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\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { IDimension } from '../../common/core/2d/dimension.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { getWindow, scheduleAtNextAnimationFrame } from '../../../base/browser/dom.js';\n\nexport class ElementSizeObserver extends Disposable {\n\n\tprivate _onDidChange = this._register(new Emitter<void>());\n\tpublic readonly onDidChange: Event<void> = this._onDidChange.event;\n\n\tprivate readonly _referenceDomElement: HTMLElement | null;\n\tprivate _width: number;\n\tprivate _height: number;\n\tprivate _resizeObserver: ResizeObserver | null;\n\n\tconstructor(referenceDomElement: HTMLElement | null, dimension: IDimension | undefined) {\n\t\tsuper();\n\t\tthis._referenceDomElement = referenceDomElement;\n\t\tthis._width = -1;\n\t\tthis._height = -1;\n\t\tthis._resizeObserver = null;\n\t\tthis.measureReferenceDomElement(false, dimension);\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis.stopObserving();\n\t\tsuper.dispose();\n\t}\n\n\tpublic getWidth(): number {\n\t\treturn this._width;\n\t}\n\n\tpublic getHeight(): number {\n\t\treturn this._height;\n\t}\n\n\tpublic startObserving(): void {\n\t\tif (!this._resizeObserver && this._referenceDomElement) {\n\t\t\t// We want to react to the resize observer only once per animation frame\n\t\t\t// The first time the resize observer fires, we will react to it immediately.\n\t\t\t// Otherwise we will postpone to the next animation frame.\n\t\t\t// We'll use `observeContentRect` to store the content rect we received.\n\n\t\t\tlet observedDimension: IDimension | null = null;\n\t\t\tconst observeNow = () => {\n\t\t\t\tif (observedDimension) {\n\t\t\t\t\tthis.observe({ width: observedDimension.width, height: observedDimension.height });\n\t\t\t\t} else {\n\t\t\t\t\tthis.observe();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tlet shouldObserve = false;\n\t\t\tlet alreadyObservedThisAnimationFrame = false;\n\n\t\t\tconst update = () => {\n\t\t\t\tif (shouldObserve && !alreadyObservedThisAnimationFrame) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tshouldObserve = false;\n\t\t\t\t\t\talreadyObservedThisAnimationFrame = true;\n\t\t\t\t\t\tobserveNow();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tscheduleAtNextAnimationFrame(getWindow(this._referenceDomElement), () => {\n\t\t\t\t\t\t\talreadyObservedThisAnimationFrame = false;\n\t\t\t\t\t\t\tupdate();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._resizeObserver = new ResizeObserver((entries) => {\n\t\t\t\tif (entries && entries[0] && entries[0].contentRect) {\n\t\t\t\t\tobservedDimension = { width: entries[0].contentRect.width, height: entries[0].contentRect.height };\n\t\t\t\t} else {\n\t\t\t\t\tobservedDimension = null;\n\t\t\t\t}\n\t\t\t\tshouldObserve = true;\n\t\t\t\tupdate();\n\t\t\t});\n\t\t\tthis._resizeObserver.observe(this._referenceDomElement);\n\t\t}\n\t}\n\n\tpublic stopObserving(): void {\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t\tthis._resizeObserver = null;\n\t\t}\n\t}\n\n\tpublic observe(dimension?: IDimension): void {\n\t\tthis.measureReferenceDomElement(true, dimension);\n\t}\n\n\tprivate measureReferenceDomElement(emitEvent: boolean, dimension?: IDimension): void {\n\t\tlet observedWidth = 0;\n\t\tlet observedHeight = 0;\n\t\tif (dimension) {\n\t\t\tobservedWidth = dimension.width;\n\t\t\tobservedHeight = dimension.height;\n\t\t} else if (this._referenceDomElement) {\n\t\t\tobservedWidth = this._referenceDomElement.clientWidth;\n\t\t\tobservedHeight = this._referenceDomElement.clientHeight;\n\t\t}\n\t\tobservedWidth = Math.max(5, observedWidth);\n\t\tobservedHeight = Math.max(5, observedHeight);\n\t\tif (this._width !== observedWidth || this._height !== observedHeight) {\n\t\t\tthis._width = observedWidth;\n\t\t\tthis._height = observedHeight;\n\t\t\tif (emitEvent) {\n\t\t\t\tthis._onDidChange.fire();\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/config/fontMeasurements.ts","vs/editor/browser/config/fontMeasurements.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAA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,CAAC,IAAkB;QAC5B,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAEM,GAAG,CAAC,IAAkB,EAAE,KAAe;QAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QAC5B,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;IAC9B,CAAC;IAEM,MAAM,CAAC,IAAkB;QAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAEM,SAAS;QACf,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5D,CAAC;CACD;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,oBAAoB,EAAE,CAAC","file":"fontMeasurements.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\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\nimport { getWindowId } from '../../../base/browser/dom.js';\nimport { PixelRatio } from '../../../base/browser/pixelRatio.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { CharWidthRequest, CharWidthRequestType, readCharWidths } from './charWidthReader.js';\nimport { EditorFontLigatures } from '../../common/config/editorOptions.js';\nimport { BareFontInfo, FontInfo } from '../../common/config/fontInfo.js';\n\nexport class FontMeasurementsImpl extends Disposable {\n\n\tprivate readonly _cache = new Map<number, FontMeasurementsCache>();\n\n\tprivate _evictUntrustedReadingsTimeout = -1;\n\n\tprivate readonly _onDidChange = this._register(new Emitter<void>());\n\tpublic readonly onDidChange = this._onDidChange.event;\n\n\tpublic override dispose(): void {\n\t\tif (this._evictUntrustedReadingsTimeout !== -1) {\n\t\t\tclearTimeout(this._evictUntrustedReadingsTimeout);\n\t\t\tthis._evictUntrustedReadingsTimeout = -1;\n\t\t}\n\t\tsuper.dispose();\n\t}\n\n\t/**\n\t * Clear all cached font information and trigger a change event.\n\t */\n\tpublic clearAllFontInfos(): void {\n\t\tthis._cache.clear();\n\t\tthis._onDidChange.fire();\n\t}\n\n\tprivate _ensureCache(targetWindow: Window): FontMeasurementsCache {\n\t\tconst windowId = getWindowId(targetWindow);\n\t\tlet cache = this._cache.get(windowId);\n\t\tif (!cache) {\n\t\t\tcache = new FontMeasurementsCache();\n\t\t\tthis._cache.set(windowId, cache);\n\t\t}\n\t\treturn cache;\n\t}\n\n\tprivate _writeToCache(targetWindow: Window, item: BareFontInfo, value: FontInfo): void {\n\t\tconst cache = this._ensureCache(targetWindow);\n\t\tcache.put(item, value);\n\n\t\tif (!value.isTrusted && this._evictUntrustedReadingsTimeout === -1) {\n\t\t\t// Try reading again after some time\n\t\t\tthis._evictUntrustedReadingsTimeout = targetWindow.setTimeout(() => {\n\t\t\t\tthis._evictUntrustedReadingsTimeout = -1;\n\t\t\t\tthis._evictUntrustedReadings(targetWindow);\n\t\t\t}, 5000);\n\t\t}\n\t}\n\n\tprivate _evictUntrustedReadings(targetWindow: Window): void {\n\t\tconst cache = this._ensureCache(targetWindow);\n\t\tconst values = cache.getValues();\n\t\tlet somethingRemoved = false;\n\t\tfor (const item of values) {\n\t\t\tif (!item.isTrusted) {\n\t\t\t\tsomethingRemoved = true;\n\t\t\t\tcache.remove(item);\n\t\t\t}\n\t\t}\n\t\tif (somethingRemoved) {\n\t\t\tthis._onDidChange.fire();\n\t\t}\n\t}\n\n\t/**\n\t * Read font information.\n\t */\n\tpublic readFontInfo(targetWindow: Window, bareFontInfo: BareFontInfo): FontInfo {\n\t\tconst cache = this._ensureCache(targetWindow);\n\t\tif (!cache.has(bareFontInfo)) {\n\t\t\tlet readConfig = this._actualReadFontInfo(targetWindow, bareFontInfo);\n\n\t\t\tif (readConfig.typicalHalfwidthCharacterWidth <= 2 || readConfig.typicalFullwidthCharacterWidth <= 2 || readConfig.spaceWidth <= 2 || readConfig.maxDigitWidth <= 2) {\n\t\t\t\t// Hey, it's Bug 14341 ... we couldn't read\n\t\t\t\treadConfig = new FontInfo({\n\t\t\t\t\tpixelRatio: PixelRatio.getInstance(targetWindow).value,\n\t\t\t\t\tfontFamily: readConfig.fontFamily,\n\t\t\t\t\tfontWeight: readConfig.fontWeight,\n\t\t\t\t\tfontSize: readConfig.fontSize,\n\t\t\t\t\tfontFeatureSettings: readConfig.fontFeatureSettings,\n\t\t\t\t\tfontVariationSettings: readConfig.fontVariationSettings,\n\t\t\t\t\tlineHeight: readConfig.lineHeight,\n\t\t\t\t\tletterSpacing: readConfig.letterSpacing,\n\t\t\t\t\tisMonospace: readConfig.isMonospace,\n\t\t\t\t\ttypicalHalfwidthCharacterWidth: Math.max(readConfig.typicalHalfwidthCharacterWidth, 5),\n\t\t\t\t\ttypicalFullwidthCharacterWidth: Math.max(readConfig.typicalFullwidthCharacterWidth, 5),\n\t\t\t\t\tcanUseHalfwidthRightwardsArrow: readConfig.canUseHalfwidthRightwardsArrow,\n\t\t\t\t\tspaceWidth: Math.max(readConfig.spaceWidth, 5),\n\t\t\t\t\tmiddotWidth: Math.max(readConfig.middotWidth, 5),\n\t\t\t\t\twsmiddotWidth: Math.max(readConfig.wsmiddotWidth, 5),\n\t\t\t\t\tmaxDigitWidth: Math.max(readConfig.maxDigitWidth, 5),\n\t\t\t\t}, false);\n\t\t\t}\n\n\t\t\tthis._writeToCache(targetWindow, bareFontInfo, readConfig);\n\t\t}\n\t\treturn cache.get(bareFontInfo);\n\t}\n\n\tprivate _createRequest(chr: string, type: CharWidthRequestType, all: CharWidthRequest[], monospace: CharWidthRequest[] | null): CharWidthRequest {\n\t\tconst result = new CharWidthRequest(chr, type);\n\t\tall.push(result);\n\t\tmonospace?.push(result);\n\t\treturn result;\n\t}\n\n\tprivate _actualReadFontInfo(targetWindow: Window, bareFontInfo: BareFontInfo): FontInfo {\n\t\tconst all: CharWidthRequest[] = [];\n\t\tconst monospace: CharWidthRequest[] = [];\n\n\t\tconst typicalHalfwidthCharacter = this._createRequest('n', CharWidthRequestType.Regular, all, monospace);\n\t\tconst typicalFullwidthCharacter = this._createRequest('\\uff4d', CharWidthRequestType.Regular, all, null);\n\t\tconst space = this._createRequest(' ', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit0 = this._createRequest('0', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit1 = this._createRequest('1', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit2 = this._createRequest('2', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit3 = this._createRequest('3', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit4 = this._createRequest('4', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit5 = this._createRequest('5', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit6 = this._createRequest('6', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit7 = this._createRequest('7', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit8 = this._createRequest('8', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit9 = this._createRequest('9', CharWidthRequestType.Regular, all, monospace);\n\n\t\t// monospace test: used for whitespace rendering\n\t\tconst rightwardsArrow = this._createRequest('→', CharWidthRequestType.Regular, all, monospace);\n\t\tconst halfwidthRightwardsArrow = this._createRequest('→', CharWidthRequestType.Regular, all, null);\n\n\t\t// U+00B7 - MIDDLE DOT\n\t\tconst middot = this._createRequest('·', CharWidthRequestType.Regular, all, monospace);\n\n\t\t// U+2E31 - WORD SEPARATOR MIDDLE DOT\n\t\tconst wsmiddotWidth = this._createRequest(String.fromCharCode(0x2E31), CharWidthRequestType.Regular, all, null);\n\n\t\t// monospace test: some characters\n\t\tconst monospaceTestChars = '|/-_ilm%';\n\t\tfor (let i = 0, len = monospaceTestChars.length; i < len; i++) {\n\t\t\tthis._createRequest(monospaceTestChars.charAt(i), CharWidthRequestType.Regular, all, monospace);\n\t\t\tthis._createRequest(monospaceTestChars.charAt(i), CharWidthRequestType.Italic, all, monospace);\n\t\t\tthis._createRequest(monospaceTestChars.charAt(i), CharWidthRequestType.Bold, all, monospace);\n\t\t}\n\n\t\treadCharWidths(targetWindow, bareFontInfo, all);\n\n\t\tconst maxDigitWidth = Math.max(digit0.width, digit1.width, digit2.width, digit3.width, digit4.width, digit5.width, digit6.width, digit7.width, digit8.width, digit9.width);\n\n\t\tlet isMonospace = (bareFontInfo.fontFeatureSettings === EditorFontLigatures.OFF);\n\t\tconst referenceWidth = monospace[0].width;\n\t\tfor (let i = 1, len = monospace.length; isMonospace && i < len; i++) {\n\t\t\tconst diff = referenceWidth - monospace[i].width;\n\t\t\tif (diff < -0.001 || diff > 0.001) {\n\t\t\t\tisMonospace = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tlet canUseHalfwidthRightwardsArrow = true;\n\t\tif (isMonospace && halfwidthRightwardsArrow.width !== referenceWidth) {\n\t\t\t// using a halfwidth rightwards arrow would break monospace...\n\t\t\tcanUseHalfwidthRightwardsArrow = false;\n\t\t}\n\t\tif (halfwidthRightwardsArrow.width > rightwardsArrow.width) {\n\t\t\t// using a halfwidth rightwards arrow would paint a larger arrow than a regular rightwards arrow\n\t\t\tcanUseHalfwidthRightwardsArrow = false;\n\t\t}\n\n\t\treturn new FontInfo({\n\t\t\tpixelRatio: PixelRatio.getInstance(targetWindow).value,\n\t\t\tfontFamily: bareFontInfo.fontFamily,\n\t\t\tfontWeight: bareFontInfo.fontWeight,\n\t\t\tfontSize: bareFontInfo.fontSize,\n\t\t\tfontFeatureSettings: bareFontInfo.fontFeatureSettings,\n\t\t\tfontVariationSettings: bareFontInfo.fontVariationSettings,\n\t\t\tlineHeight: bareFontInfo.lineHeight,\n\t\t\tletterSpacing: bareFontInfo.letterSpacing,\n\t\t\tisMonospace: isMonospace,\n\t\t\ttypicalHalfwidthCharacterWidth: typicalHalfwidthCharacter.width,\n\t\t\ttypicalFullwidthCharacterWidth: typicalFullwidthCharacter.width,\n\t\t\tcanUseHalfwidthRightwardsArrow: canUseHalfwidthRightwardsArrow,\n\t\t\tspaceWidth: space.width,\n\t\t\tmiddotWidth: middot.width,\n\t\t\twsmiddotWidth: wsmiddotWidth.width,\n\t\t\tmaxDigitWidth: maxDigitWidth\n\t\t}, true);\n\t}\n}\n\nclass FontMeasurementsCache {\n\n\tprivate readonly _keys: { [key: string]: BareFontInfo };\n\tprivate readonly _values: { [key: string]: FontInfo };\n\n\tconstructor() {\n\t\tthis._keys = Object.create(null);\n\t\tthis._values = Object.create(null);\n\t}\n\n\tpublic has(item: BareFontInfo): boolean {\n\t\tconst itemId = item.getId();\n\t\treturn !!this._values[itemId];\n\t}\n\n\tpublic get(item: BareFontInfo): FontInfo {\n\t\tconst itemId = item.getId();\n\t\treturn this._values[itemId];\n\t}\n\n\tpublic put(item: BareFontInfo, value: FontInfo): void {\n\t\tconst itemId = item.getId();\n\t\tthis._keys[itemId] = item;\n\t\tthis._values[itemId] = value;\n\t}\n\n\tpublic remove(item: BareFontInfo): void {\n\t\tconst itemId = item.getId();\n\t\tdelete this._keys[itemId];\n\t\tdelete this._values[itemId];\n\t}\n\n\tpublic getValues(): FontInfo[] {\n\t\treturn Object.keys(this._keys).map(id => this._values[id]);\n\t}\n}\n\nexport const FontMeasurements = new FontMeasurementsImpl();\n","/*---------------------------------------------------------------------------------------------\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\nimport { getWindowId } from '../../../base/browser/dom.js';\nimport { PixelRatio } from '../../../base/browser/pixelRatio.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { CharWidthRequest, CharWidthRequestType, readCharWidths } from './charWidthReader.js';\nimport { EditorFontLigatures } from '../../common/config/editorOptions.js';\nimport { BareFontInfo, FontInfo } from '../../common/config/fontInfo.js';\n\nexport class FontMeasurementsImpl extends Disposable {\n\n\tprivate readonly _cache = new Map<number, FontMeasurementsCache>();\n\n\tprivate _evictUntrustedReadingsTimeout = -1;\n\n\tprivate readonly _onDidChange = this._register(new Emitter<void>());\n\tpublic readonly onDidChange = this._onDidChange.event;\n\n\tpublic override dispose(): void {\n\t\tif (this._evictUntrustedReadingsTimeout !== -1) {\n\t\t\tclearTimeout(this._evictUntrustedReadingsTimeout);\n\t\t\tthis._evictUntrustedReadingsTimeout = -1;\n\t\t}\n\t\tsuper.dispose();\n\t}\n\n\t/**\n\t * Clear all cached font information and trigger a change event.\n\t */\n\tpublic clearAllFontInfos(): void {\n\t\tthis._cache.clear();\n\t\tthis._onDidChange.fire();\n\t}\n\n\tprivate _ensureCache(targetWindow: Window): FontMeasurementsCache {\n\t\tconst windowId = getWindowId(targetWindow);\n\t\tlet cache = this._cache.get(windowId);\n\t\tif (!cache) {\n\t\t\tcache = new FontMeasurementsCache();\n\t\t\tthis._cache.set(windowId, cache);\n\t\t}\n\t\treturn cache;\n\t}\n\n\tprivate _writeToCache(targetWindow: Window, item: BareFontInfo, value: FontInfo): void {\n\t\tconst cache = this._ensureCache(targetWindow);\n\t\tcache.put(item, value);\n\n\t\tif (!value.isTrusted && this._evictUntrustedReadingsTimeout === -1) {\n\t\t\t// Try reading again after some time\n\t\t\tthis._evictUntrustedReadingsTimeout = targetWindow.setTimeout(() => {\n\t\t\t\tthis._evictUntrustedReadingsTimeout = -1;\n\t\t\t\tthis._evictUntrustedReadings(targetWindow);\n\t\t\t}, 5000);\n\t\t}\n\t}\n\n\tprivate _evictUntrustedReadings(targetWindow: Window): void {\n\t\tconst cache = this._ensureCache(targetWindow);\n\t\tconst values = cache.getValues();\n\t\tlet somethingRemoved = false;\n\t\tfor (const item of values) {\n\t\t\tif (!item.isTrusted) {\n\t\t\t\tsomethingRemoved = true;\n\t\t\t\tcache.remove(item);\n\t\t\t}\n\t\t}\n\t\tif (somethingRemoved) {\n\t\t\tthis._onDidChange.fire();\n\t\t}\n\t}\n\n\t/**\n\t * Read font information.\n\t */\n\tpublic readFontInfo(targetWindow: Window, bareFontInfo: BareFontInfo): FontInfo {\n\t\tconst cache = this._ensureCache(targetWindow);\n\t\tif (!cache.has(bareFontInfo)) {\n\t\t\tlet readConfig = this._actualReadFontInfo(targetWindow, bareFontInfo);\n\n\t\t\tif (readConfig.typicalHalfwidthCharacterWidth <= 2 || readConfig.typicalFullwidthCharacterWidth <= 2 || readConfig.spaceWidth <= 2 || readConfig.maxDigitWidth <= 2) {\n\t\t\t\t// Hey, it's Bug 14341 ... we couldn't read\n\t\t\t\treadConfig = new FontInfo({\n\t\t\t\t\tpixelRatio: PixelRatio.getInstance(targetWindow).value,\n\t\t\t\t\tfontFamily: readConfig.fontFamily,\n\t\t\t\t\tfontWeight: readConfig.fontWeight,\n\t\t\t\t\tfontSize: readConfig.fontSize,\n\t\t\t\t\tfontFeatureSettings: readConfig.fontFeatureSettings,\n\t\t\t\t\tfontVariationSettings: readConfig.fontVariationSettings,\n\t\t\t\t\tlineHeight: readConfig.lineHeight,\n\t\t\t\t\tletterSpacing: readConfig.letterSpacing,\n\t\t\t\t\tisMonospace: readConfig.isMonospace,\n\t\t\t\t\ttypicalHalfwidthCharacterWidth: Math.max(readConfig.typicalHalfwidthCharacterWidth, 5),\n\t\t\t\t\ttypicalFullwidthCharacterWidth: Math.max(readConfig.typicalFullwidthCharacterWidth, 5),\n\t\t\t\t\tcanUseHalfwidthRightwardsArrow: readConfig.canUseHalfwidthRightwardsArrow,\n\t\t\t\t\tspaceWidth: Math.max(readConfig.spaceWidth, 5),\n\t\t\t\t\tmiddotWidth: Math.max(readConfig.middotWidth, 5),\n\t\t\t\t\twsmiddotWidth: Math.max(readConfig.wsmiddotWidth, 5),\n\t\t\t\t\tmaxDigitWidth: Math.max(readConfig.maxDigitWidth, 5),\n\t\t\t\t}, false);\n\t\t\t}\n\n\t\t\tthis._writeToCache(targetWindow, bareFontInfo, readConfig);\n\t\t}\n\t\treturn cache.get(bareFontInfo);\n\t}\n\n\tprivate _createRequest(chr: string, type: CharWidthRequestType, all: CharWidthRequest[], monospace: CharWidthRequest[] | null): CharWidthRequest {\n\t\tconst result = new CharWidthRequest(chr, type);\n\t\tall.push(result);\n\t\tmonospace?.push(result);\n\t\treturn result;\n\t}\n\n\tprivate _actualReadFontInfo(targetWindow: Window, bareFontInfo: BareFontInfo): FontInfo {\n\t\tconst all: CharWidthRequest[] = [];\n\t\tconst monospace: CharWidthRequest[] = [];\n\n\t\tconst typicalHalfwidthCharacter = this._createRequest('n', CharWidthRequestType.Regular, all, monospace);\n\t\tconst typicalFullwidthCharacter = this._createRequest('\\uff4d', CharWidthRequestType.Regular, all, null);\n\t\tconst space = this._createRequest(' ', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit0 = this._createRequest('0', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit1 = this._createRequest('1', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit2 = this._createRequest('2', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit3 = this._createRequest('3', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit4 = this._createRequest('4', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit5 = this._createRequest('5', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit6 = this._createRequest('6', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit7 = this._createRequest('7', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit8 = this._createRequest('8', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit9 = this._createRequest('9', CharWidthRequestType.Regular, all, monospace);\n\n\t\t// monospace test: used for whitespace rendering\n\t\tconst rightwardsArrow = this._createRequest('→', CharWidthRequestType.Regular, all, monospace);\n\t\tconst halfwidthRightwardsArrow = this._createRequest('→', CharWidthRequestType.Regular, all, null);\n\n\t\t// U+00B7 - MIDDLE DOT\n\t\tconst middot = this._createRequest('·', CharWidthRequestType.Regular, all, monospace);\n\n\t\t// U+2E31 - WORD SEPARATOR MIDDLE DOT\n\t\tconst wsmiddotWidth = this._createRequest(String.fromCharCode(0x2E31), CharWidthRequestType.Regular, all, null);\n\n\t\t// monospace test: some characters\n\t\tconst monospaceTestChars = '|/-_ilm%';\n\t\tfor (let i = 0, len = monospaceTestChars.length; i < len; i++) {\n\t\t\tthis._createRequest(monospaceTestChars.charAt(i), CharWidthRequestType.Regular, all, monospace);\n\t\t\tthis._createRequest(monospaceTestChars.charAt(i), CharWidthRequestType.Italic, all, monospace);\n\t\t\tthis._createRequest(monospaceTestChars.charAt(i), CharWidthRequestType.Bold, all, monospace);\n\t\t}\n\n\t\treadCharWidths(targetWindow, bareFontInfo, all);\n\n\t\tconst maxDigitWidth = Math.max(digit0.width, digit1.width, digit2.width, digit3.width, digit4.width, digit5.width, digit6.width, digit7.width, digit8.width, digit9.width);\n\n\t\tlet isMonospace = (bareFontInfo.fontFeatureSettings === EditorFontLigatures.OFF);\n\t\tconst referenceWidth = monospace[0].width;\n\t\tfor (let i = 1, len = monospace.length; isMonospace && i < len; i++) {\n\t\t\tconst diff = referenceWidth - monospace[i].width;\n\t\t\tif (diff < -0.001 || diff > 0.001) {\n\t\t\t\tisMonospace = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tlet canUseHalfwidthRightwardsArrow = true;\n\t\tif (isMonospace && halfwidthRightwardsArrow.width !== referenceWidth) {\n\t\t\t// using a halfwidth rightwards arrow would break monospace...\n\t\t\tcanUseHalfwidthRightwardsArrow = false;\n\t\t}\n\t\tif (halfwidthRightwardsArrow.width > rightwardsArrow.width) {\n\t\t\t// using a halfwidth rightwards arrow would paint a larger arrow than a regular rightwards arrow\n\t\t\tcanUseHalfwidthRightwardsArrow = false;\n\t\t}\n\n\t\treturn new FontInfo({\n\t\t\tpixelRatio: PixelRatio.getInstance(targetWindow).value,\n\t\t\tfontFamily: bareFontInfo.fontFamily,\n\t\t\tfontWeight: bareFontInfo.fontWeight,\n\t\t\tfontSize: bareFontInfo.fontSize,\n\t\t\tfontFeatureSettings: bareFontInfo.fontFeatureSettings,\n\t\t\tfontVariationSettings: bareFontInfo.fontVariationSettings,\n\t\t\tlineHeight: bareFontInfo.lineHeight,\n\t\t\tletterSpacing: bareFontInfo.letterSpacing,\n\t\t\tisMonospace: isMonospace,\n\t\t\ttypicalHalfwidthCharacterWidth: typicalHalfwidthCharacter.width,\n\t\t\ttypicalFullwidthCharacterWidth: typicalFullwidthCharacter.width,\n\t\t\tcanUseHalfwidthRightwardsArrow: canUseHalfwidthRightwardsArrow,\n\t\t\tspaceWidth: space.width,\n\t\t\tmiddotWidth: middot.width,\n\t\t\twsmiddotWidth: wsmiddotWidth.width,\n\t\t\tmaxDigitWidth: maxDigitWidth\n\t\t}, true);\n\t}\n}\n\nclass FontMeasurementsCache {\n\n\tprivate readonly _keys: { [key: string]: BareFontInfo };\n\tprivate readonly _values: { [key: string]: FontInfo };\n\n\tconstructor() {\n\t\tthis._keys = Object.create(null);\n\t\tthis._values = Object.create(null);\n\t}\n\n\tpublic has(item: BareFontInfo): boolean {\n\t\tconst itemId = item.getId();\n\t\treturn !!this._values[itemId];\n\t}\n\n\tpublic get(item: BareFontInfo): FontInfo {\n\t\tconst itemId = item.getId();\n\t\treturn this._values[itemId];\n\t}\n\n\tpublic put(item: BareFontInfo, value: FontInfo): void {\n\t\tconst itemId = item.getId();\n\t\tthis._keys[itemId] = item;\n\t\tthis._values[itemId] = value;\n\t}\n\n\tpublic remove(item: BareFontInfo): void {\n\t\tconst itemId = item.getId();\n\t\tdelete this._keys[itemId];\n\t\tdelete this._values[itemId];\n\t}\n\n\tpublic getValues(): FontInfo[] {\n\t\treturn Object.keys(this._keys).map(id => this._values[id]);\n\t}\n}\n\nexport const FontMeasurements = new FontMeasurementsImpl();\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/config/fontMeasurements.ts","vs/editor/browser/config/fontMeasurements.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAwB,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAgB,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEzE,MAAM,OAAO,oBAAqB,SAAQ,UAAU;IAApD;;QAEkB,WAAM,GAAG,IAAI,GAAG,EAAiC,CAAC;QAE3D,mCAA8B,GAAG,CAAC,CAAC,CAAC;QAE3B,iBAAY,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,OAAO,EAAQ,CAAC,CAAC;QACpD,gBAAW,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;IAiLvD,CAAC;IA/KgB,OAAO;QACtB,IAAI,IAAI,CAAC,8BAA8B,KAAK,CAAC,CAAC,EAAE,CAAC;YAChD,YAAY,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;YAClD,IAAI,CAAC,8BAA8B,GAAG,CAAC,CAAC,CAAC;QAC1C,CAAC;QACD,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED;;OAEG;IACI,iBAAiB;QACvB,IAAI,CAAC,MAAM,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AAC","file":"fontMeasurements.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\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\nimport { getWindowId } from '../../../base/browser/dom.js';\nimport { PixelRatio } from '../../../base/browser/pixelRatio.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { CharWidthRequest, CharWidthRequestType, readCharWidths } from './charWidthReader.js';\nimport { EditorFontLigatures } from '../../common/config/editorOptions.js';\nimport { BareFontInfo, FontInfo } from '../../common/config/fontInfo.js';\n\nexport class FontMeasurementsImpl extends Disposable {\n\n\tprivate readonly _cache = new Map<number, FontMeasurementsCache>();\n\n\tprivate _evictUntrustedReadingsTimeout = -1;\n\n\tprivate readonly _onDidChange = this._register(new Emitter<void>());\n\tpublic readonly onDidChange = this._onDidChange.event;\n\n\tpublic override dispose(): void {\n\t\tif (this._evictUntrustedReadingsTimeout !== -1) {\n\t\t\tclearTimeout(this._evictUntrustedReadingsTimeout);\n\t\t\tthis._evictUntrustedReadingsTimeout = -1;\n\t\t}\n\t\tsuper.dispose();\n\t}\n\n\t/**\n\t * Clear all cached font information and trigger a change event.\n\t */\n\tpublic clearAllFontInfos(): void {\n\t\tthis._cache.clear();\n\t\tthis._onDidChange.fire();\n\t}\n\n\tprivate _ensureCache(targetWindow: Window): FontMeasurementsCache {\n\t\tconst windowId = getWindowId(targetWindow);\n\t\tlet cache = this._cache.get(windowId);\n\t\tif (!cache) {\n\t\t\tcache = new FontMeasurementsCache();\n\t\t\tthis._cache.set(windowId, cache);\n\t\t}\n\t\treturn cache;\n\t}\n\n\tprivate _writeToCache(targetWindow: Window, item: BareFontInfo, value: FontInfo): void {\n\t\tconst cache = this._ensureCache(targetWindow);\n\t\tcache.put(item, value);\n\n\t\tif (!value.isTrusted && this._evictUntrustedReadingsTimeout === -1) {\n\t\t\t// Try reading again after some time\n\t\t\tthis._evictUntrustedReadingsTimeout = targetWindow.setTimeout(() => {\n\t\t\t\tthis._evictUntrustedReadingsTimeout = -1;\n\t\t\t\tthis._evictUntrustedReadings(targetWindow);\n\t\t\t}, 5000);\n\t\t}\n\t}\n\n\tprivate _evictUntrustedReadings(targetWindow: Window): void {\n\t\tconst cache = this._ensureCache(targetWindow);\n\t\tconst values = cache.getValues();\n\t\tlet somethingRemoved = false;\n\t\tfor (const item of values) {\n\t\t\tif (!item.isTrusted) {\n\t\t\t\tsomethingRemoved = true;\n\t\t\t\tcache.remove(item);\n\t\t\t}\n\t\t}\n\t\tif (somethingRemoved) {\n\t\t\tthis._onDidChange.fire();\n\t\t}\n\t}\n\n\t/**\n\t * Read font information.\n\t */\n\tpublic readFontInfo(targetWindow: Window, bareFontInfo: BareFontInfo): FontInfo {\n\t\tconst cache = this._ensureCache(targetWindow);\n\t\tif (!cache.has(bareFontInfo)) {\n\t\t\tlet readConfig = this._actualReadFontInfo(targetWindow, bareFontInfo);\n\n\t\t\tif (readConfig.typicalHalfwidthCharacterWidth <= 2 || readConfig.typicalFullwidthCharacterWidth <= 2 || readConfig.spaceWidth <= 2 || readConfig.maxDigitWidth <= 2) {\n\t\t\t\t// Hey, it's Bug 14341 ... we couldn't read\n\t\t\t\treadConfig = new FontInfo({\n\t\t\t\t\tpixelRatio: PixelRatio.getInstance(targetWindow).value,\n\t\t\t\t\tfontFamily: readConfig.fontFamily,\n\t\t\t\t\tfontWeight: readConfig.fontWeight,\n\t\t\t\t\tfontSize: readConfig.fontSize,\n\t\t\t\t\tfontFeatureSettings: readConfig.fontFeatureSettings,\n\t\t\t\t\tfontVariationSettings: readConfig.fontVariationSettings,\n\t\t\t\t\tlineHeight: readConfig.lineHeight,\n\t\t\t\t\tletterSpacing: readConfig.letterSpacing,\n\t\t\t\t\tisMonospace: readConfig.isMonospace,\n\t\t\t\t\ttypicalHalfwidthCharacterWidth: Math.max(readConfig.typicalHalfwidthCharacterWidth, 5),\n\t\t\t\t\ttypicalFullwidthCharacterWidth: Math.max(readConfig.typicalFullwidthCharacterWidth, 5),\n\t\t\t\t\tcanUseHalfwidthRightwardsArrow: readConfig.canUseHalfwidthRightwardsArrow,\n\t\t\t\t\tspaceWidth: Math.max(readConfig.spaceWidth, 5),\n\t\t\t\t\tmiddotWidth: Math.max(readConfig.middotWidth, 5),\n\t\t\t\t\twsmiddotWidth: Math.max(readConfig.wsmiddotWidth, 5),\n\t\t\t\t\tmaxDigitWidth: Math.max(readConfig.maxDigitWidth, 5),\n\t\t\t\t}, false);\n\t\t\t}\n\n\t\t\tthis._writeToCache(targetWindow, bareFontInfo, readConfig);\n\t\t}\n\t\treturn cache.get(bareFontInfo);\n\t}\n\n\tprivate _createRequest(chr: string, type: CharWidthRequestType, all: CharWidthRequest[], monospace: CharWidthRequest[] | null): CharWidthRequest {\n\t\tconst result = new CharWidthRequest(chr, type);\n\t\tall.push(result);\n\t\tmonospace?.push(result);\n\t\treturn result;\n\t}\n\n\tprivate _actualReadFontInfo(targetWindow: Window, bareFontInfo: BareFontInfo): FontInfo {\n\t\tconst all: CharWidthRequest[] = [];\n\t\tconst monospace: CharWidthRequest[] = [];\n\n\t\tconst typicalHalfwidthCharacter = this._createRequest('n', CharWidthRequestType.Regular, all, monospace);\n\t\tconst typicalFullwidthCharacter = this._createRequest('\\uff4d', CharWidthRequestType.Regular, all, null);\n\t\tconst space = this._createRequest(' ', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit0 = this._createRequest('0', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit1 = this._createRequest('1', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit2 = this._createRequest('2', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit3 = this._createRequest('3', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit4 = this._createRequest('4', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit5 = this._createRequest('5', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit6 = this._createRequest('6', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit7 = this._createRequest('7', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit8 = this._createRequest('8', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit9 = this._createRequest('9', CharWidthRequestType.Regular, all, monospace);\n\n\t\t// monospace test: used for whitespace rendering\n\t\tconst rightwardsArrow = this._createRequest('→', CharWidthRequestType.Regular, all, monospace);\n\t\tconst halfwidthRightwardsArrow = this._createRequest('→', CharWidthRequestType.Regular, all, null);\n\n\t\t// U+00B7 - MIDDLE DOT\n\t\tconst middot = this._createRequest('·', CharWidthRequestType.Regular, all, monospace);\n\n\t\t// U+2E31 - WORD SEPARATOR MIDDLE DOT\n\t\tconst wsmiddotWidth = this._createRequest(String.fromCharCode(0x2E31), CharWidthRequestType.Regular, all, null);\n\n\t\t// monospace test: some characters\n\t\tconst monospaceTestChars = '|/-_ilm%';\n\t\tfor (let i = 0, len = monospaceTestChars.length; i < len; i++) {\n\t\t\tthis._createRequest(monospaceTestChars.charAt(i), CharWidthRequestType.Regular, all, monospace);\n\t\t\tthis._createRequest(monospaceTestChars.charAt(i), CharWidthRequestType.Italic, all, monospace);\n\t\t\tthis._createRequest(monospaceTestChars.charAt(i), CharWidthRequestType.Bold, all, monospace);\n\t\t}\n\n\t\treadCharWidths(targetWindow, bareFontInfo, all);\n\n\t\tconst maxDigitWidth = Math.max(digit0.width, digit1.width, digit2.width, digit3.width, digit4.width, digit5.width, digit6.width, digit7.width, digit8.width, digit9.width);\n\n\t\tlet isMonospace = (bareFontInfo.fontFeatureSettings === EditorFontLigatures.OFF);\n\t\tconst referenceWidth = monospace[0].width;\n\t\tfor (let i = 1, len = monospace.length; isMonospace && i < len; i++) {\n\t\t\tconst diff = referenceWidth - monospace[i].width;\n\t\t\tif (diff < -0.001 || diff > 0.001) {\n\t\t\t\tisMonospace = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tlet canUseHalfwidthRightwardsArrow = true;\n\t\tif (isMonospace && halfwidthRightwardsArrow.width !== referenceWidth) {\n\t\t\t// using a halfwidth rightwards arrow would break monospace...\n\t\t\tcanUseHalfwidthRightwardsArrow = false;\n\t\t}\n\t\tif (halfwidthRightwardsArrow.width > rightwardsArrow.width) {\n\t\t\t// using a halfwidth rightwards arrow would paint a larger arrow than a regular rightwards arrow\n\t\t\tcanUseHalfwidthRightwardsArrow = false;\n\t\t}\n\n\t\treturn new FontInfo({\n\t\t\tpixelRatio: PixelRatio.getInstance(targetWindow).value,\n\t\t\tfontFamily: bareFontInfo.fontFamily,\n\t\t\tfontWeight: bareFontInfo.fontWeight,\n\t\t\tfontSize: bareFontInfo.fontSize,\n\t\t\tfontFeatureSettings: bareFontInfo.fontFeatureSettings,\n\t\t\tfontVariationSettings: bareFontInfo.fontVariationSettings,\n\t\t\tlineHeight: bareFontInfo.lineHeight,\n\t\t\tletterSpacing: bareFontInfo.letterSpacing,\n\t\t\tisMonospace: isMonospace,\n\t\t\ttypicalHalfwidthCharacterWidth: typicalHalfwidthCharacter.width,\n\t\t\ttypicalFullwidthCharacterWidth: typicalFullwidthCharacter.width,\n\t\t\tcanUseHalfwidthRightwardsArrow: canUseHalfwidthRightwardsArrow,\n\t\t\tspaceWidth: space.width,\n\t\t\tmiddotWidth: middot.width,\n\t\t\twsmiddotWidth: wsmiddotWidth.width,\n\t\t\tmaxDigitWidth: maxDigitWidth\n\t\t}, true);\n\t}\n}\n\nclass FontMeasurementsCache {\n\n\tprivate readonly _keys: { [key: string]: BareFontInfo };\n\tprivate readonly _values: { [key: string]: FontInfo };\n\n\tconstructor() {\n\t\tthis._keys = Object.create(null);\n\t\tthis._values = Object.create(null);\n\t}\n\n\tpublic has(item: BareFontInfo): boolean {\n\t\tconst itemId = item.getId();\n\t\treturn !!this._values[itemId];\n\t}\n\n\tpublic get(item: BareFontInfo): FontInfo {\n\t\tconst itemId = item.getId();\n\t\treturn this._values[itemId];\n\t}\n\n\tpublic put(item: BareFontInfo, value: FontInfo): void {\n\t\tconst itemId = item.getId();\n\t\tthis._keys[itemId] = item;\n\t\tthis._values[itemId] = value;\n\t}\n\n\tpublic remove(item: FontInfo): void {\n\t\tconst itemId = item.getId();\n\t\tdelete this._keys[itemId];\n\t\tdelete this._values[itemId];\n\t}\n\n\tpublic getValues(): FontInfo[] {\n\t\treturn Object.keys(this._keys).map(id => this._values[id]);\n\t}\n}\n\nexport const FontMeasurements = new FontMeasurementsImpl();\n","/*---------------------------------------------------------------------------------------------\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\nimport { getWindowId } from '../../../base/browser/dom.js';\nimport { PixelRatio } from '../../../base/browser/pixelRatio.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { CharWidthRequest, CharWidthRequestType, readCharWidths } from './charWidthReader.js';\nimport { EditorFontLigatures } from '../../common/config/editorOptions.js';\nimport { BareFontInfo, FontInfo } from '../../common/config/fontInfo.js';\n\nexport class FontMeasurementsImpl extends Disposable {\n\n\tprivate readonly _cache = new Map<number, FontMeasurementsCache>();\n\n\tprivate _evictUntrustedReadingsTimeout = -1;\n\n\tprivate readonly _onDidChange = this._register(new Emitter<void>());\n\tpublic readonly onDidChange = this._onDidChange.event;\n\n\tpublic override dispose(): void {\n\t\tif (this._evictUntrustedReadingsTimeout !== -1) {\n\t\t\tclearTimeout(this._evictUntrustedReadingsTimeout);\n\t\t\tthis._evictUntrustedReadingsTimeout = -1;\n\t\t}\n\t\tsuper.dispose();\n\t}\n\n\t/**\n\t * Clear all cached font information and trigger a change event.\n\t */\n\tpublic clearAllFontInfos(): void {\n\t\tthis._cache.clear();\n\t\tthis._onDidChange.fire();\n\t}\n\n\tprivate _ensureCache(targetWindow: Window): FontMeasurementsCache {\n\t\tconst windowId = getWindowId(targetWindow);\n\t\tlet cache = this._cache.get(windowId);\n\t\tif (!cache) {\n\t\t\tcache = new FontMeasurementsCache();\n\t\t\tthis._cache.set(windowId, cache);\n\t\t}\n\t\treturn cache;\n\t}\n\n\tprivate _writeToCache(targetWindow: Window, item: BareFontInfo, value: FontInfo): void {\n\t\tconst cache = this._ensureCache(targetWindow);\n\t\tcache.put(item, value);\n\n\t\tif (!value.isTrusted && this._evictUntrustedReadingsTimeout === -1) {\n\t\t\t// Try reading again after some time\n\t\t\tthis._evictUntrustedReadingsTimeout = targetWindow.setTimeout(() => {\n\t\t\t\tthis._evictUntrustedReadingsTimeout = -1;\n\t\t\t\tthis._evictUntrustedReadings(targetWindow);\n\t\t\t}, 5000);\n\t\t}\n\t}\n\n\tprivate _evictUntrustedReadings(targetWindow: Window): void {\n\t\tconst cache = this._ensureCache(targetWindow);\n\t\tconst values = cache.getValues();\n\t\tlet somethingRemoved = false;\n\t\tfor (const item of values) {\n\t\t\tif (!item.isTrusted) {\n\t\t\t\tsomethingRemoved = true;\n\t\t\t\tcache.remove(item);\n\t\t\t}\n\t\t}\n\t\tif (somethingRemoved) {\n\t\t\tthis._onDidChange.fire();\n\t\t}\n\t}\n\n\t/**\n\t * Read font information.\n\t */\n\tpublic readFontInfo(targetWindow: Window, bareFontInfo: BareFontInfo): FontInfo {\n\t\tconst cache = this._ensureCache(targetWindow);\n\t\tif (!cache.has(bareFontInfo)) {\n\t\t\tlet readConfig = this._actualReadFontInfo(targetWindow, bareFontInfo);\n\n\t\t\tif (readConfig.typicalHalfwidthCharacterWidth <= 2 || readConfig.typicalFullwidthCharacterWidth <= 2 || readConfig.spaceWidth <= 2 || readConfig.maxDigitWidth <= 2) {\n\t\t\t\t// Hey, it's Bug 14341 ... we couldn't read\n\t\t\t\treadConfig = new FontInfo({\n\t\t\t\t\tpixelRatio: PixelRatio.getInstance(targetWindow).value,\n\t\t\t\t\tfontFamily: readConfig.fontFamily,\n\t\t\t\t\tfontWeight: readConfig.fontWeight,\n\t\t\t\t\tfontSize: readConfig.fontSize,\n\t\t\t\t\tfontFeatureSettings: readConfig.fontFeatureSettings,\n\t\t\t\t\tfontVariationSettings: readConfig.fontVariationSettings,\n\t\t\t\t\tlineHeight: readConfig.lineHeight,\n\t\t\t\t\tletterSpacing: readConfig.letterSpacing,\n\t\t\t\t\tisMonospace: readConfig.isMonospace,\n\t\t\t\t\ttypicalHalfwidthCharacterWidth: Math.max(readConfig.typicalHalfwidthCharacterWidth, 5),\n\t\t\t\t\ttypicalFullwidthCharacterWidth: Math.max(readConfig.typicalFullwidthCharacterWidth, 5),\n\t\t\t\t\tcanUseHalfwidthRightwardsArrow: readConfig.canUseHalfwidthRightwardsArrow,\n\t\t\t\t\tspaceWidth: Math.max(readConfig.spaceWidth, 5),\n\t\t\t\t\tmiddotWidth: Math.max(readConfig.middotWidth, 5),\n\t\t\t\t\twsmiddotWidth: Math.max(readConfig.wsmiddotWidth, 5),\n\t\t\t\t\tmaxDigitWidth: Math.max(readConfig.maxDigitWidth, 5),\n\t\t\t\t}, false);\n\t\t\t}\n\n\t\t\tthis._writeToCache(targetWindow, bareFontInfo, readConfig);\n\t\t}\n\t\treturn cache.get(bareFontInfo);\n\t}\n\n\tprivate _createRequest(chr: string, type: CharWidthRequestType, all: CharWidthRequest[], monospace: CharWidthRequest[] | null): CharWidthRequest {\n\t\tconst result = new CharWidthRequest(chr, type);\n\t\tall.push(result);\n\t\tmonospace?.push(result);\n\t\treturn result;\n\t}\n\n\tprivate _actualReadFontInfo(targetWindow: Window, bareFontInfo: BareFontInfo): FontInfo {\n\t\tconst all: CharWidthRequest[] = [];\n\t\tconst monospace: CharWidthRequest[] = [];\n\n\t\tconst typicalHalfwidthCharacter = this._createRequest('n', CharWidthRequestType.Regular, all, monospace);\n\t\tconst typicalFullwidthCharacter = this._createRequest('\\uff4d', CharWidthRequestType.Regular, all, null);\n\t\tconst space = this._createRequest(' ', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit0 = this._createRequest('0', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit1 = this._createRequest('1', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit2 = this._createRequest('2', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit3 = this._createRequest('3', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit4 = this._createRequest('4', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit5 = this._createRequest('5', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit6 = this._createRequest('6', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit7 = this._createRequest('7', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit8 = this._createRequest('8', CharWidthRequestType.Regular, all, monospace);\n\t\tconst digit9 = this._createRequest('9', CharWidthRequestType.Regular, all, monospace);\n\n\t\t// monospace test: used for whitespace rendering\n\t\tconst rightwardsArrow = this._createRequest('→', CharWidthRequestType.Regular, all, monospace);\n\t\tconst halfwidthRightwardsArrow = this._createRequest('→', CharWidthRequestType.Regular, all, null);\n\n\t\t// U+00B7 - MIDDLE DOT\n\t\tconst middot = this._createRequest('·', CharWidthRequestType.Regular, all, monospace);\n\n\t\t// U+2E31 - WORD SEPARATOR MIDDLE DOT\n\t\tconst wsmiddotWidth = this._createRequest(String.fromCharCode(0x2E31), CharWidthRequestType.Regular, all, null);\n\n\t\t// monospace test: some characters\n\t\tconst monospaceTestChars = '|/-_ilm%';\n\t\tfor (let i = 0, len = monospaceTestChars.length; i < len; i++) {\n\t\t\tthis._createRequest(monospaceTestChars.charAt(i), CharWidthRequestType.Regular, all, monospace);\n\t\t\tthis._createRequest(monospaceTestChars.charAt(i), CharWidthRequestType.Italic, all, monospace);\n\t\t\tthis._createRequest(monospaceTestChars.charAt(i), CharWidthRequestType.Bold, all, monospace);\n\t\t}\n\n\t\treadCharWidths(targetWindow, bareFontInfo, all);\n\n\t\tconst maxDigitWidth = Math.max(digit0.width, digit1.width, digit2.width, digit3.width, digit4.width, digit5.width, digit6.width, digit7.width, digit8.width, digit9.width);\n\n\t\tlet isMonospace = (bareFontInfo.fontFeatureSettings === EditorFontLigatures.OFF);\n\t\tconst referenceWidth = monospace[0].width;\n\t\tfor (let i = 1, len = monospace.length; isMonospace && i < len; i++) {\n\t\t\tconst diff = referenceWidth - monospace[i].width;\n\t\t\tif (diff < -0.001 || diff > 0.001) {\n\t\t\t\tisMonospace = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tlet canUseHalfwidthRightwardsArrow = true;\n\t\tif (isMonospace && halfwidthRightwardsArrow.width !== referenceWidth) {\n\t\t\t// using a halfwidth rightwards arrow would break monospace...\n\t\t\tcanUseHalfwidthRightwardsArrow = false;\n\t\t}\n\t\tif (halfwidthRightwardsArrow.width > rightwardsArrow.width) {\n\t\t\t// using a halfwidth rightwards arrow would paint a larger arrow than a regular rightwards arrow\n\t\t\tcanUseHalfwidthRightwardsArrow = false;\n\t\t}\n\n\t\treturn new FontInfo({\n\t\t\tpixelRatio: PixelRatio.getInstance(targetWindow).value,\n\t\t\tfontFamily: bareFontInfo.fontFamily,\n\t\t\tfontWeight: bareFontInfo.fontWeight,\n\t\t\tfontSize: bareFontInfo.fontSize,\n\t\t\tfontFeatureSettings: bareFontInfo.fontFeatureSettings,\n\t\t\tfontVariationSettings: bareFontInfo.fontVariationSettings,\n\t\t\tlineHeight: bareFontInfo.lineHeight,\n\t\t\tletterSpacing: bareFontInfo.letterSpacing,\n\t\t\tisMonospace: isMonospace,\n\t\t\ttypicalHalfwidthCharacterWidth: typicalHalfwidthCharacter.width,\n\t\t\ttypicalFullwidthCharacterWidth: typicalFullwidthCharacter.width,\n\t\t\tcanUseHalfwidthRightwardsArrow: canUseHalfwidthRightwardsArrow,\n\t\t\tspaceWidth: space.width,\n\t\t\tmiddotWidth: middot.width,\n\t\t\twsmiddotWidth: wsmiddotWidth.width,\n\t\t\tmaxDigitWidth: maxDigitWidth\n\t\t}, true);\n\t}\n}\n\nclass FontMeasurementsCache {\n\n\tprivate readonly _keys: { [key: string]: BareFontInfo };\n\tprivate readonly _values: { [key: string]: FontInfo };\n\n\tconstructor() {\n\t\tthis._keys = Object.create(null);\n\t\tthis._values = Object.create(null);\n\t}\n\n\tpublic has(item: BareFontInfo): boolean {\n\t\tconst itemId = item.getId();\n\t\treturn !!this._values[itemId];\n\t}\n\n\tpublic get(item: BareFontInfo): FontInfo {\n\t\tconst itemId = item.getId();\n\t\treturn this._values[itemId];\n\t}\n\n\tpublic put(item: BareFontInfo, value: FontInfo): void {\n\t\tconst itemId = item.getId();\n\t\tthis._keys[itemId] = item;\n\t\tthis._values[itemId] = value;\n\t}\n\n\tpublic remove(item: FontInfo): void {\n\t\tconst itemId = item.getId();\n\t\tdelete this._keys[itemId];\n\t\tdelete this._values[itemId];\n\t}\n\n\tpublic getValues(): FontInfo[] {\n\t\treturn Object.keys(this._keys).map(id => this._values[id]);\n\t}\n}\n\nexport const FontMeasurements = new FontMeasurementsImpl();\n"]}
@@ -216,4 +216,10 @@ registerEditorSettingMigration('inlineSuggest.edits.codeShifting', (value, read,
216
216
  write('inlineSuggest.edits.allowCodeShifting', value ? 'always' : 'never');
217
217
  }
218
218
  });
219
+ // Migrate Hover
220
+ registerEditorSettingMigration('hover.enabled', (value, read, write) => {
221
+ if (typeof value === 'boolean') {
222
+ write('hover.enabled', value ? 'on' : 'off');
223
+ }
224
+ });
219
225
  //# sourceMappingURL=migrateOptions.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/config/migrateOptions.ts","vs/editor/browser/config/migrateOptions.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAYhG,MAAM,OAAO,sBAAsB;aAEpB,UAAK,GAA6B,EAAE,CAAC;IAEnD,YACiB,GAAW,EACX,OAAgF;QADhF,QAAG,GAAH,GAAG,CAAQ;QACX,YAAO,GAAP,OAAO,CAAyE;IAC7F,CAAC;IAEL,KAAK,CAAC,OAAgB;QACrB,MAAM,KAAK,GAAG,sBAAsB,CAAC,KAAK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AACF,CAAC,CAAC,CAAC;AAEH,oBAAoB;AACpB,8BAA8B,CAAC,kCAAkC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IACzF,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;QAChC,KAAK,CAAC,kCAAkC,EAAE,SAAS,CAAC,CAAC;QACrD,KAAK,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC5E,CAAC;AACF,CAAC,CAAC,CAAC","file":"migrateOptions.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\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\nimport { IEditorOptions } from '../../common/config/editorOptions.js';\n\nexport interface ISettingsReader {\n\t(key: string): unknown;\n}\n\nexport interface ISettingsWriter {\n\t(key: string, value: unknown): void;\n}\n\nexport class EditorSettingMigration {\n\n\tpublic static items: EditorSettingMigration[] = [];\n\n\tconstructor(\n\t\tpublic readonly key: string,\n\t\tpublic readonly migrate: (value: unknown, read: ISettingsReader, write: ISettingsWriter) => void\n\t) { }\n\n\tapply(options: unknown): void {\n\t\tconst value = EditorSettingMigration._read(options, this.key);\n\t\tconst read = (key: string) => EditorSettingMigration._read(options, key);\n\t\tconst write = (key: string, value: unknown) => EditorSettingMigration._write(options, key, value);\n\t\tthis.migrate(value, read, write);\n\t}\n\n\tprivate static _read(source: unknown, key: string): unknown {\n\t\tif (typeof source === 'undefined' || source === null) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\treturn this._read((source as Record<string, unknown>)[firstSegment], key.substring(firstDotIndex + 1));\n\t\t}\n\t\treturn (source as Record<string, unknown>)[key];\n\t}\n\n\tprivate static _write(target: unknown, key: string, value: unknown): void {\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\t(target as Record<string, unknown>)[firstSegment] = (target as Record<string, unknown>)[firstSegment] || {};\n\t\t\tthis._write((target as Record<string, unknown>)[firstSegment], key.substring(firstDotIndex + 1), value);\n\t\t\treturn;\n\t\t}\n\t\t(target as Record<string, unknown>)[key] = value;\n\t}\n}\n\nfunction registerEditorSettingMigration(key: string, migrate: (value: unknown, read: ISettingsReader, write: ISettingsWriter) => void): void {\n\tEditorSettingMigration.items.push(new EditorSettingMigration(key, migrate));\n}\n\nfunction registerSimpleEditorSettingMigration(key: string, values: [unknown, unknown][]): void {\n\tregisterEditorSettingMigration(key, (value, read, write) => {\n\t\tif (typeof value !== 'undefined') {\n\t\t\tfor (const [oldValue, newValue] of values) {\n\t\t\t\tif (value === oldValue) {\n\t\t\t\t\twrite(key, newValue);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}\n\n/**\n * Compatibility with old options\n */\nexport function migrateOptions(options: IEditorOptions): void {\n\tEditorSettingMigration.items.forEach(migration => migration.apply(options));\n}\n\nregisterSimpleEditorSettingMigration('wordWrap', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('lineNumbers', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorBlinking', [['visible', 'solid']]);\nregisterSimpleEditorSettingMigration('renderWhitespace', [[true, 'boundary'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('renderLineHighlight', [[true, 'line'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('acceptSuggestionOnEnter', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('tabCompletion', [[false, 'off'], [true, 'onlySnippets']]);\nregisterSimpleEditorSettingMigration('hover', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('parameterHints', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('autoIndent', [[false, 'advanced'], [true, 'full']]);\nregisterSimpleEditorSettingMigration('matchBrackets', [[true, 'always'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('renderFinalNewline', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorSmoothCaretAnimation', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('occurrencesHighlight', [[true, 'singleFile'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('wordBasedSuggestions', [[true, 'matchingDocuments'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('defaultColorDecorators', [[true, 'auto'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('minimap.autohide', [[true, 'mouseover'], [false, 'none']]);\n\nregisterEditorSettingMigration('autoClosingBrackets', (value, read, write) => {\n\tif (value === false) {\n\t\twrite('autoClosingBrackets', 'never');\n\t\tif (typeof read('autoClosingQuotes') === 'undefined') {\n\t\t\twrite('autoClosingQuotes', 'never');\n\t\t}\n\t\tif (typeof read('autoSurround') === 'undefined') {\n\t\t\twrite('autoSurround', 'never');\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('renderIndentGuides', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('renderIndentGuides', undefined);\n\t\tif (typeof read('guides.indentation') === 'undefined') {\n\t\t\twrite('guides.indentation', !!value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('highlightActiveIndentGuide', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('highlightActiveIndentGuide', undefined);\n\t\tif (typeof read('guides.highlightActiveIndentation') === 'undefined') {\n\t\t\twrite('guides.highlightActiveIndentation', !!value);\n\t\t}\n\t}\n});\n\nconst suggestFilteredTypesMapping: Record<string, string> = {\n\tmethod: 'showMethods',\n\tfunction: 'showFunctions',\n\tconstructor: 'showConstructors',\n\tdeprecated: 'showDeprecated',\n\tfield: 'showFields',\n\tvariable: 'showVariables',\n\tclass: 'showClasses',\n\tstruct: 'showStructs',\n\tinterface: 'showInterfaces',\n\tmodule: 'showModules',\n\tproperty: 'showProperties',\n\tevent: 'showEvents',\n\toperator: 'showOperators',\n\tunit: 'showUnits',\n\tvalue: 'showValues',\n\tconstant: 'showConstants',\n\tenum: 'showEnums',\n\tenumMember: 'showEnumMembers',\n\tkeyword: 'showKeywords',\n\ttext: 'showWords',\n\tcolor: 'showColors',\n\tfile: 'showFiles',\n\treference: 'showReferences',\n\tfolder: 'showFolders',\n\ttypeParameter: 'showTypeParameters',\n\tsnippet: 'showSnippets',\n};\n\nregisterEditorSettingMigration('suggest.filteredTypes', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tfor (const entry of Object.entries(suggestFilteredTypesMapping)) {\n\t\t\tconst v = (value as Record<string, unknown>)[entry[0]];\n\t\t\tif (v === false) {\n\t\t\t\tif (typeof read(`suggest.${entry[1]}`) === 'undefined') {\n\t\t\t\t\twrite(`suggest.${entry[1]}`, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twrite('suggest.filteredTypes', undefined);\n\t}\n});\n\nregisterEditorSettingMigration('quickSuggestions', (input, read, write) => {\n\tif (typeof input === 'boolean') {\n\t\tconst value = input ? 'on' : 'off';\n\t\tconst newValue = { comments: value, strings: value, other: value };\n\t\twrite('quickSuggestions', newValue);\n\t}\n});\n\n// Sticky Scroll\n\nregisterEditorSettingMigration('experimental.stickyScroll.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('experimental.stickyScroll.enabled', undefined);\n\t\tif (typeof read('stickyScroll.enabled') === 'undefined') {\n\t\t\twrite('stickyScroll.enabled', value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('experimental.stickyScroll.maxLineCount', (value, read, write) => {\n\tif (typeof value === 'number') {\n\t\twrite('experimental.stickyScroll.maxLineCount', undefined);\n\t\tif (typeof read('stickyScroll.maxLineCount') === 'undefined') {\n\t\t\twrite('stickyScroll.maxLineCount', value);\n\t\t}\n\t}\n});\n\n// Edit Context\n\nregisterEditorSettingMigration('editor.experimentalEditContextEnabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('editor.experimentalEditContextEnabled', undefined);\n\t\tif (typeof read('editor.editContext') === 'undefined') {\n\t\t\twrite('editor.editContext', value);\n\t\t}\n\t}\n});\n\n// Code Actions on Save\nregisterEditorSettingMigration('codeActionsOnSave', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tlet toBeModified = false;\n\t\tconst newValue: Record<string, unknown> = {};\n\t\tfor (const entry of Object.entries(value)) {\n\t\t\tif (typeof entry[1] === 'boolean') {\n\t\t\t\ttoBeModified = true;\n\t\t\t\tnewValue[entry[0]] = entry[1] ? 'explicit' : 'never';\n\t\t\t} else {\n\t\t\t\tnewValue[entry[0]] = entry[1];\n\t\t\t}\n\t\t}\n\t\tif (toBeModified) {\n\t\t\twrite(`codeActionsOnSave`, newValue);\n\t\t}\n\t}\n});\n\n// Migrate Quick Fix Settings\nregisterEditorSettingMigration('codeActionWidget.includeNearbyQuickfixes', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('codeActionWidget.includeNearbyQuickfixes', undefined);\n\t\tif (typeof read('codeActionWidget.includeNearbyQuickFixes') === 'undefined') {\n\t\t\twrite('codeActionWidget.includeNearbyQuickFixes', value);\n\t\t}\n\t}\n});\n\n// Migrate the lightbulb settings\nregisterEditorSettingMigration('lightbulb.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('lightbulb.enabled', value ? undefined : 'off');\n\t}\n});\n\n// NES Code Shifting\nregisterEditorSettingMigration('inlineSuggest.edits.codeShifting', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('inlineSuggest.edits.codeShifting', undefined);\n\t\twrite('inlineSuggest.edits.allowCodeShifting', value ? 'always' : 'never');\n\t}\n});\n","/*---------------------------------------------------------------------------------------------\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\nimport { IEditorOptions } from '../../common/config/editorOptions.js';\n\nexport interface ISettingsReader {\n\t(key: string): unknown;\n}\n\nexport interface ISettingsWriter {\n\t(key: string, value: unknown): void;\n}\n\nexport class EditorSettingMigration {\n\n\tpublic static items: EditorSettingMigration[] = [];\n\n\tconstructor(\n\t\tpublic readonly key: string,\n\t\tpublic readonly migrate: (value: unknown, read: ISettingsReader, write: ISettingsWriter) => void\n\t) { }\n\n\tapply(options: unknown): void {\n\t\tconst value = EditorSettingMigration._read(options, this.key);\n\t\tconst read = (key: string) => EditorSettingMigration._read(options, key);\n\t\tconst write = (key: string, value: unknown) => EditorSettingMigration._write(options, key, value);\n\t\tthis.migrate(value, read, write);\n\t}\n\n\tprivate static _read(source: unknown, key: string): unknown {\n\t\tif (typeof source === 'undefined' || source === null) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\treturn this._read((source as Record<string, unknown>)[firstSegment], key.substring(firstDotIndex + 1));\n\t\t}\n\t\treturn (source as Record<string, unknown>)[key];\n\t}\n\n\tprivate static _write(target: unknown, key: string, value: unknown): void {\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\t(target as Record<string, unknown>)[firstSegment] = (target as Record<string, unknown>)[firstSegment] || {};\n\t\t\tthis._write((target as Record<string, unknown>)[firstSegment], key.substring(firstDotIndex + 1), value);\n\t\t\treturn;\n\t\t}\n\t\t(target as Record<string, unknown>)[key] = value;\n\t}\n}\n\nfunction registerEditorSettingMigration(key: string, migrate: (value: unknown, read: ISettingsReader, write: ISettingsWriter) => void): void {\n\tEditorSettingMigration.items.push(new EditorSettingMigration(key, migrate));\n}\n\nfunction registerSimpleEditorSettingMigration(key: string, values: [unknown, unknown][]): void {\n\tregisterEditorSettingMigration(key, (value, read, write) => {\n\t\tif (typeof value !== 'undefined') {\n\t\t\tfor (const [oldValue, newValue] of values) {\n\t\t\t\tif (value === oldValue) {\n\t\t\t\t\twrite(key, newValue);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}\n\n/**\n * Compatibility with old options\n */\nexport function migrateOptions(options: IEditorOptions): void {\n\tEditorSettingMigration.items.forEach(migration => migration.apply(options));\n}\n\nregisterSimpleEditorSettingMigration('wordWrap', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('lineNumbers', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorBlinking', [['visible', 'solid']]);\nregisterSimpleEditorSettingMigration('renderWhitespace', [[true, 'boundary'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('renderLineHighlight', [[true, 'line'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('acceptSuggestionOnEnter', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('tabCompletion', [[false, 'off'], [true, 'onlySnippets']]);\nregisterSimpleEditorSettingMigration('hover', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('parameterHints', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('autoIndent', [[false, 'advanced'], [true, 'full']]);\nregisterSimpleEditorSettingMigration('matchBrackets', [[true, 'always'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('renderFinalNewline', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorSmoothCaretAnimation', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('occurrencesHighlight', [[true, 'singleFile'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('wordBasedSuggestions', [[true, 'matchingDocuments'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('defaultColorDecorators', [[true, 'auto'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('minimap.autohide', [[true, 'mouseover'], [false, 'none']]);\n\nregisterEditorSettingMigration('autoClosingBrackets', (value, read, write) => {\n\tif (value === false) {\n\t\twrite('autoClosingBrackets', 'never');\n\t\tif (typeof read('autoClosingQuotes') === 'undefined') {\n\t\t\twrite('autoClosingQuotes', 'never');\n\t\t}\n\t\tif (typeof read('autoSurround') === 'undefined') {\n\t\t\twrite('autoSurround', 'never');\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('renderIndentGuides', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('renderIndentGuides', undefined);\n\t\tif (typeof read('guides.indentation') === 'undefined') {\n\t\t\twrite('guides.indentation', !!value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('highlightActiveIndentGuide', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('highlightActiveIndentGuide', undefined);\n\t\tif (typeof read('guides.highlightActiveIndentation') === 'undefined') {\n\t\t\twrite('guides.highlightActiveIndentation', !!value);\n\t\t}\n\t}\n});\n\nconst suggestFilteredTypesMapping: Record<string, string> = {\n\tmethod: 'showMethods',\n\tfunction: 'showFunctions',\n\tconstructor: 'showConstructors',\n\tdeprecated: 'showDeprecated',\n\tfield: 'showFields',\n\tvariable: 'showVariables',\n\tclass: 'showClasses',\n\tstruct: 'showStructs',\n\tinterface: 'showInterfaces',\n\tmodule: 'showModules',\n\tproperty: 'showProperties',\n\tevent: 'showEvents',\n\toperator: 'showOperators',\n\tunit: 'showUnits',\n\tvalue: 'showValues',\n\tconstant: 'showConstants',\n\tenum: 'showEnums',\n\tenumMember: 'showEnumMembers',\n\tkeyword: 'showKeywords',\n\ttext: 'showWords',\n\tcolor: 'showColors',\n\tfile: 'showFiles',\n\treference: 'showReferences',\n\tfolder: 'showFolders',\n\ttypeParameter: 'showTypeParameters',\n\tsnippet: 'showSnippets',\n};\n\nregisterEditorSettingMigration('suggest.filteredTypes', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tfor (const entry of Object.entries(suggestFilteredTypesMapping)) {\n\t\t\tconst v = (value as Record<string, unknown>)[entry[0]];\n\t\t\tif (v === false) {\n\t\t\t\tif (typeof read(`suggest.${entry[1]}`) === 'undefined') {\n\t\t\t\t\twrite(`suggest.${entry[1]}`, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twrite('suggest.filteredTypes', undefined);\n\t}\n});\n\nregisterEditorSettingMigration('quickSuggestions', (input, read, write) => {\n\tif (typeof input === 'boolean') {\n\t\tconst value = input ? 'on' : 'off';\n\t\tconst newValue = { comments: value, strings: value, other: value };\n\t\twrite('quickSuggestions', newValue);\n\t}\n});\n\n// Sticky Scroll\n\nregisterEditorSettingMigration('experimental.stickyScroll.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('experimental.stickyScroll.enabled', undefined);\n\t\tif (typeof read('stickyScroll.enabled') === 'undefined') {\n\t\t\twrite('stickyScroll.enabled', value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('experimental.stickyScroll.maxLineCount', (value, read, write) => {\n\tif (typeof value === 'number') {\n\t\twrite('experimental.stickyScroll.maxLineCount', undefined);\n\t\tif (typeof read('stickyScroll.maxLineCount') === 'undefined') {\n\t\t\twrite('stickyScroll.maxLineCount', value);\n\t\t}\n\t}\n});\n\n// Edit Context\n\nregisterEditorSettingMigration('editor.experimentalEditContextEnabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('editor.experimentalEditContextEnabled', undefined);\n\t\tif (typeof read('editor.editContext') === 'undefined') {\n\t\t\twrite('editor.editContext', value);\n\t\t}\n\t}\n});\n\n// Code Actions on Save\nregisterEditorSettingMigration('codeActionsOnSave', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tlet toBeModified = false;\n\t\tconst newValue: Record<string, unknown> = {};\n\t\tfor (const entry of Object.entries(value)) {\n\t\t\tif (typeof entry[1] === 'boolean') {\n\t\t\t\ttoBeModified = true;\n\t\t\t\tnewValue[entry[0]] = entry[1] ? 'explicit' : 'never';\n\t\t\t} else {\n\t\t\t\tnewValue[entry[0]] = entry[1];\n\t\t\t}\n\t\t}\n\t\tif (toBeModified) {\n\t\t\twrite(`codeActionsOnSave`, newValue);\n\t\t}\n\t}\n});\n\n// Migrate Quick Fix Settings\nregisterEditorSettingMigration('codeActionWidget.includeNearbyQuickfixes', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('codeActionWidget.includeNearbyQuickfixes', undefined);\n\t\tif (typeof read('codeActionWidget.includeNearbyQuickFixes') === 'undefined') {\n\t\t\twrite('codeActionWidget.includeNearbyQuickFixes', value);\n\t\t}\n\t}\n});\n\n// Migrate the lightbulb settings\nregisterEditorSettingMigration('lightbulb.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('lightbulb.enabled', value ? undefined : 'off');\n\t}\n});\n\n// NES Code Shifting\nregisterEditorSettingMigration('inlineSuggest.edits.codeShifting', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('inlineSuggest.edits.codeShifting', undefined);\n\t\twrite('inlineSuggest.edits.allowCodeShifting', value ? 'always' : 'never');\n\t}\n});\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/config/migrateOptions.ts","vs/editor/browser/config/migrateOptions.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAYhG,MAAM,OAAO,sBAAsB;aAEpB,UAAK,GAA6B,EAAE,CAAC;IAEnD,YACiB,GAAW,EACX,OAAgF;QADhF,QAAG,GAAH,GAAG,CAAQ;QACX,YAAO,GAAP,OAAO,CAAyE;IAC7F,CAAC;IAEL,KAAK,CAAC,OAAgB;QACrB,MAAM,KAAK,GAAG,sBAAsB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9D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C,kCAAkC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IACzF,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;QAChC,KAAK,CAAC,kCAAkC,EAAE,SAAS,CAAC,CAAC;QACrD,KAAK,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC5E,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,gBAAgB;AAChB,8BAA8B,CAAC,eAAe,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IACtE,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;QAChC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC;AACF,CAAC,CAAC,CAAC","file":"migrateOptions.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\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\nimport { IEditorOptions } from '../../common/config/editorOptions.js';\n\nexport interface ISettingsReader {\n\t(key: string): unknown;\n}\n\nexport interface ISettingsWriter {\n\t(key: string, value: unknown): void;\n}\n\nexport class EditorSettingMigration {\n\n\tpublic static items: EditorSettingMigration[] = [];\n\n\tconstructor(\n\t\tpublic readonly key: string,\n\t\tpublic readonly migrate: (value: unknown, read: ISettingsReader, write: ISettingsWriter) => void\n\t) { }\n\n\tapply(options: unknown): void {\n\t\tconst value = EditorSettingMigration._read(options, this.key);\n\t\tconst read = (key: string) => EditorSettingMigration._read(options, key);\n\t\tconst write = (key: string, value: unknown) => EditorSettingMigration._write(options, key, value);\n\t\tthis.migrate(value, read, write);\n\t}\n\n\tprivate static _read(source: unknown, key: string): unknown {\n\t\tif (typeof source === 'undefined' || source === null) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\treturn this._read((source as Record<string, unknown>)[firstSegment], key.substring(firstDotIndex + 1));\n\t\t}\n\t\treturn (source as Record<string, unknown>)[key];\n\t}\n\n\tprivate static _write(target: unknown, key: string, value: unknown): void {\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\t(target as Record<string, unknown>)[firstSegment] = (target as Record<string, unknown>)[firstSegment] || {};\n\t\t\tthis._write((target as Record<string, unknown>)[firstSegment], key.substring(firstDotIndex + 1), value);\n\t\t\treturn;\n\t\t}\n\t\t(target as Record<string, unknown>)[key] = value;\n\t}\n}\n\nfunction registerEditorSettingMigration(key: string, migrate: (value: unknown, read: ISettingsReader, write: ISettingsWriter) => void): void {\n\tEditorSettingMigration.items.push(new EditorSettingMigration(key, migrate));\n}\n\nfunction registerSimpleEditorSettingMigration(key: string, values: [unknown, unknown][]): void {\n\tregisterEditorSettingMigration(key, (value, read, write) => {\n\t\tif (typeof value !== 'undefined') {\n\t\t\tfor (const [oldValue, newValue] of values) {\n\t\t\t\tif (value === oldValue) {\n\t\t\t\t\twrite(key, newValue);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}\n\n/**\n * Compatibility with old options\n */\nexport function migrateOptions(options: IEditorOptions): void {\n\tEditorSettingMigration.items.forEach(migration => migration.apply(options));\n}\n\nregisterSimpleEditorSettingMigration('wordWrap', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('lineNumbers', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorBlinking', [['visible', 'solid']]);\nregisterSimpleEditorSettingMigration('renderWhitespace', [[true, 'boundary'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('renderLineHighlight', [[true, 'line'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('acceptSuggestionOnEnter', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('tabCompletion', [[false, 'off'], [true, 'onlySnippets']]);\nregisterSimpleEditorSettingMigration('hover', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('parameterHints', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('autoIndent', [[false, 'advanced'], [true, 'full']]);\nregisterSimpleEditorSettingMigration('matchBrackets', [[true, 'always'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('renderFinalNewline', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorSmoothCaretAnimation', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('occurrencesHighlight', [[true, 'singleFile'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('wordBasedSuggestions', [[true, 'matchingDocuments'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('defaultColorDecorators', [[true, 'auto'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('minimap.autohide', [[true, 'mouseover'], [false, 'none']]);\n\nregisterEditorSettingMigration('autoClosingBrackets', (value, read, write) => {\n\tif (value === false) {\n\t\twrite('autoClosingBrackets', 'never');\n\t\tif (typeof read('autoClosingQuotes') === 'undefined') {\n\t\t\twrite('autoClosingQuotes', 'never');\n\t\t}\n\t\tif (typeof read('autoSurround') === 'undefined') {\n\t\t\twrite('autoSurround', 'never');\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('renderIndentGuides', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('renderIndentGuides', undefined);\n\t\tif (typeof read('guides.indentation') === 'undefined') {\n\t\t\twrite('guides.indentation', !!value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('highlightActiveIndentGuide', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('highlightActiveIndentGuide', undefined);\n\t\tif (typeof read('guides.highlightActiveIndentation') === 'undefined') {\n\t\t\twrite('guides.highlightActiveIndentation', !!value);\n\t\t}\n\t}\n});\n\nconst suggestFilteredTypesMapping: Record<string, string> = {\n\tmethod: 'showMethods',\n\tfunction: 'showFunctions',\n\tconstructor: 'showConstructors',\n\tdeprecated: 'showDeprecated',\n\tfield: 'showFields',\n\tvariable: 'showVariables',\n\tclass: 'showClasses',\n\tstruct: 'showStructs',\n\tinterface: 'showInterfaces',\n\tmodule: 'showModules',\n\tproperty: 'showProperties',\n\tevent: 'showEvents',\n\toperator: 'showOperators',\n\tunit: 'showUnits',\n\tvalue: 'showValues',\n\tconstant: 'showConstants',\n\tenum: 'showEnums',\n\tenumMember: 'showEnumMembers',\n\tkeyword: 'showKeywords',\n\ttext: 'showWords',\n\tcolor: 'showColors',\n\tfile: 'showFiles',\n\treference: 'showReferences',\n\tfolder: 'showFolders',\n\ttypeParameter: 'showTypeParameters',\n\tsnippet: 'showSnippets',\n};\n\nregisterEditorSettingMigration('suggest.filteredTypes', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tfor (const entry of Object.entries(suggestFilteredTypesMapping)) {\n\t\t\tconst v = (value as Record<string, unknown>)[entry[0]];\n\t\t\tif (v === false) {\n\t\t\t\tif (typeof read(`suggest.${entry[1]}`) === 'undefined') {\n\t\t\t\t\twrite(`suggest.${entry[1]}`, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twrite('suggest.filteredTypes', undefined);\n\t}\n});\n\nregisterEditorSettingMigration('quickSuggestions', (input, read, write) => {\n\tif (typeof input === 'boolean') {\n\t\tconst value = input ? 'on' : 'off';\n\t\tconst newValue = { comments: value, strings: value, other: value };\n\t\twrite('quickSuggestions', newValue);\n\t}\n});\n\n// Sticky Scroll\n\nregisterEditorSettingMigration('experimental.stickyScroll.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('experimental.stickyScroll.enabled', undefined);\n\t\tif (typeof read('stickyScroll.enabled') === 'undefined') {\n\t\t\twrite('stickyScroll.enabled', value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('experimental.stickyScroll.maxLineCount', (value, read, write) => {\n\tif (typeof value === 'number') {\n\t\twrite('experimental.stickyScroll.maxLineCount', undefined);\n\t\tif (typeof read('stickyScroll.maxLineCount') === 'undefined') {\n\t\t\twrite('stickyScroll.maxLineCount', value);\n\t\t}\n\t}\n});\n\n// Edit Context\n\nregisterEditorSettingMigration('editor.experimentalEditContextEnabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('editor.experimentalEditContextEnabled', undefined);\n\t\tif (typeof read('editor.editContext') === 'undefined') {\n\t\t\twrite('editor.editContext', value);\n\t\t}\n\t}\n});\n\n// Code Actions on Save\nregisterEditorSettingMigration('codeActionsOnSave', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tlet toBeModified = false;\n\t\tconst newValue: Record<string, unknown> = {};\n\t\tfor (const entry of Object.entries(value)) {\n\t\t\tif (typeof entry[1] === 'boolean') {\n\t\t\t\ttoBeModified = true;\n\t\t\t\tnewValue[entry[0]] = entry[1] ? 'explicit' : 'never';\n\t\t\t} else {\n\t\t\t\tnewValue[entry[0]] = entry[1];\n\t\t\t}\n\t\t}\n\t\tif (toBeModified) {\n\t\t\twrite(`codeActionsOnSave`, newValue);\n\t\t}\n\t}\n});\n\n// Migrate Quick Fix Settings\nregisterEditorSettingMigration('codeActionWidget.includeNearbyQuickfixes', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('codeActionWidget.includeNearbyQuickfixes', undefined);\n\t\tif (typeof read('codeActionWidget.includeNearbyQuickFixes') === 'undefined') {\n\t\t\twrite('codeActionWidget.includeNearbyQuickFixes', value);\n\t\t}\n\t}\n});\n\n// Migrate the lightbulb settings\nregisterEditorSettingMigration('lightbulb.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('lightbulb.enabled', value ? undefined : 'off');\n\t}\n});\n\n// NES Code Shifting\nregisterEditorSettingMigration('inlineSuggest.edits.codeShifting', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('inlineSuggest.edits.codeShifting', undefined);\n\t\twrite('inlineSuggest.edits.allowCodeShifting', value ? 'always' : 'never');\n\t}\n});\n\n// Migrate Hover\nregisterEditorSettingMigration('hover.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('hover.enabled', value ? 'on' : 'off');\n\t}\n});\n","/*---------------------------------------------------------------------------------------------\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\nimport { IEditorOptions } from '../../common/config/editorOptions.js';\n\nexport interface ISettingsReader {\n\t(key: string): unknown;\n}\n\nexport interface ISettingsWriter {\n\t(key: string, value: unknown): void;\n}\n\nexport class EditorSettingMigration {\n\n\tpublic static items: EditorSettingMigration[] = [];\n\n\tconstructor(\n\t\tpublic readonly key: string,\n\t\tpublic readonly migrate: (value: unknown, read: ISettingsReader, write: ISettingsWriter) => void\n\t) { }\n\n\tapply(options: unknown): void {\n\t\tconst value = EditorSettingMigration._read(options, this.key);\n\t\tconst read = (key: string) => EditorSettingMigration._read(options, key);\n\t\tconst write = (key: string, value: unknown) => EditorSettingMigration._write(options, key, value);\n\t\tthis.migrate(value, read, write);\n\t}\n\n\tprivate static _read(source: unknown, key: string): unknown {\n\t\tif (typeof source === 'undefined' || source === null) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\treturn this._read((source as Record<string, unknown>)[firstSegment], key.substring(firstDotIndex + 1));\n\t\t}\n\t\treturn (source as Record<string, unknown>)[key];\n\t}\n\n\tprivate static _write(target: unknown, key: string, value: unknown): void {\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\t(target as Record<string, unknown>)[firstSegment] = (target as Record<string, unknown>)[firstSegment] || {};\n\t\t\tthis._write((target as Record<string, unknown>)[firstSegment], key.substring(firstDotIndex + 1), value);\n\t\t\treturn;\n\t\t}\n\t\t(target as Record<string, unknown>)[key] = value;\n\t}\n}\n\nfunction registerEditorSettingMigration(key: string, migrate: (value: unknown, read: ISettingsReader, write: ISettingsWriter) => void): void {\n\tEditorSettingMigration.items.push(new EditorSettingMigration(key, migrate));\n}\n\nfunction registerSimpleEditorSettingMigration(key: string, values: [unknown, unknown][]): void {\n\tregisterEditorSettingMigration(key, (value, read, write) => {\n\t\tif (typeof value !== 'undefined') {\n\t\t\tfor (const [oldValue, newValue] of values) {\n\t\t\t\tif (value === oldValue) {\n\t\t\t\t\twrite(key, newValue);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}\n\n/**\n * Compatibility with old options\n */\nexport function migrateOptions(options: IEditorOptions): void {\n\tEditorSettingMigration.items.forEach(migration => migration.apply(options));\n}\n\nregisterSimpleEditorSettingMigration('wordWrap', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('lineNumbers', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorBlinking', [['visible', 'solid']]);\nregisterSimpleEditorSettingMigration('renderWhitespace', [[true, 'boundary'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('renderLineHighlight', [[true, 'line'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('acceptSuggestionOnEnter', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('tabCompletion', [[false, 'off'], [true, 'onlySnippets']]);\nregisterSimpleEditorSettingMigration('hover', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('parameterHints', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('autoIndent', [[false, 'advanced'], [true, 'full']]);\nregisterSimpleEditorSettingMigration('matchBrackets', [[true, 'always'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('renderFinalNewline', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorSmoothCaretAnimation', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('occurrencesHighlight', [[true, 'singleFile'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('wordBasedSuggestions', [[true, 'matchingDocuments'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('defaultColorDecorators', [[true, 'auto'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('minimap.autohide', [[true, 'mouseover'], [false, 'none']]);\n\nregisterEditorSettingMigration('autoClosingBrackets', (value, read, write) => {\n\tif (value === false) {\n\t\twrite('autoClosingBrackets', 'never');\n\t\tif (typeof read('autoClosingQuotes') === 'undefined') {\n\t\t\twrite('autoClosingQuotes', 'never');\n\t\t}\n\t\tif (typeof read('autoSurround') === 'undefined') {\n\t\t\twrite('autoSurround', 'never');\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('renderIndentGuides', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('renderIndentGuides', undefined);\n\t\tif (typeof read('guides.indentation') === 'undefined') {\n\t\t\twrite('guides.indentation', !!value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('highlightActiveIndentGuide', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('highlightActiveIndentGuide', undefined);\n\t\tif (typeof read('guides.highlightActiveIndentation') === 'undefined') {\n\t\t\twrite('guides.highlightActiveIndentation', !!value);\n\t\t}\n\t}\n});\n\nconst suggestFilteredTypesMapping: Record<string, string> = {\n\tmethod: 'showMethods',\n\tfunction: 'showFunctions',\n\tconstructor: 'showConstructors',\n\tdeprecated: 'showDeprecated',\n\tfield: 'showFields',\n\tvariable: 'showVariables',\n\tclass: 'showClasses',\n\tstruct: 'showStructs',\n\tinterface: 'showInterfaces',\n\tmodule: 'showModules',\n\tproperty: 'showProperties',\n\tevent: 'showEvents',\n\toperator: 'showOperators',\n\tunit: 'showUnits',\n\tvalue: 'showValues',\n\tconstant: 'showConstants',\n\tenum: 'showEnums',\n\tenumMember: 'showEnumMembers',\n\tkeyword: 'showKeywords',\n\ttext: 'showWords',\n\tcolor: 'showColors',\n\tfile: 'showFiles',\n\treference: 'showReferences',\n\tfolder: 'showFolders',\n\ttypeParameter: 'showTypeParameters',\n\tsnippet: 'showSnippets',\n};\n\nregisterEditorSettingMigration('suggest.filteredTypes', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tfor (const entry of Object.entries(suggestFilteredTypesMapping)) {\n\t\t\tconst v = (value as Record<string, unknown>)[entry[0]];\n\t\t\tif (v === false) {\n\t\t\t\tif (typeof read(`suggest.${entry[1]}`) === 'undefined') {\n\t\t\t\t\twrite(`suggest.${entry[1]}`, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twrite('suggest.filteredTypes', undefined);\n\t}\n});\n\nregisterEditorSettingMigration('quickSuggestions', (input, read, write) => {\n\tif (typeof input === 'boolean') {\n\t\tconst value = input ? 'on' : 'off';\n\t\tconst newValue = { comments: value, strings: value, other: value };\n\t\twrite('quickSuggestions', newValue);\n\t}\n});\n\n// Sticky Scroll\n\nregisterEditorSettingMigration('experimental.stickyScroll.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('experimental.stickyScroll.enabled', undefined);\n\t\tif (typeof read('stickyScroll.enabled') === 'undefined') {\n\t\t\twrite('stickyScroll.enabled', value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('experimental.stickyScroll.maxLineCount', (value, read, write) => {\n\tif (typeof value === 'number') {\n\t\twrite('experimental.stickyScroll.maxLineCount', undefined);\n\t\tif (typeof read('stickyScroll.maxLineCount') === 'undefined') {\n\t\t\twrite('stickyScroll.maxLineCount', value);\n\t\t}\n\t}\n});\n\n// Edit Context\n\nregisterEditorSettingMigration('editor.experimentalEditContextEnabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('editor.experimentalEditContextEnabled', undefined);\n\t\tif (typeof read('editor.editContext') === 'undefined') {\n\t\t\twrite('editor.editContext', value);\n\t\t}\n\t}\n});\n\n// Code Actions on Save\nregisterEditorSettingMigration('codeActionsOnSave', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tlet toBeModified = false;\n\t\tconst newValue: Record<string, unknown> = {};\n\t\tfor (const entry of Object.entries(value)) {\n\t\t\tif (typeof entry[1] === 'boolean') {\n\t\t\t\ttoBeModified = true;\n\t\t\t\tnewValue[entry[0]] = entry[1] ? 'explicit' : 'never';\n\t\t\t} else {\n\t\t\t\tnewValue[entry[0]] = entry[1];\n\t\t\t}\n\t\t}\n\t\tif (toBeModified) {\n\t\t\twrite(`codeActionsOnSave`, newValue);\n\t\t}\n\t}\n});\n\n// Migrate Quick Fix Settings\nregisterEditorSettingMigration('codeActionWidget.includeNearbyQuickfixes', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('codeActionWidget.includeNearbyQuickfixes', undefined);\n\t\tif (typeof read('codeActionWidget.includeNearbyQuickFixes') === 'undefined') {\n\t\t\twrite('codeActionWidget.includeNearbyQuickFixes', value);\n\t\t}\n\t}\n});\n\n// Migrate the lightbulb settings\nregisterEditorSettingMigration('lightbulb.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('lightbulb.enabled', value ? undefined : 'off');\n\t}\n});\n\n// NES Code Shifting\nregisterEditorSettingMigration('inlineSuggest.edits.codeShifting', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('inlineSuggest.edits.codeShifting', undefined);\n\t\twrite('inlineSuggest.edits.allowCodeShifting', value ? 'always' : 'never');\n\t}\n});\n\n// Migrate Hover\nregisterEditorSettingMigration('hover.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('hover.enabled', value ? 'on' : 'off');\n\t}\n});\n"]}
@@ -3,10 +3,12 @@
3
3
  * Licensed under the MIT License. See License.txt in the project root for license information.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  import { Emitter } from '../../../base/common/event.js';
6
- class TabFocusImpl {
6
+ import { Disposable } from '../../../base/common/lifecycle.js';
7
+ class TabFocusImpl extends Disposable {
7
8
  constructor() {
9
+ super(...arguments);
8
10
  this._tabFocus = false;
9
- this._onDidChangeTabFocus = new Emitter();
11
+ this._onDidChangeTabFocus = this._register(new Emitter());
10
12
  this.onDidChangeTabFocus = this._onDidChangeTabFocus.event;
11
13
  }
12
14
  getTabFocusMode() {
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/config/tabFocus.ts","vs/editor/browser/config/tabFocus.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,OAAO,EAAS,MAAM,+BAA+B,CAAC;AAE/D,MAAM,YAAY;IAAlB;QACS,cAAS,GAAY,KAAK,CAAC;QAClB,yBAAoB,GAAG,IAAI,OAAO,EAAW,CAAC;QAC/C,wBAAmB,GAAmB,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC;IAUvF,CAAC;IARO,eAAe;QACrB,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAEM,eAAe,CAAC,YAAqB;QAC3C,IAAI,CAAC,SAAS,GAAG,YAAY,CAAC;QAC9B,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAChD,CAAC;CACD;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC","file":"tabFocus.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\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\nimport { Emitter, Event } from '../../../base/common/event.js';\n\nclass TabFocusImpl {\n\tprivate _tabFocus: boolean = false;\n\tprivate readonly _onDidChangeTabFocus = new Emitter<boolean>();\n\tpublic readonly onDidChangeTabFocus: Event<boolean> = this._onDidChangeTabFocus.event;\n\n\tpublic getTabFocusMode(): boolean {\n\t\treturn this._tabFocus;\n\t}\n\n\tpublic setTabFocusMode(tabFocusMode: boolean): void {\n\t\tthis._tabFocus = tabFocusMode;\n\t\tthis._onDidChangeTabFocus.fire(this._tabFocus);\n\t}\n}\n\n/**\n * Control what pressing Tab does.\n * If it is false, pressing Tab or Shift-Tab will be handled by the editor.\n * If it is true, pressing Tab or Shift-Tab will move the browser focus.\n * Defaults to false.\n */\nexport const TabFocus = new TabFocusImpl();\n","/*---------------------------------------------------------------------------------------------\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\nimport { Emitter, Event } from '../../../base/common/event.js';\n\nclass TabFocusImpl {\n\tprivate _tabFocus: boolean = false;\n\tprivate readonly _onDidChangeTabFocus = new Emitter<boolean>();\n\tpublic readonly onDidChangeTabFocus: Event<boolean> = this._onDidChangeTabFocus.event;\n\n\tpublic getTabFocusMode(): boolean {\n\t\treturn this._tabFocus;\n\t}\n\n\tpublic setTabFocusMode(tabFocusMode: boolean): void {\n\t\tthis._tabFocus = tabFocusMode;\n\t\tthis._onDidChangeTabFocus.fire(this._tabFocus);\n\t}\n}\n\n/**\n * Control what pressing Tab does.\n * If it is false, pressing Tab or Shift-Tab will be handled by the editor.\n * If it is true, pressing Tab or Shift-Tab will move the browser focus.\n * Defaults to false.\n */\nexport const TabFocus = new TabFocusImpl();\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/config/tabFocus.ts","vs/editor/browser/config/tabFocus.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,OAAO,EAAS,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,MAAM,YAAa,SAAQ,UAAU;IAArC;;QACS,cAAS,GAAY,KAAK,CAAC;QAClB,yBAAoB,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,OAAO,EAAW,CAAC,CAAC;QAC/D,wBAAmB,GAAmB,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC;IAUvF,CAAC;IARO,eAAe;QACrB,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAEM,eAAe,CAAC,YAAqB;QAC3C,IAAI,CAAC,SAAS,GAAG,YAAY,CAAC;QAC9B,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAChD,CAAC;CACD;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC","file":"tabFocus.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\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\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\n\nclass TabFocusImpl extends Disposable {\n\tprivate _tabFocus: boolean = false;\n\tprivate readonly _onDidChangeTabFocus = this._register(new Emitter<boolean>());\n\tpublic readonly onDidChangeTabFocus: Event<boolean> = this._onDidChangeTabFocus.event;\n\n\tpublic getTabFocusMode(): boolean {\n\t\treturn this._tabFocus;\n\t}\n\n\tpublic setTabFocusMode(tabFocusMode: boolean): void {\n\t\tthis._tabFocus = tabFocusMode;\n\t\tthis._onDidChangeTabFocus.fire(this._tabFocus);\n\t}\n}\n\n/**\n * Control what pressing Tab does.\n * If it is false, pressing Tab or Shift-Tab will be handled by the editor.\n * If it is true, pressing Tab or Shift-Tab will move the browser focus.\n * Defaults to false.\n */\nexport const TabFocus = new TabFocusImpl();\n","/*---------------------------------------------------------------------------------------------\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\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\n\nclass TabFocusImpl extends Disposable {\n\tprivate _tabFocus: boolean = false;\n\tprivate readonly _onDidChangeTabFocus = this._register(new Emitter<boolean>());\n\tpublic readonly onDidChangeTabFocus: Event<boolean> = this._onDidChangeTabFocus.event;\n\n\tpublic getTabFocusMode(): boolean {\n\t\treturn this._tabFocus;\n\t}\n\n\tpublic setTabFocusMode(tabFocusMode: boolean): void {\n\t\tthis._tabFocus = tabFocusMode;\n\t\tthis._onDidChangeTabFocus.fire(this._tabFocus);\n\t}\n}\n\n/**\n * Control what pressing Tab does.\n * If it is false, pressing Tab or Shift-Tab will be handled by the editor.\n * If it is true, pressing Tab or Shift-Tab will move the browser focus.\n * Defaults to false.\n */\nexport const TabFocus = new TabFocusImpl();\n"]}
@@ -32,6 +32,7 @@ import { IME } from '../../../../../base/common/ime.js';
32
32
  import { OffsetRange } from '../../../../common/core/ranges/offsetRange.js';
33
33
  import { ILogService, LogLevel } from '../../../../../platform/log/common/log.js';
34
34
  import { generateUuid } from '../../../../../base/common/uuid.js';
35
+ import { inputLatency } from '../../../../../base/browser/performance.js';
35
36
  // Corresponds to classes in nativeEditContext.css
36
37
  var CompositionClassName;
37
38
  (function (CompositionClassName) {
@@ -90,11 +91,15 @@ let NativeEditContext = class NativeEditContext extends AbstractEditContext {
90
91
  this.logService.trace('NativeEditContext#cut (before viewController.cut)');
91
92
  this._viewController.cut();
92
93
  }));
94
+ this._register(addDisposableListener(this.domNode.domNode, 'selectionchange', () => {
95
+ inputLatency.onSelectionChange();
96
+ }));
93
97
  this._register(addDisposableListener(this.domNode.domNode, 'keyup', (e) => this._onKeyUp(e)));
94
98
  this._register(addDisposableListener(this.domNode.domNode, 'keydown', async (e) => this._onKeyDown(e)));
95
99
  this._register(addDisposableListener(this._imeTextArea.domNode, 'keyup', (e) => this._onKeyUp(e)));
96
100
  this._register(addDisposableListener(this._imeTextArea.domNode, 'keydown', async (e) => this._onKeyDown(e)));
97
101
  this._register(addDisposableListener(this.domNode.domNode, 'beforeinput', async (e) => {
102
+ inputLatency.onBeforeInput();
98
103
  if (e.inputType === 'insertParagraph' || e.inputType === 'insertLineBreak') {
99
104
  this._onType(this._viewController, { text: '\n', replacePrevCharCnt: 0, replaceNextCharCnt: 0, positionDelta: 0 });
100
105
  }
@@ -129,6 +134,7 @@ let NativeEditContext = class NativeEditContext extends AbstractEditContext {
129
134
  this._register(editContextAddDisposableListener(this._editContext, 'characterboundsupdate', (e) => this._updateCharacterBounds(e)));
130
135
  let highSurrogateCharacter;
131
136
  this._register(editContextAddDisposableListener(this._editContext, 'textupdate', (e) => {
137
+ inputLatency.onInput();
132
138
  const text = e.text;
133
139
  if (text.length === 1) {
134
140
  const charCode = text.charCodeAt(0);
@@ -290,9 +296,11 @@ let NativeEditContext = class NativeEditContext extends AbstractEditContext {
290
296
  }
291
297
  // --- Private methods ---
292
298
  _onKeyUp(e) {
299
+ inputLatency.onKeyUp();
293
300
  this._viewController.emitKeyUp(new StandardKeyboardEvent(e));
294
301
  }
295
302
  _onKeyDown(e) {
303
+ inputLatency.onKeyDown();
296
304
  const standardKeyboardEvent = new StandardKeyboardEvent(e);
297
305
  // When the IME is visible, the keys, like arrow-left and arrow-right, should be used to navigate in the IME, and should not be propagated further
298
306
  if (standardKeyboardEvent.keyCode === 114 /* KeyCode.KEY_IN_COMPOSITION */) {