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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (415) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.cs.js +2 -2
  3. package/esm/nls.messages.de.js +2 -2
  4. package/esm/nls.messages.es.js +2 -2
  5. package/esm/nls.messages.fr.js +2 -2
  6. package/esm/nls.messages.it.js +2 -2
  7. package/esm/nls.messages.ja.js +2 -2
  8. package/esm/nls.messages.js +1 -1
  9. package/esm/nls.messages.json +1 -1
  10. package/esm/nls.messages.ko.js +2 -2
  11. package/esm/nls.messages.pl.js +2 -2
  12. package/esm/nls.messages.pt-br.js +2 -2
  13. package/esm/nls.messages.ru.js +2 -2
  14. package/esm/nls.messages.tr.js +2 -2
  15. package/esm/nls.messages.zh-cn.js +2 -2
  16. package/esm/nls.messages.zh-tw.js +2 -2
  17. package/esm/nls.metadata.json +27 -8
  18. package/esm/vs/base/browser/dom.js +31 -34
  19. package/esm/vs/base/browser/dom.js.map +1 -1
  20. package/esm/vs/base/browser/dompurify/dompurify.js +0 -1
  21. package/esm/vs/base/browser/keyboardEvent.js +3 -3
  22. package/esm/vs/base/browser/keyboardEvent.js.map +1 -1
  23. package/esm/vs/base/browser/markdownRenderer.js +5 -2
  24. package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
  25. package/esm/vs/base/browser/pixelRatio.js +5 -5
  26. package/esm/vs/base/browser/pixelRatio.js.map +1 -1
  27. package/esm/vs/base/browser/trustedTypes.js +1 -1
  28. package/esm/vs/base/browser/trustedTypes.js.map +1 -1
  29. package/esm/vs/base/browser/ui/actionbar/actionbar.js +3 -0
  30. package/esm/vs/base/browser/ui/actionbar/actionbar.js.map +1 -1
  31. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  32. package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +7 -0
  33. package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js.map +1 -1
  34. package/esm/vs/base/browser/ui/hover/hoverWidget.css +0 -13
  35. package/esm/vs/base/browser/ui/inputbox/inputBox.js +7 -0
  36. package/esm/vs/base/browser/ui/inputbox/inputBox.js.map +1 -1
  37. package/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css +4 -2
  38. package/esm/vs/base/browser/ui/list/listView.js +7 -2
  39. package/esm/vs/base/browser/ui/list/listView.js.map +1 -1
  40. package/esm/vs/base/browser/ui/selectBox/selectBox.js +4 -0
  41. package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
  42. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.css +12 -32
  43. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +8 -18
  44. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
  45. package/esm/vs/base/browser/ui/toolbar/toolbar.js +41 -14
  46. package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
  47. package/esm/vs/base/browser/ui/tree/abstractTree.js +11 -0
  48. package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
  49. package/esm/vs/base/browser/ui/tree/asyncDataTree.js +1 -0
  50. package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
  51. package/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js.map +1 -1
  52. package/esm/vs/base/browser/ui/tree/dataTree.js.map +1 -1
  53. package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
  54. package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
  55. package/esm/vs/base/browser/ui/tree/objectTreeModel.js.map +1 -1
  56. package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
  57. package/esm/vs/base/common/arrays.js +10 -0
  58. package/esm/vs/base/common/arrays.js.map +1 -1
  59. package/esm/vs/base/common/async.js +34 -0
  60. package/esm/vs/base/common/async.js.map +1 -1
  61. package/esm/vs/base/common/buffer.js +1 -1
  62. package/esm/vs/base/common/buffer.js.map +1 -1
  63. package/esm/vs/base/common/cancellation.js.map +1 -1
  64. package/esm/vs/base/common/codiconsLibrary.js +3 -0
  65. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  66. package/esm/vs/base/common/collections.js.map +1 -1
  67. package/esm/vs/base/common/equals.js.map +1 -1
  68. package/esm/vs/base/common/event.js +32 -15
  69. package/esm/vs/base/common/event.js.map +1 -1
  70. package/esm/vs/base/common/filters.js +22 -3
  71. package/esm/vs/base/common/filters.js.map +1 -1
  72. package/esm/vs/base/common/hotReload.js +2 -2
  73. package/esm/vs/base/common/hotReload.js.map +1 -1
  74. package/esm/vs/base/common/iterator.js +1 -1
  75. package/esm/vs/base/common/iterator.js.map +1 -1
  76. package/esm/vs/base/common/keyCodes.js +7 -6
  77. package/esm/vs/base/common/keyCodes.js.map +1 -1
  78. package/esm/vs/base/common/linkedList.js.map +1 -1
  79. package/esm/vs/base/common/map.js.map +1 -1
  80. package/esm/vs/base/common/marked/marked.js +0 -1
  81. package/esm/vs/base/common/network.js +26 -1
  82. package/esm/vs/base/common/network.js.map +1 -1
  83. package/esm/vs/base/common/normalization.js +19 -6
  84. package/esm/vs/base/common/normalization.js.map +1 -1
  85. package/esm/vs/base/common/observableInternal/debugLocation.js +1 -2
  86. package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
  87. package/esm/vs/base/common/observableInternal/debugName.js +0 -1
  88. package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
  89. package/esm/vs/base/common/observableInternal/index.js +4 -4
  90. package/esm/vs/base/common/observableInternal/index.js.map +1 -1
  91. package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js +38 -10
  92. package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js.map +1 -1
  93. package/esm/vs/base/common/observableInternal/observables/baseObservable.js +3 -3
  94. package/esm/vs/base/common/observableInternal/observables/baseObservable.js.map +1 -1
  95. package/esm/vs/base/common/observableInternal/utils/utils.js +46 -5
  96. package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
  97. package/esm/vs/base/common/path.js +1 -0
  98. package/esm/vs/base/common/path.js.map +1 -1
  99. package/esm/vs/base/common/strings.js +27 -19
  100. package/esm/vs/base/common/strings.js.map +1 -1
  101. package/esm/vs/editor/browser/config/elementSizeObserver.js +5 -5
  102. package/esm/vs/editor/browser/config/elementSizeObserver.js.map +1 -1
  103. package/esm/vs/editor/browser/config/fontMeasurements.js.map +1 -1
  104. package/esm/vs/editor/browser/config/migrateOptions.js +6 -0
  105. package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
  106. package/esm/vs/editor/browser/config/tabFocus.js +4 -2
  107. package/esm/vs/editor/browser/config/tabFocus.js.map +1 -1
  108. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +8 -0
  109. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
  110. package/esm/vs/editor/browser/coreCommands.js +1 -2
  111. package/esm/vs/editor/browser/coreCommands.js.map +1 -1
  112. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  113. package/esm/vs/editor/browser/observableCodeEditor.js +32 -1
  114. package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
  115. package/esm/vs/editor/browser/services/contribution.js +9 -0
  116. package/esm/vs/editor/browser/services/contribution.js.map +1 -0
  117. package/esm/vs/editor/browser/services/editorWorkerService.js +27 -14
  118. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  119. package/esm/vs/editor/browser/services/openerService.js +5 -1
  120. package/esm/vs/editor/browser/services/openerService.js.map +1 -1
  121. package/esm/vs/editor/browser/view/domLineBreaksComputer.js +1 -1
  122. package/esm/vs/editor/browser/view/domLineBreaksComputer.js.map +1 -1
  123. package/esm/vs/editor/browser/view/renderingContext.js +1 -1
  124. package/esm/vs/editor/browser/view/renderingContext.js.map +1 -1
  125. package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +10 -3
  126. package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js.map +1 -1
  127. package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +3 -4
  128. package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js.map +1 -1
  129. package/esm/vs/editor/browser/viewParts/minimap/minimap.js +1 -1
  130. package/esm/vs/editor/browser/viewParts/minimap/minimap.js.map +1 -1
  131. package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +1 -1
  132. package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js.map +1 -1
  133. package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +4 -2
  134. package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js.map +1 -1
  135. package/esm/vs/editor/browser/viewParts/rulers/rulers.js +1 -3
  136. package/esm/vs/editor/browser/viewParts/rulers/rulers.js.map +1 -1
  137. package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +1 -1
  138. package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js.map +1 -1
  139. package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js +2 -1
  140. package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js.map +1 -1
  141. package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +6 -18
  142. package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js.map +1 -1
  143. package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +0 -7
  144. package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js.map +1 -1
  145. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +7 -2
  146. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  147. package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +1 -0
  148. package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js.map +1 -1
  149. package/esm/vs/editor/common/commands/replaceCommand.js +2 -2
  150. package/esm/vs/editor/common/commands/replaceCommand.js.map +1 -1
  151. package/esm/vs/editor/common/config/editorOptions.js +374 -360
  152. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  153. package/esm/vs/editor/common/core/2d/rect.js +7 -0
  154. package/esm/vs/editor/common/core/2d/rect.js.map +1 -1
  155. package/esm/vs/editor/common/core/2d/size.js +20 -0
  156. package/esm/vs/editor/common/core/2d/size.js.map +1 -0
  157. package/esm/vs/editor/common/core/editorColorRegistry.js +69 -68
  158. package/esm/vs/editor/common/core/editorColorRegistry.js.map +1 -1
  159. package/esm/vs/editor/common/core/ranges/offsetRange.js +9 -0
  160. package/esm/vs/editor/common/core/ranges/offsetRange.js.map +1 -1
  161. package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
  162. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  163. package/esm/vs/editor/common/editorContextKeys.js +47 -47
  164. package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
  165. package/esm/vs/editor/common/languages.js +56 -56
  166. package/esm/vs/editor/common/languages.js.map +1 -1
  167. package/esm/vs/editor/common/model/editStack.js +1 -1
  168. package/esm/vs/editor/common/services/languagesAssociations.js +6 -8
  169. package/esm/vs/editor/common/services/languagesAssociations.js.map +1 -1
  170. package/esm/vs/editor/common/standaloneStrings.js +11 -10
  171. package/esm/vs/editor/common/standaloneStrings.js.map +1 -1
  172. package/esm/vs/editor/common/textModelEditSource.js +1 -1
  173. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  174. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
  175. package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  176. package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
  177. package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  178. package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  179. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
  180. package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  181. package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
  182. package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  183. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  184. package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  185. package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  186. package/esm/vs/editor/contrib/codelens/browser/codelens.js.map +1 -1
  187. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  188. package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
  189. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
  190. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
  191. package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
  192. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  193. package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
  194. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
  195. package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  196. package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js +14 -0
  197. package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js.map +1 -1
  198. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
  199. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
  200. package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  201. package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  202. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
  203. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  204. package/esm/vs/editor/contrib/find/browser/findController.js +17 -17
  205. package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
  206. package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
  207. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
  208. package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
  209. package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
  210. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  211. package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  212. package/esm/vs/editor/contrib/format/browser/format.js +21 -6
  213. package/esm/vs/editor/contrib/format/browser/format.js.map +1 -1
  214. package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
  215. package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  216. package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  217. package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  218. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  219. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
  220. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  221. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
  222. package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  223. package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  224. package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  225. package/esm/vs/editor/contrib/hover/browser/contentHoverController.js +5 -10
  226. package/esm/vs/editor/contrib/hover/browser/contentHoverController.js.map +1 -1
  227. package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js +11 -6
  228. package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js.map +1 -1
  229. package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  230. package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  231. package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
  232. package/esm/vs/editor/contrib/hover/browser/hoverUtils.js +24 -0
  233. package/esm/vs/editor/contrib/hover/browser/hoverUtils.js.map +1 -1
  234. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
  235. package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
  236. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  237. package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  238. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  239. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +20 -20
  240. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
  241. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +18 -16
  242. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
  243. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  244. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  245. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +42 -37
  246. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  247. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +3 -3
  248. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +1 -1
  249. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +8 -8
  250. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
  251. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +54 -43
  252. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  253. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +12 -12
  254. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
  255. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +74 -48
  256. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  257. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +8 -36
  258. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
  259. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js +10 -11
  260. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js.map +1 -1
  261. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +105 -119
  262. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
  263. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
  264. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +8 -36
  265. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
  266. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js +95 -0
  267. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js.map +1 -0
  268. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +17 -9
  269. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
  270. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +415 -0
  271. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -0
  272. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +253 -0
  273. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -0
  274. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
  275. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js +103 -0
  276. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js.map +1 -0
  277. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js +32 -0
  278. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js.map +1 -0
  279. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +44 -11
  280. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
  281. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +181 -0
  282. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -0
  283. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  284. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  285. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -31
  286. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
  287. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  288. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  289. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  290. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  291. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  292. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  293. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  294. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  295. package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +2 -2
  296. package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js.map +1 -1
  297. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +18 -13
  298. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
  299. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  300. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  301. package/esm/vs/editor/contrib/rename/browser/rename.js +12 -12
  302. package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
  303. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  304. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  305. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  306. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  307. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  308. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -1
  309. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
  310. package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
  311. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
  312. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
  313. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
  314. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  315. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  316. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  317. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  318. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  319. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  320. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +29 -29
  321. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
  322. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  323. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  324. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +4 -4
  325. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js.map +1 -1
  326. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
  327. package/esm/vs/editor/editor.all.js +1 -0
  328. package/esm/vs/editor/editor.all.js.map +1 -1
  329. package/esm/vs/editor/editor.api.d.ts +9 -5
  330. package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js +22 -2
  331. package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js.map +1 -1
  332. package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js +39 -0
  333. package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js.map +1 -0
  334. package/esm/vs/editor/standalone/browser/standaloneEditor.js +2 -1
  335. package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
  336. package/esm/vs/editor/standalone/browser/standaloneServices.js +3 -21
  337. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  338. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js +4 -4
  339. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
  340. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  341. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  342. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  343. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  344. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +7 -9
  345. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
  346. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  347. package/esm/vs/platform/actions/common/actions.js +2 -0
  348. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  349. package/esm/vs/platform/actions/common/menuService.js +2 -2
  350. package/esm/vs/platform/configuration/common/configuration.js +5 -4
  351. package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
  352. package/esm/vs/platform/configuration/common/configurationModels.js +21 -10
  353. package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
  354. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  355. package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
  356. package/esm/vs/platform/configuration/common/configurations.js.map +1 -1
  357. package/esm/vs/platform/contextkey/browser/contextKeyService.js +3 -3
  358. package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +1 -1
  359. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  360. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  361. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  362. package/esm/vs/platform/contextview/browser/contextViewService.js.map +1 -1
  363. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  364. package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
  365. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  366. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  367. package/esm/vs/platform/list/browser/listService.js +27 -27
  368. package/esm/vs/platform/list/browser/listService.js.map +1 -1
  369. package/esm/vs/platform/markers/common/markerService.js +2 -2
  370. package/esm/vs/platform/markers/common/markers.js +6 -6
  371. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +11 -32
  372. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
  373. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  374. package/esm/vs/platform/quickinput/browser/media/quickInput.css +9 -3
  375. package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
  376. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  377. package/esm/vs/platform/quickinput/browser/quickInputController.js +35 -14
  378. package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
  379. package/esm/vs/platform/quickinput/browser/quickInputList.js +4 -1
  380. package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
  381. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  382. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  383. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js +71 -40
  384. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js.map +1 -1
  385. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +21 -8
  386. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js.map +1 -1
  387. package/esm/vs/platform/telemetry/common/gdprTypings.js.map +1 -1
  388. package/esm/vs/platform/telemetry/common/telemetry.js.map +1 -1
  389. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  390. package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
  391. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  392. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  393. package/esm/vs/platform/theme/common/colors/editorColors.js.map +1 -1
  394. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  395. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  396. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  397. package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
  398. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  399. package/esm/vs/platform/theme/common/colors/miscColors.js.map +1 -1
  400. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  401. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  402. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  403. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  404. package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js +12 -0
  405. package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js.map +1 -0
  406. package/esm/vs/platform/webWorker/browser/webWorkerService.js +7 -0
  407. package/esm/vs/platform/webWorker/browser/webWorkerService.js.map +1 -0
  408. package/esm/vs/{base/browser/webWorkerFactory.js → platform/webWorker/browser/webWorkerServiceImpl.js} +47 -66
  409. package/esm/vs/platform/webWorker/browser/webWorkerServiceImpl.js.map +1 -0
  410. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  411. package/monaco.d.ts +9 -5
  412. package/package.json +2 -2
  413. package/esm/vs/base/browser/webWorkerFactory.js.map +0 -1
  414. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js +0 -82
  415. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js.map +0 -1
@@ -16,7 +16,7 @@ export function createTrustedTypesPolicy(policyName, policyOptions) {
16
16
  }
17
17
  }
18
18
  try {
19
- // eslint-disable-next-line local/code-no-any-casts
19
+ // eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any
20
20
  return globalThis.trustedTypes?.createPolicy(policyName, policyOptions);
21
21
  }
22
22
  catch (err) {
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/browser/trustedTypes.ts","vs/base/browser/trustedTypes.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,UAAU,wBAAwB,CACvC,UAAkB,EAClB,aAAuB;IAGvB,MAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAC;IAEjD,IAAI,iBAAiB,EAAE,wBAAwB,EAAE,CAAC;QACjD,IAAI,CAAC;YACJ,OAAO,iBAAiB,CAAC,wBAAwB,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;QAC9E,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,iBAAiB,CAAC,GAAG,CAAC,CAAC;YACvB,OAAO,SAAS,CAAC;QAClB,CAAC;IACF,CAAC;IACD,IAAI,CAAC;QACJ,mDAAmD;QACnD,OAAQ,UAAkB,CAAC,YAAY,EAAE,YAAY,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAClF,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,iBAAiB,CAAC,GAAG,CAAC,CAAC;QACvB,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC","file":"trustedTypes.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 { onUnexpectedError } from '../common/errors.js';\nimport { getMonacoEnvironment } from './browser.js';\n\ntype TrustedTypePolicyOptions = import('trusted-types/lib/index.d.ts').TrustedTypePolicyOptions;\n\nexport function createTrustedTypesPolicy<Options extends TrustedTypePolicyOptions>(\n\tpolicyName: string,\n\tpolicyOptions?: Options,\n): undefined | Pick<TrustedTypePolicy, 'name' | Extract<keyof Options, keyof TrustedTypePolicyOptions>> {\n\n\tconst monacoEnvironment = getMonacoEnvironment();\n\n\tif (monacoEnvironment?.createTrustedTypesPolicy) {\n\t\ttry {\n\t\t\treturn monacoEnvironment.createTrustedTypesPolicy(policyName, policyOptions);\n\t\t} catch (err) {\n\t\t\tonUnexpectedError(err);\n\t\t\treturn undefined;\n\t\t}\n\t}\n\ttry {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\treturn (globalThis as any).trustedTypes?.createPolicy(policyName, policyOptions);\n\t} catch (err) {\n\t\tonUnexpectedError(err);\n\t\treturn undefined;\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 { onUnexpectedError } from '../common/errors.js';\nimport { getMonacoEnvironment } from './browser.js';\n\ntype TrustedTypePolicyOptions = import('trusted-types/lib/index.d.ts').TrustedTypePolicyOptions;\n\nexport function createTrustedTypesPolicy<Options extends TrustedTypePolicyOptions>(\n\tpolicyName: string,\n\tpolicyOptions?: Options,\n): undefined | Pick<TrustedTypePolicy, 'name' | Extract<keyof Options, keyof TrustedTypePolicyOptions>> {\n\n\tconst monacoEnvironment = getMonacoEnvironment();\n\n\tif (monacoEnvironment?.createTrustedTypesPolicy) {\n\t\ttry {\n\t\t\treturn monacoEnvironment.createTrustedTypesPolicy(policyName, policyOptions);\n\t\t} catch (err) {\n\t\t\tonUnexpectedError(err);\n\t\t\treturn undefined;\n\t\t}\n\t}\n\ttry {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\treturn (globalThis as any).trustedTypes?.createPolicy(policyName, policyOptions);\n\t} catch (err) {\n\t\tonUnexpectedError(err);\n\t\treturn undefined;\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/browser/trustedTypes.ts","vs/base/browser/trustedTypes.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,UAAU,wBAAwB,CACvC,UAAkB,EAClB,aAAuB;IAGvB,MAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAC;IAEjD,IAAI,iBAAiB,EAAE,wBAAwB,EAAE,CAAC;QACjD,IAAI,CAAC;YACJ,OAAO,iBAAiB,CAAC,wBAAwB,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;QAC9E,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,iBAAiB,CAAC,GAAG,CAAC,CAAC;YACvB,OAAO,SAAS,CAAC;QAClB,CAAC;IACF,CAAC;IACD,IAAI,CAAC;QACJ,uFAAuF;QACvF,OAAQ,UAAkB,CAAC,YAAY,EAAE,YAAY,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAClF,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,iBAAiB,CAAC,GAAG,CAAC,CAAC;QACvB,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC","file":"trustedTypes.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 { onUnexpectedError } from '../common/errors.js';\nimport { getMonacoEnvironment } from './browser.js';\n\ntype TrustedTypePolicyOptions = import('trusted-types/lib/index.d.ts').TrustedTypePolicyOptions;\n\nexport function createTrustedTypesPolicy<Options extends TrustedTypePolicyOptions>(\n\tpolicyName: string,\n\tpolicyOptions?: Options,\n): undefined | Pick<TrustedTypePolicy, 'name' | Extract<keyof Options, keyof TrustedTypePolicyOptions>> {\n\n\tconst monacoEnvironment = getMonacoEnvironment();\n\n\tif (monacoEnvironment?.createTrustedTypesPolicy) {\n\t\ttry {\n\t\t\treturn monacoEnvironment.createTrustedTypesPolicy(policyName, policyOptions);\n\t\t} catch (err) {\n\t\t\tonUnexpectedError(err);\n\t\t\treturn undefined;\n\t\t}\n\t}\n\ttry {\n\t\t// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any\n\t\treturn (globalThis as any).trustedTypes?.createPolicy(policyName, policyOptions);\n\t} catch (err) {\n\t\tonUnexpectedError(err);\n\t\treturn undefined;\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 { onUnexpectedError } from '../common/errors.js';\nimport { getMonacoEnvironment } from './browser.js';\n\ntype TrustedTypePolicyOptions = import('trusted-types/lib/index.d.ts').TrustedTypePolicyOptions;\n\nexport function createTrustedTypesPolicy<Options extends TrustedTypePolicyOptions>(\n\tpolicyName: string,\n\tpolicyOptions?: Options,\n): undefined | Pick<TrustedTypePolicy, 'name' | Extract<keyof Options, keyof TrustedTypePolicyOptions>> {\n\n\tconst monacoEnvironment = getMonacoEnvironment();\n\n\tif (monacoEnvironment?.createTrustedTypesPolicy) {\n\t\ttry {\n\t\t\treturn monacoEnvironment.createTrustedTypesPolicy(policyName, policyOptions);\n\t\t} catch (err) {\n\t\t\tonUnexpectedError(err);\n\t\t\treturn undefined;\n\t\t}\n\t}\n\ttry {\n\t\t// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any\n\t\treturn (globalThis as any).trustedTypes?.createPolicy(policyName, policyOptions);\n\t} catch (err) {\n\t\tonUnexpectedError(err);\n\t\treturn undefined;\n\t}\n}\n"]}
@@ -206,6 +206,9 @@ export class ActionBar extends Disposable {
206
206
  getContainer() {
207
207
  return this.domNode;
208
208
  }
209
+ hasAction(action) {
210
+ return this.viewItems.findIndex(candidate => candidate.action.id === action.id) !== -1;
211
+ }
209
212
  getAction(indexOrElement) {
210
213
  // by index
211
214
  if (typeof indexOrElement === 'number') {
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/browser/ui/actionbar/actionbar.ts","vs/base/browser/ui/actionbar/actionbar.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAA0B,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E,OAAO,EAAE,YAAY,EAAqC,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACxG,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO,EAAe,MAAM,8BAA8B,CAAC;AAChH,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAClD,OAAO,iBAAiB,CAAC;AAmDzB,MAAM,OAAO,SAAU,SAAQ,UAAU;IA+BxC,IAAI,SAAS,KAAK,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAGjD,IAAI,WAAW,KAAK,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAIrD,IAAI,QAAQ,KAAK,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAG/C,IAAI,SAAS,KAAK,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAEjD,YAAY,SAAsB,EAAE,UAA6B,EAAE;QAClE,KAAK,EAAE,CAAC;QAtCQ,6BAAwB,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC;QAUjE,wBAAmB,GAAG,IAAI,CAAC,SAAS,CAAC,I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AAC,cAAc,CAAC,QAAQ,CAAC;YAC9H,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC3C,CAAC;IACF,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,MAAe,EAAE,OAAiB;QAC3C,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAEQ,OAAO;QACf,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACzC,IAAI,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,CAAC;QAC7B,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;CACD","file":"actionbar.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 * as DOM from '../../dom.js';\nimport { StandardKeyboardEvent } from '../../keyboardEvent.js';\nimport { ActionViewItem, BaseActionViewItem, IActionViewItemOptions } from './actionViewItems.js';\nimport { createInstantHoverDelegate } from '../hover/hoverDelegateFactory.js';\nimport { IHoverDelegate } from '../hover/hoverDelegate.js';\nimport { ActionRunner, IAction, IActionRunner, IRunEvent, Separator } from '../../../common/actions.js';\nimport { Emitter } from '../../../common/event.js';\nimport { KeyCode, KeyMod } from '../../../common/keyCodes.js';\nimport { Disposable, DisposableMap, DisposableStore, dispose, IDisposable } from '../../../common/lifecycle.js';\nimport * as types from '../../../common/types.js';\nimport './actionbar.css';\n\nexport interface IActionViewItem extends IDisposable {\n\taction: IAction;\n\tactionRunner: IActionRunner;\n\tsetActionContext(context: unknown): void;\n\trender(element: HTMLElement): void;\n\tisEnabled(): boolean;\n\tfocus(fromRight?: boolean): void; // TODO@isidorn what is this?\n\tblur(): void;\n\tshowHover?(): void;\n}\n\nexport interface IActionViewItemProvider {\n\t(action: IAction, options: IActionViewItemOptions): IActionViewItem | undefined;\n}\n\nexport const enum ActionsOrientation {\n\tHORIZONTAL,\n\tVERTICAL,\n}\n\nexport interface ActionTrigger {\n\tkeys?: KeyCode[];\n\tkeyDown: boolean;\n}\n\nexport interface IActionBarOptions {\n\treadonly orientation?: ActionsOrientation;\n\treadonly context?: unknown;\n\treadonly actionViewItemProvider?: IActionViewItemProvider;\n\treadonly actionRunner?: IActionRunner;\n\treadonly ariaLabel?: string;\n\treadonly ariaRole?: string;\n\treadonly triggerKeys?: ActionTrigger;\n\treadonly allowContextMenu?: boolean;\n\treadonly preventLoopNavigation?: boolean;\n\treadonly focusOnlyEnabledItems?: boolean;\n\treadonly hoverDelegate?: IHoverDelegate;\n\t/**\n\t * If true, toggled primary items are highlighted with a background color.\n\t * Some action bars exclusively use icon states, we don't want to enable this for them.\n\t * Thus, this is opt-in.\n\t */\n\treadonly highlightToggledItems?: boolean;\n}\n\nexport interface IActionOptions extends IActionViewItemOptions {\n\tindex?: number;\n}\n\nexport class ActionBar extends Disposable implements IActionRunner {\n\n\tprivate readonly options: IActionBarOptions;\n\tprivate readonly _hoverDelegate: IHoverDelegate;\n\n\tprivate _actionRunner: IActionRunner;\n\tprivate readonly _actionRunnerDisposables = this._register(new DisposableStore());\n\tprivate _context: unknown;\n\tprivate readonly _orientation: ActionsOrientation;\n\tprivate readonly _triggerKeys: {\n\t\tkeys: KeyCode[];\n\t\tkeyDown: boolean;\n\t};\n\n\t// View Items\n\tviewItems: IActionViewItem[];\n\tprivate readonly viewItemDisposables = this._register(new DisposableMap<IActionViewItem>());\n\tprivate previouslyFocusedItem?: number;\n\tprotected focusedItem?: number;\n\tprivate focusTracker: DOM.IFocusTracker;\n\n\t// Trigger Key Tracking\n\tprivate triggerKeyDown: boolean = false;\n\n\tprivate focusable: boolean = true;\n\n\t// Elements\n\tdomNode: HTMLElement;\n\tprotected readonly actionsList: HTMLElement;\n\n\tprivate readonly _onDidBlur = this._register(new Emitter<void>());\n\tget onDidBlur() { return this._onDidBlur.event; }\n\n\tprivate readonly _onDidCancel = this._register(new Emitter<void>({ onWillAddFirstListener: () => this.cancelHasListener = true }));\n\tget onDidCancel() { return this._onDidCancel.event; }\n\tprivate cancelHasListener = false;\n\n\tprivate readonly _onDidRun = this._register(new Emitter<IRunEvent>());\n\tget onDidRun() { return this._onDidRun.event; }\n\n\tprivate readonly _onWillRun = this._register(new Emitter<IRunEvent>());\n\tget onWillRun() { return this._onWillRun.event; }\n\n\tconstructor(container: HTMLElement, options: IActionBarOptions = {}) {\n\t\tsuper();\n\n\t\tthis.options = options;\n\t\tthis._context = options.context ?? null;\n\t\tthis._orientation = this.options.orientation ?? ActionsOrientation.HORIZONTAL;\n\t\tthis._triggerKeys = {\n\t\t\tkeyDown: this.options.triggerKeys?.keyDown ?? false,\n\t\t\tkeys: this.options.triggerKeys?.keys ?? [KeyCode.Enter, KeyCode.Space]\n\t\t};\n\n\t\tthis._hoverDelegate = options.hoverDelegate ?? this._register(createInstantHoverDelegate());\n\n\t\tif (this.options.actionRunner) {\n\t\t\tthis._actionRunner = this.options.actionRunner;\n\t\t} else {\n\t\t\tthis._actionRunner = new ActionRunner();\n\t\t\tthis._actionRunnerDisposables.add(this._actionRunner);\n\t\t}\n\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onDidRun(e => this._onDidRun.fire(e)));\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onWillRun(e => this._onWillRun.fire(e)));\n\n\t\tthis.viewItems = [];\n\t\tthis.focusedItem = undefined;\n\n\t\tthis.domNode = document.createElement('div');\n\t\tthis.domNode.className = 'monaco-action-bar';\n\n\t\tlet previousKeys: KeyCode[];\n\t\tlet nextKeys: KeyCode[];\n\n\t\tswitch (this._orientation) {\n\t\t\tcase ActionsOrientation.HORIZONTAL:\n\t\t\t\tpreviousKeys = [KeyCode.LeftArrow];\n\t\t\t\tnextKeys = [KeyCode.RightArrow];\n\t\t\t\tbreak;\n\t\t\tcase ActionsOrientation.VERTICAL:\n\t\t\t\tpreviousKeys = [KeyCode.UpArrow];\n\t\t\t\tnextKeys = [KeyCode.DownArrow];\n\t\t\t\tthis.domNode.className += ' vertical';\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis._register(DOM.addDisposableListener(this.domNode, DOM.EventType.KEY_DOWN, e => {\n\t\t\tconst event = new StandardKeyboardEvent(e);\n\t\t\tlet eventHandled = true;\n\t\t\tconst focusedItem = typeof this.focusedItem === 'number' ? this.viewItems[this.focusedItem] : undefined;\n\n\t\t\tif (previousKeys && (event.equals(previousKeys[0]) || event.equals(previousKeys[1]))) {\n\t\t\t\teventHandled = this.focusPrevious();\n\t\t\t} else if (nextKeys && (event.equals(nextKeys[0]) || event.equals(nextKeys[1]))) {\n\t\t\t\teventHandled = this.focusNext();\n\t\t\t} else if (event.equals(KeyCode.Escape) && this.cancelHasListener) {\n\t\t\t\tthis._onDidCancel.fire();\n\t\t\t} else if (event.equals(KeyCode.Home)) {\n\t\t\t\teventHandled = this.focusFirst();\n\t\t\t} else if (event.equals(KeyCode.End)) {\n\t\t\t\teventHandled = this.focusLast();\n\t\t\t} else if (event.equals(KeyCode.Tab) && focusedItem instanceof BaseActionViewItem && focusedItem.trapsArrowNavigation) {\n\t\t\t\t// Tab, so forcibly focus next #219199\n\t\t\t\teventHandled = this.focusNext(undefined, true);\n\t\t\t} else if (this.isTriggerKeyEvent(event)) {\n\t\t\t\t// Staying out of the else branch even if not triggered\n\t\t\t\tif (this._triggerKeys.keyDown) {\n\t\t\t\t\tthis.doTrigger(event);\n\t\t\t\t} else {\n\t\t\t\t\tthis.triggerKeyDown = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\teventHandled = false;\n\t\t\t}\n\n\t\t\tif (eventHandled) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(DOM.addDisposableListener(this.domNode, DOM.EventType.KEY_UP, e => {\n\t\t\tconst event = new StandardKeyboardEvent(e);\n\n\t\t\t// Run action on Enter/Space\n\t\t\tif (this.isTriggerKeyEvent(event)) {\n\t\t\t\tif (!this._triggerKeys.keyDown && this.triggerKeyDown) {\n\t\t\t\t\tthis.triggerKeyDown = false;\n\t\t\t\t\tthis.doTrigger(event);\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\n\t\t\t// Recompute focused item\n\t\t\telse if (event.equals(KeyCode.Tab) || event.equals(KeyMod.Shift | KeyCode.Tab) || event.equals(KeyCode.UpArrow) || event.equals(KeyCode.DownArrow) || event.equals(KeyCode.LeftArrow) || event.equals(KeyCode.RightArrow)) {\n\t\t\t\tthis.updateFocusedItem();\n\t\t\t}\n\t\t}));\n\n\t\tthis.focusTracker = this._register(DOM.trackFocus(this.domNode));\n\t\tthis._register(this.focusTracker.onDidBlur(() => {\n\t\t\tif (DOM.getActiveElement() === this.domNode || !DOM.isAncestor(DOM.getActiveElement(), this.domNode)) {\n\t\t\t\tthis._onDidBlur.fire();\n\t\t\t\tthis.previouslyFocusedItem = this.focusedItem;\n\t\t\t\tthis.focusedItem = undefined;\n\t\t\t\tthis.triggerKeyDown = false;\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(this.focusTracker.onDidFocus(() => this.updateFocusedItem()));\n\n\t\tthis.actionsList = document.createElement('ul');\n\t\tthis.actionsList.className = 'actions-container';\n\t\tif (this.options.highlightToggledItems) {\n\t\t\tthis.actionsList.classList.add('highlight-toggled');\n\t\t}\n\t\tthis.actionsList.setAttribute('role', this.options.ariaRole || 'toolbar');\n\n\t\tif (this.options.ariaLabel) {\n\t\t\tthis.actionsList.setAttribute('aria-label', this.options.ariaLabel);\n\t\t}\n\n\t\tthis.domNode.appendChild(this.actionsList);\n\n\t\tcontainer.appendChild(this.domNode);\n\t}\n\n\tprivate refreshRole(): void {\n\t\tif (this.length() >= 1) {\n\t\t\tthis.actionsList.setAttribute('role', this.options.ariaRole || 'toolbar');\n\t\t} else {\n\t\t\tthis.actionsList.setAttribute('role', 'presentation');\n\t\t}\n\t}\n\n\t// Some action bars should not be focusable at times\n\t// When an action bar is not focusable make sure to make all the elements inside it not focusable\n\t// When an action bar is focusable again, make sure the first item can be focused\n\tsetFocusable(focusable: boolean): void {\n\t\tthis.focusable = focusable;\n\t\tif (this.focusable) {\n\t\t\tconst firstEnabled = this.viewItems.find(vi => vi instanceof BaseActionViewItem && vi.isEnabled());\n\t\t\tif (firstEnabled instanceof BaseActionViewItem) {\n\t\t\t\tfirstEnabled.setFocusable(true);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.viewItems.forEach(vi => {\n\t\t\t\tif (vi instanceof BaseActionViewItem) {\n\t\t\t\t\tvi.setFocusable(false);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate isTriggerKeyEvent(event: StandardKeyboardEvent): boolean {\n\t\tlet ret = false;\n\t\tthis._triggerKeys.keys.forEach(keyCode => {\n\t\t\tret = ret || event.equals(keyCode);\n\t\t});\n\n\t\treturn ret;\n\t}\n\n\tprivate updateFocusedItem(): void {\n\t\tfor (let i = 0; i < this.actionsList.children.length; i++) {\n\t\t\tconst elem = this.actionsList.children[i];\n\t\t\tif (DOM.isAncestor(DOM.getActiveElement(), elem)) {\n\t\t\t\tthis.focusedItem = i;\n\t\t\t\tthis.viewItems[this.focusedItem]?.showHover?.();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tget context(): unknown {\n\t\treturn this._context;\n\t}\n\n\tset context(context: unknown) {\n\t\tthis._context = context;\n\t\tthis.viewItems.forEach(i => i.setActionContext(context));\n\t}\n\n\tget actionRunner(): IActionRunner {\n\t\treturn this._actionRunner;\n\t}\n\n\tset actionRunner(actionRunner: IActionRunner) {\n\t\tthis._actionRunner = actionRunner;\n\n\t\t// when setting a new `IActionRunner` make sure to dispose old listeners and\n\t\t// start to forward events from the new listener\n\t\tthis._actionRunnerDisposables.clear();\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onDidRun(e => this._onDidRun.fire(e)));\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onWillRun(e => this._onWillRun.fire(e)));\n\t\tthis.viewItems.forEach(item => item.actionRunner = actionRunner);\n\t}\n\n\tgetContainer(): HTMLElement {\n\t\treturn this.domNode;\n\t}\n\n\tgetAction(indexOrElement: number | HTMLElement): IAction | undefined {\n\n\t\t// by index\n\t\tif (typeof indexOrElement === 'number') {\n\t\t\treturn this.viewItems[indexOrElement]?.action;\n\t\t}\n\n\t\t// by element\n\t\tif (DOM.isHTMLElement(indexOrElement)) {\n\t\t\twhile (indexOrElement.parentElement !== this.actionsList) {\n\t\t\t\tif (!indexOrElement.parentElement) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\tindexOrElement = indexOrElement.parentElement;\n\t\t\t}\n\t\t\tfor (let i = 0; i < this.actionsList.childNodes.length; i++) {\n\t\t\t\tif (this.actionsList.childNodes[i] === indexOrElement) {\n\t\t\t\t\treturn this.viewItems[i].action;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tpush(arg: IAction | ReadonlyArray<IAction>, options: IActionOptions = {}): void {\n\t\tconst actions: ReadonlyArray<IAction> = Array.isArray(arg) ? arg : [arg];\n\n\t\tlet index = types.isNumber(options.index) ? options.index : null;\n\n\t\tactions.forEach((action: IAction) => {\n\t\t\tconst actionViewItemElement = document.createElement('li');\n\t\t\tactionViewItemElement.className = 'action-item';\n\t\t\tactionViewItemElement.setAttribute('role', 'presentation');\n\n\t\t\tlet item: IActionViewItem | undefined;\n\n\t\t\tconst viewItemOptions: IActionViewItemOptions = { hoverDelegate: this._hoverDelegate, ...options, isTabList: this.options.ariaRole === 'tablist' };\n\t\t\tif (this.options.actionViewItemProvider) {\n\t\t\t\titem = this.options.actionViewItemProvider(action, viewItemOptions);\n\t\t\t}\n\n\t\t\tif (!item) {\n\t\t\t\titem = new ActionViewItem(this.context, action, viewItemOptions);\n\t\t\t}\n\n\t\t\t// Prevent native context menu on actions\n\t\t\tif (!this.options.allowContextMenu) {\n\t\t\t\tthis.viewItemDisposables.set(item, DOM.addDisposableListener(actionViewItemElement, DOM.EventType.CONTEXT_MENU, (e: DOM.EventLike) => {\n\t\t\t\t\tDOM.EventHelper.stop(e, true);\n\t\t\t\t}));\n\t\t\t}\n\n\t\t\titem.actionRunner = this._actionRunner;\n\t\t\titem.setActionContext(this.context);\n\t\t\titem.render(actionViewItemElement);\n\n\t\t\tif (index === null || index < 0 || index >= this.actionsList.children.length) {\n\t\t\t\tthis.actionsList.appendChild(actionViewItemElement);\n\t\t\t\tthis.viewItems.push(item);\n\t\t\t} else {\n\t\t\t\tthis.actionsList.insertBefore(actionViewItemElement, this.actionsList.children[index]);\n\t\t\t\tthis.viewItems.splice(index, 0, item);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t});\n\n\t\t// We need to allow for the first enabled item to be focused on using tab navigation #106441\n\t\tif (this.focusable) {\n\t\t\tlet didFocus = false;\n\t\t\tfor (const item of this.viewItems) {\n\t\t\t\tif (!(item instanceof BaseActionViewItem)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tlet focus: boolean;\n\t\t\t\tif (didFocus) {\n\t\t\t\t\tfocus = false; // already focused an item\n\t\t\t\t} else if (item.action.id === Separator.ID) {\n\t\t\t\t\tfocus = false; // never focus a separator\n\t\t\t\t} else if (!item.isEnabled() && this.options.focusOnlyEnabledItems) {\n\t\t\t\t\tfocus = false; // never focus a disabled item\n\t\t\t\t} else {\n\t\t\t\t\tfocus = true;\n\t\t\t\t}\n\n\t\t\t\tif (focus) {\n\t\t\t\t\titem.setFocusable(true);\n\t\t\t\t\tdidFocus = true;\n\t\t\t\t} else {\n\t\t\t\t\titem.setFocusable(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof this.focusedItem === 'number') {\n\t\t\t// After a clear actions might be re-added to simply toggle some actions. We should preserve focus #97128\n\t\t\tthis.focus(this.focusedItem);\n\t\t}\n\t\tthis.refreshRole();\n\t}\n\n\tgetWidth(index: number): number {\n\t\tif (index >= 0 && index < this.actionsList.children.length) {\n\t\t\tconst item = this.actionsList.children.item(index);\n\t\t\tif (item) {\n\t\t\t\treturn item.clientWidth;\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\tpull(index: number): void {\n\t\tif (index >= 0 && index < this.viewItems.length) {\n\t\t\tthis.actionsList.childNodes[index].remove();\n\t\t\tthis.viewItemDisposables.deleteAndDispose(this.viewItems[index]);\n\t\t\tdispose(this.viewItems.splice(index, 1));\n\t\t\tthis.refreshRole();\n\t\t}\n\t}\n\n\tclear(): void {\n\t\tif (this.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.viewItems = dispose(this.viewItems);\n\t\tthis.viewItemDisposables.clearAndDisposeAll();\n\t\tDOM.clearNode(this.actionsList);\n\t\tthis.refreshRole();\n\t}\n\n\tlength(): number {\n\t\treturn this.viewItems.length;\n\t}\n\n\tisEmpty(): boolean {\n\t\treturn this.viewItems.length === 0;\n\t}\n\n\tfocus(index?: number): void;\n\tfocus(selectFirst?: boolean): void;\n\tfocus(arg?: number | boolean): void {\n\t\tlet selectFirst: boolean = false;\n\t\tlet index: number | undefined = undefined;\n\t\tif (arg === undefined) {\n\t\t\tselectFirst = true;\n\t\t} else if (typeof arg === 'number') {\n\t\t\tindex = arg;\n\t\t} else if (typeof arg === 'boolean') {\n\t\t\tselectFirst = arg;\n\t\t}\n\n\t\tif (selectFirst && typeof this.focusedItem === 'undefined') {\n\t\t\tconst firstEnabled = this.viewItems.findIndex(item => item.isEnabled());\n\t\t\t// Focus the first enabled item\n\t\t\tthis.focusedItem = firstEnabled === -1 ? undefined : firstEnabled;\n\t\t\tthis.updateFocus(undefined, undefined, true);\n\t\t} else {\n\t\t\tif (index !== undefined) {\n\t\t\t\tthis.focusedItem = index;\n\t\t\t}\n\n\t\t\tthis.updateFocus(undefined, undefined, true);\n\t\t}\n\t}\n\n\tprivate focusFirst(): boolean {\n\t\tthis.focusedItem = this.length() - 1;\n\t\treturn this.focusNext(true);\n\t}\n\n\tprivate focusLast(): boolean {\n\t\tthis.focusedItem = 0;\n\t\treturn this.focusPrevious(true);\n\t}\n\n\tprotected focusNext(forceLoop?: boolean, forceFocus?: boolean): boolean {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\tthis.focusedItem = this.viewItems.length - 1;\n\t\t} else if (this.viewItems.length <= 1) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst startIndex = this.focusedItem;\n\t\tlet item: IActionViewItem;\n\t\tdo {\n\n\t\t\tif (!forceLoop && this.options.preventLoopNavigation && this.focusedItem + 1 >= this.viewItems.length) {\n\t\t\t\tthis.focusedItem = startIndex;\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis.focusedItem = (this.focusedItem + 1) % this.viewItems.length;\n\t\t\titem = this.viewItems[this.focusedItem];\n\t\t} while (this.focusedItem !== startIndex && ((this.options.focusOnlyEnabledItems && !item.isEnabled()) || item.action.id === Separator.ID));\n\n\t\tthis.updateFocus(undefined, undefined, forceFocus);\n\t\treturn true;\n\t}\n\n\tprotected focusPrevious(forceLoop?: boolean): boolean {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\tthis.focusedItem = 0;\n\t\t} else if (this.viewItems.length <= 1) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst startIndex = this.focusedItem;\n\t\tlet item: IActionViewItem;\n\n\t\tdo {\n\t\t\tthis.focusedItem = this.focusedItem - 1;\n\t\t\tif (this.focusedItem < 0) {\n\t\t\t\tif (!forceLoop && this.options.preventLoopNavigation) {\n\t\t\t\t\tthis.focusedItem = startIndex;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tthis.focusedItem = this.viewItems.length - 1;\n\t\t\t}\n\t\t\titem = this.viewItems[this.focusedItem];\n\t\t} while (this.focusedItem !== startIndex && ((this.options.focusOnlyEnabledItems && !item.isEnabled()) || item.action.id === Separator.ID));\n\n\n\t\tthis.updateFocus(true);\n\t\treturn true;\n\t}\n\n\tprotected updateFocus(fromRight?: boolean, preventScroll?: boolean, forceFocus: boolean = false): void {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\tthis.actionsList.focus({ preventScroll });\n\t\t}\n\n\t\tif (this.previouslyFocusedItem !== undefined && this.previouslyFocusedItem !== this.focusedItem) {\n\t\t\tthis.viewItems[this.previouslyFocusedItem]?.blur();\n\t\t}\n\t\tconst actionViewItem = this.focusedItem !== undefined ? this.viewItems[this.focusedItem] : undefined;\n\t\tif (actionViewItem) {\n\t\t\tlet focusItem = true;\n\n\t\t\tif (!types.isFunction(actionViewItem.focus)) {\n\t\t\t\tfocusItem = false;\n\t\t\t}\n\n\t\t\tif (this.options.focusOnlyEnabledItems && types.isFunction(actionViewItem.isEnabled) && !actionViewItem.isEnabled()) {\n\t\t\t\tfocusItem = false;\n\t\t\t}\n\n\t\t\tif (actionViewItem.action.id === Separator.ID) {\n\t\t\t\tfocusItem = false;\n\t\t\t}\n\t\t\tif (!focusItem) {\n\t\t\t\tthis.actionsList.focus({ preventScroll });\n\t\t\t\tthis.previouslyFocusedItem = undefined;\n\t\t\t} else if (forceFocus || this.previouslyFocusedItem !== this.focusedItem) {\n\t\t\t\tactionViewItem.focus(fromRight);\n\t\t\t\tthis.previouslyFocusedItem = this.focusedItem;\n\t\t\t}\n\t\t\tif (focusItem) {\n\t\t\t\tactionViewItem.showHover?.();\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate doTrigger(event: StandardKeyboardEvent): void {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\treturn; //nothing to focus\n\t\t}\n\n\t\t// trigger action\n\t\tconst actionViewItem = this.viewItems[this.focusedItem];\n\t\tif (actionViewItem instanceof BaseActionViewItem) {\n\t\t\tconst context = (actionViewItem._context === null || actionViewItem._context === undefined) ? event : actionViewItem._context;\n\t\t\tthis.run(actionViewItem._action, context);\n\t\t}\n\t}\n\n\tasync run(action: IAction, context?: unknown): Promise<void> {\n\t\tawait this._actionRunner.run(action, context);\n\t}\n\n\toverride dispose(): void {\n\t\tthis._context = undefined;\n\t\tthis.viewItems = dispose(this.viewItems);\n\t\tthis.getContainer().remove();\n\t\tsuper.dispose();\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 * as DOM from '../../dom.js';\nimport { StandardKeyboardEvent } from '../../keyboardEvent.js';\nimport { ActionViewItem, BaseActionViewItem, IActionViewItemOptions } from './actionViewItems.js';\nimport { createInstantHoverDelegate } from '../hover/hoverDelegateFactory.js';\nimport { IHoverDelegate } from '../hover/hoverDelegate.js';\nimport { ActionRunner, IAction, IActionRunner, IRunEvent, Separator } from '../../../common/actions.js';\nimport { Emitter } from '../../../common/event.js';\nimport { KeyCode, KeyMod } from '../../../common/keyCodes.js';\nimport { Disposable, DisposableMap, DisposableStore, dispose, IDisposable } from '../../../common/lifecycle.js';\nimport * as types from '../../../common/types.js';\nimport './actionbar.css';\n\nexport interface IActionViewItem extends IDisposable {\n\taction: IAction;\n\tactionRunner: IActionRunner;\n\tsetActionContext(context: unknown): void;\n\trender(element: HTMLElement): void;\n\tisEnabled(): boolean;\n\tfocus(fromRight?: boolean): void; // TODO@isidorn what is this?\n\tblur(): void;\n\tshowHover?(): void;\n}\n\nexport interface IActionViewItemProvider {\n\t(action: IAction, options: IActionViewItemOptions): IActionViewItem | undefined;\n}\n\nexport const enum ActionsOrientation {\n\tHORIZONTAL,\n\tVERTICAL,\n}\n\nexport interface ActionTrigger {\n\tkeys?: KeyCode[];\n\tkeyDown: boolean;\n}\n\nexport interface IActionBarOptions {\n\treadonly orientation?: ActionsOrientation;\n\treadonly context?: unknown;\n\treadonly actionViewItemProvider?: IActionViewItemProvider;\n\treadonly actionRunner?: IActionRunner;\n\treadonly ariaLabel?: string;\n\treadonly ariaRole?: string;\n\treadonly triggerKeys?: ActionTrigger;\n\treadonly allowContextMenu?: boolean;\n\treadonly preventLoopNavigation?: boolean;\n\treadonly focusOnlyEnabledItems?: boolean;\n\treadonly hoverDelegate?: IHoverDelegate;\n\t/**\n\t * If true, toggled primary items are highlighted with a background color.\n\t * Some action bars exclusively use icon states, we don't want to enable this for them.\n\t * Thus, this is opt-in.\n\t */\n\treadonly highlightToggledItems?: boolean;\n}\n\nexport interface IActionOptions extends IActionViewItemOptions {\n\tindex?: number;\n}\n\nexport class ActionBar extends Disposable implements IActionRunner {\n\n\tprivate readonly options: IActionBarOptions;\n\tprivate readonly _hoverDelegate: IHoverDelegate;\n\n\tprivate _actionRunner: IActionRunner;\n\tprivate readonly _actionRunnerDisposables = this._register(new DisposableStore());\n\tprivate _context: unknown;\n\tprivate readonly _orientation: ActionsOrientation;\n\tprivate readonly _triggerKeys: {\n\t\tkeys: KeyCode[];\n\t\tkeyDown: boolean;\n\t};\n\n\t// View Items\n\tviewItems: IActionViewItem[];\n\tprivate readonly viewItemDisposables = this._register(new DisposableMap<IActionViewItem>());\n\tprivate previouslyFocusedItem?: number;\n\tprotected focusedItem?: number;\n\tprivate focusTracker: DOM.IFocusTracker;\n\n\t// Trigger Key Tracking\n\tprivate triggerKeyDown: boolean = false;\n\n\tprivate focusable: boolean = true;\n\n\t// Elements\n\tdomNode: HTMLElement;\n\tprotected readonly actionsList: HTMLElement;\n\n\tprivate readonly _onDidBlur = this._register(new Emitter<void>());\n\tget onDidBlur() { return this._onDidBlur.event; }\n\n\tprivate readonly _onDidCancel = this._register(new Emitter<void>({ onWillAddFirstListener: () => this.cancelHasListener = true }));\n\tget onDidCancel() { return this._onDidCancel.event; }\n\tprivate cancelHasListener = false;\n\n\tprivate readonly _onDidRun = this._register(new Emitter<IRunEvent>());\n\tget onDidRun() { return this._onDidRun.event; }\n\n\tprivate readonly _onWillRun = this._register(new Emitter<IRunEvent>());\n\tget onWillRun() { return this._onWillRun.event; }\n\n\tconstructor(container: HTMLElement, options: IActionBarOptions = {}) {\n\t\tsuper();\n\n\t\tthis.options = options;\n\t\tthis._context = options.context ?? null;\n\t\tthis._orientation = this.options.orientation ?? ActionsOrientation.HORIZONTAL;\n\t\tthis._triggerKeys = {\n\t\t\tkeyDown: this.options.triggerKeys?.keyDown ?? false,\n\t\t\tkeys: this.options.triggerKeys?.keys ?? [KeyCode.Enter, KeyCode.Space]\n\t\t};\n\n\t\tthis._hoverDelegate = options.hoverDelegate ?? this._register(createInstantHoverDelegate());\n\n\t\tif (this.options.actionRunner) {\n\t\t\tthis._actionRunner = this.options.actionRunner;\n\t\t} else {\n\t\t\tthis._actionRunner = new ActionRunner();\n\t\t\tthis._actionRunnerDisposables.add(this._actionRunner);\n\t\t}\n\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onDidRun(e => this._onDidRun.fire(e)));\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onWillRun(e => this._onWillRun.fire(e)));\n\n\t\tthis.viewItems = [];\n\t\tthis.focusedItem = undefined;\n\n\t\tthis.domNode = document.createElement('div');\n\t\tthis.domNode.className = 'monaco-action-bar';\n\n\t\tlet previousKeys: KeyCode[];\n\t\tlet nextKeys: KeyCode[];\n\n\t\tswitch (this._orientation) {\n\t\t\tcase ActionsOrientation.HORIZONTAL:\n\t\t\t\tpreviousKeys = [KeyCode.LeftArrow];\n\t\t\t\tnextKeys = [KeyCode.RightArrow];\n\t\t\t\tbreak;\n\t\t\tcase ActionsOrientation.VERTICAL:\n\t\t\t\tpreviousKeys = [KeyCode.UpArrow];\n\t\t\t\tnextKeys = [KeyCode.DownArrow];\n\t\t\t\tthis.domNode.className += ' vertical';\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis._register(DOM.addDisposableListener(this.domNode, DOM.EventType.KEY_DOWN, e => {\n\t\t\tconst event = new StandardKeyboardEvent(e);\n\t\t\tlet eventHandled = true;\n\t\t\tconst focusedItem = typeof this.focusedItem === 'number' ? this.viewItems[this.focusedItem] : undefined;\n\n\t\t\tif (previousKeys && (event.equals(previousKeys[0]) || event.equals(previousKeys[1]))) {\n\t\t\t\teventHandled = this.focusPrevious();\n\t\t\t} else if (nextKeys && (event.equals(nextKeys[0]) || event.equals(nextKeys[1]))) {\n\t\t\t\teventHandled = this.focusNext();\n\t\t\t} else if (event.equals(KeyCode.Escape) && this.cancelHasListener) {\n\t\t\t\tthis._onDidCancel.fire();\n\t\t\t} else if (event.equals(KeyCode.Home)) {\n\t\t\t\teventHandled = this.focusFirst();\n\t\t\t} else if (event.equals(KeyCode.End)) {\n\t\t\t\teventHandled = this.focusLast();\n\t\t\t} else if (event.equals(KeyCode.Tab) && focusedItem instanceof BaseActionViewItem && focusedItem.trapsArrowNavigation) {\n\t\t\t\t// Tab, so forcibly focus next #219199\n\t\t\t\teventHandled = this.focusNext(undefined, true);\n\t\t\t} else if (this.isTriggerKeyEvent(event)) {\n\t\t\t\t// Staying out of the else branch even if not triggered\n\t\t\t\tif (this._triggerKeys.keyDown) {\n\t\t\t\t\tthis.doTrigger(event);\n\t\t\t\t} else {\n\t\t\t\t\tthis.triggerKeyDown = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\teventHandled = false;\n\t\t\t}\n\n\t\t\tif (eventHandled) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(DOM.addDisposableListener(this.domNode, DOM.EventType.KEY_UP, e => {\n\t\t\tconst event = new StandardKeyboardEvent(e);\n\n\t\t\t// Run action on Enter/Space\n\t\t\tif (this.isTriggerKeyEvent(event)) {\n\t\t\t\tif (!this._triggerKeys.keyDown && this.triggerKeyDown) {\n\t\t\t\t\tthis.triggerKeyDown = false;\n\t\t\t\t\tthis.doTrigger(event);\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\n\t\t\t// Recompute focused item\n\t\t\telse if (event.equals(KeyCode.Tab) || event.equals(KeyMod.Shift | KeyCode.Tab) || event.equals(KeyCode.UpArrow) || event.equals(KeyCode.DownArrow) || event.equals(KeyCode.LeftArrow) || event.equals(KeyCode.RightArrow)) {\n\t\t\t\tthis.updateFocusedItem();\n\t\t\t}\n\t\t}));\n\n\t\tthis.focusTracker = this._register(DOM.trackFocus(this.domNode));\n\t\tthis._register(this.focusTracker.onDidBlur(() => {\n\t\t\tif (DOM.getActiveElement() === this.domNode || !DOM.isAncestor(DOM.getActiveElement(), this.domNode)) {\n\t\t\t\tthis._onDidBlur.fire();\n\t\t\t\tthis.previouslyFocusedItem = this.focusedItem;\n\t\t\t\tthis.focusedItem = undefined;\n\t\t\t\tthis.triggerKeyDown = false;\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(this.focusTracker.onDidFocus(() => this.updateFocusedItem()));\n\n\t\tthis.actionsList = document.createElement('ul');\n\t\tthis.actionsList.className = 'actions-container';\n\t\tif (this.options.highlightToggledItems) {\n\t\t\tthis.actionsList.classList.add('highlight-toggled');\n\t\t}\n\t\tthis.actionsList.setAttribute('role', this.options.ariaRole || 'toolbar');\n\n\t\tif (this.options.ariaLabel) {\n\t\t\tthis.actionsList.setAttribute('aria-label', this.options.ariaLabel);\n\t\t}\n\n\t\tthis.domNode.appendChild(this.actionsList);\n\n\t\tcontainer.appendChild(this.domNode);\n\t}\n\n\tprivate refreshRole(): void {\n\t\tif (this.length() >= 1) {\n\t\t\tthis.actionsList.setAttribute('role', this.options.ariaRole || 'toolbar');\n\t\t} else {\n\t\t\tthis.actionsList.setAttribute('role', 'presentation');\n\t\t}\n\t}\n\n\t// Some action bars should not be focusable at times\n\t// When an action bar is not focusable make sure to make all the elements inside it not focusable\n\t// When an action bar is focusable again, make sure the first item can be focused\n\tsetFocusable(focusable: boolean): void {\n\t\tthis.focusable = focusable;\n\t\tif (this.focusable) {\n\t\t\tconst firstEnabled = this.viewItems.find(vi => vi instanceof BaseActionViewItem && vi.isEnabled());\n\t\t\tif (firstEnabled instanceof BaseActionViewItem) {\n\t\t\t\tfirstEnabled.setFocusable(true);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.viewItems.forEach(vi => {\n\t\t\t\tif (vi instanceof BaseActionViewItem) {\n\t\t\t\t\tvi.setFocusable(false);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate isTriggerKeyEvent(event: StandardKeyboardEvent): boolean {\n\t\tlet ret = false;\n\t\tthis._triggerKeys.keys.forEach(keyCode => {\n\t\t\tret = ret || event.equals(keyCode);\n\t\t});\n\n\t\treturn ret;\n\t}\n\n\tprivate updateFocusedItem(): void {\n\t\tfor (let i = 0; i < this.actionsList.children.length; i++) {\n\t\t\tconst elem = this.actionsList.children[i];\n\t\t\tif (DOM.isAncestor(DOM.getActiveElement(), elem)) {\n\t\t\t\tthis.focusedItem = i;\n\t\t\t\tthis.viewItems[this.focusedItem]?.showHover?.();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tget context(): unknown {\n\t\treturn this._context;\n\t}\n\n\tset context(context: unknown) {\n\t\tthis._context = context;\n\t\tthis.viewItems.forEach(i => i.setActionContext(context));\n\t}\n\n\tget actionRunner(): IActionRunner {\n\t\treturn this._actionRunner;\n\t}\n\n\tset actionRunner(actionRunner: IActionRunner) {\n\t\tthis._actionRunner = actionRunner;\n\n\t\t// when setting a new `IActionRunner` make sure to dispose old listeners and\n\t\t// start to forward events from the new listener\n\t\tthis._actionRunnerDisposables.clear();\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onDidRun(e => this._onDidRun.fire(e)));\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onWillRun(e => this._onWillRun.fire(e)));\n\t\tthis.viewItems.forEach(item => item.actionRunner = actionRunner);\n\t}\n\n\tgetContainer(): HTMLElement {\n\t\treturn this.domNode;\n\t}\n\n\tgetAction(indexOrElement: number | HTMLElement): IAction | undefined {\n\n\t\t// by index\n\t\tif (typeof indexOrElement === 'number') {\n\t\t\treturn this.viewItems[indexOrElement]?.action;\n\t\t}\n\n\t\t// by element\n\t\tif (DOM.isHTMLElement(indexOrElement)) {\n\t\t\twhile (indexOrElement.parentElement !== this.actionsList) {\n\t\t\t\tif (!indexOrElement.parentElement) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\tindexOrElement = indexOrElement.parentElement;\n\t\t\t}\n\t\t\tfor (let i = 0; i < this.actionsList.childNodes.length; i++) {\n\t\t\t\tif (this.actionsList.childNodes[i] === indexOrElement) {\n\t\t\t\t\treturn this.viewItems[i].action;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tpush(arg: IAction | ReadonlyArray<IAction>, options: IActionOptions = {}): void {\n\t\tconst actions: ReadonlyArray<IAction> = Array.isArray(arg) ? arg : [arg];\n\n\t\tlet index = types.isNumber(options.index) ? options.index : null;\n\n\t\tactions.forEach((action: IAction) => {\n\t\t\tconst actionViewItemElement = document.createElement('li');\n\t\t\tactionViewItemElement.className = 'action-item';\n\t\t\tactionViewItemElement.setAttribute('role', 'presentation');\n\n\t\t\tlet item: IActionViewItem | undefined;\n\n\t\t\tconst viewItemOptions: IActionViewItemOptions = { hoverDelegate: this._hoverDelegate, ...options, isTabList: this.options.ariaRole === 'tablist' };\n\t\t\tif (this.options.actionViewItemProvider) {\n\t\t\t\titem = this.options.actionViewItemProvider(action, viewItemOptions);\n\t\t\t}\n\n\t\t\tif (!item) {\n\t\t\t\titem = new ActionViewItem(this.context, action, viewItemOptions);\n\t\t\t}\n\n\t\t\t// Prevent native context menu on actions\n\t\t\tif (!this.options.allowContextMenu) {\n\t\t\t\tthis.viewItemDisposables.set(item, DOM.addDisposableListener(actionViewItemElement, DOM.EventType.CONTEXT_MENU, (e: DOM.EventLike) => {\n\t\t\t\t\tDOM.EventHelper.stop(e, true);\n\t\t\t\t}));\n\t\t\t}\n\n\t\t\titem.actionRunner = this._actionRunner;\n\t\t\titem.setActionContext(this.context);\n\t\t\titem.render(actionViewItemElement);\n\n\t\t\tif (index === null || index < 0 || index >= this.actionsList.children.length) {\n\t\t\t\tthis.actionsList.appendChild(actionViewItemElement);\n\t\t\t\tthis.viewItems.push(item);\n\t\t\t} else {\n\t\t\t\tthis.actionsList.insertBefore(actionViewItemElement, this.actionsList.children[index]);\n\t\t\t\tthis.viewItems.splice(index, 0, item);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t});\n\n\t\t// We need to allow for the first enabled item to be focused on using tab navigation #106441\n\t\tif (this.focusable) {\n\t\t\tlet didFocus = false;\n\t\t\tfor (const item of this.viewItems) {\n\t\t\t\tif (!(item instanceof BaseActionViewItem)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tlet focus: boolean;\n\t\t\t\tif (didFocus) {\n\t\t\t\t\tfocus = false; // already focused an item\n\t\t\t\t} else if (item.action.id === Separator.ID) {\n\t\t\t\t\tfocus = false; // never focus a separator\n\t\t\t\t} else if (!item.isEnabled() && this.options.focusOnlyEnabledItems) {\n\t\t\t\t\tfocus = false; // never focus a disabled item\n\t\t\t\t} else {\n\t\t\t\t\tfocus = true;\n\t\t\t\t}\n\n\t\t\t\tif (focus) {\n\t\t\t\t\titem.setFocusable(true);\n\t\t\t\t\tdidFocus = true;\n\t\t\t\t} else {\n\t\t\t\t\titem.setFocusable(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof this.focusedItem === 'number') {\n\t\t\t// After a clear actions might be re-added to simply toggle some actions. We should preserve focus #97128\n\t\t\tthis.focus(this.focusedItem);\n\t\t}\n\t\tthis.refreshRole();\n\t}\n\n\tgetWidth(index: number): number {\n\t\tif (index >= 0 && index < this.actionsList.children.length) {\n\t\t\tconst item = this.actionsList.children.item(index);\n\t\t\tif (item) {\n\t\t\t\treturn item.clientWidth;\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\tpull(index: number): void {\n\t\tif (index >= 0 && index < this.viewItems.length) {\n\t\t\tthis.actionsList.childNodes[index].remove();\n\t\t\tthis.viewItemDisposables.deleteAndDispose(this.viewItems[index]);\n\t\t\tdispose(this.viewItems.splice(index, 1));\n\t\t\tthis.refreshRole();\n\t\t}\n\t}\n\n\tclear(): void {\n\t\tif (this.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.viewItems = dispose(this.viewItems);\n\t\tthis.viewItemDisposables.clearAndDisposeAll();\n\t\tDOM.clearNode(this.actionsList);\n\t\tthis.refreshRole();\n\t}\n\n\tlength(): number {\n\t\treturn this.viewItems.length;\n\t}\n\n\tisEmpty(): boolean {\n\t\treturn this.viewItems.length === 0;\n\t}\n\n\tfocus(index?: number): void;\n\tfocus(selectFirst?: boolean): void;\n\tfocus(arg?: number | boolean): void {\n\t\tlet selectFirst: boolean = false;\n\t\tlet index: number | undefined = undefined;\n\t\tif (arg === undefined) {\n\t\t\tselectFirst = true;\n\t\t} else if (typeof arg === 'number') {\n\t\t\tindex = arg;\n\t\t} else if (typeof arg === 'boolean') {\n\t\t\tselectFirst = arg;\n\t\t}\n\n\t\tif (selectFirst && typeof this.focusedItem === 'undefined') {\n\t\t\tconst firstEnabled = this.viewItems.findIndex(item => item.isEnabled());\n\t\t\t// Focus the first enabled item\n\t\t\tthis.focusedItem = firstEnabled === -1 ? undefined : firstEnabled;\n\t\t\tthis.updateFocus(undefined, undefined, true);\n\t\t} else {\n\t\t\tif (index !== undefined) {\n\t\t\t\tthis.focusedItem = index;\n\t\t\t}\n\n\t\t\tthis.updateFocus(undefined, undefined, true);\n\t\t}\n\t}\n\n\tprivate focusFirst(): boolean {\n\t\tthis.focusedItem = this.length() - 1;\n\t\treturn this.focusNext(true);\n\t}\n\n\tprivate focusLast(): boolean {\n\t\tthis.focusedItem = 0;\n\t\treturn this.focusPrevious(true);\n\t}\n\n\tprotected focusNext(forceLoop?: boolean, forceFocus?: boolean): boolean {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\tthis.focusedItem = this.viewItems.length - 1;\n\t\t} else if (this.viewItems.length <= 1) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst startIndex = this.focusedItem;\n\t\tlet item: IActionViewItem;\n\t\tdo {\n\n\t\t\tif (!forceLoop && this.options.preventLoopNavigation && this.focusedItem + 1 >= this.viewItems.length) {\n\t\t\t\tthis.focusedItem = startIndex;\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis.focusedItem = (this.focusedItem + 1) % this.viewItems.length;\n\t\t\titem = this.viewItems[this.focusedItem];\n\t\t} while (this.focusedItem !== startIndex && ((this.options.focusOnlyEnabledItems && !item.isEnabled()) || item.action.id === Separator.ID));\n\n\t\tthis.updateFocus(undefined, undefined, forceFocus);\n\t\treturn true;\n\t}\n\n\tprotected focusPrevious(forceLoop?: boolean): boolean {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\tthis.focusedItem = 0;\n\t\t} else if (this.viewItems.length <= 1) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst startIndex = this.focusedItem;\n\t\tlet item: IActionViewItem;\n\n\t\tdo {\n\t\t\tthis.focusedItem = this.focusedItem - 1;\n\t\t\tif (this.focusedItem < 0) {\n\t\t\t\tif (!forceLoop && this.options.preventLoopNavigation) {\n\t\t\t\t\tthis.focusedItem = startIndex;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tthis.focusedItem = this.viewItems.length - 1;\n\t\t\t}\n\t\t\titem = this.viewItems[this.focusedItem];\n\t\t} while (this.focusedItem !== startIndex && ((this.options.focusOnlyEnabledItems && !item.isEnabled()) || item.action.id === Separator.ID));\n\n\n\t\tthis.updateFocus(true);\n\t\treturn true;\n\t}\n\n\tprotected updateFocus(fromRight?: boolean, preventScroll?: boolean, forceFocus: boolean = false): void {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\tthis.actionsList.focus({ preventScroll });\n\t\t}\n\n\t\tif (this.previouslyFocusedItem !== undefined && this.previouslyFocusedItem !== this.focusedItem) {\n\t\t\tthis.viewItems[this.previouslyFocusedItem]?.blur();\n\t\t}\n\t\tconst actionViewItem = this.focusedItem !== undefined ? this.viewItems[this.focusedItem] : undefined;\n\t\tif (actionViewItem) {\n\t\t\tlet focusItem = true;\n\n\t\t\tif (!types.isFunction(actionViewItem.focus)) {\n\t\t\t\tfocusItem = false;\n\t\t\t}\n\n\t\t\tif (this.options.focusOnlyEnabledItems && types.isFunction(actionViewItem.isEnabled) && !actionViewItem.isEnabled()) {\n\t\t\t\tfocusItem = false;\n\t\t\t}\n\n\t\t\tif (actionViewItem.action.id === Separator.ID) {\n\t\t\t\tfocusItem = false;\n\t\t\t}\n\t\t\tif (!focusItem) {\n\t\t\t\tthis.actionsList.focus({ preventScroll });\n\t\t\t\tthis.previouslyFocusedItem = undefined;\n\t\t\t} else if (forceFocus || this.previouslyFocusedItem !== this.focusedItem) {\n\t\t\t\tactionViewItem.focus(fromRight);\n\t\t\t\tthis.previouslyFocusedItem = this.focusedItem;\n\t\t\t}\n\t\t\tif (focusItem) {\n\t\t\t\tactionViewItem.showHover?.();\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate doTrigger(event: StandardKeyboardEvent): void {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\treturn; //nothing to focus\n\t\t}\n\n\t\t// trigger action\n\t\tconst actionViewItem = this.viewItems[this.focusedItem];\n\t\tif (actionViewItem instanceof BaseActionViewItem) {\n\t\t\tconst context = (actionViewItem._context === null || actionViewItem._context === undefined) ? event : actionViewItem._context;\n\t\t\tthis.run(actionViewItem._action, context);\n\t\t}\n\t}\n\n\tasync run(action: IAction, context?: unknown): Promise<void> {\n\t\tawait this._actionRunner.run(action, context);\n\t}\n\n\toverride dispose(): void {\n\t\tthis._context = undefined;\n\t\tthis.viewItems = dispose(this.viewItems);\n\t\tthis.getContainer().remove();\n\t\tsuper.dispose();\n\t}\n}\n"]}
1
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YAClD,MAAM,OAAO,GAAG,CAAC,cAAc,CAAC,QAAQ,KAAK,IAAI,IAAI,cAAc,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC;YAC9H,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC3C,CAAC;IACF,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,MAAe,EAAE,OAAiB;QAC3C,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAEQ,OAAO;QACf,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACzC,IAAI,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,CAAC;QAC7B,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;CACD","file":"actionbar.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 * as DOM from '../../dom.js';\nimport { StandardKeyboardEvent } from '../../keyboardEvent.js';\nimport { ActionViewItem, BaseActionViewItem, IActionViewItemOptions } from './actionViewItems.js';\nimport { createInstantHoverDelegate } from '../hover/hoverDelegateFactory.js';\nimport { IHoverDelegate } from '../hover/hoverDelegate.js';\nimport { ActionRunner, IAction, IActionRunner, IRunEvent, Separator } from '../../../common/actions.js';\nimport { Emitter } from '../../../common/event.js';\nimport { KeyCode, KeyMod } from '../../../common/keyCodes.js';\nimport { Disposable, DisposableMap, DisposableStore, dispose, IDisposable } from '../../../common/lifecycle.js';\nimport * as types from '../../../common/types.js';\nimport './actionbar.css';\n\nexport interface IActionViewItem extends IDisposable {\n\taction: IAction;\n\tactionRunner: IActionRunner;\n\tsetActionContext(context: unknown): void;\n\trender(element: HTMLElement): void;\n\tisEnabled(): boolean;\n\tfocus(fromRight?: boolean): void; // TODO@isidorn what is this?\n\tblur(): void;\n\tshowHover?(): void;\n}\n\nexport interface IActionViewItemProvider {\n\t(action: IAction, options: IActionViewItemOptions): IActionViewItem | undefined;\n}\n\nexport const enum ActionsOrientation {\n\tHORIZONTAL,\n\tVERTICAL,\n}\n\nexport interface ActionTrigger {\n\tkeys?: KeyCode[];\n\tkeyDown: boolean;\n}\n\nexport interface IActionBarOptions {\n\treadonly orientation?: ActionsOrientation;\n\treadonly context?: unknown;\n\treadonly actionViewItemProvider?: IActionViewItemProvider;\n\treadonly actionRunner?: IActionRunner;\n\treadonly ariaLabel?: string;\n\treadonly ariaRole?: string;\n\treadonly triggerKeys?: ActionTrigger;\n\treadonly allowContextMenu?: boolean;\n\treadonly preventLoopNavigation?: boolean;\n\treadonly focusOnlyEnabledItems?: boolean;\n\treadonly hoverDelegate?: IHoverDelegate;\n\t/**\n\t * If true, toggled primary items are highlighted with a background color.\n\t * Some action bars exclusively use icon states, we don't want to enable this for them.\n\t * Thus, this is opt-in.\n\t */\n\treadonly highlightToggledItems?: boolean;\n}\n\nexport interface IActionOptions extends IActionViewItemOptions {\n\tindex?: number;\n}\n\nexport class ActionBar extends Disposable implements IActionRunner {\n\n\tprivate readonly options: IActionBarOptions;\n\tprivate readonly _hoverDelegate: IHoverDelegate;\n\n\tprivate _actionRunner: IActionRunner;\n\tprivate readonly _actionRunnerDisposables = this._register(new DisposableStore());\n\tprivate _context: unknown;\n\tprivate readonly _orientation: ActionsOrientation;\n\tprivate readonly _triggerKeys: {\n\t\tkeys: KeyCode[];\n\t\tkeyDown: boolean;\n\t};\n\n\t// View Items\n\tviewItems: IActionViewItem[];\n\tprivate readonly viewItemDisposables = this._register(new DisposableMap<IActionViewItem>());\n\tprivate previouslyFocusedItem?: number;\n\tprotected focusedItem?: number;\n\tprivate focusTracker: DOM.IFocusTracker;\n\n\t// Trigger Key Tracking\n\tprivate triggerKeyDown: boolean = false;\n\n\tprivate focusable: boolean = true;\n\n\t// Elements\n\tdomNode: HTMLElement;\n\tprotected readonly actionsList: HTMLElement;\n\n\tprivate readonly _onDidBlur = this._register(new Emitter<void>());\n\tget onDidBlur() { return this._onDidBlur.event; }\n\n\tprivate readonly _onDidCancel = this._register(new Emitter<void>({ onWillAddFirstListener: () => this.cancelHasListener = true }));\n\tget onDidCancel() { return this._onDidCancel.event; }\n\tprivate cancelHasListener = false;\n\n\tprivate readonly _onDidRun = this._register(new Emitter<IRunEvent>());\n\tget onDidRun() { return this._onDidRun.event; }\n\n\tprivate readonly _onWillRun = this._register(new Emitter<IRunEvent>());\n\tget onWillRun() { return this._onWillRun.event; }\n\n\tconstructor(container: HTMLElement, options: IActionBarOptions = {}) {\n\t\tsuper();\n\n\t\tthis.options = options;\n\t\tthis._context = options.context ?? null;\n\t\tthis._orientation = this.options.orientation ?? ActionsOrientation.HORIZONTAL;\n\t\tthis._triggerKeys = {\n\t\t\tkeyDown: this.options.triggerKeys?.keyDown ?? false,\n\t\t\tkeys: this.options.triggerKeys?.keys ?? [KeyCode.Enter, KeyCode.Space]\n\t\t};\n\n\t\tthis._hoverDelegate = options.hoverDelegate ?? this._register(createInstantHoverDelegate());\n\n\t\tif (this.options.actionRunner) {\n\t\t\tthis._actionRunner = this.options.actionRunner;\n\t\t} else {\n\t\t\tthis._actionRunner = new ActionRunner();\n\t\t\tthis._actionRunnerDisposables.add(this._actionRunner);\n\t\t}\n\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onDidRun(e => this._onDidRun.fire(e)));\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onWillRun(e => this._onWillRun.fire(e)));\n\n\t\tthis.viewItems = [];\n\t\tthis.focusedItem = undefined;\n\n\t\tthis.domNode = document.createElement('div');\n\t\tthis.domNode.className = 'monaco-action-bar';\n\n\t\tlet previousKeys: KeyCode[];\n\t\tlet nextKeys: KeyCode[];\n\n\t\tswitch (this._orientation) {\n\t\t\tcase ActionsOrientation.HORIZONTAL:\n\t\t\t\tpreviousKeys = [KeyCode.LeftArrow];\n\t\t\t\tnextKeys = [KeyCode.RightArrow];\n\t\t\t\tbreak;\n\t\t\tcase ActionsOrientation.VERTICAL:\n\t\t\t\tpreviousKeys = [KeyCode.UpArrow];\n\t\t\t\tnextKeys = [KeyCode.DownArrow];\n\t\t\t\tthis.domNode.className += ' vertical';\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis._register(DOM.addDisposableListener(this.domNode, DOM.EventType.KEY_DOWN, e => {\n\t\t\tconst event = new StandardKeyboardEvent(e);\n\t\t\tlet eventHandled = true;\n\t\t\tconst focusedItem = typeof this.focusedItem === 'number' ? this.viewItems[this.focusedItem] : undefined;\n\n\t\t\tif (previousKeys && (event.equals(previousKeys[0]) || event.equals(previousKeys[1]))) {\n\t\t\t\teventHandled = this.focusPrevious();\n\t\t\t} else if (nextKeys && (event.equals(nextKeys[0]) || event.equals(nextKeys[1]))) {\n\t\t\t\teventHandled = this.focusNext();\n\t\t\t} else if (event.equals(KeyCode.Escape) && this.cancelHasListener) {\n\t\t\t\tthis._onDidCancel.fire();\n\t\t\t} else if (event.equals(KeyCode.Home)) {\n\t\t\t\teventHandled = this.focusFirst();\n\t\t\t} else if (event.equals(KeyCode.End)) {\n\t\t\t\teventHandled = this.focusLast();\n\t\t\t} else if (event.equals(KeyCode.Tab) && focusedItem instanceof BaseActionViewItem && focusedItem.trapsArrowNavigation) {\n\t\t\t\t// Tab, so forcibly focus next #219199\n\t\t\t\teventHandled = this.focusNext(undefined, true);\n\t\t\t} else if (this.isTriggerKeyEvent(event)) {\n\t\t\t\t// Staying out of the else branch even if not triggered\n\t\t\t\tif (this._triggerKeys.keyDown) {\n\t\t\t\t\tthis.doTrigger(event);\n\t\t\t\t} else {\n\t\t\t\t\tthis.triggerKeyDown = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\teventHandled = false;\n\t\t\t}\n\n\t\t\tif (eventHandled) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(DOM.addDisposableListener(this.domNode, DOM.EventType.KEY_UP, e => {\n\t\t\tconst event = new StandardKeyboardEvent(e);\n\n\t\t\t// Run action on Enter/Space\n\t\t\tif (this.isTriggerKeyEvent(event)) {\n\t\t\t\tif (!this._triggerKeys.keyDown && this.triggerKeyDown) {\n\t\t\t\t\tthis.triggerKeyDown = false;\n\t\t\t\t\tthis.doTrigger(event);\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\n\t\t\t// Recompute focused item\n\t\t\telse if (event.equals(KeyCode.Tab) || event.equals(KeyMod.Shift | KeyCode.Tab) || event.equals(KeyCode.UpArrow) || event.equals(KeyCode.DownArrow) || event.equals(KeyCode.LeftArrow) || event.equals(KeyCode.RightArrow)) {\n\t\t\t\tthis.updateFocusedItem();\n\t\t\t}\n\t\t}));\n\n\t\tthis.focusTracker = this._register(DOM.trackFocus(this.domNode));\n\t\tthis._register(this.focusTracker.onDidBlur(() => {\n\t\t\tif (DOM.getActiveElement() === this.domNode || !DOM.isAncestor(DOM.getActiveElement(), this.domNode)) {\n\t\t\t\tthis._onDidBlur.fire();\n\t\t\t\tthis.previouslyFocusedItem = this.focusedItem;\n\t\t\t\tthis.focusedItem = undefined;\n\t\t\t\tthis.triggerKeyDown = false;\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(this.focusTracker.onDidFocus(() => this.updateFocusedItem()));\n\n\t\tthis.actionsList = document.createElement('ul');\n\t\tthis.actionsList.className = 'actions-container';\n\t\tif (this.options.highlightToggledItems) {\n\t\t\tthis.actionsList.classList.add('highlight-toggled');\n\t\t}\n\t\tthis.actionsList.setAttribute('role', this.options.ariaRole || 'toolbar');\n\n\t\tif (this.options.ariaLabel) {\n\t\t\tthis.actionsList.setAttribute('aria-label', this.options.ariaLabel);\n\t\t}\n\n\t\tthis.domNode.appendChild(this.actionsList);\n\n\t\tcontainer.appendChild(this.domNode);\n\t}\n\n\tprivate refreshRole(): void {\n\t\tif (this.length() >= 1) {\n\t\t\tthis.actionsList.setAttribute('role', this.options.ariaRole || 'toolbar');\n\t\t} else {\n\t\t\tthis.actionsList.setAttribute('role', 'presentation');\n\t\t}\n\t}\n\n\t// Some action bars should not be focusable at times\n\t// When an action bar is not focusable make sure to make all the elements inside it not focusable\n\t// When an action bar is focusable again, make sure the first item can be focused\n\tsetFocusable(focusable: boolean): void {\n\t\tthis.focusable = focusable;\n\t\tif (this.focusable) {\n\t\t\tconst firstEnabled = this.viewItems.find(vi => vi instanceof BaseActionViewItem && vi.isEnabled());\n\t\t\tif (firstEnabled instanceof BaseActionViewItem) {\n\t\t\t\tfirstEnabled.setFocusable(true);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.viewItems.forEach(vi => {\n\t\t\t\tif (vi instanceof BaseActionViewItem) {\n\t\t\t\t\tvi.setFocusable(false);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate isTriggerKeyEvent(event: StandardKeyboardEvent): boolean {\n\t\tlet ret = false;\n\t\tthis._triggerKeys.keys.forEach(keyCode => {\n\t\t\tret = ret || event.equals(keyCode);\n\t\t});\n\n\t\treturn ret;\n\t}\n\n\tprivate updateFocusedItem(): void {\n\t\tfor (let i = 0; i < this.actionsList.children.length; i++) {\n\t\t\tconst elem = this.actionsList.children[i];\n\t\t\tif (DOM.isAncestor(DOM.getActiveElement(), elem)) {\n\t\t\t\tthis.focusedItem = i;\n\t\t\t\tthis.viewItems[this.focusedItem]?.showHover?.();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tget context(): unknown {\n\t\treturn this._context;\n\t}\n\n\tset context(context: unknown) {\n\t\tthis._context = context;\n\t\tthis.viewItems.forEach(i => i.setActionContext(context));\n\t}\n\n\tget actionRunner(): IActionRunner {\n\t\treturn this._actionRunner;\n\t}\n\n\tset actionRunner(actionRunner: IActionRunner) {\n\t\tthis._actionRunner = actionRunner;\n\n\t\t// when setting a new `IActionRunner` make sure to dispose old listeners and\n\t\t// start to forward events from the new listener\n\t\tthis._actionRunnerDisposables.clear();\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onDidRun(e => this._onDidRun.fire(e)));\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onWillRun(e => this._onWillRun.fire(e)));\n\t\tthis.viewItems.forEach(item => item.actionRunner = actionRunner);\n\t}\n\n\tgetContainer(): HTMLElement {\n\t\treturn this.domNode;\n\t}\n\n\thasAction(action: IAction): boolean {\n\t\treturn this.viewItems.findIndex(candidate => candidate.action.id === action.id) !== -1;\n\t}\n\n\tgetAction(indexOrElement: number | HTMLElement): IAction | undefined {\n\n\t\t// by index\n\t\tif (typeof indexOrElement === 'number') {\n\t\t\treturn this.viewItems[indexOrElement]?.action;\n\t\t}\n\n\t\t// by element\n\t\tif (DOM.isHTMLElement(indexOrElement)) {\n\t\t\twhile (indexOrElement.parentElement !== this.actionsList) {\n\t\t\t\tif (!indexOrElement.parentElement) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\tindexOrElement = indexOrElement.parentElement;\n\t\t\t}\n\t\t\tfor (let i = 0; i < this.actionsList.childNodes.length; i++) {\n\t\t\t\tif (this.actionsList.childNodes[i] === indexOrElement) {\n\t\t\t\t\treturn this.viewItems[i].action;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tpush(arg: IAction | ReadonlyArray<IAction>, options: IActionOptions = {}): void {\n\t\tconst actions: ReadonlyArray<IAction> = Array.isArray(arg) ? arg : [arg];\n\n\t\tlet index = types.isNumber(options.index) ? options.index : null;\n\n\t\tactions.forEach((action: IAction) => {\n\t\t\tconst actionViewItemElement = document.createElement('li');\n\t\t\tactionViewItemElement.className = 'action-item';\n\t\t\tactionViewItemElement.setAttribute('role', 'presentation');\n\n\t\t\tlet item: IActionViewItem | undefined;\n\n\t\t\tconst viewItemOptions: IActionViewItemOptions = { hoverDelegate: this._hoverDelegate, ...options, isTabList: this.options.ariaRole === 'tablist' };\n\t\t\tif (this.options.actionViewItemProvider) {\n\t\t\t\titem = this.options.actionViewItemProvider(action, viewItemOptions);\n\t\t\t}\n\n\t\t\tif (!item) {\n\t\t\t\titem = new ActionViewItem(this.context, action, viewItemOptions);\n\t\t\t}\n\n\t\t\t// Prevent native context menu on actions\n\t\t\tif (!this.options.allowContextMenu) {\n\t\t\t\tthis.viewItemDisposables.set(item, DOM.addDisposableListener(actionViewItemElement, DOM.EventType.CONTEXT_MENU, (e: DOM.EventLike) => {\n\t\t\t\t\tDOM.EventHelper.stop(e, true);\n\t\t\t\t}));\n\t\t\t}\n\n\t\t\titem.actionRunner = this._actionRunner;\n\t\t\titem.setActionContext(this.context);\n\t\t\titem.render(actionViewItemElement);\n\n\t\t\tif (index === null || index < 0 || index >= this.actionsList.children.length) {\n\t\t\t\tthis.actionsList.appendChild(actionViewItemElement);\n\t\t\t\tthis.viewItems.push(item);\n\t\t\t} else {\n\t\t\t\tthis.actionsList.insertBefore(actionViewItemElement, this.actionsList.children[index]);\n\t\t\t\tthis.viewItems.splice(index, 0, item);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t});\n\n\t\t// We need to allow for the first enabled item to be focused on using tab navigation #106441\n\t\tif (this.focusable) {\n\t\t\tlet didFocus = false;\n\t\t\tfor (const item of this.viewItems) {\n\t\t\t\tif (!(item instanceof BaseActionViewItem)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tlet focus: boolean;\n\t\t\t\tif (didFocus) {\n\t\t\t\t\tfocus = false; // already focused an item\n\t\t\t\t} else if (item.action.id === Separator.ID) {\n\t\t\t\t\tfocus = false; // never focus a separator\n\t\t\t\t} else if (!item.isEnabled() && this.options.focusOnlyEnabledItems) {\n\t\t\t\t\tfocus = false; // never focus a disabled item\n\t\t\t\t} else {\n\t\t\t\t\tfocus = true;\n\t\t\t\t}\n\n\t\t\t\tif (focus) {\n\t\t\t\t\titem.setFocusable(true);\n\t\t\t\t\tdidFocus = true;\n\t\t\t\t} else {\n\t\t\t\t\titem.setFocusable(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof this.focusedItem === 'number') {\n\t\t\t// After a clear actions might be re-added to simply toggle some actions. We should preserve focus #97128\n\t\t\tthis.focus(this.focusedItem);\n\t\t}\n\t\tthis.refreshRole();\n\t}\n\n\tgetWidth(index: number): number {\n\t\tif (index >= 0 && index < this.actionsList.children.length) {\n\t\t\tconst item = this.actionsList.children.item(index);\n\t\t\tif (item) {\n\t\t\t\treturn item.clientWidth;\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\tpull(index: number): void {\n\t\tif (index >= 0 && index < this.viewItems.length) {\n\t\t\tthis.actionsList.childNodes[index].remove();\n\t\t\tthis.viewItemDisposables.deleteAndDispose(this.viewItems[index]);\n\t\t\tdispose(this.viewItems.splice(index, 1));\n\t\t\tthis.refreshRole();\n\t\t}\n\t}\n\n\tclear(): void {\n\t\tif (this.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.viewItems = dispose(this.viewItems);\n\t\tthis.viewItemDisposables.clearAndDisposeAll();\n\t\tDOM.clearNode(this.actionsList);\n\t\tthis.refreshRole();\n\t}\n\n\tlength(): number {\n\t\treturn this.viewItems.length;\n\t}\n\n\tisEmpty(): boolean {\n\t\treturn this.viewItems.length === 0;\n\t}\n\n\tfocus(index?: number): void;\n\tfocus(selectFirst?: boolean): void;\n\tfocus(arg?: number | boolean): void {\n\t\tlet selectFirst: boolean = false;\n\t\tlet index: number | undefined = undefined;\n\t\tif (arg === undefined) {\n\t\t\tselectFirst = true;\n\t\t} else if (typeof arg === 'number') {\n\t\t\tindex = arg;\n\t\t} else if (typeof arg === 'boolean') {\n\t\t\tselectFirst = arg;\n\t\t}\n\n\t\tif (selectFirst && typeof this.focusedItem === 'undefined') {\n\t\t\tconst firstEnabled = this.viewItems.findIndex(item => item.isEnabled());\n\t\t\t// Focus the first enabled item\n\t\t\tthis.focusedItem = firstEnabled === -1 ? undefined : firstEnabled;\n\t\t\tthis.updateFocus(undefined, undefined, true);\n\t\t} else {\n\t\t\tif (index !== undefined) {\n\t\t\t\tthis.focusedItem = index;\n\t\t\t}\n\n\t\t\tthis.updateFocus(undefined, undefined, true);\n\t\t}\n\t}\n\n\tprivate focusFirst(): boolean {\n\t\tthis.focusedItem = this.length() - 1;\n\t\treturn this.focusNext(true);\n\t}\n\n\tprivate focusLast(): boolean {\n\t\tthis.focusedItem = 0;\n\t\treturn this.focusPrevious(true);\n\t}\n\n\tprotected focusNext(forceLoop?: boolean, forceFocus?: boolean): boolean {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\tthis.focusedItem = this.viewItems.length - 1;\n\t\t} else if (this.viewItems.length <= 1) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst startIndex = this.focusedItem;\n\t\tlet item: IActionViewItem;\n\t\tdo {\n\n\t\t\tif (!forceLoop && this.options.preventLoopNavigation && this.focusedItem + 1 >= this.viewItems.length) {\n\t\t\t\tthis.focusedItem = startIndex;\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis.focusedItem = (this.focusedItem + 1) % this.viewItems.length;\n\t\t\titem = this.viewItems[this.focusedItem];\n\t\t} while (this.focusedItem !== startIndex && ((this.options.focusOnlyEnabledItems && !item.isEnabled()) || item.action.id === Separator.ID));\n\n\t\tthis.updateFocus(undefined, undefined, forceFocus);\n\t\treturn true;\n\t}\n\n\tprotected focusPrevious(forceLoop?: boolean): boolean {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\tthis.focusedItem = 0;\n\t\t} else if (this.viewItems.length <= 1) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst startIndex = this.focusedItem;\n\t\tlet item: IActionViewItem;\n\n\t\tdo {\n\t\t\tthis.focusedItem = this.focusedItem - 1;\n\t\t\tif (this.focusedItem < 0) {\n\t\t\t\tif (!forceLoop && this.options.preventLoopNavigation) {\n\t\t\t\t\tthis.focusedItem = startIndex;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tthis.focusedItem = this.viewItems.length - 1;\n\t\t\t}\n\t\t\titem = this.viewItems[this.focusedItem];\n\t\t} while (this.focusedItem !== startIndex && ((this.options.focusOnlyEnabledItems && !item.isEnabled()) || item.action.id === Separator.ID));\n\n\n\t\tthis.updateFocus(true);\n\t\treturn true;\n\t}\n\n\tprotected updateFocus(fromRight?: boolean, preventScroll?: boolean, forceFocus: boolean = false): void {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\tthis.actionsList.focus({ preventScroll });\n\t\t}\n\n\t\tif (this.previouslyFocusedItem !== undefined && this.previouslyFocusedItem !== this.focusedItem) {\n\t\t\tthis.viewItems[this.previouslyFocusedItem]?.blur();\n\t\t}\n\t\tconst actionViewItem = this.focusedItem !== undefined ? this.viewItems[this.focusedItem] : undefined;\n\t\tif (actionViewItem) {\n\t\t\tlet focusItem = true;\n\n\t\t\tif (!types.isFunction(actionViewItem.focus)) {\n\t\t\t\tfocusItem = false;\n\t\t\t}\n\n\t\t\tif (this.options.focusOnlyEnabledItems && types.isFunction(actionViewItem.isEnabled) && !actionViewItem.isEnabled()) {\n\t\t\t\tfocusItem = false;\n\t\t\t}\n\n\t\t\tif (actionViewItem.action.id === Separator.ID) {\n\t\t\t\tfocusItem = false;\n\t\t\t}\n\t\t\tif (!focusItem) {\n\t\t\t\tthis.actionsList.focus({ preventScroll });\n\t\t\t\tthis.previouslyFocusedItem = undefined;\n\t\t\t} else if (forceFocus || this.previouslyFocusedItem !== this.focusedItem) {\n\t\t\t\tactionViewItem.focus(fromRight);\n\t\t\t\tthis.previouslyFocusedItem = this.focusedItem;\n\t\t\t}\n\t\t\tif (focusItem) {\n\t\t\t\tactionViewItem.showHover?.();\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate doTrigger(event: StandardKeyboardEvent): void {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\treturn; //nothing to focus\n\t\t}\n\n\t\t// trigger action\n\t\tconst actionViewItem = this.viewItems[this.focusedItem];\n\t\tif (actionViewItem instanceof BaseActionViewItem) {\n\t\t\tconst context = (actionViewItem._context === null || actionViewItem._context === undefined) ? event : actionViewItem._context;\n\t\t\tthis.run(actionViewItem._action, context);\n\t\t}\n\t}\n\n\tasync run(action: IAction, context?: unknown): Promise<void> {\n\t\tawait this._actionRunner.run(action, context);\n\t}\n\n\toverride dispose(): void {\n\t\tthis._context = undefined;\n\t\tthis.viewItems = dispose(this.viewItems);\n\t\tthis.getContainer().remove();\n\t\tsuper.dispose();\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 * as DOM from '../../dom.js';\nimport { StandardKeyboardEvent } from '../../keyboardEvent.js';\nimport { ActionViewItem, BaseActionViewItem, IActionViewItemOptions } from './actionViewItems.js';\nimport { createInstantHoverDelegate } from '../hover/hoverDelegateFactory.js';\nimport { IHoverDelegate } from '../hover/hoverDelegate.js';\nimport { ActionRunner, IAction, IActionRunner, IRunEvent, Separator } from '../../../common/actions.js';\nimport { Emitter } from '../../../common/event.js';\nimport { KeyCode, KeyMod } from '../../../common/keyCodes.js';\nimport { Disposable, DisposableMap, DisposableStore, dispose, IDisposable } from '../../../common/lifecycle.js';\nimport * as types from '../../../common/types.js';\nimport './actionbar.css';\n\nexport interface IActionViewItem extends IDisposable {\n\taction: IAction;\n\tactionRunner: IActionRunner;\n\tsetActionContext(context: unknown): void;\n\trender(element: HTMLElement): void;\n\tisEnabled(): boolean;\n\tfocus(fromRight?: boolean): void; // TODO@isidorn what is this?\n\tblur(): void;\n\tshowHover?(): void;\n}\n\nexport interface IActionViewItemProvider {\n\t(action: IAction, options: IActionViewItemOptions): IActionViewItem | undefined;\n}\n\nexport const enum ActionsOrientation {\n\tHORIZONTAL,\n\tVERTICAL,\n}\n\nexport interface ActionTrigger {\n\tkeys?: KeyCode[];\n\tkeyDown: boolean;\n}\n\nexport interface IActionBarOptions {\n\treadonly orientation?: ActionsOrientation;\n\treadonly context?: unknown;\n\treadonly actionViewItemProvider?: IActionViewItemProvider;\n\treadonly actionRunner?: IActionRunner;\n\treadonly ariaLabel?: string;\n\treadonly ariaRole?: string;\n\treadonly triggerKeys?: ActionTrigger;\n\treadonly allowContextMenu?: boolean;\n\treadonly preventLoopNavigation?: boolean;\n\treadonly focusOnlyEnabledItems?: boolean;\n\treadonly hoverDelegate?: IHoverDelegate;\n\t/**\n\t * If true, toggled primary items are highlighted with a background color.\n\t * Some action bars exclusively use icon states, we don't want to enable this for them.\n\t * Thus, this is opt-in.\n\t */\n\treadonly highlightToggledItems?: boolean;\n}\n\nexport interface IActionOptions extends IActionViewItemOptions {\n\tindex?: number;\n}\n\nexport class ActionBar extends Disposable implements IActionRunner {\n\n\tprivate readonly options: IActionBarOptions;\n\tprivate readonly _hoverDelegate: IHoverDelegate;\n\n\tprivate _actionRunner: IActionRunner;\n\tprivate readonly _actionRunnerDisposables = this._register(new DisposableStore());\n\tprivate _context: unknown;\n\tprivate readonly _orientation: ActionsOrientation;\n\tprivate readonly _triggerKeys: {\n\t\tkeys: KeyCode[];\n\t\tkeyDown: boolean;\n\t};\n\n\t// View Items\n\tviewItems: IActionViewItem[];\n\tprivate readonly viewItemDisposables = this._register(new DisposableMap<IActionViewItem>());\n\tprivate previouslyFocusedItem?: number;\n\tprotected focusedItem?: number;\n\tprivate focusTracker: DOM.IFocusTracker;\n\n\t// Trigger Key Tracking\n\tprivate triggerKeyDown: boolean = false;\n\n\tprivate focusable: boolean = true;\n\n\t// Elements\n\tdomNode: HTMLElement;\n\tprotected readonly actionsList: HTMLElement;\n\n\tprivate readonly _onDidBlur = this._register(new Emitter<void>());\n\tget onDidBlur() { return this._onDidBlur.event; }\n\n\tprivate readonly _onDidCancel = this._register(new Emitter<void>({ onWillAddFirstListener: () => this.cancelHasListener = true }));\n\tget onDidCancel() { return this._onDidCancel.event; }\n\tprivate cancelHasListener = false;\n\n\tprivate readonly _onDidRun = this._register(new Emitter<IRunEvent>());\n\tget onDidRun() { return this._onDidRun.event; }\n\n\tprivate readonly _onWillRun = this._register(new Emitter<IRunEvent>());\n\tget onWillRun() { return this._onWillRun.event; }\n\n\tconstructor(container: HTMLElement, options: IActionBarOptions = {}) {\n\t\tsuper();\n\n\t\tthis.options = options;\n\t\tthis._context = options.context ?? null;\n\t\tthis._orientation = this.options.orientation ?? ActionsOrientation.HORIZONTAL;\n\t\tthis._triggerKeys = {\n\t\t\tkeyDown: this.options.triggerKeys?.keyDown ?? false,\n\t\t\tkeys: this.options.triggerKeys?.keys ?? [KeyCode.Enter, KeyCode.Space]\n\t\t};\n\n\t\tthis._hoverDelegate = options.hoverDelegate ?? this._register(createInstantHoverDelegate());\n\n\t\tif (this.options.actionRunner) {\n\t\t\tthis._actionRunner = this.options.actionRunner;\n\t\t} else {\n\t\t\tthis._actionRunner = new ActionRunner();\n\t\t\tthis._actionRunnerDisposables.add(this._actionRunner);\n\t\t}\n\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onDidRun(e => this._onDidRun.fire(e)));\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onWillRun(e => this._onWillRun.fire(e)));\n\n\t\tthis.viewItems = [];\n\t\tthis.focusedItem = undefined;\n\n\t\tthis.domNode = document.createElement('div');\n\t\tthis.domNode.className = 'monaco-action-bar';\n\n\t\tlet previousKeys: KeyCode[];\n\t\tlet nextKeys: KeyCode[];\n\n\t\tswitch (this._orientation) {\n\t\t\tcase ActionsOrientation.HORIZONTAL:\n\t\t\t\tpreviousKeys = [KeyCode.LeftArrow];\n\t\t\t\tnextKeys = [KeyCode.RightArrow];\n\t\t\t\tbreak;\n\t\t\tcase ActionsOrientation.VERTICAL:\n\t\t\t\tpreviousKeys = [KeyCode.UpArrow];\n\t\t\t\tnextKeys = [KeyCode.DownArrow];\n\t\t\t\tthis.domNode.className += ' vertical';\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis._register(DOM.addDisposableListener(this.domNode, DOM.EventType.KEY_DOWN, e => {\n\t\t\tconst event = new StandardKeyboardEvent(e);\n\t\t\tlet eventHandled = true;\n\t\t\tconst focusedItem = typeof this.focusedItem === 'number' ? this.viewItems[this.focusedItem] : undefined;\n\n\t\t\tif (previousKeys && (event.equals(previousKeys[0]) || event.equals(previousKeys[1]))) {\n\t\t\t\teventHandled = this.focusPrevious();\n\t\t\t} else if (nextKeys && (event.equals(nextKeys[0]) || event.equals(nextKeys[1]))) {\n\t\t\t\teventHandled = this.focusNext();\n\t\t\t} else if (event.equals(KeyCode.Escape) && this.cancelHasListener) {\n\t\t\t\tthis._onDidCancel.fire();\n\t\t\t} else if (event.equals(KeyCode.Home)) {\n\t\t\t\teventHandled = this.focusFirst();\n\t\t\t} else if (event.equals(KeyCode.End)) {\n\t\t\t\teventHandled = this.focusLast();\n\t\t\t} else if (event.equals(KeyCode.Tab) && focusedItem instanceof BaseActionViewItem && focusedItem.trapsArrowNavigation) {\n\t\t\t\t// Tab, so forcibly focus next #219199\n\t\t\t\teventHandled = this.focusNext(undefined, true);\n\t\t\t} else if (this.isTriggerKeyEvent(event)) {\n\t\t\t\t// Staying out of the else branch even if not triggered\n\t\t\t\tif (this._triggerKeys.keyDown) {\n\t\t\t\t\tthis.doTrigger(event);\n\t\t\t\t} else {\n\t\t\t\t\tthis.triggerKeyDown = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\teventHandled = false;\n\t\t\t}\n\n\t\t\tif (eventHandled) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(DOM.addDisposableListener(this.domNode, DOM.EventType.KEY_UP, e => {\n\t\t\tconst event = new StandardKeyboardEvent(e);\n\n\t\t\t// Run action on Enter/Space\n\t\t\tif (this.isTriggerKeyEvent(event)) {\n\t\t\t\tif (!this._triggerKeys.keyDown && this.triggerKeyDown) {\n\t\t\t\t\tthis.triggerKeyDown = false;\n\t\t\t\t\tthis.doTrigger(event);\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\n\t\t\t// Recompute focused item\n\t\t\telse if (event.equals(KeyCode.Tab) || event.equals(KeyMod.Shift | KeyCode.Tab) || event.equals(KeyCode.UpArrow) || event.equals(KeyCode.DownArrow) || event.equals(KeyCode.LeftArrow) || event.equals(KeyCode.RightArrow)) {\n\t\t\t\tthis.updateFocusedItem();\n\t\t\t}\n\t\t}));\n\n\t\tthis.focusTracker = this._register(DOM.trackFocus(this.domNode));\n\t\tthis._register(this.focusTracker.onDidBlur(() => {\n\t\t\tif (DOM.getActiveElement() === this.domNode || !DOM.isAncestor(DOM.getActiveElement(), this.domNode)) {\n\t\t\t\tthis._onDidBlur.fire();\n\t\t\t\tthis.previouslyFocusedItem = this.focusedItem;\n\t\t\t\tthis.focusedItem = undefined;\n\t\t\t\tthis.triggerKeyDown = false;\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(this.focusTracker.onDidFocus(() => this.updateFocusedItem()));\n\n\t\tthis.actionsList = document.createElement('ul');\n\t\tthis.actionsList.className = 'actions-container';\n\t\tif (this.options.highlightToggledItems) {\n\t\t\tthis.actionsList.classList.add('highlight-toggled');\n\t\t}\n\t\tthis.actionsList.setAttribute('role', this.options.ariaRole || 'toolbar');\n\n\t\tif (this.options.ariaLabel) {\n\t\t\tthis.actionsList.setAttribute('aria-label', this.options.ariaLabel);\n\t\t}\n\n\t\tthis.domNode.appendChild(this.actionsList);\n\n\t\tcontainer.appendChild(this.domNode);\n\t}\n\n\tprivate refreshRole(): void {\n\t\tif (this.length() >= 1) {\n\t\t\tthis.actionsList.setAttribute('role', this.options.ariaRole || 'toolbar');\n\t\t} else {\n\t\t\tthis.actionsList.setAttribute('role', 'presentation');\n\t\t}\n\t}\n\n\t// Some action bars should not be focusable at times\n\t// When an action bar is not focusable make sure to make all the elements inside it not focusable\n\t// When an action bar is focusable again, make sure the first item can be focused\n\tsetFocusable(focusable: boolean): void {\n\t\tthis.focusable = focusable;\n\t\tif (this.focusable) {\n\t\t\tconst firstEnabled = this.viewItems.find(vi => vi instanceof BaseActionViewItem && vi.isEnabled());\n\t\t\tif (firstEnabled instanceof BaseActionViewItem) {\n\t\t\t\tfirstEnabled.setFocusable(true);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.viewItems.forEach(vi => {\n\t\t\t\tif (vi instanceof BaseActionViewItem) {\n\t\t\t\t\tvi.setFocusable(false);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate isTriggerKeyEvent(event: StandardKeyboardEvent): boolean {\n\t\tlet ret = false;\n\t\tthis._triggerKeys.keys.forEach(keyCode => {\n\t\t\tret = ret || event.equals(keyCode);\n\t\t});\n\n\t\treturn ret;\n\t}\n\n\tprivate updateFocusedItem(): void {\n\t\tfor (let i = 0; i < this.actionsList.children.length; i++) {\n\t\t\tconst elem = this.actionsList.children[i];\n\t\t\tif (DOM.isAncestor(DOM.getActiveElement(), elem)) {\n\t\t\t\tthis.focusedItem = i;\n\t\t\t\tthis.viewItems[this.focusedItem]?.showHover?.();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tget context(): unknown {\n\t\treturn this._context;\n\t}\n\n\tset context(context: unknown) {\n\t\tthis._context = context;\n\t\tthis.viewItems.forEach(i => i.setActionContext(context));\n\t}\n\n\tget actionRunner(): IActionRunner {\n\t\treturn this._actionRunner;\n\t}\n\n\tset actionRunner(actionRunner: IActionRunner) {\n\t\tthis._actionRunner = actionRunner;\n\n\t\t// when setting a new `IActionRunner` make sure to dispose old listeners and\n\t\t// start to forward events from the new listener\n\t\tthis._actionRunnerDisposables.clear();\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onDidRun(e => this._onDidRun.fire(e)));\n\t\tthis._actionRunnerDisposables.add(this._actionRunner.onWillRun(e => this._onWillRun.fire(e)));\n\t\tthis.viewItems.forEach(item => item.actionRunner = actionRunner);\n\t}\n\n\tgetContainer(): HTMLElement {\n\t\treturn this.domNode;\n\t}\n\n\thasAction(action: IAction): boolean {\n\t\treturn this.viewItems.findIndex(candidate => candidate.action.id === action.id) !== -1;\n\t}\n\n\tgetAction(indexOrElement: number | HTMLElement): IAction | undefined {\n\n\t\t// by index\n\t\tif (typeof indexOrElement === 'number') {\n\t\t\treturn this.viewItems[indexOrElement]?.action;\n\t\t}\n\n\t\t// by element\n\t\tif (DOM.isHTMLElement(indexOrElement)) {\n\t\t\twhile (indexOrElement.parentElement !== this.actionsList) {\n\t\t\t\tif (!indexOrElement.parentElement) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\tindexOrElement = indexOrElement.parentElement;\n\t\t\t}\n\t\t\tfor (let i = 0; i < this.actionsList.childNodes.length; i++) {\n\t\t\t\tif (this.actionsList.childNodes[i] === indexOrElement) {\n\t\t\t\t\treturn this.viewItems[i].action;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tpush(arg: IAction | ReadonlyArray<IAction>, options: IActionOptions = {}): void {\n\t\tconst actions: ReadonlyArray<IAction> = Array.isArray(arg) ? arg : [arg];\n\n\t\tlet index = types.isNumber(options.index) ? options.index : null;\n\n\t\tactions.forEach((action: IAction) => {\n\t\t\tconst actionViewItemElement = document.createElement('li');\n\t\t\tactionViewItemElement.className = 'action-item';\n\t\t\tactionViewItemElement.setAttribute('role', 'presentation');\n\n\t\t\tlet item: IActionViewItem | undefined;\n\n\t\t\tconst viewItemOptions: IActionViewItemOptions = { hoverDelegate: this._hoverDelegate, ...options, isTabList: this.options.ariaRole === 'tablist' };\n\t\t\tif (this.options.actionViewItemProvider) {\n\t\t\t\titem = this.options.actionViewItemProvider(action, viewItemOptions);\n\t\t\t}\n\n\t\t\tif (!item) {\n\t\t\t\titem = new ActionViewItem(this.context, action, viewItemOptions);\n\t\t\t}\n\n\t\t\t// Prevent native context menu on actions\n\t\t\tif (!this.options.allowContextMenu) {\n\t\t\t\tthis.viewItemDisposables.set(item, DOM.addDisposableListener(actionViewItemElement, DOM.EventType.CONTEXT_MENU, (e: DOM.EventLike) => {\n\t\t\t\t\tDOM.EventHelper.stop(e, true);\n\t\t\t\t}));\n\t\t\t}\n\n\t\t\titem.actionRunner = this._actionRunner;\n\t\t\titem.setActionContext(this.context);\n\t\t\titem.render(actionViewItemElement);\n\n\t\t\tif (index === null || index < 0 || index >= this.actionsList.children.length) {\n\t\t\t\tthis.actionsList.appendChild(actionViewItemElement);\n\t\t\t\tthis.viewItems.push(item);\n\t\t\t} else {\n\t\t\t\tthis.actionsList.insertBefore(actionViewItemElement, this.actionsList.children[index]);\n\t\t\t\tthis.viewItems.splice(index, 0, item);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t});\n\n\t\t// We need to allow for the first enabled item to be focused on using tab navigation #106441\n\t\tif (this.focusable) {\n\t\t\tlet didFocus = false;\n\t\t\tfor (const item of this.viewItems) {\n\t\t\t\tif (!(item instanceof BaseActionViewItem)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tlet focus: boolean;\n\t\t\t\tif (didFocus) {\n\t\t\t\t\tfocus = false; // already focused an item\n\t\t\t\t} else if (item.action.id === Separator.ID) {\n\t\t\t\t\tfocus = false; // never focus a separator\n\t\t\t\t} else if (!item.isEnabled() && this.options.focusOnlyEnabledItems) {\n\t\t\t\t\tfocus = false; // never focus a disabled item\n\t\t\t\t} else {\n\t\t\t\t\tfocus = true;\n\t\t\t\t}\n\n\t\t\t\tif (focus) {\n\t\t\t\t\titem.setFocusable(true);\n\t\t\t\t\tdidFocus = true;\n\t\t\t\t} else {\n\t\t\t\t\titem.setFocusable(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof this.focusedItem === 'number') {\n\t\t\t// After a clear actions might be re-added to simply toggle some actions. We should preserve focus #97128\n\t\t\tthis.focus(this.focusedItem);\n\t\t}\n\t\tthis.refreshRole();\n\t}\n\n\tgetWidth(index: number): number {\n\t\tif (index >= 0 && index < this.actionsList.children.length) {\n\t\t\tconst item = this.actionsList.children.item(index);\n\t\t\tif (item) {\n\t\t\t\treturn item.clientWidth;\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\tpull(index: number): void {\n\t\tif (index >= 0 && index < this.viewItems.length) {\n\t\t\tthis.actionsList.childNodes[index].remove();\n\t\t\tthis.viewItemDisposables.deleteAndDispose(this.viewItems[index]);\n\t\t\tdispose(this.viewItems.splice(index, 1));\n\t\t\tthis.refreshRole();\n\t\t}\n\t}\n\n\tclear(): void {\n\t\tif (this.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.viewItems = dispose(this.viewItems);\n\t\tthis.viewItemDisposables.clearAndDisposeAll();\n\t\tDOM.clearNode(this.actionsList);\n\t\tthis.refreshRole();\n\t}\n\n\tlength(): number {\n\t\treturn this.viewItems.length;\n\t}\n\n\tisEmpty(): boolean {\n\t\treturn this.viewItems.length === 0;\n\t}\n\n\tfocus(index?: number): void;\n\tfocus(selectFirst?: boolean): void;\n\tfocus(arg?: number | boolean): void {\n\t\tlet selectFirst: boolean = false;\n\t\tlet index: number | undefined = undefined;\n\t\tif (arg === undefined) {\n\t\t\tselectFirst = true;\n\t\t} else if (typeof arg === 'number') {\n\t\t\tindex = arg;\n\t\t} else if (typeof arg === 'boolean') {\n\t\t\tselectFirst = arg;\n\t\t}\n\n\t\tif (selectFirst && typeof this.focusedItem === 'undefined') {\n\t\t\tconst firstEnabled = this.viewItems.findIndex(item => item.isEnabled());\n\t\t\t// Focus the first enabled item\n\t\t\tthis.focusedItem = firstEnabled === -1 ? undefined : firstEnabled;\n\t\t\tthis.updateFocus(undefined, undefined, true);\n\t\t} else {\n\t\t\tif (index !== undefined) {\n\t\t\t\tthis.focusedItem = index;\n\t\t\t}\n\n\t\t\tthis.updateFocus(undefined, undefined, true);\n\t\t}\n\t}\n\n\tprivate focusFirst(): boolean {\n\t\tthis.focusedItem = this.length() - 1;\n\t\treturn this.focusNext(true);\n\t}\n\n\tprivate focusLast(): boolean {\n\t\tthis.focusedItem = 0;\n\t\treturn this.focusPrevious(true);\n\t}\n\n\tprotected focusNext(forceLoop?: boolean, forceFocus?: boolean): boolean {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\tthis.focusedItem = this.viewItems.length - 1;\n\t\t} else if (this.viewItems.length <= 1) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst startIndex = this.focusedItem;\n\t\tlet item: IActionViewItem;\n\t\tdo {\n\n\t\t\tif (!forceLoop && this.options.preventLoopNavigation && this.focusedItem + 1 >= this.viewItems.length) {\n\t\t\t\tthis.focusedItem = startIndex;\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis.focusedItem = (this.focusedItem + 1) % this.viewItems.length;\n\t\t\titem = this.viewItems[this.focusedItem];\n\t\t} while (this.focusedItem !== startIndex && ((this.options.focusOnlyEnabledItems && !item.isEnabled()) || item.action.id === Separator.ID));\n\n\t\tthis.updateFocus(undefined, undefined, forceFocus);\n\t\treturn true;\n\t}\n\n\tprotected focusPrevious(forceLoop?: boolean): boolean {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\tthis.focusedItem = 0;\n\t\t} else if (this.viewItems.length <= 1) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst startIndex = this.focusedItem;\n\t\tlet item: IActionViewItem;\n\n\t\tdo {\n\t\t\tthis.focusedItem = this.focusedItem - 1;\n\t\t\tif (this.focusedItem < 0) {\n\t\t\t\tif (!forceLoop && this.options.preventLoopNavigation) {\n\t\t\t\t\tthis.focusedItem = startIndex;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tthis.focusedItem = this.viewItems.length - 1;\n\t\t\t}\n\t\t\titem = this.viewItems[this.focusedItem];\n\t\t} while (this.focusedItem !== startIndex && ((this.options.focusOnlyEnabledItems && !item.isEnabled()) || item.action.id === Separator.ID));\n\n\n\t\tthis.updateFocus(true);\n\t\treturn true;\n\t}\n\n\tprotected updateFocus(fromRight?: boolean, preventScroll?: boolean, forceFocus: boolean = false): void {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\tthis.actionsList.focus({ preventScroll });\n\t\t}\n\n\t\tif (this.previouslyFocusedItem !== undefined && this.previouslyFocusedItem !== this.focusedItem) {\n\t\t\tthis.viewItems[this.previouslyFocusedItem]?.blur();\n\t\t}\n\t\tconst actionViewItem = this.focusedItem !== undefined ? this.viewItems[this.focusedItem] : undefined;\n\t\tif (actionViewItem) {\n\t\t\tlet focusItem = true;\n\n\t\t\tif (!types.isFunction(actionViewItem.focus)) {\n\t\t\t\tfocusItem = false;\n\t\t\t}\n\n\t\t\tif (this.options.focusOnlyEnabledItems && types.isFunction(actionViewItem.isEnabled) && !actionViewItem.isEnabled()) {\n\t\t\t\tfocusItem = false;\n\t\t\t}\n\n\t\t\tif (actionViewItem.action.id === Separator.ID) {\n\t\t\t\tfocusItem = false;\n\t\t\t}\n\t\t\tif (!focusItem) {\n\t\t\t\tthis.actionsList.focus({ preventScroll });\n\t\t\t\tthis.previouslyFocusedItem = undefined;\n\t\t\t} else if (forceFocus || this.previouslyFocusedItem !== this.focusedItem) {\n\t\t\t\tactionViewItem.focus(fromRight);\n\t\t\t\tthis.previouslyFocusedItem = this.focusedItem;\n\t\t\t}\n\t\t\tif (focusItem) {\n\t\t\t\tactionViewItem.showHover?.();\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate doTrigger(event: StandardKeyboardEvent): void {\n\t\tif (typeof this.focusedItem === 'undefined') {\n\t\t\treturn; //nothing to focus\n\t\t}\n\n\t\t// trigger action\n\t\tconst actionViewItem = this.viewItems[this.focusedItem];\n\t\tif (actionViewItem instanceof BaseActionViewItem) {\n\t\t\tconst context = (actionViewItem._context === null || actionViewItem._context === undefined) ? event : actionViewItem._context;\n\t\t\tthis.run(actionViewItem._action, context);\n\t\t}\n\t}\n\n\tasync run(action: IAction, context?: unknown): Promise<void> {\n\t\tawait this._actionRunner.run(action, context);\n\t}\n\n\toverride dispose(): void {\n\t\tthis._context = undefined;\n\t\tthis.viewItems = dispose(this.viewItems);\n\t\tthis.getContainer().remove();\n\t\tsuper.dispose();\n\t}\n}\n"]}
@@ -22,6 +22,7 @@ export class DropdownMenuActionViewItem extends BaseActionViewItem {
22
22
  this.actionItem = container;
23
23
  const labelRenderer = (el) => {
24
24
  this.element = append(el, $('a.action-label'));
25
+ this.setAriaLabelAttributes(this.element);
25
26
  return this.renderLabel(this.element);
26
27
  };
27
28
  const isActionsArray = Array.isArray(this.menuActionsOrProvider);
@@ -74,6 +75,12 @@ export class DropdownMenuActionViewItem extends BaseActionViewItem {
74
75
  }
75
76
  return null;
76
77
  }
78
+ setAriaLabelAttributes(element) {
79
+ element.setAttribute('role', 'button');
80
+ element.setAttribute('aria-haspopup', 'true');
81
+ element.setAttribute('aria-expanded', 'false');
82
+ element.ariaLabel = this._action.label || '';
83
+ }
77
84
  getTooltip() {
78
85
  let title = null;
79
86
  if (this.action.tooltip) {
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/browser/ui/dropdown/dropdownActionViewItem.ts","vs/base/browser/ui/dropdown/dropdownActionViewItem.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAInD,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,kBAAkB,EAA8B,MAAM,iCAAiC,CAAC;AAEjG,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAA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,CAAC,MAAM,CAAC,KAAK,CAAC;QAC3B,CAAC;QAED,OAAO,KAAK,IAAI,SAAS,CAAC;IAC3B,CAAC;IAEQ,gBAAgB,CAAC,UAAmB;QAC5C,KAAK,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAEnC,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;gBACnC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,OAAO,GAAG,UAAU,CAAC;YACpD,CAAC;iBAAM,CAAC;gBACP,IAAI,CAAC,YAAY,CAAC,WAAW,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;YACzD,CAAC;QACF,CAAC;IACF,CAAC;IAED,IAAI;QACH,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAEkB,aAAa;QAC/B,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;QACtC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACxD,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;CACD","file":"dropdownActionViewItem.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["\nimport { IAction, IActionRunner } from '../../../common/actions.js';\nimport { Emitter } from '../../../common/event.js';\nimport { ResolvedKeybinding } from '../../../common/keybindings.js';\nimport { IDisposable } from '../../../common/lifecycle.js';\nimport { IContextMenuProvider } from '../../contextmenu.js';\nimport { $, append } from '../../dom.js';\nimport { IActionViewItemProvider } from '../actionbar/actionbar.js';\nimport { BaseActionViewItem, IBaseActionViewItemOptions } from '../actionbar/actionViewItems.js';\nimport { AnchorAlignment } from '../contextview/contextview.js';\nimport { getBaseLayerHoverDelegate } from '../hover/hoverDelegate2.js';\nimport { getDefaultHoverDelegate } from '../hover/hoverDelegateFactory.js';\nimport './dropdown.css';\nimport { DropdownMenu, IActionProvider, IDropdownMenuOptions, ILabelRenderer } from './dropdown.js';\n\nexport interface IKeybindingProvider {\n\t(action: IAction): ResolvedKeybinding | undefined;\n}\n\nexport interface IAnchorAlignmentProvider {\n\t(): AnchorAlignment;\n}\n\nexport interface IDropdownMenuActionViewItemOptions extends IBaseActionViewItemOptions {\n\treadonly actionViewItemProvider?: IActionViewItemProvider;\n\treadonly keybindingProvider?: IKeybindingProvider;\n\treadonly actionRunner?: IActionRunner;\n\treadonly classNames?: string[] | string;\n\treadonly anchorAlignmentProvider?: IAnchorAlignmentProvider;\n\treadonly menuAsChild?: boolean;\n\treadonly skipTelemetry?: boolean;\n}\n\nexport class DropdownMenuActionViewItem extends BaseActionViewItem {\n\tprivate menuActionsOrProvider: readonly IAction[] | IActionProvider;\n\tprivate dropdownMenu: DropdownMenu | undefined;\n\tprivate contextMenuProvider: IContextMenuProvider;\n\tprivate actionItem: HTMLElement | null = null;\n\n\tprivate _onDidChangeVisibility = this._register(new Emitter<boolean>());\n\tget onDidChangeVisibility() { return this._onDidChangeVisibility.event; }\n\n\tprotected override readonly options: IDropdownMenuActionViewItemOptions;\n\n\tconstructor(\n\t\taction: IAction,\n\t\tmenuActionsOrProvider: readonly IAction[] | IActionProvider,\n\t\tcontextMenuProvider: IContextMenuProvider,\n\t\toptions: IDropdownMenuActionViewItemOptions = Object.create(null)\n\t) {\n\t\tsuper(null, action, options);\n\n\t\tthis.menuActionsOrProvider = menuActionsOrProvider;\n\t\tthis.contextMenuProvider = contextMenuProvider;\n\t\tthis.options = options;\n\n\t\tif (this.options.actionRunner) {\n\t\t\tthis.actionRunner = this.options.actionRunner;\n\t\t}\n\t}\n\n\toverride render(container: HTMLElement): void {\n\t\tthis.actionItem = container;\n\n\t\tconst labelRenderer: ILabelRenderer = (el: HTMLElement): IDisposable | null => {\n\t\t\tthis.element = append(el, $('a.action-label'));\n\t\t\treturn this.renderLabel(this.element);\n\t\t};\n\n\t\tconst isActionsArray = Array.isArray(this.menuActionsOrProvider);\n\t\tconst options: IDropdownMenuOptions = {\n\t\t\tcontextMenuProvider: this.contextMenuProvider,\n\t\t\tlabelRenderer: labelRenderer,\n\t\t\tmenuAsChild: this.options.menuAsChild,\n\t\t\tactions: isActionsArray ? this.menuActionsOrProvider as IAction[] : undefined,\n\t\t\tactionProvider: isActionsArray ? undefined : this.menuActionsOrProvider as IActionProvider,\n\t\t\tskipTelemetry: this.options.skipTelemetry\n\t\t};\n\n\t\tthis.dropdownMenu = this._register(new DropdownMenu(container, options));\n\t\tthis._register(this.dropdownMenu.onDidChangeVisibility(visible => {\n\t\t\tthis.element?.setAttribute('aria-expanded', `${visible}`);\n\t\t\tthis._onDidChangeVisibility.fire(visible);\n\t\t}));\n\n\t\tthis.dropdownMenu.menuOptions = {\n\t\t\tactionViewItemProvider: this.options.actionViewItemProvider,\n\t\t\tactionRunner: this.actionRunner,\n\t\t\tgetKeyBinding: this.options.keybindingProvider,\n\t\t\tcontext: this._context\n\t\t};\n\n\t\tif (this.options.anchorAlignmentProvider) {\n\t\t\tconst that = this;\n\n\t\t\tthis.dropdownMenu.menuOptions = {\n\t\t\t\t...this.dropdownMenu.menuOptions,\n\t\t\t\tget anchorAlignment(): AnchorAlignment {\n\t\t\t\t\treturn that.options.anchorAlignmentProvider!();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tthis.updateTooltip();\n\t\tthis.updateEnabled();\n\t}\n\n\tprotected renderLabel(element: HTMLElement): IDisposable | null {\n\t\tlet classNames: string[] = [];\n\n\t\tif (typeof this.options.classNames === 'string') {\n\t\t\tclassNames = this.options.classNames.split(/\\s+/g).filter(s => !!s);\n\t\t} else if (this.options.classNames) {\n\t\t\tclassNames = this.options.classNames;\n\t\t}\n\n\t\t// todo@aeschli: remove codicon, should come through `this.options.classNames`\n\t\tif (!classNames.find(c => c === 'icon')) {\n\t\t\tclassNames.push('codicon');\n\t\t}\n\n\t\telement.classList.add(...classNames);\n\n\t\tif (this._action.label) {\n\t\t\tthis._register(getBaseLayerHoverDelegate().setupManagedHover(this.options.hoverDelegate ?? getDefaultHoverDelegate('mouse'), element, this._action.label));\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tprotected override getTooltip(): string | undefined {\n\t\tlet title: string | null = null;\n\n\t\tif (this.action.tooltip) {\n\t\t\ttitle = this.action.tooltip;\n\t\t} else if (this.action.label) {\n\t\t\ttitle = this.action.label;\n\t\t}\n\n\t\treturn title ?? undefined;\n\t}\n\n\toverride setActionContext(newContext: unknown): void {\n\t\tsuper.setActionContext(newContext);\n\n\t\tif (this.dropdownMenu) {\n\t\t\tif (this.dropdownMenu.menuOptions) {\n\t\t\t\tthis.dropdownMenu.menuOptions.context = newContext;\n\t\t\t} else {\n\t\t\t\tthis.dropdownMenu.menuOptions = { context: newContext };\n\t\t\t}\n\t\t}\n\t}\n\n\tshow(): void {\n\t\tthis.dropdownMenu?.show();\n\t}\n\n\tprotected override updateEnabled(): void {\n\t\tconst disabled = !this.action.enabled;\n\t\tthis.actionItem?.classList.toggle('disabled', disabled);\n\t\tthis.element?.classList.toggle('disabled', disabled);\n\t}\n}\n","\nimport { IAction, IActionRunner } from '../../../common/actions.js';\nimport { Emitter } from '../../../common/event.js';\nimport { ResolvedKeybinding } from '../../../common/keybindings.js';\nimport { IDisposable } from '../../../common/lifecycle.js';\nimport { IContextMenuProvider } from '../../contextmenu.js';\nimport { $, append } from '../../dom.js';\nimport { IActionViewItemProvider } from '../actionbar/actionbar.js';\nimport { BaseActionViewItem, IBaseActionViewItemOptions } from '../actionbar/actionViewItems.js';\nimport { AnchorAlignment } from '../contextview/contextview.js';\nimport { getBaseLayerHoverDelegate } from '../hover/hoverDelegate2.js';\nimport { getDefaultHoverDelegate } from '../hover/hoverDelegateFactory.js';\nimport './dropdown.css';\nimport { DropdownMenu, IActionProvider, IDropdownMenuOptions, ILabelRenderer } from './dropdown.js';\n\nexport interface IKeybindingProvider {\n\t(action: IAction): ResolvedKeybinding | undefined;\n}\n\nexport interface IAnchorAlignmentProvider {\n\t(): AnchorAlignment;\n}\n\nexport interface IDropdownMenuActionViewItemOptions extends IBaseActionViewItemOptions {\n\treadonly actionViewItemProvider?: IActionViewItemProvider;\n\treadonly keybindingProvider?: IKeybindingProvider;\n\treadonly actionRunner?: IActionRunner;\n\treadonly classNames?: string[] | string;\n\treadonly anchorAlignmentProvider?: IAnchorAlignmentProvider;\n\treadonly menuAsChild?: boolean;\n\treadonly skipTelemetry?: boolean;\n}\n\nexport class DropdownMenuActionViewItem extends BaseActionViewItem {\n\tprivate menuActionsOrProvider: readonly IAction[] | IActionProvider;\n\tprivate dropdownMenu: DropdownMenu | undefined;\n\tprivate contextMenuProvider: IContextMenuProvider;\n\tprivate actionItem: HTMLElement | null = null;\n\n\tprivate _onDidChangeVisibility = this._register(new Emitter<boolean>());\n\tget onDidChangeVisibility() { return this._onDidChangeVisibility.event; }\n\n\tprotected override readonly options: IDropdownMenuActionViewItemOptions;\n\n\tconstructor(\n\t\taction: IAction,\n\t\tmenuActionsOrProvider: readonly IAction[] | IActionProvider,\n\t\tcontextMenuProvider: IContextMenuProvider,\n\t\toptions: IDropdownMenuActionViewItemOptions = Object.create(null)\n\t) {\n\t\tsuper(null, action, options);\n\n\t\tthis.menuActionsOrProvider = menuActionsOrProvider;\n\t\tthis.contextMenuProvider = contextMenuProvider;\n\t\tthis.options = options;\n\n\t\tif (this.options.actionRunner) {\n\t\t\tthis.actionRunner = this.options.actionRunner;\n\t\t}\n\t}\n\n\toverride render(container: HTMLElement): void {\n\t\tthis.actionItem = container;\n\n\t\tconst labelRenderer: ILabelRenderer = (el: HTMLElement): IDisposable | null => {\n\t\t\tthis.element = append(el, $('a.action-label'));\n\t\t\treturn this.renderLabel(this.element);\n\t\t};\n\n\t\tconst isActionsArray = Array.isArray(this.menuActionsOrProvider);\n\t\tconst options: IDropdownMenuOptions = {\n\t\t\tcontextMenuProvider: this.contextMenuProvider,\n\t\t\tlabelRenderer: labelRenderer,\n\t\t\tmenuAsChild: this.options.menuAsChild,\n\t\t\tactions: isActionsArray ? this.menuActionsOrProvider as IAction[] : undefined,\n\t\t\tactionProvider: isActionsArray ? undefined : this.menuActionsOrProvider as IActionProvider,\n\t\t\tskipTelemetry: this.options.skipTelemetry\n\t\t};\n\n\t\tthis.dropdownMenu = this._register(new DropdownMenu(container, options));\n\t\tthis._register(this.dropdownMenu.onDidChangeVisibility(visible => {\n\t\t\tthis.element?.setAttribute('aria-expanded', `${visible}`);\n\t\t\tthis._onDidChangeVisibility.fire(visible);\n\t\t}));\n\n\t\tthis.dropdownMenu.menuOptions = {\n\t\t\tactionViewItemProvider: this.options.actionViewItemProvider,\n\t\t\tactionRunner: this.actionRunner,\n\t\t\tgetKeyBinding: this.options.keybindingProvider,\n\t\t\tcontext: this._context\n\t\t};\n\n\t\tif (this.options.anchorAlignmentProvider) {\n\t\t\tconst that = this;\n\n\t\t\tthis.dropdownMenu.menuOptions = {\n\t\t\t\t...this.dropdownMenu.menuOptions,\n\t\t\t\tget anchorAlignment(): AnchorAlignment {\n\t\t\t\t\treturn that.options.anchorAlignmentProvider!();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tthis.updateTooltip();\n\t\tthis.updateEnabled();\n\t}\n\n\tprotected renderLabel(element: HTMLElement): IDisposable | null {\n\t\tlet classNames: string[] = [];\n\n\t\tif (typeof this.options.classNames === 'string') {\n\t\t\tclassNames = this.options.classNames.split(/\\s+/g).filter(s => !!s);\n\t\t} else if (this.options.classNames) {\n\t\t\tclassNames = this.options.classNames;\n\t\t}\n\n\t\t// todo@aeschli: remove codicon, should come through `this.options.classNames`\n\t\tif (!classNames.find(c => c === 'icon')) {\n\t\t\tclassNames.push('codicon');\n\t\t}\n\n\t\telement.classList.add(...classNames);\n\n\t\tif (this._action.label) {\n\t\t\tthis._register(getBaseLayerHoverDelegate().setupManagedHover(this.options.hoverDelegate ?? getDefaultHoverDelegate('mouse'), element, this._action.label));\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tprotected override getTooltip(): string | undefined {\n\t\tlet title: string | null = null;\n\n\t\tif (this.action.tooltip) {\n\t\t\ttitle = this.action.tooltip;\n\t\t} else if (this.action.label) {\n\t\t\ttitle = this.action.label;\n\t\t}\n\n\t\treturn title ?? undefined;\n\t}\n\n\toverride setActionContext(newContext: unknown): void {\n\t\tsuper.setActionContext(newContext);\n\n\t\tif (this.dropdownMenu) {\n\t\t\tif (this.dropdownMenu.menuOptions) {\n\t\t\t\tthis.dropdownMenu.menuOptions.context = newContext;\n\t\t\t} else {\n\t\t\t\tthis.dropdownMenu.menuOptions = { context: newContext };\n\t\t\t}\n\t\t}\n\t}\n\n\tshow(): void {\n\t\tthis.dropdownMenu?.show();\n\t}\n\n\tprotected override updateEnabled(): void {\n\t\tconst disabled = !this.action.enabled;\n\t\tthis.actionItem?.classList.toggle('disabled', disabled);\n\t\tthis.element?.classList.toggle('disabled', disabled);\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/browser/ui/dropdown/dropdownActionViewItem.ts","vs/base/browser/ui/dropdown/dropdownActionViewItem.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAInD,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,kBAAkB,EAA8B,MAAM,iCAAiC,CAAC;AAEjG,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAyD,MAAM,eAAe,CAAC;AAoBpG,MAAM,OAAO,0BAA2B,SAAQ,kBAAkB;IAOjE,IAAI,qBAAqB,KAAK,OAAO,IAAI,CAAC,sB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CAAC;QAEhC,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACzB,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;QAC7B,CAAC;aAAM,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAC9B,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;QAC3B,CAAC;QAED,OAAO,KAAK,IAAI,SAAS,CAAC;IAC3B,CAAC;IAEQ,gBAAgB,CAAC,UAAmB;QAC5C,KAAK,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAEnC,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;gBACnC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,OAAO,GAAG,UAAU,CAAC;YACpD,CAAC;iBAAM,CAAC;gBACP,IAAI,CAAC,YAAY,CAAC,WAAW,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;YACzD,CAAC;QACF,CAAC;IACF,CAAC;IAED,IAAI;QACH,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAEkB,aAAa;QAC/B,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;QACtC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACxD,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;CACD","file":"dropdownActionViewItem.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["\nimport { IAction, IActionRunner } from '../../../common/actions.js';\nimport { Emitter } from '../../../common/event.js';\nimport { ResolvedKeybinding } from '../../../common/keybindings.js';\nimport { IDisposable } from '../../../common/lifecycle.js';\nimport { IContextMenuProvider } from '../../contextmenu.js';\nimport { $, append } from '../../dom.js';\nimport { IActionViewItemProvider } from '../actionbar/actionbar.js';\nimport { BaseActionViewItem, IBaseActionViewItemOptions } from '../actionbar/actionViewItems.js';\nimport { AnchorAlignment } from '../contextview/contextview.js';\nimport { getBaseLayerHoverDelegate } from '../hover/hoverDelegate2.js';\nimport { getDefaultHoverDelegate } from '../hover/hoverDelegateFactory.js';\nimport './dropdown.css';\nimport { DropdownMenu, IActionProvider, IDropdownMenuOptions, ILabelRenderer } from './dropdown.js';\n\nexport interface IKeybindingProvider {\n\t(action: IAction): ResolvedKeybinding | undefined;\n}\n\nexport interface IAnchorAlignmentProvider {\n\t(): AnchorAlignment;\n}\n\nexport interface IDropdownMenuActionViewItemOptions extends IBaseActionViewItemOptions {\n\treadonly actionViewItemProvider?: IActionViewItemProvider;\n\treadonly keybindingProvider?: IKeybindingProvider;\n\treadonly actionRunner?: IActionRunner;\n\treadonly classNames?: string[] | string;\n\treadonly anchorAlignmentProvider?: IAnchorAlignmentProvider;\n\treadonly menuAsChild?: boolean;\n\treadonly skipTelemetry?: boolean;\n}\n\nexport class DropdownMenuActionViewItem extends BaseActionViewItem {\n\tprivate menuActionsOrProvider: readonly IAction[] | IActionProvider;\n\tprivate dropdownMenu: DropdownMenu | undefined;\n\tprivate contextMenuProvider: IContextMenuProvider;\n\tprivate actionItem: HTMLElement | null = null;\n\n\tprivate _onDidChangeVisibility = this._register(new Emitter<boolean>());\n\tget onDidChangeVisibility() { return this._onDidChangeVisibility.event; }\n\n\tprotected override readonly options: IDropdownMenuActionViewItemOptions;\n\n\tconstructor(\n\t\taction: IAction,\n\t\tmenuActionsOrProvider: readonly IAction[] | IActionProvider,\n\t\tcontextMenuProvider: IContextMenuProvider,\n\t\toptions: IDropdownMenuActionViewItemOptions = Object.create(null)\n\t) {\n\t\tsuper(null, action, options);\n\n\t\tthis.menuActionsOrProvider = menuActionsOrProvider;\n\t\tthis.contextMenuProvider = contextMenuProvider;\n\t\tthis.options = options;\n\n\t\tif (this.options.actionRunner) {\n\t\t\tthis.actionRunner = this.options.actionRunner;\n\t\t}\n\t}\n\n\toverride render(container: HTMLElement): void {\n\t\tthis.actionItem = container;\n\n\t\tconst labelRenderer: ILabelRenderer = (el: HTMLElement): IDisposable | null => {\n\t\t\tthis.element = append(el, $('a.action-label'));\n\t\t\tthis.setAriaLabelAttributes(this.element);\n\t\t\treturn this.renderLabel(this.element);\n\t\t};\n\n\t\tconst isActionsArray = Array.isArray(this.menuActionsOrProvider);\n\t\tconst options: IDropdownMenuOptions = {\n\t\t\tcontextMenuProvider: this.contextMenuProvider,\n\t\t\tlabelRenderer: labelRenderer,\n\t\t\tmenuAsChild: this.options.menuAsChild,\n\t\t\tactions: isActionsArray ? this.menuActionsOrProvider as IAction[] : undefined,\n\t\t\tactionProvider: isActionsArray ? undefined : this.menuActionsOrProvider as IActionProvider,\n\t\t\tskipTelemetry: this.options.skipTelemetry\n\t\t};\n\n\t\tthis.dropdownMenu = this._register(new DropdownMenu(container, options));\n\t\tthis._register(this.dropdownMenu.onDidChangeVisibility(visible => {\n\t\t\tthis.element?.setAttribute('aria-expanded', `${visible}`);\n\t\t\tthis._onDidChangeVisibility.fire(visible);\n\t\t}));\n\n\t\tthis.dropdownMenu.menuOptions = {\n\t\t\tactionViewItemProvider: this.options.actionViewItemProvider,\n\t\t\tactionRunner: this.actionRunner,\n\t\t\tgetKeyBinding: this.options.keybindingProvider,\n\t\t\tcontext: this._context\n\t\t};\n\n\t\tif (this.options.anchorAlignmentProvider) {\n\t\t\tconst that = this;\n\n\t\t\tthis.dropdownMenu.menuOptions = {\n\t\t\t\t...this.dropdownMenu.menuOptions,\n\t\t\t\tget anchorAlignment(): AnchorAlignment {\n\t\t\t\t\treturn that.options.anchorAlignmentProvider!();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tthis.updateTooltip();\n\t\tthis.updateEnabled();\n\t}\n\n\tprotected renderLabel(element: HTMLElement): IDisposable | null {\n\t\tlet classNames: string[] = [];\n\n\t\tif (typeof this.options.classNames === 'string') {\n\t\t\tclassNames = this.options.classNames.split(/\\s+/g).filter(s => !!s);\n\t\t} else if (this.options.classNames) {\n\t\t\tclassNames = this.options.classNames;\n\t\t}\n\n\t\t// todo@aeschli: remove codicon, should come through `this.options.classNames`\n\t\tif (!classNames.find(c => c === 'icon')) {\n\t\t\tclassNames.push('codicon');\n\t\t}\n\n\t\telement.classList.add(...classNames);\n\n\t\tif (this._action.label) {\n\t\t\tthis._register(getBaseLayerHoverDelegate().setupManagedHover(this.options.hoverDelegate ?? getDefaultHoverDelegate('mouse'), element, this._action.label));\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tprotected setAriaLabelAttributes(element: HTMLElement): void {\n\t\telement.setAttribute('role', 'button');\n\t\telement.setAttribute('aria-haspopup', 'true');\n\t\telement.setAttribute('aria-expanded', 'false');\n\t\telement.ariaLabel = this._action.label || '';\n\t}\n\n\tprotected override getTooltip(): string | undefined {\n\t\tlet title: string | null = null;\n\n\t\tif (this.action.tooltip) {\n\t\t\ttitle = this.action.tooltip;\n\t\t} else if (this.action.label) {\n\t\t\ttitle = this.action.label;\n\t\t}\n\n\t\treturn title ?? undefined;\n\t}\n\n\toverride setActionContext(newContext: unknown): void {\n\t\tsuper.setActionContext(newContext);\n\n\t\tif (this.dropdownMenu) {\n\t\t\tif (this.dropdownMenu.menuOptions) {\n\t\t\t\tthis.dropdownMenu.menuOptions.context = newContext;\n\t\t\t} else {\n\t\t\t\tthis.dropdownMenu.menuOptions = { context: newContext };\n\t\t\t}\n\t\t}\n\t}\n\n\tshow(): void {\n\t\tthis.dropdownMenu?.show();\n\t}\n\n\tprotected override updateEnabled(): void {\n\t\tconst disabled = !this.action.enabled;\n\t\tthis.actionItem?.classList.toggle('disabled', disabled);\n\t\tthis.element?.classList.toggle('disabled', disabled);\n\t}\n}\n","\nimport { IAction, IActionRunner } from '../../../common/actions.js';\nimport { Emitter } from '../../../common/event.js';\nimport { ResolvedKeybinding } from '../../../common/keybindings.js';\nimport { IDisposable } from '../../../common/lifecycle.js';\nimport { IContextMenuProvider } from '../../contextmenu.js';\nimport { $, append } from '../../dom.js';\nimport { IActionViewItemProvider } from '../actionbar/actionbar.js';\nimport { BaseActionViewItem, IBaseActionViewItemOptions } from '../actionbar/actionViewItems.js';\nimport { AnchorAlignment } from '../contextview/contextview.js';\nimport { getBaseLayerHoverDelegate } from '../hover/hoverDelegate2.js';\nimport { getDefaultHoverDelegate } from '../hover/hoverDelegateFactory.js';\nimport './dropdown.css';\nimport { DropdownMenu, IActionProvider, IDropdownMenuOptions, ILabelRenderer } from './dropdown.js';\n\nexport interface IKeybindingProvider {\n\t(action: IAction): ResolvedKeybinding | undefined;\n}\n\nexport interface IAnchorAlignmentProvider {\n\t(): AnchorAlignment;\n}\n\nexport interface IDropdownMenuActionViewItemOptions extends IBaseActionViewItemOptions {\n\treadonly actionViewItemProvider?: IActionViewItemProvider;\n\treadonly keybindingProvider?: IKeybindingProvider;\n\treadonly actionRunner?: IActionRunner;\n\treadonly classNames?: string[] | string;\n\treadonly anchorAlignmentProvider?: IAnchorAlignmentProvider;\n\treadonly menuAsChild?: boolean;\n\treadonly skipTelemetry?: boolean;\n}\n\nexport class DropdownMenuActionViewItem extends BaseActionViewItem {\n\tprivate menuActionsOrProvider: readonly IAction[] | IActionProvider;\n\tprivate dropdownMenu: DropdownMenu | undefined;\n\tprivate contextMenuProvider: IContextMenuProvider;\n\tprivate actionItem: HTMLElement | null = null;\n\n\tprivate _onDidChangeVisibility = this._register(new Emitter<boolean>());\n\tget onDidChangeVisibility() { return this._onDidChangeVisibility.event; }\n\n\tprotected override readonly options: IDropdownMenuActionViewItemOptions;\n\n\tconstructor(\n\t\taction: IAction,\n\t\tmenuActionsOrProvider: readonly IAction[] | IActionProvider,\n\t\tcontextMenuProvider: IContextMenuProvider,\n\t\toptions: IDropdownMenuActionViewItemOptions = Object.create(null)\n\t) {\n\t\tsuper(null, action, options);\n\n\t\tthis.menuActionsOrProvider = menuActionsOrProvider;\n\t\tthis.contextMenuProvider = contextMenuProvider;\n\t\tthis.options = options;\n\n\t\tif (this.options.actionRunner) {\n\t\t\tthis.actionRunner = this.options.actionRunner;\n\t\t}\n\t}\n\n\toverride render(container: HTMLElement): void {\n\t\tthis.actionItem = container;\n\n\t\tconst labelRenderer: ILabelRenderer = (el: HTMLElement): IDisposable | null => {\n\t\t\tthis.element = append(el, $('a.action-label'));\n\t\t\tthis.setAriaLabelAttributes(this.element);\n\t\t\treturn this.renderLabel(this.element);\n\t\t};\n\n\t\tconst isActionsArray = Array.isArray(this.menuActionsOrProvider);\n\t\tconst options: IDropdownMenuOptions = {\n\t\t\tcontextMenuProvider: this.contextMenuProvider,\n\t\t\tlabelRenderer: labelRenderer,\n\t\t\tmenuAsChild: this.options.menuAsChild,\n\t\t\tactions: isActionsArray ? this.menuActionsOrProvider as IAction[] : undefined,\n\t\t\tactionProvider: isActionsArray ? undefined : this.menuActionsOrProvider as IActionProvider,\n\t\t\tskipTelemetry: this.options.skipTelemetry\n\t\t};\n\n\t\tthis.dropdownMenu = this._register(new DropdownMenu(container, options));\n\t\tthis._register(this.dropdownMenu.onDidChangeVisibility(visible => {\n\t\t\tthis.element?.setAttribute('aria-expanded', `${visible}`);\n\t\t\tthis._onDidChangeVisibility.fire(visible);\n\t\t}));\n\n\t\tthis.dropdownMenu.menuOptions = {\n\t\t\tactionViewItemProvider: this.options.actionViewItemProvider,\n\t\t\tactionRunner: this.actionRunner,\n\t\t\tgetKeyBinding: this.options.keybindingProvider,\n\t\t\tcontext: this._context\n\t\t};\n\n\t\tif (this.options.anchorAlignmentProvider) {\n\t\t\tconst that = this;\n\n\t\t\tthis.dropdownMenu.menuOptions = {\n\t\t\t\t...this.dropdownMenu.menuOptions,\n\t\t\t\tget anchorAlignment(): AnchorAlignment {\n\t\t\t\t\treturn that.options.anchorAlignmentProvider!();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tthis.updateTooltip();\n\t\tthis.updateEnabled();\n\t}\n\n\tprotected renderLabel(element: HTMLElement): IDisposable | null {\n\t\tlet classNames: string[] = [];\n\n\t\tif (typeof this.options.classNames === 'string') {\n\t\t\tclassNames = this.options.classNames.split(/\\s+/g).filter(s => !!s);\n\t\t} else if (this.options.classNames) {\n\t\t\tclassNames = this.options.classNames;\n\t\t}\n\n\t\t// todo@aeschli: remove codicon, should come through `this.options.classNames`\n\t\tif (!classNames.find(c => c === 'icon')) {\n\t\t\tclassNames.push('codicon');\n\t\t}\n\n\t\telement.classList.add(...classNames);\n\n\t\tif (this._action.label) {\n\t\t\tthis._register(getBaseLayerHoverDelegate().setupManagedHover(this.options.hoverDelegate ?? getDefaultHoverDelegate('mouse'), element, this._action.label));\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tprotected setAriaLabelAttributes(element: HTMLElement): void {\n\t\telement.setAttribute('role', 'button');\n\t\telement.setAttribute('aria-haspopup', 'true');\n\t\telement.setAttribute('aria-expanded', 'false');\n\t\telement.ariaLabel = this._action.label || '';\n\t}\n\n\tprotected override getTooltip(): string | undefined {\n\t\tlet title: string | null = null;\n\n\t\tif (this.action.tooltip) {\n\t\t\ttitle = this.action.tooltip;\n\t\t} else if (this.action.label) {\n\t\t\ttitle = this.action.label;\n\t\t}\n\n\t\treturn title ?? undefined;\n\t}\n\n\toverride setActionContext(newContext: unknown): void {\n\t\tsuper.setActionContext(newContext);\n\n\t\tif (this.dropdownMenu) {\n\t\t\tif (this.dropdownMenu.menuOptions) {\n\t\t\t\tthis.dropdownMenu.menuOptions.context = newContext;\n\t\t\t} else {\n\t\t\t\tthis.dropdownMenu.menuOptions = { context: newContext };\n\t\t\t}\n\t\t}\n\t}\n\n\tshow(): void {\n\t\tthis.dropdownMenu?.show();\n\t}\n\n\tprotected override updateEnabled(): void {\n\t\tconst disabled = !this.action.enabled;\n\t\tthis.actionItem?.classList.toggle('disabled', disabled);\n\t\tthis.element?.classList.toggle('disabled', disabled);\n\t}\n}\n"]}
@@ -181,19 +181,6 @@
181
181
  color: var(--vscode-textLink-activeForeground);
182
182
  }
183
183
 
184
- /**
185
- * Spans in markdown hovers need a margin-bottom to avoid looking cramped:
186
- * https://github.com/microsoft/vscode/issues/101496
187
-
188
- * This was later refined to only apply when the last child of a rendered markdown block (before the
189
- * border or a `hr`) uses background color:
190
- * https://github.com/microsoft/vscode/issues/228136
191
- */
192
- .monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) p:last-child [style*="background-color"] {
193
- margin-bottom: 4px;
194
- display: inline-block;
195
- }
196
-
197
184
  /**
198
185
  * Add a slight margin to try vertically align codicons with any text
199
186
  * https://github.com/microsoft/vscode/issues/221359
@@ -321,6 +321,11 @@ export class InputBox extends Widget {
321
321
  }
322
322
  this.state = 'idle';
323
323
  }
324
+ layoutMessage() {
325
+ if (this.state === 'open' && this.contextViewProvider) {
326
+ this.contextViewProvider.layout();
327
+ }
328
+ }
324
329
  onValueChange() {
325
330
  this._onDidChange.fire(this.value);
326
331
  this.validate();
@@ -361,6 +366,7 @@ export class InputBox extends Widget {
361
366
  }
362
367
  layout() {
363
368
  if (!this.mirror) {
369
+ this.layoutMessage();
364
370
  return;
365
371
  }
366
372
  const previousHeight = this.cachedContentHeight;
@@ -370,6 +376,7 @@ export class InputBox extends Widget {
370
376
  this.input.style.height = this.cachedHeight + 'px';
371
377
  this._onDidHeightChange.fire(this.cachedContentHeight);
372
378
  }
379
+ this.layoutMessage();
373
380
  }
374
381
  insertAtCursor(text) {
375
382
  const inputElement = this.inputElement;