@codingame/monaco-vscode-api 1.76.9 → 1.78.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/README.md +87 -49
  2. package/dist/Bibtex.tmLanguage.js +2 -0
  3. package/dist/Handlebars.tmLanguage.js +2 -0
  4. package/dist/JSON.tmLanguage.js +2 -0
  5. package/dist/JSONC.tmLanguage.js +2 -0
  6. package/dist/JavaScript.tmLanguage.js +2 -0
  7. package/dist/JavaScriptReact.tmLanguage.js +2 -0
  8. package/dist/LaTeX.tmLanguage.js +2 -0
  9. package/dist/MagicPython.tmLanguage.js +2 -0
  10. package/dist/MagicRegExp.tmLanguage.js +2 -0
  11. package/dist/Red-color-theme.js +2 -0
  12. package/dist/Regular Expressions (JavaScript).js +2 -0
  13. package/dist/TeX.tmLanguage.js +2 -0
  14. package/dist/TypeScript.tmLanguage.js +2 -0
  15. package/dist/TypeScriptReact.tmLanguage.js +2 -0
  16. package/dist/_.contribution.js +1 -1
  17. package/dist/abyss-color-theme.js +2 -0
  18. package/dist/api.js +1 -3
  19. package/dist/api2.js +421 -18091
  20. package/dist/asp-vb-net.tmlanguage.js +2 -0
  21. package/dist/assets/diffLineDeleted.mp3 +0 -0
  22. package/dist/assets/diffLineInserted.mp3 +0 -0
  23. package/dist/assets/diffLineModified.mp3 +0 -0
  24. package/dist/audioCue.js +108 -478
  25. package/dist/bat.js +9 -0
  26. package/dist/batchfile.js +2 -0
  27. package/dist/batchfile.tmLanguage.js +2 -0
  28. package/dist/button.js +35 -8
  29. package/dist/c.js +2 -0
  30. package/dist/c.tmLanguage.js +2 -0
  31. package/dist/clojure.js +8 -0
  32. package/dist/clojure.tmLanguage.js +2 -0
  33. package/dist/coffeescript.js +9 -0
  34. package/dist/coffeescript.tmLanguage.js +2 -0
  35. package/dist/coffeescript2.js +2 -0
  36. package/dist/configuration.d.ts +269 -4
  37. package/dist/configuration.js +4326 -328
  38. package/dist/configuration2.js +14 -324
  39. package/dist/cpp-grammar-bailout.tmLanguage.js +2 -0
  40. package/dist/cpp.embedded.macro.tmLanguage.js +2 -0
  41. package/dist/cpp.js +16 -0
  42. package/dist/cpp.tmLanguage.js +2 -0
  43. package/dist/cpp2.js +2 -0
  44. package/dist/csharp.js +9 -0
  45. package/dist/csharp.tmLanguage.js +2 -0
  46. package/dist/csharp2.js +2 -0
  47. package/dist/cshtml.tmLanguage.js +2 -0
  48. package/dist/css.js +8 -0
  49. package/dist/css.tmLanguage.js +2 -0
  50. package/dist/cuda-cpp.tmLanguage.js +2 -0
  51. package/dist/dark_plus.js +2 -0
  52. package/dist/dark_plus_experimental.js +2 -0
  53. package/dist/dark_vs.js +2 -0
  54. package/dist/dart.js +8 -0
  55. package/dist/dart.tmLanguage.js +2 -0
  56. package/dist/debug.js +12113 -12209
  57. package/dist/default-extensions/bat.js +12 -0
  58. package/dist/default-extensions/clojure.js +11 -0
  59. package/dist/default-extensions/coffeescript.js +12 -0
  60. package/dist/default-extensions/cpp.js +19 -0
  61. package/dist/default-extensions/csharp.js +12 -0
  62. package/dist/default-extensions/css.js +11 -0
  63. package/dist/default-extensions/dart.js +11 -0
  64. package/dist/default-extensions/diff.js +11 -0
  65. package/dist/default-extensions/docker.js +11 -0
  66. package/dist/default-extensions/fsharp.js +12 -0
  67. package/dist/default-extensions/go.js +11 -0
  68. package/dist/default-extensions/groovy.js +12 -0
  69. package/dist/default-extensions/handlebars.js +11 -0
  70. package/dist/default-extensions/hlsl.js +11 -0
  71. package/dist/default-extensions/html.js +13 -0
  72. package/dist/default-extensions/ini.js +13 -0
  73. package/dist/default-extensions/java.js +12 -0
  74. package/dist/default-extensions/javascript.js +17 -0
  75. package/dist/default-extensions/json.js +13 -0
  76. package/dist/default-extensions/julia.js +11 -0
  77. package/dist/default-extensions/latex.js +14 -0
  78. package/dist/default-extensions/less.js +11 -0
  79. package/dist/default-extensions/log.js +10 -0
  80. package/dist/default-extensions/lua.js +11 -0
  81. package/dist/default-extensions/make.js +11 -0
  82. package/dist/default-extensions/markdown-basics.js +12 -0
  83. package/dist/default-extensions/objective-c.js +13 -0
  84. package/dist/default-extensions/perl.js +13 -0
  85. package/dist/default-extensions/php.js +13 -0
  86. package/dist/default-extensions/powershell.js +11 -0
  87. package/dist/default-extensions/pug.js +11 -0
  88. package/dist/default-extensions/python.js +12 -0
  89. package/dist/default-extensions/r.js +11 -0
  90. package/dist/default-extensions/razor.js +11 -0
  91. package/dist/default-extensions/ruby.js +11 -0
  92. package/dist/default-extensions/rust.js +11 -0
  93. package/dist/default-extensions/scss.js +12 -0
  94. package/dist/default-extensions/shaderlab.js +11 -0
  95. package/dist/default-extensions/shellscript.js +11 -0
  96. package/dist/default-extensions/sql.js +11 -0
  97. package/dist/default-extensions/swift.js +12 -0
  98. package/dist/default-extensions/theme-abyss.js +10 -0
  99. package/dist/default-extensions/theme-defaults.js +18 -0
  100. package/dist/default-extensions/theme-kimbie-dark.js +10 -0
  101. package/dist/default-extensions/theme-monokai-dimmed.js +10 -0
  102. package/dist/default-extensions/theme-monokai.js +10 -0
  103. package/dist/default-extensions/theme-quietlight.js +10 -0
  104. package/dist/default-extensions/theme-red.js +10 -0
  105. package/dist/default-extensions/theme-seti.js +10 -0
  106. package/dist/default-extensions/theme-solarized-dark.js +10 -0
  107. package/dist/default-extensions/theme-solarized-light.js +10 -0
  108. package/dist/default-extensions/theme-tomorrow-night-blue.js +10 -0
  109. package/dist/default-extensions/typescript-basics.js +17 -0
  110. package/dist/default-extensions/vb.js +12 -0
  111. package/dist/default-extensions/xml.js +13 -0
  112. package/dist/default-extensions/yaml.js +13 -0
  113. package/dist/dialogs.js +11 -216
  114. package/dist/diff.js +8 -0
  115. package/dist/diff.tmLanguage.js +2 -0
  116. package/dist/dimmed-monokai-color-theme.js +2 -0
  117. package/dist/docker.js +8 -0
  118. package/dist/docker.tmLanguage.js +2 -0
  119. package/dist/dom.js +101 -0
  120. package/dist/extensionManagement.js +4 -0
  121. package/dist/extensions.d.ts +368 -23
  122. package/dist/extensions.js +4 -85
  123. package/dist/extensionsRegistry.js +63 -64
  124. package/dist/files.d.ts +845 -0
  125. package/dist/files.js +1805 -1151
  126. package/dist/files2.js +32 -0
  127. package/dist/fsharp.js +9 -0
  128. package/dist/fsharp.tmLanguage.js +2 -0
  129. package/dist/fsharp2.js +2 -0
  130. package/dist/go.js +8 -0
  131. package/dist/go.tmLanguage.js +2 -0
  132. package/dist/groovy.js +9 -0
  133. package/dist/groovy.tmLanguage.js +2 -0
  134. package/dist/groovy2.js +2 -0
  135. package/dist/handlebars.js +8 -0
  136. package/dist/hc_black.js +2 -0
  137. package/dist/hc_light.js +2 -0
  138. package/dist/hlsl.js +8 -0
  139. package/dist/hlsl.tmLanguage.js +2 -0
  140. package/dist/html-derivative.tmLanguage.js +2 -0
  141. package/dist/html.js +10 -0
  142. package/dist/html.tmLanguage.js +2 -0
  143. package/dist/html.tmLanguage2.js +2 -0
  144. package/dist/html2.js +2 -0
  145. package/dist/ini.js +10 -0
  146. package/dist/ini.language-configuration.js +2 -0
  147. package/dist/ini.tmLanguage.js +2 -0
  148. package/dist/injection.js +1 -1
  149. package/dist/java.js +9 -0
  150. package/dist/java.tmLanguage.js +2 -0
  151. package/dist/java2.js +2 -0
  152. package/dist/javascript-language-configuration.js +2 -0
  153. package/dist/javascript.js +14 -0
  154. package/dist/javascript2.js +2 -0
  155. package/dist/jsdoc.js.injection.tmLanguage.js +2 -0
  156. package/dist/jsdoc.ts.injection.tmLanguage.js +2 -0
  157. package/dist/json.js +10 -0
  158. package/dist/jsonErrorMessages.js +1 -1
  159. package/dist/julia.js +8 -0
  160. package/dist/julia.tmLanguage.js +2 -0
  161. package/dist/keybindings.d.ts +1 -10
  162. package/dist/keybindings.js +291 -353
  163. package/dist/kimbie-dark-color-theme.js +2 -0
  164. package/dist/language-configuration.js +2 -0
  165. package/dist/language-configuration10.js +2 -0
  166. package/dist/language-configuration11.js +2 -0
  167. package/dist/language-configuration12.js +2 -0
  168. package/dist/language-configuration13.js +2 -0
  169. package/dist/language-configuration14.js +2 -0
  170. package/dist/language-configuration15.js +2 -0
  171. package/dist/language-configuration16.js +2 -0
  172. package/dist/language-configuration17.js +2 -0
  173. package/dist/language-configuration18.js +2 -0
  174. package/dist/language-configuration19.js +2 -0
  175. package/dist/language-configuration2.js +2 -0
  176. package/dist/language-configuration20.js +2 -0
  177. package/dist/language-configuration21.js +2 -0
  178. package/dist/language-configuration22.js +2 -0
  179. package/dist/language-configuration23.js +2 -0
  180. package/dist/language-configuration24.js +2 -0
  181. package/dist/language-configuration25.js +2 -0
  182. package/dist/language-configuration26.js +2 -0
  183. package/dist/language-configuration27.js +2 -0
  184. package/dist/language-configuration28.js +2 -0
  185. package/dist/language-configuration29.js +2 -0
  186. package/dist/language-configuration3.js +2 -0
  187. package/dist/language-configuration30.js +2 -0
  188. package/dist/language-configuration31.js +2 -0
  189. package/dist/language-configuration32.js +2 -0
  190. package/dist/language-configuration33.js +2 -0
  191. package/dist/language-configuration34.js +2 -0
  192. package/dist/language-configuration35.js +2 -0
  193. package/dist/language-configuration36.js +2 -0
  194. package/dist/language-configuration37.js +2 -0
  195. package/dist/language-configuration38.js +2 -0
  196. package/dist/language-configuration39.js +2 -0
  197. package/dist/language-configuration4.js +2 -0
  198. package/dist/language-configuration5.js +2 -0
  199. package/dist/language-configuration6.js +2 -0
  200. package/dist/language-configuration7.js +2 -0
  201. package/dist/language-configuration8.js +2 -0
  202. package/dist/language-configuration9.js +2 -0
  203. package/dist/languageService.js +5 -6
  204. package/dist/languages.d.ts +66 -1
  205. package/dist/languages.js +924 -5
  206. package/dist/latex.js +11 -0
  207. package/dist/layout.contribution.darwin.js +1 -1
  208. package/dist/layout.contribution.linux.js +1 -1
  209. package/dist/layout.contribution.win.js +1 -1
  210. package/dist/less.js +8 -0
  211. package/dist/less.tmLanguage.js +2 -0
  212. package/dist/light_plus.js +2 -0
  213. package/dist/light_plus_experimental.js +2 -0
  214. package/dist/light_vs.js +2 -0
  215. package/dist/log.js +7 -0
  216. package/dist/log.tmLanguage.js +2 -0
  217. package/dist/lua.js +8 -0
  218. package/dist/lua.tmLanguage.js +2 -0
  219. package/dist/make.js +8 -0
  220. package/dist/make.tmLanguage.js +2 -0
  221. package/dist/markdown-basics.js +9 -0
  222. package/dist/markdown-latex-combined.tmLanguage.js +2 -0
  223. package/dist/markdown.js +2 -0
  224. package/dist/markdown.tmLanguage.js +2 -0
  225. package/dist/memento.js +91 -0
  226. package/dist/modelEditor.d.ts +1480 -138
  227. package/dist/modelEditor.js +8699 -326
  228. package/dist/monaco.d.ts +987 -15
  229. package/dist/monaco.js +40 -10
  230. package/dist/monokai-color-theme.js +2 -0
  231. package/dist/notifications.js +84 -64
  232. package/dist/objective-c.js +10 -0
  233. package/dist/objective-c.tmLanguage.js +2 -0
  234. package/dist/objective-c__.tmLanguage.js +2 -0
  235. package/dist/perl.js +10 -0
  236. package/dist/perl.language-configuration.js +2 -0
  237. package/dist/perl.tmLanguage.js +2 -0
  238. package/dist/perl6.language-configuration.js +2 -0
  239. package/dist/perl6.tmLanguage.js +2 -0
  240. package/dist/php.js +10 -0
  241. package/dist/php.tmLanguage.js +2 -0
  242. package/dist/php2.js +2 -0
  243. package/dist/platform.js +105 -0
  244. package/dist/platform.tmLanguage.js +2 -0
  245. package/dist/polyfill.js +52064 -11100
  246. package/dist/powershell.js +8 -0
  247. package/dist/powershell.tmLanguage.js +2 -0
  248. package/dist/preferences.js +2532 -0
  249. package/dist/properties.language-configuration.js +2 -0
  250. package/dist/pug.js +8 -0
  251. package/dist/pug.tmLanguage.js +2 -0
  252. package/dist/python.js +9 -0
  253. package/dist/quietlight-color-theme.js +2 -0
  254. package/dist/r.js +8 -0
  255. package/dist/r.tmLanguage.js +2 -0
  256. package/dist/razor.js +8 -0
  257. package/dist/rollup-vsix-plugin.d.ts +8 -0
  258. package/dist/rollup-vsix-plugin.js +104 -0
  259. package/dist/ruby.js +8 -0
  260. package/dist/ruby.tmLanguage.js +2 -0
  261. package/dist/rust.js +8 -0
  262. package/dist/rust.tmLanguage.js +2 -0
  263. package/dist/sassdoc.tmLanguage.js +2 -0
  264. package/dist/scss.js +9 -0
  265. package/dist/scss.tmLanguage.js +2 -0
  266. package/dist/services.d.ts +12988 -12840
  267. package/dist/services.js +1 -1
  268. package/dist/shaderlab.js +8 -0
  269. package/dist/shaderlab.tmLanguage.js +2 -0
  270. package/dist/shell-unix-bash.tmLanguage.js +2 -0
  271. package/dist/shellscript.js +8 -0
  272. package/dist/snippets.js +6 -11
  273. package/dist/snippetsService.js +7 -10
  274. package/dist/solarized-dark-color-theme.js +2 -0
  275. package/dist/solarized-light-color-theme.js +2 -0
  276. package/dist/sql.js +8 -0
  277. package/dist/sql.tmLanguage.js +2 -0
  278. package/dist/swift.js +9 -0
  279. package/dist/swift.tmLanguage.js +2 -0
  280. package/dist/swift2.js +2 -0
  281. package/dist/tags-language-configuration.js +2 -0
  282. package/dist/textmate.d.ts +0 -264
  283. package/dist/textmate.js +402 -66
  284. package/dist/theme-abyss.js +7 -0
  285. package/dist/theme-defaults.js +15 -0
  286. package/dist/theme-kimbie-dark.js +7 -0
  287. package/dist/theme-monokai-dimmed.js +7 -0
  288. package/dist/theme-monokai.js +7 -0
  289. package/dist/theme-quietlight.js +7 -0
  290. package/dist/theme-red.js +7 -0
  291. package/dist/theme-seti.js +7 -0
  292. package/dist/theme-solarized-dark.js +7 -0
  293. package/dist/theme-solarized-light.js +7 -0
  294. package/dist/theme-tomorrow-night-blue.js +7 -0
  295. package/dist/theme.js +5 -11
  296. package/dist/{contextkeys.js → theme2.js} +165 -143
  297. package/dist/tokenClassificationRegistry.js +46 -2
  298. package/dist/tomorrow-night-blue-color-theme.js +2 -0
  299. package/dist/typescript-basics.js +14 -0
  300. package/dist/typescript.js +2 -0
  301. package/dist/unboundCommands.js +41 -0
  302. package/dist/utils.js +345 -0
  303. package/dist/vb.js +9 -0
  304. package/dist/vb2.js +2 -0
  305. package/dist/vs-seti-icon-theme.js +2 -0
  306. package/dist/vs_minimal-icon-theme.js +2 -0
  307. package/dist/xml.js +10 -0
  308. package/dist/xml.language-configuration.js +2 -0
  309. package/dist/xml.tmLanguage.js +2 -0
  310. package/dist/xsl.language-configuration.js +2 -0
  311. package/dist/xsl.tmLanguage.js +2 -0
  312. package/dist/yaml.js +10 -0
  313. package/dist/yaml.tmLanguage.js +2 -0
  314. package/package.json +50 -33
  315. package/dist/async.js +0 -301
  316. package/dist/cancellation.js +0 -3
  317. package/dist/configurationRegistry.js +0 -441
  318. package/dist/extensionResourceLoader.js +0 -96
  319. package/dist/labels.js +0 -14
  320. package/dist/languageConfiguration.js +0 -919
  321. package/dist/layout.js +0 -47
  322. package/dist/layoutService.js +0 -4
  323. package/dist/missing-services.js +0 -5554
  324. package/dist/resources.js +0 -197
  325. package/dist/services2.js +0 -3467
  326. package/dist/textFileEditorModel.js +0 -2985
  327. package/dist/tokenClassification.d.ts +0 -7
  328. package/dist/tokenClassification.js +0 -277
  329. package/dist/variableResolver.js +0 -1711
  330. package/dist/workbenchThemeService.js +0 -46
  331. package/dist/workspaceContext.js +0 -50
  332. /package/dist/{languageConfiguration.d.ts → preferences.d.ts} +0 -0
@@ -1,19 +1,15 @@
1
- import { _ as __decorate, a as __param, J as IUserDataProfilesService, n as IFileService, I as IEditorService, d as IEditorGroupsService, e as IProductService, E as Emitter, t as IHostService } from './services2.js';
2
- import { h as index, p as parse, j as getNodeType, f as flatten } from './polyfill.js';
3
- import { q as isProposedApiEnabled, bR as IKeyboardLayoutService, bp as IExtensionService, bS as IPreferencesService, bT as getKeyboardLayoutId, bU as IUserDataProfileService, bV as FallbackKeyboardMapper } from './missing-services.js';
1
+ import { isProposedApiEnabled, __decorate, index, __param, IUserDataProfilesService, IFileService, IKeyboardLayoutService, IEditorService, IExtensionService, IEditorGroupsService, IPreferencesService, IProductService, Emitter, getKeyboardLayoutId, IUserDataProfileService, IHostService, parse$1, getNodeType, FallbackKeyboardMapper } from './polyfill.js';
4
2
  import { KeyCodeChord, ScanCodeChord, Keybinding } from 'monaco-editor/esm/vs/base/common/keybindings.js';
5
3
  import { KeyCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE, NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE, IMMUTABLE_KEY_CODE_TO_CODE } from 'monaco-editor/esm/vs/base/common/keyCodes.js';
6
- import { E as ExtensionsRegistry } from './extensionsRegistry.js';
7
- import { ContextKeyExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
8
- import { getConfiguredDefaultLocale, localize } from 'monaco-editor/esm/vs/nls.js';
4
+ import { ExtensionsRegistry } from './extensionsRegistry.js';
5
+ import { localize } from 'monaco-editor/esm/vs/nls.js';
9
6
  import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
10
7
  import { joinPath, dirname } from 'monaco-editor/esm/vs/base/common/resources.js';
11
- import { MenuId, MenuRegistry, MenuItemAction, Action2, IMenuService, isIMenuItem } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
8
+ import { MenuId, MenuRegistry, MenuItemAction, Action2, IMenuService } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
9
+ import { ContextKeyExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
12
10
  import { DisposableStore, Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
13
11
  import { isFalsyOrWhitespace } from 'monaco-editor/esm/vs/base/common/strings.js';
14
- import { EditorExtensionsRegistry } from 'monaco-editor/esm/vs/editor/browser/editorExtensions.js';
15
- import { ICommandService, CommandsRegistry } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
16
- import { isNonEmptyArray } from 'monaco-editor/esm/vs/base/common/arrays.js';
12
+ import { getAllUnboundCommands } from './unboundCommands.js';
17
13
  import { AbstractKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/abstractKeybindingService.js';
18
14
  import { KeybindingsRegistry } from 'monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js';
19
15
  import { addDisposableListener, EventType } from 'monaco-editor/esm/vs/base/browser/dom.js';
@@ -22,17 +18,19 @@ import { UserSettingsLabelProvider, UILabelProvider } from 'monaco-editor/esm/vs
22
18
  import { OS, isMacintosh, isWindows, isLinux } from 'monaco-editor/esm/vs/base/common/platform.js';
23
19
  import { KeybindingResolver } from 'monaco-editor/esm/vs/platform/keybinding/common/keybindingResolver.js';
24
20
  import { ResolvedKeybindingItem, toEmptyArrayIfContainsNull } from 'monaco-editor/esm/vs/platform/keybinding/common/resolvedKeybindingItem.js';
21
+ import { ICommandService, CommandsRegistry } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
25
22
  import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
26
23
  import { INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
27
24
  import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
28
25
  import { timeout, RunOnceScheduler } from 'monaco-editor/esm/vs/base/common/async.js';
29
26
  import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
30
27
  import { equals } from 'monaco-editor/esm/vs/base/common/objects.js';
31
- import { StandardKeyboardEvent } from 'monaco-editor/esm/vs/base/browser/keyboardEvent.js';
32
28
  import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
33
- import { Extensions } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
29
+ import { Extensions as Extensions$2 } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
30
+ import { StandardKeyboardEvent } from 'monaco-editor/esm/vs/base/browser/keyboardEvent.js';
31
+ import { Language } from './platform.js';
34
32
  import { AbstractEditorCommandsQuickAccessProvider } from 'monaco-editor/esm/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.js';
35
- import { DefaultQuickAccessFilterValue, Extensions as Extensions$2 } from 'monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js';
33
+ import { DefaultQuickAccessFilterValue, Extensions as Extensions$1 } from 'monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js';
36
34
  import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
37
35
  import { TriggerAction } from 'monaco-editor/esm/vs/platform/quickinput/browser/pickerQuickAccess.js';
38
36
  import { stripIcons } from 'monaco-editor/esm/vs/base/common/iconLabels.js';
@@ -42,13 +40,12 @@ import { IDialogService } from 'monaco-editor/esm/vs/platform/dialogs/common/dia
42
40
  import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
43
41
  import { isFirefox } from 'monaco-editor/esm/vs/base/browser/browser.js';
44
42
  import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
45
- import { Extensions as Extensions$1 } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
43
+ import { Extensions } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
46
44
  import { BaseResolvedKeybinding } from 'monaco-editor/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js';
47
45
  import { IEnvironmentService } from 'monaco-editor/esm/vs/platform/environment/common/environment.js';
48
46
  import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
49
- import { g as getServiceOverride$1 } from './files.js';
50
- import getServiceOverride$2, { configurationRegistry as configurationRegistry$2 } from './configuration.js';
51
- import { c as createInjectedClass } from './injection.js';
47
+ import getServiceOverride$1 from './files.js';
48
+ import { createInjectedClass } from './injection.js';
52
49
  import { StandaloneCommandsQuickAccessProvider } from 'monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js';
53
50
  import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
54
51
  import { StandaloneServices, StandaloneKeybindingService } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
@@ -98,13 +95,13 @@ function isFullscreen() {
98
95
  return WindowManager.INSTANCE.isFullscreen();
99
96
  }
100
97
  const onDidChangeFullscreen = WindowManager.INSTANCE.onDidChangeFullscreen;
101
- const userAgent$1 = navigator.userAgent;
102
- (userAgent$1.indexOf('Firefox') >= 0);
103
- (userAgent$1.indexOf('AppleWebKit') >= 0);
104
- const isChrome$1 = (userAgent$1.indexOf('Chrome') >= 0);
105
- (!isChrome$1 && (userAgent$1.indexOf('Safari') >= 0));
106
- (userAgent$1.indexOf('Electron/') >= 0);
107
- (userAgent$1.indexOf('Android') >= 0);
98
+ const userAgent = navigator.userAgent;
99
+ (userAgent.indexOf('Firefox') >= 0);
100
+ (userAgent.indexOf('AppleWebKit') >= 0);
101
+ const isChrome = (userAgent.indexOf('Chrome') >= 0);
102
+ (!isChrome && (userAgent.indexOf('Safari') >= 0));
103
+ (userAgent.indexOf('Electron/') >= 0);
104
+ (userAgent.indexOf('Android') >= 0);
108
105
  let standalone = false;
109
106
  if (window.matchMedia) {
110
107
  const standaloneMatchMedia = window.matchMedia('(display-mode: standalone) or (display-mode: window-controls-overlay)');
@@ -117,109 +114,6 @@ if (window.matchMedia) {
117
114
  standalone = matches;
118
115
  });
119
116
  }
120
- const LANGUAGE_DEFAULT = 'en';
121
- let _locale = undefined;
122
- let _language = LANGUAGE_DEFAULT;
123
- let _userAgent = undefined;
124
- const globals = (typeof self === 'object' ? self : typeof global === 'object' ? global : {});
125
- let nodeProcess = undefined;
126
- if (typeof globals.vscode !== 'undefined' && typeof globals.vscode.process !== 'undefined') {
127
- nodeProcess = globals.vscode.process;
128
- }
129
- else if (typeof process !== 'undefined') {
130
- nodeProcess = process;
131
- }
132
- const isElectronProcess = typeof nodeProcess?.versions?.electron === 'string';
133
- const isElectronRenderer = isElectronProcess && nodeProcess?.type === 'renderer';
134
- if (typeof navigator === 'object' && !isElectronRenderer) {
135
- _userAgent = navigator.userAgent;
136
- _userAgent.indexOf('Windows') >= 0;
137
- _userAgent.indexOf('Macintosh') >= 0;
138
- (_userAgent.indexOf('Macintosh') >= 0 || _userAgent.indexOf('iPad') >= 0 || _userAgent.indexOf('iPhone') >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0;
139
- _userAgent.indexOf('Linux') >= 0;
140
- _userAgent?.indexOf('Mobi') >= 0;
141
- const configuredLocale = getConfiguredDefaultLocale(
142
- (
143
- (localize({ key: 'ensureLoaderPluginIsLoaded', comment: ['{Locked}'] }, '_'))));
144
- _locale = configuredLocale || LANGUAGE_DEFAULT;
145
- _language = _locale;
146
- }
147
- else if (typeof nodeProcess === 'object') {
148
- _locale = LANGUAGE_DEFAULT;
149
- _language = LANGUAGE_DEFAULT;
150
- const rawNlsConfig = nodeProcess.env['VSCODE_NLS_CONFIG'];
151
- if (rawNlsConfig) {
152
- try {
153
- const nlsConfig = JSON.parse(rawNlsConfig);
154
- const resolved = nlsConfig.availableLanguages['*'];
155
- _locale = nlsConfig.locale;
156
- _language = resolved ? resolved : LANGUAGE_DEFAULT;
157
- }
158
- catch (e) {
159
- }
160
- }
161
- }
162
- else {
163
- console.error('Unable to resolve platform.');
164
- }
165
- const userAgent = _userAgent;
166
- const language = _language;
167
- var Language;
168
- ( ((function(Language) {
169
- function value() {
170
- return language;
171
- }
172
- Language.value = value;
173
- function isDefaultVariant() {
174
- if (language.length === 2) {
175
- return language === 'en';
176
- }
177
- else if (language.length >= 3) {
178
- return language[0] === 'e' && language[1] === 'n' && language[2] === '-';
179
- }
180
- else {
181
- return false;
182
- }
183
- }
184
- Language.isDefaultVariant = isDefaultVariant;
185
- function isDefault() {
186
- return language === 'en';
187
- }
188
- Language.isDefault = isDefault;
189
- })(Language || (Language = {}))));
190
- const setTimeout0IsFaster = (typeof globals.postMessage === 'function' && !globals.importScripts);
191
- (() => {
192
- if (setTimeout0IsFaster) {
193
- const pending = [];
194
- globals.addEventListener('message', (e) => {
195
- if (e.data && e.data.vscodeScheduleAsyncWork) {
196
- for (let i = 0, len = pending.length; i < len; i++) {
197
- const candidate = pending[i];
198
- if (candidate.id === e.data.vscodeScheduleAsyncWork) {
199
- pending.splice(i, 1);
200
- candidate.callback();
201
- return;
202
- }
203
- }
204
- }
205
- });
206
- let lastId = 0;
207
- return (callback) => {
208
- const myId = ++lastId;
209
- pending.push({
210
- id: myId,
211
- callback: callback
212
- });
213
- globals.postMessage({ vscodeScheduleAsyncWork: myId }, '*');
214
- };
215
- }
216
- return (callback) => setTimeout(callback);
217
- })();
218
- const isChrome = !!(userAgent && userAgent.indexOf('Chrome') >= 0);
219
- !!(userAgent && userAgent.indexOf('Firefox') >= 0);
220
- !!(!isChrome && (userAgent && userAgent.indexOf('Safari') >= 0));
221
- !!(userAgent && userAgent.indexOf('Edg/') >= 0);
222
- !!(userAgent && userAgent.indexOf('Android') >= 0);
223
117
  class KeyCodeStrMap {
224
118
  constructor() {
225
119
  this._keyCodeToStr = [];
@@ -411,7 +305,7 @@ const ScanCodeUtils = {
411
305
  [5, 1, 0 , empty, 5 , 'Ctrl', 17, 'VK_CONTROL', empty, empty],
412
306
  [4, 1, 0 , empty, 4 , 'Shift', 16, 'VK_SHIFT', empty, empty],
413
307
  [6, 1, 0 , empty, 6 , 'Alt', 18, 'VK_MENU', empty, empty],
414
- [57, 1, 0 , empty, 57 , 'Meta', 0, 'VK_COMMAND', empty, empty],
308
+ [57, 1, 0 , empty, 57 , 'Meta', 91, 'VK_COMMAND', empty, empty],
415
309
  [5, 1, 157 , 'ControlLeft', 5 , empty, 0, 'VK_LCONTROL', empty, empty],
416
310
  [4, 1, 158 , 'ShiftLeft', 4 , empty, 0, 'VK_LSHIFT', empty, empty],
417
311
  [6, 1, 159 , 'AltLeft', 6 , empty, 0, 'VK_LMENU', empty, empty],
@@ -621,67 +515,6 @@ class KeybindingParser {
621
515
  return (chords.length > 0 ? (new Keybinding(chords)) : null);
622
516
  }
623
517
  }
624
- class KeybindingIO {
625
- static writeKeybindingItem(out, item) {
626
- if (!item.resolvedKeybinding) {
627
- return;
628
- }
629
- const quotedSerializedKeybinding = JSON.stringify(item.resolvedKeybinding.getUserSettingsLabel());
630
- out.write(`{ "key": ${rightPaddedString(quotedSerializedKeybinding + ',', 25)} "command": `);
631
- const quotedSerializedWhen = item.when ? JSON.stringify(item.when.serialize()) : '';
632
- const quotedSerializeCommand = JSON.stringify(item.command);
633
- if (quotedSerializedWhen.length > 0) {
634
- out.write(`${quotedSerializeCommand},`);
635
- out.writeLine();
636
- out.write(` "when": ${quotedSerializedWhen}`);
637
- }
638
- else {
639
- out.write(`${quotedSerializeCommand}`);
640
- }
641
- if (item.commandArgs) {
642
- out.write(',');
643
- out.writeLine();
644
- out.write(` "args": ${JSON.stringify(item.commandArgs)}`);
645
- }
646
- out.write(' }');
647
- }
648
- static readUserKeybindingItem(input) {
649
- const keybinding = (typeof input.key === 'string' ? KeybindingParser.parseKeybinding(input.key) : null);
650
- const when = (typeof input.when === 'string' ? ContextKeyExpr.deserialize(input.when) : undefined);
651
- const command = (typeof input.command === 'string' ? input.command : null);
652
- const commandArgs = (typeof input.args !== 'undefined' ? input.args : undefined);
653
- return {
654
- keybinding,
655
- command,
656
- commandArgs,
657
- when,
658
- _source: input
659
- };
660
- }
661
- }
662
- function rightPaddedString(str, minChars) {
663
- if (str.length < minChars) {
664
- return str + (( (new Array(minChars - str.length))).join(' '));
665
- }
666
- return str;
667
- }
668
- class OutputBuilder {
669
- constructor() {
670
- this._lines = [];
671
- this._currentLine = '';
672
- }
673
- write(str) {
674
- this._currentLine += str;
675
- }
676
- writeLine(str = '') {
677
- this._lines.push(this._currentLine + str);
678
- this._currentLine = '';
679
- }
680
- toString() {
681
- this.writeLine();
682
- return this._lines.join('\n');
683
- }
684
- }
685
518
  const apiMenus = [
686
519
  {
687
520
  key: 'commandPalette',
@@ -729,11 +562,29 @@ const apiMenus = [
729
562
  id: MenuId.ExplorerContext,
730
563
  description: ( (localize('menus.explorerContext', "The file explorer context menu")))
731
564
  },
565
+ {
566
+ key: 'explorer/context/share',
567
+ id: MenuId.ExplorerContextShare,
568
+ description: ( (localize(
569
+ 'menus.explorerContextShare',
570
+ "'Share' submenu in the file explorer context menu"
571
+ ))),
572
+ proposed: 'contribShareMenu'
573
+ },
732
574
  {
733
575
  key: 'editor/title/context',
734
576
  id: MenuId.EditorTitleContext,
735
577
  description: ( (localize('menus.editorTabContext', "The editor tabs context menu")))
736
578
  },
579
+ {
580
+ key: 'editor/title/context/share',
581
+ id: MenuId.EditorTitleContextShare,
582
+ description: ( (localize(
583
+ 'menus.editorTitleContextShare',
584
+ "'Share' submenu inside the editor title context menu"
585
+ ))),
586
+ proposed: 'contribShareMenu'
587
+ },
737
588
  {
738
589
  key: 'debug/callstack/context',
739
590
  id: MenuId.DebugCallStackContext,
@@ -991,6 +842,14 @@ const apiMenus = [
991
842
  description: ( (localize('merge.toolbar', "The prominent button in an editor, overlays its content"))),
992
843
  proposed: 'contribEditorContentMenu'
993
844
  },
845
+ {
846
+ key: 'editor/lineNumber/context',
847
+ id: MenuId.EditorLineNumberContext,
848
+ description: ( (localize(
849
+ 'editorLineNumberContext',
850
+ "The contributed editor line number context menu"
851
+ )))
852
+ },
994
853
  {
995
854
  key: 'mergeEditor/result/title',
996
855
  id: MenuId.MergeInputResultToolbar,
@@ -998,7 +857,7 @@ const apiMenus = [
998
857
  proposed: 'contribMergeEditorMenus'
999
858
  },
1000
859
  ];
1001
- var schema$1;
860
+ var schema;
1002
861
  ( ((function(schema) {
1003
862
  function isMenuItem(item) {
1004
863
  return typeof item.command === 'string';
@@ -1413,11 +1272,11 @@ var schema$1;
1413
1272
  }
1414
1273
  ]
1415
1274
  };
1416
- })(schema$1 || (schema$1 = {}))));
1275
+ })(schema || (schema = {}))));
1417
1276
  const _commandRegistrations = ( (new DisposableStore()));
1418
1277
  const commandsExtensionPoint = ( (ExtensionsRegistry.registerExtensionPoint({
1419
1278
  extensionPoint: 'commands',
1420
- jsonSchema: schema$1.commandsContribution,
1279
+ jsonSchema: schema.commandsContribution,
1421
1280
  activationEventsGenerator: (contribs, result) => {
1422
1281
  for (const contrib of contribs) {
1423
1282
  if (contrib.command) {
@@ -1428,7 +1287,7 @@ const commandsExtensionPoint = ( (ExtensionsRegistry.registerExtensionPoint({
1428
1287
  })));
1429
1288
  commandsExtensionPoint.setHandler(extensions => {
1430
1289
  function handleCommand(userFriendlyCommand, extension) {
1431
- if (!schema$1.isValidCommand(userFriendlyCommand, extension.collector)) {
1290
+ if (!schema.isValidCommand(userFriendlyCommand, extension.collector)) {
1432
1291
  return;
1433
1292
  }
1434
1293
  const { icon, enablement, category, title, shortTitle, command } = userFriendlyCommand;
@@ -1478,14 +1337,14 @@ commandsExtensionPoint.setHandler(extensions => {
1478
1337
  const _submenus = ( (new Map()));
1479
1338
  const submenusExtensionPoint = ( (ExtensionsRegistry.registerExtensionPoint({
1480
1339
  extensionPoint: 'submenus',
1481
- jsonSchema: schema$1.submenusContribution
1340
+ jsonSchema: schema.submenusContribution
1482
1341
  })));
1483
1342
  submenusExtensionPoint.setHandler(extensions => {
1484
1343
  _submenus.clear();
1485
1344
  for (const extension of extensions) {
1486
1345
  const { value, collector } = extension;
1487
1346
  for (const [, submenuInfo] of Object.entries(value)) {
1488
- if (!schema$1.isValidSubmenu(submenuInfo, collector)) {
1347
+ if (!schema.isValidSubmenu(submenuInfo, collector)) {
1489
1348
  continue;
1490
1349
  }
1491
1350
  if (!submenuInfo.id) {
@@ -1538,7 +1397,7 @@ const _menuRegistrations = ( (new DisposableStore()));
1538
1397
  const _submenuMenuItems = ( (new Map()));
1539
1398
  const menusExtensionPoint = ( (ExtensionsRegistry.registerExtensionPoint({
1540
1399
  extensionPoint: 'menus',
1541
- jsonSchema: schema$1.menusContribution,
1400
+ jsonSchema: schema.menusContribution,
1542
1401
  deps: [submenusExtensionPoint]
1543
1402
  })));
1544
1403
  menusExtensionPoint.setHandler(extensions => {
@@ -1547,7 +1406,7 @@ menusExtensionPoint.setHandler(extensions => {
1547
1406
  for (const extension of extensions) {
1548
1407
  const { value, collector } = extension;
1549
1408
  for (const entry of Object.entries(value)) {
1550
- if (!schema$1.isValidItems(entry[1], collector)) {
1409
+ if (!schema.isValidItems(entry[1], collector)) {
1551
1410
  continue;
1552
1411
  }
1553
1412
  let menu = _apiMenusByKey.get(entry[0]);
@@ -1576,7 +1435,7 @@ menusExtensionPoint.setHandler(extensions => {
1576
1435
  }
1577
1436
  for (const menuItem of entry[1]) {
1578
1437
  let item;
1579
- if (schema$1.isMenuItem(menuItem)) {
1438
+ if (schema.isMenuItem(menuItem)) {
1580
1439
  const command = MenuRegistry.getCommand(menuItem.command);
1581
1440
  const alt = menuItem.alt && MenuRegistry.getCommand(menuItem.alt) || undefined;
1582
1441
  if (!command) {
@@ -1652,44 +1511,74 @@ menusExtensionPoint.setHandler(extensions => {
1652
1511
  }
1653
1512
  }
1654
1513
  });
1655
- function getAllUnboundCommands(boundCommands) {
1656
- const unboundCommands = [];
1657
- const seenMap = ( (new Map()));
1658
- const addCommand = (id, includeCommandWithArgs) => {
1659
- if (seenMap.has(id)) {
1660
- return;
1661
- }
1662
- seenMap.set(id, true);
1663
- if (id[0] === '_' || id.indexOf('vscode.') === 0) {
1514
+ class KeybindingIO {
1515
+ static writeKeybindingItem(out, item) {
1516
+ if (!item.resolvedKeybinding) {
1664
1517
  return;
1665
1518
  }
1666
- if (boundCommands.get(id) === true) {
1667
- return;
1519
+ const quotedSerializedKeybinding = JSON.stringify(item.resolvedKeybinding.getUserSettingsLabel());
1520
+ out.write(`{ "key": ${rightPaddedString(quotedSerializedKeybinding + ',', 25)} "command": `);
1521
+ const quotedSerializedWhen = item.when ? JSON.stringify(item.when.serialize()) : '';
1522
+ const quotedSerializeCommand = JSON.stringify(item.command);
1523
+ if (quotedSerializedWhen.length > 0) {
1524
+ out.write(`${quotedSerializeCommand},`);
1525
+ out.writeLine();
1526
+ out.write(` "when": ${quotedSerializedWhen}`);
1668
1527
  }
1669
- if (!includeCommandWithArgs) {
1670
- const command = CommandsRegistry.getCommand(id);
1671
- if (command && typeof command.description === 'object'
1672
- && isNonEmptyArray(command.description.args)) {
1673
- return;
1674
- }
1528
+ else {
1529
+ out.write(`${quotedSerializeCommand}`);
1675
1530
  }
1676
- unboundCommands.push(id);
1677
- };
1678
- for (const menuItem of MenuRegistry.getMenuItems(MenuId.CommandPalette)) {
1679
- if (isIMenuItem(menuItem)) {
1680
- addCommand(menuItem.command.id, true);
1531
+ if (item.commandArgs) {
1532
+ out.write(',');
1533
+ out.writeLine();
1534
+ out.write(` "args": ${JSON.stringify(item.commandArgs)}`);
1681
1535
  }
1536
+ out.write(' }');
1682
1537
  }
1683
- for (const editorAction of EditorExtensionsRegistry.getEditorActions()) {
1684
- addCommand(editorAction.id, true);
1538
+ static readUserKeybindingItem(input) {
1539
+ const keybinding = 'key' in input && typeof input.key === 'string'
1540
+ ? KeybindingParser.parseKeybinding(input.key)
1541
+ : null;
1542
+ const when = 'when' in input && typeof input.when === 'string'
1543
+ ? ContextKeyExpr.deserialize(input.when)
1544
+ : undefined;
1545
+ const command = 'command' in input && typeof input.command === 'string'
1546
+ ? input.command
1547
+ : null;
1548
+ const commandArgs = 'args' in input && typeof input.args !== 'undefined'
1549
+ ? input.args
1550
+ : undefined;
1551
+ return {
1552
+ keybinding,
1553
+ command,
1554
+ commandArgs,
1555
+ when,
1556
+ _sourceKey: 'key' in input && typeof input.key === 'string' ? input.key : undefined,
1557
+ };
1685
1558
  }
1686
- for (const id of ( (CommandsRegistry.getCommands().keys()))) {
1687
- addCommand(id, false);
1559
+ }
1560
+ function rightPaddedString(str, minChars) {
1561
+ if (str.length < minChars) {
1562
+ return str + (( (new Array(minChars - str.length))).join(' '));
1688
1563
  }
1689
- return unboundCommands;
1564
+ return str;
1690
1565
  }
1691
- function isContributedKeyBindingsArray(thing) {
1692
- return Array.isArray(thing);
1566
+ class OutputBuilder {
1567
+ constructor() {
1568
+ this._lines = [];
1569
+ this._currentLine = '';
1570
+ }
1571
+ write(str) {
1572
+ this._currentLine += str;
1573
+ }
1574
+ writeLine(str = '') {
1575
+ this._lines.push(this._currentLine + str);
1576
+ this._currentLine = '';
1577
+ }
1578
+ toString() {
1579
+ this.writeLine();
1580
+ return this._lines.join('\n');
1581
+ }
1693
1582
  }
1694
1583
  function isValidContributedKeyBinding(keyBinding, rejects) {
1695
1584
  if (!keyBinding) {
@@ -1849,7 +1738,8 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
1849
1738
  this.keyboardLayoutService = keyboardLayoutService;
1850
1739
  this._contributions = [];
1851
1740
  this.isComposingGlobalContextKey = contextKeyService.createKey('isComposing', false);
1852
- this.updateSchema();
1741
+ this.kbsJsonSchema = ( (new KeybindingsJsonSchema()));
1742
+ this.updateKeybindingsJsonSchema();
1853
1743
  this._keyboardMapper = this.keyboardLayoutService.getKeyboardMapper();
1854
1744
  this.keyboardLayoutService.onDidChangeKeyboardLayout(() => {
1855
1745
  this._keyboardMapper = this.keyboardLayoutService.getKeyboardMapper();
@@ -1874,8 +1764,8 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
1874
1764
  KeybindingsRegistry.setExtensionKeybindings(keybindings);
1875
1765
  this.updateResolver();
1876
1766
  });
1877
- this.updateSchema();
1878
- this._register(extensionService.onDidRegisterExtensions(() => this.updateSchema()));
1767
+ this.updateKeybindingsJsonSchema();
1768
+ this._register(extensionService.onDidRegisterExtensions(() => this.updateKeybindingsJsonSchema()));
1879
1769
  this._register(addDisposableListener(window, EventType.KEY_DOWN, (e) => {
1880
1770
  this.isComposingGlobalContextKey.set(e.isComposing);
1881
1771
  const keyEvent = ( (new StandardKeyboardEvent(e)));
@@ -1914,12 +1804,12 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
1914
1804
  registerSchemaContribution(contribution) {
1915
1805
  this._contributions.push(contribution);
1916
1806
  if (contribution.onDidChange) {
1917
- this._register(contribution.onDidChange(() => this.updateSchema()));
1807
+ this._register(contribution.onDidChange(() => this.updateKeybindingsJsonSchema()));
1918
1808
  }
1919
- this.updateSchema();
1809
+ this.updateKeybindingsJsonSchema();
1920
1810
  }
1921
- updateSchema() {
1922
- updateSchema(flatten(( (this._contributions.map(x => x.getSchemaAdditions())))));
1811
+ updateKeybindingsJsonSchema() {
1812
+ this.kbsJsonSchema.updateSchema(this._contributions.flatMap(x => x.getSchemaAdditions()));
1923
1813
  }
1924
1814
  _printKeybinding(keybinding) {
1925
1815
  return UserSettingsLabelProvider.toLabel(OS, keybinding.chords, (chord) => {
@@ -1970,7 +1860,7 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
1970
1860
  if (!item.keybinding) {
1971
1861
  continue;
1972
1862
  }
1973
- const input = item._source.key;
1863
+ const input = item._sourceKey ?? 'Impossible: missing source key, but has keybinding';
1974
1864
  if (seenBindings.has(input)) {
1975
1865
  continue;
1976
1866
  }
@@ -2030,7 +1920,7 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
2030
1920
  )));
2031
1921
  }
2032
1922
  else {
2033
- if (this._assertBrowserConflicts(keybinding, item.command)) {
1923
+ if (this._assertBrowserConflicts(keybinding)) {
2034
1924
  continue;
2035
1925
  }
2036
1926
  const resolvedKeybindings = this._keyboardMapper.resolveKeybinding(keybinding);
@@ -2075,7 +1965,7 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
2075
1965
  }
2076
1966
  return result;
2077
1967
  }
2078
- _assertBrowserConflicts(keybinding, commandId) {
1968
+ _assertBrowserConflicts(keybinding) {
2079
1969
  if (BrowserFeatures.keyboard === 0 ) {
2080
1970
  return false;
2081
1971
  }
@@ -2131,7 +2021,7 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
2131
2021
  return (keybinding ? this._keyboardMapper.resolveKeybinding(keybinding) : []);
2132
2022
  }
2133
2023
  _handleKeybindingsExtensionPointUser(extensionId, isBuiltin, keybindings, collector, result) {
2134
- if (isContributedKeyBindingsArray(keybindings)) {
2024
+ if (Array.isArray(keybindings)) {
2135
2025
  for (let i = 0, len = keybindings.length; i < len; i++) {
2136
2026
  this._handleKeybinding(extensionId, isBuiltin, i + 1, keybindings[i], collector, result);
2137
2027
  }
@@ -2313,9 +2203,9 @@ class UserKeybindings extends Disposable {
2313
2203
  this.reloadConfigurationScheduler.schedule();
2314
2204
  }
2315
2205
  }));
2316
- this._register(userDataProfileService.onDidChangeCurrentProfile(e => e.join(this.whenCurrentProfieChanged(e))));
2206
+ this._register(userDataProfileService.onDidChangeCurrentProfile(e => e.join(this.whenCurrentProfileChanged(e))));
2317
2207
  }
2318
- async whenCurrentProfieChanged(e) {
2208
+ async whenCurrentProfileChanged(e) {
2319
2209
  if (e.preserveData) {
2320
2210
  if (await this.fileService.exists(e.previous.keybindingsResource)) {
2321
2211
  await this.fileService.copy(e.previous.keybindingsResource, e.profile.keybindingsResource);
@@ -2344,126 +2234,174 @@ class UserKeybindings extends Disposable {
2344
2234
  async readUserKeybindings() {
2345
2235
  try {
2346
2236
  const content = await this.fileService.readFile(this.userDataProfileService.currentProfile.keybindingsResource);
2347
- const value = parse(( (content.value.toString())));
2348
- return Array.isArray(value) ? value : [];
2237
+ const value = parse$1(( (content.value.toString())));
2238
+ return Array.isArray(value)
2239
+ ? value.filter(v => v && typeof v === 'object' )
2240
+ : [];
2349
2241
  }
2350
2242
  catch (e) {
2351
2243
  return [];
2352
2244
  }
2353
2245
  }
2354
2246
  }
2355
- const schemaId = 'vscode://schemas/keybindings';
2356
- const commandsSchemas = [];
2357
- const commandsEnum = [];
2358
- const commandsEnumDescriptions = [];
2359
- const schema = {
2360
- id: schemaId,
2361
- type: 'array',
2362
- title: ( (localize('keybindings.json.title', "Keybindings configuration"))),
2363
- allowTrailingCommas: true,
2364
- allowComments: true,
2365
- definitions: {
2366
- 'editorGroupsSchema': {
2367
- 'type': 'array',
2368
- 'items': {
2369
- 'type': 'object',
2370
- 'properties': {
2371
- 'groups': {
2372
- '$ref': '#/definitions/editorGroupsSchema',
2373
- 'default': [{}, {}]
2374
- },
2375
- 'size': {
2376
- 'type': 'number',
2377
- 'default': 0.5
2247
+ class KeybindingsJsonSchema {
2248
+ constructor() {
2249
+ this.commandsSchemas = [];
2250
+ this.commandsEnum = [];
2251
+ this.removalCommandsEnum = [];
2252
+ this.commandsEnumDescriptions = [];
2253
+ this.schema = {
2254
+ id: KeybindingsJsonSchema.schemaId,
2255
+ type: 'array',
2256
+ title: ( (localize('keybindings.json.title', "Keybindings configuration"))),
2257
+ allowTrailingCommas: true,
2258
+ allowComments: true,
2259
+ definitions: {
2260
+ 'editorGroupsSchema': {
2261
+ 'type': 'array',
2262
+ 'items': {
2263
+ 'type': 'object',
2264
+ 'properties': {
2265
+ 'groups': {
2266
+ '$ref': '#/definitions/editorGroupsSchema',
2267
+ 'default': [{}, {}]
2268
+ },
2269
+ 'size': {
2270
+ 'type': 'number',
2271
+ 'default': 0.5
2272
+ }
2273
+ }
2378
2274
  }
2275
+ },
2276
+ 'commandNames': {
2277
+ 'type': 'string',
2278
+ 'enum': this.commandsEnum,
2279
+ 'enumDescriptions': this.commandsEnumDescriptions,
2280
+ 'description': ( (localize('keybindings.json.command', "Name of the command to execute"))),
2281
+ },
2282
+ 'commandType': {
2283
+ 'anyOf': [
2284
+ {
2285
+ $ref: '#/definitions/commandNames'
2286
+ },
2287
+ {
2288
+ 'type': 'string',
2289
+ 'enum': this.removalCommandsEnum,
2290
+ 'enumDescriptions': this.commandsEnumDescriptions,
2291
+ 'description': ( (localize(
2292
+ 'keybindings.json.removalCommand',
2293
+ "Name of the command to remove keyboard shortcut for"
2294
+ ))),
2295
+ },
2296
+ {
2297
+ 'type': 'string'
2298
+ },
2299
+ ]
2300
+ },
2301
+ 'commandsSchemas': {
2302
+ 'allOf': this.commandsSchemas
2379
2303
  }
2380
- }
2381
- }
2382
- },
2383
- items: {
2384
- 'required': ['key'],
2385
- 'type': 'object',
2386
- 'defaultSnippets': [{ 'body': { 'key': '$1', 'command': '$2', 'when': '$3' } }],
2387
- 'properties': {
2388
- 'key': {
2389
- 'type': 'string',
2390
- 'description': ( (localize('keybindings.json.key', "Key or key sequence (separated by space)"))),
2391
2304
  },
2392
- 'command': {
2393
- 'anyOf': [
2394
- {
2305
+ items: {
2306
+ 'required': ['key'],
2307
+ 'type': 'object',
2308
+ 'defaultSnippets': [{ 'body': { 'key': '$1', 'command': '$2', 'when': '$3' } }],
2309
+ 'properties': {
2310
+ 'key': {
2395
2311
  'type': 'string',
2396
- 'enum': commandsEnum,
2397
- 'enumDescriptions': commandsEnumDescriptions,
2398
- 'description': ( (localize('keybindings.json.command', "Name of the command to execute"))),
2312
+ 'description': ( (localize('keybindings.json.key', "Key or key sequence (separated by space)"))),
2399
2313
  },
2400
- {
2401
- 'type': 'string'
2314
+ 'command': {
2315
+ 'anyOf': [
2316
+ {
2317
+ 'if': {
2318
+ 'type': 'array'
2319
+ },
2320
+ 'then': {
2321
+ 'not': {
2322
+ 'type': 'array'
2323
+ },
2324
+ 'errorMessage': ( (localize(
2325
+ 'keybindings.commandsIsArray',
2326
+ "Incorrect type. Expected \"{0}\". The field 'command' does not support running multiple commands. Use command 'runCommands' to pass it multiple commands to run.",
2327
+ 'string'
2328
+ )))
2329
+ },
2330
+ 'else': {
2331
+ '$ref': '#/definitions/commandType'
2332
+ }
2333
+ },
2334
+ {
2335
+ '$ref': '#/definitions/commandType'
2336
+ }
2337
+ ]
2338
+ },
2339
+ 'when': {
2340
+ 'type': 'string',
2341
+ 'description': ( (localize('keybindings.json.when', "Condition when the key is active.")))
2342
+ },
2343
+ 'args': {
2344
+ 'description': ( (localize('keybindings.json.args', "Arguments to pass to the command to execute.")))
2402
2345
  }
2403
- ]
2404
- },
2405
- 'when': {
2406
- 'type': 'string',
2407
- 'description': ( (localize('keybindings.json.when', "Condition when the key is active.")))
2408
- },
2409
- 'args': {
2410
- 'description': ( (localize('keybindings.json.args', "Arguments to pass to the command to execute.")))
2411
- }
2412
- },
2413
- 'allOf': commandsSchemas
2414
- }
2415
- };
2416
- const schemaRegistry = ( (Registry.as(Extensions.JSONContribution)));
2417
- schemaRegistry.registerSchema(schemaId, schema);
2418
- function updateSchema(additionalContributions) {
2419
- commandsSchemas.length = 0;
2420
- commandsEnum.length = 0;
2421
- commandsEnumDescriptions.length = 0;
2422
- const knownCommands = ( (new Set()));
2423
- const addKnownCommand = (commandId, description) => {
2424
- if (!/^_/.test(commandId)) {
2425
- if (!knownCommands.has(commandId)) {
2426
- knownCommands.add(commandId);
2427
- commandsEnum.push(commandId);
2428
- commandsEnumDescriptions.push(description);
2429
- commandsEnum.push(`-${commandId}`);
2430
- commandsEnumDescriptions.push(description);
2346
+ },
2347
+ '$ref': '#/definitions/commandsSchemas'
2431
2348
  }
2432
- }
2433
- };
2434
- const allCommands = CommandsRegistry.getCommands();
2435
- for (const [commandId, command] of allCommands) {
2436
- const commandDescription = command.description;
2437
- addKnownCommand(commandId, commandDescription ? commandDescription.description : undefined);
2438
- if (!commandDescription || !commandDescription.args || commandDescription.args.length !== 1 || !commandDescription.args[0].schema) {
2439
- continue;
2440
- }
2441
- const argsSchema = commandDescription.args[0].schema;
2442
- const argsRequired = ((typeof commandDescription.args[0].isOptional !== 'undefined')
2443
- ? (!commandDescription.args[0].isOptional)
2444
- : (Array.isArray(argsSchema.required) && argsSchema.required.length > 0));
2445
- const addition = {
2446
- 'if': {
2447
- 'properties': {
2448
- 'command': { 'const': commandId }
2449
- }
2450
- },
2451
- 'then': {
2452
- 'required': [].concat(argsRequired ? ['args'] : []),
2453
- 'properties': {
2454
- 'args': argsSchema
2349
+ };
2350
+ this.schemaRegistry = ( (Registry.as(Extensions$2.JSONContribution)));
2351
+ this.schemaRegistry.registerSchema(KeybindingsJsonSchema.schemaId, this.schema);
2352
+ }
2353
+ updateSchema(additionalContributions) {
2354
+ this.commandsSchemas.length = 0;
2355
+ this.commandsEnum.length = 0;
2356
+ this.removalCommandsEnum.length = 0;
2357
+ this.commandsEnumDescriptions.length = 0;
2358
+ const knownCommands = ( (new Set()));
2359
+ const addKnownCommand = (commandId, description) => {
2360
+ if (!/^_/.test(commandId)) {
2361
+ if (!knownCommands.has(commandId)) {
2362
+ knownCommands.add(commandId);
2363
+ this.commandsEnum.push(commandId);
2364
+ this.commandsEnumDescriptions.push(description);
2365
+ this.removalCommandsEnum.push(`-${commandId}`);
2455
2366
  }
2456
2367
  }
2457
2368
  };
2458
- commandsSchemas.push(addition);
2459
- }
2460
- const menuCommands = MenuRegistry.getCommands();
2461
- for (const commandId of ( (menuCommands.keys()))) {
2462
- addKnownCommand(commandId);
2369
+ const allCommands = CommandsRegistry.getCommands();
2370
+ for (const [commandId, command] of allCommands) {
2371
+ const commandDescription = command.description;
2372
+ addKnownCommand(commandId, commandDescription ? commandDescription.description : undefined);
2373
+ if (!commandDescription || !commandDescription.args || commandDescription.args.length !== 1 || !commandDescription.args[0].schema) {
2374
+ continue;
2375
+ }
2376
+ const argsSchema = commandDescription.args[0].schema;
2377
+ const argsRequired = ((typeof commandDescription.args[0].isOptional !== 'undefined')
2378
+ ? (!commandDescription.args[0].isOptional)
2379
+ : (Array.isArray(argsSchema.required) && argsSchema.required.length > 0));
2380
+ const addition = {
2381
+ 'if': {
2382
+ 'required': ['command'],
2383
+ 'properties': {
2384
+ 'command': { 'const': commandId }
2385
+ }
2386
+ },
2387
+ 'then': {
2388
+ 'required': [].concat(argsRequired ? ['args'] : []),
2389
+ 'properties': {
2390
+ 'args': argsSchema
2391
+ }
2392
+ }
2393
+ };
2394
+ this.commandsSchemas.push(addition);
2395
+ }
2396
+ const menuCommands = MenuRegistry.getCommands();
2397
+ for (const commandId of ( (menuCommands.keys()))) {
2398
+ addKnownCommand(commandId);
2399
+ }
2400
+ this.commandsSchemas.push(...additionalContributions);
2401
+ this.schemaRegistry.notifySchemaChanged(KeybindingsJsonSchema.schemaId);
2463
2402
  }
2464
- commandsSchemas.push(...additionalContributions);
2465
- schemaRegistry.notifySchemaChanged(schemaId);
2466
2403
  }
2404
+ KeybindingsJsonSchema.schemaId = 'vscode://schemas/keybindings';
2467
2405
  let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends AbstractEditorCommandsQuickAccessProvider {
2468
2406
  get activeTextEditorControl() { return this.editorService.activeTextEditorControl; }
2469
2407
  get defaultFilterValue() {
@@ -2705,7 +2643,7 @@ function readKeyboardConfig(configurationService) {
2705
2643
  const mapAltGrToCtrlAlt = Boolean(keyboard?.mapAltGrToCtrlAlt);
2706
2644
  return { dispatch, mapAltGrToCtrlAlt };
2707
2645
  }
2708
- const configurationRegistry$1 = ( (Registry.as(Extensions$1.Configuration)));
2646
+ const configurationRegistry$2 = ( (Registry.as(Extensions.Configuration)));
2709
2647
  const keyboardConfiguration$1 = {
2710
2648
  'id': 'keyboard',
2711
2649
  'order': 15,
@@ -2735,7 +2673,7 @@ const keyboardConfiguration$1 = {
2735
2673
  }
2736
2674
  }
2737
2675
  };
2738
- configurationRegistry$1.registerConfiguration(keyboardConfiguration$1);
2676
+ configurationRegistry$2.registerConfiguration(keyboardConfiguration$1);
2739
2677
  class CachedKeyboardMapper {
2740
2678
  constructor(actual) {
2741
2679
  this._actual = actual;
@@ -4345,7 +4283,7 @@ class UserKeyboardLayout extends Disposable {
4345
4283
  const existing = this._keyboardLayout;
4346
4284
  try {
4347
4285
  const content = await this.fileService.readFile(this.keyboardLayoutResource);
4348
- const value = parse(( (content.value.toString())));
4286
+ const value = parse$1(( (content.value.toString())));
4349
4287
  if (getNodeType(value) === 'object') {
4350
4288
  const layoutInfo = value.layout;
4351
4289
  const mappings = value.rawMapping;
@@ -4453,7 +4391,7 @@ BrowserKeyboardLayoutService = ( (__decorate([
4453
4391
  ( (__param(4, ICommandService))),
4454
4392
  ( (__param(5, IConfigurationService)))
4455
4393
  ], BrowserKeyboardLayoutService)));
4456
- const configurationRegistry = ( (Registry.as(Extensions$1.Configuration)));
4394
+ const configurationRegistry$1 = ( (Registry.as(Extensions.Configuration)));
4457
4395
  const keyboardConfiguration = {
4458
4396
  'id': 'keyboard',
4459
4397
  'order': 15,
@@ -4467,7 +4405,7 @@ const keyboardConfiguration = {
4467
4405
  }
4468
4406
  }
4469
4407
  };
4470
- configurationRegistry.registerConfiguration(keyboardConfiguration);
4408
+ configurationRegistry$1.registerConfiguration(keyboardConfiguration);
4471
4409
  let DelegateStandaloneKeybindingService = class DelegateStandaloneKeybindingService extends createInjectedClass(StandaloneKeybindingService) {
4472
4410
  constructor(instantiationService) {
4473
4411
  super(instantiationService);
@@ -4489,10 +4427,10 @@ let DelegateStandaloneKeybindingService = class DelegateStandaloneKeybindingServ
4489
4427
  return this._cachedOverridenResolver;
4490
4428
  }
4491
4429
  };
4492
- DelegateStandaloneKeybindingService = ( __decorate([
4430
+ DelegateStandaloneKeybindingService = __decorate([
4493
4431
  ( __param(0, IInstantiationService))
4494
- ], DelegateStandaloneKeybindingService));
4495
- const quickAccessRegistry = ( Registry.as(Extensions$2.Quickaccess));
4432
+ ], DelegateStandaloneKeybindingService);
4433
+ const quickAccessRegistry = ( Registry.as(Extensions$1.Quickaccess));
4496
4434
  const provider = quickAccessRegistry.getQuickAccessProviders().find(provider => provider.ctor === StandaloneCommandsQuickAccessProvider);
4497
4435
  if (provider != null) {
4498
4436
  provider.ctor = class extends CommandsQuickAccessProvider {
@@ -4505,7 +4443,8 @@ if (provider != null) {
4505
4443
  }
4506
4444
  };
4507
4445
  }
4508
- configurationRegistry$2.registerConfiguration({
4446
+ const configurationRegistry = ( Registry.as(Extensions.Configuration));
4447
+ configurationRegistry.registerConfiguration({
4509
4448
  properties: {
4510
4449
  'workbench.commandPalette.history': {
4511
4450
  type: 'number',
@@ -4541,9 +4480,8 @@ async function updateUserKeybindings(keybindingsJson) {
4541
4480
  function getServiceOverride() {
4542
4481
  return {
4543
4482
  ...getServiceOverride$1(),
4544
- ...getServiceOverride$2(),
4545
4483
  [( IKeybindingService.toString())]: new SyncDescriptor(DelegateStandaloneKeybindingService),
4546
- [( IKeyboardLayoutService.toString())]: new SyncDescriptor(BrowserKeyboardLayoutService)
4484
+ [( IKeyboardLayoutService.toString())]: new SyncDescriptor(BrowserKeyboardLayoutService, undefined, true)
4547
4485
  };
4548
4486
  }
4549
4487
  export { getServiceOverride as default, updateUserKeybindings };