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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (508) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.cs.js +2 -2
  3. package/esm/nls.messages.de.js +2 -2
  4. package/esm/nls.messages.es.js +2 -2
  5. package/esm/nls.messages.fr.js +2 -2
  6. package/esm/nls.messages.it.js +2 -2
  7. package/esm/nls.messages.ja.js +2 -2
  8. package/esm/nls.messages.js +1 -1
  9. package/esm/nls.messages.json +1 -1
  10. package/esm/nls.messages.ko.js +2 -2
  11. package/esm/nls.messages.pl.js +2 -2
  12. package/esm/nls.messages.pt-br.js +2 -2
  13. package/esm/nls.messages.ru.js +2 -2
  14. package/esm/nls.messages.tr.js +2 -2
  15. package/esm/nls.messages.zh-cn.js +2 -2
  16. package/esm/nls.messages.zh-tw.js +2 -2
  17. package/esm/nls.metadata.json +38 -6
  18. package/esm/vs/base/browser/browser.js +8 -0
  19. package/esm/vs/base/browser/browser.js.map +1 -1
  20. package/esm/vs/base/browser/contextmenu.js +8 -1
  21. package/esm/vs/base/browser/contextmenu.js.map +1 -1
  22. package/esm/vs/base/browser/dom.js +34 -5
  23. package/esm/vs/base/browser/dom.js.map +1 -1
  24. package/esm/vs/base/browser/dompurify/dompurify.js +2457 -2640
  25. package/esm/vs/base/browser/markdownRenderer.js +48 -21
  26. package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
  27. package/esm/vs/base/browser/pixelRatio.js +3 -2
  28. package/esm/vs/base/browser/pixelRatio.js.map +1 -1
  29. package/esm/vs/base/browser/ui/actionbar/actionViewItems.js +5 -2
  30. package/esm/vs/base/browser/ui/actionbar/actionViewItems.js.map +1 -1
  31. package/esm/vs/base/browser/ui/actionbar/actionbar.js +7 -2
  32. package/esm/vs/base/browser/ui/actionbar/actionbar.js.map +1 -1
  33. package/esm/vs/base/browser/ui/animations/animations.js +68 -40
  34. package/esm/vs/base/browser/ui/animations/animations.js.map +1 -1
  35. package/esm/vs/base/browser/ui/button/button.js +7 -0
  36. package/esm/vs/base/browser/ui/button/button.js.map +1 -1
  37. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  38. package/esm/vs/base/browser/ui/contextview/contextview.css +15 -0
  39. package/esm/vs/base/browser/ui/contextview/contextview.js +266 -40
  40. package/esm/vs/base/browser/ui/contextview/contextview.js.map +1 -1
  41. package/esm/vs/base/browser/ui/contextview/windowControlsOverlay.js +72 -0
  42. package/esm/vs/base/browser/ui/contextview/windowControlsOverlay.js.map +1 -0
  43. package/esm/vs/base/browser/ui/dialog/dialog.css +5 -0
  44. package/esm/vs/base/browser/ui/dropdown/dropdown.js +2 -1
  45. package/esm/vs/base/browser/ui/dropdown/dropdown.js.map +1 -1
  46. package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +1 -0
  47. package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js.map +1 -1
  48. package/esm/vs/base/browser/ui/hover/hover.js.map +1 -1
  49. package/esm/vs/base/browser/ui/list/listView.js +87 -15
  50. package/esm/vs/base/browser/ui/list/listView.js.map +1 -1
  51. package/esm/vs/base/browser/ui/list/listWidget.js +37 -15
  52. package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
  53. package/esm/vs/base/browser/ui/menu/menu.js +189 -52
  54. package/esm/vs/base/browser/ui/menu/menu.js.map +1 -1
  55. package/esm/vs/base/browser/ui/radio/radio.css +11 -0
  56. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +2 -1
  57. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
  58. package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
  59. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +14 -8
  60. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
  61. package/esm/vs/base/browser/ui/splitview/splitview.js +11 -7
  62. package/esm/vs/base/browser/ui/splitview/splitview.js.map +1 -1
  63. package/esm/vs/base/browser/ui/toggle/switch.css +16 -7
  64. package/esm/vs/base/browser/ui/toggle/switch.js +9 -6
  65. package/esm/vs/base/browser/ui/toggle/switch.js.map +1 -1
  66. package/esm/vs/base/browser/ui/toolbar/toolbar.css +1 -2
  67. package/esm/vs/base/browser/ui/toolbar/toolbar.js +85 -38
  68. package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
  69. package/esm/vs/base/browser/ui/tree/abstractTree.js +48 -9
  70. package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
  71. package/esm/vs/base/browser/ui/tree/asyncDataTree.js +10 -1
  72. package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
  73. package/esm/vs/base/browser/ui/tree/objectTree.js +3 -0
  74. package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
  75. package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
  76. package/esm/vs/base/common/actions.js +8 -2
  77. package/esm/vs/base/common/actions.js.map +1 -1
  78. package/esm/vs/base/common/arrays.js +4 -4
  79. package/esm/vs/base/common/arrays.js.map +1 -1
  80. package/esm/vs/base/common/async.js +12 -8
  81. package/esm/vs/base/common/async.js.map +1 -1
  82. package/esm/vs/base/common/cancellation.js +25 -0
  83. package/esm/vs/base/common/cancellation.js.map +1 -1
  84. package/esm/vs/base/common/codicons.js +2 -0
  85. package/esm/vs/base/common/codicons.js.map +1 -1
  86. package/esm/vs/base/common/codiconsLibrary.js +2 -0
  87. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  88. package/esm/vs/base/common/color.js +1 -1
  89. package/esm/vs/base/common/color.js.map +1 -1
  90. package/esm/vs/base/common/diff/diff.js +60 -1
  91. package/esm/vs/base/common/diff/diff.js.map +1 -1
  92. package/esm/vs/base/common/event.js +1 -1
  93. package/esm/vs/base/common/event.js.map +1 -1
  94. package/esm/vs/base/common/glob.js +1 -0
  95. package/esm/vs/base/common/glob.js.map +1 -1
  96. package/esm/vs/base/common/htmlContent.js +74 -12
  97. package/esm/vs/base/common/htmlContent.js.map +1 -1
  98. package/esm/vs/base/common/json.js +19 -0
  99. package/esm/vs/base/common/json.js.map +1 -0
  100. package/esm/vs/base/common/network.js +16 -0
  101. package/esm/vs/base/common/network.js.map +1 -1
  102. package/esm/vs/base/common/resources.js +14 -2
  103. package/esm/vs/base/common/resources.js.map +1 -1
  104. package/esm/vs/base/common/strings.js +1 -1
  105. package/esm/vs/base/common/strings.js.map +1 -1
  106. package/esm/vs/base/common/uri.js +2 -2
  107. package/esm/vs/base/common/uri.js.map +1 -1
  108. package/esm/vs/editor/browser/config/editorConfiguration.js +1 -1
  109. package/esm/vs/editor/browser/config/fontMeasurements.js +19 -6
  110. package/esm/vs/editor/browser/config/fontMeasurements.js.map +1 -1
  111. package/esm/vs/editor/browser/controller/dragScrolling.js +3 -3
  112. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +11 -5
  113. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
  114. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +8 -38
  115. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
  116. package/esm/vs/editor/browser/controller/editContext/native/screenReaderContentRich.js +3 -3
  117. package/esm/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +6 -6
  118. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +12 -10
  119. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
  120. package/esm/vs/editor/browser/controller/mouseHandler.js +7 -7
  121. package/esm/vs/editor/browser/controller/mouseTarget.js +3 -3
  122. package/esm/vs/editor/browser/coreCommands.js +2 -2
  123. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  124. package/esm/vs/editor/browser/editorMarkdownSanitizer.js +19 -0
  125. package/esm/vs/editor/browser/editorMarkdownSanitizer.js.map +1 -0
  126. package/esm/vs/editor/browser/gpu/rectangleRenderer.js +1 -1
  127. package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -1
  128. package/esm/vs/editor/browser/observableCodeEditor.js +1 -1
  129. package/esm/vs/editor/browser/services/editorWorkerService.js +3 -2
  130. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  131. package/esm/vs/editor/browser/services/openerService.js +6 -2
  132. package/esm/vs/editor/browser/services/openerService.js.map +1 -1
  133. package/esm/vs/editor/browser/view/domLineBreaksComputer.js +34 -11
  134. package/esm/vs/editor/browser/view/domLineBreaksComputer.js.map +1 -1
  135. package/esm/vs/editor/browser/view/viewController.js +7 -7
  136. package/esm/vs/editor/browser/view/viewController.js.map +1 -1
  137. package/esm/vs/editor/browser/view/viewLayer.js +1 -1
  138. package/esm/vs/editor/browser/view/viewOverlays.js +4 -4
  139. package/esm/vs/editor/browser/view.js +5 -5
  140. package/esm/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js +1 -1
  141. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +11 -3
  142. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  143. package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +6 -6
  144. package/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +12 -12
  145. package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +9 -2
  146. package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js.map +1 -1
  147. package/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js +2 -2
  148. package/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +2 -2
  149. package/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +2 -2
  150. package/esm/vs/editor/browser/viewParts/margin/margin.js +2 -2
  151. package/esm/vs/editor/browser/viewParts/minimap/minimap.js +6 -6
  152. package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +9 -2
  153. package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js.map +1 -1
  154. package/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +5 -5
  155. package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +3 -3
  156. package/esm/vs/editor/browser/viewParts/rulers/rulers.js +2 -2
  157. package/esm/vs/editor/browser/viewParts/rulersGpu/rulersGpu.js +1 -1
  158. package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +3 -3
  159. package/esm/vs/editor/browser/viewParts/selections/selections.js +2 -2
  160. package/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js +2 -2
  161. package/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js +6 -6
  162. package/esm/vs/editor/browser/viewParts/viewLines/viewLineOptions.js +5 -5
  163. package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +11 -11
  164. package/esm/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.js +1 -1
  165. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +2 -2
  166. package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +4 -4
  167. package/esm/vs/editor/browser/viewParts/wordWrapIndicator/wordWrapIndicator.js +2 -2
  168. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +22 -21
  169. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  170. package/esm/vs/editor/browser/widget/diffEditor/commands.js +12 -12
  171. package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +18 -18
  172. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -1
  173. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +3 -3
  174. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +10 -10
  175. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js.map +1 -1
  176. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +2 -2
  177. package/esm/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +4 -4
  178. package/esm/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +21 -3
  179. package/esm/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js.map +1 -1
  180. package/esm/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
  181. package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +10 -10
  182. package/esm/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
  183. package/esm/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -1
  184. package/esm/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +2 -2
  185. package/esm/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
  186. package/esm/vs/editor/browser/widget/multiDiffEditor/colors.js +3 -3
  187. package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollLayout.js +2 -2
  188. package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollLayout.js.map +1 -1
  189. package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollView.js +21 -2
  190. package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollView.js.map +1 -1
  191. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -2
  192. package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +11 -3
  193. package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
  194. package/esm/vs/editor/browser/widget/multiDiffEditor/virtualizedItemManager.js +1 -0
  195. package/esm/vs/editor/browser/widget/multiDiffEditor/virtualizedItemManager.js.map +1 -1
  196. package/esm/vs/editor/common/commands/columnSelectionPasteCommand.js +64 -0
  197. package/esm/vs/editor/common/commands/columnSelectionPasteCommand.js.map +1 -0
  198. package/esm/vs/editor/common/config/editorConfigurationSchema.js +68 -58
  199. package/esm/vs/editor/common/config/editorConfigurationSchema.js.map +1 -1
  200. package/esm/vs/editor/common/config/editorOptions.js +560 -500
  201. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  202. package/esm/vs/editor/common/core/editorColorRegistry.js +71 -71
  203. package/esm/vs/editor/common/core/edits/textEdit.js +16 -0
  204. package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
  205. package/esm/vs/editor/common/cursor/cursor.js +20 -10
  206. package/esm/vs/editor/common/cursor/cursor.js.map +1 -1
  207. package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js +67 -14
  208. package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js.map +1 -1
  209. package/esm/vs/editor/common/cursor/cursorTypeOperations.js +2 -2
  210. package/esm/vs/editor/common/cursor/cursorTypeOperations.js.map +1 -1
  211. package/esm/vs/editor/common/cursorCommon.js +22 -21
  212. package/esm/vs/editor/common/cursorCommon.js.map +1 -1
  213. package/esm/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +21 -8
  214. package/esm/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js.map +1 -1
  215. package/esm/vs/editor/common/diff/documentDiffProvider.js.map +1 -1
  216. package/esm/vs/editor/common/diff/externalLinesDiffComputer.js +38 -26
  217. package/esm/vs/editor/common/diff/externalLinesDiffComputer.js.map +1 -1
  218. package/esm/vs/editor/common/diff/rangeMapping.js +11 -1
  219. package/esm/vs/editor/common/diff/rangeMapping.js.map +1 -1
  220. package/esm/vs/editor/common/diff/verifyLinesDiff.js +28 -0
  221. package/esm/vs/editor/common/diff/verifyLinesDiff.js.map +1 -0
  222. package/esm/vs/editor/common/editorContextKeys.js +53 -53
  223. package/esm/vs/editor/common/languages/languageConfiguration.js +8 -0
  224. package/esm/vs/editor/common/languages/languageConfiguration.js.map +1 -1
  225. package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
  226. package/esm/vs/editor/common/languages.js +56 -56
  227. package/esm/vs/editor/common/model/editStack.js +1 -1
  228. package/esm/vs/editor/common/services/editorWebWorker.js +27 -6
  229. package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
  230. package/esm/vs/editor/common/services/editorWorker.js.map +1 -1
  231. package/esm/vs/editor/common/services/languageService.js +6 -4
  232. package/esm/vs/editor/common/services/languageService.js.map +1 -1
  233. package/esm/vs/editor/common/services/markerDecorationsService.js +21 -2
  234. package/esm/vs/editor/common/services/markerDecorationsService.js.map +1 -1
  235. package/esm/vs/editor/common/standalone/standaloneEnums.js +100 -97
  236. package/esm/vs/editor/common/standalone/standaloneEnums.js.map +1 -1
  237. package/esm/vs/editor/common/standaloneStrings.js +11 -11
  238. package/esm/vs/editor/common/textModelEditSource.js +9 -0
  239. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  240. package/esm/vs/editor/common/viewLayout/viewLayout.js +16 -16
  241. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
  242. package/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +1 -1
  243. package/esm/vs/editor/common/viewModel/viewModelImpl.js +19 -19
  244. package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
  245. package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  246. package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +9 -9
  247. package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  248. package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  249. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +23 -20
  250. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
  251. package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  252. package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
  253. package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  254. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  255. package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  256. package/esm/vs/editor/contrib/codeAction/browser/codeActionModel.js +1 -1
  257. package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  258. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  259. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +25 -10
  260. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
  261. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
  262. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
  263. package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerContribution.js +1 -1
  264. package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +3 -3
  265. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  266. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerParticipant.js +1 -1
  267. package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
  268. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +17 -17
  269. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
  270. package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  271. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
  272. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +39 -39
  273. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
  274. package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  275. package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  276. package/esm/vs/editor/contrib/dropOrPasteInto/browser/pasteEditSession.js +19 -0
  277. package/esm/vs/editor/contrib/dropOrPasteInto/browser/pasteEditSession.js.map +1 -0
  278. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +26 -18
  279. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js.map +1 -1
  280. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  281. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js.map +1 -1
  282. package/esm/vs/editor/contrib/find/browser/findController.js +18 -18
  283. package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
  284. package/esm/vs/editor/contrib/find/browser/findModel.js +6 -6
  285. package/esm/vs/editor/contrib/find/browser/findWidget.js +40 -40
  286. package/esm/vs/editor/contrib/find/browser/findWidget.js.map +1 -1
  287. package/esm/vs/editor/contrib/folding/browser/folding.js +23 -23
  288. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  289. package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  290. package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
  291. package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  292. package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  293. package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  294. package/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +3 -3
  295. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +2 -2
  296. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +4 -4
  297. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js.map +1 -1
  298. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  299. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
  300. package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  301. package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  302. package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  303. package/esm/vs/editor/contrib/hover/browser/contentHoverController.js +9 -3
  304. package/esm/vs/editor/contrib/hover/browser/contentHoverController.js.map +1 -1
  305. package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js +2 -2
  306. package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js +2 -1
  307. package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js.map +1 -1
  308. package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  309. package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  310. package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
  311. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +10 -8
  312. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
  313. package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +6 -6
  314. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  315. package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  316. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +5 -5
  317. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +9 -9
  318. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js +3 -3
  319. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js.map +1 -1
  320. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +21 -21
  321. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -13
  322. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -7
  323. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  324. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +6 -5
  325. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js.map +1 -1
  326. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +1 -1
  327. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +2 -2
  328. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +7 -7
  329. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
  330. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -1
  331. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +3 -3
  332. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
  333. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  334. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  335. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -32
  336. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +5 -4
  337. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js.map +1 -1
  338. package/esm/vs/editor/contrib/links/browser/links.js +16 -15
  339. package/esm/vs/editor/contrib/links/browser/links.js.map +1 -1
  340. package/esm/vs/editor/contrib/longLinesHelper/browser/longLinesHelper.js +1 -1
  341. package/esm/vs/editor/contrib/message/browser/messageController.js +16 -12
  342. package/esm/vs/editor/contrib/message/browser/messageController.js.map +1 -1
  343. package/esm/vs/editor/contrib/middleScroll/browser/middleScrollController.js +1 -1
  344. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +91 -55
  345. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js.map +1 -1
  346. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  347. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js +3 -3
  348. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js.map +1 -1
  349. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +6 -4
  350. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
  351. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  352. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  353. package/esm/vs/editor/contrib/placeholderText/browser/placeholderTextContribution.js +1 -1
  354. package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +1 -1
  355. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +12 -12
  356. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  357. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +3 -3
  358. package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
  359. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  360. package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +6 -6
  361. package/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js +23 -13
  362. package/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js.map +1 -1
  363. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +5 -5
  364. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +5 -5
  365. package/esm/vs/editor/contrib/snippet/browser/snippetSession.js +2 -2
  366. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  367. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  368. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +10 -8
  369. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
  370. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +1 -1
  371. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +2 -2
  372. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +6 -6
  373. package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -9
  374. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +15 -15
  375. package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +2 -2
  376. package/esm/vs/editor/contrib/suggest/browser/suggestModel.js +11 -11
  377. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +27 -27
  378. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +8 -6
  379. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
  380. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +5 -5
  381. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +3 -3
  382. package/esm/vs/editor/contrib/suggest/browser/wordDistance.js +1 -1
  383. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  384. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  385. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  386. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  387. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +27 -27
  388. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +9 -9
  389. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  390. package/esm/vs/editor/contrib/wordHighlighter/browser/textualHighlightProvider.js +1 -1
  391. package/esm/vs/editor/contrib/wordHighlighter/browser/textualHighlightProvider.js.map +1 -1
  392. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +50 -14
  393. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js.map +1 -1
  394. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +6 -6
  395. package/esm/vs/editor/editor.api.d.ts +133 -98
  396. package/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js +1 -1
  397. package/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +5 -3
  398. package/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js.map +1 -1
  399. package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js +15 -1
  400. package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
  401. package/esm/vs/nls.js.map +1 -1
  402. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +72 -66
  403. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js.map +1 -1
  404. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  405. package/esm/vs/platform/actionWidget/browser/actionList.js +434 -136
  406. package/esm/vs/platform/actionWidget/browser/actionList.js.map +1 -1
  407. package/esm/vs/platform/actionWidget/browser/actionWidget.css +74 -4
  408. package/esm/vs/platform/actionWidget/browser/actionWidget.js +24 -26
  409. package/esm/vs/platform/actionWidget/browser/actionWidget.js.map +1 -1
  410. package/esm/vs/platform/actionWidget/browser/actionWidgetMotion.js +16 -0
  411. package/esm/vs/platform/actionWidget/browser/actionWidgetMotion.js.map +1 -0
  412. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +15 -17
  413. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
  414. package/esm/vs/platform/actions/browser/toolbar.js +25 -12
  415. package/esm/vs/platform/actions/browser/toolbar.js.map +1 -1
  416. package/esm/vs/platform/actions/common/actions.js +4 -2
  417. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  418. package/esm/vs/platform/actions/common/menuService.js +15 -8
  419. package/esm/vs/platform/actions/common/menuService.js.map +1 -1
  420. package/esm/vs/platform/configuration/common/configuration.js +3 -1
  421. package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
  422. package/esm/vs/platform/configuration/common/configurationModels.js +16 -11
  423. package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
  424. package/esm/vs/platform/configuration/common/configurationRegistry.js +29 -27
  425. package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
  426. package/esm/vs/platform/configuration/common/configurations.js +13 -1
  427. package/esm/vs/platform/configuration/common/configurations.js.map +1 -1
  428. package/esm/vs/platform/contextkey/browser/contextKeyService.js +2 -2
  429. package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +1 -1
  430. package/esm/vs/platform/contextkey/common/contextkey.js +28 -14
  431. package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
  432. package/esm/vs/platform/contextkey/common/contextkeys.js +10 -10
  433. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  434. package/esm/vs/platform/contextview/browser/contextMenuHandler.js +17 -4
  435. package/esm/vs/platform/contextview/browser/contextMenuHandler.js.map +1 -1
  436. package/esm/vs/platform/contextview/browser/contextMenuService.js +1 -1
  437. package/esm/vs/platform/contextview/browser/contextMenuService.js.map +1 -1
  438. package/esm/vs/platform/contextview/browser/contextView.js.map +1 -1
  439. package/esm/vs/platform/contextview/browser/contextViewService.js +7 -2
  440. package/esm/vs/platform/contextview/browser/contextViewService.js.map +1 -1
  441. package/esm/vs/platform/editor/common/editor.js +17 -0
  442. package/esm/vs/platform/editor/common/editor.js.map +1 -1
  443. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  444. package/esm/vs/platform/hover/browser/hoverService.js +6 -3
  445. package/esm/vs/platform/hover/browser/hoverService.js.map +1 -1
  446. package/esm/vs/platform/hover/browser/hoverWidget.js +38 -6
  447. package/esm/vs/platform/hover/browser/hoverWidget.js.map +1 -1
  448. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +32 -5
  449. package/esm/vs/platform/hover/browser/updatableHoverWidget.js.map +1 -1
  450. package/esm/vs/platform/instantiation/common/instantiationService.js +1 -1
  451. package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
  452. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +5 -5
  453. package/esm/vs/platform/keybinding/common/keybindingResolver.js +1 -1
  454. package/esm/vs/platform/keybinding/common/keybindingResolver.js.map +1 -1
  455. package/esm/vs/platform/list/browser/listService.js +27 -27
  456. package/esm/vs/platform/markers/common/markerService.js +11 -8
  457. package/esm/vs/platform/markers/common/markerService.js.map +1 -1
  458. package/esm/vs/platform/markers/common/markers.js +6 -6
  459. package/esm/vs/platform/markers/common/markers.js.map +1 -1
  460. package/esm/vs/platform/notification/common/notification.js.map +1 -1
  461. package/esm/vs/platform/notification/common/notificationMessage.js +37 -0
  462. package/esm/vs/platform/notification/common/notificationMessage.js.map +1 -0
  463. package/esm/vs/platform/opener/common/opener.js.map +1 -1
  464. package/esm/vs/platform/progress/common/progress.js.map +1 -1
  465. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
  466. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  467. package/esm/vs/platform/quickinput/browser/media/quickInput.css +33 -2
  468. package/esm/vs/platform/quickinput/browser/quickAccess.js +7 -4
  469. package/esm/vs/platform/quickinput/browser/quickAccess.js.map +1 -1
  470. package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
  471. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  472. package/esm/vs/platform/quickinput/browser/quickInputController.js +65 -15
  473. package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
  474. package/esm/vs/platform/quickinput/browser/quickInputList.js +96 -90
  475. package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
  476. package/esm/vs/platform/quickinput/browser/quickInputService.js +5 -7
  477. package/esm/vs/platform/quickinput/browser/quickInputService.js.map +1 -1
  478. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  479. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  480. package/esm/vs/platform/quickinput/browser/tree/quickTree.js +1 -1
  481. package/esm/vs/platform/quickinput/common/quickAccess.js.map +1 -1
  482. package/esm/vs/platform/quickinput/common/quickInput.js.map +1 -1
  483. package/esm/vs/platform/storage/common/storage.js.map +1 -1
  484. package/esm/vs/platform/theme/common/colorRegistry.js +1 -0
  485. package/esm/vs/platform/theme/common/colorRegistry.js.map +1 -1
  486. package/esm/vs/platform/theme/common/colorUtils.js +11 -3
  487. package/esm/vs/platform/theme/common/colorUtils.js.map +1 -1
  488. package/esm/vs/platform/theme/common/colors/baseColors.js +19 -19
  489. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -9
  490. package/esm/vs/platform/theme/common/colors/chartsColors.js.map +1 -1
  491. package/esm/vs/platform/theme/common/colors/confettiColors.js +14 -0
  492. package/esm/vs/platform/theme/common/colors/confettiColors.js.map +1 -0
  493. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  494. package/esm/vs/platform/theme/common/colors/inputColors.js +48 -48
  495. package/esm/vs/platform/theme/common/colors/inputColors.js.map +1 -1
  496. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  497. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  498. package/esm/vs/platform/theme/common/colors/minimapColors.js +13 -13
  499. package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
  500. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  501. package/esm/vs/platform/theme/common/colors/quickpickColors.js +10 -10
  502. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  503. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  504. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  505. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  506. package/monaco.d.ts +133 -98
  507. package/package.json +3 -3
  508. package/version.txt +1 -1
@@ -2,27 +2,56 @@
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Licensed under the MIT License. See License.txt in the project root for license information.
4
4
  *--------------------------------------------------------------------------------------------*/
5
+ import { getVisibleWCOTitlebarAreaRect } from '../../browser.js';
5
6
  import { BrowserFeatures } from '../../canIUse.js';
6
7
  import * as DOM from '../../dom.js';
7
8
  import { createStyleSheet } from '../../domStylesheets.js';
9
+ import { onUnexpectedError } from '../../../common/errors.js';
8
10
  import { Disposable, DisposableStore, toDisposable } from '../../../common/lifecycle.js';
9
11
  import { layout2d } from '../../../common/layout.js';
10
12
  import * as platform from '../../../common/platform.js';
13
+ import { avoidWindowControlsOverlay } from './windowControlsOverlay.js';
11
14
  import './contextview.css';
15
+ export function isPopoverDOMPosition(domPosition) {
16
+ return domPosition === 4 /* ContextViewDOMPosition.POPOVER */ || domPosition === 5 /* ContextViewDOMPosition.POPOVER_SHADOW */;
17
+ }
12
18
  export function isAnchor(obj) {
13
19
  const anchor = obj;
14
20
  return !!anchor && typeof anchor.x === 'number' && typeof anchor.y === 'number';
15
21
  }
22
+ export function hasRequiredAncestorClasses(element, classNames) {
23
+ if (!classNames?.length) {
24
+ return true;
25
+ }
26
+ for (let candidate = element; candidate;) {
27
+ const current = candidate;
28
+ if (classNames.every(requirement => typeof requirement === 'string'
29
+ ? current.classList.contains(requirement)
30
+ : requirement.some(className => current.classList.contains(className)))) {
31
+ return true;
32
+ }
33
+ if (current.parentElement) {
34
+ candidate = current.parentElement;
35
+ }
36
+ else {
37
+ const root = current.getRootNode();
38
+ candidate = root instanceof ShadowRoot && DOM.isHTMLElement(root.host) ? root.host : null;
39
+ }
40
+ }
41
+ return false;
42
+ }
16
43
  export const CONTEXT_VIEW_MENU_MOTION_CLASS = 'context-view-menu-motion';
17
44
  export const CONTEXT_VIEW_MENU_MOTION_CLOSING_CLASS = 'context-view-menu-motion-closing';
18
45
  export const CONTEXT_VIEW_MENU_MOTION_CLOSE_ANIMATION_DURATION = 150;
19
- export const CONTEXT_VIEW_MENU_MOTION_ANCESTOR_CLASSES = ['modern-ui', 'monaco-enable-motion'];
46
+ export const CONTEXT_VIEW_MENU_MOTION_ANCESTOR_CLASSES = [['modern-ui', 'modern-ui-frosted-glass'], 'monaco-enable-motion'];
20
47
  export const CONTEXT_VIEW_CLOSE_ANIMATION_DURATION_VARIABLE = '--vscode-context-view-close-animation-duration';
21
48
  export const CONTEXT_VIEW_MENU_MOTION_SHADOW_VARIABLE = '--vscode-context-view-menu-motion-shadow';
22
- const CONTEXT_VIEW_MENU_MOTION_CLOSE_START_OPACITY_VARIABLE = '--vscode-context-view-menu-motion-close-start-opacity';
23
- const CONTEXT_VIEW_MENU_MOTION_CLOSE_START_TRANSFORM_VARIABLE = '--vscode-context-view-menu-motion-close-start-transform';
24
- const CONTEXT_VIEW_MENU_MOTION_OPEN_DURATION_MS = 250;
25
- const CONTEXT_VIEW_MENU_MOTION_EASING = 'cubic-bezier(0.22, 1, 0.36, 1)';
49
+ /** Inherited while an opacity animation isolates descendant menu backdrops. */
50
+ export const CONTEXT_VIEW_MENU_MOTION_BACKDROP_OPACITY_VARIABLE = '--vscode-context-view-menu-motion-backdrop-opacity';
51
+ export const CONTEXT_VIEW_MENU_MOTION_CLOSE_START_OPACITY_VARIABLE = '--vscode-context-view-menu-motion-close-start-opacity';
52
+ export const CONTEXT_VIEW_MENU_MOTION_CLOSE_START_TRANSFORM_VARIABLE = '--vscode-context-view-menu-motion-close-start-transform';
53
+ export const CONTEXT_VIEW_MENU_MOTION_OPEN_DURATION_MS = 250;
54
+ export const CONTEXT_VIEW_MENU_MOTION_EASING = 'cubic-bezier(0.22, 1, 0.36, 1)';
26
55
  export const contextViewMenuCloseAnimation = {
27
56
  className: CONTEXT_VIEW_MENU_MOTION_CLOSING_CLASS,
28
57
  duration: CONTEXT_VIEW_MENU_MOTION_CLOSE_ANIMATION_DURATION,
@@ -61,6 +90,10 @@ function getContextViewMenuMotionCss(enabledSelectorPrefix) {
61
90
  }
62
91
 
63
92
  @keyframes context-view-menu-motion-open {
93
+ from, to {
94
+ ${CONTEXT_VIEW_MENU_MOTION_BACKDROP_OPACITY_VARIABLE}: 100%;
95
+ }
96
+
64
97
  0% {
65
98
  opacity: 0;
66
99
  transform: scale(0.97);
@@ -73,6 +106,10 @@ function getContextViewMenuMotionCss(enabledSelectorPrefix) {
73
106
  }
74
107
 
75
108
  @keyframes context-view-menu-motion-close {
109
+ from, to {
110
+ ${CONTEXT_VIEW_MENU_MOTION_BACKDROP_OPACITY_VARIABLE}: 100%;
111
+ }
112
+
76
113
  0% {
77
114
  opacity: var(${CONTEXT_VIEW_MENU_MOTION_CLOSE_START_OPACITY_VARIABLE}, 1);
78
115
  transform: var(${CONTEXT_VIEW_MENU_MOTION_CLOSE_START_TRANSFORM_VARIABLE}, scale(1));
@@ -128,11 +165,20 @@ export function getAnchorRect(anchor) {
128
165
  };
129
166
  }
130
167
  }
168
+ function getDeepActiveElement(doc) {
169
+ let result = doc.activeElement;
170
+ while (result?.shadowRoot?.activeElement) {
171
+ result = result.shadowRoot.activeElement;
172
+ }
173
+ return result;
174
+ }
131
175
  export class ContextView extends Disposable {
132
176
  static { this.BUBBLE_UP_EVENTS = ['click', 'keydown', 'focus', 'blur']; }
133
177
  static { this.BUBBLE_DOWN_EVENTS = ['click']; }
134
- constructor(container, domPosition) {
178
+ static { this.ISOLATED_KEY_EVENTS = ['keydown', 'keyup', 'keypress']; }
179
+ constructor(container, domPosition, options = {}) {
135
180
  super();
181
+ this.options = options;
136
182
  this.container = null;
137
183
  this.useFixedPosition = false;
138
184
  this.useShadowDOM = false;
@@ -141,6 +187,10 @@ export class ContextView extends Disposable {
141
187
  this.toDisposeOnSetContainer = Disposable.None;
142
188
  this.shadowRoot = null;
143
189
  this.shadowRootHostElement = null;
190
+ this.domPosition = 1 /* ContextViewDOMPosition.ABSOLUTE */;
191
+ this.toDisposeOnPopoverHide = this._register(new DisposableStore());
192
+ this.focusToRestore = null;
193
+ this.showCount = 0;
144
194
  ensureContextViewMenuMotionStyleSheet();
145
195
  this.view = DOM.$('.context-view');
146
196
  DOM.hide(this.view);
@@ -148,15 +198,26 @@ export class ContextView extends Disposable {
148
198
  this._register(toDisposable(() => this.setContainer(null, 1 /* ContextViewDOMPosition.ABSOLUTE */)));
149
199
  }
150
200
  setContainer(container, domPosition) {
151
- this.useFixedPosition = domPosition !== 1 /* ContextViewDOMPosition.ABSOLUTE */;
201
+ const previousDOMPosition = this.domPosition;
152
202
  const usedShadowDOM = this.useShadowDOM;
153
- this.useShadowDOM = domPosition === 3 /* ContextViewDOMPosition.FIXED_SHADOW */;
154
- if (container === this.container && usedShadowDOM === this.useShadowDOM) {
155
- return; // container is the same and no shadow DOM usage has changed
203
+ const useShadowDOM = domPosition === 3 /* ContextViewDOMPosition.FIXED_SHADOW */ || domPosition === 5 /* ContextViewDOMPosition.POPOVER_SHADOW */;
204
+ const unchanged = container === this.container && usedShadowDOM === useShadowDOM && isPopoverDOMPosition(previousDOMPosition) === isPopoverDOMPosition(domPosition);
205
+ // Tear down the previous popover while its position is still current, so
206
+ // that its owner tracking is disposed and its top layer entry is closed
207
+ if (this.container && !unchanged && isPopoverDOMPosition(previousDOMPosition)) {
208
+ this.hide(undefined, true);
209
+ this.completeHideAnimation();
210
+ }
211
+ this.domPosition = domPosition;
212
+ this.useFixedPosition = domPosition !== 1 /* ContextViewDOMPosition.ABSOLUTE */;
213
+ this.useShadowDOM = useShadowDOM;
214
+ if (unchanged) {
215
+ return; // container is the same and neither shadow DOM nor popover usage has changed
156
216
  }
157
217
  if (this.container) {
158
218
  this.toDisposeOnSetContainer.dispose();
159
219
  this.view.remove();
220
+ this.view.removeAttribute('popover');
160
221
  if (this.shadowRoot) {
161
222
  this.shadowRoot = null;
162
223
  this.shadowRootHostElement?.remove();
@@ -166,6 +227,7 @@ export class ContextView extends Disposable {
166
227
  }
167
228
  if (container) {
168
229
  this.container = container;
230
+ const isPopover = isPopoverDOMPosition(domPosition);
169
231
  if (this.useShadowDOM) {
170
232
  this.shadowRootHostElement = DOM.$('.shadow-root-host');
171
233
  Object.assign(this.shadowRootHostElement.style, {
@@ -175,7 +237,14 @@ export class ContextView extends Disposable {
175
237
  width: '0',
176
238
  height: '0'
177
239
  });
178
- this.container.appendChild(this.shadowRootHostElement);
240
+ if (isPopover) {
241
+ // Attached to the owner only while shown, see showPopover.
242
+ // contextview.css resets the user agent popover styles
243
+ this.shadowRootHostElement.setAttribute('popover', 'manual');
244
+ }
245
+ else {
246
+ this.container.appendChild(this.shadowRootHostElement);
247
+ }
179
248
  this.shadowRoot = this.shadowRootHostElement.attachShadow({ mode: 'open' });
180
249
  const style = document.createElement('style');
181
250
  style.textContent = SHADOW_ROOT_CSS;
@@ -184,9 +253,24 @@ export class ContextView extends Disposable {
184
253
  this.shadowRoot.appendChild(DOM.$('slot'));
185
254
  }
186
255
  else {
187
- this.container.appendChild(this.view);
256
+ if (isPopover) {
257
+ // Attached to the owner only while shown, see showPopover.
258
+ // contextview.css resets the user agent popover styles
259
+ this.view.setAttribute('popover', 'manual');
260
+ }
261
+ else {
262
+ this.container.appendChild(this.view);
263
+ }
188
264
  }
189
265
  const toDisposeOnSetContainer = new DisposableStore();
266
+ if (isPopover) {
267
+ // Keep keys pressed in the view from reaching the owner or
268
+ // window-level keybinding listeners while the view is hosted.
269
+ const popoverElement = this.getPopoverElement();
270
+ ContextView.ISOLATED_KEY_EVENTS.forEach(event => {
271
+ toDisposeOnSetContainer.add(DOM.addDisposableListener(popoverElement, event, e => e.stopPropagation()));
272
+ });
273
+ }
190
274
  ContextView.BUBBLE_UP_EVENTS.forEach(event => {
191
275
  toDisposeOnSetContainer.add(DOM.addStandardDisposableListener(this.container, event, e => {
192
276
  this.onDOMEvent(e, false);
@@ -201,10 +285,17 @@ export class ContextView extends Disposable {
201
285
  }
202
286
  }
203
287
  show(delegate) {
288
+ this.showCount++;
204
289
  this.completeHideAnimation();
205
290
  if (this.isVisible()) {
206
291
  this.hide(undefined, true);
207
292
  }
293
+ const ownerDocument = this.container?.ownerDocument ?? DOM.getActiveDocument();
294
+ const activeElement = getDeepActiveElement(ownerDocument);
295
+ this.focusToRestore = DOM.isHTMLElement(activeElement) ? activeElement : null;
296
+ if (isPopoverDOMPosition(this.domPosition)) {
297
+ this.showPopover();
298
+ }
208
299
  // Show static box
209
300
  DOM.clearNode(this.view);
210
301
  this.view.className = 'context-view monaco-component';
@@ -218,17 +309,111 @@ export class ContextView extends Disposable {
218
309
  this.view.style.position = this.useFixedPosition ? 'fixed' : 'absolute';
219
310
  DOM.show(this.view);
220
311
  // Render content
221
- this.toDisposeOnClean = delegate.render(this.view) || Disposable.None;
312
+ this.toDisposeOnClean = delegate.render(this.view, { domPosition: this.domPosition }) || Disposable.None;
222
313
  // Set active delegate
223
314
  this.delegate = delegate;
315
+ if (isPopoverDOMPosition(this.domPosition)) {
316
+ this.trackPopoverOwner();
317
+ }
224
318
  // Layout
225
319
  this.doLayout();
320
+ // Layout hides the view when its popover owner is hidden or removed,
321
+ // for example by rendering; do not move focus into a hidden view
322
+ if (this.delegate !== delegate) {
323
+ return;
324
+ }
226
325
  // Focus
227
- this.delegate.focus?.();
326
+ delegate.focus?.();
228
327
  }
229
328
  getViewElement() {
230
329
  return this.view;
231
330
  }
331
+ getPopoverElement() {
332
+ return this.shadowRootHostElement ?? this.view;
333
+ }
334
+ showPopover() {
335
+ const owner = this.container;
336
+ if (!owner) {
337
+ return;
338
+ }
339
+ // Fall back to a fixed position without the Popover API or a connected
340
+ // owner; only report a failure to show a popover that should have shown
341
+ const popoverElement = this.getPopoverElement();
342
+ if (typeof popoverElement.showPopover === 'function' && owner.isConnected) {
343
+ try {
344
+ if (popoverElement.parentElement !== owner) {
345
+ adoptPopoverResetStyles(owner);
346
+ owner.appendChild(popoverElement);
347
+ }
348
+ if (!popoverElement.matches(':popover-open')) {
349
+ popoverElement.showPopover();
350
+ }
351
+ return;
352
+ }
353
+ catch (e) {
354
+ onUnexpectedError(e);
355
+ }
356
+ }
357
+ popoverElement.remove();
358
+ const fallbackContainer = this.options.getFallbackContainer?.(owner) ?? DOM.getWindow(owner).document.body;
359
+ this.setContainer(fallbackContainer, this.domPosition === 5 /* ContextViewDOMPosition.POPOVER_SHADOW */ ? 3 /* ContextViewDOMPosition.FIXED_SHADOW */ : 2 /* ContextViewDOMPosition.FIXED */);
360
+ }
361
+ trackPopoverOwner() {
362
+ const owner = this.container;
363
+ if (!owner) {
364
+ return;
365
+ }
366
+ const popoverElement = this.getPopoverElement();
367
+ const targetWindow = DOM.getWindow(owner);
368
+ // Dismiss on pointer presses outside both the view and its owner, without restoring focus
369
+ this.toDisposeOnPopoverHide.add(DOM.addDisposableListener(targetWindow, DOM.EventType.POINTER_DOWN, e => {
370
+ const path = e.composedPath();
371
+ if (!path.includes(popoverElement) && !path.includes(owner)) {
372
+ this.hideWithoutRestoringFocus();
373
+ }
374
+ }, true));
375
+ const ResizeObserverCtor = targetWindow.ResizeObserver;
376
+ if (typeof ResizeObserverCtor === 'function') {
377
+ const observer = new ResizeObserverCtor(() => this.checkPopoverOwner());
378
+ observer.observe(owner);
379
+ this.toDisposeOnPopoverHide.add(toDisposable(() => observer.disconnect()));
380
+ }
381
+ }
382
+ isPopoverOwnerLost() {
383
+ const owner = this.container;
384
+ return !owner || !owner.isConnected || owner.getClientRects().length === 0;
385
+ }
386
+ checkPopoverOwner() {
387
+ if (this.isVisible() && isPopoverDOMPosition(this.domPosition) && this.isPopoverOwnerLost()) {
388
+ this.hideWithoutRestoringFocus();
389
+ return false;
390
+ }
391
+ return true;
392
+ }
393
+ hideWithoutRestoringFocus() {
394
+ this.focusToRestore = null;
395
+ this.hide(undefined, true);
396
+ }
397
+ restorePopoverFocus() {
398
+ const focusToRestore = this.focusToRestore;
399
+ this.focusToRestore = null;
400
+ if (!focusToRestore?.isConnected) {
401
+ return;
402
+ }
403
+ const activeElement = getDeepActiveElement(focusToRestore.ownerDocument);
404
+ if (activeElement && (activeElement === focusToRestore.ownerDocument.body || DOM.isAncestor(activeElement, this.view))) {
405
+ focusToRestore.focus();
406
+ }
407
+ }
408
+ hidePopover() {
409
+ this.toDisposeOnPopoverHide.clear();
410
+ const popoverElement = this.getPopoverElement();
411
+ if (popoverElement.hasAttribute('popover') && popoverElement.matches(':popover-open')) {
412
+ popoverElement.hidePopover();
413
+ }
414
+ // Leave nothing behind in the owner, which may be an arbitrary element such as an input's parent
415
+ popoverElement.remove();
416
+ }
232
417
  layout() {
233
418
  if (!this.isVisible()) {
234
419
  return;
@@ -245,6 +430,9 @@ export class ContextView extends Disposable {
245
430
  if (!this.isVisible()) {
246
431
  return;
247
432
  }
433
+ if (!this.checkPopoverOwner()) {
434
+ return;
435
+ }
248
436
  // Get anchor
249
437
  const anchor = getAnchorRect(this.delegate.getAnchor());
250
438
  const containerWindow = this.container ? DOM.getWindow(this.container) : DOM.getActiveWindow();
@@ -258,10 +446,17 @@ export class ContextView extends Disposable {
258
446
  const anchorAlignment = this.delegate.anchorAlignment;
259
447
  const anchorAxisAlignment = this.delegate.anchorAxisAlignment;
260
448
  const layoutResult = layout2d(viewport, view, anchor, { anchorAlignment, anchorPosition, anchorAxisAlignment });
261
- const { top, left } = layoutResult;
449
+ const adjusted = avoidWindowControlsOverlay(getVisibleWCOTitlebarAreaRect(containerWindow), viewport, view, layoutResult);
450
+ const { top, left } = adjusted;
262
451
  this.view.classList.remove('top', 'bottom', 'left', 'right');
263
- this.view.classList.add(layoutResult.anchorPosition === 0 /* AnchorPosition.BELOW */ ? 'bottom' : 'top');
264
- this.view.classList.add(layoutResult.anchorAlignment === 0 /* AnchorAlignment.LEFT */ ? 'left' : 'right');
452
+ if (adjusted === layoutResult) {
453
+ this.view.classList.add(layoutResult.anchorPosition === 0 /* AnchorPosition.BELOW */ ? 'bottom' : 'top');
454
+ this.view.classList.add(layoutResult.anchorAlignment === 0 /* AnchorAlignment.LEFT */ ? 'left' : 'right');
455
+ }
456
+ else {
457
+ this.view.classList.add(top >= anchor.top + anchor.height ? 'bottom' : 'top');
458
+ this.view.classList.add(left >= anchor.left ? 'left' : 'right');
459
+ }
265
460
  this.view.style.top = `${top - positioningOrigin.top}px`;
266
461
  this.view.style.left = `${left - positioningOrigin.left}px`;
267
462
  this.view.style.width = 'initial';
@@ -281,8 +476,25 @@ export class ContextView extends Disposable {
281
476
  const toDispose = this.toDisposeOnClean;
282
477
  this.toDisposeOnClean = Disposable.None;
283
478
  delegate.onHide?.(data);
479
+ const isPopover = isPopoverDOMPosition(this.domPosition);
480
+ if (isPopover) {
481
+ // Stop tracking the owner first, then restore focus before the view
482
+ // becomes inert or hidden, so that focus never leaves the owner
483
+ this.toDisposeOnPopoverHide.clear();
484
+ const showCount = this.showCount;
485
+ this.restorePopoverFocus();
486
+ if (this.showCount !== showCount) {
487
+ // Restoring focus showed another view, for example an input box
488
+ // message; it now owns the view, so only clean up this rendering
489
+ toDispose.dispose();
490
+ return;
491
+ }
492
+ }
493
+ else {
494
+ this.focusToRestore = null;
495
+ }
284
496
  const closeAnimation = delegate.closeAnimation;
285
- if (!skipAnimation && closeAnimation && closeAnimation.duration > 0 && this.hasRequiredAncestorClasses(closeAnimation.requiredAncestorClasses)) {
497
+ if (!skipAnimation && closeAnimation && closeAnimation.duration > 0 && hasRequiredAncestorClasses(this.view, closeAnimation.requiredAncestorClasses)) {
286
498
  this.view.style.setProperty(CONTEXT_VIEW_CLOSE_ANIMATION_DURATION_VARIABLE, `${closeAnimation.duration}ms`);
287
499
  this.prepareMenuCloseAnimation();
288
500
  this.view.inert = true;
@@ -295,8 +507,11 @@ export class ContextView extends Disposable {
295
507
  };
296
508
  return;
297
509
  }
298
- toDispose.dispose();
299
510
  DOM.hide(this.view);
511
+ if (isPopover) {
512
+ this.hidePopover();
513
+ }
514
+ toDispose.dispose();
300
515
  }
301
516
  isVisible() {
302
517
  return !!this.delegate;
@@ -312,9 +527,12 @@ export class ContextView extends Disposable {
312
527
  this.view.style.removeProperty(CONTEXT_VIEW_CLOSE_ANIMATION_DURATION_VARIABLE);
313
528
  this.view.style.removeProperty(CONTEXT_VIEW_MENU_MOTION_CLOSE_START_OPACITY_VARIABLE);
314
529
  this.view.style.removeProperty(CONTEXT_VIEW_MENU_MOTION_CLOSE_START_TRANSFORM_VARIABLE);
315
- hidingContextView.toDispose.dispose();
316
530
  DOM.hide(this.view);
317
531
  this.view.inert = false;
532
+ if (isPopoverDOMPosition(this.domPosition)) {
533
+ this.hidePopover();
534
+ }
535
+ hidingContextView.toDispose.dispose();
318
536
  }
319
537
  prepareMenuCloseAnimation() {
320
538
  if (!this.view.classList.contains(CONTEXT_VIEW_MENU_MOTION_CLASS)) {
@@ -328,25 +546,6 @@ export class ContextView extends Disposable {
328
546
  this.view.style.setProperty(CONTEXT_VIEW_MENU_MOTION_CLOSE_START_OPACITY_VARIABLE, computedStyle.opacity);
329
547
  this.view.style.setProperty(CONTEXT_VIEW_MENU_MOTION_CLOSE_START_TRANSFORM_VARIABLE, computedStyle.transform);
330
548
  }
331
- hasRequiredAncestorClasses(classNames) {
332
- if (!classNames?.length) {
333
- return true;
334
- }
335
- for (let candidate = this.view; candidate;) {
336
- const current = candidate;
337
- if (classNames.every(className => current.classList.contains(className))) {
338
- return true;
339
- }
340
- if (current.parentElement) {
341
- candidate = current.parentElement;
342
- }
343
- else {
344
- const root = current.getRootNode();
345
- candidate = root instanceof ShadowRoot && DOM.isHTMLElement(root.host) ? root.host : null;
346
- }
347
- }
348
- return false;
349
- }
350
549
  onDOMEvent(e, onCapture) {
351
550
  if (this.delegate) {
352
551
  if (this.delegate.onDOMEvent) {
@@ -358,11 +557,38 @@ export class ContextView extends Disposable {
358
557
  }
359
558
  }
360
559
  dispose() {
361
- this.hide();
560
+ this.hide(undefined, true);
362
561
  this.completeHideAnimation();
363
562
  super.dispose();
364
563
  }
365
564
  }
565
+ // Mirrors the popover reset in contextview.css, whose rules do not reach an
566
+ // owner inside a shadow root
567
+ const POPOVER_RESET_CSS = /* css */ `
568
+ .context-view[popover],
569
+ .shadow-root-host[popover] {
570
+ position: fixed;
571
+ inset: auto;
572
+ width: auto;
573
+ height: auto;
574
+ margin: 0;
575
+ padding: 0;
576
+ border: 0;
577
+ overflow: visible;
578
+ color: inherit;
579
+ background: transparent;
580
+ }
581
+ `;
582
+ const shadowRootsWithPopoverReset = new WeakSet();
583
+ function adoptPopoverResetStyles(owner) {
584
+ const shadowRoot = DOM.getShadowRoot(owner);
585
+ if (shadowRoot && !shadowRootsWithPopoverReset.has(shadowRoot)) {
586
+ shadowRootsWithPopoverReset.add(shadowRoot);
587
+ const style = owner.ownerDocument.createElement('style');
588
+ style.textContent = POPOVER_RESET_CSS;
589
+ shadowRoot.appendChild(style);
590
+ }
591
+ }
366
592
  const SHADOW_ROOT_CSS = /* css */ `
367
593
  :host {
368
594
  all: initial; /* 1st rule so subsequent properties are reset. */