@theia/monaco 1.77.0-next.95 → 1.77.0

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 (342) hide show
  1. package/lib/browser/content-hover-widget-patcher.js +6 -9
  2. package/lib/browser/content-hover-widget-patcher.js.map +1 -1
  3. package/lib/browser/default-content-hover-widget-patcher.d.ts +1 -1
  4. package/lib/browser/default-content-hover-widget-patcher.d.ts.map +1 -1
  5. package/lib/browser/default-content-hover-widget-patcher.js +7 -10
  6. package/lib/browser/default-content-hover-widget-patcher.js.map +1 -1
  7. package/lib/browser/index.d.ts +2 -2
  8. package/lib/browser/index.d.ts.map +1 -1
  9. package/lib/browser/index.js +2 -5
  10. package/lib/browser/index.js.map +1 -1
  11. package/lib/browser/markdown-renderer/monaco-markdown-renderer.d.ts +4 -4
  12. package/lib/browser/markdown-renderer/monaco-markdown-renderer.d.ts.map +1 -1
  13. package/lib/browser/markdown-renderer/monaco-markdown-renderer.js +29 -37
  14. package/lib/browser/markdown-renderer/monaco-markdown-renderer.js.map +1 -1
  15. package/lib/browser/monaco-bulk-edit-service.d.ts +4 -4
  16. package/lib/browser/monaco-bulk-edit-service.d.ts.map +1 -1
  17. package/lib/browser/monaco-bulk-edit-service.js +10 -14
  18. package/lib/browser/monaco-bulk-edit-service.js.map +1 -1
  19. package/lib/browser/monaco-code-action-save-participant.d.ts +3 -3
  20. package/lib/browser/monaco-code-action-save-participant.d.ts.map +1 -1
  21. package/lib/browser/monaco-code-action-save-participant.js +12 -16
  22. package/lib/browser/monaco-code-action-save-participant.js.map +1 -1
  23. package/lib/browser/monaco-code-action-service.d.ts +2 -2
  24. package/lib/browser/monaco-code-action-service.d.ts.map +1 -1
  25. package/lib/browser/monaco-code-action-service.js +25 -29
  26. package/lib/browser/monaco-code-action-service.js.map +1 -1
  27. package/lib/browser/monaco-color-registry.d.ts +4 -4
  28. package/lib/browser/monaco-color-registry.d.ts.map +1 -1
  29. package/lib/browser/monaco-color-registry.js +23 -26
  30. package/lib/browser/monaco-color-registry.js.map +1 -1
  31. package/lib/browser/monaco-command-registry.d.ts +2 -2
  32. package/lib/browser/monaco-command-registry.d.ts.map +1 -1
  33. package/lib/browser/monaco-command-registry.js +15 -21
  34. package/lib/browser/monaco-command-registry.js.map +1 -1
  35. package/lib/browser/monaco-command-service.d.ts +2 -2
  36. package/lib/browser/monaco-command-service.d.ts.map +1 -1
  37. package/lib/browser/monaco-command-service.js +17 -24
  38. package/lib/browser/monaco-command-service.js.map +1 -1
  39. package/lib/browser/monaco-command.d.ts +3 -3
  40. package/lib/browser/monaco-command.d.ts.map +1 -1
  41. package/lib/browser/monaco-command.js +62 -71
  42. package/lib/browser/monaco-command.js.map +1 -1
  43. package/lib/browser/monaco-context-key-service.d.ts +2 -2
  44. package/lib/browser/monaco-context-key-service.d.ts.map +1 -1
  45. package/lib/browser/monaco-context-key-service.js +17 -23
  46. package/lib/browser/monaco-context-key-service.js.map +1 -1
  47. package/lib/browser/monaco-context-menu.d.ts +5 -5
  48. package/lib/browser/monaco-context-menu.d.ts.map +1 -1
  49. package/lib/browser/monaco-context-menu.js +26 -30
  50. package/lib/browser/monaco-context-menu.js.map +1 -1
  51. package/lib/browser/monaco-diff-computer.js +10 -13
  52. package/lib/browser/monaco-diff-computer.js.map +1 -1
  53. package/lib/browser/monaco-diff-editor.d.ts +7 -7
  54. package/lib/browser/monaco-diff-editor.d.ts.map +1 -1
  55. package/lib/browser/monaco-diff-editor.js +14 -19
  56. package/lib/browser/monaco-diff-editor.js.map +1 -1
  57. package/lib/browser/monaco-diff-navigator-factory.d.ts +1 -1
  58. package/lib/browser/monaco-diff-navigator-factory.d.ts.map +1 -1
  59. package/lib/browser/monaco-diff-navigator-factory.js +5 -8
  60. package/lib/browser/monaco-diff-navigator-factory.js.map +1 -1
  61. package/lib/browser/monaco-editor-content-menu.d.ts +2 -2
  62. package/lib/browser/monaco-editor-content-menu.d.ts.map +1 -1
  63. package/lib/browser/monaco-editor-content-menu.js +36 -43
  64. package/lib/browser/monaco-editor-content-menu.js.map +1 -1
  65. package/lib/browser/monaco-editor-model.d.ts +4 -4
  66. package/lib/browser/monaco-editor-model.d.ts.map +1 -1
  67. package/lib/browser/monaco-editor-model.js +52 -52
  68. package/lib/browser/monaco-editor-model.js.map +1 -1
  69. package/lib/browser/monaco-editor-model.spec.d.ts +2 -0
  70. package/lib/browser/monaco-editor-model.spec.d.ts.map +1 -0
  71. package/lib/browser/monaco-editor-model.spec.js +129 -0
  72. package/lib/browser/monaco-editor-model.spec.js.map +1 -0
  73. package/lib/browser/monaco-editor-overlay-button.d.ts +1 -1
  74. package/lib/browser/monaco-editor-overlay-button.d.ts.map +1 -1
  75. package/lib/browser/monaco-editor-overlay-button.js +11 -16
  76. package/lib/browser/monaco-editor-overlay-button.js.map +1 -1
  77. package/lib/browser/monaco-editor-peek-view-widget.d.ts +2 -2
  78. package/lib/browser/monaco-editor-peek-view-widget.d.ts.map +1 -1
  79. package/lib/browser/monaco-editor-peek-view-widget.js +17 -25
  80. package/lib/browser/monaco-editor-peek-view-widget.js.map +1 -1
  81. package/lib/browser/monaco-editor-provider.d.ts +10 -10
  82. package/lib/browser/monaco-editor-provider.d.ts.map +1 -1
  83. package/lib/browser/monaco-editor-provider.js +92 -108
  84. package/lib/browser/monaco-editor-provider.js.map +1 -1
  85. package/lib/browser/monaco-editor-service.d.ts +6 -6
  86. package/lib/browser/monaco-editor-service.d.ts.map +1 -1
  87. package/lib/browser/monaco-editor-service.js +47 -59
  88. package/lib/browser/monaco-editor-service.js.map +1 -1
  89. package/lib/browser/monaco-editor-zone-widget.js +10 -15
  90. package/lib/browser/monaco-editor-zone-widget.js.map +1 -1
  91. package/lib/browser/monaco-editor.d.ts +7 -7
  92. package/lib/browser/monaco-editor.d.ts.map +1 -1
  93. package/lib/browser/monaco-editor.js +78 -88
  94. package/lib/browser/monaco-editor.js.map +1 -1
  95. package/lib/browser/monaco-editor.spec.js +65 -68
  96. package/lib/browser/monaco-editor.spec.js.map +1 -1
  97. package/lib/browser/monaco-formatter-service.d.ts +5 -7
  98. package/lib/browser/monaco-formatter-service.d.ts.map +1 -1
  99. package/lib/browser/monaco-formatter-service.js +33 -55
  100. package/lib/browser/monaco-formatter-service.js.map +1 -1
  101. package/lib/browser/monaco-formatting-conflicts.d.ts +2 -2
  102. package/lib/browser/monaco-formatting-conflicts.d.ts.map +1 -1
  103. package/lib/browser/monaco-formatting-conflicts.js +19 -25
  104. package/lib/browser/monaco-formatting-conflicts.js.map +1 -1
  105. package/lib/browser/monaco-frontend-application-contribution.d.ts +4 -4
  106. package/lib/browser/monaco-frontend-application-contribution.d.ts.map +1 -1
  107. package/lib/browser/monaco-frontend-application-contribution.js +43 -56
  108. package/lib/browser/monaco-frontend-application-contribution.js.map +1 -1
  109. package/lib/browser/monaco-frontend-module.d.ts.map +1 -1
  110. package/lib/browser/monaco-frontend-module.js +177 -198
  111. package/lib/browser/monaco-frontend-module.js.map +1 -1
  112. package/lib/browser/monaco-gotoline-quick-access.d.ts +2 -2
  113. package/lib/browser/monaco-gotoline-quick-access.d.ts.map +1 -1
  114. package/lib/browser/monaco-gotoline-quick-access.js +16 -20
  115. package/lib/browser/monaco-gotoline-quick-access.js.map +1 -1
  116. package/lib/browser/monaco-gotosymbol-quick-access.d.ts +5 -5
  117. package/lib/browser/monaco-gotosymbol-quick-access.d.ts.map +1 -1
  118. package/lib/browser/monaco-gotosymbol-quick-access.js +18 -22
  119. package/lib/browser/monaco-gotosymbol-quick-access.js.map +1 -1
  120. package/lib/browser/monaco-icon-registry.d.ts +1 -1
  121. package/lib/browser/monaco-icon-registry.d.ts.map +1 -1
  122. package/lib/browser/monaco-icon-registry.js +7 -10
  123. package/lib/browser/monaco-icon-registry.js.map +1 -1
  124. package/lib/browser/monaco-indexed-db.d.ts +1 -1
  125. package/lib/browser/monaco-indexed-db.d.ts.map +1 -1
  126. package/lib/browser/monaco-indexed-db.js +28 -35
  127. package/lib/browser/monaco-indexed-db.js.map +1 -1
  128. package/lib/browser/monaco-init.d.ts +1 -1
  129. package/lib/browser/monaco-init.d.ts.map +1 -1
  130. package/lib/browser/monaco-init.js +75 -95
  131. package/lib/browser/monaco-init.js.map +1 -1
  132. package/lib/browser/monaco-init.spec.js +18 -20
  133. package/lib/browser/monaco-init.spec.js.map +1 -1
  134. package/lib/browser/monaco-keybinding.d.ts +2 -2
  135. package/lib/browser/monaco-keybinding.d.ts.map +1 -1
  136. package/lib/browser/monaco-keybinding.js +42 -53
  137. package/lib/browser/monaco-keybinding.js.map +1 -1
  138. package/lib/browser/monaco-keybinding.spec.js +50 -50
  139. package/lib/browser/monaco-keybinding.spec.js.map +1 -1
  140. package/lib/browser/monaco-keycode-map.d.ts +1 -1
  141. package/lib/browser/monaco-keycode-map.d.ts.map +1 -1
  142. package/lib/browser/monaco-keycode-map.js +122 -126
  143. package/lib/browser/monaco-keycode-map.js.map +1 -1
  144. package/lib/browser/monaco-languages.d.ts +2 -2
  145. package/lib/browser/monaco-languages.d.ts.map +1 -1
  146. package/lib/browser/monaco-languages.js +33 -41
  147. package/lib/browser/monaco-languages.js.map +1 -1
  148. package/lib/browser/monaco-marker-collection.d.ts +1 -1
  149. package/lib/browser/monaco-marker-collection.d.ts.map +1 -1
  150. package/lib/browser/monaco-marker-collection.js +2 -7
  151. package/lib/browser/monaco-marker-collection.js.map +1 -1
  152. package/lib/browser/monaco-menu.d.ts +2 -2
  153. package/lib/browser/monaco-menu.d.ts.map +1 -1
  154. package/lib/browser/monaco-menu.js +44 -48
  155. package/lib/browser/monaco-menu.js.map +1 -1
  156. package/lib/browser/monaco-mime-service.js +16 -20
  157. package/lib/browser/monaco-mime-service.js.map +1 -1
  158. package/lib/browser/monaco-nls.d.ts +1 -1
  159. package/lib/browser/monaco-nls.d.ts.map +1 -1
  160. package/lib/browser/monaco-nls.js +9 -16
  161. package/lib/browser/monaco-nls.js.map +1 -1
  162. package/lib/browser/monaco-outline-contribution.d.ts +2 -2
  163. package/lib/browser/monaco-outline-contribution.d.ts.map +1 -1
  164. package/lib/browser/monaco-outline-contribution.js +31 -36
  165. package/lib/browser/monaco-outline-contribution.js.map +1 -1
  166. package/lib/browser/monaco-outline-decorator.d.ts +1 -1
  167. package/lib/browser/monaco-outline-decorator.d.ts.map +1 -1
  168. package/lib/browser/monaco-outline-decorator.js +11 -14
  169. package/lib/browser/monaco-outline-decorator.js.map +1 -1
  170. package/lib/browser/monaco-outline-decorator.spec.js +15 -18
  171. package/lib/browser/monaco-outline-decorator.spec.js.map +1 -1
  172. package/lib/browser/monaco-quick-access-registry.js +17 -21
  173. package/lib/browser/monaco-quick-access-registry.js.map +1 -1
  174. package/lib/browser/monaco-quick-input-service.d.ts +9 -9
  175. package/lib/browser/monaco-quick-input-service.d.ts.map +1 -1
  176. package/lib/browser/monaco-quick-input-service.js +67 -78
  177. package/lib/browser/monaco-quick-input-service.js.map +1 -1
  178. package/lib/browser/monaco-quick-input-service.spec.js +9 -11
  179. package/lib/browser/monaco-quick-input-service.spec.js.map +1 -1
  180. package/lib/browser/monaco-resolved-keybinding.d.ts +1 -1
  181. package/lib/browser/monaco-resolved-keybinding.d.ts.map +1 -1
  182. package/lib/browser/monaco-resolved-keybinding.js +32 -37
  183. package/lib/browser/monaco-resolved-keybinding.js.map +1 -1
  184. package/lib/browser/monaco-snippet-suggest-provider.js +31 -37
  185. package/lib/browser/monaco-snippet-suggest-provider.js.map +1 -1
  186. package/lib/browser/monaco-standalone-theme-service.d.ts +2 -2
  187. package/lib/browser/monaco-standalone-theme-service.d.ts.map +1 -1
  188. package/lib/browser/monaco-standalone-theme-service.js +2 -6
  189. package/lib/browser/monaco-standalone-theme-service.js.map +1 -1
  190. package/lib/browser/monaco-status-bar-contribution.js +26 -29
  191. package/lib/browser/monaco-status-bar-contribution.js.map +1 -1
  192. package/lib/browser/monaco-text-model-service.d.ts +6 -6
  193. package/lib/browser/monaco-text-model-service.d.ts.map +1 -1
  194. package/lib/browser/monaco-text-model-service.js +44 -58
  195. package/lib/browser/monaco-text-model-service.js.map +1 -1
  196. package/lib/browser/monaco-theming-service.d.ts +2 -2
  197. package/lib/browser/monaco-theming-service.d.ts.map +1 -1
  198. package/lib/browser/monaco-theming-service.js +30 -37
  199. package/lib/browser/monaco-theming-service.js.map +1 -1
  200. package/lib/browser/monaco-to-protocol-converter.js +8 -11
  201. package/lib/browser/monaco-to-protocol-converter.js.map +1 -1
  202. package/lib/browser/monaco-undo-redo-handler.d.ts +2 -2
  203. package/lib/browser/monaco-undo-redo-handler.d.ts.map +1 -1
  204. package/lib/browser/monaco-undo-redo-handler.js +15 -18
  205. package/lib/browser/monaco-undo-redo-handler.js.map +1 -1
  206. package/lib/browser/monaco-utilities.d.ts +1 -1
  207. package/lib/browser/monaco-utilities.d.ts.map +1 -1
  208. package/lib/browser/monaco-utilities.js +1 -4
  209. package/lib/browser/monaco-utilities.js.map +1 -1
  210. package/lib/browser/monaco-workspace-context-service.d.ts +7 -7
  211. package/lib/browser/monaco-workspace-context-service.d.ts.map +1 -1
  212. package/lib/browser/monaco-workspace-context-service.js +12 -15
  213. package/lib/browser/monaco-workspace-context-service.js.map +1 -1
  214. package/lib/browser/monaco-workspace.d.ts +5 -5
  215. package/lib/browser/monaco-workspace.d.ts.map +1 -1
  216. package/lib/browser/monaco-workspace.js +78 -92
  217. package/lib/browser/monaco-workspace.js.map +1 -1
  218. package/lib/browser/protocol-to-monaco-converter.js +6 -9
  219. package/lib/browser/protocol-to-monaco-converter.js.map +1 -1
  220. package/lib/browser/simple-monaco-editor.d.ts +4 -4
  221. package/lib/browser/simple-monaco-editor.d.ts.map +1 -1
  222. package/lib/browser/simple-monaco-editor.js +25 -30
  223. package/lib/browser/simple-monaco-editor.js.map +1 -1
  224. package/lib/browser/textmate/index.d.ts +4 -4
  225. package/lib/browser/textmate/index.d.ts.map +1 -1
  226. package/lib/browser/textmate/index.js +4 -7
  227. package/lib/browser/textmate/index.js.map +1 -1
  228. package/lib/browser/textmate/monaco-textmate-frontend-bindings.d.ts +2 -2
  229. package/lib/browser/textmate/monaco-textmate-frontend-bindings.d.ts.map +1 -1
  230. package/lib/browser/textmate/monaco-textmate-frontend-bindings.js +33 -37
  231. package/lib/browser/textmate/monaco-textmate-frontend-bindings.js.map +1 -1
  232. package/lib/browser/textmate/monaco-textmate-service.d.ts +5 -5
  233. package/lib/browser/textmate/monaco-textmate-service.d.ts.map +1 -1
  234. package/lib/browser/textmate/monaco-textmate-service.js +52 -63
  235. package/lib/browser/textmate/monaco-textmate-service.js.map +1 -1
  236. package/lib/browser/textmate/monaco-theme-registry.d.ts +2 -2
  237. package/lib/browser/textmate/monaco-theme-registry.d.ts.map +1 -1
  238. package/lib/browser/textmate/monaco-theme-registry.js +40 -35
  239. package/lib/browser/textmate/monaco-theme-registry.js.map +1 -1
  240. package/lib/browser/textmate/monaco-theme-types.d.ts +1 -1
  241. package/lib/browser/textmate/monaco-theme-types.d.ts.map +1 -1
  242. package/lib/browser/textmate/monaco-theme-types.js +4 -7
  243. package/lib/browser/textmate/monaco-theme-types.js.map +1 -1
  244. package/lib/browser/textmate/monaco-theme-types.spec.js +12 -14
  245. package/lib/browser/textmate/monaco-theme-types.spec.js.map +1 -1
  246. package/lib/browser/textmate/textmate-contribution.d.ts +1 -1
  247. package/lib/browser/textmate/textmate-contribution.d.ts.map +1 -1
  248. package/lib/browser/textmate/textmate-contribution.js +3 -8
  249. package/lib/browser/textmate/textmate-contribution.js.map +1 -1
  250. package/lib/browser/textmate/textmate-registry.d.ts +1 -1
  251. package/lib/browser/textmate/textmate-registry.d.ts.map +1 -1
  252. package/lib/browser/textmate/textmate-registry.js +13 -17
  253. package/lib/browser/textmate/textmate-registry.js.map +1 -1
  254. package/lib/browser/textmate/textmate-snippet-completion-provider.js +4 -9
  255. package/lib/browser/textmate/textmate-snippet-completion-provider.js.map +1 -1
  256. package/lib/browser/textmate/textmate-tokenizer.d.ts +1 -1
  257. package/lib/browser/textmate/textmate-tokenizer.d.ts.map +1 -1
  258. package/lib/browser/textmate/textmate-tokenizer.js +5 -9
  259. package/lib/browser/textmate/textmate-tokenizer.js.map +1 -1
  260. package/lib/browser/textmate/textmate-tokenizer.spec.js +10 -12
  261. package/lib/browser/textmate/textmate-tokenizer.spec.js.map +1 -1
  262. package/lib/browser/workspace-symbol-command.d.ts +1 -1
  263. package/lib/browser/workspace-symbol-command.d.ts.map +1 -1
  264. package/lib/browser/workspace-symbol-command.js +35 -44
  265. package/lib/browser/workspace-symbol-command.js.map +1 -1
  266. package/lib/package.spec.d.ts +1 -0
  267. package/lib/package.spec.js +1 -1
  268. package/lib/package.spec.js.map +1 -1
  269. package/package.json +19 -9
  270. package/src/browser/content-hover-widget-patcher.ts +2 -2
  271. package/src/browser/default-content-hover-widget-patcher.ts +2 -2
  272. package/src/browser/index.ts +2 -2
  273. package/src/browser/markdown-renderer/monaco-markdown-renderer.ts +5 -5
  274. package/src/browser/monaco-bulk-edit-service.ts +4 -4
  275. package/src/browser/monaco-code-action-save-participant.ts +3 -3
  276. package/src/browser/monaco-code-action-service.ts +9 -9
  277. package/src/browser/monaco-color-registry.ts +5 -5
  278. package/src/browser/monaco-command-registry.ts +2 -2
  279. package/src/browser/monaco-command-service.ts +3 -3
  280. package/src/browser/monaco-command.ts +9 -9
  281. package/src/browser/monaco-context-key-service.ts +3 -3
  282. package/src/browser/monaco-context-menu.ts +6 -6
  283. package/src/browser/monaco-diff-computer.ts +2 -2
  284. package/src/browser/monaco-diff-editor.ts +15 -15
  285. package/src/browser/monaco-diff-navigator-factory.ts +1 -1
  286. package/src/browser/monaco-editor-content-menu.ts +5 -5
  287. package/src/browser/monaco-editor-model.spec.ts +157 -0
  288. package/src/browser/monaco-editor-model.ts +14 -9
  289. package/src/browser/monaco-editor-overlay-button.ts +1 -1
  290. package/src/browser/monaco-editor-peek-view-widget.ts +10 -10
  291. package/src/browser/monaco-editor-provider.ts +20 -20
  292. package/src/browser/monaco-editor-service.ts +9 -9
  293. package/src/browser/monaco-editor.spec.ts +11 -11
  294. package/src/browser/monaco-editor.ts +25 -25
  295. package/src/browser/monaco-formatter-service.ts +14 -28
  296. package/src/browser/monaco-formatting-conflicts.ts +5 -5
  297. package/src/browser/monaco-frontend-application-contribution.ts +10 -10
  298. package/src/browser/monaco-frontend-module.ts +66 -80
  299. package/src/browser/monaco-gotoline-quick-access.ts +6 -6
  300. package/src/browser/monaco-gotosymbol-quick-access.ts +7 -7
  301. package/src/browser/monaco-icon-registry.ts +1 -1
  302. package/src/browser/monaco-indexed-db.ts +1 -1
  303. package/src/browser/monaco-init.spec.ts +4 -4
  304. package/src/browser/monaco-init.ts +32 -32
  305. package/src/browser/monaco-keybinding.spec.ts +15 -11
  306. package/src/browser/monaco-keybinding.ts +8 -8
  307. package/src/browser/monaco-keycode-map.ts +2 -2
  308. package/src/browser/monaco-languages.ts +4 -4
  309. package/src/browser/monaco-marker-collection.ts +1 -1
  310. package/src/browser/monaco-menu.ts +3 -3
  311. package/src/browser/monaco-mime-service.ts +5 -5
  312. package/src/browser/monaco-nls.ts +1 -1
  313. package/src/browser/monaco-outline-contribution.ts +6 -6
  314. package/src/browser/monaco-outline-decorator.spec.ts +5 -5
  315. package/src/browser/monaco-outline-decorator.ts +1 -1
  316. package/src/browser/monaco-quick-access-registry.ts +5 -5
  317. package/src/browser/monaco-quick-input-service.spec.ts +2 -2
  318. package/src/browser/monaco-quick-input-service.ts +24 -19
  319. package/src/browser/monaco-resolved-keybinding.ts +6 -6
  320. package/src/browser/monaco-snippet-suggest-provider.ts +1 -1
  321. package/src/browser/monaco-standalone-theme-service.ts +2 -2
  322. package/src/browser/monaco-status-bar-contribution.ts +1 -1
  323. package/src/browser/monaco-text-model-service.ts +8 -8
  324. package/src/browser/monaco-theming-service.ts +2 -2
  325. package/src/browser/monaco-undo-redo-handler.ts +3 -3
  326. package/src/browser/monaco-utilities.ts +1 -1
  327. package/src/browser/monaco-workspace-context-service.ts +3 -3
  328. package/src/browser/monaco-workspace.ts +10 -10
  329. package/src/browser/simple-monaco-editor.ts +8 -8
  330. package/src/browser/textmate/index.ts +4 -4
  331. package/src/browser/textmate/monaco-textmate-frontend-bindings.ts +17 -15
  332. package/src/browser/textmate/monaco-textmate-service.ts +11 -11
  333. package/src/browser/textmate/monaco-theme-registry.ts +25 -15
  334. package/src/browser/textmate/monaco-theme-types.spec.ts +1 -1
  335. package/src/browser/textmate/monaco-theme-types.ts +1 -1
  336. package/src/browser/textmate/textmate-contribution.ts +1 -1
  337. package/src/browser/textmate/textmate-registry.ts +1 -1
  338. package/src/browser/textmate/textmate-snippet-completion-provider.ts +1 -1
  339. package/src/browser/textmate/textmate-tokenizer.spec.ts +1 -1
  340. package/src/browser/textmate/textmate-tokenizer.ts +3 -2
  341. package/src/browser/workspace-symbol-command.ts +1 -1
  342. package/src/typings/wasm.d.ts +21 -0
@@ -17,24 +17,24 @@
17
17
  import URI from '@theia/core/lib/common/uri';
18
18
  import { Disposable } from '@theia/core/lib/common';
19
19
  import { Dimension, DiffNavigator, DeltaDecorationParams } from '@theia/editor/lib/browser';
20
- import { MonacoEditorModel } from './monaco-editor-model';
21
- import { EditorServiceOverrides, MonacoEditor, MonacoEditorServices } from './monaco-editor';
22
- import { MonacoDiffNavigatorFactory } from './monaco-diff-navigator-factory';
20
+ import { MonacoEditorModel } from './monaco-editor-model.js';
21
+ import { EditorServiceOverrides, MonacoEditor, MonacoEditorServices } from './monaco-editor.js';
22
+ import { MonacoDiffNavigatorFactory } from './monaco-diff-navigator-factory.js';
23
23
  import { DiffUris } from '@theia/core/lib/browser/diff-uris';
24
24
  import * as monaco from '@theia/monaco-editor-core';
25
- import { ICodeEditor, IDiffEditorConstructionOptions } from '@theia/monaco-editor-core/esm/vs/editor/browser/editorBrowser';
25
+ import { ICodeEditor, IDiffEditorConstructionOptions } from '@theia/monaco-editor-core/esm/vs/editor/browser/editorBrowser.js';
26
26
  import { IActionDescriptor, IStandaloneCodeEditor, IStandaloneDiffEditor, StandaloneCodeEditor, StandaloneDiffEditor2 }
27
- from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneCodeEditor';
28
- import { IEditorConstructionOptions } from '@theia/monaco-editor-core/esm/vs/editor/browser/config/editorConfiguration';
29
- import { ICodeEditorWidgetOptions } from '@theia/monaco-editor-core/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget';
30
- import { EmbeddedDiffEditorWidget } from '@theia/monaco-editor-core/esm/vs/editor/browser/widget/diffEditor/embeddedDiffEditorWidget';
31
- import { IInstantiationService } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/instantiation';
32
- import { ContextKeyValue, IContextKey } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey';
33
- import { IDisposable } from '@theia/monaco-editor-core/esm/vs/base/common/lifecycle';
34
- import { ICommandHandler } from '@theia/monaco-editor-core/esm/vs/platform/commands/common/commands';
35
- import { EditorContextKeys } from '@theia/monaco-editor-core/esm/vs/editor/common/editorContextKeys';
36
- import { IEditorOptions } from '@theia/monaco-editor-core/esm/vs/editor/common/config/editorOptions';
37
- import { ILineChange } from '@theia/monaco-editor-core/esm/vs/editor/common/diff/legacyLinesDiffComputer';
27
+ from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneCodeEditor.js';
28
+ import { IEditorConstructionOptions } from '@theia/monaco-editor-core/esm/vs/editor/browser/config/editorConfiguration.js';
29
+ import { ICodeEditorWidgetOptions } from '@theia/monaco-editor-core/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js';
30
+ import { EmbeddedDiffEditorWidget } from '@theia/monaco-editor-core/esm/vs/editor/browser/widget/diffEditor/embeddedDiffEditorWidget.js';
31
+ import { IInstantiationService } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/instantiation.js';
32
+ import { ContextKeyValue, IContextKey } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey.js';
33
+ import { IDisposable } from '@theia/monaco-editor-core/esm/vs/base/common/lifecycle.js';
34
+ import { ICommandHandler } from '@theia/monaco-editor-core/esm/vs/platform/commands/common/commands.js';
35
+ import { EditorContextKeys } from '@theia/monaco-editor-core/esm/vs/editor/common/editorContextKeys.js';
36
+ import { IEditorOptions } from '@theia/monaco-editor-core/esm/vs/editor/common/config/editorOptions.js';
37
+ import { ILineChange } from '@theia/monaco-editor-core/esm/vs/editor/common/diff/legacyLinesDiffComputer.js';
38
38
 
39
39
  export namespace MonacoDiffEditor {
40
40
  export interface IOptions extends MonacoEditor.ICommonOptions, IDiffEditorConstructionOptions {
@@ -16,7 +16,7 @@
16
16
 
17
17
  import { injectable } from '@theia/core/shared/inversify';
18
18
  import { DiffNavigator } from '@theia/editor/lib/browser';
19
- import { IDiffEditor } from '@theia/monaco-editor-core/esm/vs/editor/browser/editorBrowser';
19
+ import { IDiffEditor } from '@theia/monaco-editor-core/esm/vs/editor/browser/editorBrowser.js';
20
20
 
21
21
  @injectable()
22
22
  export class MonacoDiffNavigatorFactory {
@@ -20,11 +20,11 @@ import { ObservableFromEvent, ObservableUtils } from '@theia/core/lib/common/obs
20
20
  import { FrontendApplicationContribution } from '@theia/core/lib/browser';
21
21
  import { Context } from '@theia/core/lib/browser/context-key-service';
22
22
  import { EditorManager, EDITOR_CONTENT_MENU, EditorWidget } from '@theia/editor/lib/browser';
23
- import { ICodeEditor } from '@theia/monaco-editor-core/esm/vs/editor/browser/editorBrowser';
24
- import { IContextKeyService } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey';
25
- import { MonacoContextKeyService } from './monaco-context-key-service';
26
- import { MonacoEditor } from './monaco-editor';
27
- import { MonacoEditorOverlayButton } from './monaco-editor-overlay-button';
23
+ import { ICodeEditor } from '@theia/monaco-editor-core/esm/vs/editor/browser/editorBrowser.js';
24
+ import { IContextKeyService } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey.js';
25
+ import { MonacoContextKeyService } from './monaco-context-key-service.js';
26
+ import { MonacoEditor } from './monaco-editor.js';
27
+ import { MonacoEditorOverlayButton } from './monaco-editor-overlay-button.js';
28
28
 
29
29
  /**
30
30
  * Implements {@link EDITOR_CONTENT_MENU} for {@link MonacoEditor}s.
@@ -0,0 +1,157 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2026 CodeSignal and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { enableJSDOM } from '@theia/core/lib/browser/test/jsdom';
18
+ let disableJSDOM = enableJSDOM();
19
+
20
+ import { expect } from 'chai';
21
+ import URI from '@theia/core/lib/common/uri';
22
+ import { Resource } from '@theia/core/lib/common/resource';
23
+ import { Deferred } from '@theia/core/lib/common/promise-util';
24
+ import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js';
25
+ import { IInstantiationService } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/instantiation.js';
26
+ import type { MonacoEditorModel as MonacoEditorModelType } from './monaco-editor-model.js';
27
+ import type { MonacoToProtocolConverter as MonacoToProtocolConverterType } from './monaco-to-protocol-converter.js';
28
+ import type { ProtocolToMonacoConverter as ProtocolToMonacoConverterType } from './protocol-to-monaco-converter.js';
29
+
30
+ disableJSDOM();
31
+
32
+ describe('MonacoEditorModel save', () => {
33
+ let MonacoEditorModel: typeof MonacoEditorModelType;
34
+ let MonacoToProtocolConverter: typeof MonacoToProtocolConverterType;
35
+ let ProtocolToMonacoConverter: typeof ProtocolToMonacoConverterType;
36
+
37
+ before(async () => {
38
+ disableJSDOM = enableJSDOM();
39
+ StandaloneServices.get(IInstantiationService);
40
+ ({ MonacoEditorModel } = await import('./monaco-editor-model.js'));
41
+ ({ MonacoToProtocolConverter } = await import('./monaco-to-protocol-converter.js'));
42
+ ({ ProtocolToMonacoConverter } = await import('./protocol-to-monaco-converter.js'));
43
+ });
44
+ after(() => disableJSDOM());
45
+
46
+ let files = 0;
47
+
48
+ class SlowResource implements Resource {
49
+ readonly uri = new URI(`file:///workspace/notes-${++files}.txt`);
50
+ content = '';
51
+ writing?: Deferred<void>;
52
+ readonly writeStarted = new Deferred<void>();
53
+
54
+ async readContents(): Promise<string> {
55
+ return this.content;
56
+ }
57
+
58
+ async saveContents(content: string): Promise<void> {
59
+ this.writeStarted.resolve();
60
+ await this.writing?.promise;
61
+ this.content = content;
62
+ }
63
+
64
+ dispose(): void { }
65
+ }
66
+
67
+ async function createModel(resource: SlowResource): Promise<MonacoEditorModelType> {
68
+ const model = new MonacoEditorModel(resource, new MonacoToProtocolConverter(), new ProtocolToMonacoConverter());
69
+ await model.load();
70
+ return model;
71
+ }
72
+
73
+ function type(model: MonacoEditorModelType, text: string): void {
74
+ const end = model.textEditorModel.getFullModelRange().getEndPosition();
75
+ model.textEditorModel.pushEditOperations([], [{
76
+ range: { startLineNumber: end.lineNumber, startColumn: end.column, endLineNumber: end.lineNumber, endColumn: end.column },
77
+ text
78
+ }], () => []);
79
+ model.textEditorModel.pushStackElement();
80
+ }
81
+
82
+ it('stays dirty when edited while a save is being written, and the next save writes the edit', async () => {
83
+ const resource = new SlowResource();
84
+ const model = await createModel(resource);
85
+ let saves = 0;
86
+ model.onDidSaveModel(() => saves++);
87
+ type(model, 'a');
88
+ resource.writing = new Deferred<void>();
89
+
90
+ const saving = model.save();
91
+ await resource.writeStarted.promise;
92
+ type(model, 'b');
93
+ resource.writing.resolve();
94
+ await saving;
95
+
96
+ expect(resource.content).to.equal('a');
97
+ expect(model.dirty).to.be.true;
98
+ expect(saves).to.equal(1);
99
+
100
+ await model.save();
101
+
102
+ expect(resource.content).to.equal('ab');
103
+ expect(model.dirty).to.be.false;
104
+ model.dispose();
105
+ });
106
+
107
+ it('is clean after a save when nothing changed during it', async () => {
108
+ const resource = new SlowResource();
109
+ const model = await createModel(resource);
110
+ type(model, 'a');
111
+
112
+ await model.save();
113
+
114
+ expect(resource.content).to.equal('a');
115
+ expect(model.dirty).to.be.false;
116
+ model.dispose();
117
+ });
118
+
119
+ it('is clean again when an edit made during the save is undone', async () => {
120
+ const resource = new SlowResource();
121
+ const model = await createModel(resource);
122
+ type(model, 'a');
123
+ resource.writing = new Deferred<void>();
124
+
125
+ const saving = model.save();
126
+ await resource.writeStarted.promise;
127
+ type(model, 'b');
128
+ resource.writing.resolve();
129
+ await saving;
130
+ model.textEditorModel.undo();
131
+
132
+ expect(model.textEditorModel.getValue()).to.equal('a');
133
+ expect(model.dirty).to.be.false;
134
+ model.dispose();
135
+ });
136
+
137
+ it('is clean after a revert during the save, which cancels it', async () => {
138
+ const resource = new SlowResource();
139
+ const model = await createModel(resource);
140
+ let saves = 0;
141
+ model.onDidSaveModel(() => saves++);
142
+ type(model, 'a');
143
+ resource.writing = new Deferred<void>();
144
+
145
+ const saving = model.save();
146
+ await resource.writeStarted.promise;
147
+ type(model, 'b');
148
+ const reverting = model.revert();
149
+ resource.writing.resolve();
150
+ await Promise.all([saving, reverting]);
151
+
152
+ expect(model.textEditorModel.getValue()).to.equal('a');
153
+ expect(model.dirty).to.be.false;
154
+ expect(saves).to.equal(0);
155
+ model.dispose();
156
+ });
157
+ });
@@ -21,16 +21,16 @@ import { Emitter, Event } from '@theia/core/lib/common/event';
21
21
  import { CancellationTokenSource, CancellationToken } from '@theia/core/lib/common/cancellation';
22
22
  import { Resource, ResourceError, ResourceVersion } from '@theia/core/lib/common/resource';
23
23
  import { Saveable, SaveOptions, SaveReason } from '@theia/core/lib/browser/saveable';
24
- import { MonacoToProtocolConverter } from './monaco-to-protocol-converter';
25
- import { ProtocolToMonacoConverter } from './protocol-to-monaco-converter';
24
+ import { MonacoToProtocolConverter } from './monaco-to-protocol-converter.js';
25
+ import { ProtocolToMonacoConverter } from './protocol-to-monaco-converter.js';
26
26
  import { ILogger, Loggable, Log } from '@theia/core/lib/common/logger';
27
- import { ITextBufferFactory, ITextModel, ITextSnapshot } from '@theia/monaco-editor-core/esm/vs/editor/common/model';
28
- import { IResolvedTextEditorModel } from '@theia/monaco-editor-core/esm/vs/editor/common/services/resolverService';
27
+ import { ITextBufferFactory, ITextModel, ITextSnapshot } from '@theia/monaco-editor-core/esm/vs/editor/common/model.js';
28
+ import { IResolvedTextEditorModel } from '@theia/monaco-editor-core/esm/vs/editor/common/services/resolverService.js';
29
29
  import * as monaco from '@theia/monaco-editor-core';
30
- import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
31
- import { ILanguageService } from '@theia/monaco-editor-core/esm/vs/editor/common/languages/language';
32
- import { IModelService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/model';
33
- import { createTextBufferFactoryFromStream } from '@theia/monaco-editor-core/esm/vs/editor/common/model/textModel';
30
+ import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js';
31
+ import { ILanguageService } from '@theia/monaco-editor-core/esm/vs/editor/common/languages/language.js';
32
+ import { IModelService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/model.js';
33
+ import { createTextBufferFactoryFromStream } from '@theia/monaco-editor-core/esm/vs/editor/common/model/textModel.js';
34
34
  import { editorGeneratedPreferenceProperties } from '@theia/editor/lib/common/editor-generated-preference-schema';
35
35
  import { MarkdownString } from '@theia/core/lib/common/markdown-rendering';
36
36
  import { BinaryBuffer } from '@theia/core/lib/common/buffer';
@@ -577,7 +577,12 @@ export class MonacoEditorModel implements IResolvedTextEditorModel, TextEditorDo
577
577
  this.updateContentEncoding();
578
578
  this.setValid(true);
579
579
 
580
- if (token.isCancellationRequested && this.model.getAlternativeVersionId() !== currentToSaveVersion) {
580
+ if (this.model.getAlternativeVersionId() !== currentToSaveVersion) {
581
+ // Edited while the content was being written: the model stays dirty, and what was written is the saved version.
582
+ if (!token.isCancellationRequested) {
583
+ this.bufferSavedVersionId = currentToSaveVersion;
584
+ this.fireDidSaveModel();
585
+ }
581
586
  return;
582
587
  }
583
588
 
@@ -17,7 +17,7 @@
17
17
  import { Disposable, DisposableCollection, Emitter } from '@theia/core';
18
18
  import { DISABLED_CLASS, onDomEvent } from '@theia/core/lib/browser';
19
19
  import * as monaco from '@theia/monaco-editor-core';
20
- import { MonacoEditor } from './monaco-editor';
20
+ import { MonacoEditor } from './monaco-editor.js';
21
21
 
22
22
  export class MonacoEditorOverlayButton implements Disposable {
23
23
 
@@ -16,19 +16,19 @@
16
16
 
17
17
  import { Position, Range } from '@theia/core/shared/vscode-languageserver-protocol';
18
18
  import { DisposableCollection } from '@theia/core';
19
- import { MonacoEditor } from './monaco-editor';
19
+ import { MonacoEditor } from './monaco-editor.js';
20
20
  import * as monaco from '@theia/monaco-editor-core';
21
- import { PeekViewWidget, IPeekViewOptions, IPeekViewStyles } from '@theia/monaco-editor-core/esm/vs/editor/contrib/peekView/browser/peekView';
22
- import { ICodeEditor } from '@theia/monaco-editor-core/esm/vs/editor/browser/editorBrowser';
23
- import { ActionBar } from '@theia/monaco-editor-core/esm/vs/base/browser/ui/actionbar/actionbar';
24
- import { Action } from '@theia/monaco-editor-core/esm/vs/base/common/actions';
25
- import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
26
- import { IInstantiationService } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/instantiation';
27
- import { IThemeService } from '@theia/monaco-editor-core/esm/vs/platform/theme/common/themeService';
28
- import { Color } from '@theia/monaco-editor-core/esm/vs/base/common/color';
21
+ import { PeekViewWidget, IPeekViewOptions, IPeekViewStyles } from '@theia/monaco-editor-core/esm/vs/editor/contrib/peekView/browser/peekView.js';
22
+ import { ICodeEditor } from '@theia/monaco-editor-core/esm/vs/editor/browser/editorBrowser.js';
23
+ import { ActionBar } from '@theia/monaco-editor-core/esm/vs/base/browser/ui/actionbar/actionbar.js';
24
+ import { Action } from '@theia/monaco-editor-core/esm/vs/base/common/actions.js';
25
+ import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js';
26
+ import { IInstantiationService } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/instantiation.js';
27
+ import { IThemeService } from '@theia/monaco-editor-core/esm/vs/platform/theme/common/themeService.js';
28
+ import { Color } from '@theia/monaco-editor-core/esm/vs/base/common/color.js';
29
29
 
30
30
  export { peekViewBorder, peekViewTitleBackground, peekViewTitleForeground, peekViewTitleInfoForeground }
31
- from '@theia/monaco-editor-core/esm/vs/editor/contrib/peekView/browser/peekView';
31
+ from '@theia/monaco-editor-core/esm/vs/editor/contrib/peekView/browser/peekView.js';
32
32
 
33
33
  export namespace MonacoEditorPeekViewWidget {
34
34
  export interface Styles {
@@ -20,33 +20,33 @@ import { TextEditor, DiffNavigator } from '@theia/editor/lib/browser';
20
20
  import { DiffUris } from '@theia/core/lib/browser/diff-uris';
21
21
  import { inject, injectable, named, postConstruct } from '@theia/core/shared/inversify';
22
22
  import { DisposableCollection, deepClone, Disposable, CancellationToken } from '@theia/core/lib/common';
23
- import { MonacoDiffEditor } from './monaco-diff-editor';
24
- import { MonacoDiffNavigatorFactory } from './monaco-diff-navigator-factory';
25
- import { EditorServiceOverrides, MonacoEditor, MonacoEditorServices } from './monaco-editor';
26
- import { MonacoEditorModel, TextDocumentSaveReason } from './monaco-editor-model';
27
- import { MonacoWorkspace } from './monaco-workspace';
23
+ import { MonacoDiffEditor } from './monaco-diff-editor.js';
24
+ import { MonacoDiffNavigatorFactory } from './monaco-diff-navigator-factory.js';
25
+ import { EditorServiceOverrides, MonacoEditor, MonacoEditorServices } from './monaco-editor.js';
26
+ import { MonacoEditorModel, TextDocumentSaveReason } from './monaco-editor-model.js';
27
+ import { MonacoWorkspace } from './monaco-workspace.js';
28
28
  import { ContributionProvider, ILogger } from '@theia/core';
29
29
  import { KeybindingRegistry, OpenerService, open, WidgetOpenerOptions, SaveOptions, FormatType } from '@theia/core/lib/browser';
30
- import { MonacoResolvedKeybinding } from './monaco-resolved-keybinding';
30
+ import { MonacoResolvedKeybinding } from './monaco-resolved-keybinding.js';
31
31
  import { HttpOpenHandlerOptions } from '@theia/core/lib/browser/http-open-handler';
32
- import { MonacoToProtocolConverter } from './monaco-to-protocol-converter';
33
- import { ProtocolToMonacoConverter } from './protocol-to-monaco-converter';
32
+ import { MonacoToProtocolConverter } from './monaco-to-protocol-converter.js';
33
+ import { ProtocolToMonacoConverter } from './protocol-to-monaco-converter.js';
34
34
  import * as monaco from '@theia/monaco-editor-core';
35
- import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
36
- import { IOpenerService, OpenExternalOptions, OpenInternalOptions } from '@theia/monaco-editor-core/esm/vs/platform/opener/common/opener';
37
- import { IKeybindingService } from '@theia/monaco-editor-core/esm/vs/platform/keybinding/common/keybinding';
38
- import { IContextMenuService } from '@theia/monaco-editor-core/esm/vs/platform/contextview/browser/contextView';
39
- import { Event } from '@theia/monaco-editor-core/esm/vs/base/common/event';
40
- import { KeyCodeChord } from '@theia/monaco-editor-core/esm/vs/base/common/keybindings';
41
- import { IContextKeyService } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey';
42
- import { ITextModelService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/resolverService';
43
- import { IReference } from '@theia/monaco-editor-core/esm/vs/base/common/lifecycle';
35
+ import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js';
36
+ import { IOpenerService, OpenExternalOptions, OpenInternalOptions } from '@theia/monaco-editor-core/esm/vs/platform/opener/common/opener.js';
37
+ import { IKeybindingService } from '@theia/monaco-editor-core/esm/vs/platform/keybinding/common/keybinding.js';
38
+ import { IContextMenuService } from '@theia/monaco-editor-core/esm/vs/platform/contextview/browser/contextView.js';
39
+ import { Event } from '@theia/monaco-editor-core/esm/vs/base/common/event.js';
40
+ import { KeyCodeChord } from '@theia/monaco-editor-core/esm/vs/base/common/keybindings.js';
41
+ import { IContextKeyService } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey.js';
42
+ import { ITextModelService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/resolverService.js';
43
+ import { IReference } from '@theia/monaco-editor-core/esm/vs/base/common/lifecycle.js';
44
44
  import { MarkdownString } from '@theia/core/lib/common/markdown-rendering';
45
- import { SimpleMonacoEditor } from './simple-monaco-editor';
46
- import { ICodeEditorWidgetOptions } from '@theia/monaco-editor-core/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget';
45
+ import { SimpleMonacoEditor } from './simple-monaco-editor.js';
46
+ import { ICodeEditorWidgetOptions } from '@theia/monaco-editor-core/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js';
47
47
  import { timeoutReject } from '@theia/core/lib/common/promise-util';
48
48
  import { FileSystemPreferences } from '@theia/filesystem/lib/common';
49
- import { insertFinalNewline } from './monaco-utilities';
49
+ import { insertFinalNewline } from './monaco-utilities.js';
50
50
  import { EditorPreferenceChange, EditorPreferences } from '@theia/editor/lib/common/editor-preferences';
51
51
 
52
52
  export const MonacoEditorFactory = Symbol('MonacoEditorFactory');
@@ -18,15 +18,15 @@ import { injectable, inject, decorate, named } from '@theia/core/shared/inversif
18
18
  import URI from '@theia/core/lib/common/uri';
19
19
  import { OpenerService, open, WidgetOpenMode, ApplicationShell } from '@theia/core/lib/browser';
20
20
  import { EditorWidget, EditorOpenerOptions, EditorManager, CustomEditorWidget } from '@theia/editor/lib/browser';
21
- import { MonacoEditor } from './monaco-editor';
22
- import { MonacoToProtocolConverter } from './monaco-to-protocol-converter';
23
- import { MonacoEditorModel } from './monaco-editor-model';
24
- import { IResourceEditorInput, ITextResourceEditorInput } from '@theia/monaco-editor-core/esm/vs/platform/editor/common/editor';
25
- import { StandaloneCodeEditorService } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneCodeEditorService';
26
- import { StandaloneCodeEditor } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneCodeEditor';
27
- import { ICodeEditor } from '@theia/monaco-editor-core/esm/vs/editor/browser/editorBrowser';
28
- import { IContextKeyService } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey';
29
- import { IThemeService } from '@theia/monaco-editor-core/esm/vs/platform/theme/common/themeService';
21
+ import { MonacoEditor } from './monaco-editor.js';
22
+ import { MonacoToProtocolConverter } from './monaco-to-protocol-converter.js';
23
+ import { MonacoEditorModel } from './monaco-editor-model.js';
24
+ import { IResourceEditorInput, ITextResourceEditorInput } from '@theia/monaco-editor-core/esm/vs/platform/editor/common/editor.js';
25
+ import { StandaloneCodeEditorService } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneCodeEditorService.js';
26
+ import { StandaloneCodeEditor } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneCodeEditor.js';
27
+ import { ICodeEditor } from '@theia/monaco-editor-core/esm/vs/editor/browser/editorBrowser.js';
28
+ import { IContextKeyService } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey.js';
29
+ import { IThemeService } from '@theia/monaco-editor-core/esm/vs/platform/theme/common/themeService.js';
30
30
  import { ContributionProvider, PreferenceService } from '@theia/core';
31
31
 
32
32
  decorate(injectable(), StandaloneCodeEditorService);
@@ -21,13 +21,13 @@ import { expect } from 'chai';
21
21
  import * as sinon from 'sinon';
22
22
  import { Disposable, Event } from '@theia/core/lib/common';
23
23
  import URI from '@theia/core/lib/common/uri';
24
- import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
25
- import { IInstantiationService } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/instantiation';
26
- import type { MonacoEditor as MonacoEditorType, MonacoEditorServices } from './monaco-editor';
27
- import type { MonacoEditorModel } from './monaco-editor-model';
28
- import type { MonacoDiffEditor as MonacoDiffEditorType } from './monaco-diff-editor';
29
- import type { MonacoToProtocolConverter as MonacoToProtocolConverterType } from './monaco-to-protocol-converter';
30
- import type { ProtocolToMonacoConverter as ProtocolToMonacoConverterType } from './protocol-to-monaco-converter';
24
+ import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js';
25
+ import { IInstantiationService } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/instantiation.js';
26
+ import type { MonacoEditor as MonacoEditorType, MonacoEditorServices } from './monaco-editor.js';
27
+ import type { MonacoEditorModel } from './monaco-editor-model.js';
28
+ import type { MonacoDiffEditor as MonacoDiffEditorType } from './monaco-diff-editor.js';
29
+ import type { MonacoToProtocolConverter as MonacoToProtocolConverterType } from './monaco-to-protocol-converter.js';
30
+ import type { ProtocolToMonacoConverter as ProtocolToMonacoConverterType } from './protocol-to-monaco-converter.js';
31
31
 
32
32
  disableJSDOM();
33
33
 
@@ -41,10 +41,10 @@ describe('MonacoEditor visibility', () => {
41
41
  disableJSDOM = enableJSDOM();
42
42
  // Initialize baseline services before editor imports register additional services requiring browser CSS globals.
43
43
  StandaloneServices.get(IInstantiationService);
44
- ({ MonacoEditor } = await import('./monaco-editor'));
45
- ({ MonacoDiffEditor } = await import('./monaco-diff-editor'));
46
- ({ MonacoToProtocolConverter } = await import('./monaco-to-protocol-converter'));
47
- ({ ProtocolToMonacoConverter } = await import('./protocol-to-monaco-converter'));
44
+ ({ MonacoEditor } = await import('./monaco-editor.js'));
45
+ ({ MonacoDiffEditor } = await import('./monaco-diff-editor.js'));
46
+ ({ MonacoToProtocolConverter } = await import('./monaco-to-protocol-converter.js'));
47
+ ({ ProtocolToMonacoConverter } = await import('./protocol-to-monaco-converter.js'));
48
48
  });
49
49
  after(() => disableJSDOM());
50
50
 
@@ -38,36 +38,36 @@ import {
38
38
  EditorDecorationOptions,
39
39
  MouseTargetType
40
40
  } from '@theia/editor/lib/browser';
41
- import { MonacoEditorModel } from './monaco-editor-model';
42
- import { MonacoToProtocolConverter } from './monaco-to-protocol-converter';
43
- import { ProtocolToMonacoConverter } from './protocol-to-monaco-converter';
41
+ import { MonacoEditorModel } from './monaco-editor-model.js';
42
+ import { MonacoToProtocolConverter } from './monaco-to-protocol-converter.js';
43
+ import { ProtocolToMonacoConverter } from './protocol-to-monaco-converter.js';
44
44
  import { TextEdit } from '@theia/core/shared/vscode-languageserver-protocol';
45
45
  import { UTF8 } from '@theia/core/lib/common/encodings';
46
46
  import * as monaco from '@theia/monaco-editor-core';
47
- import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
48
- import { ILanguageService } from '@theia/monaco-editor-core/esm/vs/editor/common/languages/language';
49
- import { IInstantiationService, ServiceIdentifier } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/instantiation';
50
- import { ICodeEditor, IMouseTargetMargin } from '@theia/monaco-editor-core/esm/vs/editor/browser/editorBrowser';
51
- import { IStandaloneEditorConstructionOptions, StandaloneCodeEditor, StandaloneEditor } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneCodeEditor';
52
- import { ServiceCollection } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/serviceCollection';
47
+ import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js';
48
+ import { ILanguageService } from '@theia/monaco-editor-core/esm/vs/editor/common/languages/language.js';
49
+ import { IInstantiationService, ServiceIdentifier } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/instantiation.js';
50
+ import { ICodeEditor, IMouseTargetMargin } from '@theia/monaco-editor-core/esm/vs/editor/browser/editorBrowser.js';
51
+ import { IStandaloneEditorConstructionOptions, StandaloneCodeEditor, StandaloneEditor } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneCodeEditor.js';
52
+ import { ServiceCollection } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/serviceCollection.js';
53
53
  import { MarkdownString } from '@theia/core/lib/common/markdown-rendering';
54
- import { ConfigurationChangedEvent, IEditorOptions, ShowLightbulbIconMode } from '@theia/monaco-editor-core/esm/vs/editor/common/config/editorOptions';
55
- import { ICodeEditorService } from '@theia/monaco-editor-core/esm/vs/editor/browser/services/codeEditorService';
56
- import { CursorColumns } from '@theia/monaco-editor-core/esm/vs/editor/common/core/cursorColumns';
57
- import { ICommandService } from '@theia/monaco-editor-core/esm/vs/platform/commands/common/commands';
58
- import { IContextKeyService } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey';
59
- import { IKeybindingService } from '@theia/monaco-editor-core/esm/vs/platform/keybinding/common/keybinding';
60
- import { IThemeService } from '@theia/monaco-editor-core/esm/vs/platform/theme/common/themeService';
61
- import { INotificationService } from '@theia/monaco-editor-core/esm/vs/platform/notification/common/notification';
62
- import { IAccessibilityService } from '@theia/monaco-editor-core/esm/vs/platform/accessibility/common/accessibility';
63
- import { ILanguageConfigurationService } from '@theia/monaco-editor-core/esm/vs/editor/common/languages/languageConfigurationRegistry';
64
- import { ILanguageFeaturesService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/languageFeatures';
65
- import * as objects from '@theia/monaco-editor-core/esm/vs/base/common/objects';
54
+ import { ConfigurationChangedEvent, IEditorOptions, ShowLightbulbIconMode } from '@theia/monaco-editor-core/esm/vs/editor/common/config/editorOptions.js';
55
+ import { ICodeEditorService } from '@theia/monaco-editor-core/esm/vs/editor/browser/services/codeEditorService.js';
56
+ import { CursorColumns } from '@theia/monaco-editor-core/esm/vs/editor/common/core/cursorColumns.js';
57
+ import { ICommandService } from '@theia/monaco-editor-core/esm/vs/platform/commands/common/commands.js';
58
+ import { IContextKeyService } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey.js';
59
+ import { IKeybindingService } from '@theia/monaco-editor-core/esm/vs/platform/keybinding/common/keybinding.js';
60
+ import { IThemeService } from '@theia/monaco-editor-core/esm/vs/platform/theme/common/themeService.js';
61
+ import { INotificationService } from '@theia/monaco-editor-core/esm/vs/platform/notification/common/notification.js';
62
+ import { IAccessibilityService } from '@theia/monaco-editor-core/esm/vs/platform/accessibility/common/accessibility.js';
63
+ import { ILanguageConfigurationService } from '@theia/monaco-editor-core/esm/vs/editor/common/languages/languageConfigurationRegistry.js';
64
+ import { ILanguageFeaturesService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/languageFeatures.js';
65
+ import * as objects from '@theia/monaco-editor-core/esm/vs/base/common/objects.js';
66
66
  import { Selection } from '@theia/editor/lib/browser/editor';
67
- import { IHoverService, WorkbenchHoverDelegate } from '@theia/monaco-editor-core/esm/vs/platform/hover/browser/hover';
68
- import { setHoverDelegateFactory } from '@theia/monaco-editor-core/esm/vs/base/browser/ui/hover/hoverDelegateFactory';
69
- import { IMarkdownRendererService } from '@theia/monaco-editor-core/esm/vs/platform/markdown/browser/markdownRenderer';
70
- import { MonacoTextModelService } from './monaco-text-model-service';
67
+ import { IHoverService, WorkbenchHoverDelegate } from '@theia/monaco-editor-core/esm/vs/platform/hover/browser/hover.js';
68
+ import { setHoverDelegateFactory } from '@theia/monaco-editor-core/esm/vs/base/browser/ui/hover/hoverDelegateFactory.js';
69
+ import { IMarkdownRendererService } from '@theia/monaco-editor-core/esm/vs/platform/markdown/browser/markdownRenderer.js';
70
+ import { MonacoTextModelService } from './monaco-text-model-service.js';
71
71
 
72
72
  export type ServicePair<T> = [ServiceIdentifier<T>, T];
73
73
 
@@ -15,16 +15,16 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
18
- import { Emitter, Event, PreferenceInspection, PreferenceLanguageOverrideService, PreferenceScope, PreferenceService } from '@theia/core';
18
+ import { Emitter, Event, PreferenceInspection, PreferenceScope, PreferenceService } from '@theia/core';
19
19
  import { WorkspaceService } from '@theia/workspace/lib/browser';
20
20
  import { FormatterInfo, FormatterService, FormatterSettingScope, FormatterStatus } from '@theia/editor/lib/browser/editor-formatter-service';
21
21
  import { TextEditor } from '@theia/editor/lib/browser';
22
- import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
23
- import { ILanguageFeaturesService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/languageFeatures';
24
- import { DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider } from '@theia/monaco-editor-core/esm/vs/editor/common/languages';
25
- import { ExtensionIdentifier } from '@theia/monaco-editor-core/esm/vs/platform/extensions/common/extensions';
26
- import { ITextModel } from '@theia/monaco-editor-core/esm/vs/editor/common/model';
27
- import { MonacoEditor } from './monaco-editor';
22
+ import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js';
23
+ import { ILanguageFeaturesService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/languageFeatures.js';
24
+ import { DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider } from '@theia/monaco-editor-core/esm/vs/editor/common/languages.js';
25
+ import { ExtensionIdentifier } from '@theia/monaco-editor-core/esm/vs/platform/extensions/common/extensions.js';
26
+ import { ITextModel } from '@theia/monaco-editor-core/esm/vs/editor/common/model.js';
27
+ import { MonacoEditor } from './monaco-editor.js';
28
28
 
29
29
  /**
30
30
  * Extended formatter provider interface that includes extension metadata.
@@ -52,9 +52,6 @@ export class MonacoFormatterService implements FormatterService {
52
52
  @inject(PreferenceService)
53
53
  protected readonly preferenceService: PreferenceService;
54
54
 
55
- @inject(PreferenceLanguageOverrideService)
56
- protected readonly preferenceSchema: PreferenceLanguageOverrideService;
57
-
58
55
  @inject(WorkspaceService)
59
56
  protected readonly workspaceService: WorkspaceService;
60
57
 
@@ -74,25 +71,17 @@ export class MonacoFormatterService implements FormatterService {
74
71
  });
75
72
 
76
73
  this.preferenceService.onPreferenceChanged(change => {
77
- if (change.preferenceName.includes(PREFERENCE_NAME)) {
74
+ if (change.preferenceName === PREFERENCE_NAME) {
78
75
  this.onDidChangeFormattersEmitter.fire();
79
76
  }
80
77
  });
81
78
  }
82
79
 
83
- protected getFormatterPreferenceName(languageId: string): string {
84
- return this.preferenceSchema.overridePreferenceName({
85
- preferenceName: PREFERENCE_NAME,
86
- overrideIdentifier: languageId
87
- });
88
- }
89
-
90
80
  getFormatterStatus(editor: TextEditor): FormatterStatus {
91
81
  const { languageId, uri: resourceUri } = editor.document;
92
82
  const formatters = this.getAvailableFormatters(editor);
93
- const preferenceName = this.getFormatterPreferenceName(languageId);
94
83
 
95
- const configuredStatus = this.getConfiguredFormatterStatus(preferenceName, resourceUri, formatters);
84
+ const configuredStatus = this.getConfiguredFormatterStatus(languageId, resourceUri, formatters);
96
85
  if (configuredStatus) {
97
86
  return configuredStatus;
98
87
  }
@@ -115,11 +104,11 @@ export class MonacoFormatterService implements FormatterService {
115
104
  }
116
105
 
117
106
  protected getConfiguredFormatterStatus(
118
- preferenceName: string,
107
+ languageId: string,
119
108
  resourceUri: string,
120
109
  formatters: FormatterInfo[]
121
110
  ): FormatterStatus | undefined {
122
- const inspection = this.preferenceService.inspect<string>(preferenceName, resourceUri);
111
+ const inspection = this.preferenceService.inspect<string>(PREFERENCE_NAME, resourceUri, languageId);
123
112
  if (!inspection) {
124
113
  return undefined;
125
114
  }
@@ -218,19 +207,16 @@ export class MonacoFormatterService implements FormatterService {
218
207
  const isEditor = typeof languageIdOrEditor !== 'string';
219
208
  const languageId = isEditor ? languageIdOrEditor.document.languageId : languageIdOrEditor;
220
209
  const resourceUri = isEditor ? languageIdOrEditor.document.uri : undefined;
221
- const preferenceName = this.getFormatterPreferenceName(languageId);
222
- await this.preferenceService.set(preferenceName, formatterId, scope, resourceUri);
210
+ await this.preferenceService.set(PREFERENCE_NAME, formatterId, scope, resourceUri, languageId);
223
211
  }
224
212
 
225
213
  getDefaultFormatter(languageId: string, resourceUri: string): string | undefined {
226
- const preferenceName = this.getFormatterPreferenceName(languageId);
227
- return this.preferenceService.get<string>(preferenceName, undefined, resourceUri);
214
+ return this.preferenceService.get<string>(PREFERENCE_NAME, { resource: resourceUri, override: languageId });
228
215
  }
229
216
 
230
217
  getConfiguredScope(editor: TextEditor): PreferenceScope | undefined {
231
218
  const { languageId, uri: resourceUri } = editor.document;
232
- const preferenceName = this.getFormatterPreferenceName(languageId);
233
- const inspection = this.preferenceService.inspect<string>(preferenceName, resourceUri);
219
+ const inspection = this.preferenceService.inspect<string>(PREFERENCE_NAME, resourceUri, languageId);
234
220
 
235
221
  if (!inspection) {
236
222
  return undefined;