monaco-editor-core 0.57.0 → 0.58.0-dev-20261104

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 (508) 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 +38 -6
  18. package/esm/vs/base/browser/browser.js +8 -0
  19. package/esm/vs/base/browser/browser.js.map +1 -1
  20. package/esm/vs/base/browser/contextmenu.js +8 -1
  21. package/esm/vs/base/browser/contextmenu.js.map +1 -1
  22. package/esm/vs/base/browser/dom.js +34 -5
  23. package/esm/vs/base/browser/dom.js.map +1 -1
  24. package/esm/vs/base/browser/dompurify/dompurify.js +2457 -2640
  25. package/esm/vs/base/browser/markdownRenderer.js +48 -21
  26. package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
  27. package/esm/vs/base/browser/pixelRatio.js +3 -2
  28. package/esm/vs/base/browser/pixelRatio.js.map +1 -1
  29. package/esm/vs/base/browser/ui/actionbar/actionViewItems.js +5 -2
  30. package/esm/vs/base/browser/ui/actionbar/actionViewItems.js.map +1 -1
  31. package/esm/vs/base/browser/ui/actionbar/actionbar.js +7 -2
  32. package/esm/vs/base/browser/ui/actionbar/actionbar.js.map +1 -1
  33. package/esm/vs/base/browser/ui/animations/animations.js +68 -40
  34. package/esm/vs/base/browser/ui/animations/animations.js.map +1 -1
  35. package/esm/vs/base/browser/ui/button/button.js +7 -0
  36. package/esm/vs/base/browser/ui/button/button.js.map +1 -1
  37. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  38. package/esm/vs/base/browser/ui/contextview/contextview.css +15 -0
  39. package/esm/vs/base/browser/ui/contextview/contextview.js +266 -40
  40. package/esm/vs/base/browser/ui/contextview/contextview.js.map +1 -1
  41. package/esm/vs/base/browser/ui/contextview/windowControlsOverlay.js +72 -0
  42. package/esm/vs/base/browser/ui/contextview/windowControlsOverlay.js.map +1 -0
  43. package/esm/vs/base/browser/ui/dialog/dialog.css +5 -0
  44. package/esm/vs/base/browser/ui/dropdown/dropdown.js +2 -1
  45. package/esm/vs/base/browser/ui/dropdown/dropdown.js.map +1 -1
  46. package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +1 -0
  47. package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js.map +1 -1
  48. package/esm/vs/base/browser/ui/hover/hover.js.map +1 -1
  49. package/esm/vs/base/browser/ui/list/listView.js +87 -15
  50. package/esm/vs/base/browser/ui/list/listView.js.map +1 -1
  51. package/esm/vs/base/browser/ui/list/listWidget.js +37 -15
  52. package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
  53. package/esm/vs/base/browser/ui/menu/menu.js +189 -52
  54. package/esm/vs/base/browser/ui/menu/menu.js.map +1 -1
  55. package/esm/vs/base/browser/ui/radio/radio.css +11 -0
  56. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +2 -1
  57. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
  58. package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
  59. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +14 -8
  60. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
  61. package/esm/vs/base/browser/ui/splitview/splitview.js +11 -7
  62. package/esm/vs/base/browser/ui/splitview/splitview.js.map +1 -1
  63. package/esm/vs/base/browser/ui/toggle/switch.css +16 -7
  64. package/esm/vs/base/browser/ui/toggle/switch.js +9 -6
  65. package/esm/vs/base/browser/ui/toggle/switch.js.map +1 -1
  66. package/esm/vs/base/browser/ui/toolbar/toolbar.css +1 -2
  67. package/esm/vs/base/browser/ui/toolbar/toolbar.js +85 -38
  68. package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
  69. package/esm/vs/base/browser/ui/tree/abstractTree.js +48 -9
  70. package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
  71. package/esm/vs/base/browser/ui/tree/asyncDataTree.js +10 -1
  72. package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
  73. package/esm/vs/base/browser/ui/tree/objectTree.js +3 -0
  74. package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
  75. package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
  76. package/esm/vs/base/common/actions.js +8 -2
  77. package/esm/vs/base/common/actions.js.map +1 -1
  78. package/esm/vs/base/common/arrays.js +4 -4
  79. package/esm/vs/base/common/arrays.js.map +1 -1
  80. package/esm/vs/base/common/async.js +12 -8
  81. package/esm/vs/base/common/async.js.map +1 -1
  82. package/esm/vs/base/common/cancellation.js +25 -0
  83. package/esm/vs/base/common/cancellation.js.map +1 -1
  84. package/esm/vs/base/common/codicons.js +2 -0
  85. package/esm/vs/base/common/codicons.js.map +1 -1
  86. package/esm/vs/base/common/codiconsLibrary.js +2 -0
  87. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  88. package/esm/vs/base/common/color.js +1 -1
  89. package/esm/vs/base/common/color.js.map +1 -1
  90. package/esm/vs/base/common/diff/diff.js +60 -1
  91. package/esm/vs/base/common/diff/diff.js.map +1 -1
  92. package/esm/vs/base/common/event.js +1 -1
  93. package/esm/vs/base/common/event.js.map +1 -1
  94. package/esm/vs/base/common/glob.js +1 -0
  95. package/esm/vs/base/common/glob.js.map +1 -1
  96. package/esm/vs/base/common/htmlContent.js +74 -12
  97. package/esm/vs/base/common/htmlContent.js.map +1 -1
  98. package/esm/vs/base/common/json.js +19 -0
  99. package/esm/vs/base/common/json.js.map +1 -0
  100. package/esm/vs/base/common/network.js +16 -0
  101. package/esm/vs/base/common/network.js.map +1 -1
  102. package/esm/vs/base/common/resources.js +14 -2
  103. package/esm/vs/base/common/resources.js.map +1 -1
  104. package/esm/vs/base/common/strings.js +1 -1
  105. package/esm/vs/base/common/strings.js.map +1 -1
  106. package/esm/vs/base/common/uri.js +2 -2
  107. package/esm/vs/base/common/uri.js.map +1 -1
  108. package/esm/vs/editor/browser/config/editorConfiguration.js +1 -1
  109. package/esm/vs/editor/browser/config/fontMeasurements.js +19 -6
  110. package/esm/vs/editor/browser/config/fontMeasurements.js.map +1 -1
  111. package/esm/vs/editor/browser/controller/dragScrolling.js +3 -3
  112. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +11 -5
  113. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
  114. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +8 -38
  115. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
  116. package/esm/vs/editor/browser/controller/editContext/native/screenReaderContentRich.js +3 -3
  117. package/esm/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +6 -6
  118. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +12 -10
  119. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
  120. package/esm/vs/editor/browser/controller/mouseHandler.js +7 -7
  121. package/esm/vs/editor/browser/controller/mouseTarget.js +3 -3
  122. package/esm/vs/editor/browser/coreCommands.js +2 -2
  123. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  124. package/esm/vs/editor/browser/editorMarkdownSanitizer.js +19 -0
  125. package/esm/vs/editor/browser/editorMarkdownSanitizer.js.map +1 -0
  126. package/esm/vs/editor/browser/gpu/rectangleRenderer.js +1 -1
  127. package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -1
  128. package/esm/vs/editor/browser/observableCodeEditor.js +1 -1
  129. package/esm/vs/editor/browser/services/editorWorkerService.js +3 -2
  130. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  131. package/esm/vs/editor/browser/services/openerService.js +6 -2
  132. package/esm/vs/editor/browser/services/openerService.js.map +1 -1
  133. package/esm/vs/editor/browser/view/domLineBreaksComputer.js +34 -11
  134. package/esm/vs/editor/browser/view/domLineBreaksComputer.js.map +1 -1
  135. package/esm/vs/editor/browser/view/viewController.js +7 -7
  136. package/esm/vs/editor/browser/view/viewController.js.map +1 -1
  137. package/esm/vs/editor/browser/view/viewLayer.js +1 -1
  138. package/esm/vs/editor/browser/view/viewOverlays.js +4 -4
  139. package/esm/vs/editor/browser/view.js +5 -5
  140. package/esm/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js +1 -1
  141. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +11 -3
  142. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  143. package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +6 -6
  144. package/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +12 -12
  145. package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +9 -2
  146. package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js.map +1 -1
  147. package/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js +2 -2
  148. package/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +2 -2
  149. package/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +2 -2
  150. package/esm/vs/editor/browser/viewParts/margin/margin.js +2 -2
  151. package/esm/vs/editor/browser/viewParts/minimap/minimap.js +6 -6
  152. package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +9 -2
  153. package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js.map +1 -1
  154. package/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +5 -5
  155. package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +3 -3
  156. package/esm/vs/editor/browser/viewParts/rulers/rulers.js +2 -2
  157. package/esm/vs/editor/browser/viewParts/rulersGpu/rulersGpu.js +1 -1
  158. package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +3 -3
  159. package/esm/vs/editor/browser/viewParts/selections/selections.js +2 -2
  160. package/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js +2 -2
  161. package/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js +6 -6
  162. package/esm/vs/editor/browser/viewParts/viewLines/viewLineOptions.js +5 -5
  163. package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +11 -11
  164. package/esm/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.js +1 -1
  165. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +2 -2
  166. package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +4 -4
  167. package/esm/vs/editor/browser/viewParts/wordWrapIndicator/wordWrapIndicator.js +2 -2
  168. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +22 -21
  169. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  170. package/esm/vs/editor/browser/widget/diffEditor/commands.js +12 -12
  171. package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +18 -18
  172. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -1
  173. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +3 -3
  174. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +10 -10
  175. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js.map +1 -1
  176. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +2 -2
  177. package/esm/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +4 -4
  178. package/esm/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +21 -3
  179. package/esm/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js.map +1 -1
  180. package/esm/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
  181. package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +10 -10
  182. package/esm/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
  183. package/esm/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -1
  184. package/esm/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +2 -2
  185. package/esm/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
  186. package/esm/vs/editor/browser/widget/multiDiffEditor/colors.js +3 -3
  187. package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollLayout.js +2 -2
  188. package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollLayout.js.map +1 -1
  189. package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollView.js +21 -2
  190. package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollView.js.map +1 -1
  191. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -2
  192. package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +11 -3
  193. package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
  194. package/esm/vs/editor/browser/widget/multiDiffEditor/virtualizedItemManager.js +1 -0
  195. package/esm/vs/editor/browser/widget/multiDiffEditor/virtualizedItemManager.js.map +1 -1
  196. package/esm/vs/editor/common/commands/columnSelectionPasteCommand.js +64 -0
  197. package/esm/vs/editor/common/commands/columnSelectionPasteCommand.js.map +1 -0
  198. package/esm/vs/editor/common/config/editorConfigurationSchema.js +68 -58
  199. package/esm/vs/editor/common/config/editorConfigurationSchema.js.map +1 -1
  200. package/esm/vs/editor/common/config/editorOptions.js +560 -500
  201. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  202. package/esm/vs/editor/common/core/editorColorRegistry.js +71 -71
  203. package/esm/vs/editor/common/core/edits/textEdit.js +16 -0
  204. package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
  205. package/esm/vs/editor/common/cursor/cursor.js +20 -10
  206. package/esm/vs/editor/common/cursor/cursor.js.map +1 -1
  207. package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js +67 -14
  208. package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js.map +1 -1
  209. package/esm/vs/editor/common/cursor/cursorTypeOperations.js +2 -2
  210. package/esm/vs/editor/common/cursor/cursorTypeOperations.js.map +1 -1
  211. package/esm/vs/editor/common/cursorCommon.js +22 -21
  212. package/esm/vs/editor/common/cursorCommon.js.map +1 -1
  213. package/esm/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +21 -8
  214. package/esm/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js.map +1 -1
  215. package/esm/vs/editor/common/diff/documentDiffProvider.js.map +1 -1
  216. package/esm/vs/editor/common/diff/externalLinesDiffComputer.js +38 -26
  217. package/esm/vs/editor/common/diff/externalLinesDiffComputer.js.map +1 -1
  218. package/esm/vs/editor/common/diff/rangeMapping.js +11 -1
  219. package/esm/vs/editor/common/diff/rangeMapping.js.map +1 -1
  220. package/esm/vs/editor/common/diff/verifyLinesDiff.js +28 -0
  221. package/esm/vs/editor/common/diff/verifyLinesDiff.js.map +1 -0
  222. package/esm/vs/editor/common/editorContextKeys.js +53 -53
  223. package/esm/vs/editor/common/languages/languageConfiguration.js +8 -0
  224. package/esm/vs/editor/common/languages/languageConfiguration.js.map +1 -1
  225. package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
  226. package/esm/vs/editor/common/languages.js +56 -56
  227. package/esm/vs/editor/common/model/editStack.js +1 -1
  228. package/esm/vs/editor/common/services/editorWebWorker.js +27 -6
  229. package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
  230. package/esm/vs/editor/common/services/editorWorker.js.map +1 -1
  231. package/esm/vs/editor/common/services/languageService.js +6 -4
  232. package/esm/vs/editor/common/services/languageService.js.map +1 -1
  233. package/esm/vs/editor/common/services/markerDecorationsService.js +21 -2
  234. package/esm/vs/editor/common/services/markerDecorationsService.js.map +1 -1
  235. package/esm/vs/editor/common/standalone/standaloneEnums.js +100 -97
  236. package/esm/vs/editor/common/standalone/standaloneEnums.js.map +1 -1
  237. package/esm/vs/editor/common/standaloneStrings.js +11 -11
  238. package/esm/vs/editor/common/textModelEditSource.js +9 -0
  239. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  240. package/esm/vs/editor/common/viewLayout/viewLayout.js +16 -16
  241. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
  242. package/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +1 -1
  243. package/esm/vs/editor/common/viewModel/viewModelImpl.js +19 -19
  244. package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
  245. package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  246. package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +9 -9
  247. package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  248. package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  249. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +23 -20
  250. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
  251. package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  252. package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
  253. package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  254. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  255. package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  256. package/esm/vs/editor/contrib/codeAction/browser/codeActionModel.js +1 -1
  257. package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  258. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  259. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +25 -10
  260. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
  261. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
  262. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
  263. package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerContribution.js +1 -1
  264. package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +3 -3
  265. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  266. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerParticipant.js +1 -1
  267. package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
  268. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +17 -17
  269. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
  270. package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  271. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
  272. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +39 -39
  273. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
  274. package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  275. package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  276. package/esm/vs/editor/contrib/dropOrPasteInto/browser/pasteEditSession.js +19 -0
  277. package/esm/vs/editor/contrib/dropOrPasteInto/browser/pasteEditSession.js.map +1 -0
  278. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +26 -18
  279. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js.map +1 -1
  280. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  281. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js.map +1 -1
  282. package/esm/vs/editor/contrib/find/browser/findController.js +18 -18
  283. package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
  284. package/esm/vs/editor/contrib/find/browser/findModel.js +6 -6
  285. package/esm/vs/editor/contrib/find/browser/findWidget.js +40 -40
  286. package/esm/vs/editor/contrib/find/browser/findWidget.js.map +1 -1
  287. package/esm/vs/editor/contrib/folding/browser/folding.js +23 -23
  288. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  289. package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  290. package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
  291. package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  292. package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  293. package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  294. package/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +3 -3
  295. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +2 -2
  296. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +4 -4
  297. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js.map +1 -1
  298. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  299. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
  300. package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  301. package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  302. package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  303. package/esm/vs/editor/contrib/hover/browser/contentHoverController.js +9 -3
  304. package/esm/vs/editor/contrib/hover/browser/contentHoverController.js.map +1 -1
  305. package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js +2 -2
  306. package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js +2 -1
  307. package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js.map +1 -1
  308. package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  309. package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  310. package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
  311. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +10 -8
  312. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
  313. package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +6 -6
  314. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  315. package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  316. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +5 -5
  317. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +9 -9
  318. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js +3 -3
  319. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js.map +1 -1
  320. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +21 -21
  321. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -13
  322. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -7
  323. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  324. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +6 -5
  325. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js.map +1 -1
  326. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +1 -1
  327. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +2 -2
  328. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +7 -7
  329. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
  330. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -1
  331. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +3 -3
  332. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
  333. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  334. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  335. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -32
  336. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +5 -4
  337. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js.map +1 -1
  338. package/esm/vs/editor/contrib/links/browser/links.js +16 -15
  339. package/esm/vs/editor/contrib/links/browser/links.js.map +1 -1
  340. package/esm/vs/editor/contrib/longLinesHelper/browser/longLinesHelper.js +1 -1
  341. package/esm/vs/editor/contrib/message/browser/messageController.js +16 -12
  342. package/esm/vs/editor/contrib/message/browser/messageController.js.map +1 -1
  343. package/esm/vs/editor/contrib/middleScroll/browser/middleScrollController.js +1 -1
  344. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +91 -55
  345. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js.map +1 -1
  346. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  347. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js +3 -3
  348. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js.map +1 -1
  349. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +6 -4
  350. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
  351. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  352. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  353. package/esm/vs/editor/contrib/placeholderText/browser/placeholderTextContribution.js +1 -1
  354. package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +1 -1
  355. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +12 -12
  356. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  357. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +3 -3
  358. package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
  359. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  360. package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +6 -6
  361. package/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js +23 -13
  362. package/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js.map +1 -1
  363. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +5 -5
  364. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +5 -5
  365. package/esm/vs/editor/contrib/snippet/browser/snippetSession.js +2 -2
  366. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  367. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  368. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +10 -8
  369. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
  370. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +1 -1
  371. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +2 -2
  372. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +6 -6
  373. package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -9
  374. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +15 -15
  375. package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +2 -2
  376. package/esm/vs/editor/contrib/suggest/browser/suggestModel.js +11 -11
  377. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +27 -27
  378. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +8 -6
  379. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
  380. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +5 -5
  381. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +3 -3
  382. package/esm/vs/editor/contrib/suggest/browser/wordDistance.js +1 -1
  383. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  384. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  385. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  386. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  387. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +27 -27
  388. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +9 -9
  389. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  390. package/esm/vs/editor/contrib/wordHighlighter/browser/textualHighlightProvider.js +1 -1
  391. package/esm/vs/editor/contrib/wordHighlighter/browser/textualHighlightProvider.js.map +1 -1
  392. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +50 -14
  393. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js.map +1 -1
  394. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +6 -6
  395. package/esm/vs/editor/editor.api.d.ts +133 -98
  396. package/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js +1 -1
  397. package/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +5 -3
  398. package/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js.map +1 -1
  399. package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js +15 -1
  400. package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
  401. package/esm/vs/nls.js.map +1 -1
  402. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +72 -66
  403. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js.map +1 -1
  404. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  405. package/esm/vs/platform/actionWidget/browser/actionList.js +434 -136
  406. package/esm/vs/platform/actionWidget/browser/actionList.js.map +1 -1
  407. package/esm/vs/platform/actionWidget/browser/actionWidget.css +74 -4
  408. package/esm/vs/platform/actionWidget/browser/actionWidget.js +24 -26
  409. package/esm/vs/platform/actionWidget/browser/actionWidget.js.map +1 -1
  410. package/esm/vs/platform/actionWidget/browser/actionWidgetMotion.js +16 -0
  411. package/esm/vs/platform/actionWidget/browser/actionWidgetMotion.js.map +1 -0
  412. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +15 -17
  413. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
  414. package/esm/vs/platform/actions/browser/toolbar.js +25 -12
  415. package/esm/vs/platform/actions/browser/toolbar.js.map +1 -1
  416. package/esm/vs/platform/actions/common/actions.js +4 -2
  417. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  418. package/esm/vs/platform/actions/common/menuService.js +15 -8
  419. package/esm/vs/platform/actions/common/menuService.js.map +1 -1
  420. package/esm/vs/platform/configuration/common/configuration.js +3 -1
  421. package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
  422. package/esm/vs/platform/configuration/common/configurationModels.js +16 -11
  423. package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
  424. package/esm/vs/platform/configuration/common/configurationRegistry.js +29 -27
  425. package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
  426. package/esm/vs/platform/configuration/common/configurations.js +13 -1
  427. package/esm/vs/platform/configuration/common/configurations.js.map +1 -1
  428. package/esm/vs/platform/contextkey/browser/contextKeyService.js +2 -2
  429. package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +1 -1
  430. package/esm/vs/platform/contextkey/common/contextkey.js +28 -14
  431. package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
  432. package/esm/vs/platform/contextkey/common/contextkeys.js +10 -10
  433. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  434. package/esm/vs/platform/contextview/browser/contextMenuHandler.js +17 -4
  435. package/esm/vs/platform/contextview/browser/contextMenuHandler.js.map +1 -1
  436. package/esm/vs/platform/contextview/browser/contextMenuService.js +1 -1
  437. package/esm/vs/platform/contextview/browser/contextMenuService.js.map +1 -1
  438. package/esm/vs/platform/contextview/browser/contextView.js.map +1 -1
  439. package/esm/vs/platform/contextview/browser/contextViewService.js +7 -2
  440. package/esm/vs/platform/contextview/browser/contextViewService.js.map +1 -1
  441. package/esm/vs/platform/editor/common/editor.js +17 -0
  442. package/esm/vs/platform/editor/common/editor.js.map +1 -1
  443. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  444. package/esm/vs/platform/hover/browser/hoverService.js +6 -3
  445. package/esm/vs/platform/hover/browser/hoverService.js.map +1 -1
  446. package/esm/vs/platform/hover/browser/hoverWidget.js +38 -6
  447. package/esm/vs/platform/hover/browser/hoverWidget.js.map +1 -1
  448. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +32 -5
  449. package/esm/vs/platform/hover/browser/updatableHoverWidget.js.map +1 -1
  450. package/esm/vs/platform/instantiation/common/instantiationService.js +1 -1
  451. package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
  452. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +5 -5
  453. package/esm/vs/platform/keybinding/common/keybindingResolver.js +1 -1
  454. package/esm/vs/platform/keybinding/common/keybindingResolver.js.map +1 -1
  455. package/esm/vs/platform/list/browser/listService.js +27 -27
  456. package/esm/vs/platform/markers/common/markerService.js +11 -8
  457. package/esm/vs/platform/markers/common/markerService.js.map +1 -1
  458. package/esm/vs/platform/markers/common/markers.js +6 -6
  459. package/esm/vs/platform/markers/common/markers.js.map +1 -1
  460. package/esm/vs/platform/notification/common/notification.js.map +1 -1
  461. package/esm/vs/platform/notification/common/notificationMessage.js +37 -0
  462. package/esm/vs/platform/notification/common/notificationMessage.js.map +1 -0
  463. package/esm/vs/platform/opener/common/opener.js.map +1 -1
  464. package/esm/vs/platform/progress/common/progress.js.map +1 -1
  465. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
  466. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  467. package/esm/vs/platform/quickinput/browser/media/quickInput.css +33 -2
  468. package/esm/vs/platform/quickinput/browser/quickAccess.js +7 -4
  469. package/esm/vs/platform/quickinput/browser/quickAccess.js.map +1 -1
  470. package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
  471. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  472. package/esm/vs/platform/quickinput/browser/quickInputController.js +65 -15
  473. package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
  474. package/esm/vs/platform/quickinput/browser/quickInputList.js +96 -90
  475. package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
  476. package/esm/vs/platform/quickinput/browser/quickInputService.js +5 -7
  477. package/esm/vs/platform/quickinput/browser/quickInputService.js.map +1 -1
  478. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  479. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  480. package/esm/vs/platform/quickinput/browser/tree/quickTree.js +1 -1
  481. package/esm/vs/platform/quickinput/common/quickAccess.js.map +1 -1
  482. package/esm/vs/platform/quickinput/common/quickInput.js.map +1 -1
  483. package/esm/vs/platform/storage/common/storage.js.map +1 -1
  484. package/esm/vs/platform/theme/common/colorRegistry.js +1 -0
  485. package/esm/vs/platform/theme/common/colorRegistry.js.map +1 -1
  486. package/esm/vs/platform/theme/common/colorUtils.js +11 -3
  487. package/esm/vs/platform/theme/common/colorUtils.js.map +1 -1
  488. package/esm/vs/platform/theme/common/colors/baseColors.js +19 -19
  489. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -9
  490. package/esm/vs/platform/theme/common/colors/chartsColors.js.map +1 -1
  491. package/esm/vs/platform/theme/common/colors/confettiColors.js +14 -0
  492. package/esm/vs/platform/theme/common/colors/confettiColors.js.map +1 -0
  493. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  494. package/esm/vs/platform/theme/common/colors/inputColors.js +48 -48
  495. package/esm/vs/platform/theme/common/colors/inputColors.js.map +1 -1
  496. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  497. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  498. package/esm/vs/platform/theme/common/colors/minimapColors.js +13 -13
  499. package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
  500. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  501. package/esm/vs/platform/theme/common/colors/quickpickColors.js +10 -10
  502. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  503. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  504. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  505. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  506. package/monaco.d.ts +133 -98
  507. package/package.json +3 -3
  508. package/version.txt +1 -1
@@ -26,7 +26,7 @@ Registry.as(Extensions.Configuration).registerConfiguration({
26
26
  'editor.codeActionWidget.showHeaders': {
27
27
  type: 'boolean',
28
28
  scope: 6 /* ConfigurationScope.LANGUAGE_OVERRIDABLE */,
29
- description: nls.localize(911, "Enable/disable showing group headers in the Code Action menu."),
29
+ description: nls.localize(918, "Enable/disable showing group headers in the Code Action menu."),
30
30
  default: true,
31
31
  },
32
32
  }
@@ -37,7 +37,7 @@ Registry.as(Extensions.Configuration).registerConfiguration({
37
37
  'editor.codeActionWidget.includeNearbyQuickFixes': {
38
38
  type: 'boolean',
39
39
  scope: 6 /* ConfigurationScope.LANGUAGE_OVERRIDABLE */,
40
- description: nls.localize(912, "Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),
40
+ description: nls.localize(919, "Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),
41
41
  default: true,
42
42
  },
43
43
  }
@@ -48,7 +48,7 @@ Registry.as(Extensions.Configuration).registerConfiguration({
48
48
  'editor.codeActions.triggerOnFocusChange': {
49
49
  type: 'boolean',
50
50
  scope: 6 /* ConfigurationScope.LANGUAGE_OVERRIDABLE */,
51
- markdownDescription: nls.localize(913, 'Enable triggering {0} when {1} is set to {2}. Code Actions must be set to {3} to be triggered for window and focus changes.', '`#editor.codeActionsOnSave#`', '`#files.autoSave#`', '`afterDelay`', '`always`'),
51
+ markdownDescription: nls.localize(920, 'Enable triggering {0} when {1} is set to {2}. Code Actions must be set to {3} to be triggered for window and focus changes.', '`#editor.codeActionsOnSave#`', '`#files.autoSave#`', '`afterDelay`', '`always`'),
52
52
  default: false,
53
53
  },
54
54
  }
@@ -287,7 +287,7 @@ let CodeActionController = class CodeActionController extends Disposable {
287
287
  const diagnostic = diagnostics[0];
288
288
  if (diagnostic.startLineNumber && diagnostic.startColumn) {
289
289
  const selectionText = this._editor.getModel()?.getWordAtPosition({ lineNumber: diagnostic.startLineNumber, column: diagnostic.startColumn })?.word;
290
- aria.status(localize(914, "Context: {0} at line {1} and column {2}.", selectionText, diagnostic.startLineNumber, diagnostic.startColumn));
290
+ aria.status(localize(921, "Context: {0} at line {1} and column {2}.", selectionText, diagnostic.startLineNumber, diagnostic.startColumn));
291
291
  }
292
292
  }
293
293
  }
@@ -330,7 +330,7 @@ let CodeActionController = class CodeActionController extends Disposable {
330
330
  if (options.includeDisabledActions && actions.validActions.length > 0 && actions.allActions.length !== actions.validActions.length) {
331
331
  resultActions.push(this._showDisabled ? {
332
332
  id: 'hideMoreActions',
333
- label: localize(915, 'Hide Disabled'),
333
+ label: localize(922, 'Hide Disabled'),
334
334
  enabled: true,
335
335
  tooltip: '',
336
336
  class: undefined,
@@ -340,7 +340,7 @@ let CodeActionController = class CodeActionController extends Disposable {
340
340
  }
341
341
  } : {
342
342
  id: 'showMoreActions',
343
- label: localize(916, 'Show Disabled'),
343
+ label: localize(923, 'Show Disabled'),
344
344
  enabled: true,
345
345
  tooltip: '',
346
346
  class: undefined,
@@ -8,15 +8,15 @@ import { CodeActionKind } from '../common/types.js';
8
8
  import '../../symbolIcons/browser/symbolIcons.js'; // The codicon symbol colors are defined here and must be loaded to get colors
9
9
  import { localize } from '../../../../nls.js';
10
10
  import { HierarchicalKind } from '../../../../base/common/hierarchicalKind.js';
11
- const uncategorizedCodeActionGroup = Object.freeze({ kind: HierarchicalKind.Empty, title: localize(917, 'More Actions...') });
11
+ const uncategorizedCodeActionGroup = Object.freeze({ kind: HierarchicalKind.Empty, title: localize(924, 'More Actions...') });
12
12
  const codeActionGroups = Object.freeze([
13
- { kind: CodeActionKind.QuickFix, title: localize(918, 'Quick Fix') },
14
- { kind: CodeActionKind.RefactorExtract, title: localize(919, 'Extract'), icon: Codicon.wrench },
15
- { kind: CodeActionKind.RefactorInline, title: localize(920, 'Inline'), icon: Codicon.wrench },
16
- { kind: CodeActionKind.RefactorRewrite, title: localize(921, 'Rewrite'), icon: Codicon.wrench },
17
- { kind: CodeActionKind.RefactorMove, title: localize(922, 'Move'), icon: Codicon.wrench },
18
- { kind: CodeActionKind.SurroundWith, title: localize(923, 'Surround With'), icon: Codicon.surroundWith },
19
- { kind: CodeActionKind.Source, title: localize(924, 'Source Action'), icon: Codicon.symbolFile },
13
+ { kind: CodeActionKind.QuickFix, title: localize(925, 'Quick Fix') },
14
+ { kind: CodeActionKind.RefactorExtract, title: localize(926, 'Extract'), icon: Codicon.wrench },
15
+ { kind: CodeActionKind.RefactorInline, title: localize(927, 'Inline'), icon: Codicon.wrench },
16
+ { kind: CodeActionKind.RefactorRewrite, title: localize(928, 'Rewrite'), icon: Codicon.wrench },
17
+ { kind: CodeActionKind.RefactorMove, title: localize(929, 'Move'), icon: Codicon.wrench },
18
+ { kind: CodeActionKind.SurroundWith, title: localize(930, 'Surround With'), icon: Codicon.surroundWith },
19
+ { kind: CodeActionKind.Source, title: localize(931, 'Source Action'), icon: Codicon.symbolFile },
20
20
  uncategorizedCodeActionGroup,
21
21
  ]);
22
22
  export function toMenuItems(inputCodeActions, showHeaders, keybindingResolver) {
@@ -172,7 +172,7 @@ export class CodeActionModel extends Disposable {
172
172
  const model = this._editor.getModel();
173
173
  if (model
174
174
  && this._registry.has(model)
175
- && !this._editor.getOption(104 /* EditorOption.readOnly */)) {
175
+ && !this._editor.getOption(106 /* EditorOption.readOnly */)) {
176
176
  const supportedActions = this._registry.all(model).flatMap(provider => provider.providedCodeActionKinds ?? []);
177
177
  this._supportedCodeActions.set(supportedActions.join(' '));
178
178
  const oracle = new CodeActionOracle(this._editor, this._markerService, trigger => {
@@ -29,11 +29,11 @@ import * as nls from '../../../../nls.js';
29
29
  import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';
30
30
  import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
31
31
  import { Range } from '../../../common/core/range.js';
32
- const GUTTER_LIGHTBULB_ICON = registerIcon('gutter-lightbulb', Codicon.lightBulb, nls.localize(925, 'Icon which spawns code actions menu from the gutter when there is no space in the editor.'));
33
- const GUTTER_LIGHTBULB_AUTO_FIX_ICON = registerIcon('gutter-lightbulb-auto-fix', Codicon.lightbulbAutofix, nls.localize(926, 'Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.'));
34
- const GUTTER_LIGHTBULB_AIFIX_ICON = registerIcon('gutter-lightbulb-sparkle', Codicon.lightbulbSparkle, nls.localize(927, 'Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.'));
35
- const GUTTER_LIGHTBULB_AIFIX_AUTO_FIX_ICON = registerIcon('gutter-lightbulb-aifix-auto-fix', Codicon.lightbulbSparkleAutofix, nls.localize(928, 'Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.'));
36
- const GUTTER_SPARKLE_FILLED_ICON = registerIcon('gutter-lightbulb-sparkle-filled', Codicon.sparkleFilled, nls.localize(929, 'Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.'));
32
+ const GUTTER_LIGHTBULB_ICON = registerIcon('gutter-lightbulb', Codicon.lightBulb, nls.localize(932, 'Icon which spawns code actions menu from the gutter when there is no space in the editor.'));
33
+ const GUTTER_LIGHTBULB_AUTO_FIX_ICON = registerIcon('gutter-lightbulb-auto-fix', Codicon.lightbulbAutofix, nls.localize(933, 'Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.'));
34
+ const GUTTER_LIGHTBULB_AIFIX_ICON = registerIcon('gutter-lightbulb-sparkle', Codicon.lightbulbSparkle, nls.localize(934, 'Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.'));
35
+ const GUTTER_LIGHTBULB_AIFIX_AUTO_FIX_ICON = registerIcon('gutter-lightbulb-aifix-auto-fix', Codicon.lightbulbSparkleAutofix, nls.localize(935, 'Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.'));
36
+ const GUTTER_SPARKLE_FILLED_ICON = registerIcon('gutter-lightbulb-sparkle-filled', Codicon.sparkleFilled, nls.localize(936, 'Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.'));
37
37
  var LightBulbState;
38
38
  (function (LightBulbState) {
39
39
  LightBulbState.Hidden = { type: 0 /* Type.Hidden */ };
@@ -76,16 +76,16 @@ export function computeLightBulbInfo(actions, trigger, preferredKbLabel, quickFi
76
76
  }
77
77
  let title;
78
78
  if (autoRun) {
79
- title = nls.localize(930, "Run: {0}", actions.validActions[0].action.title);
79
+ title = nls.localize(937, "Run: {0}", actions.validActions[0].action.title);
80
80
  }
81
81
  else if (actions.hasAutoFix && preferredKbLabel) {
82
- title = nls.localize(931, "Show Code Actions. Preferred Quick Fix Available ({0})", preferredKbLabel);
82
+ title = nls.localize(938, "Show Code Actions. Preferred Quick Fix Available ({0})", preferredKbLabel);
83
83
  }
84
84
  else if (!actions.hasAutoFix && quickFixKbLabel) {
85
- title = nls.localize(932, "Show Code Actions ({0})", quickFixKbLabel);
85
+ title = nls.localize(939, "Show Code Actions ({0})", quickFixKbLabel);
86
86
  }
87
87
  else {
88
- title = nls.localize(933, "Show Code Actions");
88
+ title = nls.localize(940, "Show Code Actions");
89
89
  }
90
90
  return { actions, trigger, icon, autoRun, title, isGutter: forGutter };
91
91
  }
@@ -405,7 +405,7 @@ registerEditorAction(class ShowLensesInCurrentLine extends EditorAction {
405
405
  super({
406
406
  id: 'codelens.showLensesInCurrentLine',
407
407
  precondition: EditorContextKeys.hasCodeLensProvider,
408
- label: localize2(935, "Show CodeLens Commands for Current Line"),
408
+ label: localize2(942, "Show CodeLens Commands for Current Line"),
409
409
  });
410
410
  }
411
411
  async run(accessor, editor) {
@@ -440,7 +440,7 @@ registerEditorAction(class ShowLensesInCurrentLine extends EditorAction {
440
440
  }
441
441
  const item = await quickInputService.pick(items, {
442
442
  canPickMany: false,
443
- placeHolder: localize(934, "Select a command")
443
+ placeHolder: localize(941, "Select a command")
444
444
  });
445
445
  if (!item) {
446
446
  // Nothing picked
@@ -43,15 +43,9 @@ let ColorDetector = class ColorDetector extends Disposable {
43
43
  this._colorDatas = new Map();
44
44
  this._decoratorLimitReporter = this._register(new DecoratorLimitReporter());
45
45
  this._colorDecorationClassRefs = this._register(new DisposableStore());
46
+ this._hasDecoratorSizeProperties = false;
46
47
  this._colorDecoratorIds = this._editor.createDecorationsCollection();
47
48
  this._ruleFactory = this._register(new DynamicCssRules(this._editor));
48
- const editorDomNode = this._editor.getContainerDomNode();
49
- editorDomNode.style.setProperty('--vscode-colorPicker-colorDecoratorWidth', `${ColorDetector_1.colorDecoratorInnerWidthInEm}em`);
50
- editorDomNode.style.setProperty('--vscode-colorPicker-colorDecoratorMargin', `${ColorDetector_1.colorDecoratorMarginInEm}em`);
51
- this._register(toDisposable(() => {
52
- editorDomNode.style.removeProperty('--vscode-colorPicker-colorDecoratorWidth');
53
- editorDomNode.style.removeProperty('--vscode-colorPicker-colorDecoratorMargin');
54
- }));
55
49
  this._debounceInformation = languageFeatureDebounceService.for(_languageFeaturesService.colorProvider, 'Document Colors', { min: ColorDetector_1.RECOMPUTE_TIME });
56
50
  this._register(_editor.onDidChangeModel(() => {
57
51
  this._isColorDecoratorsEnabled = this.isEnabled();
@@ -62,9 +56,9 @@ let ColorDetector = class ColorDetector extends Disposable {
62
56
  this._register(_editor.onDidChangeConfiguration((e) => {
63
57
  const prevIsEnabled = this._isColorDecoratorsEnabled;
64
58
  this._isColorDecoratorsEnabled = this.isEnabled();
65
- this._defaultColorDecoratorsEnablement = this._editor.getOption(168 /* EditorOption.defaultColorDecorators */);
59
+ this._defaultColorDecoratorsEnablement = this._editor.getOption(171 /* EditorOption.defaultColorDecorators */);
66
60
  const updatedColorDecoratorsSetting = prevIsEnabled !== this._isColorDecoratorsEnabled || e.hasChanged(27 /* EditorOption.colorDecoratorsLimit */);
67
- const updatedDefaultColorDecoratorsSetting = e.hasChanged(168 /* EditorOption.defaultColorDecorators */);
61
+ const updatedDefaultColorDecoratorsSetting = e.hasChanged(171 /* EditorOption.defaultColorDecorators */);
68
62
  if (updatedColorDecoratorsSetting || updatedDefaultColorDecoratorsSetting) {
69
63
  if (this._isColorDecoratorsEnabled) {
70
64
  this.updateColors();
@@ -77,7 +71,7 @@ let ColorDetector = class ColorDetector extends Disposable {
77
71
  this._timeoutTimer = null;
78
72
  this._computePromise = null;
79
73
  this._isColorDecoratorsEnabled = this.isEnabled();
80
- this._defaultColorDecoratorsEnablement = this._editor.getOption(168 /* EditorOption.defaultColorDecorators */);
74
+ this._defaultColorDecoratorsEnablement = this._editor.getOption(171 /* EditorOption.defaultColorDecorators */);
81
75
  this.updateColors();
82
76
  }
83
77
  isEnabled() {
@@ -207,8 +201,29 @@ let ColorDetector = class ColorDetector extends Disposable {
207
201
  }
208
202
  const limited = limit < colorData.length ? limit : false;
209
203
  this._decoratorLimitReporter.update(colorData.length, limited);
204
+ if (decorations.length > 0) {
205
+ this.ensureDecoratorSizeProperties();
206
+ }
210
207
  this._colorDecoratorIds.set(decorations);
211
208
  }
209
+ /**
210
+ * Custom properties are inherited, so setting them on the editor container restyles every
211
+ * rendered line. This contribution is created after the first render, so only pay that cost
212
+ * once the editor actually shows color decorators.
213
+ */
214
+ ensureDecoratorSizeProperties() {
215
+ if (this._hasDecoratorSizeProperties) {
216
+ return;
217
+ }
218
+ this._hasDecoratorSizeProperties = true;
219
+ const editorDomNode = this._editor.getContainerDomNode();
220
+ editorDomNode.style.setProperty('--vscode-colorPicker-colorDecoratorWidth', `${ColorDetector_1.colorDecoratorInnerWidthInEm}em`);
221
+ editorDomNode.style.setProperty('--vscode-colorPicker-colorDecoratorMargin', `${ColorDetector_1.colorDecoratorMarginInEm}em`);
222
+ this._register(toDisposable(() => {
223
+ editorDomNode.style.removeProperty('--vscode-colorPicker-colorDecoratorWidth');
224
+ editorDomNode.style.removeProperty('--vscode-colorPicker-colorDecoratorMargin');
225
+ }));
226
+ }
212
227
  removeAllDecorations() {
213
228
  this._editor.removeDecorations(this._decorationsIds);
214
229
  this._decorationsIds = [];
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/colorPicker/browser/colorDetector.ts","vs/editor/contrib/colorPicker/browser/colorDetector.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,EAAqB,uBAAuB,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC5G,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AACxD,OAAO,EAAE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C;QAC1B,CAAC;IACF,CAAC;CACD","file":"colorDetector.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 { CancelablePromise, createCancelablePromise, TimeoutTimer } from '../../../../base/common/async.js';\nimport { RGBA } from '../../../../base/common/color.js';\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { StopWatch } from '../../../../base/common/stopwatch.js';\nimport { noBreakWhitespace } from '../../../../base/common/strings.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { DynamicCssRules } from '../../../browser/editorDom.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { IEditorContribution, IEditorDecorationsCollection } from '../../../common/editorCommon.js';\nimport { IModelDecoration, IModelDeltaDecoration } from '../../../common/model.js';\nimport { ModelDecorationOptions } from '../../../common/model/textModel.js';\nimport { IFeatureDebounceInformation, ILanguageFeatureDebounceService } from '../../../common/services/languageFeatureDebounce.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { getColors, IColorData } from './color.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\n\nexport const ColorDecorationInjectedTextMarker = Object.create({});\n\n\nexport class ColorDetector extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID: string = 'editor.contrib.colorDetector';\n\n\tstatic readonly RECOMPUTE_TIME = 1000; // ms\n\n\tprivate readonly _localToDispose = this._register(new DisposableStore());\n\tprivate _computePromise: CancelablePromise<IColorData[]> | null;\n\tprivate _timeoutTimer: TimeoutTimer | null;\n\tprivate _debounceInformation: IFeatureDebounceInformation;\n\n\tprivate _decorationsIds: string[] = [];\n\tprivate _colorDatas = new Map<string, IColorData>();\n\n\tprivate readonly _colorDecoratorIds: IEditorDecorationsCollection;\n\n\tprivate _isColorDecoratorsEnabled: boolean;\n\tprivate _defaultColorDecoratorsEnablement: 'auto' | 'always' | 'never';\n\n\tprivate readonly _ruleFactory: DynamicCssRules;\n\n\tprivate readonly _decoratorLimitReporter = this._register(new DecoratorLimitReporter());\n\n\tprivate static readonly colorDecoratorInnerWidthInEm = 0.8;\n\tprivate static readonly colorDecoratorMarginInEm = 0.2;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t\t@ILanguageFeatureDebounceService languageFeatureDebounceService: ILanguageFeatureDebounceService,\n\t) {\n\t\tsuper();\n\t\tthis._colorDecoratorIds = this._editor.createDecorationsCollection();\n\t\tthis._ruleFactory = this._register(new DynamicCssRules(this._editor));\n\t\tconst editorDomNode = this._editor.getContainerDomNode();\n\t\teditorDomNode.style.setProperty('--vscode-colorPicker-colorDecoratorWidth', `${ColorDetector.colorDecoratorInnerWidthInEm}em`);\n\t\teditorDomNode.style.setProperty('--vscode-colorPicker-colorDecoratorMargin', `${ColorDetector.colorDecoratorMarginInEm}em`);\n\t\tthis._register(toDisposable(() => {\n\t\t\teditorDomNode.style.removeProperty('--vscode-colorPicker-colorDecoratorWidth');\n\t\t\teditorDomNode.style.removeProperty('--vscode-colorPicker-colorDecoratorMargin');\n\t\t}));\n\t\tthis._debounceInformation = languageFeatureDebounceService.for(_languageFeaturesService.colorProvider, 'Document Colors', { min: ColorDetector.RECOMPUTE_TIME });\n\t\tthis._register(_editor.onDidChangeModel(() => {\n\t\t\tthis._isColorDecoratorsEnabled = this.isEnabled();\n\t\t\tthis.updateColors();\n\t\t}));\n\t\tthis._register(_editor.onDidChangeModelLanguage(() => this.updateColors()));\n\t\tthis._register(_languageFeaturesService.colorProvider.onDidChange(() => this.updateColors()));\n\t\tthis._register(_editor.onDidChangeConfiguration((e) => {\n\t\t\tconst prevIsEnabled = this._isColorDecoratorsEnabled;\n\t\t\tthis._isColorDecoratorsEnabled = this.isEnabled();\n\t\t\tthis._defaultColorDecoratorsEnablement = this._editor.getOption(EditorOption.defaultColorDecorators);\n\t\t\tconst updatedColorDecoratorsSetting = prevIsEnabled !== this._isColorDecoratorsEnabled || e.hasChanged(EditorOption.colorDecoratorsLimit);\n\t\t\tconst updatedDefaultColorDecoratorsSetting = e.hasChanged(EditorOption.defaultColorDecorators);\n\t\t\tif (updatedColorDecoratorsSetting || updatedDefaultColorDecoratorsSetting) {\n\t\t\t\tif (this._isColorDecoratorsEnabled) {\n\t\t\t\t\tthis.updateColors();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.removeAllDecorations();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\tthis._timeoutTimer = null;\n\t\tthis._computePromise = null;\n\t\tthis._isColorDecoratorsEnabled = this.isEnabled();\n\t\tthis._defaultColorDecoratorsEnablement = this._editor.getOption(EditorOption.defaultColorDecorators);\n\t\tthis.updateColors();\n\t}\n\n\tisEnabled(): boolean {\n\t\tconst model = this._editor.getModel();\n\t\tif (!model) {\n\t\t\treturn false;\n\t\t}\n\t\tconst languageId = model.getLanguageId();\n\t\t// handle deprecated settings. [languageId].colorDecorators.enable\n\t\tconst deprecatedConfig = this._configurationService.getValue(languageId);\n\t\tif (deprecatedConfig && typeof deprecatedConfig === 'object') {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\tconst colorDecorators = (deprecatedConfig as any)['colorDecorators']; // deprecatedConfig.valueOf('.colorDecorators.enable');\n\t\t\tif (colorDecorators && colorDecorators['enable'] !== undefined && !colorDecorators['enable']) {\n\t\t\t\treturn colorDecorators['enable'];\n\t\t\t}\n\t\t}\n\n\t\treturn this._editor.getOption(EditorOption.colorDecorators);\n\t}\n\n\tstatic get(editor: ICodeEditor): ColorDetector | null {\n\t\treturn editor.getContribution<ColorDetector>(this.ID);\n\t}\n\n\toverride dispose(): void {\n\t\tthis.stop();\n\t\tthis.removeAllDecorations();\n\t\tsuper.dispose();\n\t}\n\n\tprivate updateColors(): void {\n\t\tthis.stop();\n\n\t\tif (!this._isColorDecoratorsEnabled) {\n\t\t\tthis.removeAllDecorations();\n\t\t\treturn;\n\t\t}\n\t\tconst model = this._editor.getModel();\n\n\t\tif (!model || !this._languageFeaturesService.colorProvider.has(model)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._localToDispose.add(this._editor.onDidChangeModelContent(() => {\n\t\t\tif (!this._timeoutTimer) {\n\t\t\t\tthis._timeoutTimer = new TimeoutTimer();\n\t\t\t\tthis._timeoutTimer.cancelAndSet(() => {\n\t\t\t\t\tthis._timeoutTimer = null;\n\t\t\t\t\tthis.beginCompute();\n\t\t\t\t}, this._debounceInformation.get(model));\n\t\t\t}\n\t\t}));\n\t\tthis.beginCompute();\n\t}\n\n\tprivate async beginCompute(): Promise<void> {\n\t\tthis._computePromise = createCancelablePromise(async token => {\n\t\t\tconst model = this._editor.getModel();\n\t\t\tif (!model) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tconst sw = new StopWatch(false);\n\t\t\tconst colors = await getColors(this._languageFeaturesService.colorProvider, model, token, this._defaultColorDecoratorsEnablement);\n\t\t\tthis._debounceInformation.update(model, sw.elapsed());\n\t\t\treturn colors;\n\t\t});\n\t\ttry {\n\t\t\tconst colors = await this._computePromise;\n\t\t\tthis.updateDecorations(colors);\n\t\t\tthis.updateColorDecorators(colors);\n\t\t\tthis._computePromise = null;\n\t\t} catch (e) {\n\t\t\tonUnexpectedError(e);\n\t\t}\n\t}\n\n\tprivate stop(): void {\n\t\tif (this._timeoutTimer) {\n\t\t\tthis._timeoutTimer.cancel();\n\t\t\tthis._timeoutTimer = null;\n\t\t}\n\t\tif (this._computePromise) {\n\t\t\tthis._computePromise.cancel();\n\t\t\tthis._computePromise = null;\n\t\t}\n\t\tthis._localToDispose.clear();\n\t}\n\n\tprivate updateDecorations(colorDatas: IColorData[]): void {\n\t\tconst decorations = colorDatas.map(c => ({\n\t\t\trange: {\n\t\t\t\tstartLineNumber: c.colorInfo.range.startLineNumber,\n\t\t\t\tstartColumn: c.colorInfo.range.startColumn,\n\t\t\t\tendLineNumber: c.colorInfo.range.endLineNumber,\n\t\t\t\tendColumn: c.colorInfo.range.endColumn\n\t\t\t},\n\t\t\toptions: ModelDecorationOptions.EMPTY\n\t\t}));\n\n\t\tthis._editor.changeDecorations((changeAccessor) => {\n\t\t\tthis._decorationsIds = changeAccessor.deltaDecorations(this._decorationsIds, decorations);\n\n\t\t\tthis._colorDatas = new Map<string, IColorData>();\n\t\t\tthis._decorationsIds.forEach((id, i) => this._colorDatas.set(id, colorDatas[i]));\n\t\t});\n\t}\n\n\tprivate readonly _colorDecorationClassRefs = this._register(new DisposableStore());\n\n\tprivate updateColorDecorators(colorData: IColorData[]): void {\n\t\tthis._colorDecorationClassRefs.clear();\n\n\t\tconst decorations: IModelDeltaDecoration[] = [];\n\t\tconst widthInEm = ColorDetector.colorDecoratorInnerWidthInEm + 2 * ColorDetector.colorDecoratorMarginInEm;\n\n\t\tconst limit = this._editor.getOption(EditorOption.colorDecoratorsLimit);\n\n\t\tfor (let i = 0; i < colorData.length && decorations.length < limit; i++) {\n\t\t\tconst { red, green, blue, alpha } = colorData[i].colorInfo.color;\n\t\t\tconst rgba = new RGBA(Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255), alpha);\n\t\t\tconst color = `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})`;\n\n\t\t\tconst ref = this._colorDecorationClassRefs.add(\n\t\t\t\tthis._ruleFactory.createClassNameRef({\n\t\t\t\t\tbackgroundColor: color\n\t\t\t\t})\n\t\t\t);\n\n\t\t\tdecorations.push({\n\t\t\t\trange: {\n\t\t\t\t\tstartLineNumber: colorData[i].colorInfo.range.startLineNumber,\n\t\t\t\t\tstartColumn: colorData[i].colorInfo.range.startColumn,\n\t\t\t\t\tendLineNumber: colorData[i].colorInfo.range.endLineNumber,\n\t\t\t\t\tendColumn: colorData[i].colorInfo.range.endColumn\n\t\t\t\t},\n\t\t\t\toptions: {\n\t\t\t\t\tdescription: 'colorDetector',\n\t\t\t\t\tbefore: {\n\t\t\t\t\t\tcontent: noBreakWhitespace,\n\t\t\t\t\t\tinlineClassName: `${ref.className} colorpicker-color-decoration`,\n\t\t\t\t\t\tinlineClassNameAffectsLetterSpacing: true,\n\t\t\t\t\t\tattachedData: ColorDecorationInjectedTextMarker,\n\t\t\t\t\t\twidthInEm,\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tconst limited = limit < colorData.length ? limit : false;\n\t\tthis._decoratorLimitReporter.update(colorData.length, limited);\n\n\t\tthis._colorDecoratorIds.set(decorations);\n\t}\n\n\tprivate removeAllDecorations(): void {\n\t\tthis._editor.removeDecorations(this._decorationsIds);\n\t\tthis._decorationsIds = [];\n\t\tthis._colorDecoratorIds.clear();\n\t\tthis._colorDecorationClassRefs.clear();\n\t}\n\n\tgetColorData(position: Position): IColorData | null {\n\t\tconst model = this._editor.getModel();\n\t\tif (!model) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst decorations = model\n\t\t\t.getDecorationsInRange(Range.fromPositions(position, position))\n\t\t\t.filter(d => this._colorDatas.has(d.id));\n\n\t\tif (decorations.length === 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this._colorDatas.get(decorations[0].id)!;\n\t}\n\n\tisColorDecoration(decoration: IModelDecoration): boolean {\n\t\treturn this._colorDecoratorIds.has(decoration);\n\t}\n}\n\nexport class DecoratorLimitReporter extends Disposable {\n\tprivate _onDidChange = this._register(new Emitter<void>());\n\n\tprivate _computed: number = 0;\n\tprivate _limited: number | false = false;\n\tpublic update(computed: number, limited: number | false) {\n\t\tif (computed !== this._computed || limited !== this._limited) {\n\t\t\tthis._computed = computed;\n\t\t\tthis._limited = limited;\n\t\t\tthis._onDidChange.fire();\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 { CancelablePromise, createCancelablePromise, TimeoutTimer } from '../../../../base/common/async.js';\nimport { RGBA } from '../../../../base/common/color.js';\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { StopWatch } from '../../../../base/common/stopwatch.js';\nimport { noBreakWhitespace } from '../../../../base/common/strings.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { DynamicCssRules } from '../../../browser/editorDom.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { IEditorContribution, IEditorDecorationsCollection } from '../../../common/editorCommon.js';\nimport { IModelDecoration, IModelDeltaDecoration } from '../../../common/model.js';\nimport { ModelDecorationOptions } from '../../../common/model/textModel.js';\nimport { IFeatureDebounceInformation, ILanguageFeatureDebounceService } from '../../../common/services/languageFeatureDebounce.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { getColors, IColorData } from './color.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\n\nexport const ColorDecorationInjectedTextMarker = Object.create({});\n\n\nexport class ColorDetector extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID: string = 'editor.contrib.colorDetector';\n\n\tstatic readonly RECOMPUTE_TIME = 1000; // ms\n\n\tprivate readonly _localToDispose = this._register(new DisposableStore());\n\tprivate _computePromise: CancelablePromise<IColorData[]> | null;\n\tprivate _timeoutTimer: TimeoutTimer | null;\n\tprivate _debounceInformation: IFeatureDebounceInformation;\n\n\tprivate _decorationsIds: string[] = [];\n\tprivate _colorDatas = new Map<string, IColorData>();\n\n\tprivate readonly _colorDecoratorIds: IEditorDecorationsCollection;\n\n\tprivate _isColorDecoratorsEnabled: boolean;\n\tprivate _defaultColorDecoratorsEnablement: 'auto' | 'always' | 'never';\n\n\tprivate readonly _ruleFactory: DynamicCssRules;\n\n\tprivate readonly _decoratorLimitReporter = this._register(new DecoratorLimitReporter());\n\n\tprivate static readonly colorDecoratorInnerWidthInEm = 0.8;\n\tprivate static readonly colorDecoratorMarginInEm = 0.2;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t\t@ILanguageFeatureDebounceService languageFeatureDebounceService: ILanguageFeatureDebounceService,\n\t) {\n\t\tsuper();\n\t\tthis._colorDecoratorIds = this._editor.createDecorationsCollection();\n\t\tthis._ruleFactory = this._register(new DynamicCssRules(this._editor));\n\t\tconst editorDomNode = this._editor.getContainerDomNode();\n\t\teditorDomNode.style.setProperty('--vscode-colorPicker-colorDecoratorWidth', `${ColorDetector.colorDecoratorInnerWidthInEm}em`);\n\t\teditorDomNode.style.setProperty('--vscode-colorPicker-colorDecoratorMargin', `${ColorDetector.colorDecoratorMarginInEm}em`);\n\t\tthis._register(toDisposable(() => {\n\t\t\teditorDomNode.style.removeProperty('--vscode-colorPicker-colorDecoratorWidth');\n\t\t\teditorDomNode.style.removeProperty('--vscode-colorPicker-colorDecoratorMargin');\n\t\t}));\n\t\tthis._debounceInformation = languageFeatureDebounceService.for(_languageFeaturesService.colorProvider, 'Document Colors', { min: ColorDetector.RECOMPUTE_TIME });\n\t\tthis._register(_editor.onDidChangeModel(() => {\n\t\t\tthis._isColorDecoratorsEnabled = this.isEnabled();\n\t\t\tthis.updateColors();\n\t\t}));\n\t\tthis._register(_editor.onDidChangeModelLanguage(() => this.updateColors()));\n\t\tthis._register(_languageFeaturesService.colorProvider.onDidChange(() => this.updateColors()));\n\t\tthis._register(_editor.onDidChangeConfiguration((e) => {\n\t\t\tconst prevIsEnabled = this._isColorDecoratorsEnabled;\n\t\t\tthis._isColorDecoratorsEnabled = this.isEnabled();\n\t\t\tthis._defaultColorDecoratorsEnablement = this._editor.getOption(EditorOption.defaultColorDecorators);\n\t\t\tconst updatedColorDecoratorsSetting = prevIsEnabled !== this._isColorDecoratorsEnabled || e.hasChanged(EditorOption.colorDecoratorsLimit);\n\t\t\tconst updatedDefaultColorDecoratorsSetting = e.hasChanged(EditorOption.defaultColorDecorators);\n\t\t\tif (updatedColorDecoratorsSetting || updatedDefaultColorDecoratorsSetting) {\n\t\t\t\tif (this._isColorDecoratorsEnabled) {\n\t\t\t\t\tthis.updateColors();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.removeAllDecorations();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\tthis._timeoutTimer = null;\n\t\tthis._computePromise = null;\n\t\tthis._isColorDecoratorsEnabled = this.isEnabled();\n\t\tthis._defaultColorDecoratorsEnablement = this._editor.getOption(EditorOption.defaultColorDecorators);\n\t\tthis.updateColors();\n\t}\n\n\tisEnabled(): boolean {\n\t\tconst model = this._editor.getModel();\n\t\tif (!model) {\n\t\t\treturn false;\n\t\t}\n\t\tconst languageId = model.getLanguageId();\n\t\t// handle deprecated settings. [languageId].colorDecorators.enable\n\t\tconst deprecatedConfig = this._configurationService.getValue(languageId);\n\t\tif (deprecatedConfig && typeof deprecatedConfig === 'object') {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\tconst colorDecorators = (deprecatedConfig as any)['colorDecorators']; // deprecatedConfig.valueOf('.colorDecorators.enable');\n\t\t\tif (colorDecorators && colorDecorators['enable'] !== undefined && !colorDecorators['enable']) {\n\t\t\t\treturn colorDecorators['enable'];\n\t\t\t}\n\t\t}\n\n\t\treturn this._editor.getOption(EditorOption.colorDecorators);\n\t}\n\n\tstatic get(editor: ICodeEditor): ColorDetector | null {\n\t\treturn editor.getContribution<ColorDetector>(this.ID);\n\t}\n\n\toverride dispose(): void {\n\t\tthis.stop();\n\t\tthis.removeAllDecorations();\n\t\tsuper.dispose();\n\t}\n\n\tprivate updateColors(): void {\n\t\tthis.stop();\n\n\t\tif (!this._isColorDecoratorsEnabled) {\n\t\t\tthis.removeAllDecorations();\n\t\t\treturn;\n\t\t}\n\t\tconst model = this._editor.getModel();\n\n\t\tif (!model || !this._languageFeaturesService.colorProvider.has(model)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._localToDispose.add(this._editor.onDidChangeModelContent(() => {\n\t\t\tif (!this._timeoutTimer) {\n\t\t\t\tthis._timeoutTimer = new TimeoutTimer();\n\t\t\t\tthis._timeoutTimer.cancelAndSet(() => {\n\t\t\t\t\tthis._timeoutTimer = null;\n\t\t\t\t\tthis.beginCompute();\n\t\t\t\t}, this._debounceInformation.get(model));\n\t\t\t}\n\t\t}));\n\t\tthis.beginCompute();\n\t}\n\n\tprivate async beginCompute(): Promise<void> {\n\t\tthis._computePromise = createCancelablePromise(async token => {\n\t\t\tconst model = this._editor.getModel();\n\t\t\tif (!model) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tconst sw = new StopWatch(false);\n\t\t\tconst colors = await getColors(this._languageFeaturesService.colorProvider, model, token, this._defaultColorDecoratorsEnablement);\n\t\t\tthis._debounceInformation.update(model, sw.elapsed());\n\t\t\treturn colors;\n\t\t});\n\t\ttry {\n\t\t\tconst colors = await this._computePromise;\n\t\t\tthis.updateDecorations(colors);\n\t\t\tthis.updateColorDecorators(colors);\n\t\t\tthis._computePromise = null;\n\t\t} catch (e) {\n\t\t\tonUnexpectedError(e);\n\t\t}\n\t}\n\n\tprivate stop(): void {\n\t\tif (this._timeoutTimer) {\n\t\t\tthis._timeoutTimer.cancel();\n\t\t\tthis._timeoutTimer = null;\n\t\t}\n\t\tif (this._computePromise) {\n\t\t\tthis._computePromise.cancel();\n\t\t\tthis._computePromise = null;\n\t\t}\n\t\tthis._localToDispose.clear();\n\t}\n\n\tprivate updateDecorations(colorDatas: IColorData[]): void {\n\t\tconst decorations = colorDatas.map(c => ({\n\t\t\trange: {\n\t\t\t\tstartLineNumber: c.colorInfo.range.startLineNumber,\n\t\t\t\tstartColumn: c.colorInfo.range.startColumn,\n\t\t\t\tendLineNumber: c.colorInfo.range.endLineNumber,\n\t\t\t\tendColumn: c.colorInfo.range.endColumn\n\t\t\t},\n\t\t\toptions: ModelDecorationOptions.EMPTY\n\t\t}));\n\n\t\tthis._editor.changeDecorations((changeAccessor) => {\n\t\t\tthis._decorationsIds = changeAccessor.deltaDecorations(this._decorationsIds, decorations);\n\n\t\t\tthis._colorDatas = new Map<string, IColorData>();\n\t\t\tthis._decorationsIds.forEach((id, i) => this._colorDatas.set(id, colorDatas[i]));\n\t\t});\n\t}\n\n\tprivate readonly _colorDecorationClassRefs = this._register(new DisposableStore());\n\n\tprivate updateColorDecorators(colorData: IColorData[]): void {\n\t\tthis._colorDecorationClassRefs.clear();\n\n\t\tconst decorations: IModelDeltaDecoration[] = [];\n\t\tconst widthInEm = ColorDetector.colorDecoratorInnerWidthInEm + 2 * ColorDetector.colorDecoratorMarginInEm;\n\n\t\tconst limit = this._editor.getOption(EditorOption.colorDecoratorsLimit);\n\n\t\tfor (let i = 0; i < colorData.length && decorations.length < limit; i++) {\n\t\t\tconst { red, green, blue, alpha } = colorData[i].colorInfo.color;\n\t\t\tconst rgba = new RGBA(Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255), alpha);\n\t\t\tconst color = `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})`;\n\n\t\t\tconst ref = this._colorDecorationClassRefs.add(\n\t\t\t\tthis._ruleFactory.createClassNameRef({\n\t\t\t\t\tbackgroundColor: color\n\t\t\t\t})\n\t\t\t);\n\n\t\t\tdecorations.push({\n\t\t\t\trange: {\n\t\t\t\t\tstartLineNumber: colorData[i].colorInfo.range.startLineNumber,\n\t\t\t\t\tstartColumn: colorData[i].colorInfo.range.startColumn,\n\t\t\t\t\tendLineNumber: colorData[i].colorInfo.range.endLineNumber,\n\t\t\t\t\tendColumn: colorData[i].colorInfo.range.endColumn\n\t\t\t\t},\n\t\t\t\toptions: {\n\t\t\t\t\tdescription: 'colorDetector',\n\t\t\t\t\tbefore: {\n\t\t\t\t\t\tcontent: noBreakWhitespace,\n\t\t\t\t\t\tinlineClassName: `${ref.className} colorpicker-color-decoration`,\n\t\t\t\t\t\tinlineClassNameAffectsLetterSpacing: true,\n\t\t\t\t\t\tattachedData: ColorDecorationInjectedTextMarker,\n\t\t\t\t\t\twidthInEm,\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tconst limited = limit < colorData.length ? limit : false;\n\t\tthis._decoratorLimitReporter.update(colorData.length, limited);\n\n\t\tthis._colorDecoratorIds.set(decorations);\n\t}\n\n\tprivate removeAllDecorations(): void {\n\t\tthis._editor.removeDecorations(this._decorationsIds);\n\t\tthis._decorationsIds = [];\n\t\tthis._colorDecoratorIds.clear();\n\t\tthis._colorDecorationClassRefs.clear();\n\t}\n\n\tgetColorData(position: Position): IColorData | null {\n\t\tconst model = this._editor.getModel();\n\t\tif (!model) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst decorations = model\n\t\t\t.getDecorationsInRange(Range.fromPositions(position, position))\n\t\t\t.filter(d => this._colorDatas.has(d.id));\n\n\t\tif (decorations.length === 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this._colorDatas.get(decorations[0].id)!;\n\t}\n\n\tisColorDecoration(decoration: IModelDecoration): boolean {\n\t\treturn this._colorDecoratorIds.has(decoration);\n\t}\n}\n\nexport class DecoratorLimitReporter extends Disposable {\n\tprivate _onDidChange = this._register(new Emitter<void>());\n\n\tprivate _computed: number = 0;\n\tprivate _limited: number | false = false;\n\tpublic update(computed: number, limited: number | false) {\n\t\tif (computed !== this._computed || limited !== this._limited) {\n\t\t\tthis._computed = computed;\n\t\t\tthis._limited = limited;\n\t\t\tthis._onDidChange.fire();\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/colorPicker/browser/colorDetector.ts","vs/editor/contrib/colorPicker/browser/colorDetector.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,EAAqB,uBAAuB,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC5G,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACjG,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGhE,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAGtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAA+B,+BAA+B,EAAE,MAAM,qDAAqD,CAAC;AACnI,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,SAAS,EAAc,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAEnG,MAAM,CAAC,MAAM,iCAAiC,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAG5D,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;;aAErB,OAAE,GAAW,8BAAX,AAAyC,CAAC;aAEnD,mBAAc,GAAG,IAAH,AAAO,CAAC,GAAC,KAAK;aAmBpB,iCA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AAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAChD,CAAC;;AA3QW,aAAa;IA4BvB,WAAA,qBAAqB,CAAA;IACrB,WAAA,wBAAwB,CAAA;IACxB,WAAA,+BAA+B,CAAA;GA9BrB,aAAa,CA4QzB;;AAED,MAAM,OAAO,sBAAuB,SAAQ,UAAU;IAAtD;;QACS,iBAAY,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,OAAO,EAAQ,CAAC,CAAC;QAEnD,cAAS,GAAW,CAAC,CAAC;QACtB,aAAQ,GAAmB,KAAK,CAAC;IAQ1C,CAAC;IAPO,MAAM,CAAC,QAAgB,EAAE,OAAuB;QACtD,IAAI,QAAQ,KAAK,IAAI,CAAC,SAAS,IAAI,OAAO,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC9D,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;YAC1B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YACxB,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QAC1B,CAAC;IACF,CAAC;CACD","file":"colorDetector.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 { CancelablePromise, createCancelablePromise, TimeoutTimer } from '../../../../base/common/async.js';\nimport { RGBA } from '../../../../base/common/color.js';\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { StopWatch } from '../../../../base/common/stopwatch.js';\nimport { noBreakWhitespace } from '../../../../base/common/strings.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { DynamicCssRules } from '../../../browser/editorDom.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { IEditorContribution, IEditorDecorationsCollection } from '../../../common/editorCommon.js';\nimport { IModelDecoration, IModelDeltaDecoration } from '../../../common/model.js';\nimport { ModelDecorationOptions } from '../../../common/model/textModel.js';\nimport { IFeatureDebounceInformation, ILanguageFeatureDebounceService } from '../../../common/services/languageFeatureDebounce.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { getColors, IColorData } from './color.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\n\nexport const ColorDecorationInjectedTextMarker = Object.create({});\n\n\nexport class ColorDetector extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID: string = 'editor.contrib.colorDetector';\n\n\tstatic readonly RECOMPUTE_TIME = 1000; // ms\n\n\tprivate readonly _localToDispose = this._register(new DisposableStore());\n\tprivate _computePromise: CancelablePromise<IColorData[]> | null;\n\tprivate _timeoutTimer: TimeoutTimer | null;\n\tprivate _debounceInformation: IFeatureDebounceInformation;\n\n\tprivate _decorationsIds: string[] = [];\n\tprivate _colorDatas = new Map<string, IColorData>();\n\n\tprivate readonly _colorDecoratorIds: IEditorDecorationsCollection;\n\n\tprivate _isColorDecoratorsEnabled: boolean;\n\tprivate _defaultColorDecoratorsEnablement: 'auto' | 'always' | 'never';\n\n\tprivate readonly _ruleFactory: DynamicCssRules;\n\n\tprivate readonly _decoratorLimitReporter = this._register(new DecoratorLimitReporter());\n\n\tprivate static readonly colorDecoratorInnerWidthInEm = 0.8;\n\tprivate static readonly colorDecoratorMarginInEm = 0.2;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t\t@ILanguageFeatureDebounceService languageFeatureDebounceService: ILanguageFeatureDebounceService,\n\t) {\n\t\tsuper();\n\t\tthis._colorDecoratorIds = this._editor.createDecorationsCollection();\n\t\tthis._ruleFactory = this._register(new DynamicCssRules(this._editor));\n\t\tthis._debounceInformation = languageFeatureDebounceService.for(_languageFeaturesService.colorProvider, 'Document Colors', { min: ColorDetector.RECOMPUTE_TIME });\n\t\tthis._register(_editor.onDidChangeModel(() => {\n\t\t\tthis._isColorDecoratorsEnabled = this.isEnabled();\n\t\t\tthis.updateColors();\n\t\t}));\n\t\tthis._register(_editor.onDidChangeModelLanguage(() => this.updateColors()));\n\t\tthis._register(_languageFeaturesService.colorProvider.onDidChange(() => this.updateColors()));\n\t\tthis._register(_editor.onDidChangeConfiguration((e) => {\n\t\t\tconst prevIsEnabled = this._isColorDecoratorsEnabled;\n\t\t\tthis._isColorDecoratorsEnabled = this.isEnabled();\n\t\t\tthis._defaultColorDecoratorsEnablement = this._editor.getOption(EditorOption.defaultColorDecorators);\n\t\t\tconst updatedColorDecoratorsSetting = prevIsEnabled !== this._isColorDecoratorsEnabled || e.hasChanged(EditorOption.colorDecoratorsLimit);\n\t\t\tconst updatedDefaultColorDecoratorsSetting = e.hasChanged(EditorOption.defaultColorDecorators);\n\t\t\tif (updatedColorDecoratorsSetting || updatedDefaultColorDecoratorsSetting) {\n\t\t\t\tif (this._isColorDecoratorsEnabled) {\n\t\t\t\t\tthis.updateColors();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.removeAllDecorations();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\tthis._timeoutTimer = null;\n\t\tthis._computePromise = null;\n\t\tthis._isColorDecoratorsEnabled = this.isEnabled();\n\t\tthis._defaultColorDecoratorsEnablement = this._editor.getOption(EditorOption.defaultColorDecorators);\n\t\tthis.updateColors();\n\t}\n\n\tisEnabled(): boolean {\n\t\tconst model = this._editor.getModel();\n\t\tif (!model) {\n\t\t\treturn false;\n\t\t}\n\t\tconst languageId = model.getLanguageId();\n\t\t// handle deprecated settings. [languageId].colorDecorators.enable\n\t\tconst deprecatedConfig = this._configurationService.getValue(languageId);\n\t\tif (deprecatedConfig && typeof deprecatedConfig === 'object') {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\tconst colorDecorators = (deprecatedConfig as any)['colorDecorators']; // deprecatedConfig.valueOf('.colorDecorators.enable');\n\t\t\tif (colorDecorators && colorDecorators['enable'] !== undefined && !colorDecorators['enable']) {\n\t\t\t\treturn colorDecorators['enable'];\n\t\t\t}\n\t\t}\n\n\t\treturn this._editor.getOption(EditorOption.colorDecorators);\n\t}\n\n\tstatic get(editor: ICodeEditor): ColorDetector | null {\n\t\treturn editor.getContribution<ColorDetector>(this.ID);\n\t}\n\n\toverride dispose(): void {\n\t\tthis.stop();\n\t\tthis.removeAllDecorations();\n\t\tsuper.dispose();\n\t}\n\n\tprivate updateColors(): void {\n\t\tthis.stop();\n\n\t\tif (!this._isColorDecoratorsEnabled) {\n\t\t\tthis.removeAllDecorations();\n\t\t\treturn;\n\t\t}\n\t\tconst model = this._editor.getModel();\n\n\t\tif (!model || !this._languageFeaturesService.colorProvider.has(model)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._localToDispose.add(this._editor.onDidChangeModelContent(() => {\n\t\t\tif (!this._timeoutTimer) {\n\t\t\t\tthis._timeoutTimer = new TimeoutTimer();\n\t\t\t\tthis._timeoutTimer.cancelAndSet(() => {\n\t\t\t\t\tthis._timeoutTimer = null;\n\t\t\t\t\tthis.beginCompute();\n\t\t\t\t}, this._debounceInformation.get(model));\n\t\t\t}\n\t\t}));\n\t\tthis.beginCompute();\n\t}\n\n\tprivate async beginCompute(): Promise<void> {\n\t\tthis._computePromise = createCancelablePromise(async token => {\n\t\t\tconst model = this._editor.getModel();\n\t\t\tif (!model) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tconst sw = new StopWatch(false);\n\t\t\tconst colors = await getColors(this._languageFeaturesService.colorProvider, model, token, this._defaultColorDecoratorsEnablement);\n\t\t\tthis._debounceInformation.update(model, sw.elapsed());\n\t\t\treturn colors;\n\t\t});\n\t\ttry {\n\t\t\tconst colors = await this._computePromise;\n\t\t\tthis.updateDecorations(colors);\n\t\t\tthis.updateColorDecorators(colors);\n\t\t\tthis._computePromise = null;\n\t\t} catch (e) {\n\t\t\tonUnexpectedError(e);\n\t\t}\n\t}\n\n\tprivate stop(): void {\n\t\tif (this._timeoutTimer) {\n\t\t\tthis._timeoutTimer.cancel();\n\t\t\tthis._timeoutTimer = null;\n\t\t}\n\t\tif (this._computePromise) {\n\t\t\tthis._computePromise.cancel();\n\t\t\tthis._computePromise = null;\n\t\t}\n\t\tthis._localToDispose.clear();\n\t}\n\n\tprivate updateDecorations(colorDatas: IColorData[]): void {\n\t\tconst decorations = colorDatas.map(c => ({\n\t\t\trange: {\n\t\t\t\tstartLineNumber: c.colorInfo.range.startLineNumber,\n\t\t\t\tstartColumn: c.colorInfo.range.startColumn,\n\t\t\t\tendLineNumber: c.colorInfo.range.endLineNumber,\n\t\t\t\tendColumn: c.colorInfo.range.endColumn\n\t\t\t},\n\t\t\toptions: ModelDecorationOptions.EMPTY\n\t\t}));\n\n\t\tthis._editor.changeDecorations((changeAccessor) => {\n\t\t\tthis._decorationsIds = changeAccessor.deltaDecorations(this._decorationsIds, decorations);\n\n\t\t\tthis._colorDatas = new Map<string, IColorData>();\n\t\t\tthis._decorationsIds.forEach((id, i) => this._colorDatas.set(id, colorDatas[i]));\n\t\t});\n\t}\n\n\tprivate readonly _colorDecorationClassRefs = this._register(new DisposableStore());\n\n\tprivate updateColorDecorators(colorData: IColorData[]): void {\n\t\tthis._colorDecorationClassRefs.clear();\n\n\t\tconst decorations: IModelDeltaDecoration[] = [];\n\t\tconst widthInEm = ColorDetector.colorDecoratorInnerWidthInEm + 2 * ColorDetector.colorDecoratorMarginInEm;\n\n\t\tconst limit = this._editor.getOption(EditorOption.colorDecoratorsLimit);\n\n\t\tfor (let i = 0; i < colorData.length && decorations.length < limit; i++) {\n\t\t\tconst { red, green, blue, alpha } = colorData[i].colorInfo.color;\n\t\t\tconst rgba = new RGBA(Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255), alpha);\n\t\t\tconst color = `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})`;\n\n\t\t\tconst ref = this._colorDecorationClassRefs.add(\n\t\t\t\tthis._ruleFactory.createClassNameRef({\n\t\t\t\t\tbackgroundColor: color\n\t\t\t\t})\n\t\t\t);\n\n\t\t\tdecorations.push({\n\t\t\t\trange: {\n\t\t\t\t\tstartLineNumber: colorData[i].colorInfo.range.startLineNumber,\n\t\t\t\t\tstartColumn: colorData[i].colorInfo.range.startColumn,\n\t\t\t\t\tendLineNumber: colorData[i].colorInfo.range.endLineNumber,\n\t\t\t\t\tendColumn: colorData[i].colorInfo.range.endColumn\n\t\t\t\t},\n\t\t\t\toptions: {\n\t\t\t\t\tdescription: 'colorDetector',\n\t\t\t\t\tbefore: {\n\t\t\t\t\t\tcontent: noBreakWhitespace,\n\t\t\t\t\t\tinlineClassName: `${ref.className} colorpicker-color-decoration`,\n\t\t\t\t\t\tinlineClassNameAffectsLetterSpacing: true,\n\t\t\t\t\t\tattachedData: ColorDecorationInjectedTextMarker,\n\t\t\t\t\t\twidthInEm,\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tconst limited = limit < colorData.length ? limit : false;\n\t\tthis._decoratorLimitReporter.update(colorData.length, limited);\n\n\t\tif (decorations.length > 0) {\n\t\t\tthis.ensureDecoratorSizeProperties();\n\t\t}\n\t\tthis._colorDecoratorIds.set(decorations);\n\t}\n\n\tprivate _hasDecoratorSizeProperties = false;\n\n\t/**\n\t * Custom properties are inherited, so setting them on the editor container restyles every\n\t * rendered line. This contribution is created after the first render, so only pay that cost\n\t * once the editor actually shows color decorators.\n\t */\n\tprivate ensureDecoratorSizeProperties(): void {\n\t\tif (this._hasDecoratorSizeProperties) {\n\t\t\treturn;\n\t\t}\n\t\tthis._hasDecoratorSizeProperties = true;\n\t\tconst editorDomNode = this._editor.getContainerDomNode();\n\t\teditorDomNode.style.setProperty('--vscode-colorPicker-colorDecoratorWidth', `${ColorDetector.colorDecoratorInnerWidthInEm}em`);\n\t\teditorDomNode.style.setProperty('--vscode-colorPicker-colorDecoratorMargin', `${ColorDetector.colorDecoratorMarginInEm}em`);\n\t\tthis._register(toDisposable(() => {\n\t\t\teditorDomNode.style.removeProperty('--vscode-colorPicker-colorDecoratorWidth');\n\t\t\teditorDomNode.style.removeProperty('--vscode-colorPicker-colorDecoratorMargin');\n\t\t}));\n\t}\n\n\tprivate removeAllDecorations(): void {\n\t\tthis._editor.removeDecorations(this._decorationsIds);\n\t\tthis._decorationsIds = [];\n\t\tthis._colorDecoratorIds.clear();\n\t\tthis._colorDecorationClassRefs.clear();\n\t}\n\n\tgetColorData(position: Position): IColorData | null {\n\t\tconst model = this._editor.getModel();\n\t\tif (!model) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst decorations = model\n\t\t\t.getDecorationsInRange(Range.fromPositions(position, position))\n\t\t\t.filter(d => this._colorDatas.has(d.id));\n\n\t\tif (decorations.length === 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this._colorDatas.get(decorations[0].id)!;\n\t}\n\n\tisColorDecoration(decoration: IModelDecoration): boolean {\n\t\treturn this._colorDecoratorIds.has(decoration);\n\t}\n}\n\nexport class DecoratorLimitReporter extends Disposable {\n\tprivate _onDidChange = this._register(new Emitter<void>());\n\n\tprivate _computed: number = 0;\n\tprivate _limited: number | false = false;\n\tpublic update(computed: number, limited: number | false) {\n\t\tif (computed !== this._computed || limited !== this._limited) {\n\t\t\tthis._computed = computed;\n\t\t\tthis._limited = limited;\n\t\t\tthis._onDidChange.fire();\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 { CancelablePromise, createCancelablePromise, TimeoutTimer } from '../../../../base/common/async.js';\nimport { RGBA } from '../../../../base/common/color.js';\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { StopWatch } from '../../../../base/common/stopwatch.js';\nimport { noBreakWhitespace } from '../../../../base/common/strings.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { DynamicCssRules } from '../../../browser/editorDom.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { IEditorContribution, IEditorDecorationsCollection } from '../../../common/editorCommon.js';\nimport { IModelDecoration, IModelDeltaDecoration } from '../../../common/model.js';\nimport { ModelDecorationOptions } from '../../../common/model/textModel.js';\nimport { IFeatureDebounceInformation, ILanguageFeatureDebounceService } from '../../../common/services/languageFeatureDebounce.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { getColors, IColorData } from './color.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\n\nexport const ColorDecorationInjectedTextMarker = Object.create({});\n\n\nexport class ColorDetector extends Disposable implements IEditorContribution {\n\n\tpublic static readonly ID: string = 'editor.contrib.colorDetector';\n\n\tstatic readonly RECOMPUTE_TIME = 1000; // ms\n\n\tprivate readonly _localToDispose = this._register(new DisposableStore());\n\tprivate _computePromise: CancelablePromise<IColorData[]> | null;\n\tprivate _timeoutTimer: TimeoutTimer | null;\n\tprivate _debounceInformation: IFeatureDebounceInformation;\n\n\tprivate _decorationsIds: string[] = [];\n\tprivate _colorDatas = new Map<string, IColorData>();\n\n\tprivate readonly _colorDecoratorIds: IEditorDecorationsCollection;\n\n\tprivate _isColorDecoratorsEnabled: boolean;\n\tprivate _defaultColorDecoratorsEnablement: 'auto' | 'always' | 'never';\n\n\tprivate readonly _ruleFactory: DynamicCssRules;\n\n\tprivate readonly _decoratorLimitReporter = this._register(new DecoratorLimitReporter());\n\n\tprivate static readonly colorDecoratorInnerWidthInEm = 0.8;\n\tprivate static readonly colorDecoratorMarginInEm = 0.2;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t\t@ILanguageFeatureDebounceService languageFeatureDebounceService: ILanguageFeatureDebounceService,\n\t) {\n\t\tsuper();\n\t\tthis._colorDecoratorIds = this._editor.createDecorationsCollection();\n\t\tthis._ruleFactory = this._register(new DynamicCssRules(this._editor));\n\t\tthis._debounceInformation = languageFeatureDebounceService.for(_languageFeaturesService.colorProvider, 'Document Colors', { min: ColorDetector.RECOMPUTE_TIME });\n\t\tthis._register(_editor.onDidChangeModel(() => {\n\t\t\tthis._isColorDecoratorsEnabled = this.isEnabled();\n\t\t\tthis.updateColors();\n\t\t}));\n\t\tthis._register(_editor.onDidChangeModelLanguage(() => this.updateColors()));\n\t\tthis._register(_languageFeaturesService.colorProvider.onDidChange(() => this.updateColors()));\n\t\tthis._register(_editor.onDidChangeConfiguration((e) => {\n\t\t\tconst prevIsEnabled = this._isColorDecoratorsEnabled;\n\t\t\tthis._isColorDecoratorsEnabled = this.isEnabled();\n\t\t\tthis._defaultColorDecoratorsEnablement = this._editor.getOption(EditorOption.defaultColorDecorators);\n\t\t\tconst updatedColorDecoratorsSetting = prevIsEnabled !== this._isColorDecoratorsEnabled || e.hasChanged(EditorOption.colorDecoratorsLimit);\n\t\t\tconst updatedDefaultColorDecoratorsSetting = e.hasChanged(EditorOption.defaultColorDecorators);\n\t\t\tif (updatedColorDecoratorsSetting || updatedDefaultColorDecoratorsSetting) {\n\t\t\t\tif (this._isColorDecoratorsEnabled) {\n\t\t\t\t\tthis.updateColors();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.removeAllDecorations();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\tthis._timeoutTimer = null;\n\t\tthis._computePromise = null;\n\t\tthis._isColorDecoratorsEnabled = this.isEnabled();\n\t\tthis._defaultColorDecoratorsEnablement = this._editor.getOption(EditorOption.defaultColorDecorators);\n\t\tthis.updateColors();\n\t}\n\n\tisEnabled(): boolean {\n\t\tconst model = this._editor.getModel();\n\t\tif (!model) {\n\t\t\treturn false;\n\t\t}\n\t\tconst languageId = model.getLanguageId();\n\t\t// handle deprecated settings. [languageId].colorDecorators.enable\n\t\tconst deprecatedConfig = this._configurationService.getValue(languageId);\n\t\tif (deprecatedConfig && typeof deprecatedConfig === 'object') {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\tconst colorDecorators = (deprecatedConfig as any)['colorDecorators']; // deprecatedConfig.valueOf('.colorDecorators.enable');\n\t\t\tif (colorDecorators && colorDecorators['enable'] !== undefined && !colorDecorators['enable']) {\n\t\t\t\treturn colorDecorators['enable'];\n\t\t\t}\n\t\t}\n\n\t\treturn this._editor.getOption(EditorOption.colorDecorators);\n\t}\n\n\tstatic get(editor: ICodeEditor): ColorDetector | null {\n\t\treturn editor.getContribution<ColorDetector>(this.ID);\n\t}\n\n\toverride dispose(): void {\n\t\tthis.stop();\n\t\tthis.removeAllDecorations();\n\t\tsuper.dispose();\n\t}\n\n\tprivate updateColors(): void {\n\t\tthis.stop();\n\n\t\tif (!this._isColorDecoratorsEnabled) {\n\t\t\tthis.removeAllDecorations();\n\t\t\treturn;\n\t\t}\n\t\tconst model = this._editor.getModel();\n\n\t\tif (!model || !this._languageFeaturesService.colorProvider.has(model)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._localToDispose.add(this._editor.onDidChangeModelContent(() => {\n\t\t\tif (!this._timeoutTimer) {\n\t\t\t\tthis._timeoutTimer = new TimeoutTimer();\n\t\t\t\tthis._timeoutTimer.cancelAndSet(() => {\n\t\t\t\t\tthis._timeoutTimer = null;\n\t\t\t\t\tthis.beginCompute();\n\t\t\t\t}, this._debounceInformation.get(model));\n\t\t\t}\n\t\t}));\n\t\tthis.beginCompute();\n\t}\n\n\tprivate async beginCompute(): Promise<void> {\n\t\tthis._computePromise = createCancelablePromise(async token => {\n\t\t\tconst model = this._editor.getModel();\n\t\t\tif (!model) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tconst sw = new StopWatch(false);\n\t\t\tconst colors = await getColors(this._languageFeaturesService.colorProvider, model, token, this._defaultColorDecoratorsEnablement);\n\t\t\tthis._debounceInformation.update(model, sw.elapsed());\n\t\t\treturn colors;\n\t\t});\n\t\ttry {\n\t\t\tconst colors = await this._computePromise;\n\t\t\tthis.updateDecorations(colors);\n\t\t\tthis.updateColorDecorators(colors);\n\t\t\tthis._computePromise = null;\n\t\t} catch (e) {\n\t\t\tonUnexpectedError(e);\n\t\t}\n\t}\n\n\tprivate stop(): void {\n\t\tif (this._timeoutTimer) {\n\t\t\tthis._timeoutTimer.cancel();\n\t\t\tthis._timeoutTimer = null;\n\t\t}\n\t\tif (this._computePromise) {\n\t\t\tthis._computePromise.cancel();\n\t\t\tthis._computePromise = null;\n\t\t}\n\t\tthis._localToDispose.clear();\n\t}\n\n\tprivate updateDecorations(colorDatas: IColorData[]): void {\n\t\tconst decorations = colorDatas.map(c => ({\n\t\t\trange: {\n\t\t\t\tstartLineNumber: c.colorInfo.range.startLineNumber,\n\t\t\t\tstartColumn: c.colorInfo.range.startColumn,\n\t\t\t\tendLineNumber: c.colorInfo.range.endLineNumber,\n\t\t\t\tendColumn: c.colorInfo.range.endColumn\n\t\t\t},\n\t\t\toptions: ModelDecorationOptions.EMPTY\n\t\t}));\n\n\t\tthis._editor.changeDecorations((changeAccessor) => {\n\t\t\tthis._decorationsIds = changeAccessor.deltaDecorations(this._decorationsIds, decorations);\n\n\t\t\tthis._colorDatas = new Map<string, IColorData>();\n\t\t\tthis._decorationsIds.forEach((id, i) => this._colorDatas.set(id, colorDatas[i]));\n\t\t});\n\t}\n\n\tprivate readonly _colorDecorationClassRefs = this._register(new DisposableStore());\n\n\tprivate updateColorDecorators(colorData: IColorData[]): void {\n\t\tthis._colorDecorationClassRefs.clear();\n\n\t\tconst decorations: IModelDeltaDecoration[] = [];\n\t\tconst widthInEm = ColorDetector.colorDecoratorInnerWidthInEm + 2 * ColorDetector.colorDecoratorMarginInEm;\n\n\t\tconst limit = this._editor.getOption(EditorOption.colorDecoratorsLimit);\n\n\t\tfor (let i = 0; i < colorData.length && decorations.length < limit; i++) {\n\t\t\tconst { red, green, blue, alpha } = colorData[i].colorInfo.color;\n\t\t\tconst rgba = new RGBA(Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255), alpha);\n\t\t\tconst color = `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})`;\n\n\t\t\tconst ref = this._colorDecorationClassRefs.add(\n\t\t\t\tthis._ruleFactory.createClassNameRef({\n\t\t\t\t\tbackgroundColor: color\n\t\t\t\t})\n\t\t\t);\n\n\t\t\tdecorations.push({\n\t\t\t\trange: {\n\t\t\t\t\tstartLineNumber: colorData[i].colorInfo.range.startLineNumber,\n\t\t\t\t\tstartColumn: colorData[i].colorInfo.range.startColumn,\n\t\t\t\t\tendLineNumber: colorData[i].colorInfo.range.endLineNumber,\n\t\t\t\t\tendColumn: colorData[i].colorInfo.range.endColumn\n\t\t\t\t},\n\t\t\t\toptions: {\n\t\t\t\t\tdescription: 'colorDetector',\n\t\t\t\t\tbefore: {\n\t\t\t\t\t\tcontent: noBreakWhitespace,\n\t\t\t\t\t\tinlineClassName: `${ref.className} colorpicker-color-decoration`,\n\t\t\t\t\t\tinlineClassNameAffectsLetterSpacing: true,\n\t\t\t\t\t\tattachedData: ColorDecorationInjectedTextMarker,\n\t\t\t\t\t\twidthInEm,\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tconst limited = limit < colorData.length ? limit : false;\n\t\tthis._decoratorLimitReporter.update(colorData.length, limited);\n\n\t\tif (decorations.length > 0) {\n\t\t\tthis.ensureDecoratorSizeProperties();\n\t\t}\n\t\tthis._colorDecoratorIds.set(decorations);\n\t}\n\n\tprivate _hasDecoratorSizeProperties = false;\n\n\t/**\n\t * Custom properties are inherited, so setting them on the editor container restyles every\n\t * rendered line. This contribution is created after the first render, so only pay that cost\n\t * once the editor actually shows color decorators.\n\t */\n\tprivate ensureDecoratorSizeProperties(): void {\n\t\tif (this._hasDecoratorSizeProperties) {\n\t\t\treturn;\n\t\t}\n\t\tthis._hasDecoratorSizeProperties = true;\n\t\tconst editorDomNode = this._editor.getContainerDomNode();\n\t\teditorDomNode.style.setProperty('--vscode-colorPicker-colorDecoratorWidth', `${ColorDetector.colorDecoratorInnerWidthInEm}em`);\n\t\teditorDomNode.style.setProperty('--vscode-colorPicker-colorDecoratorMargin', `${ColorDetector.colorDecoratorMarginInEm}em`);\n\t\tthis._register(toDisposable(() => {\n\t\t\teditorDomNode.style.removeProperty('--vscode-colorPicker-colorDecoratorWidth');\n\t\t\teditorDomNode.style.removeProperty('--vscode-colorPicker-colorDecoratorMargin');\n\t\t}));\n\t}\n\n\tprivate removeAllDecorations(): void {\n\t\tthis._editor.removeDecorations(this._decorationsIds);\n\t\tthis._decorationsIds = [];\n\t\tthis._colorDecoratorIds.clear();\n\t\tthis._colorDecorationClassRefs.clear();\n\t}\n\n\tgetColorData(position: Position): IColorData | null {\n\t\tconst model = this._editor.getModel();\n\t\tif (!model) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst decorations = model\n\t\t\t.getDecorationsInRange(Range.fromPositions(position, position))\n\t\t\t.filter(d => this._colorDatas.has(d.id));\n\n\t\tif (decorations.length === 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this._colorDatas.get(decorations[0].id)!;\n\t}\n\n\tisColorDecoration(decoration: IModelDecoration): boolean {\n\t\treturn this._colorDecoratorIds.has(decoration);\n\t}\n}\n\nexport class DecoratorLimitReporter extends Disposable {\n\tprivate _onDidChange = this._register(new Emitter<void>());\n\n\tprivate _computed: number = 0;\n\tprivate _limited: number | false = false;\n\tpublic update(computed: number, limited: number | false) {\n\t\tif (computed !== this._computed || limited !== this._limited) {\n\t\t\tthis._computed = computed;\n\t\t\tthis._limited = limited;\n\t\t\tthis._onDidChange.fire();\n\t\t}\n\t}\n}\n"]}
@@ -22,7 +22,7 @@ export class CloseButton extends Disposable {
22
22
  const innerDiv = document.createElement('div');
23
23
  innerDiv.classList.add('close-button-inner-div');
24
24
  dom.append(this._button, innerDiv);
25
- const closeButton = dom.append(innerDiv, $('.button' + ThemeIcon.asCSSSelector(registerIcon('color-picker-close', Codicon.close, localize(936, 'Icon to close the color picker')))));
25
+ const closeButton = dom.append(innerDiv, $('.button' + ThemeIcon.asCSSSelector(registerIcon('color-picker-close', Codicon.close, localize(943, 'Icon to close the color picker')))));
26
26
  closeButton.classList.add('close-icon');
27
27
  this._register(dom.addDisposableListener(this._button, dom.EventType.CLICK, () => {
28
28
  this._onClicked.fire();
@@ -22,7 +22,7 @@ export class ColorPickerHeader extends Disposable {
22
22
  dom.append(this._pickedColorNode, $('span.codicon.codicon-color-mode'));
23
23
  this._pickedColorPresentation = dom.append(this._pickedColorNode, document.createElement('span'));
24
24
  this._pickedColorPresentation.classList.add('picked-color-presentation');
25
- const tooltip = localize(937, "Click to toggle color options (rgb/hsl/hex)");
25
+ const tooltip = localize(944, "Click to toggle color options (rgb/hsl/hex)");
26
26
  this._pickedColorNode.setAttribute('title', tooltip);
27
27
  this._originalColorNode = dom.append(this._domNode, $('.original-color'));
28
28
  this._originalColorNode.style.backgroundColor = Color.Format.CSS.format(this.model.originalColor) || '';
@@ -17,7 +17,7 @@ export class HoverColorPickerContribution extends Disposable {
17
17
  super.dispose();
18
18
  }
19
19
  onMouseDown(mouseEvent) {
20
- const colorDecoratorsActivatedOn = this._editor.getOption(169 /* EditorOption.colorDecoratorsActivatedOn */);
20
+ const colorDecoratorsActivatedOn = this._editor.getOption(172 /* EditorOption.colorDecoratorsActivatedOn */);
21
21
  if (colorDecoratorsActivatedOn !== 'click' && colorDecoratorsActivatedOn !== 'clickAndHover') {
22
22
  return;
23
23
  }
@@ -78,7 +78,7 @@ let HoverColorPickerParticipant = class HoverColorPickerParticipant {
78
78
  return [];
79
79
  }
80
80
  _isValidRequest(source) {
81
- const decoratorActivatedOn = this._editor.getOption(169 /* EditorOption.colorDecoratorsActivatedOn */);
81
+ const decoratorActivatedOn = this._editor.getOption(172 /* EditorOption.colorDecoratorsActivatedOn */);
82
82
  switch (source) {
83
83
  case 0 /* HoverStartSource.Mouse */:
84
84
  return decoratorActivatedOn === 'hover' || decoratorActivatedOn === 'clickAndHover';
@@ -99,7 +99,7 @@ let HoverColorPickerParticipant = class HoverColorPickerParticipant {
99
99
  const colorHover = hoverParts[0];
100
100
  const editorModel = editor.getModel();
101
101
  const model = colorHover.model;
102
- this._colorPicker = disposables.add(new ColorPickerWidget(context.fragment, model, editor.getOption(164 /* EditorOption.pixelRatio */), this._themeService, "hover" /* ColorPickerWidgetType.Hover */));
102
+ this._colorPicker = disposables.add(new ColorPickerWidget(context.fragment, model, editor.getOption(167 /* EditorOption.pixelRatio */), this._themeService, "hover" /* ColorPickerWidgetType.Hover */));
103
103
  let editorUpdatedByColorPicker = false;
104
104
  let range = new Range(colorHover.range.startLineNumber, colorHover.range.startColumn, colorHover.range.endLineNumber, colorHover.range.endColumn);
105
105
  disposables.add(model.onColorFlushed(async (color) => {
@@ -127,7 +127,7 @@ let HoverColorPickerParticipant = class HoverColorPickerParticipant {
127
127
  return new RenderedHoverParts([renderedHoverPart]);
128
128
  }
129
129
  getAccessibleContent(hoverPart) {
130
- return nls.localize(938, 'There is a color picker here.');
130
+ return nls.localize(945, 'There is a color picker here.');
131
131
  }
132
132
  handleResize() {
133
133
  this._colorPicker?.layout();
@@ -12,15 +12,15 @@ export class ShowOrFocusStandaloneColorPicker extends EditorAction2 {
12
12
  super({
13
13
  id: 'editor.action.showOrFocusStandaloneColorPicker',
14
14
  title: {
15
- ...localize2(940, "Show or Focus Standalone Color Picker"),
16
- mnemonicTitle: localize(939, "&&Show or Focus Standalone Color Picker"),
15
+ ...localize2(947, "Show or Focus Standalone Color Picker"),
16
+ mnemonicTitle: localize(946, "&&Show or Focus Standalone Color Picker"),
17
17
  },
18
18
  precondition: undefined,
19
19
  menu: [
20
20
  { id: MenuId.CommandPalette },
21
21
  ],
22
22
  metadata: {
23
- description: localize2(941, "Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors."),
23
+ description: localize2(948, "Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors."),
24
24
  }
25
25
  });
26
26
  }
@@ -32,7 +32,7 @@ export class HideStandaloneColorPicker extends EditorAction {
32
32
  constructor() {
33
33
  super({
34
34
  id: 'editor.action.hideColorPicker',
35
- label: localize2(942, "Hide the Color Picker"),
35
+ label: localize2(949, "Hide the Color Picker"),
36
36
 
37
37
 
38
38
 
@@ -44,7 +44,7 @@ export class HideStandaloneColorPicker extends EditorAction {
44
44
  weight: 100 /* KeybindingWeight.EditorContrib */
45
45
  },
46
46
  metadata: {
47
- description: localize2(943, "Hide the standalone color picker."),
47
+ description: localize2(950, "Hide the standalone color picker."),
48
48
  }
49
49
  });
50
50
  }
@@ -56,7 +56,7 @@ export class InsertColorWithStandaloneColorPicker extends EditorAction {
56
56
  constructor() {
57
57
  super({
58
58
  id: 'editor.action.insertColorWithStandaloneColorPicker',
59
- label: localize2(944, "Insert Color with Standalone Color Picker"),
59
+ label: localize2(951, "Insert Color with Standalone Color Picker"),
60
60
 
61
61
 
62
62
 
@@ -68,7 +68,7 @@ export class InsertColorWithStandaloneColorPicker extends EditorAction {
68
68
  weight: 100 /* KeybindingWeight.EditorContrib */
69
69
  },
70
70
  metadata: {
71
- description: localize2(945, "Insert hex/rgb/hsl colors with the focused standalone color picker."),
71
+ description: localize2(952, "Insert hex/rgb/hsl colors with the focused standalone color picker."),
72
72
  }
73
73
  });
74
74
  }
@@ -37,7 +37,7 @@ export class StandaloneColorPickerRenderedParts extends Disposable {
37
37
  const editorModel = editor.getModel();
38
38
  const colorPickerModel = colorHover.model;
39
39
  this.color = colorHover.model.color;
40
- this.colorPicker = this._register(new ColorPickerWidget(context.fragment, colorPickerModel, editor.getOption(164 /* EditorOption.pixelRatio */), themeService, "standalone" /* ColorPickerWidgetType.Standalone */));
40
+ this.colorPicker = this._register(new ColorPickerWidget(context.fragment, colorPickerModel, editor.getOption(167 /* EditorOption.pixelRatio */), themeService, "standalone" /* ColorPickerWidgetType.Standalone */));
41
41
  this._register(colorPickerModel.onColorFlushed((color) => {
42
42
  this.color = color;
43
43
  }));
@@ -56,7 +56,7 @@ class ToggleCommentLineAction extends CommentLineAction {
56
56
  constructor() {
57
57
  super(0 /* Type.Toggle */, {
58
58
  id: 'editor.action.commentLine',
59
- label: nls.localize2(948, "Toggle Line Comment"),
59
+ label: nls.localize2(955, "Toggle Line Comment"),
60
60
  precondition: EditorContextKeys.writable,
61
61
  kbOpts: {
62
62
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -66,7 +66,7 @@ class ToggleCommentLineAction extends CommentLineAction {
66
66
  menuOpts: {
67
67
  menuId: MenuId.MenubarEditMenu,
68
68
  group: '5_insert',
69
- title: nls.localize(946, "&&Toggle Line Comment"),
69
+ title: nls.localize(953, "&&Toggle Line Comment"),
70
70
  order: 1
71
71
  },
72
72
  canTriggerInlineEdits: true,
@@ -77,7 +77,7 @@ class AddLineCommentAction extends CommentLineAction {
77
77
  constructor() {
78
78
  super(1 /* Type.ForceAdd */, {
79
79
  id: 'editor.action.addCommentLine',
80
- label: nls.localize2(949, "Add Line Comment"),
80
+ label: nls.localize2(956, "Add Line Comment"),
81
81
  precondition: EditorContextKeys.writable,
82
82
  kbOpts: {
83
83
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -92,7 +92,7 @@ class RemoveLineCommentAction extends CommentLineAction {
92
92
  constructor() {
93
93
  super(2 /* Type.ForceRemove */, {
94
94
  id: 'editor.action.removeCommentLine',
95
- label: nls.localize2(950, "Remove Line Comment"),
95
+ label: nls.localize2(957, "Remove Line Comment"),
96
96
  precondition: EditorContextKeys.writable,
97
97
  kbOpts: {
98
98
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -107,7 +107,7 @@ class BlockCommentAction extends EditorAction {
107
107
  constructor() {
108
108
  super({
109
109
  id: 'editor.action.blockComment',
110
- label: nls.localize2(951, "Toggle Block Comment"),
110
+ label: nls.localize2(958, "Toggle Block Comment"),
111
111
  precondition: EditorContextKeys.writable,
112
112
  kbOpts: {
113
113
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -118,7 +118,7 @@ class BlockCommentAction extends EditorAction {
118
118
  menuOpts: {
119
119
  menuId: MenuId.MenubarEditMenu,
120
120
  group: '5_insert',
121
- title: nls.localize(947, "Toggle &&Block Comment"),
121
+ title: nls.localize(954, "Toggle &&Block Comment"),
122
122
  order: 2
123
123
  },
124
124
  canTriggerInlineEdits: true,