@theia/core 1.59.0-next.72 → 1.60.0-next.43

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 (285) hide show
  1. package/README.md +16 -16
  2. package/i18n/nls.cs.json +344 -23
  3. package/i18n/nls.de.json +344 -23
  4. package/i18n/nls.es.json +344 -23
  5. package/i18n/nls.fr.json +344 -23
  6. package/i18n/nls.hu.json +344 -23
  7. package/i18n/nls.it.json +344 -23
  8. package/i18n/nls.ja.json +344 -23
  9. package/i18n/nls.json +344 -23
  10. package/i18n/nls.ko.json +344 -23
  11. package/i18n/nls.pl.json +344 -23
  12. package/i18n/nls.pt-br.json +344 -23
  13. package/i18n/nls.ru.json +344 -23
  14. package/i18n/nls.tr.json +344 -23
  15. package/i18n/nls.zh-cn.json +344 -23
  16. package/i18n/nls.zh-tw.json +344 -23
  17. package/lib/browser/about-dialog.d.ts.map +1 -1
  18. package/lib/browser/about-dialog.js +3 -2
  19. package/lib/browser/about-dialog.js.map +1 -1
  20. package/lib/browser/browser.d.ts +2 -0
  21. package/lib/browser/browser.d.ts.map +1 -1
  22. package/lib/browser/browser.js +6 -1
  23. package/lib/browser/browser.js.map +1 -1
  24. package/lib/browser/catalog.json +207 -14
  25. package/lib/browser/common-frontend-contribution.d.ts +2 -0
  26. package/lib/browser/common-frontend-contribution.d.ts.map +1 -1
  27. package/lib/browser/common-frontend-contribution.js +56 -22
  28. package/lib/browser/common-frontend-contribution.js.map +1 -1
  29. package/lib/browser/common-styling-participants.js +25 -25
  30. package/lib/browser/context-menu-renderer.d.ts +3 -3
  31. package/lib/browser/context-menu-renderer.d.ts.map +1 -1
  32. package/lib/browser/core-preferences.js +5 -5
  33. package/lib/browser/core-preferences.js.map +1 -1
  34. package/lib/browser/menu/browser-context-menu-renderer.d.ts.map +1 -1
  35. package/lib/browser/menu/browser-context-menu-renderer.js +1 -2
  36. package/lib/browser/menu/browser-context-menu-renderer.js.map +1 -1
  37. package/lib/browser/menu/browser-menu-plugin.d.ts +5 -5
  38. package/lib/browser/menu/browser-menu-plugin.d.ts.map +1 -1
  39. package/lib/browser/menu/browser-menu-plugin.js +23 -13
  40. package/lib/browser/menu/browser-menu-plugin.js.map +1 -1
  41. package/lib/browser/preferences/injectable-preference-proxy.d.ts +1 -1
  42. package/lib/browser/preferences/injectable-preference-proxy.d.ts.map +1 -1
  43. package/lib/browser/preferences/preference-contribution.d.ts +1 -1
  44. package/lib/browser/preferences/preference-contribution.d.ts.map +1 -1
  45. package/lib/browser/preferences/preference-provider.d.ts +1 -1
  46. package/lib/browser/preferences/preference-provider.d.ts.map +1 -1
  47. package/lib/browser/preferences/preference-provider.js +1 -1
  48. package/lib/browser/preferences/preference-provider.js.map +1 -1
  49. package/lib/browser/preferences/preference-service.d.ts +1 -1
  50. package/lib/browser/preferences/preference-service.d.ts.map +1 -1
  51. package/lib/browser/preferences/preference-service.js +3 -3
  52. package/lib/browser/preferences/preference-service.js.map +1 -1
  53. package/lib/browser/preferences/preference-validation-service.d.ts +1 -1
  54. package/lib/browser/preferences/preference-validation-service.d.ts.map +1 -1
  55. package/lib/browser/preload/i18n-preload-contribution.d.ts +4 -0
  56. package/lib/browser/preload/i18n-preload-contribution.d.ts.map +1 -1
  57. package/lib/browser/preload/i18n-preload-contribution.js +23 -1
  58. package/lib/browser/preload/i18n-preload-contribution.js.map +1 -1
  59. package/lib/browser/preload/preload-module.d.ts.map +1 -1
  60. package/lib/browser/preload/preload-module.js +5 -3
  61. package/lib/browser/preload/preload-module.js.map +1 -1
  62. package/lib/browser/preload/text-replacement-contribution.d.ts +37 -0
  63. package/lib/browser/preload/text-replacement-contribution.d.ts.map +1 -0
  64. package/lib/browser/preload/text-replacement-contribution.js +20 -0
  65. package/lib/browser/preload/text-replacement-contribution.js.map +1 -0
  66. package/lib/browser/saveable.d.ts +11 -3
  67. package/lib/browser/saveable.d.ts.map +1 -1
  68. package/lib/browser/saveable.js +2 -1
  69. package/lib/browser/saveable.js.map +1 -1
  70. package/lib/browser/shell/application-shell-mouse-tracker.d.ts +1 -1
  71. package/lib/browser/shell/application-shell-mouse-tracker.d.ts.map +1 -1
  72. package/lib/browser/shell/application-shell-mouse-tracker.js +3 -3
  73. package/lib/browser/shell/application-shell-mouse-tracker.js.map +1 -1
  74. package/lib/browser/shell/application-shell.d.ts +10 -7
  75. package/lib/browser/shell/application-shell.d.ts.map +1 -1
  76. package/lib/browser/shell/application-shell.js +24 -21
  77. package/lib/browser/shell/application-shell.js.map +1 -1
  78. package/lib/browser/shell/shell-layout-restorer.d.ts +1 -1
  79. package/lib/browser/shell/shell-layout-restorer.d.ts.map +1 -1
  80. package/lib/browser/shell/side-panel-handler.d.ts +2 -2
  81. package/lib/browser/shell/side-panel-handler.d.ts.map +1 -1
  82. package/lib/browser/shell/side-panel-handler.js +13 -12
  83. package/lib/browser/shell/side-panel-handler.js.map +1 -1
  84. package/lib/browser/shell/side-panel-toolbar.d.ts +2 -2
  85. package/lib/browser/shell/side-panel-toolbar.d.ts.map +1 -1
  86. package/lib/browser/shell/side-panel-toolbar.js +1 -1
  87. package/lib/browser/shell/side-panel-toolbar.js.map +1 -1
  88. package/lib/browser/shell/sidebar-bottom-menu-widget.d.ts.map +1 -1
  89. package/lib/browser/shell/sidebar-bottom-menu-widget.js +2 -1
  90. package/lib/browser/shell/sidebar-bottom-menu-widget.js.map +1 -1
  91. package/lib/browser/shell/sidebar-menu-widget.d.ts.map +1 -1
  92. package/lib/browser/shell/sidebar-menu-widget.js +1 -0
  93. package/lib/browser/shell/sidebar-menu-widget.js.map +1 -1
  94. package/lib/browser/shell/split-panels.d.ts +1 -1
  95. package/lib/browser/shell/split-panels.d.ts.map +1 -1
  96. package/lib/browser/shell/split-panels.js +1 -1
  97. package/lib/browser/shell/split-panels.js.map +1 -1
  98. package/lib/browser/shell/tab-bar-decorator.d.ts +1 -1
  99. package/lib/browser/shell/tab-bar-decorator.d.ts.map +1 -1
  100. package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar.d.ts +1 -1
  101. package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar.d.ts.map +1 -1
  102. package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar.js +3 -3
  103. package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar.js.map +1 -1
  104. package/lib/browser/shell/tab-bars.d.ts +18 -12
  105. package/lib/browser/shell/tab-bars.d.ts.map +1 -1
  106. package/lib/browser/shell/tab-bars.js +80 -51
  107. package/lib/browser/shell/tab-bars.js.map +1 -1
  108. package/lib/browser/shell/tab-bars.spec.js +1 -1
  109. package/lib/browser/shell/tab-bars.spec.js.map +1 -1
  110. package/lib/browser/shell/theia-dock-panel.d.ts +2 -2
  111. package/lib/browser/shell/theia-dock-panel.d.ts.map +1 -1
  112. package/lib/browser/shell/theia-dock-panel.js +3 -3
  113. package/lib/browser/shell/theia-dock-panel.js.map +1 -1
  114. package/lib/browser/shell/view-column-service.d.ts +1 -1
  115. package/lib/browser/shell/view-column-service.d.ts.map +1 -1
  116. package/lib/browser/shell/view-column-service.js +1 -1
  117. package/lib/browser/shell/view-column-service.js.map +1 -1
  118. package/lib/browser/shell/view-contribution.d.ts +1 -1
  119. package/lib/browser/shell/view-contribution.d.ts.map +1 -1
  120. package/lib/browser/source-tree/source-tree.d.ts.map +1 -1
  121. package/lib/browser/source-tree/source-tree.js +3 -2
  122. package/lib/browser/source-tree/source-tree.js.map +1 -1
  123. package/lib/browser/source-tree/tree-source.d.ts +1 -0
  124. package/lib/browser/source-tree/tree-source.d.ts.map +1 -1
  125. package/lib/browser/source-tree/tree-source.js.map +1 -1
  126. package/lib/browser/tree/tree-widget.d.ts +1 -1
  127. package/lib/browser/tree/tree-widget.d.ts.map +1 -1
  128. package/lib/browser/tree/tree-widget.js +2 -1
  129. package/lib/browser/tree/tree-widget.js.map +1 -1
  130. package/lib/browser/view-container.d.ts +6 -7
  131. package/lib/browser/view-container.d.ts.map +1 -1
  132. package/lib/browser/view-container.js +31 -27
  133. package/lib/browser/view-container.js.map +1 -1
  134. package/lib/browser/widget-manager.d.ts +1 -1
  135. package/lib/browser/widget-manager.d.ts.map +1 -1
  136. package/lib/browser/widget-manager.js +1 -1
  137. package/lib/browser/widget-manager.js.map +1 -1
  138. package/lib/browser/widget-manager.spec.js +1 -1
  139. package/lib/browser/widget-manager.spec.js.map +1 -1
  140. package/lib/browser/widgets/react-widget.d.ts +1 -1
  141. package/lib/browser/widgets/react-widget.d.ts.map +1 -1
  142. package/lib/browser/widgets/react-widget.js +1 -1
  143. package/lib/browser/widgets/react-widget.js.map +1 -1
  144. package/lib/browser/widgets/widget.d.ts +6 -6
  145. package/lib/browser/widgets/widget.d.ts.map +1 -1
  146. package/lib/browser/widgets/widget.js +10 -8
  147. package/lib/browser/widgets/widget.js.map +1 -1
  148. package/lib/common/i18n/localization.d.ts +2 -3
  149. package/lib/common/i18n/localization.d.ts.map +1 -1
  150. package/lib/common/i18n/localization.js +10 -3
  151. package/lib/common/i18n/localization.js.map +1 -1
  152. package/lib/common/json-schema.d.ts +1 -1
  153. package/lib/common/json-schema.d.ts.map +1 -1
  154. package/lib/common/preferences/preference-schema.d.ts +4 -1
  155. package/lib/common/preferences/preference-schema.d.ts.map +1 -1
  156. package/lib/common/preferences/preference-schema.js.map +1 -1
  157. package/lib/common/theme.d.ts +2 -0
  158. package/lib/common/theme.d.ts.map +1 -1
  159. package/lib/common/theme.js +5 -1
  160. package/lib/common/theme.js.map +1 -1
  161. package/lib/electron-browser/menu/electron-context-menu-renderer.d.ts.map +1 -1
  162. package/lib/electron-browser/menu/electron-context-menu-renderer.js +3 -1
  163. package/lib/electron-browser/menu/electron-context-menu-renderer.js.map +1 -1
  164. package/lib/electron-browser/menu/electron-menu-contribution.d.ts +1 -1
  165. package/lib/electron-browser/menu/electron-menu-contribution.d.ts.map +1 -1
  166. package/lib/electron-browser/menu/electron-menu-contribution.js +6 -4
  167. package/lib/electron-browser/menu/electron-menu-contribution.js.map +1 -1
  168. package/lib/electron-browser/preload.d.ts.map +1 -1
  169. package/lib/electron-browser/preload.js +3 -0
  170. package/lib/electron-browser/preload.js.map +1 -1
  171. package/lib/electron-common/electron-api.d.ts +3 -0
  172. package/lib/electron-common/electron-api.d.ts.map +1 -1
  173. package/lib/electron-common/electron-api.js +2 -1
  174. package/lib/electron-common/electron-api.js.map +1 -1
  175. package/lib/electron-main/electron-api-main.d.ts.map +1 -1
  176. package/lib/electron-main/electron-api-main.js +1 -0
  177. package/lib/electron-main/electron-api-main.js.map +1 -1
  178. package/lib/electron-main/electron-main-application.d.ts +2 -0
  179. package/lib/electron-main/electron-main-application.d.ts.map +1 -1
  180. package/lib/electron-main/electron-main-application.js +3 -0
  181. package/lib/electron-main/electron-main-application.js.map +1 -1
  182. package/lib/node/messaging/websocket-frontend-connection-service.js +1 -1
  183. package/package.json +26 -26
  184. package/shared/@lumino/algorithm/index.d.ts +1 -0
  185. package/shared/@lumino/algorithm/index.js +1 -0
  186. package/shared/@lumino/commands/index.d.ts +1 -0
  187. package/shared/@lumino/commands/index.js +1 -0
  188. package/shared/@lumino/coreutils/index.d.ts +1 -0
  189. package/shared/@lumino/coreutils/index.js +1 -0
  190. package/shared/@lumino/domutils/index.d.ts +1 -0
  191. package/shared/@lumino/domutils/index.js +1 -0
  192. package/shared/@lumino/dragdrop/index.d.ts +1 -0
  193. package/shared/@lumino/dragdrop/index.js +1 -0
  194. package/shared/@lumino/messaging/index.d.ts +1 -0
  195. package/shared/@lumino/messaging/index.js +1 -0
  196. package/shared/@lumino/properties/index.d.ts +1 -0
  197. package/shared/@lumino/properties/index.js +1 -0
  198. package/shared/@lumino/signaling/index.d.ts +1 -0
  199. package/shared/@lumino/signaling/index.js +1 -0
  200. package/shared/@lumino/virtualdom/index.d.ts +1 -0
  201. package/shared/@lumino/virtualdom/index.js +1 -0
  202. package/shared/@lumino/widgets/index.d.ts +1 -0
  203. package/shared/@lumino/widgets/index.js +1 -0
  204. package/src/browser/about-dialog.tsx +3 -2
  205. package/src/browser/browser.ts +6 -1
  206. package/src/browser/common-frontend-contribution.ts +54 -22
  207. package/src/browser/common-styling-participants.ts +25 -25
  208. package/src/browser/context-menu-renderer.ts +3 -3
  209. package/src/browser/core-preferences.ts +5 -5
  210. package/src/browser/menu/browser-context-menu-renderer.ts +1 -2
  211. package/src/browser/menu/browser-menu-plugin.ts +24 -14
  212. package/src/browser/preferences/injectable-preference-proxy.ts +1 -1
  213. package/src/browser/preferences/preference-contribution.ts +1 -1
  214. package/src/browser/preferences/preference-provider.ts +1 -1
  215. package/src/browser/preferences/preference-service.ts +1 -1
  216. package/src/browser/preferences/preference-validation-service.spec.ts +1 -1
  217. package/src/browser/preferences/preference-validation-service.ts +1 -1
  218. package/src/browser/preload/i18n-preload-contribution.ts +22 -2
  219. package/src/browser/preload/preload-module.ts +5 -3
  220. package/src/browser/preload/text-replacement-contribution.ts +53 -0
  221. package/src/browser/saveable.ts +13 -3
  222. package/src/browser/shell/application-shell-mouse-tracker.ts +3 -3
  223. package/src/browser/shell/application-shell.ts +36 -32
  224. package/src/browser/shell/shell-layout-restorer.ts +1 -1
  225. package/src/browser/shell/side-panel-handler.ts +13 -12
  226. package/src/browser/shell/side-panel-toolbar.ts +2 -2
  227. package/src/browser/shell/sidebar-bottom-menu-widget.tsx +2 -1
  228. package/src/browser/shell/sidebar-menu-widget.tsx +1 -0
  229. package/src/browser/shell/split-panels.ts +1 -1
  230. package/src/browser/shell/tab-bar-decorator.ts +1 -1
  231. package/src/browser/shell/tab-bar-toolbar/tab-bar-toolbar.tsx +3 -3
  232. package/src/browser/shell/tab-bars.spec.ts +1 -1
  233. package/src/browser/shell/tab-bars.ts +93 -57
  234. package/src/browser/shell/theia-dock-panel.ts +3 -3
  235. package/src/browser/shell/view-column-service.ts +2 -2
  236. package/src/browser/shell/view-contribution.ts +1 -1
  237. package/src/browser/source-tree/source-tree.ts +3 -2
  238. package/src/browser/source-tree/tree-source.ts +1 -0
  239. package/src/browser/style/dialog.css +12 -12
  240. package/src/browser/style/dockpanel.css +19 -19
  241. package/src/browser/style/hover-service.css +1 -0
  242. package/src/browser/style/index.css +3 -3
  243. package/src/browser/style/menus.css +34 -31
  244. package/src/browser/style/sidepanel.css +52 -48
  245. package/src/browser/style/split-widget.css +5 -5
  246. package/src/browser/style/tabs.css +91 -97
  247. package/src/browser/style/view-container.css +14 -14
  248. package/src/browser/tree/tree-widget.tsx +3 -2
  249. package/src/browser/view-container.ts +40 -36
  250. package/src/browser/widget-manager.spec.ts +1 -1
  251. package/src/browser/widget-manager.ts +1 -1
  252. package/src/browser/widgets/react-widget.tsx +1 -1
  253. package/src/browser/widgets/widget.ts +11 -9
  254. package/src/common/i18n/localization.ts +10 -4
  255. package/src/common/i18n/nls.metadata.json +34921 -32708
  256. package/src/common/json-schema.ts +1 -1
  257. package/src/common/preferences/preference-schema.ts +4 -1
  258. package/src/common/theme.ts +6 -0
  259. package/src/electron-browser/menu/electron-context-menu-renderer.ts +3 -1
  260. package/src/electron-browser/menu/electron-menu-contribution.ts +6 -5
  261. package/src/electron-browser/preload.ts +6 -3
  262. package/src/electron-common/electron-api.ts +3 -0
  263. package/src/electron-main/electron-api-main.ts +4 -1
  264. package/src/electron-main/electron-main-application.ts +5 -0
  265. package/src/node/messaging/websocket-frontend-connection-service.ts +1 -2
  266. package/shared/@phosphor/algorithm/index.d.ts +0 -1
  267. package/shared/@phosphor/algorithm/index.js +0 -1
  268. package/shared/@phosphor/commands/index.d.ts +0 -1
  269. package/shared/@phosphor/commands/index.js +0 -1
  270. package/shared/@phosphor/coreutils/index.d.ts +0 -1
  271. package/shared/@phosphor/coreutils/index.js +0 -1
  272. package/shared/@phosphor/domutils/index.d.ts +0 -1
  273. package/shared/@phosphor/domutils/index.js +0 -1
  274. package/shared/@phosphor/dragdrop/index.d.ts +0 -1
  275. package/shared/@phosphor/dragdrop/index.js +0 -1
  276. package/shared/@phosphor/messaging/index.d.ts +0 -1
  277. package/shared/@phosphor/messaging/index.js +0 -1
  278. package/shared/@phosphor/properties/index.d.ts +0 -1
  279. package/shared/@phosphor/properties/index.js +0 -1
  280. package/shared/@phosphor/signaling/index.d.ts +0 -1
  281. package/shared/@phosphor/signaling/index.js +0 -1
  282. package/shared/@phosphor/virtualdom/index.d.ts +0 -1
  283. package/shared/@phosphor/virtualdom/index.js +0 -1
  284. package/shared/@phosphor/widgets/index.d.ts +0 -1
  285. package/shared/@phosphor/widgets/index.js +0 -1
@@ -138,14 +138,14 @@ export class MenuStylingParticipant implements StylingParticipant {
138
138
  if (isHighContrast(theme.type) && focusBorder) {
139
139
  // Menu items
140
140
  collector.addRule(`
141
- .p-Menu .p-Menu-item.p-mod-active {
141
+ .lm-Menu .lm-Menu-item.lm-mod-active {
142
142
  outline: 1px solid ${focusBorder};
143
143
  outline-offset: -1px;
144
144
  }
145
- .p-MenuBar .p-MenuBar-item.p-mod-active {
145
+ .lm-MenuBar .lm-MenuBar-item.lm-mod-active {
146
146
  outline: 1px dashed ${focusBorder};
147
147
  }
148
- .p-MenuBar.p-mod-active .p-MenuBar-item.p-mod-active {
148
+ .lm-MenuBar.lm-mod-active .lm-MenuBar-item.lm-mod-active {
149
149
  outline: 1px solid ${focusBorder};
150
150
  }
151
151
  `);
@@ -166,7 +166,7 @@ export class BadgeStylingParticipant implements StylingParticipant {
166
166
  const contrastBorder = theme.getColor('contrastBorder');
167
167
 
168
168
  if (isHighContrast(theme.type) && contrastBorder) {
169
- collector.addRule(`.p-TabBar .theia-badge-decorator-sidebar {
169
+ collector.addRule(`.lm-TabBar .theia-badge-decorator-sidebar {
170
170
  outline: 1px solid ${contrastBorder};
171
171
  }`);
172
172
  }
@@ -182,20 +182,20 @@ export class TabbarStylingParticipant implements StylingParticipant {
182
182
 
183
183
  if (highContrast && focusBorder) {
184
184
  collector.addRule(`
185
- #theia-bottom-content-panel .p-TabBar .p-TabBar-tab,
186
- #theia-main-content-panel .p-TabBar .p-TabBar-tab {
185
+ #theia-bottom-content-panel .lm-TabBar .lm-TabBar-tab,
186
+ #theia-main-content-panel .lm-TabBar .lm-TabBar-tab {
187
187
  outline-offset: -4px;
188
188
  }
189
- #theia-bottom-content-panel .p-TabBar .p-TabBar-tab.p-mod-current,
190
- #theia-main-content-panel .p-TabBar .p-TabBar-tab.p-mod-current {
189
+ #theia-bottom-content-panel .lm-TabBar .lm-TabBar-tab.lm-mod-current,
190
+ #theia-main-content-panel .lm-TabBar .lm-TabBar-tab.lm-mod-current {
191
191
  outline: 1px solid ${focusBorder};
192
192
  }
193
- #theia-bottom-content-panel .p-TabBar:not(.theia-tabBar-active) .p-TabBar-tab.p-mod-current,
194
- #theia-main-content-panel .p-TabBar:not(.theia-tabBar-active) .p-TabBar-tab.p-mod-current {
193
+ #theia-bottom-content-panel .lm-TabBar:not(.theia-tabBar-active) .lm-TabBar-tab.lm-mod-current,
194
+ #theia-main-content-panel .lm-TabBar:not(.theia-tabBar-active) .lm-TabBar-tab.lm-mod-current {
195
195
  outline: 1px dotted ${focusBorder};
196
196
  }
197
- #theia-bottom-content-panel .p-TabBar .p-TabBar-tab:not(.p-mod-current):hover,
198
- #theia-main-content-panel .p-TabBar .p-TabBar-tab:not(.p-mod-current):hover {
197
+ #theia-bottom-content-panel .lm-TabBar .lm-TabBar-tab:not(.lm-mod-current):hover,
198
+ #theia-main-content-panel .lm-TabBar .lm-TabBar-tab:not(.lm-mod-current):hover {
199
199
  outline: 1px dashed ${focusBorder};
200
200
  }
201
201
  `);
@@ -206,13 +206,13 @@ export class TabbarStylingParticipant implements StylingParticipant {
206
206
  const tabActiveBorder = theme.getColor('tab.activeBorder') || (highContrast && contrastBorder) || 'transparent';
207
207
  const tabUnfocusedActiveBorder = theme.getColor('tab.unfocusedActiveBorder') || (highContrast && contrastBorder) || 'transparent';
208
208
  collector.addRule(`
209
- #theia-main-content-panel .p-TabBar .p-TabBar-tab.p-mod-current {
209
+ #theia-main-content-panel .lm-TabBar .lm-TabBar-tab.lm-mod-current {
210
210
  color: var(--theia-tab-activeForeground);
211
211
  ${tabActiveBackground ? `background: ${tabActiveBackground};` : ''}
212
212
  ${tabActiveBorderTop ? `border-top: 1px solid ${tabActiveBorderTop};` : ''}
213
213
  border-bottom: 1px solid ${tabActiveBorder};
214
214
  }
215
- #theia-main-content-panel .p-TabBar:not(.theia-tabBar-active) .p-TabBar-tab.p-mod-current {
215
+ #theia-main-content-panel .lm-TabBar:not(.theia-tabBar-active) .lm-TabBar-tab.lm-mod-current {
216
216
  background: var(--theia-tab-unfocusedActiveBackground);
217
217
  color: var(--theia-tab-unfocusedActiveForeground);
218
218
  ${tabUnfocusedActiveBorderTop ? `border-top: 1px solid ${tabUnfocusedActiveBorderTop};` : ''}
@@ -227,18 +227,18 @@ export class TabbarStylingParticipant implements StylingParticipant {
227
227
  if (tabActiveModifiedBorder || tabInactiveModifiedBorder) {
228
228
  collector.addRule(`
229
229
  body.theia-editor-highlightModifiedTabs
230
- #theia-main-content-panel .p-TabBar .p-TabBar-tab.theia-mod-dirty {
230
+ #theia-main-content-panel .lm-TabBar .lm-TabBar-tab.theia-mod-dirty {
231
231
  border-top: 2px solid ${tabInactiveModifiedBorder};
232
232
  padding-bottom: 1px;
233
233
  }
234
234
 
235
235
  body.theia-editor-highlightModifiedTabs
236
- #theia-main-content-panel .p-TabBar.theia-tabBar-active .p-TabBar-tab.theia-mod-dirty.p-mod-current {
236
+ #theia-main-content-panel .lm-TabBar.theia-tabBar-active .lm-TabBar-tab.theia-mod-dirty.lm-mod-current {
237
237
  border-top: 2px solid ${tabActiveModifiedBorder};
238
238
  }
239
239
 
240
240
  body.theia-editor-highlightModifiedTabs
241
- #theia-main-content-panel .p-TabBar:not(.theia-tabBar-active) .p-TabBar-tab.theia-mod-dirty:not(.p-mod-current) {
241
+ #theia-main-content-panel .lm-TabBar:not(.theia-tabBar-active) .lm-TabBar-tab.theia-mod-dirty:not(.lm-mod-current) {
242
242
  border-top: 2px solid ${tabUnfocusedInactiveModifiedBorder};
243
243
  }
244
244
  `);
@@ -247,12 +247,12 @@ export class TabbarStylingParticipant implements StylingParticipant {
247
247
  // Activity Bar Active Border
248
248
  const activityBarActiveBorder = theme.getColor('activityBar.activeBorder') || 'var(--theia-activityBar-foreground)';
249
249
  collector.addRule(`
250
- .p-TabBar.theia-app-left .p-TabBar-tab.p-mod-current {
250
+ .lm-TabBar.theia-app-left .lm-TabBar-tab.lm-mod-current {
251
251
  border-top-color: transparent;
252
252
  box-shadow: 2px 0 0 ${activityBarActiveBorder} inset;
253
253
  }
254
254
 
255
- .p-TabBar.theia-app-right .p-TabBar-tab.p-mod-current {
255
+ .lm-TabBar.theia-app-right .lm-TabBar-tab.lm-mod-current {
256
256
  border-top-color: transparent;
257
257
  box-shadow: -2px 0 0 ${activityBarActiveBorder} inset;
258
258
  }
@@ -261,7 +261,7 @@ export class TabbarStylingParticipant implements StylingParticipant {
261
261
  const tabHoverBackground = theme.getColor('tab.hoverBackground');
262
262
  if (tabHoverBackground) {
263
263
  collector.addRule(`
264
- #theia-main-content-panel .p-TabBar .p-TabBar-tab:hover {
264
+ #theia-main-content-panel .lm-TabBar .lm-TabBar-tab:hover {
265
265
  background-color: ${tabHoverBackground};
266
266
  }
267
267
  `);
@@ -270,7 +270,7 @@ export class TabbarStylingParticipant implements StylingParticipant {
270
270
  const tabUnfocusedHoverBackground = theme.getColor('tab.unfocusedHoverBackground');
271
271
  if (tabUnfocusedHoverBackground) {
272
272
  collector.addRule(`
273
- #theia-main-content-panel .p-TabBar:not(.theia-tabBar-active) .p-TabBar-tab:hover {
273
+ #theia-main-content-panel .lm-TabBar:not(.theia-tabBar-active) .lm-TabBar-tab:hover {
274
274
  background-color: ${tabUnfocusedHoverBackground};
275
275
  }
276
276
  `);
@@ -280,7 +280,7 @@ export class TabbarStylingParticipant implements StylingParticipant {
280
280
  const tabHoverForeground = theme.getColor('tab.hoverForeground');
281
281
  if (tabHoverForeground) {
282
282
  collector.addRule(`
283
- #theia-main-content-panel .p-TabBar .p-TabBar-tab:hover {
283
+ #theia-main-content-panel .lm-TabBar .lm-TabBar-tab:hover {
284
284
  color: ${tabHoverForeground};
285
285
  }
286
286
  `);
@@ -289,7 +289,7 @@ export class TabbarStylingParticipant implements StylingParticipant {
289
289
  const tabUnfocusedHoverForeground = theme.getColor('tab.unfocusedHoverForeground');
290
290
  if (tabUnfocusedHoverForeground) {
291
291
  collector.addRule(`
292
- #theia-main-content-panel .p-TabBar:not(.theia-tabBar-active) .p-TabBar-tab:hover {
292
+ #theia-main-content-panel .lm-TabBar:not(.theia-tabBar-active) .lm-TabBar-tab:hover {
293
293
  color: ${tabUnfocusedHoverForeground};
294
294
  }
295
295
  `);
@@ -299,7 +299,7 @@ export class TabbarStylingParticipant implements StylingParticipant {
299
299
  const tabHoverBorder = theme.getColor('tab.hoverBorder');
300
300
  if (tabHoverBorder) {
301
301
  collector.addRule(`
302
- #theia-main-content-panel .p-TabBar .p-TabBar-tab:hover {
302
+ #theia-main-content-panel .lm-TabBar .lm-TabBar-tab:hover {
303
303
  box-shadow: 0 1px 0 ${tabHoverBorder} inset;
304
304
  }
305
305
  `);
@@ -308,7 +308,7 @@ export class TabbarStylingParticipant implements StylingParticipant {
308
308
  const tabUnfocusedHoverBorder = theme.getColor('tab.unfocusedHoverBorder');
309
309
  if (tabUnfocusedHoverBorder) {
310
310
  collector.addRule(`
311
- #theia-main-content-panel .p-TabBar:not(.theia-tabBar-active) .p-TabBar-tab:hover {
311
+ #theia-main-content-panel .lm-TabBar:not(.theia-tabBar-active) .lm-TabBar-tab:hover {
312
312
  box-shadow: 0 1px 0 ${tabUnfocusedHoverBorder} inset;
313
313
  }
314
314
  `);
@@ -110,10 +110,10 @@ export interface RenderContextMenuOptions {
110
110
  */
111
111
  includeAnchorArg?: boolean;
112
112
  /**
113
- * A DOM context to use when evaluating any `when` clauses
114
- * of menu items registered for this item.
113
+ * A DOM context for the menu to be shown
114
+ * Will be used to attach the menu to a window and to evaluate enablement ("when"-clauses)
115
115
  */
116
- context?: HTMLElement;
116
+ context: HTMLElement;
117
117
  contextKeyService?: ContextMatcher;
118
118
  onHide?: () => void;
119
119
  /**
@@ -140,18 +140,18 @@ export const corePreferenceSchema: PreferenceSchema = {
140
140
  'http.proxy': {
141
141
  type: 'string',
142
142
  pattern: '^https?://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$',
143
- markdownDescription: nls.localizeByDefault('The proxy setting to use. If not set, will be inherited from the `http_proxy` and `https_proxy` environment variables.'),
143
+ markdownDescription: nls.localizeByDefault('The proxy setting to use. If not set, will be inherited from the `http_proxy` and `https_proxy` environment variables. When during [remote development](https://aka.ms/vscode-remote) the {0} setting is disabled this setting can be configured in the local and the remote settings separately.'),
144
144
  scope: 'application'
145
145
  },
146
146
  'http.proxyStrictSSL': {
147
147
  type: 'boolean',
148
148
  default: true,
149
- description: nls.localizeByDefault('Controls whether the proxy server certificate should be verified against the list of supplied CAs.'),
149
+ description: nls.localizeByDefault('Controls whether the proxy server certificate should be verified against the list of supplied CAs. When during [remote development](https://aka.ms/vscode-remote) the {0} setting is disabled this setting can be configured in the local and the remote settings separately.'),
150
150
  scope: 'application'
151
151
  },
152
152
  'http.proxyAuthorization': {
153
153
  type: 'string',
154
- markdownDescription: nls.localizeByDefault('The value to send as the `Proxy-Authorization` header for every network request.'),
154
+ markdownDescription: nls.localizeByDefault('The value to send as the `Proxy-Authorization` header for every network request. When during [remote development](https://aka.ms/vscode-remote) the {0} setting is disabled this setting can be configured in the local and the remote settings separately.'),
155
155
  scope: 'application'
156
156
  },
157
157
  'http.proxySupport': {
@@ -164,13 +164,13 @@ export const corePreferenceSchema: PreferenceSchema = {
164
164
  nls.localizeByDefault('Enable proxy support for extensions, override request options.'),
165
165
  ],
166
166
  default: 'override',
167
- description: nls.localizeByDefault('Use the proxy support for extensions.'),
167
+ description: nls.localizeByDefault('Use the proxy support for extensions. When during [remote development](https://aka.ms/vscode-remote) the {0} setting is disabled this setting can be configured in the local and the remote settings separately.'),
168
168
  scope: 'application'
169
169
  },
170
170
  'http.systemCertificates': {
171
171
  type: 'boolean',
172
172
  default: true,
173
- description: nls.localizeByDefault('Controls whether CA certificates should be loaded from the OS. (On Windows and macOS, a reload of the window is required after turning this off.)'),
173
+ description: nls.localizeByDefault('Controls whether CA certificates should be loaded from the OS. On Windows and macOS, a reload of the window is required after turning this off. When during [remote development](https://aka.ms/vscode-remote) the {0} setting is disabled this setting can be configured in the local and the remote settings separately.'),
174
174
  scope: 'application'
175
175
  },
176
176
  'workbench.list.openMode': {
@@ -40,8 +40,7 @@ export class BrowserContextMenuRenderer extends ContextMenuRenderer {
40
40
  if (onHide) {
41
41
  contextMenu.aboutToClose.connect(() => onHide!());
42
42
  }
43
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
44
- contextMenu.open(x, y, undefined, context);
43
+ contextMenu.open(x, y, { host: context?.ownerDocument.body});
45
44
  return new BrowserContextMenuAccess(contextMenu);
46
45
  }
47
46
 
@@ -15,9 +15,8 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { injectable, inject } from 'inversify';
18
- import { Menu, MenuBar, Menu as MenuWidget, Widget } from '@phosphor/widgets';
19
- import { CommandRegistry as PhosphorCommandRegistry } from '@phosphor/commands';
20
- import { ElementExt } from '@phosphor/domutils';
18
+ import { Menu, MenuBar, Menu as MenuWidget, Widget } from '@lumino/widgets';
19
+ import { CommandRegistry as LuminoCommandRegistry } from '@lumino/commands';
21
20
  import {
22
21
  CommandRegistry, environment, DisposableCollection, Disposable,
23
22
  MenuModelRegistry, MAIN_MENU_BAR, MenuPath, MenuNode, MenuCommandExecutor, CompoundMenuNode, CompoundMenuNodeRole, CommandMenuNode,
@@ -32,6 +31,7 @@ import { Message, waitForRevealed } from '../widgets';
32
31
  import { ApplicationShell } from '../shell';
33
32
  import { CorePreferences } from '../core-preferences';
34
33
  import { PreferenceService } from '../preferences/preference-service';
34
+ import { ElementExt } from '@lumino/domutils';
35
35
 
36
36
  export abstract class MenuBarWidget extends MenuBar {
37
37
  abstract activateMenu(label: string, ...labels: string[]): Promise<MenuWidget>;
@@ -161,7 +161,7 @@ export class BrowserMainMenuFactory implements MenuWidgetFactory {
161
161
  }
162
162
 
163
163
  export function isMenuElement(element: HTMLElement | null): boolean {
164
- return !!element && element.className.includes('p-Menu');
164
+ return !!element && element.className.includes('lm-Menu');
165
165
  }
166
166
 
167
167
  export class DynamicMenuBarWidget extends MenuBarWidget {
@@ -181,7 +181,8 @@ export class DynamicMenuBarWidget extends MenuBarWidget {
181
181
  // We want to save the focus object for the former case only.
182
182
  if (!this.childMenu) {
183
183
  const { activeElement } = document;
184
- if (activeElement instanceof HTMLElement) {
184
+ // we do not want to restore focus to menus
185
+ if (activeElement instanceof HTMLElement && !isMenuElement(activeElement)) {
185
186
  this.previousFocusedElement = activeElement;
186
187
  }
187
188
  }
@@ -322,14 +323,14 @@ export class DynamicMenuWidget extends MenuWidget {
322
323
  });
323
324
  }
324
325
 
325
- public override open(x: number, y: number, options?: MenuWidget.IOpenOptions, anchor?: HTMLElement): void {
326
+ public override open(x: number, y: number, options?: MenuWidget.IOpenOptions): void {
326
327
  const cb = () => {
327
328
  this.restoreFocusedElement();
328
329
  this.aboutToClose.disconnect(cb);
329
330
  };
330
331
  this.aboutToClose.connect(cb);
331
332
  this.preserveFocusedElement();
332
- super.open(x, y, options, anchor);
333
+ super.open(x, y, options);
333
334
  }
334
335
 
335
336
  protected updateSubMenus(parent: MenuWidget, menu: CompoundMenuNode, commands: MenuCommandRegistry): void {
@@ -337,6 +338,13 @@ export class DynamicMenuWidget extends MenuWidget {
337
338
  while (items[items.length - 1]?.type === 'separator') {
338
339
  items.pop();
339
340
  }
341
+ // Add at least one entry to avoid empty menus.
342
+ // This is needed as Lumino does all kind of checks whether a menu is empty and for example prevents activating it
343
+ // This item will be cleared once the menu is opened via the next update as we don't have empty main menus
344
+ // See https://github.com/jupyterlab/lumino/issues/729
345
+ if (items.length === 0) {
346
+ items.push({ type: 'separator' });
347
+ }
340
348
  for (const item of items) {
341
349
  parent.addItem(item);
342
350
  }
@@ -382,7 +390,7 @@ export class DynamicMenuWidget extends MenuWidget {
382
390
  }
383
391
 
384
392
  protected preserveFocusedElement(previousFocusedElement: Element | null = document.activeElement): boolean {
385
- if (!this.previousFocusedElement && previousFocusedElement instanceof HTMLElement) {
393
+ if (!this.previousFocusedElement && previousFocusedElement instanceof HTMLElement && !isMenuElement(previousFocusedElement)) {
386
394
  this.previousFocusedElement = previousFocusedElement;
387
395
  return true;
388
396
  }
@@ -401,14 +409,16 @@ export class DynamicMenuWidget extends MenuWidget {
401
409
  protected runWithPreservedFocusContext(what: () => void): void {
402
410
  let focusToRestore: HTMLElement | undefined = undefined;
403
411
  const { activeElement } = document;
404
- if (this.previousFocusedElement && activeElement instanceof HTMLElement && this.previousFocusedElement !== activeElement) {
412
+ if (this.previousFocusedElement &&
413
+ activeElement instanceof HTMLElement &&
414
+ this.previousFocusedElement !== activeElement) {
405
415
  focusToRestore = activeElement;
406
416
  this.previousFocusedElement.focus({ preventScroll: true });
407
417
  }
408
418
  try {
409
419
  what();
410
420
  } finally {
411
- if (focusToRestore) {
421
+ if (focusToRestore && !isMenuElement(focusToRestore)) {
412
422
  focusToRestore.focus({ preventScroll: true });
413
423
  }
414
424
  }
@@ -465,9 +475,9 @@ export class BrowserMenuBarContribution implements FrontendApplicationContributi
465
475
  }
466
476
 
467
477
  /**
468
- * Stores Theia-specific action menu nodes instead of PhosphorJS commands with their handlers.
478
+ * Stores Theia-specific action menu nodes instead of Lumino commands with their handlers.
469
479
  */
470
- export class MenuCommandRegistry extends PhosphorCommandRegistry {
480
+ export class MenuCommandRegistry extends LuminoCommandRegistry {
471
481
 
472
482
  protected actions = new Map<string, [MenuNode & CommandMenuNode, unknown[]]>();
473
483
  protected toDispose = new DisposableCollection();
@@ -516,7 +526,7 @@ export class MenuCommandRegistry extends PhosphorCommandRegistry {
516
526
  const unregisterCommand = this.addCommand(id, {
517
527
  execute: () => commandExecutor.executeCommand(menuPath, id, ...args),
518
528
  label: menu.label,
519
- icon: menu.icon,
529
+ iconClass: menu.icon,
520
530
  isEnabled: () => enabled,
521
531
  isVisible: () => visible,
522
532
  isToggled: () => toggled
@@ -532,7 +542,7 @@ export class MenuCommandRegistry extends PhosphorCommandRegistry {
532
542
  this.addKeyBinding({
533
543
  command: id,
534
544
  keys,
535
- selector: '.p-Widget' // We have the PhosphorJS dependency anyway.
545
+ selector: '.lm-Widget' // We have the Lumino dependency anyway.
536
546
  });
537
547
  }
538
548
  return Disposable.create(() => unregisterCommand.dispose());
@@ -19,7 +19,7 @@ import { PreferenceSchema } from '../../common/preferences/preference-schema';
19
19
  import { Disposable, DisposableCollection, Emitter, Event, isObject, MaybePromise } from '../../common';
20
20
  import { PreferenceChangeEvent, PreferenceEventEmitter, PreferenceProxy, PreferenceProxyOptions, PreferenceRetrieval } from './preference-proxy';
21
21
  import { PreferenceChange, PreferenceChangeImpl, PreferenceChanges, PreferenceScope, PreferenceService } from './preference-service';
22
- import { JSONValue } from '@phosphor/coreutils';
22
+ import { JSONValue } from '@lumino/coreutils';
23
23
  import { PreferenceProviderDataChange } from './preference-provider';
24
24
  import { OverridePreferenceName } from './preference-language-override-service';
25
25
 
@@ -28,7 +28,7 @@ import { bindPreferenceConfigurations, PreferenceConfigurations } from './prefer
28
28
  export { PreferenceSchema, PreferenceSchemaProperties, PreferenceDataSchema, PreferenceItem, PreferenceSchemaProperty, PreferenceDataProperty };
29
29
  import { isObject, Mutable } from '../../common/types';
30
30
  import { PreferenceLanguageOverrideService } from './preference-language-override-service';
31
- import { JSONValue } from '@phosphor/coreutils';
31
+ import { JSONValue } from '@lumino/coreutils';
32
32
 
33
33
  /* eslint-disable guard-for-in, @typescript-eslint/no-explicit-any */
34
34
 
@@ -18,7 +18,7 @@
18
18
 
19
19
  import debounce = require('p-debounce');
20
20
  import { injectable, inject } from 'inversify';
21
- import { JSONExt, JSONValue } from '@phosphor/coreutils';
21
+ import { JSONExt, JSONValue } from '@lumino/coreutils';
22
22
  import URI from '../../common/uri';
23
23
  import { Disposable, DisposableCollection, Emitter, Event, isObject } from '../../common';
24
24
  import { Deferred } from '../../common/promise-util';
@@ -24,7 +24,7 @@ import { PreferenceSchemaProvider } from './preference-contribution';
24
24
  import URI from '../../common/uri';
25
25
  import { PreferenceScope } from './preference-scope';
26
26
  import { PreferenceConfigurations } from './preference-configurations';
27
- import { JSONExt, JSONValue } from '@phosphor/coreutils/lib/json';
27
+ import { JSONExt, JSONValue } from '@lumino/coreutils';
28
28
  import { OverridePreferenceName, PreferenceLanguageOverrideService } from './preference-language-override-service';
29
29
 
30
30
  export { PreferenceScope };
@@ -19,7 +19,7 @@ import { PreferenceValidationService } from './preference-validation-service';
19
19
  import { PreferenceItem, PreferenceSchemaProvider } from './preference-contribution';
20
20
  import { PreferenceLanguageOverrideService } from './preference-language-override-service';
21
21
  import * as assert from 'assert';
22
- import { JSONValue } from '@phosphor/coreutils';
22
+ import { JSONValue } from '@lumino/coreutils';
23
23
  import { IJSONSchema, JsonType } from '../../common/json-schema';
24
24
 
25
25
  /* eslint-disable no-null/no-null */
@@ -15,7 +15,7 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { PreferenceItem } from '../../common/preferences/preference-schema';
18
- import { JSONObject, JSONValue } from '../../../shared/@phosphor/coreutils';
18
+ import { JSONObject, JSONValue } from '../../../shared/@lumino/coreutils';
19
19
  import { PreferenceSchemaProvider } from './preference-contribution';
20
20
  import { PreferenceLanguageOverrideService } from './preference-language-override-service';
21
21
  import { inject, injectable } from '../../../shared/inversify';
@@ -17,8 +17,10 @@
17
17
  import { PreloadContribution } from './preloader';
18
18
  import { FrontendApplicationConfigProvider } from '../frontend-application-config-provider';
19
19
  import { nls } from '../../common/nls';
20
- import { inject, injectable } from 'inversify';
20
+ import { inject, injectable, named } from 'inversify';
21
21
  import { LocalizationServer } from '../../common/i18n/localization-server';
22
+ import { ContributionProvider } from '../../common';
23
+ import { TextReplacementContribution } from './text-replacement-contribution';
22
24
 
23
25
  @injectable()
24
26
  export class I18nPreloadContribution implements PreloadContribution {
@@ -26,6 +28,9 @@ export class I18nPreloadContribution implements PreloadContribution {
26
28
  @inject(LocalizationServer)
27
29
  protected readonly localizationServer: LocalizationServer;
28
30
 
31
+ @inject(ContributionProvider) @named(TextReplacementContribution)
32
+ protected readonly replacementContributions: ContributionProvider<TextReplacementContribution>;
33
+
29
34
  async initialize(): Promise<void> {
30
35
  const defaultLocale = FrontendApplicationConfigProvider.get().defaultLocale;
31
36
  if (defaultLocale && !nls.locale) {
@@ -33,8 +38,9 @@ export class I18nPreloadContribution implements PreloadContribution {
33
38
  locale: defaultLocale
34
39
  });
35
40
  }
41
+ let locale = nls.locale ?? nls.defaultLocale;
36
42
  if (nls.locale && nls.locale !== nls.defaultLocale) {
37
- const localization = await this.localizationServer.loadLocalization(nls.locale);
43
+ const localization = await this.localizationServer.loadLocalization(locale);
38
44
  if (localization.languagePack) {
39
45
  nls.localization = localization;
40
46
  } else {
@@ -43,8 +49,22 @@ export class I18nPreloadContribution implements PreloadContribution {
43
49
  Object.assign(nls, {
44
50
  locale: defaultLocale || undefined
45
51
  });
52
+ locale = defaultLocale;
46
53
  }
47
54
  }
55
+ const replacements = this.getReplacements(locale);
56
+ if (Object.keys(replacements).length > 0) {
57
+ nls.localization ??= { translations: {}, languageId: locale };
58
+ nls.localization.replacements = replacements;
59
+ }
60
+ }
61
+
62
+ protected getReplacements(locale: string): Record<string, string> {
63
+ const replacements: Record<string, string> = {};
64
+ for (const contribution of this.replacementContributions.getContributions()) {
65
+ Object.assign(replacements, contribution.getReplacement(locale));
66
+ }
67
+ return replacements;
48
68
  }
49
69
 
50
70
  }
@@ -21,19 +21,21 @@ import { I18nPreloadContribution } from './i18n-preload-contribution';
21
21
  import { OSPreloadContribution } from './os-preload-contribution';
22
22
  import { ThemePreloadContribution } from './theme-preload-contribution';
23
23
  import { LocalizationServer, LocalizationServerPath } from '../../common/i18n/localization-server';
24
- import { WebSocketConnectionProvider } from '../messaging/ws-connection-provider';
24
+ import { ServiceConnectionProvider } from '../messaging/service-connection-provider';
25
25
  import { OSBackendProvider, OSBackendProviderPath } from '../../common/os';
26
+ import { TextReplacementContribution } from './text-replacement-contribution';
26
27
 
27
28
  export default new ContainerModule(bind => {
28
29
  bind(Preloader).toSelf().inSingletonScope();
29
30
  bindContributionProvider(bind, PreloadContribution);
31
+ bindContributionProvider(bind, TextReplacementContribution);
30
32
 
31
33
  bind(LocalizationServer).toDynamicValue(ctx =>
32
- WebSocketConnectionProvider.createProxy<LocalizationServer>(ctx.container, LocalizationServerPath)
34
+ ServiceConnectionProvider.createProxy<LocalizationServer>(ctx.container, LocalizationServerPath)
33
35
  ).inSingletonScope();
34
36
 
35
37
  bind(OSBackendProvider).toDynamicValue(ctx =>
36
- WebSocketConnectionProvider.createProxy<OSBackendProvider>(ctx.container, OSBackendProviderPath)
38
+ ServiceConnectionProvider.createProxy<OSBackendProvider>(ctx.container, OSBackendProviderPath)
37
39
  ).inSingletonScope();
38
40
 
39
41
  bind(I18nPreloadContribution).toSelf().inSingletonScope();
@@ -0,0 +1,53 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2025 TypeFox 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
+ export const TextReplacementContribution = Symbol('TextReplacementContribution');
18
+
19
+ /**
20
+ * Enables adopters to override text in the application. All `TextReplacementContribution`s need to be bound in the `frontendPreload` scope of the package.json.
21
+ *
22
+ * @example Create a text replacement contribution
23
+ * ```typescript
24
+ * import { TextReplacementContribution } from '@theia/core/lib/browser/preload/text-replacement-contribution';
25
+ * export class TextSampleReplacementContribution implements TextReplacementContribution {
26
+ * getReplacement(locale: string): Record<string, string> {
27
+ * switch (locale) {
28
+ * case 'en': {
29
+ * return {
30
+ * 'About': 'About Theia',
31
+ * };
32
+ * }
33
+ * case 'de': {
34
+ * return {
35
+ * 'About': 'Über Theia',
36
+ * };
37
+ * }
38
+ * }
39
+ * return {};
40
+ * }
41
+ * }
42
+ * ```
43
+ */
44
+ export interface TextReplacementContribution {
45
+ /**
46
+ * This method returns a map of **default values** and their replacement values for the specified locale.
47
+ * **Do not** use the keys of the `nls.localization` call, but the English default values.
48
+ *
49
+ * @param locale The locale for which the replacement should be returned.
50
+ * @returns A map of default values and their replacement values.
51
+ */
52
+ getReplacement(locale: string): Record<string, string>;
53
+ }
@@ -14,14 +14,14 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- import { Widget } from '@phosphor/widgets';
18
- import { Message } from '@phosphor/messaging';
17
+ import { Widget } from '@lumino/widgets';
18
+ import { Message } from '@lumino/messaging';
19
19
  import { Emitter, Event } from '../common/event';
20
20
  import { MaybePromise } from '../common/types';
21
21
  import { Key } from './keyboard/keys';
22
22
  import { AbstractDialog } from './dialogs';
23
23
  import { nls } from '../common/nls';
24
- import { Disposable, DisposableCollection, isObject } from '../common';
24
+ import { Disposable, DisposableCollection, isObject, URI } from '../common';
25
25
  import { BinaryBuffer } from '../common/buffer';
26
26
 
27
27
  export type AutoSaveMode = 'off' | 'afterDelay' | 'onFocusChange' | 'onWindowChange';
@@ -44,6 +44,10 @@ export interface Saveable {
44
44
  * Saves dirty changes.
45
45
  */
46
46
  save(options?: SaveOptions): MaybePromise<void>;
47
+ /**
48
+ * Performs the save operation with a new file name.
49
+ */
50
+ saveAs?(options: SaveAsOptions): MaybePromise<void>;
47
51
  /**
48
52
  * Reverts dirty changes.
49
53
  */
@@ -87,6 +91,7 @@ export class DelegatingSaveable implements Saveable {
87
91
  createSnapshot?(): Saveable.Snapshot;
88
92
  applySnapshot?(snapshot: object): void;
89
93
  serialize?(): Promise<BinaryBuffer>;
94
+ saveAs?(options: SaveAsOptions): MaybePromise<void>;
90
95
 
91
96
  protected _delegate?: Saveable;
92
97
  protected toDispose = new DisposableCollection();
@@ -110,6 +115,7 @@ export class DelegatingSaveable implements Saveable {
110
115
  this.createSnapshot = delegate.createSnapshot?.bind(delegate);
111
116
  this.applySnapshot = delegate.applySnapshot?.bind(delegate);
112
117
  this.serialize = delegate.serialize?.bind(delegate);
118
+ this.saveAs = delegate.saveAs?.bind(delegate);
113
119
  }
114
120
 
115
121
  }
@@ -341,6 +347,10 @@ export interface SaveOptions {
341
347
  readonly saveReason?: SaveReason;
342
348
  }
343
349
 
350
+ export interface SaveAsOptions extends SaveOptions {
351
+ readonly target: URI;
352
+ }
353
+
344
354
  /**
345
355
  * The class name added to the dirty widget's title.
346
356
  */
@@ -19,7 +19,7 @@ import { ApplicationShell } from './application-shell';
19
19
  import { injectable, inject } from 'inversify';
20
20
  import { DisposableCollection, Disposable } from '../../common/disposable';
21
21
  import { Emitter, Event } from '../../common/event';
22
- import { FocusTracker, PanelLayout, SplitPanel } from '@phosphor/widgets';
22
+ import { FocusTracker, PanelLayout, SplitPanel } from '@lumino/widgets';
23
23
  import { addEventListener, Widget } from '../widgets';
24
24
  /**
25
25
  * Contribution that tracks `mouseup` and `mousedown` events.
@@ -44,7 +44,7 @@ export class ApplicationShellMouseTracker implements FrontendApplicationContribu
44
44
  protected readonly mousedownListener: (e: MouseEvent) => void = e => this.mousedownEmitter.fire(e);
45
45
 
46
46
  onStart(): void {
47
- // Here we need to attach a `mousedown` listener to the `TabBar`s, `DockPanel`s and the `SidePanel`s. Otherwise, Phosphor handles the event and stops the propagation.
47
+ // Here we need to attach a `mousedown` listener to the `TabBar`s, `DockPanel`s and the `SidePanel`s. Otherwise, Lumino handles the event and stops the propagation.
48
48
  // Track the `mousedown` on the `TabBar` for the currently active widget.
49
49
  this.applicationShell.onDidChangeActiveWidget((args: FocusTracker.IChangedArgs<Widget>) => {
50
50
  this.toDisposeOnActiveChange.dispose();
@@ -68,7 +68,7 @@ export class ApplicationShellMouseTracker implements FrontendApplicationContribu
68
68
  this.toDispose.pushAll([mainPanel, bottomPanel, leftPanelHandler.dockPanel, rightPanelHandler.dockPanel]
69
69
  .map(panel => addEventListener(panel.node, 'mousedown', this.mousedownListener, true)));
70
70
 
71
- // The `mouseup` event has to be tracked on the `document`. Phosphor attaches to there.
71
+ // The `mouseup` event has to be tracked on the `document`. Lumino attaches to there.
72
72
  document.addEventListener('mouseup', this.mouseupListener, true);
73
73
 
74
74
  // Make sure it is disposed in the end.