@codingame/monaco-vscode-api 1.85.0-next.2 → 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 +2540 -2533
  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,663 @@
1
+ import { __decorate, __param } from '../../../../../../../../../external/tslib/tslib.es6.js';
2
+ import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
3
+ import { FindInput } from 'monaco-editor/esm/vs/base/browser/ui/findinput/findInput.js';
4
+ import { ProgressBar } from 'monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js';
5
+ import { Widget } from 'monaco-editor/esm/vs/base/browser/ui/widget.js';
6
+ import { Delayer } from 'monaco-editor/esm/vs/base/common/async.js';
7
+ import './notebookFindReplaceWidget.css.js';
8
+ import { FindReplaceState } from 'monaco-editor/esm/vs/editor/contrib/find/browser/findState.js';
9
+ import { SimpleButton, findPreviousMatchIcon, findNextMatchIcon, findReplaceIcon, findReplaceAllIcon } from 'monaco-editor/esm/vs/editor/contrib/find/browser/findWidget.js';
10
+ import * as nls from 'monaco-editor/esm/vs/nls.js';
11
+ import { ContextScopedReplaceInput, registerAndCreateHistoryNavigationContext } from 'monaco-editor/esm/vs/platform/history/browser/contextScopedHistoryWidget.js';
12
+ import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
13
+ import { IContextViewService, IContextMenuService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
14
+ import { registerIcon, widgetClose } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
15
+ import { registerThemingParticipant } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
16
+ import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
17
+ import { parseReplaceString, ReplacePattern } from 'monaco-editor/esm/vs/editor/contrib/find/browser/replacePattern.js';
18
+ import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
19
+ import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
20
+ import { Action, ActionRunner, Separator } from 'monaco-editor/esm/vs/base/common/actions.js';
21
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
22
+ import { createAndFillInActionBarActions } from 'monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js';
23
+ import { DropdownMenuActionViewItem } from 'monaco-editor/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js';
24
+ import { ActionBar } from 'monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js';
25
+ import { filterIcon } from '../../../../extensions/browser/extensionsIcons.js';
26
+ import { NotebookFindFilters } from './findFilters.js';
27
+ import { isSafari } from 'monaco-editor/esm/vs/base/common/platform.js';
28
+ import { Sash } from 'monaco-editor/esm/vs/base/browser/ui/sash/sash.js';
29
+ import { defaultProgressBarStyles, defaultInputBoxStyles, defaultToggleStyles } from 'monaco-editor/esm/vs/platform/theme/browser/defaultStyles.js';
30
+ import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
31
+ import { NotebookSetting } from '../../../common/notebookCommon.js';
32
+ const NLS_FIND_INPUT_LABEL = ( nls.localizeWithPath(
33
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
34
+ 'label.find',
35
+ "Find"
36
+ ));
37
+ const NLS_FIND_INPUT_PLACEHOLDER = ( nls.localizeWithPath(
38
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
39
+ 'placeholder.find',
40
+ "Find"
41
+ ));
42
+ const NLS_PREVIOUS_MATCH_BTN_LABEL = ( nls.localizeWithPath(
43
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
44
+ 'label.previousMatchButton',
45
+ "Previous Match"
46
+ ));
47
+ const NLS_NEXT_MATCH_BTN_LABEL = ( nls.localizeWithPath(
48
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
49
+ 'label.nextMatchButton',
50
+ "Next Match"
51
+ ));
52
+ const NLS_CLOSE_BTN_LABEL = ( nls.localizeWithPath(
53
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
54
+ 'label.closeButton',
55
+ "Close"
56
+ ));
57
+ const NLS_TOGGLE_REPLACE_MODE_BTN_LABEL = ( nls.localizeWithPath(
58
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
59
+ 'label.toggleReplaceButton',
60
+ "Toggle Replace"
61
+ ));
62
+ const NLS_REPLACE_INPUT_LABEL = ( nls.localizeWithPath(
63
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
64
+ 'label.replace',
65
+ "Replace"
66
+ ));
67
+ const NLS_REPLACE_INPUT_PLACEHOLDER = ( nls.localizeWithPath(
68
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
69
+ 'placeholder.replace',
70
+ "Replace"
71
+ ));
72
+ const NLS_REPLACE_BTN_LABEL = ( nls.localizeWithPath(
73
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
74
+ 'label.replaceButton',
75
+ "Replace"
76
+ ));
77
+ const NLS_REPLACE_ALL_BTN_LABEL = ( nls.localizeWithPath(
78
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
79
+ 'label.replaceAllButton',
80
+ "Replace All"
81
+ ));
82
+ registerIcon('find-filter', Codicon.filter, ( nls.localizeWithPath(
83
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
84
+ 'findFilterIcon',
85
+ 'Icon for Find Filter in find widget.'
86
+ )));
87
+ const NOTEBOOK_FIND_FILTERS = ( nls.localizeWithPath(
88
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
89
+ 'notebook.find.filter.filterAction',
90
+ "Find Filters"
91
+ ));
92
+ const NOTEBOOK_FIND_IN_MARKUP_INPUT = ( nls.localizeWithPath(
93
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
94
+ 'notebook.find.filter.findInMarkupInput',
95
+ "Markdown Source"
96
+ ));
97
+ const NOTEBOOK_FIND_IN_MARKUP_PREVIEW = ( nls.localizeWithPath(
98
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
99
+ 'notebook.find.filter.findInMarkupPreview',
100
+ "Rendered Markdown"
101
+ ));
102
+ const NOTEBOOK_FIND_IN_CODE_INPUT = ( nls.localizeWithPath(
103
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
104
+ 'notebook.find.filter.findInCodeInput',
105
+ "Code Cell Source"
106
+ ));
107
+ const NOTEBOOK_FIND_IN_CODE_OUTPUT = ( nls.localizeWithPath(
108
+ 'vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget',
109
+ 'notebook.find.filter.findInCodeOutput',
110
+ "Code Cell Output"
111
+ ));
112
+ const NOTEBOOK_FIND_WIDGET_INITIAL_WIDTH = 318;
113
+ const NOTEBOOK_FIND_WIDGET_INITIAL_HORIZONTAL_PADDING = 4;
114
+ let NotebookFindFilterActionViewItem = class NotebookFindFilterActionViewItem extends DropdownMenuActionViewItem {
115
+ constructor(filters, action, actionRunner, contextMenuService) {
116
+ super(action, { getActions: () => this.getActions() }, contextMenuService, {
117
+ actionRunner,
118
+ classNames: action.class,
119
+ anchorAlignmentProvider: () => 1
120
+ });
121
+ this.filters = filters;
122
+ }
123
+ render(container) {
124
+ super.render(container);
125
+ this.updateChecked();
126
+ }
127
+ getActions() {
128
+ const markdownInput = {
129
+ checked: this.filters.markupInput,
130
+ class: undefined,
131
+ enabled: true,
132
+ id: 'findInMarkdownInput',
133
+ label: NOTEBOOK_FIND_IN_MARKUP_INPUT,
134
+ run: async () => {
135
+ this.filters.markupInput = !this.filters.markupInput;
136
+ },
137
+ tooltip: ''
138
+ };
139
+ const markdownPreview = {
140
+ checked: this.filters.markupPreview,
141
+ class: undefined,
142
+ enabled: true,
143
+ id: 'findInMarkdownInput',
144
+ label: NOTEBOOK_FIND_IN_MARKUP_PREVIEW,
145
+ run: async () => {
146
+ this.filters.markupPreview = !this.filters.markupPreview;
147
+ },
148
+ tooltip: ''
149
+ };
150
+ const codeInput = {
151
+ checked: this.filters.codeInput,
152
+ class: undefined,
153
+ enabled: true,
154
+ id: 'findInCodeInput',
155
+ label: NOTEBOOK_FIND_IN_CODE_INPUT,
156
+ run: async () => {
157
+ this.filters.codeInput = !this.filters.codeInput;
158
+ },
159
+ tooltip: ''
160
+ };
161
+ const codeOutput = {
162
+ checked: this.filters.codeOutput,
163
+ class: undefined,
164
+ enabled: true,
165
+ id: 'findInCodeOutput',
166
+ label: NOTEBOOK_FIND_IN_CODE_OUTPUT,
167
+ run: async () => {
168
+ this.filters.codeOutput = !this.filters.codeOutput;
169
+ },
170
+ tooltip: '',
171
+ dispose: () => null
172
+ };
173
+ if (isSafari) {
174
+ return [
175
+ markdownInput,
176
+ codeInput
177
+ ];
178
+ }
179
+ else {
180
+ return [
181
+ markdownInput,
182
+ markdownPreview,
183
+ ( new Separator()),
184
+ codeInput,
185
+ codeOutput,
186
+ ];
187
+ }
188
+ }
189
+ updateChecked() {
190
+ this.element.classList.toggle('checked', this._action.checked);
191
+ }
192
+ };
193
+ NotebookFindFilterActionViewItem = ( __decorate([
194
+ ( __param(3, IContextMenuService))
195
+ ], NotebookFindFilterActionViewItem));
196
+ class NotebookFindInputFilterButton extends Disposable {
197
+ constructor(filters, contextMenuService, instantiationService, options, tooltip = NOTEBOOK_FIND_FILTERS) {
198
+ super();
199
+ this.filters = filters;
200
+ this.contextMenuService = contextMenuService;
201
+ this.instantiationService = instantiationService;
202
+ this._actionbar = null;
203
+ this._toggleStyles = options.toggleStyles;
204
+ this._filtersAction = ( new Action(
205
+ 'notebookFindFilterAction',
206
+ tooltip,
207
+ 'notebook-filters ' + ThemeIcon.asClassName(filterIcon)
208
+ ));
209
+ this._filtersAction.checked = false;
210
+ this._filterButtonContainer = dom.$('.find-filter-button');
211
+ this._filterButtonContainer.classList.add('monaco-custom-toggle');
212
+ this.createFilters(this._filterButtonContainer);
213
+ }
214
+ get container() {
215
+ return this._filterButtonContainer;
216
+ }
217
+ get width() {
218
+ return 2 + 2 + 2 + 16 ;
219
+ }
220
+ applyStyles(filterChecked) {
221
+ const toggleStyles = this._toggleStyles;
222
+ this._filterButtonContainer.style.border = '1px solid transparent';
223
+ this._filterButtonContainer.style.borderRadius = '3px';
224
+ this._filterButtonContainer.style.borderColor = (filterChecked && toggleStyles.inputActiveOptionBorder) || '';
225
+ this._filterButtonContainer.style.color = (filterChecked && toggleStyles.inputActiveOptionForeground) || 'inherit';
226
+ this._filterButtonContainer.style.backgroundColor = (filterChecked && toggleStyles.inputActiveOptionBackground) || '';
227
+ }
228
+ createFilters(container) {
229
+ this._actionbar = this._register(( new ActionBar(container, {
230
+ actionViewItemProvider: action => {
231
+ if (action.id === this._filtersAction.id) {
232
+ return this.instantiationService.createInstance(NotebookFindFilterActionViewItem, this.filters, action, ( new ActionRunner()));
233
+ }
234
+ return undefined;
235
+ }
236
+ })));
237
+ this._actionbar.push(this._filtersAction, { icon: true, label: false });
238
+ }
239
+ }
240
+ class NotebookFindInput extends FindInput {
241
+ constructor(filters, contextKeyService, contextMenuService, instantiationService, parent, contextViewProvider, options) {
242
+ super(parent, contextViewProvider, options);
243
+ this.filters = filters;
244
+ this.contextMenuService = contextMenuService;
245
+ this.instantiationService = instantiationService;
246
+ this._filterChecked = false;
247
+ this._register(registerAndCreateHistoryNavigationContext(contextKeyService, this.inputBox));
248
+ this._findFilter = this._register(( new NotebookFindInputFilterButton(filters, contextMenuService, instantiationService, options)));
249
+ this.inputBox.paddingRight = (this.caseSensitive?.width() ?? 0) + (this.wholeWords?.width() ?? 0) + (this.regex?.width() ?? 0) + this._findFilter.width;
250
+ this.controls.appendChild(this._findFilter.container);
251
+ }
252
+ setEnabled(enabled) {
253
+ super.setEnabled(enabled);
254
+ if (enabled && !this._filterChecked) {
255
+ this.regex?.enable();
256
+ }
257
+ else {
258
+ this.regex?.disable();
259
+ }
260
+ }
261
+ updateFilterState(changed) {
262
+ this._filterChecked = changed;
263
+ if (this.regex) {
264
+ if (this._filterChecked) {
265
+ this.regex.disable();
266
+ this.regex.domNode.tabIndex = -1;
267
+ this.regex.domNode.classList.toggle('disabled', true);
268
+ }
269
+ else {
270
+ this.regex.enable();
271
+ this.regex.domNode.tabIndex = 0;
272
+ this.regex.domNode.classList.toggle('disabled', false);
273
+ }
274
+ }
275
+ this._findFilter.applyStyles(this._filterChecked);
276
+ }
277
+ getCellToolbarActions(menu) {
278
+ const primary = [];
279
+ const secondary = [];
280
+ const result = { primary, secondary };
281
+ createAndFillInActionBarActions(menu, { shouldForwardArgs: true }, result, g => /^inline/.test(g));
282
+ return result;
283
+ }
284
+ }
285
+ let SimpleFindReplaceWidget = class SimpleFindReplaceWidget extends Widget {
286
+ constructor(_contextViewService, contextKeyService, _configurationService, contextMenuService, instantiationService, _state = ( new FindReplaceState()), _notebookEditor) {
287
+ super();
288
+ this._contextViewService = _contextViewService;
289
+ this._configurationService = _configurationService;
290
+ this.contextMenuService = contextMenuService;
291
+ this.instantiationService = instantiationService;
292
+ this._state = _state;
293
+ this._notebookEditor = _notebookEditor;
294
+ this._resizeOriginalWidth = NOTEBOOK_FIND_WIDGET_INITIAL_WIDTH;
295
+ this._isVisible = false;
296
+ this._isReplaceVisible = false;
297
+ this.foundMatch = false;
298
+ const findScope = this._configurationService.getValue(NotebookSetting.findScope) ?? { markupSource: true, markupPreview: true, codeSource: true, codeOutput: true };
299
+ this._filters = ( new NotebookFindFilters(
300
+ findScope.markupSource,
301
+ findScope.markupPreview,
302
+ findScope.codeSource,
303
+ findScope.codeOutput
304
+ ));
305
+ this._state.change({ filters: this._filters }, false);
306
+ this._filters.onDidChange(() => {
307
+ this._state.change({ filters: this._filters }, false);
308
+ });
309
+ this._domNode = document.createElement('div');
310
+ this._domNode.classList.add('simple-fr-find-part-wrapper');
311
+ this._register(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e)));
312
+ this._scopedContextKeyService = contextKeyService.createScoped(this._domNode);
313
+ const progressContainer = dom.$('.find-replace-progress');
314
+ this._progressBar = ( new ProgressBar(progressContainer, defaultProgressBarStyles));
315
+ this._domNode.appendChild(progressContainer);
316
+ const isInteractiveWindow = contextKeyService.getContextKeyValue('notebookType') === 'interactive';
317
+ this._toggleReplaceBtn = this._register(( new SimpleButton({
318
+ label: NLS_TOGGLE_REPLACE_MODE_BTN_LABEL,
319
+ className: 'codicon toggle left',
320
+ onTrigger: isInteractiveWindow ? () => { } :
321
+ () => {
322
+ this._isReplaceVisible = !this._isReplaceVisible;
323
+ this._state.change({ isReplaceRevealed: this._isReplaceVisible }, false);
324
+ this._updateReplaceViewDisplay();
325
+ }
326
+ })));
327
+ this._toggleReplaceBtn.setEnabled(!isInteractiveWindow);
328
+ this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);
329
+ this._domNode.appendChild(this._toggleReplaceBtn.domNode);
330
+ this._innerFindDomNode = document.createElement('div');
331
+ this._innerFindDomNode.classList.add('simple-fr-find-part');
332
+ this._findInput = this._register(( new NotebookFindInput(
333
+ this._filters,
334
+ this._scopedContextKeyService,
335
+ this.contextMenuService,
336
+ this.instantiationService,
337
+ null,
338
+ this._contextViewService,
339
+ {
340
+ label: NLS_FIND_INPUT_LABEL,
341
+ placeholder: NLS_FIND_INPUT_PLACEHOLDER,
342
+ validation: (value) => {
343
+ if (value.length === 0 || !this._findInput.getRegex()) {
344
+ return null;
345
+ }
346
+ try {
347
+ return null;
348
+ }
349
+ catch (e) {
350
+ this.foundMatch = false;
351
+ this.updateButtons(this.foundMatch);
352
+ return { content: e.message };
353
+ }
354
+ },
355
+ flexibleWidth: true,
356
+ showCommonFindToggles: true,
357
+ inputBoxStyles: defaultInputBoxStyles,
358
+ toggleStyles: defaultToggleStyles
359
+ }
360
+ )));
361
+ this._updateHistoryDelayer = ( new Delayer(500));
362
+ this.oninput(this._findInput.domNode, (e) => {
363
+ this.foundMatch = this.onInputChanged();
364
+ this.updateButtons(this.foundMatch);
365
+ this._delayedUpdateHistory();
366
+ });
367
+ this._register(this._findInput.inputBox.onDidChange(() => {
368
+ this._state.change({ searchString: this._findInput.getValue() }, true);
369
+ }));
370
+ this._findInput.setRegex(!!this._state.isRegex);
371
+ this._findInput.setCaseSensitive(!!this._state.matchCase);
372
+ this._findInput.setWholeWords(!!this._state.wholeWord);
373
+ this._register(this._findInput.onDidOptionChange(() => {
374
+ this._state.change({
375
+ isRegex: this._findInput.getRegex(),
376
+ wholeWord: this._findInput.getWholeWords(),
377
+ matchCase: this._findInput.getCaseSensitive()
378
+ }, true);
379
+ }));
380
+ this._register(this._state.onFindReplaceStateChange(() => {
381
+ this._findInput.setRegex(this._state.isRegex);
382
+ this._findInput.setWholeWords(this._state.wholeWord);
383
+ this._findInput.setCaseSensitive(this._state.matchCase);
384
+ this._replaceInput.setPreserveCase(this._state.preserveCase);
385
+ this.findFirst();
386
+ }));
387
+ this._matchesCount = document.createElement('div');
388
+ this._matchesCount.className = 'matchesCount';
389
+ this._updateMatchesCount();
390
+ this.prevBtn = this._register(( new SimpleButton({
391
+ label: NLS_PREVIOUS_MATCH_BTN_LABEL,
392
+ icon: findPreviousMatchIcon,
393
+ onTrigger: () => {
394
+ this.find(true);
395
+ }
396
+ })));
397
+ this.nextBtn = this._register(( new SimpleButton({
398
+ label: NLS_NEXT_MATCH_BTN_LABEL,
399
+ icon: findNextMatchIcon,
400
+ onTrigger: () => {
401
+ this.find(false);
402
+ }
403
+ })));
404
+ const closeBtn = this._register(( new SimpleButton({
405
+ label: NLS_CLOSE_BTN_LABEL,
406
+ icon: widgetClose,
407
+ onTrigger: () => {
408
+ this.hide();
409
+ }
410
+ })));
411
+ this._innerFindDomNode.appendChild(this._findInput.domNode);
412
+ this._innerFindDomNode.appendChild(this._matchesCount);
413
+ this._innerFindDomNode.appendChild(this.prevBtn.domNode);
414
+ this._innerFindDomNode.appendChild(this.nextBtn.domNode);
415
+ this._innerFindDomNode.appendChild(closeBtn.domNode);
416
+ this._domNode.appendChild(this._innerFindDomNode);
417
+ this.onkeyup(this._innerFindDomNode, e => {
418
+ if (e.equals(9 )) {
419
+ this.hide();
420
+ e.preventDefault();
421
+ return;
422
+ }
423
+ });
424
+ this._focusTracker = this._register(dom.trackFocus(this._domNode));
425
+ this._register(this._focusTracker.onDidFocus(this.onFocusTrackerFocus.bind(this)));
426
+ this._register(this._focusTracker.onDidBlur(this.onFocusTrackerBlur.bind(this)));
427
+ this._findInputFocusTracker = this._register(dom.trackFocus(this._findInput.domNode));
428
+ this._register(this._findInputFocusTracker.onDidFocus(this.onFindInputFocusTrackerFocus.bind(this)));
429
+ this._register(this._findInputFocusTracker.onDidBlur(this.onFindInputFocusTrackerBlur.bind(this)));
430
+ this._register(dom.addDisposableListener(this._innerFindDomNode, 'click', (event) => {
431
+ event.stopPropagation();
432
+ }));
433
+ this._innerReplaceDomNode = document.createElement('div');
434
+ this._innerReplaceDomNode.classList.add('simple-fr-replace-part');
435
+ this._replaceInput = this._register(( new ContextScopedReplaceInput(null, undefined, {
436
+ label: NLS_REPLACE_INPUT_LABEL,
437
+ placeholder: NLS_REPLACE_INPUT_PLACEHOLDER,
438
+ history: [],
439
+ inputBoxStyles: defaultInputBoxStyles,
440
+ toggleStyles: defaultToggleStyles
441
+ }, contextKeyService, false)));
442
+ this._innerReplaceDomNode.appendChild(this._replaceInput.domNode);
443
+ this._replaceInputFocusTracker = this._register(dom.trackFocus(this._replaceInput.domNode));
444
+ this._register(this._replaceInputFocusTracker.onDidFocus(this.onReplaceInputFocusTrackerFocus.bind(this)));
445
+ this._register(this._replaceInputFocusTracker.onDidBlur(this.onReplaceInputFocusTrackerBlur.bind(this)));
446
+ this._register(this._replaceInput.inputBox.onDidChange(() => {
447
+ this._state.change({ replaceString: this._replaceInput.getValue() }, true);
448
+ }));
449
+ this._domNode.appendChild(this._innerReplaceDomNode);
450
+ this._updateReplaceViewDisplay();
451
+ this._replaceBtn = this._register(( new SimpleButton({
452
+ label: NLS_REPLACE_BTN_LABEL,
453
+ icon: findReplaceIcon,
454
+ onTrigger: () => {
455
+ this.replaceOne();
456
+ }
457
+ })));
458
+ this._replaceAllBtn = this._register(( new SimpleButton({
459
+ label: NLS_REPLACE_ALL_BTN_LABEL,
460
+ icon: findReplaceAllIcon,
461
+ onTrigger: () => {
462
+ this.replaceAll();
463
+ }
464
+ })));
465
+ this._innerReplaceDomNode.appendChild(this._replaceBtn.domNode);
466
+ this._innerReplaceDomNode.appendChild(this._replaceAllBtn.domNode);
467
+ this._resizeSash = this._register(( new Sash(
468
+ this._domNode,
469
+ { getVerticalSashLeft: () => 0 },
470
+ { orientation: 0 , size: 2 }
471
+ )));
472
+ this._register(this._resizeSash.onDidStart(() => {
473
+ this._resizeOriginalWidth = this._getDomWidth();
474
+ }));
475
+ this._register(this._resizeSash.onDidChange((evt) => {
476
+ let width = this._resizeOriginalWidth + evt.startX - evt.currentX;
477
+ if (width < NOTEBOOK_FIND_WIDGET_INITIAL_WIDTH) {
478
+ width = NOTEBOOK_FIND_WIDGET_INITIAL_WIDTH;
479
+ }
480
+ const maxWidth = this._getMaxWidth();
481
+ if (width > maxWidth) {
482
+ width = maxWidth;
483
+ }
484
+ this._domNode.style.width = `${width}px`;
485
+ if (this._isReplaceVisible) {
486
+ this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode);
487
+ }
488
+ this._findInput.inputBox.layout();
489
+ }));
490
+ this._register(this._resizeSash.onDidReset(() => {
491
+ const currentWidth = this._getDomWidth();
492
+ let width = NOTEBOOK_FIND_WIDGET_INITIAL_WIDTH;
493
+ if (currentWidth <= NOTEBOOK_FIND_WIDGET_INITIAL_WIDTH) {
494
+ width = this._getMaxWidth();
495
+ }
496
+ this._domNode.style.width = `${width}px`;
497
+ if (this._isReplaceVisible) {
498
+ this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode);
499
+ }
500
+ this._findInput.inputBox.layout();
501
+ }));
502
+ }
503
+ _getMaxWidth() {
504
+ return this._notebookEditor.getLayoutInfo().width - 64;
505
+ }
506
+ _getDomWidth() {
507
+ return dom.getTotalWidth(this._domNode) - (NOTEBOOK_FIND_WIDGET_INITIAL_HORIZONTAL_PADDING * 2);
508
+ }
509
+ getCellToolbarActions(menu) {
510
+ const primary = [];
511
+ const secondary = [];
512
+ const result = { primary, secondary };
513
+ createAndFillInActionBarActions(menu, { shouldForwardArgs: true }, result, g => /^inline/.test(g));
514
+ return result;
515
+ }
516
+ get inputValue() {
517
+ return this._findInput.getValue();
518
+ }
519
+ get replaceValue() {
520
+ return this._replaceInput.getValue();
521
+ }
522
+ get replacePattern() {
523
+ if (this._state.isRegex) {
524
+ return parseReplaceString(this.replaceValue);
525
+ }
526
+ return ReplacePattern.fromStaticValue(this.replaceValue);
527
+ }
528
+ get focusTracker() {
529
+ return this._focusTracker;
530
+ }
531
+ _onStateChanged(e) {
532
+ this._updateButtons();
533
+ this._updateMatchesCount();
534
+ }
535
+ _updateButtons() {
536
+ this._findInput.setEnabled(this._isVisible);
537
+ this._replaceInput.setEnabled(this._isVisible && this._isReplaceVisible);
538
+ const findInputIsNonEmpty = (this._state.searchString.length > 0);
539
+ this._replaceBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty);
540
+ this._replaceAllBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty);
541
+ this._domNode.classList.toggle('replaceToggled', this._isReplaceVisible);
542
+ this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);
543
+ this.foundMatch = this._state.matchesCount > 0;
544
+ this.updateButtons(this.foundMatch);
545
+ }
546
+ _updateMatchesCount() {
547
+ }
548
+ dispose() {
549
+ super.dispose();
550
+ if (this._domNode && this._domNode.parentElement) {
551
+ this._domNode.parentElement.removeChild(this._domNode);
552
+ }
553
+ }
554
+ getDomNode() {
555
+ return this._domNode;
556
+ }
557
+ reveal(initialInput) {
558
+ if (initialInput) {
559
+ this._findInput.setValue(initialInput);
560
+ }
561
+ if (this._isVisible) {
562
+ this._findInput.select();
563
+ return;
564
+ }
565
+ this._isVisible = true;
566
+ this.updateButtons(this.foundMatch);
567
+ setTimeout(() => {
568
+ this._domNode.classList.add('visible', 'visible-transition');
569
+ this._domNode.setAttribute('aria-hidden', 'false');
570
+ this._findInput.select();
571
+ }, 0);
572
+ }
573
+ focus() {
574
+ this._findInput.focus();
575
+ }
576
+ show(initialInput, options) {
577
+ if (initialInput) {
578
+ this._findInput.setValue(initialInput);
579
+ }
580
+ this._isVisible = true;
581
+ setTimeout(() => {
582
+ this._domNode.classList.add('visible', 'visible-transition');
583
+ this._domNode.setAttribute('aria-hidden', 'false');
584
+ if (options?.focus ?? true) {
585
+ this.focus();
586
+ }
587
+ }, 0);
588
+ }
589
+ showWithReplace(initialInput, replaceInput) {
590
+ if (initialInput) {
591
+ this._findInput.setValue(initialInput);
592
+ }
593
+ if (replaceInput) {
594
+ this._replaceInput.setValue(replaceInput);
595
+ }
596
+ this._isVisible = true;
597
+ this._isReplaceVisible = true;
598
+ this._state.change({ isReplaceRevealed: this._isReplaceVisible }, false);
599
+ this._updateReplaceViewDisplay();
600
+ setTimeout(() => {
601
+ this._domNode.classList.add('visible', 'visible-transition');
602
+ this._domNode.setAttribute('aria-hidden', 'false');
603
+ this._updateButtons();
604
+ this._replaceInput.focus();
605
+ }, 0);
606
+ }
607
+ _updateReplaceViewDisplay() {
608
+ if (this._isReplaceVisible) {
609
+ this._innerReplaceDomNode.style.display = 'flex';
610
+ }
611
+ else {
612
+ this._innerReplaceDomNode.style.display = 'none';
613
+ }
614
+ this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode);
615
+ }
616
+ hide() {
617
+ if (this._isVisible) {
618
+ this._domNode.classList.remove('visible-transition');
619
+ this._domNode.setAttribute('aria-hidden', 'true');
620
+ setTimeout(() => {
621
+ this._isVisible = false;
622
+ this.updateButtons(this.foundMatch);
623
+ this._domNode.classList.remove('visible');
624
+ }, 200);
625
+ }
626
+ }
627
+ _delayedUpdateHistory() {
628
+ this._updateHistoryDelayer.trigger(this._updateHistory.bind(this));
629
+ }
630
+ _updateHistory() {
631
+ this._findInput.inputBox.addToHistory();
632
+ }
633
+ _getRegexValue() {
634
+ return this._findInput.getRegex();
635
+ }
636
+ _getWholeWordValue() {
637
+ return this._findInput.getWholeWords();
638
+ }
639
+ _getCaseSensitiveValue() {
640
+ return this._findInput.getCaseSensitive();
641
+ }
642
+ updateButtons(foundMatch) {
643
+ const hasInput = this.inputValue.length > 0;
644
+ this.prevBtn.setEnabled(this._isVisible && hasInput && foundMatch);
645
+ this.nextBtn.setEnabled(this._isVisible && hasInput && foundMatch);
646
+ }
647
+ };
648
+ SimpleFindReplaceWidget = ( __decorate([
649
+ ( __param(0, IContextViewService)),
650
+ ( __param(1, IContextKeyService)),
651
+ ( __param(2, IConfigurationService)),
652
+ ( __param(3, IContextMenuService)),
653
+ ( __param(4, IInstantiationService))
654
+ ], SimpleFindReplaceWidget));
655
+ registerThemingParticipant((theme, collector) => {
656
+ collector.addRule(`
657
+ .notebook-editor {
658
+ --notebook-find-width: ${NOTEBOOK_FIND_WIDGET_INITIAL_WIDTH}px;
659
+ --notebook-find-horizontal-padding: ${NOTEBOOK_FIND_WIDGET_INITIAL_HORIZONTAL_PADDING}px;
660
+ }
661
+ `);
662
+ });
663
+ export { NotebookFindInput, NotebookFindInputFilterButton, SimpleFindReplaceWidget };