monaco-editor-core 0.54.0 → 0.55.0-dev-20251007

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 (251) hide show
  1. package/esm/nls.messages.de.js +1 -1
  2. package/esm/nls.messages.es.js +1 -1
  3. package/esm/nls.messages.fr.js +1 -1
  4. package/esm/nls.messages.it.js +1 -1
  5. package/esm/nls.messages.ja.js +1 -1
  6. package/esm/nls.messages.ko.js +1 -1
  7. package/esm/nls.messages.ru.js +1 -1
  8. package/esm/nls.messages.zh-cn.js +1 -1
  9. package/esm/nls.messages.zh-tw.js +1 -1
  10. package/esm/vs/base/browser/canIUse.js +1 -0
  11. package/esm/vs/base/browser/canIUse.js.map +1 -1
  12. package/esm/vs/base/browser/dom.js +9 -0
  13. package/esm/vs/base/browser/dom.js.map +1 -1
  14. package/esm/vs/base/browser/fastDomNode.js.map +1 -1
  15. package/esm/vs/base/browser/mouseEvent.js +3 -0
  16. package/esm/vs/base/browser/mouseEvent.js.map +1 -1
  17. package/esm/vs/base/browser/trustedTypes.js +2 -0
  18. package/esm/vs/base/browser/trustedTypes.js.map +1 -1
  19. package/esm/vs/base/browser/ui/list/listWidget.js +5 -5
  20. package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
  21. package/esm/vs/base/browser/ui/sash/sash.css +1 -1
  22. package/esm/vs/base/browser/ui/sash/sash.js +4 -0
  23. package/esm/vs/base/browser/ui/sash/sash.js.map +1 -1
  24. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +1 -1
  25. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
  26. package/esm/vs/base/browser/ui/table/table.css +2 -2
  27. package/esm/vs/base/browser/ui/tree/abstractTree.js +7 -3
  28. package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
  29. package/esm/vs/base/browser/ui/tree/asyncDataTree.js +4 -0
  30. package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
  31. package/esm/vs/base/browser/ui/tree/indexTreeModel.js +1 -0
  32. package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
  33. package/esm/vs/base/browser/ui/tree/media/tree.css +2 -2
  34. package/esm/vs/base/browser/webWorkerFactory.js +3 -0
  35. package/esm/vs/base/browser/webWorkerFactory.js.map +1 -1
  36. package/esm/vs/base/common/buffer.js.map +1 -1
  37. package/esm/vs/base/common/decorators.js +1 -0
  38. package/esm/vs/base/common/decorators.js.map +1 -1
  39. package/esm/vs/base/common/errors.js +1 -0
  40. package/esm/vs/base/common/errors.js.map +1 -1
  41. package/esm/vs/base/common/glob.js +1 -1
  42. package/esm/vs/base/common/glob.js.map +1 -1
  43. package/esm/vs/base/common/hash.js.map +1 -1
  44. package/esm/vs/base/common/hotReload.js +2 -0
  45. package/esm/vs/base/common/hotReload.js.map +1 -1
  46. package/esm/vs/base/common/hotReloadHelpers.js +1 -0
  47. package/esm/vs/base/common/hotReloadHelpers.js.map +1 -1
  48. package/esm/vs/base/common/lifecycle.js +19 -0
  49. package/esm/vs/base/common/lifecycle.js.map +1 -1
  50. package/esm/vs/base/common/map.js.map +1 -1
  51. package/esm/vs/base/common/marshalling.js +4 -0
  52. package/esm/vs/base/common/marshalling.js.map +1 -1
  53. package/esm/vs/base/common/network.js +1 -0
  54. package/esm/vs/base/common/network.js.map +1 -1
  55. package/esm/vs/base/common/objects.js +1 -0
  56. package/esm/vs/base/common/objects.js.map +1 -1
  57. package/esm/vs/base/common/observableInternal/changeTracker.js +4 -0
  58. package/esm/vs/base/common/observableInternal/changeTracker.js.map +1 -1
  59. package/esm/vs/base/common/observableInternal/debugLocation.js +1 -0
  60. package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
  61. package/esm/vs/base/common/observableInternal/debugName.js +1 -0
  62. package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
  63. package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js +1 -0
  64. package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js.map +1 -1
  65. package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js +1 -0
  66. package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js.map +1 -1
  67. package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js +1 -0
  68. package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js.map +1 -1
  69. package/esm/vs/base/common/observableInternal/observables/derived.js +7 -1
  70. package/esm/vs/base/common/observableInternal/observables/derived.js.map +1 -1
  71. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js +2 -0
  72. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
  73. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -0
  74. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
  75. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +1 -0
  76. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
  77. package/esm/vs/base/common/process.js +1 -0
  78. package/esm/vs/base/common/process.js.map +1 -1
  79. package/esm/vs/base/common/product.js.map +1 -1
  80. package/esm/vs/base/common/types.js +2 -0
  81. package/esm/vs/base/common/types.js.map +1 -1
  82. package/esm/vs/base/common/worker/webWorker.js +26 -14
  83. package/esm/vs/base/common/worker/webWorker.js.map +1 -1
  84. package/esm/vs/base/parts/sandbox/common/sandboxTypes.js +2 -0
  85. package/esm/vs/base/parts/sandbox/common/sandboxTypes.js.map +1 -0
  86. package/esm/vs/editor/browser/config/editorConfiguration.js +3 -2
  87. package/esm/vs/editor/browser/config/editorConfiguration.js.map +1 -1
  88. package/esm/vs/editor/browser/config/migrateOptions.js +1 -1
  89. package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
  90. package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js.map +1 -1
  91. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js +2 -0
  92. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js.map +1 -1
  93. package/esm/vs/editor/browser/controller/mouseHandler.js +2 -1
  94. package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
  95. package/esm/vs/editor/browser/controller/mouseTarget.js +7 -0
  96. package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
  97. package/esm/vs/editor/browser/controller/pointerHandler.js.map +1 -1
  98. package/esm/vs/editor/browser/coreCommands.js.map +1 -1
  99. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  100. package/esm/vs/editor/browser/editorDom.js.map +1 -1
  101. package/esm/vs/editor/browser/editorExtensions.js.map +1 -1
  102. package/esm/vs/editor/browser/gpu/gpuUtils.js +1 -0
  103. package/esm/vs/editor/browser/gpu/gpuUtils.js.map +1 -1
  104. package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -0
  105. package/esm/vs/editor/browser/gpu/viewGpuContext.js.map +1 -1
  106. package/esm/vs/editor/browser/services/abstractCodeEditorService.js.map +1 -1
  107. package/esm/vs/editor/browser/services/bulkEditService.js.map +1 -1
  108. package/esm/vs/editor/browser/services/codeEditorService.js.map +1 -1
  109. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  110. package/esm/vs/editor/browser/services/hoverService/hover.css +2 -0
  111. package/esm/vs/editor/browser/services/hoverService/hoverService.js.map +1 -1
  112. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -1
  113. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
  114. package/esm/vs/editor/browser/services/inlineCompletionsService.js +8 -8
  115. package/esm/vs/editor/browser/services/inlineCompletionsService.js.map +1 -1
  116. package/esm/vs/editor/browser/services/openerService.js.map +1 -1
  117. package/esm/vs/editor/browser/view/viewLayer.js +1 -1
  118. package/esm/vs/editor/browser/view/viewLayer.js.map +1 -1
  119. package/esm/vs/editor/browser/view.js.map +1 -1
  120. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -0
  121. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  122. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +1 -0
  123. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js.map +1 -1
  124. package/esm/vs/editor/browser/widget/codeEditor/codeEditorContributions.js.map +1 -1
  125. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +4 -1
  126. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  127. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -0
  128. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js.map +1 -1
  129. package/esm/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js.map +1 -1
  130. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -0
  131. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js.map +1 -1
  132. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +1 -0
  133. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
  134. package/esm/vs/editor/browser/widget/diffEditor/utils.js +2 -0
  135. package/esm/vs/editor/browser/widget/diffEditor/utils.js.map +1 -1
  136. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -0
  137. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
  138. package/esm/vs/editor/common/config/editorOptions.js +122 -68
  139. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  140. package/esm/vs/editor/common/config/fontInfo.js +32 -16
  141. package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
  142. package/esm/vs/editor/common/config/fontInfoFromSettings.js +16 -0
  143. package/esm/vs/editor/common/config/fontInfoFromSettings.js.map +1 -0
  144. package/esm/vs/editor/common/core/edits/edit.js +1 -0
  145. package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
  146. package/esm/vs/editor/common/core/edits/stringEdit.js +2 -0
  147. package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  148. package/esm/vs/editor/common/core/position.js +1 -1
  149. package/esm/vs/editor/common/core/position.js.map +1 -1
  150. package/esm/vs/editor/common/core/range.js +1 -1
  151. package/esm/vs/editor/common/core/range.js.map +1 -1
  152. package/esm/vs/editor/common/core/selection.js +1 -1
  153. package/esm/vs/editor/common/core/selection.js.map +1 -1
  154. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  155. package/esm/vs/editor/common/editorCommon.js.map +1 -1
  156. package/esm/vs/editor/common/languages.js +1 -1
  157. package/esm/vs/editor/common/languages.js.map +1 -1
  158. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +14 -0
  159. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js.map +1 -1
  160. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js +2 -0
  161. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js.map +1 -1
  162. package/esm/vs/editor/common/model/textModel.js +1 -1
  163. package/esm/vs/editor/common/model/textModel.js.map +1 -1
  164. package/esm/vs/editor/common/model.js +1 -1
  165. package/esm/vs/editor/common/model.js.map +1 -1
  166. package/esm/vs/editor/common/services/editorBaseApi.js.map +1 -1
  167. package/esm/vs/editor/common/services/editorWebWorker.js +1 -0
  168. package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
  169. package/esm/vs/editor/common/services/editorWorkerHost.js.map +1 -1
  170. package/esm/vs/editor/common/services/modelService.js +14 -21
  171. package/esm/vs/editor/common/services/modelService.js.map +1 -1
  172. package/esm/vs/editor/common/textModelEditSource.js +2 -0
  173. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  174. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +40 -1
  175. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
  176. package/esm/vs/editor/common/viewModel/viewModelImpl.js +2 -1
  177. package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
  178. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +1 -1
  179. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js.map +1 -1
  180. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +1 -1
  181. package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
  182. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +1 -0
  183. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
  184. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +1 -0
  185. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
  186. package/esm/vs/editor/contrib/find/browser/findModel.js +1 -0
  187. package/esm/vs/editor/contrib/find/browser/findModel.js.map +1 -1
  188. package/esm/vs/editor/contrib/find/browser/findWidget.css +5 -5
  189. package/esm/vs/editor/contrib/folding/browser/folding.css +4 -4
  190. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
  191. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  192. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js.map +1 -1
  193. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +30 -14
  194. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
  195. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +4 -3
  196. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  197. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +56 -7
  198. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
  199. package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js +1 -0
  200. package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js.map +1 -1
  201. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +2 -0
  202. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  203. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -0
  204. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  205. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
  206. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
  207. package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
  208. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.css +2 -0
  209. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +2 -0
  210. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
  211. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js.map +1 -1
  212. package/esm/vs/editor/editor.api.d.ts +8 -8
  213. package/esm/vs/editor/editor.api.js +4 -0
  214. package/esm/vs/editor/editor.api.js.map +1 -1
  215. package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
  216. package/esm/vs/editor/standalone/browser/standaloneEditor.js +37 -0
  217. package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
  218. package/esm/vs/editor/standalone/browser/standaloneLanguages.js +37 -0
  219. package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
  220. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  221. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
  222. package/esm/vs/editor/standalone/common/monarch/monarchCompile.js +3 -0
  223. package/esm/vs/editor/standalone/common/monarch/monarchCompile.js.map +1 -1
  224. package/esm/vs/platform/accessibility/browser/accessibilityService.js +2 -2
  225. package/esm/vs/platform/accessibility/browser/accessibilityService.js.map +1 -1
  226. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  227. package/esm/vs/platform/commands/common/commands.js.map +1 -1
  228. package/esm/vs/platform/contextkey/common/contextkey.js +5 -0
  229. package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
  230. package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js +1 -0
  231. package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js.map +1 -1
  232. package/esm/vs/platform/dnd/browser/dnd.js +2 -0
  233. package/esm/vs/platform/dnd/browser/dnd.js.map +1 -1
  234. package/esm/vs/platform/instantiation/common/descriptors.js.map +1 -1
  235. package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
  236. package/esm/vs/platform/instantiation/common/instantiationService.js +1 -0
  237. package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
  238. package/esm/vs/platform/list/browser/listService.js +5 -0
  239. package/esm/vs/platform/list/browser/listService.js.map +1 -1
  240. package/esm/vs/platform/log/common/log.js.map +1 -1
  241. package/esm/vs/platform/log/common/logService.js.map +1 -1
  242. package/esm/vs/platform/observable/common/wrapInHotClass.js +2 -0
  243. package/esm/vs/platform/observable/common/wrapInHotClass.js.map +1 -1
  244. package/esm/vs/platform/observable/common/wrapInReloadableClass.js +3 -0
  245. package/esm/vs/platform/observable/common/wrapInReloadableClass.js.map +1 -1
  246. package/esm/vs/platform/product/common/product.js +69 -0
  247. package/esm/vs/platform/product/common/product.js.map +1 -0
  248. package/esm/vs/platform/quickinput/browser/quickInput.js +1 -1
  249. package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
  250. package/monaco.d.ts +8 -8
  251. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/standalone/browser/standaloneCodeEditor.ts","vs/editor/standalone/browser/standaloneCodeEditor.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,KAAK,IAAI,MAAM,uCAAuC,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AAC,EAAE,GAAG,CAAC,CAAC;AACxF,CAAC;AAED;;GAEG;AACH,SAAS,aAAa,CAAC,YAA2B,EAAE,KAAa,EAAE,iBAAqC,EAAE,GAAoB;IAC7H,OAAO,YAAY,CAAC,WAAW,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,CAAC,CAAC;AAChE,CAAC","file":"standaloneCodeEditor.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as aria from '../../../base/browser/ui/aria/aria.js';\nimport { Disposable, IDisposable, toDisposable, DisposableStore } from '../../../base/common/lifecycle.js';\nimport { ICodeEditor, IDiffEditor, IDiffEditorConstructionOptions } from '../../browser/editorBrowser.js';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService.js';\nimport { CodeEditorWidget } from '../../browser/widget/codeEditor/codeEditorWidget.js';\nimport { IDiffEditorOptions, IEditorOptions } from '../../common/config/editorOptions.js';\nimport { InternalEditorAction } from '../../common/editorAction.js';\nimport { IModelChangedEvent } from '../../common/editorCommon.js';\nimport { ITextModel } from '../../common/model.js';\nimport { StandaloneKeybindingService, updateConfigurationService } from './standaloneServices.js';\nimport { IStandaloneThemeService } from '../common/standaloneTheme.js';\nimport { IMenuItem, MenuId, MenuRegistry } from '../../../platform/actions/common/actions.js';\nimport { CommandsRegistry, ICommandHandler, ICommandService } from '../../../platform/commands/common/commands.js';\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration.js';\nimport { ContextKeyExpr, ContextKeyValue, IContextKey, IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\nimport { IContextMenuService } from '../../../platform/contextview/browser/contextView.js';\nimport { IInstantiationService, ServicesAccessor } from '../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding.js';\nimport { INotificationService } from '../../../platform/notification/common/notification.js';\nimport { IThemeService } from '../../../platform/theme/common/themeService.js';\nimport { IAccessibilityService } from '../../../platform/accessibility/common/accessibility.js';\nimport { StandaloneCodeEditorNLS } from '../../common/standaloneStrings.js';\nimport { IClipboardService } from '../../../platform/clipboard/common/clipboardService.js';\nimport { IEditorProgressService } from '../../../platform/progress/common/progress.js';\nimport { StandaloneThemeService } from './standaloneThemeService.js';\nimport { IModelService } from '../../common/services/model.js';\nimport { ILanguageSelection, ILanguageService } from '../../common/languages/language.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { StandaloneCodeEditorService } from './standaloneCodeEditorService.js';\nimport { PLAINTEXT_LANGUAGE_ID } from '../../common/languages/modesRegistry.js';\nimport { ILanguageConfigurationService } from '../../common/languages/languageConfigurationRegistry.js';\nimport { IEditorConstructionOptions } from '../../browser/config/editorConfiguration.js';\nimport { ILanguageFeaturesService } from '../../common/services/languageFeatures.js';\nimport { DiffEditorWidget } from '../../browser/widget/diffEditor/diffEditorWidget.js';\nimport { IAccessibilitySignalService } from '../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { setHoverDelegateFactory } from '../../../base/browser/ui/hover/hoverDelegateFactory.js';\nimport { IHoverService, WorkbenchHoverDelegate } from '../../../platform/hover/browser/hover.js';\nimport { setBaseLayerHoverDelegate } from '../../../base/browser/ui/hover/hoverDelegate2.js';\n\n/**\n * Description of an action contribution\n */\nexport interface IActionDescriptor {\n\t/**\n\t * An unique identifier of the contributed action.\n\t */\n\tid: string;\n\t/**\n\t * A label of the action that will be presented to the user.\n\t */\n\tlabel: string;\n\t/**\n\t * Precondition rule. The value should be a [context key expression](https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts).\n\t */\n\tprecondition?: string;\n\t/**\n\t * An array of keybindings for the action.\n\t */\n\tkeybindings?: number[];\n\t/**\n\t * The keybinding rule (condition on top of precondition).\n\t */\n\tkeybindingContext?: string;\n\t/**\n\t * Control if the action should show up in the context menu and where.\n\t * The context menu of the editor has these default:\n\t * navigation - The navigation group comes first in all cases.\n\t * 1_modification - This group comes next and contains commands that modify your code.\n\t * 9_cutcopypaste - The last default group with the basic editing commands.\n\t * You can also create your own group.\n\t * Defaults to null (don't show in context menu).\n\t */\n\tcontextMenuGroupId?: string;\n\t/**\n\t * Control the order in the context menu group.\n\t */\n\tcontextMenuOrder?: number;\n\t/**\n\t * Method that will be executed when the action is triggered.\n\t * @param editor The editor instance is passed in as a convenience\n\t */\n\trun(editor: ICodeEditor, ...args: any[]): void | Promise<void>;\n}\n\n/**\n * Options which apply for all editors.\n */\nexport interface IGlobalEditorOptions {\n\t/**\n\t * The number of spaces a tab is equal to.\n\t * This setting is overridden based on the file contents when `detectIndentation` is on.\n\t * Defaults to 4.\n\t */\n\ttabSize?: number;\n\t/**\n\t * Insert spaces when pressing `Tab`.\n\t * This setting is overridden based on the file contents when `detectIndentation` is on.\n\t * Defaults to true.\n\t */\n\tinsertSpaces?: boolean;\n\t/**\n\t * Controls whether `tabSize` and `insertSpaces` will be automatically detected when a file is opened based on the file contents.\n\t * Defaults to true.\n\t */\n\tdetectIndentation?: boolean;\n\t/**\n\t * Remove trailing auto inserted whitespace.\n\t * Defaults to true.\n\t */\n\ttrimAutoWhitespace?: boolean;\n\t/**\n\t * Special handling for large files to disable certain memory intensive features.\n\t * Defaults to true.\n\t */\n\tlargeFileOptimizations?: boolean;\n\t/**\n\t * Controls whether completions should be computed based on words in the document.\n\t * Defaults to true.\n\t */\n\twordBasedSuggestions?: 'off' | 'currentDocument' | 'matchingDocuments' | 'allDocuments';\n\t/**\n\t * Controls whether word based completions should be included from opened documents of the same language or any language.\n\t */\n\twordBasedSuggestionsOnlySameLanguage?: boolean;\n\t/**\n\t * Controls whether the semanticHighlighting is shown for the languages that support it.\n\t * true: semanticHighlighting is enabled for all themes\n\t * false: semanticHighlighting is disabled for all themes\n\t * 'configuredByTheme': semanticHighlighting is controlled by the current color theme's semanticHighlighting setting.\n\t * Defaults to 'byTheme'.\n\t */\n\t'semanticHighlighting.enabled'?: true | false | 'configuredByTheme';\n\t/**\n\t * Keep peek editors open even when double-clicking their content or when hitting `Escape`.\n\t * Defaults to false.\n\t */\n\tstablePeek?: boolean;\n\t/**\n\t * Lines above this length will not be tokenized for performance reasons.\n\t * Defaults to 20000.\n\t */\n\tmaxTokenizationLineLength?: number;\n\t/**\n\t * Theme to be used for rendering.\n\t * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light'.\n\t * You can create custom themes via `monaco.editor.defineTheme`.\n\t * To switch a theme, use `monaco.editor.setTheme`.\n\t * **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.\n\t */\n\ttheme?: string;\n\t/**\n\t * If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.\n\t * Defaults to true.\n\t */\n\tautoDetectHighContrast?: boolean;\n}\n\n/**\n * The options to create an editor.\n */\nexport interface IStandaloneEditorConstructionOptions extends IEditorConstructionOptions, IGlobalEditorOptions {\n\t/**\n\t * The initial model associated with this code editor.\n\t */\n\tmodel?: ITextModel | null;\n\t/**\n\t * The initial value of the auto created model in the editor.\n\t * To not automatically create a model, use `model: null`.\n\t */\n\tvalue?: string;\n\t/**\n\t * The initial language of the auto created model in the editor.\n\t * To not automatically create a model, use `model: null`.\n\t */\n\tlanguage?: string;\n\t/**\n\t * Initial theme to be used for rendering.\n\t * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.\n\t * You can create custom themes via `monaco.editor.defineTheme`.\n\t * To switch a theme, use `monaco.editor.setTheme`.\n\t * **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.\n\t */\n\ttheme?: string;\n\t/**\n\t * If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.\n\t * Defaults to true.\n\t */\n\tautoDetectHighContrast?: boolean;\n\t/**\n\t * An URL to open when Ctrl+H (Windows and Linux) or Cmd+H (OSX) is pressed in\n\t * the accessibility help dialog in the editor.\n\t *\n\t * Defaults to \"https://go.microsoft.com/fwlink/?linkid=852450\"\n\t */\n\taccessibilityHelpUrl?: string;\n\t/**\n\t * Container element to use for ARIA messages.\n\t * Defaults to document.body.\n\t */\n\tariaContainerElement?: HTMLElement;\n}\n\n/**\n * The options to create a diff editor.\n */\nexport interface IStandaloneDiffEditorConstructionOptions extends IDiffEditorConstructionOptions {\n\t/**\n\t * Initial theme to be used for rendering.\n\t * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.\n\t * You can create custom themes via `monaco.editor.defineTheme`.\n\t * To switch a theme, use `monaco.editor.setTheme`.\n\t * **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.\n\t */\n\ttheme?: string;\n\t/**\n\t * If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.\n\t * Defaults to true.\n\t */\n\tautoDetectHighContrast?: boolean;\n}\n\nexport interface IStandaloneCodeEditor extends ICodeEditor {\n\tupdateOptions(newOptions: IEditorOptions & IGlobalEditorOptions): void;\n\taddCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;\n\tcreateContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;\n\taddAction(descriptor: IActionDescriptor): IDisposable;\n}\n\nexport interface IStandaloneDiffEditor extends IDiffEditor {\n\taddCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;\n\tcreateContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;\n\taddAction(descriptor: IActionDescriptor): IDisposable;\n\n\tgetOriginalEditor(): IStandaloneCodeEditor;\n\tgetModifiedEditor(): IStandaloneCodeEditor;\n}\n\nlet LAST_GENERATED_COMMAND_ID = 0;\n\nlet ariaDomNodeCreated = false;\n/**\n * Create ARIA dom node inside parent,\n * or only for the first editor instantiation inside document.body.\n * @param parent container element for ARIA dom node\n */\nfunction createAriaDomNode(parent: HTMLElement | undefined) {\n\tif (!parent) {\n\t\tif (ariaDomNodeCreated) {\n\t\t\treturn;\n\t\t}\n\t\tariaDomNodeCreated = true;\n\t}\n\taria.setARIAContainer(parent || mainWindow.document.body);\n}\n\n/**\n * A code editor to be used both by the standalone editor and the standalone diff editor.\n */\nexport class StandaloneCodeEditor extends CodeEditorWidget implements IStandaloneCodeEditor {\n\n\tprivate readonly _standaloneKeybindingService: StandaloneKeybindingService | null;\n\n\tconstructor(\n\t\tdomElement: HTMLElement,\n\t\t_options: Readonly<IStandaloneEditorConstructionOptions>,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@ICodeEditorService codeEditorService: ICodeEditorService,\n\t\t@ICommandService commandService: ICommandService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@IHoverService hoverService: IHoverService,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IThemeService themeService: IThemeService,\n\t\t@INotificationService notificationService: INotificationService,\n\t\t@IAccessibilityService accessibilityService: IAccessibilityService,\n\t\t@ILanguageConfigurationService languageConfigurationService: ILanguageConfigurationService,\n\t\t@ILanguageFeaturesService languageFeaturesService: ILanguageFeaturesService,\n\t) {\n\t\tconst options = { ..._options };\n\t\toptions.ariaLabel = options.ariaLabel || StandaloneCodeEditorNLS.editorViewAccessibleLabel;\n\t\tsuper(domElement, options, {}, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService);\n\n\t\tif (keybindingService instanceof StandaloneKeybindingService) {\n\t\t\tthis._standaloneKeybindingService = keybindingService;\n\t\t} else {\n\t\t\tthis._standaloneKeybindingService = null;\n\t\t}\n\n\t\tcreateAriaDomNode(options.ariaContainerElement);\n\n\t\tsetHoverDelegateFactory((placement, enableInstantHover) => instantiationService.createInstance(WorkbenchHoverDelegate, placement, { instantHover: enableInstantHover }, {}));\n\t\tsetBaseLayerHoverDelegate(hoverService);\n\t}\n\n\tpublic addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null {\n\t\tif (!this._standaloneKeybindingService) {\n\t\t\tconsole.warn('Cannot add command because the editor is configured with an unrecognized KeybindingService');\n\t\t\treturn null;\n\t\t}\n\t\tconst commandId = 'DYNAMIC_' + (++LAST_GENERATED_COMMAND_ID);\n\t\tconst whenExpression = ContextKeyExpr.deserialize(context);\n\t\tthis._standaloneKeybindingService.addDynamicKeybinding(commandId, keybinding, handler, whenExpression);\n\t\treturn commandId;\n\t}\n\n\tpublic createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T> {\n\t\treturn this._contextKeyService.createKey(key, defaultValue);\n\t}\n\n\tpublic addAction(_descriptor: IActionDescriptor): IDisposable {\n\t\tif ((typeof _descriptor.id !== 'string') || (typeof _descriptor.label !== 'string') || (typeof _descriptor.run !== 'function')) {\n\t\t\tthrow new Error('Invalid action descriptor, `id`, `label` and `run` are required properties!');\n\t\t}\n\t\tif (!this._standaloneKeybindingService) {\n\t\t\tconsole.warn('Cannot add keybinding because the editor is configured with an unrecognized KeybindingService');\n\t\t\treturn Disposable.None;\n\t\t}\n\n\t\t// Read descriptor options\n\t\tconst id = _descriptor.id;\n\t\tconst label = _descriptor.label;\n\t\tconst precondition = ContextKeyExpr.and(\n\t\t\tContextKeyExpr.equals('editorId', this.getId()),\n\t\t\tContextKeyExpr.deserialize(_descriptor.precondition)\n\t\t);\n\t\tconst keybindings = _descriptor.keybindings;\n\t\tconst keybindingsWhen = ContextKeyExpr.and(\n\t\t\tprecondition,\n\t\t\tContextKeyExpr.deserialize(_descriptor.keybindingContext)\n\t\t);\n\t\tconst contextMenuGroupId = _descriptor.contextMenuGroupId || null;\n\t\tconst contextMenuOrder = _descriptor.contextMenuOrder || 0;\n\t\tconst run = (_accessor?: ServicesAccessor, ...args: any[]): Promise<void> => {\n\t\t\treturn Promise.resolve(_descriptor.run(this, ...args));\n\t\t};\n\n\n\t\tconst toDispose = new DisposableStore();\n\n\t\t// Generate a unique id to allow the same descriptor.id across multiple editor instances\n\t\tconst uniqueId = this.getId() + ':' + id;\n\n\t\t// Register the command\n\t\ttoDispose.add(CommandsRegistry.registerCommand(uniqueId, run));\n\n\t\t// Register the context menu item\n\t\tif (contextMenuGroupId) {\n\t\t\tconst menuItem: IMenuItem = {\n\t\t\t\tcommand: {\n\t\t\t\t\tid: uniqueId,\n\t\t\t\t\ttitle: label\n\t\t\t\t},\n\t\t\t\twhen: precondition,\n\t\t\t\tgroup: contextMenuGroupId,\n\t\t\t\torder: contextMenuOrder\n\t\t\t};\n\t\t\ttoDispose.add(MenuRegistry.appendMenuItem(MenuId.EditorContext, menuItem));\n\t\t}\n\n\t\t// Register the keybindings\n\t\tif (Array.isArray(keybindings)) {\n\t\t\tfor (const kb of keybindings) {\n\t\t\t\ttoDispose.add(this._standaloneKeybindingService.addDynamicKeybinding(uniqueId, kb, run, keybindingsWhen));\n\t\t\t}\n\t\t}\n\n\t\t// Finally, register an internal editor action\n\t\tconst internalAction = new InternalEditorAction(\n\t\t\tuniqueId,\n\t\t\tlabel,\n\t\t\tlabel,\n\t\t\tundefined,\n\t\t\tprecondition,\n\t\t\t(...args: unknown[]) => Promise.resolve(_descriptor.run(this, ...args)),\n\t\t\tthis._contextKeyService\n\t\t);\n\n\t\t// Store it under the original id, such that trigger with the original id will work\n\t\tthis._actions.set(id, internalAction);\n\t\ttoDispose.add(toDisposable(() => {\n\t\t\tthis._actions.delete(id);\n\t\t}));\n\n\t\treturn toDispose;\n\t}\n\n\tprotected override _triggerCommand(handlerId: string, payload: any): void {\n\t\tif (this._codeEditorService instanceof StandaloneCodeEditorService) {\n\t\t\t// Help commands find this editor as the active editor\n\t\t\ttry {\n\t\t\t\tthis._codeEditorService.setActiveCodeEditor(this);\n\t\t\t\tsuper._triggerCommand(handlerId, payload);\n\t\t\t} finally {\n\t\t\t\tthis._codeEditorService.setActiveCodeEditor(null);\n\t\t\t}\n\t\t} else {\n\t\t\tsuper._triggerCommand(handlerId, payload);\n\t\t}\n\t}\n}\n\nexport class StandaloneEditor extends StandaloneCodeEditor implements IStandaloneCodeEditor {\n\n\tprivate readonly _configurationService: IConfigurationService;\n\tprivate readonly _standaloneThemeService: IStandaloneThemeService;\n\tprivate _ownsModel: boolean;\n\n\tconstructor(\n\t\tdomElement: HTMLElement,\n\t\t_options: Readonly<IStandaloneEditorConstructionOptions> | undefined,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@ICodeEditorService codeEditorService: ICodeEditorService,\n\t\t@ICommandService commandService: ICommandService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@IHoverService hoverService: IHoverService,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IStandaloneThemeService themeService: IStandaloneThemeService,\n\t\t@INotificationService notificationService: INotificationService,\n\t\t@IConfigurationService configurationService: IConfigurationService,\n\t\t@IAccessibilityService accessibilityService: IAccessibilityService,\n\t\t@IModelService modelService: IModelService,\n\t\t@ILanguageService languageService: ILanguageService,\n\t\t@ILanguageConfigurationService languageConfigurationService: ILanguageConfigurationService,\n\t\t@ILanguageFeaturesService languageFeaturesService: ILanguageFeaturesService,\n\t) {\n\t\tconst options = { ..._options };\n\t\tupdateConfigurationService(configurationService, options, false);\n\t\tconst themeDomRegistration = (<StandaloneThemeService>themeService).registerEditorContainer(domElement);\n\t\tif (typeof options.theme === 'string') {\n\t\t\tthemeService.setTheme(options.theme);\n\t\t}\n\t\tif (typeof options.autoDetectHighContrast !== 'undefined') {\n\t\t\tthemeService.setAutoDetectHighContrast(Boolean(options.autoDetectHighContrast));\n\t\t}\n\t\tconst _model: ITextModel | null | undefined = options.model;\n\t\tdelete options.model;\n\t\tsuper(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, hoverService, keybindingService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService);\n\n\t\tthis._configurationService = configurationService;\n\t\tthis._standaloneThemeService = themeService;\n\t\tthis._register(themeDomRegistration);\n\n\t\tlet model: ITextModel | null;\n\t\tif (typeof _model === 'undefined') {\n\t\t\tconst languageId = languageService.getLanguageIdByMimeType(options.language) || options.language || PLAINTEXT_LANGUAGE_ID;\n\t\t\tmodel = createTextModel(modelService, languageService, options.value || '', languageId, undefined);\n\t\t\tthis._ownsModel = true;\n\t\t} else {\n\t\t\tmodel = _model;\n\t\t\tthis._ownsModel = false;\n\t\t}\n\n\t\tthis._attachModel(model);\n\t\tif (model) {\n\t\t\tconst e: IModelChangedEvent = {\n\t\t\t\toldModelUrl: null,\n\t\t\t\tnewModelUrl: model.uri\n\t\t\t};\n\t\t\tthis._onDidChangeModel.fire(e);\n\t\t}\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t}\n\n\tpublic override updateOptions(newOptions: Readonly<IEditorOptions & IGlobalEditorOptions>): void {\n\t\tupdateConfigurationService(this._configurationService, newOptions, false);\n\t\tif (typeof newOptions.theme === 'string') {\n\t\t\tthis._standaloneThemeService.setTheme(newOptions.theme);\n\t\t}\n\t\tif (typeof newOptions.autoDetectHighContrast !== 'undefined') {\n\t\t\tthis._standaloneThemeService.setAutoDetectHighContrast(Boolean(newOptions.autoDetectHighContrast));\n\t\t}\n\t\tsuper.updateOptions(newOptions);\n\t}\n\n\tprotected override _postDetachModelCleanup(detachedModel: ITextModel): void {\n\t\tsuper._postDetachModelCleanup(detachedModel);\n\t\tif (detachedModel && this._ownsModel) {\n\t\t\tdetachedModel.dispose();\n\t\t\tthis._ownsModel = false;\n\t\t}\n\t}\n}\n\nexport class StandaloneDiffEditor2 extends DiffEditorWidget implements IStandaloneDiffEditor {\n\n\tprivate readonly _configurationService: IConfigurationService;\n\tprivate readonly _standaloneThemeService: IStandaloneThemeService;\n\n\tconstructor(\n\t\tdomElement: HTMLElement,\n\t\t_options: Readonly<IStandaloneDiffEditorConstructionOptions> | undefined,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@ICodeEditorService codeEditorService: ICodeEditorService,\n\t\t@IStandaloneThemeService themeService: IStandaloneThemeService,\n\t\t@INotificationService notificationService: INotificationService,\n\t\t@IConfigurationService configurationService: IConfigurationService,\n\t\t@IContextMenuService contextMenuService: IContextMenuService,\n\t\t@IEditorProgressService editorProgressService: IEditorProgressService,\n\t\t@IClipboardService clipboardService: IClipboardService,\n\t\t@IAccessibilitySignalService accessibilitySignalService: IAccessibilitySignalService,\n\t) {\n\t\tconst options = { ..._options };\n\t\tupdateConfigurationService(configurationService, options, true);\n\t\tconst themeDomRegistration = (<StandaloneThemeService>themeService).registerEditorContainer(domElement);\n\t\tif (typeof options.theme === 'string') {\n\t\t\tthemeService.setTheme(options.theme);\n\t\t}\n\t\tif (typeof options.autoDetectHighContrast !== 'undefined') {\n\t\t\tthemeService.setAutoDetectHighContrast(Boolean(options.autoDetectHighContrast));\n\t\t}\n\n\t\tsuper(\n\t\t\tdomElement,\n\t\t\toptions,\n\t\t\t{},\n\t\t\tcontextKeyService,\n\t\t\tinstantiationService,\n\t\t\tcodeEditorService,\n\t\t\taccessibilitySignalService,\n\t\t\teditorProgressService,\n\t\t);\n\n\t\tthis._configurationService = configurationService;\n\t\tthis._standaloneThemeService = themeService;\n\n\t\tthis._register(themeDomRegistration);\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t}\n\n\tpublic override updateOptions(newOptions: Readonly<IDiffEditorOptions & IGlobalEditorOptions>): void {\n\t\tupdateConfigurationService(this._configurationService, newOptions, true);\n\t\tif (typeof newOptions.theme === 'string') {\n\t\t\tthis._standaloneThemeService.setTheme(newOptions.theme);\n\t\t}\n\t\tif (typeof newOptions.autoDetectHighContrast !== 'undefined') {\n\t\t\tthis._standaloneThemeService.setAutoDetectHighContrast(Boolean(newOptions.autoDetectHighContrast));\n\t\t}\n\t\tsuper.updateOptions(newOptions);\n\t}\n\n\tprotected override _createInnerEditor(instantiationService: IInstantiationService, container: HTMLElement, options: Readonly<IEditorOptions>): CodeEditorWidget {\n\t\treturn instantiationService.createInstance(StandaloneCodeEditor, container, options);\n\t}\n\n\tpublic override getOriginalEditor(): IStandaloneCodeEditor {\n\t\treturn <StandaloneCodeEditor>super.getOriginalEditor();\n\t}\n\n\tpublic override getModifiedEditor(): IStandaloneCodeEditor {\n\t\treturn <StandaloneCodeEditor>super.getModifiedEditor();\n\t}\n\n\tpublic addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null {\n\t\treturn this.getModifiedEditor().addCommand(keybinding, handler, context);\n\t}\n\n\tpublic createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T> {\n\t\treturn this.getModifiedEditor().createContextKey(key, defaultValue);\n\t}\n\n\tpublic addAction(descriptor: IActionDescriptor): IDisposable {\n\t\treturn this.getModifiedEditor().addAction(descriptor);\n\t}\n}\n\n/**\n * @internal\n */\nexport function createTextModel(modelService: IModelService, languageService: ILanguageService, value: string, languageId: string | undefined, uri: URI | undefined): ITextModel {\n\tvalue = value || '';\n\tif (!languageId) {\n\t\tconst firstLF = value.indexOf('\\n');\n\t\tlet firstLine = value;\n\t\tif (firstLF !== -1) {\n\t\t\tfirstLine = value.substring(0, firstLF);\n\t\t}\n\t\treturn doCreateModel(modelService, value, languageService.createByFilepathOrFirstLine(uri || null, firstLine), uri);\n\t}\n\treturn doCreateModel(modelService, value, languageService.createById(languageId), uri);\n}\n\n/**\n * @internal\n */\nfunction doCreateModel(modelService: IModelService, value: string, languageSelection: ILanguageSelection, uri: URI | undefined): ITextModel {\n\treturn modelService.createModel(value, languageSelection, uri);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as aria from '../../../base/browser/ui/aria/aria.js';\nimport { Disposable, IDisposable, toDisposable, DisposableStore } from '../../../base/common/lifecycle.js';\nimport { ICodeEditor, IDiffEditor, IDiffEditorConstructionOptions } from '../../browser/editorBrowser.js';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService.js';\nimport { CodeEditorWidget } from '../../browser/widget/codeEditor/codeEditorWidget.js';\nimport { IDiffEditorOptions, IEditorOptions } from '../../common/config/editorOptions.js';\nimport { InternalEditorAction } from '../../common/editorAction.js';\nimport { IModelChangedEvent } from '../../common/editorCommon.js';\nimport { ITextModel } from '../../common/model.js';\nimport { StandaloneKeybindingService, updateConfigurationService } from './standaloneServices.js';\nimport { IStandaloneThemeService } from '../common/standaloneTheme.js';\nimport { IMenuItem, MenuId, MenuRegistry } from '../../../platform/actions/common/actions.js';\nimport { CommandsRegistry, ICommandHandler, ICommandService } from '../../../platform/commands/common/commands.js';\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration.js';\nimport { ContextKeyExpr, ContextKeyValue, IContextKey, IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\nimport { IContextMenuService } from '../../../platform/contextview/browser/contextView.js';\nimport { IInstantiationService, ServicesAccessor } from '../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding.js';\nimport { INotificationService } from '../../../platform/notification/common/notification.js';\nimport { IThemeService } from '../../../platform/theme/common/themeService.js';\nimport { IAccessibilityService } from '../../../platform/accessibility/common/accessibility.js';\nimport { StandaloneCodeEditorNLS } from '../../common/standaloneStrings.js';\nimport { IClipboardService } from '../../../platform/clipboard/common/clipboardService.js';\nimport { IEditorProgressService } from '../../../platform/progress/common/progress.js';\nimport { StandaloneThemeService } from './standaloneThemeService.js';\nimport { IModelService } from '../../common/services/model.js';\nimport { ILanguageSelection, ILanguageService } from '../../common/languages/language.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { StandaloneCodeEditorService } from './standaloneCodeEditorService.js';\nimport { PLAINTEXT_LANGUAGE_ID } from '../../common/languages/modesRegistry.js';\nimport { ILanguageConfigurationService } from '../../common/languages/languageConfigurationRegistry.js';\nimport { IEditorConstructionOptions } from '../../browser/config/editorConfiguration.js';\nimport { ILanguageFeaturesService } from '../../common/services/languageFeatures.js';\nimport { DiffEditorWidget } from '../../browser/widget/diffEditor/diffEditorWidget.js';\nimport { IAccessibilitySignalService } from '../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { setHoverDelegateFactory } from '../../../base/browser/ui/hover/hoverDelegateFactory.js';\nimport { IHoverService, WorkbenchHoverDelegate } from '../../../platform/hover/browser/hover.js';\nimport { setBaseLayerHoverDelegate } from '../../../base/browser/ui/hover/hoverDelegate2.js';\n\n/**\n * Description of an action contribution\n */\nexport interface IActionDescriptor {\n\t/**\n\t * An unique identifier of the contributed action.\n\t */\n\tid: string;\n\t/**\n\t * A label of the action that will be presented to the user.\n\t */\n\tlabel: string;\n\t/**\n\t * Precondition rule. The value should be a [context key expression](https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts).\n\t */\n\tprecondition?: string;\n\t/**\n\t * An array of keybindings for the action.\n\t */\n\tkeybindings?: number[];\n\t/**\n\t * The keybinding rule (condition on top of precondition).\n\t */\n\tkeybindingContext?: string;\n\t/**\n\t * Control if the action should show up in the context menu and where.\n\t * The context menu of the editor has these default:\n\t * navigation - The navigation group comes first in all cases.\n\t * 1_modification - This group comes next and contains commands that modify your code.\n\t * 9_cutcopypaste - The last default group with the basic editing commands.\n\t * You can also create your own group.\n\t * Defaults to null (don't show in context menu).\n\t */\n\tcontextMenuGroupId?: string;\n\t/**\n\t * Control the order in the context menu group.\n\t */\n\tcontextMenuOrder?: number;\n\t/**\n\t * Method that will be executed when the action is triggered.\n\t * @param editor The editor instance is passed in as a convenience\n\t */\n\trun(editor: ICodeEditor, ...args: any[]): void | Promise<void>;\n}\n\n/**\n * Options which apply for all editors.\n */\nexport interface IGlobalEditorOptions {\n\t/**\n\t * The number of spaces a tab is equal to.\n\t * This setting is overridden based on the file contents when `detectIndentation` is on.\n\t * Defaults to 4.\n\t */\n\ttabSize?: number;\n\t/**\n\t * Insert spaces when pressing `Tab`.\n\t * This setting is overridden based on the file contents when `detectIndentation` is on.\n\t * Defaults to true.\n\t */\n\tinsertSpaces?: boolean;\n\t/**\n\t * Controls whether `tabSize` and `insertSpaces` will be automatically detected when a file is opened based on the file contents.\n\t * Defaults to true.\n\t */\n\tdetectIndentation?: boolean;\n\t/**\n\t * Remove trailing auto inserted whitespace.\n\t * Defaults to true.\n\t */\n\ttrimAutoWhitespace?: boolean;\n\t/**\n\t * Special handling for large files to disable certain memory intensive features.\n\t * Defaults to true.\n\t */\n\tlargeFileOptimizations?: boolean;\n\t/**\n\t * Controls whether completions should be computed based on words in the document.\n\t * Defaults to true.\n\t */\n\twordBasedSuggestions?: 'off' | 'currentDocument' | 'matchingDocuments' | 'allDocuments';\n\t/**\n\t * Controls whether word based completions should be included from opened documents of the same language or any language.\n\t */\n\twordBasedSuggestionsOnlySameLanguage?: boolean;\n\t/**\n\t * Controls whether the semanticHighlighting is shown for the languages that support it.\n\t * true: semanticHighlighting is enabled for all themes\n\t * false: semanticHighlighting is disabled for all themes\n\t * 'configuredByTheme': semanticHighlighting is controlled by the current color theme's semanticHighlighting setting.\n\t * Defaults to 'byTheme'.\n\t */\n\t'semanticHighlighting.enabled'?: true | false | 'configuredByTheme';\n\t/**\n\t * Keep peek editors open even when double-clicking their content or when hitting `Escape`.\n\t * Defaults to false.\n\t */\n\tstablePeek?: boolean;\n\t/**\n\t * Lines above this length will not be tokenized for performance reasons.\n\t * Defaults to 20000.\n\t */\n\tmaxTokenizationLineLength?: number;\n\t/**\n\t * Theme to be used for rendering.\n\t * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light'.\n\t * You can create custom themes via `monaco.editor.defineTheme`.\n\t * To switch a theme, use `monaco.editor.setTheme`.\n\t * **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.\n\t */\n\ttheme?: string;\n\t/**\n\t * If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.\n\t * Defaults to true.\n\t */\n\tautoDetectHighContrast?: boolean;\n}\n\n/**\n * The options to create an editor.\n */\nexport interface IStandaloneEditorConstructionOptions extends IEditorConstructionOptions, IGlobalEditorOptions {\n\t/**\n\t * The initial model associated with this code editor.\n\t */\n\tmodel?: ITextModel | null;\n\t/**\n\t * The initial value of the auto created model in the editor.\n\t * To not automatically create a model, use `model: null`.\n\t */\n\tvalue?: string;\n\t/**\n\t * The initial language of the auto created model in the editor.\n\t * To not automatically create a model, use `model: null`.\n\t */\n\tlanguage?: string;\n\t/**\n\t * Initial theme to be used for rendering.\n\t * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.\n\t * You can create custom themes via `monaco.editor.defineTheme`.\n\t * To switch a theme, use `monaco.editor.setTheme`.\n\t * **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.\n\t */\n\ttheme?: string;\n\t/**\n\t * If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.\n\t * Defaults to true.\n\t */\n\tautoDetectHighContrast?: boolean;\n\t/**\n\t * An URL to open when Ctrl+H (Windows and Linux) or Cmd+H (OSX) is pressed in\n\t * the accessibility help dialog in the editor.\n\t *\n\t * Defaults to \"https://go.microsoft.com/fwlink/?linkid=852450\"\n\t */\n\taccessibilityHelpUrl?: string;\n\t/**\n\t * Container element to use for ARIA messages.\n\t * Defaults to document.body.\n\t */\n\tariaContainerElement?: HTMLElement;\n}\n\n/**\n * The options to create a diff editor.\n */\nexport interface IStandaloneDiffEditorConstructionOptions extends IDiffEditorConstructionOptions {\n\t/**\n\t * Initial theme to be used for rendering.\n\t * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.\n\t * You can create custom themes via `monaco.editor.defineTheme`.\n\t * To switch a theme, use `monaco.editor.setTheme`.\n\t * **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.\n\t */\n\ttheme?: string;\n\t/**\n\t * If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.\n\t * Defaults to true.\n\t */\n\tautoDetectHighContrast?: boolean;\n}\n\nexport interface IStandaloneCodeEditor extends ICodeEditor {\n\tupdateOptions(newOptions: IEditorOptions & IGlobalEditorOptions): void;\n\taddCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;\n\tcreateContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;\n\taddAction(descriptor: IActionDescriptor): IDisposable;\n}\n\nexport interface IStandaloneDiffEditor extends IDiffEditor {\n\taddCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;\n\tcreateContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;\n\taddAction(descriptor: IActionDescriptor): IDisposable;\n\n\tgetOriginalEditor(): IStandaloneCodeEditor;\n\tgetModifiedEditor(): IStandaloneCodeEditor;\n}\n\nlet LAST_GENERATED_COMMAND_ID = 0;\n\nlet ariaDomNodeCreated = false;\n/**\n * Create ARIA dom node inside parent,\n * or only for the first editor instantiation inside document.body.\n * @param parent container element for ARIA dom node\n */\nfunction createAriaDomNode(parent: HTMLElement | undefined) {\n\tif (!parent) {\n\t\tif (ariaDomNodeCreated) {\n\t\t\treturn;\n\t\t}\n\t\tariaDomNodeCreated = true;\n\t}\n\taria.setARIAContainer(parent || mainWindow.document.body);\n}\n\n/**\n * A code editor to be used both by the standalone editor and the standalone diff editor.\n */\nexport class StandaloneCodeEditor extends CodeEditorWidget implements IStandaloneCodeEditor {\n\n\tprivate readonly _standaloneKeybindingService: StandaloneKeybindingService | null;\n\n\tconstructor(\n\t\tdomElement: HTMLElement,\n\t\t_options: Readonly<IStandaloneEditorConstructionOptions>,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@ICodeEditorService codeEditorService: ICodeEditorService,\n\t\t@ICommandService commandService: ICommandService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@IHoverService hoverService: IHoverService,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IThemeService themeService: IThemeService,\n\t\t@INotificationService notificationService: INotificationService,\n\t\t@IAccessibilityService accessibilityService: IAccessibilityService,\n\t\t@ILanguageConfigurationService languageConfigurationService: ILanguageConfigurationService,\n\t\t@ILanguageFeaturesService languageFeaturesService: ILanguageFeaturesService,\n\t) {\n\t\tconst options = { ..._options };\n\t\toptions.ariaLabel = options.ariaLabel || StandaloneCodeEditorNLS.editorViewAccessibleLabel;\n\t\tsuper(domElement, options, {}, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService);\n\n\t\tif (keybindingService instanceof StandaloneKeybindingService) {\n\t\t\tthis._standaloneKeybindingService = keybindingService;\n\t\t} else {\n\t\t\tthis._standaloneKeybindingService = null;\n\t\t}\n\n\t\tcreateAriaDomNode(options.ariaContainerElement);\n\n\t\tsetHoverDelegateFactory((placement, enableInstantHover) => instantiationService.createInstance(WorkbenchHoverDelegate, placement, { instantHover: enableInstantHover }, {}));\n\t\tsetBaseLayerHoverDelegate(hoverService);\n\t}\n\n\tpublic addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null {\n\t\tif (!this._standaloneKeybindingService) {\n\t\t\tconsole.warn('Cannot add command because the editor is configured with an unrecognized KeybindingService');\n\t\t\treturn null;\n\t\t}\n\t\tconst commandId = 'DYNAMIC_' + (++LAST_GENERATED_COMMAND_ID);\n\t\tconst whenExpression = ContextKeyExpr.deserialize(context);\n\t\tthis._standaloneKeybindingService.addDynamicKeybinding(commandId, keybinding, handler, whenExpression);\n\t\treturn commandId;\n\t}\n\n\tpublic createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T> {\n\t\treturn this._contextKeyService.createKey(key, defaultValue);\n\t}\n\n\tpublic addAction(_descriptor: IActionDescriptor): IDisposable {\n\t\tif ((typeof _descriptor.id !== 'string') || (typeof _descriptor.label !== 'string') || (typeof _descriptor.run !== 'function')) {\n\t\t\tthrow new Error('Invalid action descriptor, `id`, `label` and `run` are required properties!');\n\t\t}\n\t\tif (!this._standaloneKeybindingService) {\n\t\t\tconsole.warn('Cannot add keybinding because the editor is configured with an unrecognized KeybindingService');\n\t\t\treturn Disposable.None;\n\t\t}\n\n\t\t// Read descriptor options\n\t\tconst id = _descriptor.id;\n\t\tconst label = _descriptor.label;\n\t\tconst precondition = ContextKeyExpr.and(\n\t\t\tContextKeyExpr.equals('editorId', this.getId()),\n\t\t\tContextKeyExpr.deserialize(_descriptor.precondition)\n\t\t);\n\t\tconst keybindings = _descriptor.keybindings;\n\t\tconst keybindingsWhen = ContextKeyExpr.and(\n\t\t\tprecondition,\n\t\t\tContextKeyExpr.deserialize(_descriptor.keybindingContext)\n\t\t);\n\t\tconst contextMenuGroupId = _descriptor.contextMenuGroupId || null;\n\t\tconst contextMenuOrder = _descriptor.contextMenuOrder || 0;\n\t\tconst run = (_accessor?: ServicesAccessor, ...args: any[]): Promise<void> => {\n\t\t\treturn Promise.resolve(_descriptor.run(this, ...args));\n\t\t};\n\n\n\t\tconst toDispose = new DisposableStore();\n\n\t\t// Generate a unique id to allow the same descriptor.id across multiple editor instances\n\t\tconst uniqueId = this.getId() + ':' + id;\n\n\t\t// Register the command\n\t\ttoDispose.add(CommandsRegistry.registerCommand(uniqueId, run));\n\n\t\t// Register the context menu item\n\t\tif (contextMenuGroupId) {\n\t\t\tconst menuItem: IMenuItem = {\n\t\t\t\tcommand: {\n\t\t\t\t\tid: uniqueId,\n\t\t\t\t\ttitle: label\n\t\t\t\t},\n\t\t\t\twhen: precondition,\n\t\t\t\tgroup: contextMenuGroupId,\n\t\t\t\torder: contextMenuOrder\n\t\t\t};\n\t\t\ttoDispose.add(MenuRegistry.appendMenuItem(MenuId.EditorContext, menuItem));\n\t\t}\n\n\t\t// Register the keybindings\n\t\tif (Array.isArray(keybindings)) {\n\t\t\tfor (const kb of keybindings) {\n\t\t\t\ttoDispose.add(this._standaloneKeybindingService.addDynamicKeybinding(uniqueId, kb, run, keybindingsWhen));\n\t\t\t}\n\t\t}\n\n\t\t// Finally, register an internal editor action\n\t\tconst internalAction = new InternalEditorAction(\n\t\t\tuniqueId,\n\t\t\tlabel,\n\t\t\tlabel,\n\t\t\tundefined,\n\t\t\tprecondition,\n\t\t\t(...args: unknown[]) => Promise.resolve(_descriptor.run(this, ...args)),\n\t\t\tthis._contextKeyService\n\t\t);\n\n\t\t// Store it under the original id, such that trigger with the original id will work\n\t\tthis._actions.set(id, internalAction);\n\t\ttoDispose.add(toDisposable(() => {\n\t\t\tthis._actions.delete(id);\n\t\t}));\n\n\t\treturn toDispose;\n\t}\n\n\tprotected override _triggerCommand(handlerId: string, payload: any): void {\n\t\tif (this._codeEditorService instanceof StandaloneCodeEditorService) {\n\t\t\t// Help commands find this editor as the active editor\n\t\t\ttry {\n\t\t\t\tthis._codeEditorService.setActiveCodeEditor(this);\n\t\t\t\tsuper._triggerCommand(handlerId, payload);\n\t\t\t} finally {\n\t\t\t\tthis._codeEditorService.setActiveCodeEditor(null);\n\t\t\t}\n\t\t} else {\n\t\t\tsuper._triggerCommand(handlerId, payload);\n\t\t}\n\t}\n}\n\nexport class StandaloneEditor extends StandaloneCodeEditor implements IStandaloneCodeEditor {\n\n\tprivate readonly _configurationService: IConfigurationService;\n\tprivate readonly _standaloneThemeService: IStandaloneThemeService;\n\tprivate _ownsModel: boolean;\n\n\tconstructor(\n\t\tdomElement: HTMLElement,\n\t\t_options: Readonly<IStandaloneEditorConstructionOptions> | undefined,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@ICodeEditorService codeEditorService: ICodeEditorService,\n\t\t@ICommandService commandService: ICommandService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@IHoverService hoverService: IHoverService,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IStandaloneThemeService themeService: IStandaloneThemeService,\n\t\t@INotificationService notificationService: INotificationService,\n\t\t@IConfigurationService configurationService: IConfigurationService,\n\t\t@IAccessibilityService accessibilityService: IAccessibilityService,\n\t\t@IModelService modelService: IModelService,\n\t\t@ILanguageService languageService: ILanguageService,\n\t\t@ILanguageConfigurationService languageConfigurationService: ILanguageConfigurationService,\n\t\t@ILanguageFeaturesService languageFeaturesService: ILanguageFeaturesService,\n\t) {\n\t\tconst options = { ..._options };\n\t\tupdateConfigurationService(configurationService, options, false);\n\t\tconst themeDomRegistration = (<StandaloneThemeService>themeService).registerEditorContainer(domElement);\n\t\tif (typeof options.theme === 'string') {\n\t\t\tthemeService.setTheme(options.theme);\n\t\t}\n\t\tif (typeof options.autoDetectHighContrast !== 'undefined') {\n\t\t\tthemeService.setAutoDetectHighContrast(Boolean(options.autoDetectHighContrast));\n\t\t}\n\t\tconst _model: ITextModel | null | undefined = options.model;\n\t\tdelete options.model;\n\t\tsuper(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, hoverService, keybindingService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService);\n\n\t\tthis._configurationService = configurationService;\n\t\tthis._standaloneThemeService = themeService;\n\t\tthis._register(themeDomRegistration);\n\n\t\tlet model: ITextModel | null;\n\t\tif (typeof _model === 'undefined') {\n\t\t\tconst languageId = languageService.getLanguageIdByMimeType(options.language) || options.language || PLAINTEXT_LANGUAGE_ID;\n\t\t\tmodel = createTextModel(modelService, languageService, options.value || '', languageId, undefined);\n\t\t\tthis._ownsModel = true;\n\t\t} else {\n\t\t\tmodel = _model;\n\t\t\tthis._ownsModel = false;\n\t\t}\n\n\t\tthis._attachModel(model);\n\t\tif (model) {\n\t\t\tconst e: IModelChangedEvent = {\n\t\t\t\toldModelUrl: null,\n\t\t\t\tnewModelUrl: model.uri\n\t\t\t};\n\t\t\tthis._onDidChangeModel.fire(e);\n\t\t}\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t}\n\n\tpublic override updateOptions(newOptions: Readonly<IEditorOptions & IGlobalEditorOptions>): void {\n\t\tupdateConfigurationService(this._configurationService, newOptions, false);\n\t\tif (typeof newOptions.theme === 'string') {\n\t\t\tthis._standaloneThemeService.setTheme(newOptions.theme);\n\t\t}\n\t\tif (typeof newOptions.autoDetectHighContrast !== 'undefined') {\n\t\t\tthis._standaloneThemeService.setAutoDetectHighContrast(Boolean(newOptions.autoDetectHighContrast));\n\t\t}\n\t\tsuper.updateOptions(newOptions);\n\t}\n\n\tprotected override _postDetachModelCleanup(detachedModel: ITextModel): void {\n\t\tsuper._postDetachModelCleanup(detachedModel);\n\t\tif (detachedModel && this._ownsModel) {\n\t\t\tdetachedModel.dispose();\n\t\t\tthis._ownsModel = false;\n\t\t}\n\t}\n}\n\nexport class StandaloneDiffEditor2 extends DiffEditorWidget implements IStandaloneDiffEditor {\n\n\tprivate readonly _configurationService: IConfigurationService;\n\tprivate readonly _standaloneThemeService: IStandaloneThemeService;\n\n\tconstructor(\n\t\tdomElement: HTMLElement,\n\t\t_options: Readonly<IStandaloneDiffEditorConstructionOptions> | undefined,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@ICodeEditorService codeEditorService: ICodeEditorService,\n\t\t@IStandaloneThemeService themeService: IStandaloneThemeService,\n\t\t@INotificationService notificationService: INotificationService,\n\t\t@IConfigurationService configurationService: IConfigurationService,\n\t\t@IContextMenuService contextMenuService: IContextMenuService,\n\t\t@IEditorProgressService editorProgressService: IEditorProgressService,\n\t\t@IClipboardService clipboardService: IClipboardService,\n\t\t@IAccessibilitySignalService accessibilitySignalService: IAccessibilitySignalService,\n\t) {\n\t\tconst options = { ..._options };\n\t\tupdateConfigurationService(configurationService, options, true);\n\t\tconst themeDomRegistration = (<StandaloneThemeService>themeService).registerEditorContainer(domElement);\n\t\tif (typeof options.theme === 'string') {\n\t\t\tthemeService.setTheme(options.theme);\n\t\t}\n\t\tif (typeof options.autoDetectHighContrast !== 'undefined') {\n\t\t\tthemeService.setAutoDetectHighContrast(Boolean(options.autoDetectHighContrast));\n\t\t}\n\n\t\tsuper(\n\t\t\tdomElement,\n\t\t\toptions,\n\t\t\t{},\n\t\t\tcontextKeyService,\n\t\t\tinstantiationService,\n\t\t\tcodeEditorService,\n\t\t\taccessibilitySignalService,\n\t\t\teditorProgressService,\n\t\t);\n\n\t\tthis._configurationService = configurationService;\n\t\tthis._standaloneThemeService = themeService;\n\n\t\tthis._register(themeDomRegistration);\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t}\n\n\tpublic override updateOptions(newOptions: Readonly<IDiffEditorOptions & IGlobalEditorOptions>): void {\n\t\tupdateConfigurationService(this._configurationService, newOptions, true);\n\t\tif (typeof newOptions.theme === 'string') {\n\t\t\tthis._standaloneThemeService.setTheme(newOptions.theme);\n\t\t}\n\t\tif (typeof newOptions.autoDetectHighContrast !== 'undefined') {\n\t\t\tthis._standaloneThemeService.setAutoDetectHighContrast(Boolean(newOptions.autoDetectHighContrast));\n\t\t}\n\t\tsuper.updateOptions(newOptions);\n\t}\n\n\tprotected override _createInnerEditor(instantiationService: IInstantiationService, container: HTMLElement, options: Readonly<IEditorOptions>): CodeEditorWidget {\n\t\treturn instantiationService.createInstance(StandaloneCodeEditor, container, options);\n\t}\n\n\tpublic override getOriginalEditor(): IStandaloneCodeEditor {\n\t\treturn <StandaloneCodeEditor>super.getOriginalEditor();\n\t}\n\n\tpublic override getModifiedEditor(): IStandaloneCodeEditor {\n\t\treturn <StandaloneCodeEditor>super.getModifiedEditor();\n\t}\n\n\tpublic addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null {\n\t\treturn this.getModifiedEditor().addCommand(keybinding, handler, context);\n\t}\n\n\tpublic createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T> {\n\t\treturn this.getModifiedEditor().createContextKey(key, defaultValue);\n\t}\n\n\tpublic addAction(descriptor: IActionDescriptor): IDisposable {\n\t\treturn this.getModifiedEditor().addAction(descriptor);\n\t}\n}\n\n/**\n * @internal\n */\nexport function createTextModel(modelService: IModelService, languageService: ILanguageService, value: string, languageId: string | undefined, uri: URI | undefined): ITextModel {\n\tvalue = value || '';\n\tif (!languageId) {\n\t\tconst firstLF = value.indexOf('\\n');\n\t\tlet firstLine = value;\n\t\tif (firstLF !== -1) {\n\t\t\tfirstLine = value.substring(0, firstLF);\n\t\t}\n\t\treturn doCreateModel(modelService, value, languageService.createByFilepathOrFirstLine(uri || null, firstLine), uri);\n\t}\n\treturn doCreateModel(modelService, value, languageService.createById(languageId), uri);\n}\n\n/**\n * @internal\n */\nfunction doCreateModel(modelService: IModelService, value: string, languageSelection: ILanguageSelection, uri: URI | undefined): ITextModel {\n\treturn modelService.createModel(value, languageSelection, uri);\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/standalone/browser/standaloneCodeEditor.ts","vs/editor/standalone/browser/standaloneCodeEditor.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,KAAK,IAAI,MAAM,uCAAuC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAe,YAAY,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAE3G,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AAEvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGpE,OAAO,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAa,MAAM,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAmB,eAAe,EAAE,MAAM,+CAA+C,CAAC;AACnH,OAAO,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAC;AAChG,OAAO,EAAE,cA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;GAjBjB,qBAAqB,CAoFjC;;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,YAA2B,EAAE,eAAiC,EAAE,KAAa,EAAE,UAA8B,EAAE,GAAoB;IAClK,KAAK,GAAG,KAAK,IAAI,EAAE,CAAC;IACpB,IAAI,CAAC,UAAU,EAAE,CAAC;QACjB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC;YACpB,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,aAAa,CAAC,YAAY,EAAE,KAAK,EAAE,eAAe,CAAC,2BAA2B,CAAC,GAAG,IAAI,IAAI,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,CAAC;IACrH,CAAC;IACD,OAAO,aAAa,CAAC,YAAY,EAAE,KAAK,EAAE,eAAe,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,GAAG,CAAC,CAAC;AACxF,CAAC;AAED;;GAEG;AACH,SAAS,aAAa,CAAC,YAA2B,EAAE,KAAa,EAAE,iBAAqC,EAAE,GAAoB;IAC7H,OAAO,YAAY,CAAC,WAAW,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,CAAC,CAAC;AAChE,CAAC","file":"standaloneCodeEditor.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as aria from '../../../base/browser/ui/aria/aria.js';\nimport { Disposable, IDisposable, toDisposable, DisposableStore } from '../../../base/common/lifecycle.js';\nimport { ICodeEditor, IDiffEditor, IDiffEditorConstructionOptions } from '../../browser/editorBrowser.js';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService.js';\nimport { CodeEditorWidget } from '../../browser/widget/codeEditor/codeEditorWidget.js';\nimport { IDiffEditorOptions, IEditorOptions } from '../../common/config/editorOptions.js';\nimport { InternalEditorAction } from '../../common/editorAction.js';\nimport { IModelChangedEvent } from '../../common/editorCommon.js';\nimport { ITextModel } from '../../common/model.js';\nimport { StandaloneKeybindingService, updateConfigurationService } from './standaloneServices.js';\nimport { IStandaloneThemeService } from '../common/standaloneTheme.js';\nimport { IMenuItem, MenuId, MenuRegistry } from '../../../platform/actions/common/actions.js';\nimport { CommandsRegistry, ICommandHandler, ICommandService } from '../../../platform/commands/common/commands.js';\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration.js';\nimport { ContextKeyExpr, ContextKeyValue, IContextKey, IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\nimport { IContextMenuService } from '../../../platform/contextview/browser/contextView.js';\nimport { IInstantiationService, ServicesAccessor } from '../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding.js';\nimport { INotificationService } from '../../../platform/notification/common/notification.js';\nimport { IThemeService } from '../../../platform/theme/common/themeService.js';\nimport { IAccessibilityService } from '../../../platform/accessibility/common/accessibility.js';\nimport { StandaloneCodeEditorNLS } from '../../common/standaloneStrings.js';\nimport { IClipboardService } from '../../../platform/clipboard/common/clipboardService.js';\nimport { IEditorProgressService } from '../../../platform/progress/common/progress.js';\nimport { StandaloneThemeService } from './standaloneThemeService.js';\nimport { IModelService } from '../../common/services/model.js';\nimport { ILanguageSelection, ILanguageService } from '../../common/languages/language.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { StandaloneCodeEditorService } from './standaloneCodeEditorService.js';\nimport { PLAINTEXT_LANGUAGE_ID } from '../../common/languages/modesRegistry.js';\nimport { ILanguageConfigurationService } from '../../common/languages/languageConfigurationRegistry.js';\nimport { IEditorConstructionOptions } from '../../browser/config/editorConfiguration.js';\nimport { ILanguageFeaturesService } from '../../common/services/languageFeatures.js';\nimport { DiffEditorWidget } from '../../browser/widget/diffEditor/diffEditorWidget.js';\nimport { IAccessibilitySignalService } from '../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { setHoverDelegateFactory } from '../../../base/browser/ui/hover/hoverDelegateFactory.js';\nimport { IHoverService, WorkbenchHoverDelegate } from '../../../platform/hover/browser/hover.js';\nimport { setBaseLayerHoverDelegate } from '../../../base/browser/ui/hover/hoverDelegate2.js';\n\n/**\n * Description of an action contribution\n */\nexport interface IActionDescriptor {\n\t/**\n\t * An unique identifier of the contributed action.\n\t */\n\tid: string;\n\t/**\n\t * A label of the action that will be presented to the user.\n\t */\n\tlabel: string;\n\t/**\n\t * Precondition rule. The value should be a [context key expression](https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts).\n\t */\n\tprecondition?: string;\n\t/**\n\t * An array of keybindings for the action.\n\t */\n\tkeybindings?: number[];\n\t/**\n\t * The keybinding rule (condition on top of precondition).\n\t */\n\tkeybindingContext?: string;\n\t/**\n\t * Control if the action should show up in the context menu and where.\n\t * The context menu of the editor has these default:\n\t * navigation - The navigation group comes first in all cases.\n\t * 1_modification - This group comes next and contains commands that modify your code.\n\t * 9_cutcopypaste - The last default group with the basic editing commands.\n\t * You can also create your own group.\n\t * Defaults to null (don't show in context menu).\n\t */\n\tcontextMenuGroupId?: string;\n\t/**\n\t * Control the order in the context menu group.\n\t */\n\tcontextMenuOrder?: number;\n\t/**\n\t * Method that will be executed when the action is triggered.\n\t * @param editor The editor instance is passed in as a convenience\n\t */\n\trun(editor: ICodeEditor, ...args: any[]): void | Promise<void>;\n}\n\n/**\n * Options which apply for all editors.\n */\nexport interface IGlobalEditorOptions {\n\t/**\n\t * The number of spaces a tab is equal to.\n\t * This setting is overridden based on the file contents when `detectIndentation` is on.\n\t * Defaults to 4.\n\t */\n\ttabSize?: number;\n\t/**\n\t * Insert spaces when pressing `Tab`.\n\t * This setting is overridden based on the file contents when `detectIndentation` is on.\n\t * Defaults to true.\n\t */\n\tinsertSpaces?: boolean;\n\t/**\n\t * Controls whether `tabSize` and `insertSpaces` will be automatically detected when a file is opened based on the file contents.\n\t * Defaults to true.\n\t */\n\tdetectIndentation?: boolean;\n\t/**\n\t * Remove trailing auto inserted whitespace.\n\t * Defaults to true.\n\t */\n\ttrimAutoWhitespace?: boolean;\n\t/**\n\t * Special handling for large files to disable certain memory intensive features.\n\t * Defaults to true.\n\t */\n\tlargeFileOptimizations?: boolean;\n\t/**\n\t * Controls whether completions should be computed based on words in the document.\n\t * Defaults to true.\n\t */\n\twordBasedSuggestions?: 'off' | 'currentDocument' | 'matchingDocuments' | 'allDocuments';\n\t/**\n\t * Controls whether word based completions should be included from opened documents of the same language or any language.\n\t */\n\twordBasedSuggestionsOnlySameLanguage?: boolean;\n\t/**\n\t * Controls whether the semanticHighlighting is shown for the languages that support it.\n\t * true: semanticHighlighting is enabled for all themes\n\t * false: semanticHighlighting is disabled for all themes\n\t * 'configuredByTheme': semanticHighlighting is controlled by the current color theme's semanticHighlighting setting.\n\t * Defaults to 'byTheme'.\n\t */\n\t'semanticHighlighting.enabled'?: true | false | 'configuredByTheme';\n\t/**\n\t * Keep peek editors open even when double-clicking their content or when hitting `Escape`.\n\t * Defaults to false.\n\t */\n\tstablePeek?: boolean;\n\t/**\n\t * Lines above this length will not be tokenized for performance reasons.\n\t * Defaults to 20000.\n\t */\n\tmaxTokenizationLineLength?: number;\n\t/**\n\t * Theme to be used for rendering.\n\t * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light'.\n\t * You can create custom themes via `monaco.editor.defineTheme`.\n\t * To switch a theme, use `monaco.editor.setTheme`.\n\t * **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.\n\t */\n\ttheme?: string;\n\t/**\n\t * If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.\n\t * Defaults to true.\n\t */\n\tautoDetectHighContrast?: boolean;\n}\n\n/**\n * The options to create an editor.\n */\nexport interface IStandaloneEditorConstructionOptions extends IEditorConstructionOptions, IGlobalEditorOptions {\n\t/**\n\t * The initial model associated with this code editor.\n\t */\n\tmodel?: ITextModel | null;\n\t/**\n\t * The initial value of the auto created model in the editor.\n\t * To not automatically create a model, use `model: null`.\n\t */\n\tvalue?: string;\n\t/**\n\t * The initial language of the auto created model in the editor.\n\t * To not automatically create a model, use `model: null`.\n\t */\n\tlanguage?: string;\n\t/**\n\t * Initial theme to be used for rendering.\n\t * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.\n\t * You can create custom themes via `monaco.editor.defineTheme`.\n\t * To switch a theme, use `monaco.editor.setTheme`.\n\t * **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.\n\t */\n\ttheme?: string;\n\t/**\n\t * If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.\n\t * Defaults to true.\n\t */\n\tautoDetectHighContrast?: boolean;\n\t/**\n\t * An URL to open when Ctrl+H (Windows and Linux) or Cmd+H (OSX) is pressed in\n\t * the accessibility help dialog in the editor.\n\t *\n\t * Defaults to \"https://go.microsoft.com/fwlink/?linkid=852450\"\n\t */\n\taccessibilityHelpUrl?: string;\n\t/**\n\t * Container element to use for ARIA messages.\n\t * Defaults to document.body.\n\t */\n\tariaContainerElement?: HTMLElement;\n}\n\n/**\n * The options to create a diff editor.\n */\nexport interface IStandaloneDiffEditorConstructionOptions extends IDiffEditorConstructionOptions {\n\t/**\n\t * Initial theme to be used for rendering.\n\t * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.\n\t * You can create custom themes via `monaco.editor.defineTheme`.\n\t * To switch a theme, use `monaco.editor.setTheme`.\n\t * **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.\n\t */\n\ttheme?: string;\n\t/**\n\t * If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.\n\t * Defaults to true.\n\t */\n\tautoDetectHighContrast?: boolean;\n}\n\nexport interface IStandaloneCodeEditor extends ICodeEditor {\n\tupdateOptions(newOptions: IEditorOptions & IGlobalEditorOptions): void;\n\taddCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;\n\tcreateContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;\n\taddAction(descriptor: IActionDescriptor): IDisposable;\n}\n\nexport interface IStandaloneDiffEditor extends IDiffEditor {\n\taddCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;\n\tcreateContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;\n\taddAction(descriptor: IActionDescriptor): IDisposable;\n\n\tgetOriginalEditor(): IStandaloneCodeEditor;\n\tgetModifiedEditor(): IStandaloneCodeEditor;\n}\n\nlet LAST_GENERATED_COMMAND_ID = 0;\n\nlet ariaDomNodeCreated = false;\n/**\n * Create ARIA dom node inside parent,\n * or only for the first editor instantiation inside document.body.\n * @param parent container element for ARIA dom node\n */\nfunction createAriaDomNode(parent: HTMLElement | undefined) {\n\tif (!parent) {\n\t\tif (ariaDomNodeCreated) {\n\t\t\treturn;\n\t\t}\n\t\tariaDomNodeCreated = true;\n\t}\n\taria.setARIAContainer(parent || mainWindow.document.body);\n}\n\n/**\n * A code editor to be used both by the standalone editor and the standalone diff editor.\n */\nexport class StandaloneCodeEditor extends CodeEditorWidget implements IStandaloneCodeEditor {\n\n\tprivate readonly _standaloneKeybindingService: StandaloneKeybindingService | null;\n\n\tconstructor(\n\t\tdomElement: HTMLElement,\n\t\t_options: Readonly<IStandaloneEditorConstructionOptions>,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@ICodeEditorService codeEditorService: ICodeEditorService,\n\t\t@ICommandService commandService: ICommandService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@IHoverService hoverService: IHoverService,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IThemeService themeService: IThemeService,\n\t\t@INotificationService notificationService: INotificationService,\n\t\t@IAccessibilityService accessibilityService: IAccessibilityService,\n\t\t@ILanguageConfigurationService languageConfigurationService: ILanguageConfigurationService,\n\t\t@ILanguageFeaturesService languageFeaturesService: ILanguageFeaturesService,\n\t) {\n\t\tconst options = { ..._options };\n\t\toptions.ariaLabel = options.ariaLabel || StandaloneCodeEditorNLS.editorViewAccessibleLabel;\n\t\tsuper(domElement, options, {}, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService);\n\n\t\tif (keybindingService instanceof StandaloneKeybindingService) {\n\t\t\tthis._standaloneKeybindingService = keybindingService;\n\t\t} else {\n\t\t\tthis._standaloneKeybindingService = null;\n\t\t}\n\n\t\tcreateAriaDomNode(options.ariaContainerElement);\n\n\t\tsetHoverDelegateFactory((placement, enableInstantHover) => instantiationService.createInstance(WorkbenchHoverDelegate, placement, { instantHover: enableInstantHover }, {}));\n\t\tsetBaseLayerHoverDelegate(hoverService);\n\t}\n\n\tpublic addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null {\n\t\tif (!this._standaloneKeybindingService) {\n\t\t\tconsole.warn('Cannot add command because the editor is configured with an unrecognized KeybindingService');\n\t\t\treturn null;\n\t\t}\n\t\tconst commandId = 'DYNAMIC_' + (++LAST_GENERATED_COMMAND_ID);\n\t\tconst whenExpression = ContextKeyExpr.deserialize(context);\n\t\tthis._standaloneKeybindingService.addDynamicKeybinding(commandId, keybinding, handler, whenExpression);\n\t\treturn commandId;\n\t}\n\n\tpublic createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T> {\n\t\treturn this._contextKeyService.createKey(key, defaultValue);\n\t}\n\n\tpublic addAction(_descriptor: IActionDescriptor): IDisposable {\n\t\tif ((typeof _descriptor.id !== 'string') || (typeof _descriptor.label !== 'string') || (typeof _descriptor.run !== 'function')) {\n\t\t\tthrow new Error('Invalid action descriptor, `id`, `label` and `run` are required properties!');\n\t\t}\n\t\tif (!this._standaloneKeybindingService) {\n\t\t\tconsole.warn('Cannot add keybinding because the editor is configured with an unrecognized KeybindingService');\n\t\t\treturn Disposable.None;\n\t\t}\n\n\t\t// Read descriptor options\n\t\tconst id = _descriptor.id;\n\t\tconst label = _descriptor.label;\n\t\tconst precondition = ContextKeyExpr.and(\n\t\t\tContextKeyExpr.equals('editorId', this.getId()),\n\t\t\tContextKeyExpr.deserialize(_descriptor.precondition)\n\t\t);\n\t\tconst keybindings = _descriptor.keybindings;\n\t\tconst keybindingsWhen = ContextKeyExpr.and(\n\t\t\tprecondition,\n\t\t\tContextKeyExpr.deserialize(_descriptor.keybindingContext)\n\t\t);\n\t\tconst contextMenuGroupId = _descriptor.contextMenuGroupId || null;\n\t\tconst contextMenuOrder = _descriptor.contextMenuOrder || 0;\n\t\tconst run = (_accessor?: ServicesAccessor, ...args: unknown[]): Promise<void> => {\n\t\t\treturn Promise.resolve(_descriptor.run(this, ...args));\n\t\t};\n\n\n\t\tconst toDispose = new DisposableStore();\n\n\t\t// Generate a unique id to allow the same descriptor.id across multiple editor instances\n\t\tconst uniqueId = this.getId() + ':' + id;\n\n\t\t// Register the command\n\t\ttoDispose.add(CommandsRegistry.registerCommand(uniqueId, run));\n\n\t\t// Register the context menu item\n\t\tif (contextMenuGroupId) {\n\t\t\tconst menuItem: IMenuItem = {\n\t\t\t\tcommand: {\n\t\t\t\t\tid: uniqueId,\n\t\t\t\t\ttitle: label\n\t\t\t\t},\n\t\t\t\twhen: precondition,\n\t\t\t\tgroup: contextMenuGroupId,\n\t\t\t\torder: contextMenuOrder\n\t\t\t};\n\t\t\ttoDispose.add(MenuRegistry.appendMenuItem(MenuId.EditorContext, menuItem));\n\t\t}\n\n\t\t// Register the keybindings\n\t\tif (Array.isArray(keybindings)) {\n\t\t\tfor (const kb of keybindings) {\n\t\t\t\ttoDispose.add(this._standaloneKeybindingService.addDynamicKeybinding(uniqueId, kb, run, keybindingsWhen));\n\t\t\t}\n\t\t}\n\n\t\t// Finally, register an internal editor action\n\t\tconst internalAction = new InternalEditorAction(\n\t\t\tuniqueId,\n\t\t\tlabel,\n\t\t\tlabel,\n\t\t\tundefined,\n\t\t\tprecondition,\n\t\t\t(...args: unknown[]) => Promise.resolve(_descriptor.run(this, ...args)),\n\t\t\tthis._contextKeyService\n\t\t);\n\n\t\t// Store it under the original id, such that trigger with the original id will work\n\t\tthis._actions.set(id, internalAction);\n\t\ttoDispose.add(toDisposable(() => {\n\t\t\tthis._actions.delete(id);\n\t\t}));\n\n\t\treturn toDispose;\n\t}\n\n\tprotected override _triggerCommand(handlerId: string, payload: any): void {\n\t\tif (this._codeEditorService instanceof StandaloneCodeEditorService) {\n\t\t\t// Help commands find this editor as the active editor\n\t\t\ttry {\n\t\t\t\tthis._codeEditorService.setActiveCodeEditor(this);\n\t\t\t\tsuper._triggerCommand(handlerId, payload);\n\t\t\t} finally {\n\t\t\t\tthis._codeEditorService.setActiveCodeEditor(null);\n\t\t\t}\n\t\t} else {\n\t\t\tsuper._triggerCommand(handlerId, payload);\n\t\t}\n\t}\n}\n\nexport class StandaloneEditor extends StandaloneCodeEditor implements IStandaloneCodeEditor {\n\n\tprivate readonly _configurationService: IConfigurationService;\n\tprivate readonly _standaloneThemeService: IStandaloneThemeService;\n\tprivate _ownsModel: boolean;\n\n\tconstructor(\n\t\tdomElement: HTMLElement,\n\t\t_options: Readonly<IStandaloneEditorConstructionOptions> | undefined,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@ICodeEditorService codeEditorService: ICodeEditorService,\n\t\t@ICommandService commandService: ICommandService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@IHoverService hoverService: IHoverService,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IStandaloneThemeService themeService: IStandaloneThemeService,\n\t\t@INotificationService notificationService: INotificationService,\n\t\t@IConfigurationService configurationService: IConfigurationService,\n\t\t@IAccessibilityService accessibilityService: IAccessibilityService,\n\t\t@IModelService modelService: IModelService,\n\t\t@ILanguageService languageService: ILanguageService,\n\t\t@ILanguageConfigurationService languageConfigurationService: ILanguageConfigurationService,\n\t\t@ILanguageFeaturesService languageFeaturesService: ILanguageFeaturesService,\n\t) {\n\t\tconst options = { ..._options };\n\t\tupdateConfigurationService(configurationService, options, false);\n\t\tconst themeDomRegistration = (<StandaloneThemeService>themeService).registerEditorContainer(domElement);\n\t\tif (typeof options.theme === 'string') {\n\t\t\tthemeService.setTheme(options.theme);\n\t\t}\n\t\tif (typeof options.autoDetectHighContrast !== 'undefined') {\n\t\t\tthemeService.setAutoDetectHighContrast(Boolean(options.autoDetectHighContrast));\n\t\t}\n\t\tconst _model: ITextModel | null | undefined = options.model;\n\t\tdelete options.model;\n\t\tsuper(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, hoverService, keybindingService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService);\n\n\t\tthis._configurationService = configurationService;\n\t\tthis._standaloneThemeService = themeService;\n\t\tthis._register(themeDomRegistration);\n\n\t\tlet model: ITextModel | null;\n\t\tif (typeof _model === 'undefined') {\n\t\t\tconst languageId = languageService.getLanguageIdByMimeType(options.language) || options.language || PLAINTEXT_LANGUAGE_ID;\n\t\t\tmodel = createTextModel(modelService, languageService, options.value || '', languageId, undefined);\n\t\t\tthis._ownsModel = true;\n\t\t} else {\n\t\t\tmodel = _model;\n\t\t\tthis._ownsModel = false;\n\t\t}\n\n\t\tthis._attachModel(model);\n\t\tif (model) {\n\t\t\tconst e: IModelChangedEvent = {\n\t\t\t\toldModelUrl: null,\n\t\t\t\tnewModelUrl: model.uri\n\t\t\t};\n\t\t\tthis._onDidChangeModel.fire(e);\n\t\t}\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t}\n\n\tpublic override updateOptions(newOptions: Readonly<IEditorOptions & IGlobalEditorOptions>): void {\n\t\tupdateConfigurationService(this._configurationService, newOptions, false);\n\t\tif (typeof newOptions.theme === 'string') {\n\t\t\tthis._standaloneThemeService.setTheme(newOptions.theme);\n\t\t}\n\t\tif (typeof newOptions.autoDetectHighContrast !== 'undefined') {\n\t\t\tthis._standaloneThemeService.setAutoDetectHighContrast(Boolean(newOptions.autoDetectHighContrast));\n\t\t}\n\t\tsuper.updateOptions(newOptions);\n\t}\n\n\tprotected override _postDetachModelCleanup(detachedModel: ITextModel): void {\n\t\tsuper._postDetachModelCleanup(detachedModel);\n\t\tif (detachedModel && this._ownsModel) {\n\t\t\tdetachedModel.dispose();\n\t\t\tthis._ownsModel = false;\n\t\t}\n\t}\n}\n\nexport class StandaloneDiffEditor2 extends DiffEditorWidget implements IStandaloneDiffEditor {\n\n\tprivate readonly _configurationService: IConfigurationService;\n\tprivate readonly _standaloneThemeService: IStandaloneThemeService;\n\n\tconstructor(\n\t\tdomElement: HTMLElement,\n\t\t_options: Readonly<IStandaloneDiffEditorConstructionOptions> | undefined,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@ICodeEditorService codeEditorService: ICodeEditorService,\n\t\t@IStandaloneThemeService themeService: IStandaloneThemeService,\n\t\t@INotificationService notificationService: INotificationService,\n\t\t@IConfigurationService configurationService: IConfigurationService,\n\t\t@IContextMenuService contextMenuService: IContextMenuService,\n\t\t@IEditorProgressService editorProgressService: IEditorProgressService,\n\t\t@IClipboardService clipboardService: IClipboardService,\n\t\t@IAccessibilitySignalService accessibilitySignalService: IAccessibilitySignalService,\n\t) {\n\t\tconst options = { ..._options };\n\t\tupdateConfigurationService(configurationService, options, true);\n\t\tconst themeDomRegistration = (<StandaloneThemeService>themeService).registerEditorContainer(domElement);\n\t\tif (typeof options.theme === 'string') {\n\t\t\tthemeService.setTheme(options.theme);\n\t\t}\n\t\tif (typeof options.autoDetectHighContrast !== 'undefined') {\n\t\t\tthemeService.setAutoDetectHighContrast(Boolean(options.autoDetectHighContrast));\n\t\t}\n\n\t\tsuper(\n\t\t\tdomElement,\n\t\t\toptions,\n\t\t\t{},\n\t\t\tcontextKeyService,\n\t\t\tinstantiationService,\n\t\t\tcodeEditorService,\n\t\t\taccessibilitySignalService,\n\t\t\teditorProgressService,\n\t\t);\n\n\t\tthis._configurationService = configurationService;\n\t\tthis._standaloneThemeService = themeService;\n\n\t\tthis._register(themeDomRegistration);\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t}\n\n\tpublic override updateOptions(newOptions: Readonly<IDiffEditorOptions & IGlobalEditorOptions>): void {\n\t\tupdateConfigurationService(this._configurationService, newOptions, true);\n\t\tif (typeof newOptions.theme === 'string') {\n\t\t\tthis._standaloneThemeService.setTheme(newOptions.theme);\n\t\t}\n\t\tif (typeof newOptions.autoDetectHighContrast !== 'undefined') {\n\t\t\tthis._standaloneThemeService.setAutoDetectHighContrast(Boolean(newOptions.autoDetectHighContrast));\n\t\t}\n\t\tsuper.updateOptions(newOptions);\n\t}\n\n\tprotected override _createInnerEditor(instantiationService: IInstantiationService, container: HTMLElement, options: Readonly<IEditorOptions>): CodeEditorWidget {\n\t\treturn instantiationService.createInstance(StandaloneCodeEditor, container, options);\n\t}\n\n\tpublic override getOriginalEditor(): IStandaloneCodeEditor {\n\t\treturn <StandaloneCodeEditor>super.getOriginalEditor();\n\t}\n\n\tpublic override getModifiedEditor(): IStandaloneCodeEditor {\n\t\treturn <StandaloneCodeEditor>super.getModifiedEditor();\n\t}\n\n\tpublic addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null {\n\t\treturn this.getModifiedEditor().addCommand(keybinding, handler, context);\n\t}\n\n\tpublic createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T> {\n\t\treturn this.getModifiedEditor().createContextKey(key, defaultValue);\n\t}\n\n\tpublic addAction(descriptor: IActionDescriptor): IDisposable {\n\t\treturn this.getModifiedEditor().addAction(descriptor);\n\t}\n}\n\n/**\n * @internal\n */\nexport function createTextModel(modelService: IModelService, languageService: ILanguageService, value: string, languageId: string | undefined, uri: URI | undefined): ITextModel {\n\tvalue = value || '';\n\tif (!languageId) {\n\t\tconst firstLF = value.indexOf('\\n');\n\t\tlet firstLine = value;\n\t\tif (firstLF !== -1) {\n\t\t\tfirstLine = value.substring(0, firstLF);\n\t\t}\n\t\treturn doCreateModel(modelService, value, languageService.createByFilepathOrFirstLine(uri || null, firstLine), uri);\n\t}\n\treturn doCreateModel(modelService, value, languageService.createById(languageId), uri);\n}\n\n/**\n * @internal\n */\nfunction doCreateModel(modelService: IModelService, value: string, languageSelection: ILanguageSelection, uri: URI | undefined): ITextModel {\n\treturn modelService.createModel(value, languageSelection, uri);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as aria from '../../../base/browser/ui/aria/aria.js';\nimport { Disposable, IDisposable, toDisposable, DisposableStore } from '../../../base/common/lifecycle.js';\nimport { ICodeEditor, IDiffEditor, IDiffEditorConstructionOptions } from '../../browser/editorBrowser.js';\nimport { ICodeEditorService } from '../../browser/services/codeEditorService.js';\nimport { CodeEditorWidget } from '../../browser/widget/codeEditor/codeEditorWidget.js';\nimport { IDiffEditorOptions, IEditorOptions } from '../../common/config/editorOptions.js';\nimport { InternalEditorAction } from '../../common/editorAction.js';\nimport { IModelChangedEvent } from '../../common/editorCommon.js';\nimport { ITextModel } from '../../common/model.js';\nimport { StandaloneKeybindingService, updateConfigurationService } from './standaloneServices.js';\nimport { IStandaloneThemeService } from '../common/standaloneTheme.js';\nimport { IMenuItem, MenuId, MenuRegistry } from '../../../platform/actions/common/actions.js';\nimport { CommandsRegistry, ICommandHandler, ICommandService } from '../../../platform/commands/common/commands.js';\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration.js';\nimport { ContextKeyExpr, ContextKeyValue, IContextKey, IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\nimport { IContextMenuService } from '../../../platform/contextview/browser/contextView.js';\nimport { IInstantiationService, ServicesAccessor } from '../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding.js';\nimport { INotificationService } from '../../../platform/notification/common/notification.js';\nimport { IThemeService } from '../../../platform/theme/common/themeService.js';\nimport { IAccessibilityService } from '../../../platform/accessibility/common/accessibility.js';\nimport { StandaloneCodeEditorNLS } from '../../common/standaloneStrings.js';\nimport { IClipboardService } from '../../../platform/clipboard/common/clipboardService.js';\nimport { IEditorProgressService } from '../../../platform/progress/common/progress.js';\nimport { StandaloneThemeService } from './standaloneThemeService.js';\nimport { IModelService } from '../../common/services/model.js';\nimport { ILanguageSelection, ILanguageService } from '../../common/languages/language.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { StandaloneCodeEditorService } from './standaloneCodeEditorService.js';\nimport { PLAINTEXT_LANGUAGE_ID } from '../../common/languages/modesRegistry.js';\nimport { ILanguageConfigurationService } from '../../common/languages/languageConfigurationRegistry.js';\nimport { IEditorConstructionOptions } from '../../browser/config/editorConfiguration.js';\nimport { ILanguageFeaturesService } from '../../common/services/languageFeatures.js';\nimport { DiffEditorWidget } from '../../browser/widget/diffEditor/diffEditorWidget.js';\nimport { IAccessibilitySignalService } from '../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { setHoverDelegateFactory } from '../../../base/browser/ui/hover/hoverDelegateFactory.js';\nimport { IHoverService, WorkbenchHoverDelegate } from '../../../platform/hover/browser/hover.js';\nimport { setBaseLayerHoverDelegate } from '../../../base/browser/ui/hover/hoverDelegate2.js';\n\n/**\n * Description of an action contribution\n */\nexport interface IActionDescriptor {\n\t/**\n\t * An unique identifier of the contributed action.\n\t */\n\tid: string;\n\t/**\n\t * A label of the action that will be presented to the user.\n\t */\n\tlabel: string;\n\t/**\n\t * Precondition rule. The value should be a [context key expression](https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts).\n\t */\n\tprecondition?: string;\n\t/**\n\t * An array of keybindings for the action.\n\t */\n\tkeybindings?: number[];\n\t/**\n\t * The keybinding rule (condition on top of precondition).\n\t */\n\tkeybindingContext?: string;\n\t/**\n\t * Control if the action should show up in the context menu and where.\n\t * The context menu of the editor has these default:\n\t * navigation - The navigation group comes first in all cases.\n\t * 1_modification - This group comes next and contains commands that modify your code.\n\t * 9_cutcopypaste - The last default group with the basic editing commands.\n\t * You can also create your own group.\n\t * Defaults to null (don't show in context menu).\n\t */\n\tcontextMenuGroupId?: string;\n\t/**\n\t * Control the order in the context menu group.\n\t */\n\tcontextMenuOrder?: number;\n\t/**\n\t * Method that will be executed when the action is triggered.\n\t * @param editor The editor instance is passed in as a convenience\n\t */\n\trun(editor: ICodeEditor, ...args: any[]): void | Promise<void>;\n}\n\n/**\n * Options which apply for all editors.\n */\nexport interface IGlobalEditorOptions {\n\t/**\n\t * The number of spaces a tab is equal to.\n\t * This setting is overridden based on the file contents when `detectIndentation` is on.\n\t * Defaults to 4.\n\t */\n\ttabSize?: number;\n\t/**\n\t * Insert spaces when pressing `Tab`.\n\t * This setting is overridden based on the file contents when `detectIndentation` is on.\n\t * Defaults to true.\n\t */\n\tinsertSpaces?: boolean;\n\t/**\n\t * Controls whether `tabSize` and `insertSpaces` will be automatically detected when a file is opened based on the file contents.\n\t * Defaults to true.\n\t */\n\tdetectIndentation?: boolean;\n\t/**\n\t * Remove trailing auto inserted whitespace.\n\t * Defaults to true.\n\t */\n\ttrimAutoWhitespace?: boolean;\n\t/**\n\t * Special handling for large files to disable certain memory intensive features.\n\t * Defaults to true.\n\t */\n\tlargeFileOptimizations?: boolean;\n\t/**\n\t * Controls whether completions should be computed based on words in the document.\n\t * Defaults to true.\n\t */\n\twordBasedSuggestions?: 'off' | 'currentDocument' | 'matchingDocuments' | 'allDocuments';\n\t/**\n\t * Controls whether word based completions should be included from opened documents of the same language or any language.\n\t */\n\twordBasedSuggestionsOnlySameLanguage?: boolean;\n\t/**\n\t * Controls whether the semanticHighlighting is shown for the languages that support it.\n\t * true: semanticHighlighting is enabled for all themes\n\t * false: semanticHighlighting is disabled for all themes\n\t * 'configuredByTheme': semanticHighlighting is controlled by the current color theme's semanticHighlighting setting.\n\t * Defaults to 'byTheme'.\n\t */\n\t'semanticHighlighting.enabled'?: true | false | 'configuredByTheme';\n\t/**\n\t * Keep peek editors open even when double-clicking their content or when hitting `Escape`.\n\t * Defaults to false.\n\t */\n\tstablePeek?: boolean;\n\t/**\n\t * Lines above this length will not be tokenized for performance reasons.\n\t * Defaults to 20000.\n\t */\n\tmaxTokenizationLineLength?: number;\n\t/**\n\t * Theme to be used for rendering.\n\t * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light'.\n\t * You can create custom themes via `monaco.editor.defineTheme`.\n\t * To switch a theme, use `monaco.editor.setTheme`.\n\t * **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.\n\t */\n\ttheme?: string;\n\t/**\n\t * If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.\n\t * Defaults to true.\n\t */\n\tautoDetectHighContrast?: boolean;\n}\n\n/**\n * The options to create an editor.\n */\nexport interface IStandaloneEditorConstructionOptions extends IEditorConstructionOptions, IGlobalEditorOptions {\n\t/**\n\t * The initial model associated with this code editor.\n\t */\n\tmodel?: ITextModel | null;\n\t/**\n\t * The initial value of the auto created model in the editor.\n\t * To not automatically create a model, use `model: null`.\n\t */\n\tvalue?: string;\n\t/**\n\t * The initial language of the auto created model in the editor.\n\t * To not automatically create a model, use `model: null`.\n\t */\n\tlanguage?: string;\n\t/**\n\t * Initial theme to be used for rendering.\n\t * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.\n\t * You can create custom themes via `monaco.editor.defineTheme`.\n\t * To switch a theme, use `monaco.editor.setTheme`.\n\t * **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.\n\t */\n\ttheme?: string;\n\t/**\n\t * If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.\n\t * Defaults to true.\n\t */\n\tautoDetectHighContrast?: boolean;\n\t/**\n\t * An URL to open when Ctrl+H (Windows and Linux) or Cmd+H (OSX) is pressed in\n\t * the accessibility help dialog in the editor.\n\t *\n\t * Defaults to \"https://go.microsoft.com/fwlink/?linkid=852450\"\n\t */\n\taccessibilityHelpUrl?: string;\n\t/**\n\t * Container element to use for ARIA messages.\n\t * Defaults to document.body.\n\t */\n\tariaContainerElement?: HTMLElement;\n}\n\n/**\n * The options to create a diff editor.\n */\nexport interface IStandaloneDiffEditorConstructionOptions extends IDiffEditorConstructionOptions {\n\t/**\n\t * Initial theme to be used for rendering.\n\t * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.\n\t * You can create custom themes via `monaco.editor.defineTheme`.\n\t * To switch a theme, use `monaco.editor.setTheme`.\n\t * **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.\n\t */\n\ttheme?: string;\n\t/**\n\t * If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme.\n\t * Defaults to true.\n\t */\n\tautoDetectHighContrast?: boolean;\n}\n\nexport interface IStandaloneCodeEditor extends ICodeEditor {\n\tupdateOptions(newOptions: IEditorOptions & IGlobalEditorOptions): void;\n\taddCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;\n\tcreateContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;\n\taddAction(descriptor: IActionDescriptor): IDisposable;\n}\n\nexport interface IStandaloneDiffEditor extends IDiffEditor {\n\taddCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;\n\tcreateContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;\n\taddAction(descriptor: IActionDescriptor): IDisposable;\n\n\tgetOriginalEditor(): IStandaloneCodeEditor;\n\tgetModifiedEditor(): IStandaloneCodeEditor;\n}\n\nlet LAST_GENERATED_COMMAND_ID = 0;\n\nlet ariaDomNodeCreated = false;\n/**\n * Create ARIA dom node inside parent,\n * or only for the first editor instantiation inside document.body.\n * @param parent container element for ARIA dom node\n */\nfunction createAriaDomNode(parent: HTMLElement | undefined) {\n\tif (!parent) {\n\t\tif (ariaDomNodeCreated) {\n\t\t\treturn;\n\t\t}\n\t\tariaDomNodeCreated = true;\n\t}\n\taria.setARIAContainer(parent || mainWindow.document.body);\n}\n\n/**\n * A code editor to be used both by the standalone editor and the standalone diff editor.\n */\nexport class StandaloneCodeEditor extends CodeEditorWidget implements IStandaloneCodeEditor {\n\n\tprivate readonly _standaloneKeybindingService: StandaloneKeybindingService | null;\n\n\tconstructor(\n\t\tdomElement: HTMLElement,\n\t\t_options: Readonly<IStandaloneEditorConstructionOptions>,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@ICodeEditorService codeEditorService: ICodeEditorService,\n\t\t@ICommandService commandService: ICommandService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@IHoverService hoverService: IHoverService,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IThemeService themeService: IThemeService,\n\t\t@INotificationService notificationService: INotificationService,\n\t\t@IAccessibilityService accessibilityService: IAccessibilityService,\n\t\t@ILanguageConfigurationService languageConfigurationService: ILanguageConfigurationService,\n\t\t@ILanguageFeaturesService languageFeaturesService: ILanguageFeaturesService,\n\t) {\n\t\tconst options = { ..._options };\n\t\toptions.ariaLabel = options.ariaLabel || StandaloneCodeEditorNLS.editorViewAccessibleLabel;\n\t\tsuper(domElement, options, {}, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService);\n\n\t\tif (keybindingService instanceof StandaloneKeybindingService) {\n\t\t\tthis._standaloneKeybindingService = keybindingService;\n\t\t} else {\n\t\t\tthis._standaloneKeybindingService = null;\n\t\t}\n\n\t\tcreateAriaDomNode(options.ariaContainerElement);\n\n\t\tsetHoverDelegateFactory((placement, enableInstantHover) => instantiationService.createInstance(WorkbenchHoverDelegate, placement, { instantHover: enableInstantHover }, {}));\n\t\tsetBaseLayerHoverDelegate(hoverService);\n\t}\n\n\tpublic addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null {\n\t\tif (!this._standaloneKeybindingService) {\n\t\t\tconsole.warn('Cannot add command because the editor is configured with an unrecognized KeybindingService');\n\t\t\treturn null;\n\t\t}\n\t\tconst commandId = 'DYNAMIC_' + (++LAST_GENERATED_COMMAND_ID);\n\t\tconst whenExpression = ContextKeyExpr.deserialize(context);\n\t\tthis._standaloneKeybindingService.addDynamicKeybinding(commandId, keybinding, handler, whenExpression);\n\t\treturn commandId;\n\t}\n\n\tpublic createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T> {\n\t\treturn this._contextKeyService.createKey(key, defaultValue);\n\t}\n\n\tpublic addAction(_descriptor: IActionDescriptor): IDisposable {\n\t\tif ((typeof _descriptor.id !== 'string') || (typeof _descriptor.label !== 'string') || (typeof _descriptor.run !== 'function')) {\n\t\t\tthrow new Error('Invalid action descriptor, `id`, `label` and `run` are required properties!');\n\t\t}\n\t\tif (!this._standaloneKeybindingService) {\n\t\t\tconsole.warn('Cannot add keybinding because the editor is configured with an unrecognized KeybindingService');\n\t\t\treturn Disposable.None;\n\t\t}\n\n\t\t// Read descriptor options\n\t\tconst id = _descriptor.id;\n\t\tconst label = _descriptor.label;\n\t\tconst precondition = ContextKeyExpr.and(\n\t\t\tContextKeyExpr.equals('editorId', this.getId()),\n\t\t\tContextKeyExpr.deserialize(_descriptor.precondition)\n\t\t);\n\t\tconst keybindings = _descriptor.keybindings;\n\t\tconst keybindingsWhen = ContextKeyExpr.and(\n\t\t\tprecondition,\n\t\t\tContextKeyExpr.deserialize(_descriptor.keybindingContext)\n\t\t);\n\t\tconst contextMenuGroupId = _descriptor.contextMenuGroupId || null;\n\t\tconst contextMenuOrder = _descriptor.contextMenuOrder || 0;\n\t\tconst run = (_accessor?: ServicesAccessor, ...args: unknown[]): Promise<void> => {\n\t\t\treturn Promise.resolve(_descriptor.run(this, ...args));\n\t\t};\n\n\n\t\tconst toDispose = new DisposableStore();\n\n\t\t// Generate a unique id to allow the same descriptor.id across multiple editor instances\n\t\tconst uniqueId = this.getId() + ':' + id;\n\n\t\t// Register the command\n\t\ttoDispose.add(CommandsRegistry.registerCommand(uniqueId, run));\n\n\t\t// Register the context menu item\n\t\tif (contextMenuGroupId) {\n\t\t\tconst menuItem: IMenuItem = {\n\t\t\t\tcommand: {\n\t\t\t\t\tid: uniqueId,\n\t\t\t\t\ttitle: label\n\t\t\t\t},\n\t\t\t\twhen: precondition,\n\t\t\t\tgroup: contextMenuGroupId,\n\t\t\t\torder: contextMenuOrder\n\t\t\t};\n\t\t\ttoDispose.add(MenuRegistry.appendMenuItem(MenuId.EditorContext, menuItem));\n\t\t}\n\n\t\t// Register the keybindings\n\t\tif (Array.isArray(keybindings)) {\n\t\t\tfor (const kb of keybindings) {\n\t\t\t\ttoDispose.add(this._standaloneKeybindingService.addDynamicKeybinding(uniqueId, kb, run, keybindingsWhen));\n\t\t\t}\n\t\t}\n\n\t\t// Finally, register an internal editor action\n\t\tconst internalAction = new InternalEditorAction(\n\t\t\tuniqueId,\n\t\t\tlabel,\n\t\t\tlabel,\n\t\t\tundefined,\n\t\t\tprecondition,\n\t\t\t(...args: unknown[]) => Promise.resolve(_descriptor.run(this, ...args)),\n\t\t\tthis._contextKeyService\n\t\t);\n\n\t\t// Store it under the original id, such that trigger with the original id will work\n\t\tthis._actions.set(id, internalAction);\n\t\ttoDispose.add(toDisposable(() => {\n\t\t\tthis._actions.delete(id);\n\t\t}));\n\n\t\treturn toDispose;\n\t}\n\n\tprotected override _triggerCommand(handlerId: string, payload: any): void {\n\t\tif (this._codeEditorService instanceof StandaloneCodeEditorService) {\n\t\t\t// Help commands find this editor as the active editor\n\t\t\ttry {\n\t\t\t\tthis._codeEditorService.setActiveCodeEditor(this);\n\t\t\t\tsuper._triggerCommand(handlerId, payload);\n\t\t\t} finally {\n\t\t\t\tthis._codeEditorService.setActiveCodeEditor(null);\n\t\t\t}\n\t\t} else {\n\t\t\tsuper._triggerCommand(handlerId, payload);\n\t\t}\n\t}\n}\n\nexport class StandaloneEditor extends StandaloneCodeEditor implements IStandaloneCodeEditor {\n\n\tprivate readonly _configurationService: IConfigurationService;\n\tprivate readonly _standaloneThemeService: IStandaloneThemeService;\n\tprivate _ownsModel: boolean;\n\n\tconstructor(\n\t\tdomElement: HTMLElement,\n\t\t_options: Readonly<IStandaloneEditorConstructionOptions> | undefined,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@ICodeEditorService codeEditorService: ICodeEditorService,\n\t\t@ICommandService commandService: ICommandService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@IHoverService hoverService: IHoverService,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IStandaloneThemeService themeService: IStandaloneThemeService,\n\t\t@INotificationService notificationService: INotificationService,\n\t\t@IConfigurationService configurationService: IConfigurationService,\n\t\t@IAccessibilityService accessibilityService: IAccessibilityService,\n\t\t@IModelService modelService: IModelService,\n\t\t@ILanguageService languageService: ILanguageService,\n\t\t@ILanguageConfigurationService languageConfigurationService: ILanguageConfigurationService,\n\t\t@ILanguageFeaturesService languageFeaturesService: ILanguageFeaturesService,\n\t) {\n\t\tconst options = { ..._options };\n\t\tupdateConfigurationService(configurationService, options, false);\n\t\tconst themeDomRegistration = (<StandaloneThemeService>themeService).registerEditorContainer(domElement);\n\t\tif (typeof options.theme === 'string') {\n\t\t\tthemeService.setTheme(options.theme);\n\t\t}\n\t\tif (typeof options.autoDetectHighContrast !== 'undefined') {\n\t\t\tthemeService.setAutoDetectHighContrast(Boolean(options.autoDetectHighContrast));\n\t\t}\n\t\tconst _model: ITextModel | null | undefined = options.model;\n\t\tdelete options.model;\n\t\tsuper(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, hoverService, keybindingService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService);\n\n\t\tthis._configurationService = configurationService;\n\t\tthis._standaloneThemeService = themeService;\n\t\tthis._register(themeDomRegistration);\n\n\t\tlet model: ITextModel | null;\n\t\tif (typeof _model === 'undefined') {\n\t\t\tconst languageId = languageService.getLanguageIdByMimeType(options.language) || options.language || PLAINTEXT_LANGUAGE_ID;\n\t\t\tmodel = createTextModel(modelService, languageService, options.value || '', languageId, undefined);\n\t\t\tthis._ownsModel = true;\n\t\t} else {\n\t\t\tmodel = _model;\n\t\t\tthis._ownsModel = false;\n\t\t}\n\n\t\tthis._attachModel(model);\n\t\tif (model) {\n\t\t\tconst e: IModelChangedEvent = {\n\t\t\t\toldModelUrl: null,\n\t\t\t\tnewModelUrl: model.uri\n\t\t\t};\n\t\t\tthis._onDidChangeModel.fire(e);\n\t\t}\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t}\n\n\tpublic override updateOptions(newOptions: Readonly<IEditorOptions & IGlobalEditorOptions>): void {\n\t\tupdateConfigurationService(this._configurationService, newOptions, false);\n\t\tif (typeof newOptions.theme === 'string') {\n\t\t\tthis._standaloneThemeService.setTheme(newOptions.theme);\n\t\t}\n\t\tif (typeof newOptions.autoDetectHighContrast !== 'undefined') {\n\t\t\tthis._standaloneThemeService.setAutoDetectHighContrast(Boolean(newOptions.autoDetectHighContrast));\n\t\t}\n\t\tsuper.updateOptions(newOptions);\n\t}\n\n\tprotected override _postDetachModelCleanup(detachedModel: ITextModel): void {\n\t\tsuper._postDetachModelCleanup(detachedModel);\n\t\tif (detachedModel && this._ownsModel) {\n\t\t\tdetachedModel.dispose();\n\t\t\tthis._ownsModel = false;\n\t\t}\n\t}\n}\n\nexport class StandaloneDiffEditor2 extends DiffEditorWidget implements IStandaloneDiffEditor {\n\n\tprivate readonly _configurationService: IConfigurationService;\n\tprivate readonly _standaloneThemeService: IStandaloneThemeService;\n\n\tconstructor(\n\t\tdomElement: HTMLElement,\n\t\t_options: Readonly<IStandaloneDiffEditorConstructionOptions> | undefined,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@ICodeEditorService codeEditorService: ICodeEditorService,\n\t\t@IStandaloneThemeService themeService: IStandaloneThemeService,\n\t\t@INotificationService notificationService: INotificationService,\n\t\t@IConfigurationService configurationService: IConfigurationService,\n\t\t@IContextMenuService contextMenuService: IContextMenuService,\n\t\t@IEditorProgressService editorProgressService: IEditorProgressService,\n\t\t@IClipboardService clipboardService: IClipboardService,\n\t\t@IAccessibilitySignalService accessibilitySignalService: IAccessibilitySignalService,\n\t) {\n\t\tconst options = { ..._options };\n\t\tupdateConfigurationService(configurationService, options, true);\n\t\tconst themeDomRegistration = (<StandaloneThemeService>themeService).registerEditorContainer(domElement);\n\t\tif (typeof options.theme === 'string') {\n\t\t\tthemeService.setTheme(options.theme);\n\t\t}\n\t\tif (typeof options.autoDetectHighContrast !== 'undefined') {\n\t\t\tthemeService.setAutoDetectHighContrast(Boolean(options.autoDetectHighContrast));\n\t\t}\n\n\t\tsuper(\n\t\t\tdomElement,\n\t\t\toptions,\n\t\t\t{},\n\t\t\tcontextKeyService,\n\t\t\tinstantiationService,\n\t\t\tcodeEditorService,\n\t\t\taccessibilitySignalService,\n\t\t\teditorProgressService,\n\t\t);\n\n\t\tthis._configurationService = configurationService;\n\t\tthis._standaloneThemeService = themeService;\n\n\t\tthis._register(themeDomRegistration);\n\t}\n\n\tpublic override dispose(): void {\n\t\tsuper.dispose();\n\t}\n\n\tpublic override updateOptions(newOptions: Readonly<IDiffEditorOptions & IGlobalEditorOptions>): void {\n\t\tupdateConfigurationService(this._configurationService, newOptions, true);\n\t\tif (typeof newOptions.theme === 'string') {\n\t\t\tthis._standaloneThemeService.setTheme(newOptions.theme);\n\t\t}\n\t\tif (typeof newOptions.autoDetectHighContrast !== 'undefined') {\n\t\t\tthis._standaloneThemeService.setAutoDetectHighContrast(Boolean(newOptions.autoDetectHighContrast));\n\t\t}\n\t\tsuper.updateOptions(newOptions);\n\t}\n\n\tprotected override _createInnerEditor(instantiationService: IInstantiationService, container: HTMLElement, options: Readonly<IEditorOptions>): CodeEditorWidget {\n\t\treturn instantiationService.createInstance(StandaloneCodeEditor, container, options);\n\t}\n\n\tpublic override getOriginalEditor(): IStandaloneCodeEditor {\n\t\treturn <StandaloneCodeEditor>super.getOriginalEditor();\n\t}\n\n\tpublic override getModifiedEditor(): IStandaloneCodeEditor {\n\t\treturn <StandaloneCodeEditor>super.getModifiedEditor();\n\t}\n\n\tpublic addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null {\n\t\treturn this.getModifiedEditor().addCommand(keybinding, handler, context);\n\t}\n\n\tpublic createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T> {\n\t\treturn this.getModifiedEditor().createContextKey(key, defaultValue);\n\t}\n\n\tpublic addAction(descriptor: IActionDescriptor): IDisposable {\n\t\treturn this.getModifiedEditor().addAction(descriptor);\n\t}\n}\n\n/**\n * @internal\n */\nexport function createTextModel(modelService: IModelService, languageService: ILanguageService, value: string, languageId: string | undefined, uri: URI | undefined): ITextModel {\n\tvalue = value || '';\n\tif (!languageId) {\n\t\tconst firstLF = value.indexOf('\\n');\n\t\tlet firstLine = value;\n\t\tif (firstLF !== -1) {\n\t\t\tfirstLine = value.substring(0, firstLF);\n\t\t}\n\t\treturn doCreateModel(modelService, value, languageService.createByFilepathOrFirstLine(uri || null, firstLine), uri);\n\t}\n\treturn doCreateModel(modelService, value, languageService.createById(languageId), uri);\n}\n\n/**\n * @internal\n */\nfunction doCreateModel(modelService: IModelService, value: string, languageSelection: ILanguageSelection, uri: URI | undefined): ITextModel {\n\treturn modelService.createModel(value, languageSelection, uri);\n}\n"]}
@@ -404,37 +404,65 @@ export function registerEditorOpener(opener) {
404
404
  export function createMonacoEditorAPI() {
405
405
  return {
406
406
  // methods
407
+ // eslint-disable-next-line local/code-no-any-casts
407
408
  create: create,
409
+ // eslint-disable-next-line local/code-no-any-casts
408
410
  getEditors: getEditors,
411
+ // eslint-disable-next-line local/code-no-any-casts
409
412
  getDiffEditors: getDiffEditors,
413
+ // eslint-disable-next-line local/code-no-any-casts
410
414
  onDidCreateEditor: onDidCreateEditor,
415
+ // eslint-disable-next-line local/code-no-any-casts
411
416
  onDidCreateDiffEditor: onDidCreateDiffEditor,
417
+ // eslint-disable-next-line local/code-no-any-casts
412
418
  createDiffEditor: createDiffEditor,
419
+ // eslint-disable-next-line local/code-no-any-casts
413
420
  addCommand: addCommand,
421
+ // eslint-disable-next-line local/code-no-any-casts
414
422
  addEditorAction: addEditorAction,
423
+ // eslint-disable-next-line local/code-no-any-casts
415
424
  addKeybindingRule: addKeybindingRule,
425
+ // eslint-disable-next-line local/code-no-any-casts
416
426
  addKeybindingRules: addKeybindingRules,
427
+ // eslint-disable-next-line local/code-no-any-casts
417
428
  createModel: createModel,
429
+ // eslint-disable-next-line local/code-no-any-casts
418
430
  setModelLanguage: setModelLanguage,
431
+ // eslint-disable-next-line local/code-no-any-casts
419
432
  setModelMarkers: setModelMarkers,
433
+ // eslint-disable-next-line local/code-no-any-casts
420
434
  getModelMarkers: getModelMarkers,
421
435
  removeAllMarkers: removeAllMarkers,
436
+ // eslint-disable-next-line local/code-no-any-casts
422
437
  onDidChangeMarkers: onDidChangeMarkers,
438
+ // eslint-disable-next-line local/code-no-any-casts
423
439
  getModels: getModels,
440
+ // eslint-disable-next-line local/code-no-any-casts
424
441
  getModel: getModel,
442
+ // eslint-disable-next-line local/code-no-any-casts
425
443
  onDidCreateModel: onDidCreateModel,
444
+ // eslint-disable-next-line local/code-no-any-casts
426
445
  onWillDisposeModel: onWillDisposeModel,
446
+ // eslint-disable-next-line local/code-no-any-casts
427
447
  onDidChangeModelLanguage: onDidChangeModelLanguage,
448
+ // eslint-disable-next-line local/code-no-any-casts
428
449
  createWebWorker: createWebWorker,
450
+ // eslint-disable-next-line local/code-no-any-casts
429
451
  colorizeElement: colorizeElement,
452
+ // eslint-disable-next-line local/code-no-any-casts
430
453
  colorize: colorize,
454
+ // eslint-disable-next-line local/code-no-any-casts
431
455
  colorizeModelLine: colorizeModelLine,
456
+ // eslint-disable-next-line local/code-no-any-casts
432
457
  tokenize: tokenize,
458
+ // eslint-disable-next-line local/code-no-any-casts
433
459
  defineTheme: defineTheme,
460
+ // eslint-disable-next-line local/code-no-any-casts
434
461
  setTheme: setTheme,
435
462
  remeasureFonts: remeasureFonts,
436
463
  registerCommand: registerCommand,
437
464
  registerLinkOpener: registerLinkOpener,
465
+ // eslint-disable-next-line local/code-no-any-casts
438
466
  registerEditorOpener: registerEditorOpener,
439
467
  // enums
440
468
  AccessibilitySupport: standaloneEnums.AccessibilitySupport,
@@ -464,16 +492,25 @@ export function createMonacoEditorAPI() {
464
492
  ShowLightbulbIconMode: standaloneEnums.ShowLightbulbIconMode,
465
493
  TextDirection: standaloneEnums.TextDirection,
466
494
  // classes
495
+ // eslint-disable-next-line local/code-no-any-casts
467
496
  ConfigurationChangedEvent: ConfigurationChangedEvent,
497
+ // eslint-disable-next-line local/code-no-any-casts
468
498
  BareFontInfo: BareFontInfo,
499
+ // eslint-disable-next-line local/code-no-any-casts
469
500
  FontInfo: FontInfo,
501
+ // eslint-disable-next-line local/code-no-any-casts
470
502
  TextModelResolvedOptions: TextModelResolvedOptions,
503
+ // eslint-disable-next-line local/code-no-any-casts
471
504
  FindMatch: FindMatch,
505
+ // eslint-disable-next-line local/code-no-any-casts
472
506
  ApplyUpdateResult: ApplyUpdateResult,
507
+ // eslint-disable-next-line local/code-no-any-casts
473
508
  EditorZoom: EditorZoom,
509
+ // eslint-disable-next-line local/code-no-any-casts
474
510
  createMultiFileDiffEditor: createMultiFileDiffEditor,
475
511
  // vars
476
512
  EditorType: EditorType,
513
+ // eslint-disable-next-line local/code-no-any-casts
477
514
  EditorOptions: EditorOptions
478
515
  };
479
516
  }