@codingame/monaco-vscode-api 1.85.0 → 1.85.1

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 (239) hide show
  1. package/README.md +19 -10
  2. package/contributions.js +1 -0
  3. package/missing-services.js +91 -5
  4. package/monaco-editor-treemending.patch +957 -950
  5. package/package.json +6 -6
  6. package/vscode/src/vs/base/common/jsonFormatter.js +8 -1
  7. package/vscode/src/vs/platform/actions/browser/buttonbar.js +128 -0
  8. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +2 -1
  9. package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +58 -0
  10. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +56 -1
  11. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +186 -4
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +191 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +238 -2
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +75 -0
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +205 -1
  16. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +168 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +35 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +340 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +1195 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +115 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +81 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.css.js +4 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.js +62 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +583 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +4 -0
  26. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +290 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +167 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +4 -0
  29. package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +6 -1
  30. package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +562 -0
  31. package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +31 -1
  32. package/vscode/src/vs/workbench/contrib/chat/common/chatProvider.js +24 -1
  33. package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +193 -0
  34. package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +22 -1
  35. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +52 -1
  36. package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +258 -0
  37. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +37 -0
  38. package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +25 -0
  39. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.css.js +4 -0
  40. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +388 -0
  41. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +61 -0
  42. package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +49 -0
  43. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +647 -0
  44. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +300 -0
  45. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +60 -0
  46. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +249 -0
  47. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +107 -0
  48. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +333 -0
  49. package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +4 -0
  50. package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +99 -0
  51. package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +55 -0
  52. package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +2 -0
  53. package/vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js +20 -0
  54. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +855 -0
  55. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +410 -0
  56. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +1591 -0
  57. package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +178 -0
  58. package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +4 -0
  59. package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +4 -0
  60. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +1485 -0
  61. package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +125 -0
  62. package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +29 -0
  63. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +41 -0
  64. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +102 -0
  65. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.css.js +4 -0
  66. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +988 -0
  67. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget.js +431 -0
  68. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +417 -0
  69. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +806 -0
  70. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +915 -0
  71. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +19 -0
  72. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +129 -10
  73. package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +205 -0
  74. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +150 -0
  75. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +480 -0
  76. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +5 -0
  77. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +90 -0
  78. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +54 -0
  79. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +108 -0
  80. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +258 -0
  81. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +614 -0
  82. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +307 -0
  83. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +44 -0
  84. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +165 -0
  85. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +78 -0
  86. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +169 -0
  87. package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +64 -0
  88. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/cellOutputClipboard.js +49 -0
  89. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +70 -0
  90. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +120 -0
  91. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +416 -0
  92. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +4 -0
  93. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +663 -0
  94. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +593 -0
  95. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +72 -0
  96. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +326 -0
  97. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +539 -0
  98. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +265 -0
  99. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +348 -0
  100. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css.js +4 -0
  101. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css.js +4 -0
  102. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellEditorHint.css.js +4 -0
  103. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar.css.js +4 -0
  104. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellOutput.css.js +4 -0
  105. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar.css.js +4 -0
  106. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar.css.js +4 -0
  107. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookDnd.css.js +4 -0
  108. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css.js +4 -0
  109. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator.css.js +4 -0
  110. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css.js +4 -0
  111. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem.css.js +4 -0
  112. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css.js +4 -0
  113. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css.js +4 -0
  114. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.js +95 -3
  115. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +437 -0
  116. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.js +29 -0
  117. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +2730 -0
  118. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +139 -0
  119. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.js +17 -0
  120. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +564 -0
  121. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.js +27 -0
  122. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +119 -0
  123. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +27 -0
  124. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +135 -0
  125. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +178 -0
  126. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +35 -0
  127. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +377 -0
  128. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +97 -0
  129. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +194 -0
  130. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +71 -0
  131. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +20 -0
  132. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +85 -0
  133. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +652 -0
  134. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +59 -0
  135. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +303 -0
  136. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +24 -0
  137. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +228 -0
  138. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatActions.js +302 -0
  139. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.js +438 -0
  140. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +45 -0
  141. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +435 -0
  142. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +95 -0
  143. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +107 -0
  144. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +29 -0
  145. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +59 -0
  146. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +67 -0
  147. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +430 -0
  148. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +54 -0
  149. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +1131 -0
  150. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +21 -0
  151. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +1591 -0
  152. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +341 -0
  153. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +2155 -0
  154. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.js +65 -0
  155. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry.js +95 -0
  156. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +507 -0
  157. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +85 -0
  158. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +47 -0
  159. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +40 -0
  160. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +435 -0
  161. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +31 -0
  162. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +257 -0
  163. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +239 -0
  164. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +103 -0
  165. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.js +211 -0
  166. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +808 -0
  167. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.js +8 -0
  168. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +381 -0
  169. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +527 -0
  170. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +163 -0
  171. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +651 -0
  172. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +173 -0
  173. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +98 -0
  174. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +62 -0
  175. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +101 -0
  176. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +346 -0
  177. package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +152 -1
  178. package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +39 -0
  179. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +296 -0
  180. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +261 -0
  181. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.js +3 -1
  182. package/vscode/src/vs/workbench/contrib/notebook/common/notebookKernelService.js +2 -1
  183. package/vscode/src/vs/workbench/contrib/notebook/common/notebookKeymapService.js +3 -0
  184. package/vscode/src/vs/workbench/contrib/notebook/common/notebookLoggingService.js +3 -0
  185. package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.js +16 -0
  186. package/vscode/src/vs/workbench/contrib/notebook/common/notebookRange.js +66 -0
  187. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWorkerService.js +4 -0
  188. package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +130 -0
  189. package/vscode/src/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +4 -0
  190. package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +847 -0
  191. package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +89 -0
  192. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +1942 -0
  193. package/vscode/src/vs/workbench/contrib/remote/browser/urlFinder.js +107 -0
  194. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +49 -0
  195. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +387 -0
  196. package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +2 -2
  197. package/vscode/src/vs/workbench/contrib/search/common/constants.js +66 -0
  198. package/vscode/src/vs/workbench/contrib/searchEditor/browser/constants.js +11 -0
  199. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions.js +24 -0
  200. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets.js +95 -0
  201. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.js +4 -1
  202. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +2 -1
  203. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/featuredExtensionService.js +159 -0
  204. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +375 -0
  205. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +563 -0
  206. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +932 -0
  207. package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +15 -1
  208. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +2 -2
  209. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +190 -2
  210. package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +77 -0
  211. package/assets/break.mp3 +0 -0
  212. package/assets/chatRequestSent.mp3 +0 -0
  213. package/assets/chatResponsePending.mp3 +0 -0
  214. package/assets/chatResponseReceived1.mp3 +0 -0
  215. package/assets/chatResponseReceived2.mp3 +0 -0
  216. package/assets/chatResponseReceived3.mp3 +0 -0
  217. package/assets/chatResponseReceived4.mp3 +0 -0
  218. package/assets/clear.mp3 +0 -0
  219. package/assets/defaultIcon.png +0 -0
  220. package/assets/diffLineDeleted.mp3 +0 -0
  221. package/assets/diffLineInserted.mp3 +0 -0
  222. package/assets/diffLineModified.mp3 +0 -0
  223. package/assets/error.mp3 +0 -0
  224. package/assets/fake.html +0 -10
  225. package/assets/foldedAreas.mp3 +0 -0
  226. package/assets/format.mp3 +0 -0
  227. package/assets/index-no-csp.html +0 -1226
  228. package/assets/index.html +0 -1227
  229. package/assets/quickFixes.mp3 +0 -0
  230. package/assets/save.mp3 +0 -0
  231. package/assets/service-worker.js +0 -457
  232. package/assets/taskCompleted.mp3 +0 -0
  233. package/assets/taskFailed.mp3 +0 -0
  234. package/assets/terminalBell.mp3 +0 -0
  235. package/assets/warning.mp3 +0 -0
  236. package/assets/webWorkerExtensionHostIframe.html +0 -123
  237. package/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +0 -2
  238. package/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +0 -2
  239. package/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +0 -5
@@ -0,0 +1,388 @@
1
+ import './simpleFindWidget.css.js';
2
+ import * as nls from 'monaco-editor/esm/vs/nls.js';
3
+ import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
4
+ import { Widget } from 'monaco-editor/esm/vs/base/browser/ui/widget.js';
5
+ import { Delayer } from 'monaco-editor/esm/vs/base/common/async.js';
6
+ import { FindReplaceState } from 'monaco-editor/esm/vs/editor/contrib/find/browser/findState.js';
7
+ import { SimpleButton, findPreviousMatchIcon, findNextMatchIcon, NLS_MATCHES_LOCATION, NLS_NO_RESULTS } from 'monaco-editor/esm/vs/editor/contrib/find/browser/findWidget.js';
8
+ import { ContextScopedFindInput } from 'monaco-editor/esm/vs/platform/history/browser/contextScopedHistoryWidget.js';
9
+ import { widgetClose } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
10
+ import { registerThemingParticipant } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
11
+ import * as strings from 'monaco-editor/esm/vs/base/common/strings.js';
12
+ import { showHistoryKeybindingHint } from 'monaco-editor/esm/vs/platform/history/browser/historyWidgetKeybindingHint.js';
13
+ import { status } from 'monaco-editor/esm/vs/base/browser/ui/aria/aria.js';
14
+ import { defaultInputBoxStyles, defaultToggleStyles } from 'monaco-editor/esm/vs/platform/theme/browser/defaultStyles.js';
15
+ import { Sash } from 'monaco-editor/esm/vs/base/browser/ui/sash/sash.js';
16
+ import { registerColor } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
17
+ const NLS_FIND_INPUT_LABEL = ( nls.localizeWithPath(
18
+ 'vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget',
19
+ 'label.find',
20
+ "Find"
21
+ ));
22
+ const NLS_FIND_INPUT_PLACEHOLDER = ( nls.localizeWithPath(
23
+ 'vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget',
24
+ 'placeholder.find',
25
+ "Find"
26
+ ));
27
+ const NLS_PREVIOUS_MATCH_BTN_LABEL = ( nls.localizeWithPath(
28
+ 'vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget',
29
+ 'label.previousMatchButton',
30
+ "Previous Match"
31
+ ));
32
+ const NLS_NEXT_MATCH_BTN_LABEL = ( nls.localizeWithPath(
33
+ 'vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget',
34
+ 'label.nextMatchButton',
35
+ "Next Match"
36
+ ));
37
+ const NLS_CLOSE_BTN_LABEL = ( nls.localizeWithPath(
38
+ 'vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget',
39
+ 'label.closeButton',
40
+ "Close"
41
+ ));
42
+ const SIMPLE_FIND_WIDGET_INITIAL_WIDTH = 310;
43
+ const MATCHES_COUNT_WIDTH = 73;
44
+ class SimpleFindWidget extends Widget {
45
+ constructor(options, contextViewService, contextKeyService, _keybindingService) {
46
+ super();
47
+ this._keybindingService = _keybindingService;
48
+ this._isVisible = false;
49
+ this._foundMatch = false;
50
+ this._width = 0;
51
+ this.state = ( new FindReplaceState());
52
+ this._matchesLimit = options.matchesLimit ?? Number.MAX_SAFE_INTEGER;
53
+ this._findInput = this._register(( new ContextScopedFindInput(null, contextViewService, {
54
+ label: NLS_FIND_INPUT_LABEL,
55
+ placeholder: NLS_FIND_INPUT_PLACEHOLDER,
56
+ validation: (value) => {
57
+ if (value.length === 0 || !this._findInput.getRegex()) {
58
+ return null;
59
+ }
60
+ try {
61
+ return null;
62
+ }
63
+ catch (e) {
64
+ this._foundMatch = false;
65
+ this.updateButtons(this._foundMatch);
66
+ return { content: e.message };
67
+ }
68
+ },
69
+ showCommonFindToggles: options.showCommonFindToggles,
70
+ appendCaseSensitiveLabel: options.appendCaseSensitiveActionId ? this._getKeybinding(options.appendCaseSensitiveActionId) : undefined,
71
+ appendRegexLabel: options.appendRegexActionId ? this._getKeybinding(options.appendRegexActionId) : undefined,
72
+ appendWholeWordsLabel: options.appendWholeWordsActionId ? this._getKeybinding(options.appendWholeWordsActionId) : undefined,
73
+ showHistoryHint: () => showHistoryKeybindingHint(_keybindingService),
74
+ inputBoxStyles: defaultInputBoxStyles,
75
+ toggleStyles: defaultToggleStyles
76
+ }, contextKeyService)));
77
+ this._updateHistoryDelayer = this._register(( new Delayer(500)));
78
+ this._register(this._findInput.onInput(async (e) => {
79
+ if (!options.checkImeCompletionState || !this._findInput.isImeSessionInProgress) {
80
+ this._foundMatch = this._onInputChanged();
81
+ if (options.showResultCount) {
82
+ await this.updateResultCount();
83
+ }
84
+ this.updateButtons(this._foundMatch);
85
+ this.focusFindBox();
86
+ this._delayedUpdateHistory();
87
+ }
88
+ }));
89
+ this._findInput.setRegex(!!this.state.isRegex);
90
+ this._findInput.setCaseSensitive(!!this.state.matchCase);
91
+ this._findInput.setWholeWords(!!this.state.wholeWord);
92
+ this._register(this._findInput.onDidOptionChange(() => {
93
+ this.state.change({
94
+ isRegex: this._findInput.getRegex(),
95
+ wholeWord: this._findInput.getWholeWords(),
96
+ matchCase: this._findInput.getCaseSensitive()
97
+ }, true);
98
+ }));
99
+ this._register(this.state.onFindReplaceStateChange(() => {
100
+ this._findInput.setRegex(this.state.isRegex);
101
+ this._findInput.setWholeWords(this.state.wholeWord);
102
+ this._findInput.setCaseSensitive(this.state.matchCase);
103
+ this.findFirst();
104
+ }));
105
+ this.prevBtn = this._register(( new SimpleButton({
106
+ label: NLS_PREVIOUS_MATCH_BTN_LABEL + (options.previousMatchActionId ? this._getKeybinding(options.previousMatchActionId) : ''),
107
+ icon: findPreviousMatchIcon,
108
+ onTrigger: () => {
109
+ this.find(true);
110
+ }
111
+ })));
112
+ this.nextBtn = this._register(( new SimpleButton({
113
+ label: NLS_NEXT_MATCH_BTN_LABEL + (options.nextMatchActionId ? this._getKeybinding(options.nextMatchActionId) : ''),
114
+ icon: findNextMatchIcon,
115
+ onTrigger: () => {
116
+ this.find(false);
117
+ }
118
+ })));
119
+ const closeBtn = this._register(( new SimpleButton({
120
+ label: NLS_CLOSE_BTN_LABEL + (options.closeWidgetActionId ? this._getKeybinding(options.closeWidgetActionId) : ''),
121
+ icon: widgetClose,
122
+ onTrigger: () => {
123
+ this.hide();
124
+ }
125
+ })));
126
+ this._innerDomNode = document.createElement('div');
127
+ this._innerDomNode.classList.add('simple-find-part');
128
+ this._innerDomNode.appendChild(this._findInput.domNode);
129
+ this._innerDomNode.appendChild(this.prevBtn.domNode);
130
+ this._innerDomNode.appendChild(this.nextBtn.domNode);
131
+ this._innerDomNode.appendChild(closeBtn.domNode);
132
+ this._domNode = document.createElement('div');
133
+ this._domNode.classList.add('simple-find-part-wrapper');
134
+ this._domNode.appendChild(this._innerDomNode);
135
+ this.onkeyup(this._innerDomNode, e => {
136
+ if (e.equals(9 )) {
137
+ this.hide();
138
+ e.preventDefault();
139
+ return;
140
+ }
141
+ });
142
+ this._focusTracker = this._register(dom.trackFocus(this._innerDomNode));
143
+ this._register(this._focusTracker.onDidFocus(this._onFocusTrackerFocus.bind(this)));
144
+ this._register(this._focusTracker.onDidBlur(this._onFocusTrackerBlur.bind(this)));
145
+ this._findInputFocusTracker = this._register(dom.trackFocus(this._findInput.domNode));
146
+ this._register(this._findInputFocusTracker.onDidFocus(this._onFindInputFocusTrackerFocus.bind(this)));
147
+ this._register(this._findInputFocusTracker.onDidBlur(this._onFindInputFocusTrackerBlur.bind(this)));
148
+ this._register(dom.addDisposableListener(this._innerDomNode, 'click', (event) => {
149
+ event.stopPropagation();
150
+ }));
151
+ if (options?.showResultCount) {
152
+ this._domNode.classList.add('result-count');
153
+ this._matchesCount = document.createElement('div');
154
+ this._matchesCount.className = 'matchesCount';
155
+ this._findInput.domNode.insertAdjacentElement('afterend', this._matchesCount);
156
+ this._register(this._findInput.onDidChange(async () => {
157
+ await this.updateResultCount();
158
+ }));
159
+ this._register(this._findInput.onDidOptionChange(async () => {
160
+ this._foundMatch = this._onInputChanged();
161
+ await this.updateResultCount();
162
+ this.focusFindBox();
163
+ this._delayedUpdateHistory();
164
+ }));
165
+ }
166
+ let initialMinWidth = options?.initialWidth;
167
+ if (initialMinWidth) {
168
+ initialMinWidth = initialMinWidth < SIMPLE_FIND_WIDGET_INITIAL_WIDTH ? SIMPLE_FIND_WIDGET_INITIAL_WIDTH : initialMinWidth;
169
+ this._domNode.style.width = `${initialMinWidth}px`;
170
+ }
171
+ if (options?.enableSash) {
172
+ const _initialMinWidth = initialMinWidth ?? SIMPLE_FIND_WIDGET_INITIAL_WIDTH;
173
+ let originalWidth = _initialMinWidth;
174
+ const resizeSash = this._register(( new Sash(
175
+ this._innerDomNode,
176
+ this,
177
+ { orientation: 0 , size: 1 }
178
+ )));
179
+ this._register(resizeSash.onDidStart(() => {
180
+ originalWidth = parseFloat(dom.getComputedStyle(this._domNode).width);
181
+ }));
182
+ this._register(resizeSash.onDidChange((e) => {
183
+ const width = originalWidth + e.startX - e.currentX;
184
+ if (width < _initialMinWidth) {
185
+ return;
186
+ }
187
+ this._domNode.style.width = `${width}px`;
188
+ }));
189
+ this._register(resizeSash.onDidReset(e => {
190
+ const currentWidth = parseFloat(dom.getComputedStyle(this._domNode).width);
191
+ if (currentWidth === _initialMinWidth) {
192
+ this._domNode.style.width = '100%';
193
+ }
194
+ else {
195
+ this._domNode.style.width = `${_initialMinWidth}px`;
196
+ }
197
+ }));
198
+ }
199
+ }
200
+ getVerticalSashLeft(_sash) {
201
+ return 0;
202
+ }
203
+ get inputValue() {
204
+ return this._findInput.getValue();
205
+ }
206
+ get focusTracker() {
207
+ return this._focusTracker;
208
+ }
209
+ _getKeybinding(actionId) {
210
+ const kb = this._keybindingService?.lookupKeybinding(actionId);
211
+ if (!kb) {
212
+ return '';
213
+ }
214
+ return ` (${kb.getLabel()})`;
215
+ }
216
+ dispose() {
217
+ super.dispose();
218
+ if (this._domNode && this._domNode.parentElement) {
219
+ this._domNode.parentElement.removeChild(this._domNode);
220
+ }
221
+ }
222
+ isVisible() {
223
+ return this._isVisible;
224
+ }
225
+ getDomNode() {
226
+ return this._domNode;
227
+ }
228
+ getFindInputDomNode() {
229
+ return this._findInput.domNode;
230
+ }
231
+ reveal(initialInput, animated = true) {
232
+ if (initialInput) {
233
+ this._findInput.setValue(initialInput);
234
+ }
235
+ if (this._isVisible) {
236
+ this._findInput.select();
237
+ return;
238
+ }
239
+ this._isVisible = true;
240
+ this.updateResultCount();
241
+ this.layout();
242
+ setTimeout(() => {
243
+ this._innerDomNode.classList.toggle('suppress-transition', !animated);
244
+ this._innerDomNode.classList.add('visible', 'visible-transition');
245
+ this._innerDomNode.setAttribute('aria-hidden', 'false');
246
+ this._findInput.select();
247
+ if (!animated) {
248
+ setTimeout(() => {
249
+ this._innerDomNode.classList.remove('suppress-transition');
250
+ }, 0);
251
+ }
252
+ }, 0);
253
+ }
254
+ show(initialInput) {
255
+ if (initialInput && !this._isVisible) {
256
+ this._findInput.setValue(initialInput);
257
+ }
258
+ this._isVisible = true;
259
+ this.layout();
260
+ setTimeout(() => {
261
+ this._innerDomNode.classList.add('visible', 'visible-transition');
262
+ this._innerDomNode.setAttribute('aria-hidden', 'false');
263
+ }, 0);
264
+ }
265
+ hide(animated = true) {
266
+ if (this._isVisible) {
267
+ this._innerDomNode.classList.toggle('suppress-transition', !animated);
268
+ this._innerDomNode.classList.remove('visible-transition');
269
+ this._innerDomNode.setAttribute('aria-hidden', 'true');
270
+ setTimeout(() => {
271
+ this._isVisible = false;
272
+ this.updateButtons(this._foundMatch);
273
+ this._innerDomNode.classList.remove('visible', 'suppress-transition');
274
+ }, animated ? 200 : 0);
275
+ }
276
+ }
277
+ layout(width = this._width) {
278
+ this._width = width;
279
+ if (!this._isVisible) {
280
+ return;
281
+ }
282
+ if (this._matchesCount) {
283
+ let reducedFindWidget = false;
284
+ if (SIMPLE_FIND_WIDGET_INITIAL_WIDTH + MATCHES_COUNT_WIDTH + 28 >= width) {
285
+ reducedFindWidget = true;
286
+ }
287
+ this._innerDomNode.classList.toggle('reduced-find-widget', reducedFindWidget);
288
+ }
289
+ }
290
+ _delayedUpdateHistory() {
291
+ this._updateHistoryDelayer.trigger(this._updateHistory.bind(this));
292
+ }
293
+ _updateHistory() {
294
+ this._findInput.inputBox.addToHistory();
295
+ }
296
+ _getRegexValue() {
297
+ return this._findInput.getRegex();
298
+ }
299
+ _getWholeWordValue() {
300
+ return this._findInput.getWholeWords();
301
+ }
302
+ _getCaseSensitiveValue() {
303
+ return this._findInput.getCaseSensitive();
304
+ }
305
+ updateButtons(foundMatch) {
306
+ const hasInput = this.inputValue.length > 0;
307
+ this.prevBtn.setEnabled(this._isVisible && hasInput && foundMatch);
308
+ this.nextBtn.setEnabled(this._isVisible && hasInput && foundMatch);
309
+ }
310
+ focusFindBox() {
311
+ this.nextBtn.focus();
312
+ this._findInput.inputBox.focus();
313
+ }
314
+ async updateResultCount() {
315
+ if (!this._matchesCount) {
316
+ this.updateButtons(this._foundMatch);
317
+ return;
318
+ }
319
+ const count = await this._getResultCount();
320
+ this._matchesCount.innerText = '';
321
+ const showRedOutline = (this.inputValue.length > 0 && count?.resultCount === 0);
322
+ this._matchesCount.classList.toggle('no-results', showRedOutline);
323
+ let label = '';
324
+ if (count?.resultCount) {
325
+ let matchesCount = String(count.resultCount);
326
+ if (count.resultCount >= this._matchesLimit) {
327
+ matchesCount += '+';
328
+ }
329
+ let matchesPosition = String(count.resultIndex + 1);
330
+ if (matchesPosition === '0') {
331
+ matchesPosition = '?';
332
+ }
333
+ label = strings.format(NLS_MATCHES_LOCATION, matchesPosition, matchesCount);
334
+ }
335
+ else {
336
+ label = NLS_NO_RESULTS;
337
+ }
338
+ status(this._announceSearchResults(label, this.inputValue));
339
+ this._matchesCount.appendChild(document.createTextNode(label));
340
+ this._foundMatch = !!count && count.resultCount > 0;
341
+ this.updateButtons(this._foundMatch);
342
+ }
343
+ changeState(state) {
344
+ this.state.change(state, false);
345
+ }
346
+ _announceSearchResults(label, searchString) {
347
+ if (!searchString) {
348
+ return ( nls.localizeWithPath(
349
+ 'vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget',
350
+ 'ariaSearchNoInput',
351
+ "Enter search input"
352
+ ));
353
+ }
354
+ if (label === NLS_NO_RESULTS) {
355
+ return searchString === ''
356
+ ? ( nls.localizeWithPath(
357
+ 'vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget',
358
+ 'ariaSearchNoResultEmpty',
359
+ "{0} found",
360
+ label
361
+ ))
362
+ : ( nls.localizeWithPath(
363
+ 'vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget',
364
+ 'ariaSearchNoResult',
365
+ "{0} found for '{1}'",
366
+ label,
367
+ searchString
368
+ ));
369
+ }
370
+ return ( nls.localizeWithPath(
371
+ 'vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget',
372
+ 'ariaSearchNoResultWithLineNumNoCurrentMatch',
373
+ "{0} found for '{1}'",
374
+ label,
375
+ searchString
376
+ ));
377
+ }
378
+ }
379
+ const simpleFindWidgetSashBorder = registerColor('simpleFindWidget.sashBorder', { dark: '#454545', light: '#C8C8C8', hcDark: '#6FC3DF', hcLight: '#0F4A85' }, ( nls.localizeWithPath(
380
+ 'vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget',
381
+ 'simpleFindWidget.sashBorder',
382
+ 'Border color of the sash border.'
383
+ )));
384
+ registerThemingParticipant((theme, collector) => {
385
+ const resizeBorderBackground = theme.getColor(simpleFindWidgetSashBorder);
386
+ collector.addRule(`.monaco-workbench .simple-find-part .monaco-sash { background-color: ${resizeBorderBackground}; border-color: ${resizeBorderBackground} }`);
387
+ });
388
+ export { SimpleFindWidget, simpleFindWidgetSashBorder };
@@ -0,0 +1,61 @@
1
+ import * as languages from 'monaco-editor/esm/vs/editor/common/languages.js';
2
+ import { peekViewTitleBackground } from 'monaco-editor/esm/vs/editor/contrib/peekView/browser/peekView.js';
3
+ import * as nls from 'monaco-editor/esm/vs/nls.js';
4
+ import { registerColor, disabledForeground, contrastBorder, listFocusOutline, transparent } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
5
+ const resolvedCommentViewIcon = registerColor('commentsView.resolvedIcon', { dark: disabledForeground, light: disabledForeground, hcDark: contrastBorder, hcLight: contrastBorder }, ( nls.localizeWithPath(
6
+ 'vs/workbench/contrib/comments/browser/commentColors',
7
+ 'resolvedCommentIcon',
8
+ 'Icon color for resolved comments.'
9
+ )));
10
+ const unresolvedCommentViewIcon = registerColor('commentsView.unresolvedIcon', { dark: listFocusOutline, light: listFocusOutline, hcDark: contrastBorder, hcLight: contrastBorder }, ( nls.localizeWithPath(
11
+ 'vs/workbench/contrib/comments/browser/commentColors',
12
+ 'unresolvedCommentIcon',
13
+ 'Icon color for unresolved comments.'
14
+ )));
15
+ registerColor('editorCommentsWidget.replyInputBackground', { dark: peekViewTitleBackground, light: peekViewTitleBackground, hcDark: peekViewTitleBackground, hcLight: peekViewTitleBackground }, ( nls.localizeWithPath(
16
+ 'vs/workbench/contrib/comments/browser/commentColors',
17
+ 'commentReplyInputBackground',
18
+ 'Background color for comment reply input box.'
19
+ )));
20
+ const resolvedCommentBorder = registerColor('editorCommentsWidget.resolvedBorder', { dark: resolvedCommentViewIcon, light: resolvedCommentViewIcon, hcDark: contrastBorder, hcLight: contrastBorder }, ( nls.localizeWithPath(
21
+ 'vs/workbench/contrib/comments/browser/commentColors',
22
+ 'resolvedCommentBorder',
23
+ 'Color of borders and arrow for resolved comments.'
24
+ )));
25
+ const unresolvedCommentBorder = registerColor('editorCommentsWidget.unresolvedBorder', { dark: unresolvedCommentViewIcon, light: unresolvedCommentViewIcon, hcDark: contrastBorder, hcLight: contrastBorder }, ( nls.localizeWithPath(
26
+ 'vs/workbench/contrib/comments/browser/commentColors',
27
+ 'unresolvedCommentBorder',
28
+ 'Color of borders and arrow for unresolved comments.'
29
+ )));
30
+ registerColor('editorCommentsWidget.rangeBackground', { dark: ( transparent(unresolvedCommentBorder, .1)), light: ( transparent(unresolvedCommentBorder, .1)), hcDark: ( transparent(unresolvedCommentBorder, .1)), hcLight: ( transparent(unresolvedCommentBorder, .1)) }, ( nls.localizeWithPath(
31
+ 'vs/workbench/contrib/comments/browser/commentColors',
32
+ 'commentThreadRangeBackground',
33
+ 'Color of background for comment ranges.'
34
+ )));
35
+ registerColor('editorCommentsWidget.rangeActiveBackground', { dark: ( transparent(unresolvedCommentBorder, .1)), light: ( transparent(unresolvedCommentBorder, .1)), hcDark: ( transparent(unresolvedCommentBorder, .1)), hcLight: ( transparent(unresolvedCommentBorder, .1)) }, ( nls.localizeWithPath(
36
+ 'vs/workbench/contrib/comments/browser/commentColors',
37
+ 'commentThreadActiveRangeBackground',
38
+ 'Color of background for currently selected or hovered comment range.'
39
+ )));
40
+ const commentThreadStateBorderColors = ( new Map([
41
+ [languages.CommentThreadState.Unresolved, unresolvedCommentBorder],
42
+ [languages.CommentThreadState.Resolved, resolvedCommentBorder],
43
+ ]));
44
+ const commentThreadStateIconColors = ( new Map([
45
+ [languages.CommentThreadState.Unresolved, unresolvedCommentViewIcon],
46
+ [languages.CommentThreadState.Resolved, resolvedCommentViewIcon],
47
+ ]));
48
+ const commentThreadStateColorVar = '--comment-thread-state-color';
49
+ const commentViewThreadStateColorVar = '--comment-view-thread-state-color';
50
+ const commentThreadStateBackgroundColorVar = '--comment-thread-state-background-color';
51
+ function getCommentThreadStateColor(state, theme, map) {
52
+ const colorId = (state !== undefined) ? map.get(state) : undefined;
53
+ return (colorId !== undefined) ? theme.getColor(colorId) : undefined;
54
+ }
55
+ function getCommentThreadStateBorderColor(state, theme) {
56
+ return getCommentThreadStateColor(state, theme, commentThreadStateBorderColors);
57
+ }
58
+ function getCommentThreadStateIconColor(state, theme) {
59
+ return getCommentThreadStateColor(state, theme, commentThreadStateIconColors);
60
+ }
61
+ export { commentThreadStateBackgroundColorVar, commentThreadStateColorVar, commentViewThreadStateColorVar, getCommentThreadStateBorderColor, getCommentThreadStateIconColor };
@@ -0,0 +1,49 @@
1
+ import { Button } from 'monaco-editor/esm/vs/base/browser/ui/button/button.js';
2
+ import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
3
+ import { defaultButtonStyles } from 'monaco-editor/esm/vs/platform/theme/browser/defaultStyles.js';
4
+ class CommentFormActions {
5
+ constructor(container, actionHandler, maxActions) {
6
+ this.container = container;
7
+ this.actionHandler = actionHandler;
8
+ this.maxActions = maxActions;
9
+ this._buttonElements = [];
10
+ this._toDispose = ( new DisposableStore());
11
+ this._actions = [];
12
+ }
13
+ setActions(menu, hasOnlySecondaryActions = false) {
14
+ this._toDispose.clear();
15
+ this._buttonElements.forEach(b => b.remove());
16
+ this._buttonElements = [];
17
+ const groups = menu.getActions({ shouldForwardArgs: true });
18
+ let isPrimary = !hasOnlySecondaryActions;
19
+ for (const group of groups) {
20
+ const [, actions] = group;
21
+ this._actions = actions;
22
+ for (const action of actions) {
23
+ const button = ( new Button(this.container, { secondary: !isPrimary, ...defaultButtonStyles }));
24
+ isPrimary = false;
25
+ this._buttonElements.push(button.element);
26
+ this._toDispose.add(button);
27
+ this._toDispose.add(button.onDidClick(() => this.actionHandler(action)));
28
+ button.enabled = action.enabled;
29
+ button.label = action.label;
30
+ if ((this.maxActions !== undefined) && (this._buttonElements.length >= this.maxActions)) {
31
+ console.warn(`An extension has contributed more than the allowable number of actions to a comments menu.`);
32
+ return;
33
+ }
34
+ }
35
+ }
36
+ }
37
+ triggerDefaultAction() {
38
+ if (this._actions.length) {
39
+ const lastAction = this._actions[0];
40
+ if (lastAction.enabled) {
41
+ return this.actionHandler(lastAction);
42
+ }
43
+ }
44
+ }
45
+ dispose() {
46
+ this._toDispose.dispose();
47
+ }
48
+ }
49
+ export { CommentFormActions };