@theia/monaco 1.77.0-next.99 → 1.78.0-next.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
@@ -21,13 +21,13 @@ import { DisposableCollection, Disposable } from '@theia/core';
21
21
  import { OutlineViewService } from '@theia/outline-view/lib/browser/outline-view-service';
22
22
  import { OutlineSymbolInformationNode } from '@theia/outline-view/lib/browser/outline-view-widget';
23
23
  import URI from '@theia/core/lib/common/uri';
24
- import { MonacoEditor } from './monaco-editor';
25
- import debounce = require('@theia/core/shared/lodash.debounce');
24
+ import { MonacoEditor } from './monaco-editor.js';
25
+ import debounce from '@theia/core/shared/lodash.debounce';
26
26
  import * as monaco from '@theia/monaco-editor-core';
27
- import { ILanguageFeaturesService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/languageFeatures';
28
- import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
29
- import { ITextModel } from '@theia/monaco-editor-core/esm/vs/editor/common/model';
30
- import { DocumentSymbol } from '@theia/monaco-editor-core/esm/vs/editor/common/languages';
27
+ import { ILanguageFeaturesService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/languageFeatures.js';
28
+ import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js';
29
+ import { ITextModel } from '@theia/monaco-editor-core/esm/vs/editor/common/model.js';
30
+ import { DocumentSymbol } from '@theia/monaco-editor-core/esm/vs/editor/common/languages.js';
31
31
 
32
32
  @injectable()
33
33
  export class MonacoOutlineContribution implements FrontendApplicationContribution {
@@ -20,7 +20,7 @@ import URI from '@theia/core/lib/common/uri';
20
20
  import type { CompositeTreeNode, Tree } from '@theia/core/lib/browser/tree';
21
21
  import type { TreeDecoration } from '@theia/core/lib/browser/tree/tree-decorator';
22
22
  import type * as monaco from '@theia/monaco-editor-core';
23
- import type { MonacoOutlineSymbolInformationNode } from './monaco-outline-contribution';
23
+ import type { MonacoOutlineSymbolInformationNode } from './monaco-outline-contribution.js';
24
24
 
25
25
  describe('MonacoOutlineDecorator', () => {
26
26
 
@@ -28,8 +28,8 @@ describe('MonacoOutlineDecorator', () => {
28
28
  // the spec files are collected registers monaco's editor contributions before monaco-init.spec initializes
29
29
  // the standalone services, which then need browser APIs that JSDOM does not provide.
30
30
  let monacoApi: typeof monaco;
31
- let outline: typeof import('./monaco-outline-contribution');
32
- let decorator: typeof import('./monaco-outline-decorator');
31
+ let outline: typeof import('./monaco-outline-contribution.js');
32
+ let decorator: typeof import('./monaco-outline-decorator.js');
33
33
  let disableJSDOM: () => void;
34
34
 
35
35
  before(async () => {
@@ -42,8 +42,8 @@ describe('MonacoOutlineDecorator', () => {
42
42
  (global as any).DragEvent = class DragEvent extends (global as any).Event { };
43
43
  }
44
44
  monacoApi = await import('@theia/monaco-editor-core');
45
- outline = await import('./monaco-outline-contribution');
46
- decorator = await import('./monaco-outline-decorator');
45
+ outline = await import('./monaco-outline-contribution.js');
46
+ decorator = await import('./monaco-outline-decorator.js');
47
47
  });
48
48
  after(() => disableJSDOM());
49
49
 
@@ -19,7 +19,7 @@ import { Event, Emitter } from '@theia/core/lib/common/event';
19
19
  import { Tree } from '@theia/core/lib/browser/tree/tree';
20
20
  import { DepthFirstTreeIterator } from '@theia/core/lib/browser/tree/tree-iterator';
21
21
  import { TreeDecorator, TreeDecoration } from '@theia/core/lib/browser/tree/tree-decorator';
22
- import { MonacoOutlineSymbolInformationNode } from './monaco-outline-contribution';
22
+ import { MonacoOutlineSymbolInformationNode } from './monaco-outline-contribution.js';
23
23
 
24
24
  @injectable()
25
25
  export class MonacoOutlineDecorator implements TreeDecorator {
@@ -18,10 +18,10 @@ import { KeybindingRegistry, QuickPickItem, QuickPickSeparator } from '@theia/co
18
18
  import { QuickAccessProviderDescriptor, QuickAccessRegistry } from '@theia/core/lib/browser/quick-input/quick-access';
19
19
  import { CancellationToken, Disposable } from '@theia/core/lib/common';
20
20
  import { inject, injectable } from '@theia/core/shared/inversify';
21
- import { MonacoQuickPickItem } from './monaco-quick-input-service';
21
+ import { MonacoQuickPickItem } from './monaco-quick-input-service.js';
22
22
  import {
23
23
  IPickerQuickAccessProviderOptions, PickerQuickAccessProvider, Picks, Pick, IPickerQuickAccessItem
24
- } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/browser/pickerQuickAccess';
24
+ } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/browser/pickerQuickAccess.js';
25
25
  import {
26
26
  Extensions,
27
27
  IQuickAccessProvider,
@@ -29,9 +29,9 @@ import {
29
29
  IQuickAccessProviderHelp,
30
30
  IQuickAccessRegistry,
31
31
  QuickAccessRegistry as VSCodeQuickAccessRegistry,
32
- } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/common/quickAccess';
33
- import { IQuickPickItem, IQuickPickItemWithResource } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/common/quickInput';
34
- import { Registry } from '@theia/monaco-editor-core/esm/vs/platform/registry/common/platform';
32
+ } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/common/quickAccess.js';
33
+ import { IQuickPickItem, IQuickPickItemWithResource } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/common/quickInput.js';
34
+ import { Registry } from '@theia/monaco-editor-core/esm/vs/platform/registry/common/platform.js';
35
35
 
36
36
  interface IAnythingQuickPickItem extends IPickerQuickAccessItem, IQuickPickItemWithResource { }
37
37
 
@@ -26,8 +26,8 @@ if (!(global as any).DragEvent) {
26
26
  }
27
27
 
28
28
  import { expect } from 'chai';
29
- import { getColorRegistry } from '@theia/monaco-editor-core/esm/vs/platform/theme/common/colorRegistry';
30
- import { MonacoQuickInputImplementation } from './monaco-quick-input-service';
29
+ import { getColorRegistry } from '@theia/monaco-editor-core/esm/vs/platform/theme/common/colorRegistry.js';
30
+ import { MonacoQuickInputImplementation } from './monaco-quick-input-service.js';
31
31
 
32
32
  disableJSDOM();
33
33
 
@@ -25,32 +25,37 @@ import {
25
25
  IInputBox, IInputOptions, IKeyMods, IPickOptions, IQuickInput, IQuickInputButton,
26
26
  IQuickInputService, IQuickNavigateConfiguration, IQuickPick, IQuickPickItem, IQuickPickItemButtonEvent,
27
27
  IQuickPickSeparator, IQuickTree, IQuickTreeItem, IQuickWidget, QuickPickInput
28
- } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/common/quickInput';
29
- import { IQuickInputOptions, IQuickInputStyles } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/browser/quickInput';
30
- import { QuickInputController } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/browser/quickInputController';
31
- import { MonacoResolvedKeybinding } from './monaco-resolved-keybinding';
32
- import { IQuickAccessController } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/common/quickAccess';
33
- import { QuickAccessController } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/browser/quickAccess';
34
- import { IContextKey, IContextKeyService, IScopedContextKeyService } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey';
28
+ } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/common/quickInput.js';
29
+ import { IQuickInputOptions, IQuickInputStyles } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/browser/quickInput.js';
30
+ import { QuickInputController } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/browser/quickInputController.js';
31
+ import { MonacoResolvedKeybinding } from './monaco-resolved-keybinding.js';
32
+ import { IQuickAccessController } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/common/quickAccess.js';
33
+ import { QuickAccessController } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/browser/quickAccess.js';
34
+ import { IContextKey, IContextKeyService, IScopedContextKeyService } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey.js';
35
35
  import * as monaco from '@theia/monaco-editor-core';
36
- import { ResolvedKeybinding } from '@theia/monaco-editor-core/esm/vs/base/common/keybindings';
37
- import { IInstantiationService } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/instantiation';
38
- import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
39
- import { IMatch } from '@theia/monaco-editor-core/esm/vs/base/common/filters';
36
+ import { ResolvedKeybinding } from '@theia/monaco-editor-core/esm/vs/base/common/keybindings.js';
37
+ import { IInstantiationService } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/instantiation.js';
38
+ import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js';
39
+ import { IMatch } from '@theia/monaco-editor-core/esm/vs/base/common/filters.js';
40
40
  import { CancellationToken, Event } from '@theia/core';
41
- import { MonacoColorRegistry } from './monaco-color-registry';
41
+ import { MonacoColorRegistry } from './monaco-color-registry.js';
42
42
  import { ThemeService } from '@theia/core/lib/browser/theming';
43
- import { IStandaloneThemeService } from '@theia/monaco-editor-core/esm/vs/editor/standalone/common/standaloneTheme';
44
- import { ILayoutService } from '@theia/monaco-editor-core/esm/vs/platform/layout/browser/layoutService';
45
- import { IHoverDelegate, IHoverDelegateOptions } from '@theia/monaco-editor-core/esm/vs/base/browser/ui/hover/hoverDelegate';
46
- import { IHoverWidget } from '@theia/monaco-editor-core/esm/vs/base/browser/ui/hover/hover';
47
- import MonacoSeverity from '@theia/monaco-editor-core/esm/vs/base/common/severity';
43
+ import { IStandaloneThemeService } from '@theia/monaco-editor-core/esm/vs/editor/standalone/common/standaloneTheme.js';
44
+ import { ILayoutService } from '@theia/monaco-editor-core/esm/vs/platform/layout/browser/layoutService.js';
45
+ import { IHoverDelegate, IHoverDelegateOptions } from '@theia/monaco-editor-core/esm/vs/base/browser/ui/hover/hoverDelegate.js';
46
+ import { IHoverWidget } from '@theia/monaco-editor-core/esm/vs/base/browser/ui/hover/hover.js';
47
+ import MonacoSeverityModule from '@theia/monaco-editor-core/esm/vs/base/common/severity.js';
48
48
  import { Severity } from '@theia/core/lib/common/severity';
49
- import { IStorageService } from '@theia/monaco-editor-core/esm/vs/platform/storage/common/storage';
50
- import { IContextMenuService } from '@theia/monaco-editor-core/esm/vs/platform/contextview/browser/contextView';
49
+ import { IStorageService } from '@theia/monaco-editor-core/esm/vs/platform/storage/common/storage.js';
50
+ import { IContextMenuService } from '@theia/monaco-editor-core/esm/vs/platform/contextview/browser/contextView.js';
51
51
  import { WindowFocusService } from '@theia/core/lib/browser/window/window-focus-service';
52
52
  import { SecondaryWindowService } from '@theia/core/lib/browser/window/secondary-window-service';
53
53
 
54
+ // `@theia/monaco-editor-core` ships ES modules without declaring `"type": "module"`, so the compiler assumes CommonJS semantics
55
+ // for their default exports. At runtime, the default export is the `Severity` enum.
56
+ const MonacoSeverity = MonacoSeverityModule as unknown as typeof MonacoSeverityModule.default;
57
+ type MonacoSeverity = MonacoSeverityModule.default;
58
+
54
59
  /**
55
60
  * Converts Theia's {@link Severity} to Monaco's {@link MonacoSeverity}.
56
61
  *
@@ -14,18 +14,18 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- import { KeyCode as MonacoKeyCode } from '@theia/monaco-editor-core/esm/vs/base/common/keyCodes';
17
+ import { KeyCode as MonacoKeyCode } from '@theia/monaco-editor-core/esm/vs/base/common/keyCodes.js';
18
18
  import {
19
19
  ResolvedKeybinding, ResolvedChord, SingleModifierChord, KeyCodeChord, Chord
20
- } from '@theia/monaco-editor-core/esm/vs/base/common/keybindings';
21
- import { ElectronAcceleratorLabelProvider, UILabelProvider, UserSettingsLabelProvider } from '@theia/monaco-editor-core/esm/vs/base/common/keybindingLabels';
22
- import { USLayoutResolvedKeybinding } from '@theia/monaco-editor-core/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding';
23
- import * as MonacoPlatform from '@theia/monaco-editor-core/esm/vs/base/common/platform';
20
+ } from '@theia/monaco-editor-core/esm/vs/base/common/keybindings.js';
21
+ import { ElectronAcceleratorLabelProvider, UILabelProvider, UserSettingsLabelProvider } from '@theia/monaco-editor-core/esm/vs/base/common/keybindingLabels.js';
22
+ import { USLayoutResolvedKeybinding } from '@theia/monaco-editor-core/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js';
23
+ import * as MonacoPlatform from '@theia/monaco-editor-core/esm/vs/base/common/platform.js';
24
24
  import { KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
25
25
  import { KeyCode, KeySequence, Keystroke, Key, KeyModifier } from '@theia/core/lib/browser/keys';
26
26
  import { layoutModifiersIncludeShift } from '@theia/core/lib/common/keys';
27
27
  import { isOSX } from '@theia/core/lib/common/os';
28
- import { KEY_CODE_MAP } from './monaco-keycode-map';
28
+ import { KEY_CODE_MAP } from './monaco-keycode-map.js';
29
29
 
30
30
  export class MonacoResolvedKeybinding extends ResolvedKeybinding {
31
31
 
@@ -25,7 +25,7 @@ import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposa
25
25
  import { FileService } from '@theia/filesystem/lib/browser/file-service';
26
26
  import { FileOperationError } from '@theia/filesystem/lib/common/files';
27
27
  import * as monaco from '@theia/monaco-editor-core';
28
- import { SnippetParser } from '@theia/monaco-editor-core/esm/vs/editor/contrib/snippet/browser/snippetParser';
28
+ import { SnippetParser } from '@theia/monaco-editor-core/esm/vs/editor/contrib/snippet/browser/snippetParser.js';
29
29
  import { isObject } from '@theia/core/lib/common';
30
30
  import { ILogger } from '@theia/core';
31
31
 
@@ -15,8 +15,8 @@
15
15
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
16
  // *****************************************************************************
17
17
 
18
- import { IDisposable } from '@theia/monaco-editor-core/esm/vs/base/common/lifecycle';
19
- import { StandaloneThemeService } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneThemeService';
18
+ import { IDisposable } from '@theia/monaco-editor-core/esm/vs/base/common/lifecycle.js';
19
+ import { StandaloneThemeService } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneThemeService.js';
20
20
 
21
21
  export class MonacoStandaloneThemeService extends StandaloneThemeService {
22
22
  protected get styleElements(): HTMLStyleElement[] {
@@ -18,7 +18,7 @@ import { injectable } from '@theia/core/shared/inversify';
18
18
  import { DisposableCollection, nls } from '@theia/core';
19
19
  import { StatusBar, StatusBarAlignment, Widget, WidgetStatusBarContribution } from '@theia/core/lib/browser';
20
20
  import { EditorCommands, EditorWidget } from '@theia/editor/lib/browser';
21
- import { MonacoEditor } from './monaco-editor';
21
+ import { MonacoEditor } from './monaco-editor.js';
22
22
  import * as monaco from '@theia/monaco-editor-core';
23
23
 
24
24
  export const EDITOR_STATUS_TABBING_CONFIG = 'editor-status-tabbing-config';
@@ -18,17 +18,17 @@ import { inject, injectable, named, postConstruct } from '@theia/core/shared/inv
18
18
  import URI from '@theia/core/lib/common/uri';
19
19
  import { ResourceProvider, ReferenceCollection, Event, MaybePromise, Resource, ContributionProvider, OS, Emitter } from '@theia/core';
20
20
  import { EditorPreferences, EditorPreferenceChange } from '@theia/editor/lib/common/editor-preferences';
21
- import { MonacoEditorModel } from './monaco-editor-model';
22
- import { IDisposable, IReference } from '@theia/monaco-editor-core/esm/vs/base/common/lifecycle';
23
- import { MonacoToProtocolConverter } from './monaco-to-protocol-converter';
24
- import { ProtocolToMonacoConverter } from './protocol-to-monaco-converter';
21
+ import { MonacoEditorModel } from './monaco-editor-model.js';
22
+ import { IDisposable, IReference } from '@theia/monaco-editor-core/esm/vs/base/common/lifecycle.js';
23
+ import { MonacoToProtocolConverter } from './monaco-to-protocol-converter.js';
24
+ import { ProtocolToMonacoConverter } from './protocol-to-monaco-converter.js';
25
25
  import { ILogger } from '@theia/core/lib/common/logger';
26
26
  import * as monaco from '@theia/monaco-editor-core';
27
- import { ITextModelService, ITextModelContentProvider } from '@theia/monaco-editor-core/esm/vs/editor/common/services/resolverService';
28
- import { ITextModelUpdateOptions } from '@theia/monaco-editor-core/esm/vs/editor/common/model';
27
+ import { ITextModelService, ITextModelContentProvider } from '@theia/monaco-editor-core/esm/vs/editor/common/services/resolverService.js';
28
+ import { ITextModelUpdateOptions } from '@theia/monaco-editor-core/esm/vs/editor/common/model.js';
29
29
  import { FileService } from '@theia/filesystem/lib/browser/file-service';
30
- import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
31
- import { ITextResourcePropertiesService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/textResourceConfiguration';
30
+ import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js';
31
+ import { ITextResourcePropertiesService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/textResourceConfiguration.js';
32
32
 
33
33
  export const MonacoEditorModelFactory = Symbol('MonacoEditorModelFactory');
34
34
  export interface MonacoEditorModelFactory {
@@ -21,8 +21,8 @@ import * as jsoncparser from 'jsonc-parser';
21
21
  import * as plistparser from 'fast-plist';
22
22
  import URI from '@theia/core/lib/common/uri';
23
23
  import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
24
- import { MonacoThemeRegistry } from './textmate/monaco-theme-registry';
25
- import { getThemes, putTheme, MonacoThemeState, stateToTheme, ThemeServiceWithDB } from './monaco-indexed-db';
24
+ import { MonacoThemeRegistry } from './textmate/monaco-theme-registry.js';
25
+ import { getThemes, putTheme, MonacoThemeState, stateToTheme, ThemeServiceWithDB } from './monaco-indexed-db.js';
26
26
  import { FileService } from '@theia/filesystem/lib/browser/file-service';
27
27
  import * as monaco from '@theia/monaco-editor-core';
28
28
  import { ILogger } from '@theia/core';
@@ -16,9 +16,9 @@
16
16
 
17
17
  import { UndoRedoHandler } from '@theia/core/lib/browser';
18
18
  import { injectable } from '@theia/core/shared/inversify';
19
- import { ICodeEditor } from '@theia/monaco-editor-core/esm/vs/editor/browser/editorBrowser';
20
- import { ICodeEditorService } from '@theia/monaco-editor-core/esm/vs/editor/browser/services/codeEditorService';
21
- import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
19
+ import { ICodeEditor } from '@theia/monaco-editor-core/esm/vs/editor/browser/editorBrowser.js';
20
+ import { ICodeEditorService } from '@theia/monaco-editor-core/esm/vs/editor/browser/services/codeEditorService.js';
21
+ import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js';
22
22
 
23
23
  @injectable()
24
24
  export abstract class AbstractMonacoUndoRedoHandler implements UndoRedoHandler<ICodeEditor> {
@@ -14,7 +14,7 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- import { MonacoEditorModel } from './monaco-editor-model';
17
+ import { MonacoEditorModel } from './monaco-editor-model.js';
18
18
 
19
19
  export function insertFinalNewline(editorModel: MonacoEditorModel): void {
20
20
  const model = editorModel.textEditorModel;
@@ -15,8 +15,8 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { injectable } from '@theia/core/shared/inversify';
18
- import { Emitter } from '@theia/monaco-editor-core/esm/vs/base/common/event';
19
- import { URI } from '@theia/monaco-editor-core/esm/vs/base/common/uri';
18
+ import { Emitter } from '@theia/monaco-editor-core/esm/vs/base/common/event.js';
19
+ import { URI } from '@theia/monaco-editor-core/esm/vs/base/common/uri.js';
20
20
  import {
21
21
  ISingleFolderWorkspaceIdentifier,
22
22
  IWorkspace,
@@ -27,7 +27,7 @@ import {
27
27
  IWorkspaceIdentifier,
28
28
  UNKNOWN_EMPTY_WINDOW_WORKSPACE,
29
29
  WorkbenchState
30
- } from '@theia/monaco-editor-core/esm/vs/platform/workspace/common/workspace';
30
+ } from '@theia/monaco-editor-core/esm/vs/platform/workspace/common/workspace.js';
31
31
 
32
32
  /**
33
33
  * A minimal implementation of {@link IWorkspaceContextService} to replace the `StandaloneWorkspaceContextService` in Monaco
@@ -23,9 +23,9 @@ import { Emitter } from '@theia/core/lib/common/event';
23
23
  import { ILogger } from '@theia/core';
24
24
  import { FileSystemPreferences } from '@theia/filesystem/lib/common';
25
25
  import { EditorManager } from '@theia/editor/lib/browser';
26
- import { MonacoTextModelService } from './monaco-text-model-service';
27
- import { MonacoEditorModel, MonacoModelContentChangedEvent } from './monaco-editor-model';
28
- import { MonacoEditor } from './monaco-editor';
26
+ import { MonacoTextModelService } from './monaco-text-model-service.js';
27
+ import { MonacoEditorModel, MonacoModelContentChangedEvent } from './monaco-editor-model.js';
28
+ import { MonacoEditor } from './monaco-editor.js';
29
29
  import { ProblemManager } from '@theia/markers/lib/browser';
30
30
  import { ArrayUtils } from '@theia/core/lib/common/types';
31
31
  import { FileService } from '@theia/filesystem/lib/browser/file-service';
@@ -35,13 +35,13 @@ import {
35
35
  IBulkEditOptions,
36
36
  IBulkEditResult, ResourceEdit, ResourceFileEdit as MonacoResourceFileEdit,
37
37
  ResourceTextEdit as MonacoResourceTextEdit
38
- } from '@theia/monaco-editor-core/esm/vs/editor/browser/services/bulkEditService';
39
- import { IEditorWorkerService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/editorWorker';
40
- import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
41
- import { EndOfLineSequence } from '@theia/monaco-editor-core/esm/vs/editor/common/model';
42
- import { SnippetParser } from '@theia/monaco-editor-core/esm/vs/editor/contrib/snippet/browser/snippetParser';
43
- import { TextEdit } from '@theia/monaco-editor-core/esm/vs/editor/common/languages';
44
- import { SnippetController2 } from '@theia/monaco-editor-core/esm/vs/editor/contrib/snippet/browser/snippetController2';
38
+ } from '@theia/monaco-editor-core/esm/vs/editor/browser/services/bulkEditService.js';
39
+ import { IEditorWorkerService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/editorWorker.js';
40
+ import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js';
41
+ import { EndOfLineSequence } from '@theia/monaco-editor-core/esm/vs/editor/common/model.js';
42
+ import { SnippetParser } from '@theia/monaco-editor-core/esm/vs/editor/contrib/snippet/browser/snippetParser.js';
43
+ import { TextEdit } from '@theia/monaco-editor-core/esm/vs/editor/common/languages.js';
44
+ import { SnippetController2 } from '@theia/monaco-editor-core/esm/vs/editor/contrib/snippet/browser/snippetController2.js';
45
45
  import { isObject, MaybePromise, nls } from '@theia/core/lib/common';
46
46
  import { SaveableService } from '@theia/core/lib/browser';
47
47
  import { EditorPreferences } from '@theia/editor/lib/common/editor-preferences';
@@ -14,19 +14,19 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- import { EditorServiceOverrides, MonacoEditor, MonacoEditorServices } from './monaco-editor';
18
- import { CodeEditorWidget, ICodeEditorWidgetOptions } from '@theia/monaco-editor-core/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget';
19
- import { IInstantiationService } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/instantiation';
20
- import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
21
- import { ServiceCollection } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/serviceCollection';
17
+ import { EditorServiceOverrides, MonacoEditor, MonacoEditorServices } from './monaco-editor.js';
18
+ import { CodeEditorWidget, ICodeEditorWidgetOptions } from '@theia/monaco-editor-core/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js';
19
+ import { IInstantiationService } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/instantiation.js';
20
+ import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js';
21
+ import { ServiceCollection } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/serviceCollection.js';
22
22
  import { Disposable, DisposableCollection, Emitter, Event, TextDocumentContentChangeDelta, URI } from '@theia/core';
23
- import { MonacoEditorModel } from './monaco-editor-model';
23
+ import { MonacoEditorModel } from './monaco-editor-model.js';
24
24
  import { Dimension, EditorMouseEvent, MouseTarget, Position, TextDocumentChangeEvent } from '@theia/editor/lib/browser';
25
25
  import * as monaco from '@theia/monaco-editor-core';
26
26
  import { ElementExt } from '@theia/core/shared/@lumino/domutils';
27
27
  import { Selection } from '@theia/editor/lib/browser/editor';
28
- import { SelectionDirection } from '@theia/monaco-editor-core/esm/vs/editor/common/core/selection';
29
- import { ShowLightbulbIconMode } from '@theia/monaco-editor-core/esm/vs/editor/common/config/editorOptions';
28
+ import { SelectionDirection } from '@theia/monaco-editor-core/esm/vs/editor/common/core/selection.js';
29
+ import { ShowLightbulbIconMode } from '@theia/monaco-editor-core/esm/vs/editor/common/config/editorOptions.js';
30
30
 
31
31
  export class SimpleMonacoEditor extends MonacoEditorServices implements Disposable {
32
32
 
@@ -14,7 +14,7 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- export * from './textmate-registry';
18
- export * from './textmate-contribution';
19
- export * from './monaco-textmate-service';
20
- export * from './monaco-textmate-frontend-bindings';
17
+ export * from './textmate-registry.js';
18
+ export * from './textmate-contribution.js';
19
+ export * from './monaco-textmate-service.js';
20
+ export * from './monaco-textmate-frontend-bindings.js';
@@ -17,20 +17,21 @@
17
17
  import { interfaces } from '@theia/core/shared/inversify';
18
18
  import { FrontendApplicationContribution, isBasicWasmSupported } from '@theia/core/lib/browser';
19
19
  import { bindRootContributionProvider } from '@theia/core';
20
- import { TextmateRegistry } from './textmate-registry';
21
- import { LanguageGrammarDefinitionContribution } from './textmate-contribution';
22
- import { MonacoTextmateService } from './monaco-textmate-service';
23
- import { MonacoThemeRegistry } from './monaco-theme-registry';
24
- import { loadWASM, createOnigScanner, OnigScanner, createOnigString, OnigString } from 'vscode-oniguruma';
25
- import { IOnigLib, IRawGrammar, parseRawGrammar, Registry } from 'vscode-textmate';
26
- import { OnigasmProvider, TextmateRegistryFactory, ThemeMix } from './monaco-theme-types';
20
+ import { TextmateRegistry } from './textmate-registry.js';
21
+ import { LanguageGrammarDefinitionContribution } from './textmate-contribution.js';
22
+ import { MonacoTextmateService } from './monaco-textmate-service.js';
23
+ import { MonacoThemeRegistry } from './monaco-theme-registry.js';
24
+ // CommonJS modules whose exports cannot be detected statically, so they are imported as a whole.
25
+ import vscodeOniguruma, { type OnigScanner, type OnigString } from 'vscode-oniguruma';
26
+ import vscodeTextmate, { type IOnigLib, type IRawGrammar } from 'vscode-textmate';
27
+ import { OnigasmProvider, TextmateRegistryFactory, ThemeMix } from './monaco-theme-types.js';
27
28
 
28
29
  export class OnigasmLib implements IOnigLib {
29
30
  createOnigScanner(sources: string[]): OnigScanner {
30
- return createOnigScanner(sources);
31
+ return vscodeOniguruma.createOnigScanner(sources);
31
32
  }
32
33
  createOnigString(sources: string): OnigString {
33
- return createOnigString(sources);
34
+ return vscodeOniguruma.createOnigString(sources);
34
35
  }
35
36
  }
36
37
 
@@ -45,7 +46,7 @@ export default (bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: inter
45
46
  bind(TextmateRegistryFactory).toFactory(({ container }) => (theme?: ThemeMix) => {
46
47
  const onigProvider = container.get<OnigasmProvider>(OnigasmProvider);
47
48
  const textmateRegistry = container.get(TextmateRegistry);
48
- return new Registry({
49
+ return new vscodeTextmate.Registry({
49
50
  onigLib: onigProvider(),
50
51
  theme,
51
52
  loadGrammar: async (scopeName: string) => {
@@ -54,7 +55,7 @@ export default (bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: inter
54
55
  const definition = await provider.getGrammarDefinition();
55
56
  let rawGrammar: IRawGrammar;
56
57
  if (typeof definition.content === 'string') {
57
- rawGrammar = parseRawGrammar(definition.content, definition.format === 'json' ? 'grammar.json' : 'grammar.plist');
58
+ rawGrammar = vscodeTextmate.parseRawGrammar(definition.content, definition.format === 'json' ? 'grammar.json' : 'grammar.plist');
58
59
  } else {
59
60
  rawGrammar = definition.content as IRawGrammar;
60
61
  }
@@ -78,13 +79,14 @@ export async function createOnigasmLib(): Promise<IOnigLib> {
78
79
  throw new Error('wasm not supported');
79
80
  }
80
81
  const wasm = await fetchOnigasm();
81
- await loadWASM(wasm);
82
+ await vscodeOniguruma.loadWASM(wasm);
82
83
  return new OnigasmLib();
83
84
  }
84
85
 
85
86
  export async function fetchOnigasm(): Promise<ArrayBuffer> {
86
- // Using Webpack's wasm loader should give us a URL to fetch the resource from:
87
- const onigasmPath: string = require('vscode-oniguruma/release/onig.wasm');
88
- const response = await fetch(onigasmPath, { method: 'GET' });
87
+ // The bundler's loader for `.wasm` files gives us a URL to fetch the resource from.
88
+ // It is imported when needed, as Node would load it as a WebAssembly module.
89
+ const { default: onigasmUrl } = await import('vscode-oniguruma/release/onig.wasm');
90
+ const response = await fetch(onigasmUrl, { method: 'GET' });
89
91
  return response.arrayBuffer();
90
92
  }
@@ -19,19 +19,19 @@ import { Registry } from 'vscode-textmate';
19
19
  import { ILogger, ContributionProvider, DisposableCollection, Disposable } from '@theia/core';
20
20
  import { FrontendApplicationContribution, isBasicWasmSupported } from '@theia/core/lib/browser';
21
21
  import { ThemeService } from '@theia/core/lib/browser/theming';
22
- import { LanguageGrammarDefinitionContribution, getEncodedLanguageId } from './textmate-contribution';
23
- import { createTextmateTokenizer, TokenizerOption } from './textmate-tokenizer';
24
- import { TextmateRegistry } from './textmate-registry';
25
- import { MonacoThemeRegistry } from './monaco-theme-registry';
22
+ import { LanguageGrammarDefinitionContribution, getEncodedLanguageId } from './textmate-contribution.js';
23
+ import { createTextmateTokenizer, TokenizerOption } from './textmate-tokenizer.js';
24
+ import { TextmateRegistry } from './textmate-registry.js';
25
+ import { MonacoThemeRegistry } from './monaco-theme-registry.js';
26
26
  import { EditorPreferences } from '@theia/editor/lib/common/editor-preferences';
27
27
  import * as monaco from '@theia/monaco-editor-core';
28
- import { TokenizationRegistry } from '@theia/monaco-editor-core/esm/vs/editor/common/languages';
29
- import { IStandaloneThemeService } from '@theia/monaco-editor-core/esm/vs/editor/standalone/common/standaloneTheme';
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 { TokenizationSupportAdapter } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneLanguages';
33
- import { LanguageService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/languageService';
34
- import { OnigasmProvider, TextmateRegistryFactory } from './monaco-theme-types';
28
+ import { TokenizationRegistry } from '@theia/monaco-editor-core/esm/vs/editor/common/languages.js';
29
+ import { IStandaloneThemeService } from '@theia/monaco-editor-core/esm/vs/editor/standalone/common/standaloneTheme.js';
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 { TokenizationSupportAdapter } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneLanguages.js';
33
+ import { LanguageService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/languageService.js';
34
+ import { OnigasmProvider, TextmateRegistryFactory } from './monaco-theme-types.js';
35
35
 
36
36
  @injectable()
37
37
  export class MonacoTextmateService implements FrontendApplicationContribution {
@@ -20,13 +20,23 @@
20
20
  import { inject, injectable, named } from '@theia/core/shared/inversify';
21
21
  import { IRawTheme } from 'vscode-textmate';
22
22
  import * as monaco from '@theia/monaco-editor-core';
23
- import { IStandaloneThemeService } from '@theia/monaco-editor-core/esm/vs/editor/standalone/common/standaloneTheme';
24
- import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
25
- import { StandaloneThemeService } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneThemeService';
26
- import { Color } from '@theia/monaco-editor-core/esm/vs/base/common/color';
27
- import { MixStandaloneTheme, MonacoThemeColor, TextmateRegistryFactory, ThemeMix } from './monaco-theme-types';
23
+ import { IStandaloneThemeService } from '@theia/monaco-editor-core/esm/vs/editor/standalone/common/standaloneTheme.js';
24
+ import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js';
25
+ import { StandaloneThemeService } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneThemeService.js';
26
+ import { Color } from '@theia/monaco-editor-core/esm/vs/base/common/color.js';
27
+ import { MixStandaloneTheme, MonacoThemeColor, TextmateRegistryFactory, ThemeMix } from './monaco-theme-types.js';
28
28
  import { ILogger } from '@theia/core';
29
29
  import { ThemeType } from '@theia/core/lib/common/theme';
30
+ import darkPlusTheme from '../../../data/monaco-themes/vscode/dark_plus.json' with { type: 'json' };
31
+ import darkTheiaTheme from '../../../data/monaco-themes/vscode/dark_theia.json' with { type: 'json' };
32
+ import darkVsTheme from '../../../data/monaco-themes/vscode/dark_vs.json' with { type: 'json' };
33
+ import hcBlackTheme from '../../../data/monaco-themes/vscode/hc_black.json' with { type: 'json' };
34
+ import hcLightTheme from '../../../data/monaco-themes/vscode/hc_light.json' with { type: 'json' };
35
+ import hcTheiaTheme from '../../../data/monaco-themes/vscode/hc_theia.json' with { type: 'json' };
36
+ import hcTheiaLightTheme from '../../../data/monaco-themes/vscode/hc_theia_light.json' with { type: 'json' };
37
+ import lightPlusTheme from '../../../data/monaco-themes/vscode/light_plus.json' with { type: 'json' };
38
+ import lightTheiaTheme from '../../../data/monaco-themes/vscode/light_theia.json' with { type: 'json' };
39
+ import lightVsTheme from '../../../data/monaco-themes/vscode/light_vs.json' with { type: 'json' };
30
40
 
31
41
  @injectable()
32
42
  export class MonacoThemeRegistry {
@@ -37,19 +47,19 @@ export class MonacoThemeRegistry {
37
47
  protected readonly logger: ILogger;
38
48
 
39
49
  initializeDefaultThemes(): void {
40
- this.register(require('../../../data/monaco-themes/vscode/dark_theia.json'), {
41
- './dark_vs.json': require('../../../data/monaco-themes/vscode/dark_vs.json'),
42
- './dark_plus.json': require('../../../data/monaco-themes/vscode/dark_plus.json')
50
+ this.register(darkTheiaTheme, {
51
+ './dark_vs.json': darkVsTheme,
52
+ './dark_plus.json': darkPlusTheme
43
53
  }, 'dark-theia', 'vs-dark');
44
- this.register(require('../../../data/monaco-themes/vscode/light_theia.json'), {
45
- './light_vs.json': require('../../../data/monaco-themes/vscode/light_vs.json'),
46
- './light_plus.json': require('../../../data/monaco-themes/vscode/light_plus.json'),
54
+ this.register(lightTheiaTheme, {
55
+ './light_vs.json': lightVsTheme,
56
+ './light_plus.json': lightPlusTheme,
47
57
  }, 'light-theia', 'vs');
48
- this.register(require('../../../data/monaco-themes/vscode/hc_theia.json'), {
49
- './hc_black.json': require('../../../data/monaco-themes/vscode/hc_black.json')
58
+ this.register(hcTheiaTheme, {
59
+ './hc_black.json': hcBlackTheme
50
60
  }, 'hc-theia', 'hc-black');
51
- this.register(require('../../../data/monaco-themes/vscode/hc_theia_light.json'), {
52
- './hc_light.json': require('../../../data/monaco-themes/vscode/hc_light.json')
61
+ this.register(hcTheiaLightTheme, {
62
+ './hc_light.json': hcLightTheme
53
63
  }, 'hc-theia-light', 'hc-light');
54
64
  }
55
65
 
@@ -15,7 +15,7 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { expect } from 'chai';
18
- import { MonacoThemeColor } from './monaco-theme-types';
18
+ import { MonacoThemeColor } from './monaco-theme-types.js';
19
19
 
20
20
  describe('MonacoThemeColor', () => {
21
21
 
@@ -15,7 +15,7 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import * as monaco from '@theia/monaco-editor-core';
18
- import { IStandaloneTheme } from '@theia/monaco-editor-core/esm/vs/editor/standalone/common/standaloneTheme';
18
+ import { IStandaloneTheme } from '@theia/monaco-editor-core/esm/vs/editor/standalone/common/standaloneTheme.js';
19
19
  import { IOnigLib, IRawTheme, Registry } from 'vscode-textmate';
20
20
 
21
21
  export interface ThemeMix extends IRawTheme, monaco.editor.IStandaloneThemeData { }
@@ -14,7 +14,7 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- import { TextmateRegistry } from './textmate-registry';
17
+ import { TextmateRegistry } from './textmate-registry.js';
18
18
  import * as monaco from '@theia/monaco-editor-core';
19
19
 
20
20
  /**
@@ -16,7 +16,7 @@
16
16
 
17
17
  import { injectable, inject, named } from '@theia/core/shared/inversify';
18
18
  import { IGrammarConfiguration } from 'vscode-textmate';
19
- import { TokenizerOption } from './textmate-tokenizer';
19
+ import { TokenizerOption } from './textmate-tokenizer.js';
20
20
  import { Disposable } from '@theia/core/lib/common/disposable';
21
21
  import { ILogger } from '@theia/core';
22
22