@theia/core 1.19.0 → 1.21.0-next.13

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 (169) hide show
  1. package/README.md +3 -3
  2. package/lib/browser/color-registry.d.ts +3 -69
  3. package/lib/browser/color-registry.d.ts.map +1 -1
  4. package/lib/browser/color-registry.js +13 -27
  5. package/lib/browser/color-registry.js.map +1 -1
  6. package/lib/browser/common-frontend-contribution.d.ts +4 -16
  7. package/lib/browser/common-frontend-contribution.d.ts.map +1 -1
  8. package/lib/browser/common-frontend-contribution.js +150 -191
  9. package/lib/browser/common-frontend-contribution.js.map +1 -1
  10. package/lib/browser/core-preferences.d.ts.map +1 -1
  11. package/lib/browser/core-preferences.js +23 -20
  12. package/lib/browser/core-preferences.js.map +1 -1
  13. package/lib/browser/dialogs.d.ts.map +1 -1
  14. package/lib/browser/dialogs.js +4 -4
  15. package/lib/browser/dialogs.js.map +1 -1
  16. package/lib/browser/frontend-application-module.d.ts.map +1 -1
  17. package/lib/browser/frontend-application-module.js +6 -5
  18. package/lib/browser/frontend-application-module.js.map +1 -1
  19. package/lib/browser/keyboard/browser-keyboard-frontend-contribution.js +2 -2
  20. package/lib/browser/keyboard/browser-keyboard-frontend-contribution.js.map +1 -1
  21. package/lib/browser/keyboard/browser-keyboard-layout-provider.d.ts +1 -1
  22. package/lib/browser/keyboard/browser-keyboard-layout-provider.d.ts.map +1 -1
  23. package/lib/browser/keyboard/browser-keyboard-layout-provider.spec.js +6 -4
  24. package/lib/browser/keyboard/browser-keyboard-layout-provider.spec.js.map +1 -1
  25. package/lib/browser/keyboard/keys.d.ts +2 -251
  26. package/lib/browser/keyboard/keys.d.ts.map +1 -1
  27. package/lib/browser/keyboard/keys.js +12 -614
  28. package/lib/browser/keyboard/keys.js.map +1 -1
  29. package/lib/browser/messaging/ws-connection-provider.d.ts +3 -3
  30. package/lib/browser/messaging/ws-connection-provider.d.ts.map +1 -1
  31. package/lib/browser/messaging/ws-connection-provider.js +14 -4
  32. package/lib/browser/messaging/ws-connection-provider.js.map +1 -1
  33. package/lib/browser/preferences/preference-provider.d.ts +0 -2
  34. package/lib/browser/preferences/preference-provider.d.ts.map +1 -1
  35. package/lib/browser/preferences/preference-provider.js +1 -5
  36. package/lib/browser/preferences/preference-provider.js.map +1 -1
  37. package/lib/browser/preferences/preference-service.spec.js +0 -3
  38. package/lib/browser/preferences/preference-service.spec.js.map +1 -1
  39. package/lib/browser/quick-input/quick-command-frontend-contribution.js +1 -1
  40. package/lib/browser/quick-input/quick-command-frontend-contribution.js.map +1 -1
  41. package/lib/browser/quick-input/quick-command-service.d.ts.map +1 -1
  42. package/lib/browser/quick-input/quick-command-service.js +2 -2
  43. package/lib/browser/quick-input/quick-command-service.js.map +1 -1
  44. package/lib/browser/quick-input/quick-input-service.d.ts +1 -201
  45. package/lib/browser/quick-input/quick-input-service.d.ts.map +1 -1
  46. package/lib/browser/quick-input/quick-input-service.js +11 -93
  47. package/lib/browser/quick-input/quick-input-service.js.map +1 -1
  48. package/lib/browser/shell/application-shell.d.ts +7 -7
  49. package/lib/browser/shell/application-shell.d.ts.map +1 -1
  50. package/lib/browser/shell/application-shell.js +10 -17
  51. package/lib/browser/shell/application-shell.js.map +1 -1
  52. package/lib/browser/shell/current-widget-command-adapter.d.ts +39 -0
  53. package/lib/browser/shell/current-widget-command-adapter.d.ts.map +1 -0
  54. package/lib/browser/shell/current-widget-command-adapter.js +42 -0
  55. package/lib/browser/shell/current-widget-command-adapter.js.map +1 -0
  56. package/lib/browser/shell/tab-bar-toolbar.js +1 -1
  57. package/lib/browser/shell/tab-bar-toolbar.js.map +1 -1
  58. package/lib/browser/shell/tab-bars.d.ts +8 -2
  59. package/lib/browser/shell/tab-bars.d.ts.map +1 -1
  60. package/lib/browser/shell/tab-bars.js +30 -3
  61. package/lib/browser/shell/tab-bars.js.map +1 -1
  62. package/lib/browser/storage-service.spec.js +1 -1
  63. package/lib/browser/storage-service.spec.js.map +1 -1
  64. package/lib/browser/theming.d.ts +5 -14
  65. package/lib/browser/theming.d.ts.map +1 -1
  66. package/lib/browser/theming.js +14 -0
  67. package/lib/browser/theming.js.map +1 -1
  68. package/lib/browser/window/default-window-service.js +1 -1
  69. package/lib/browser/window/default-window-service.js.map +1 -1
  70. package/lib/browser/window-contribution.d.ts.map +1 -1
  71. package/lib/browser/window-contribution.js +2 -2
  72. package/lib/browser/window-contribution.js.map +1 -1
  73. package/lib/common/color.d.ts +84 -0
  74. package/lib/common/color.d.ts.map +1 -0
  75. package/lib/common/color.js +44 -0
  76. package/lib/common/color.js.map +1 -0
  77. package/lib/common/command.d.ts +1 -0
  78. package/lib/common/command.d.ts.map +1 -1
  79. package/lib/common/command.js +4 -0
  80. package/lib/common/command.js.map +1 -1
  81. package/lib/common/i18n/localization.d.ts +9 -0
  82. package/lib/common/i18n/localization.d.ts.map +1 -1
  83. package/lib/common/i18n/localization.js +13 -2
  84. package/lib/common/i18n/localization.js.map +1 -1
  85. package/lib/common/keys.d.ts +269 -0
  86. package/lib/common/keys.d.ts.map +1 -0
  87. package/lib/common/keys.js +634 -0
  88. package/lib/common/keys.js.map +1 -0
  89. package/lib/common/messaging/abstract-connection-provider.d.ts +1 -1
  90. package/lib/common/messaging/abstract-connection-provider.d.ts.map +1 -1
  91. package/lib/common/messaging/abstract-connection-provider.js +3 -1
  92. package/lib/common/messaging/abstract-connection-provider.js.map +1 -1
  93. package/lib/common/messaging/proxy-factory.js +1 -1
  94. package/lib/common/messaging/proxy-factory.js.map +1 -1
  95. package/lib/common/nls.d.ts +5 -0
  96. package/lib/common/nls.d.ts.map +1 -1
  97. package/lib/common/nls.js +62 -0
  98. package/lib/common/nls.js.map +1 -1
  99. package/lib/common/path.d.ts +6 -0
  100. package/lib/common/path.d.ts.map +1 -1
  101. package/lib/common/path.js +16 -4
  102. package/lib/common/path.js.map +1 -1
  103. package/lib/common/path.spec.js +12 -0
  104. package/lib/common/path.spec.js.map +1 -1
  105. package/lib/common/promise-util.d.ts +5 -2
  106. package/lib/common/promise-util.d.ts.map +1 -1
  107. package/lib/common/promise-util.js +16 -1
  108. package/lib/common/promise-util.js.map +1 -1
  109. package/lib/common/promise-util.spec.d.ts +2 -0
  110. package/lib/common/promise-util.spec.d.ts.map +1 -0
  111. package/lib/common/promise-util.spec.js +42 -0
  112. package/lib/common/promise-util.spec.js.map +1 -0
  113. package/lib/common/quick-pick-service.d.ts +219 -1
  114. package/lib/common/quick-pick-service.d.ts.map +1 -1
  115. package/lib/common/quick-pick-service.js +108 -1
  116. package/lib/common/quick-pick-service.js.map +1 -1
  117. package/lib/common/theme.d.ts +30 -0
  118. package/lib/common/theme.d.ts.map +1 -0
  119. package/lib/common/theme.js +18 -0
  120. package/lib/common/theme.js.map +1 -0
  121. package/lib/electron-browser/menu/electron-menu-contribution.d.ts.map +1 -1
  122. package/lib/electron-browser/menu/electron-menu-contribution.js +17 -17
  123. package/lib/electron-browser/menu/electron-menu-contribution.js.map +1 -1
  124. package/lib/electron-browser/window/electron-window-preferences.js +2 -2
  125. package/lib/electron-browser/window/electron-window-preferences.js.map +1 -1
  126. package/lib/electron-main/electron-main-application.d.ts +10 -0
  127. package/lib/electron-main/electron-main-application.d.ts.map +1 -1
  128. package/lib/electron-main/electron-main-application.js +13 -3
  129. package/lib/electron-main/electron-main-application.js.map +1 -1
  130. package/package.json +5 -5
  131. package/src/browser/color-registry.ts +3 -85
  132. package/src/browser/common-frontend-contribution.ts +139 -196
  133. package/src/browser/core-preferences.ts +24 -21
  134. package/src/browser/dialogs.ts +4 -4
  135. package/src/browser/frontend-application-module.ts +6 -5
  136. package/src/browser/keyboard/browser-keyboard-frontend-contribution.ts +2 -2
  137. package/src/browser/keyboard/browser-keyboard-layout-provider.spec.ts +10 -4
  138. package/src/browser/keyboard/keys.ts +2 -675
  139. package/src/browser/messaging/ws-connection-provider.ts +13 -4
  140. package/src/browser/preferences/preference-provider.ts +1 -5
  141. package/src/browser/preferences/preference-service.spec.ts +0 -3
  142. package/src/browser/quick-input/quick-command-frontend-contribution.ts +1 -1
  143. package/src/browser/quick-input/quick-command-service.ts +2 -2
  144. package/src/browser/quick-input/quick-input-service.ts +1 -278
  145. package/src/browser/shell/application-shell.ts +17 -22
  146. package/src/browser/shell/current-widget-command-adapter.ts +57 -0
  147. package/src/browser/shell/tab-bar-toolbar.tsx +1 -1
  148. package/src/browser/shell/tab-bars.ts +30 -5
  149. package/src/browser/storage-service.spec.ts +1 -1
  150. package/src/browser/theming.ts +6 -17
  151. package/src/browser/window/default-window-service.ts +1 -1
  152. package/src/browser/window-contribution.ts +2 -2
  153. package/src/common/color.ts +100 -0
  154. package/src/common/command.ts +10 -0
  155. package/src/common/i18n/localization.ts +13 -3
  156. package/src/common/i18n/nls.metadata.json +20421 -0
  157. package/src/common/keys.ts +693 -0
  158. package/src/common/messaging/abstract-connection-provider.ts +3 -1
  159. package/src/common/messaging/proxy-factory.ts +1 -1
  160. package/src/common/nls.ts +74 -0
  161. package/src/common/path.spec.ts +15 -0
  162. package/src/common/path.ts +16 -4
  163. package/src/common/promise-util.spec.ts +41 -0
  164. package/src/common/promise-util.ts +23 -4
  165. package/src/common/quick-pick-service.ts +299 -4
  166. package/src/common/theme.ts +32 -0
  167. package/src/electron-browser/menu/electron-menu-contribution.ts +17 -17
  168. package/src/electron-browser/window/electron-window-preferences.ts +2 -2
  169. package/src/electron-main/electron-main-application.ts +24 -5
@@ -32,19 +32,20 @@ export const corePreferenceSchema: PreferenceSchema = {
32
32
  'always',
33
33
  ],
34
34
  default: 'ifRequired',
35
- description: nls.localize('vscode/workbench.contribution/confirmBeforeCloseWeb', 'When to confirm before closing the application window.'),
35
+ // eslint-disable-next-line max-len
36
+ description: nls.localizeByDefault('Controls whether to show a confirmation dialog before closing the browser tab or window. Note that even if enabled, browsers may still decide to close a tab or window without confirmation and that this setting is only a hint that may not work in all cases.'),
36
37
  },
37
38
  'breadcrumbs.enabled': {
38
39
  'type': 'boolean',
39
40
  'default': true,
40
- 'description': nls.localize('vscode/breadcrumbs/enabled', 'Enable/disable navigation breadcrumbs.'),
41
+ 'description': nls.localizeByDefault('Enable/disable navigation breadcrumbs.'),
41
42
  'scope': 'application'
42
43
  },
43
44
  'files.encoding': {
44
45
  'type': 'string',
45
46
  'enum': Object.keys(SUPPORTED_ENCODINGS),
46
47
  'default': 'utf8',
47
- 'description': nls.localize('vscode/files.contribution/encoding',
48
+ 'description': nls.localizeByDefault(
48
49
  'The default character set encoding to use when reading and writing files. This setting can also be configured per language.'),
49
50
  'scope': 'language-overridable',
50
51
  'enumDescriptions': Object.keys(SUPPORTED_ENCODINGS).map(key => SUPPORTED_ENCODINGS[key].labelLong),
@@ -57,22 +58,22 @@ export const corePreferenceSchema: PreferenceSchema = {
57
58
  'keyCode',
58
59
  ],
59
60
  default: 'code',
60
- description: nls.localize('vscode/keybindingService/dispatch',
61
- 'Whether to interpret keypresses by the `code` of the physical key, or by the `keyCode` provided by the OS.')
61
+ description: nls.localizeByDefault(
62
+ 'Controls the dispatching logic for key presses to use either `code` (recommended) or `keyCode`.')
62
63
  },
63
64
  'window.menuBarVisibility': {
64
65
  type: 'string',
65
66
  enum: ['classic', 'visible', 'hidden', 'compact'],
66
67
  markdownEnumDescriptions: [
67
- nls.localize('vscode/workbench.contribution/window.menuBarVisibility.default', 'Menu is displayed at the top of the window and only hidden in full screen mode.'),
68
- nls.localize('vscode/workbench.contribution/window.menuBarVisibility.visible', 'Menu is always visible at the top of the window even in full screen mode.'),
69
- nls.localize('vscode/workbench.contribution/window.menuBarVisibility.hidden', 'Menu is always hidden.'),
70
- nls.localize('vscode/workbench.contribution/window.menuBarVisibility.compact', 'Menu is displayed as a compact button in the sidebar.')
68
+ nls.localizeByDefault('Menu is only hidden in full screen mode.'),
69
+ nls.localizeByDefault('Menu is always visible even in full screen mode.'),
70
+ nls.localizeByDefault('Menu is always hidden.'),
71
+ nls.localizeByDefault('Menu is displayed as a compact button in the sidebar. This value is ignored when `#window.titleBarStyle#` is `native`.')
71
72
  ],
72
73
  default: 'classic',
73
74
  scope: 'application',
74
- markdownDescription: nls.localize('vscode/workbench.contribution/menuBarVisibility', `Control the visibility of the menu bar.
75
- A setting of 'compact' will move the menu into the sidebar.`),
75
+ // eslint-disable-next-line max-len
76
+ markdownDescription: nls.localizeByDefault("Control the visibility of the menu bar. A setting of 'toggle' means that the menu bar is hidden and a single press of the Alt key will show it. By default, the menu bar will be visible, unless the window is full screen."),
76
77
  included: !isOSX
77
78
  },
78
79
  'workbench.list.openMode': {
@@ -82,17 +83,19 @@ export const corePreferenceSchema: PreferenceSchema = {
82
83
  'doubleClick'
83
84
  ],
84
85
  default: 'singleClick',
85
- description: nls.localize('vscode/listService/openModeModifier', 'Controls how to open items in trees using the mouse.')
86
+ // eslint-disable-next-line max-len
87
+ description: nls.localizeByDefault('Controls how to open items in trees and lists using the mouse (if supported). For parents with children in trees, this setting will control if a single click expands the parent or a double click. Note that some trees and lists might choose to ignore this setting if it is not applicable. ')
86
88
  },
87
89
  'workbench.editor.highlightModifiedTabs': {
88
90
  'type': 'boolean',
89
- 'description': nls.localize('vscode/workbench.contribution/highlightModifiedTabs', 'Controls whether a top border is drawn on modified (dirty) editor tabs or not.'),
91
+ // eslint-disable-next-line max-len
92
+ 'description': nls.localizeByDefault('Controls whether a top border is drawn on modified (dirty) editor tabs or not. This value is ignored when `#workbench.editor.showTabs#` is disabled.'),
90
93
  'default': false
91
94
  },
92
95
  'workbench.editor.closeOnFileDelete': {
93
96
  'type': 'boolean',
94
97
  // eslint-disable-next-line max-len
95
- 'description': nls.localize('vscode/workbench.contribution/closeOnFileDelete', 'Controls whether editors showing a file that was opened during the session should close automatically when getting deleted or renamed by some other process. Disabling this will keep the editor open on such an event. Note that deleting from within the application will always close the editor and that dirty files will never close to preserve your data.'),
98
+ 'description': nls.localizeByDefault('Controls whether editors showing a file that was opened during the session should close automatically when getting deleted or renamed by some other process. Disabling this will keep the editor open on such an event. Note that deleting from within the application will always close the editor and that dirty files will never close to preserve your data.'),
96
99
  'default': false
97
100
  },
98
101
  'workbench.commandPalette.history': {
@@ -100,38 +103,38 @@ export const corePreferenceSchema: PreferenceSchema = {
100
103
  default: 50,
101
104
  minimum: 0,
102
105
  // eslint-disable-next-line max-len
103
- description: nls.localize('vscode/workbench.contribution/commandHistory', 'Controls the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history.')
106
+ description: nls.localizeByDefault('Controls the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history.')
104
107
  },
105
108
  'workbench.colorTheme': {
106
109
  type: 'string',
107
110
  default: FrontendApplicationConfigProvider.get().defaultTheme,
108
- description: nls.localize('vscode/themeConfiguration/colorTheme', 'Specifies the color theme used in the workbench.')
111
+ description: nls.localizeByDefault('Specifies the color theme used in the workbench.')
109
112
  },
110
113
  'workbench.iconTheme': {
111
114
  type: ['string', 'null'],
112
115
  default: FrontendApplicationConfigProvider.get().defaultIconTheme,
113
- description: nls.localize('vscode/themeConfiguration/iconTheme', "Specifies the icon theme used in the workbench or 'null' to not show any file icons.")
116
+ description: nls.localizeByDefault("Specifies the file icon theme used in the workbench or 'null' to not show any file icons.")
114
117
  },
115
118
  'workbench.silentNotifications': {
116
119
  type: 'boolean',
117
120
  default: false,
118
- description: nls.localize('vscode/workbench.contribution/zenMode.silentNotifications', 'Controls whether to suppress notification popups.')
121
+ description: nls.localize('theia/core/silentNotifications', 'Controls whether to suppress notification popups.')
119
122
  },
120
123
  'workbench.statusBar.visible': {
121
124
  type: 'boolean',
122
125
  default: true,
123
- description: 'Controls the visibility of the status bar at the bottom of the workbench.'
126
+ description: nls.localizeByDefault('Controls the visibility of the status bar at the bottom of the workbench.')
124
127
  },
125
128
  'workbench.tree.renderIndentGuides': {
126
129
  type: 'string',
127
130
  enum: ['onHover', 'none', 'always'],
128
131
  default: 'onHover',
129
- description: nls.localize('vscode/listService/render tree indent guides', 'Controls whether the tree should render indent guides.')
132
+ description: nls.localizeByDefault('Controls whether the tree should render indent guides.')
130
133
  },
131
134
  'workbench.hover.delay': {
132
135
  type: 'number',
133
136
  default: isOSX ? 1500 : 500,
134
- description: 'Controls the delay in milliseconds after which the hover is shown for workbench items (ex. some extension provided tree view items).'
137
+ description: nls.localizeByDefault('Controls the delay in milliseconds after which the hover is shown.')
135
138
  },
136
139
  }
137
140
  };
@@ -67,10 +67,10 @@ export namespace DialogError {
67
67
  }
68
68
 
69
69
  export namespace Dialog {
70
- export const YES = nls.localize('vscode/extensionsUtils/yes', 'Yes');
71
- export const NO = nls.localize('vscode/extensionsUtils/no', 'No');
72
- export const OK = nls.localize('vscode/dialog/ok', 'OK');
73
- export const CANCEL = nls.localize('vscode/explorerViewer/cancel', 'Cancel');
70
+ export const YES = nls.localizeByDefault('Yes');
71
+ export const NO = nls.localizeByDefault('No');
72
+ export const OK = nls.localizeByDefault('OK');
73
+ export const CANCEL = nls.localizeByDefault('Cancel');
74
74
  }
75
75
 
76
76
  @injectable()
@@ -165,11 +165,12 @@ export const frontendApplicationModule = new ContainerModule((bind, unbind, isBo
165
165
 
166
166
  bind(DockPanelRendererFactory).toFactory(context => () => context.container.get(DockPanelRenderer));
167
167
  bind(DockPanelRenderer).toSelf();
168
- bind(TabBarRendererFactory).toFactory(context => () => {
169
- const contextMenuRenderer = context.container.get<ContextMenuRenderer>(ContextMenuRenderer);
170
- const decoratorService = context.container.get<TabBarDecoratorService>(TabBarDecoratorService);
171
- const iconThemeService = context.container.get<IconThemeService>(IconThemeService);
172
- return new TabBarRenderer(contextMenuRenderer, decoratorService, iconThemeService);
168
+ bind(TabBarRendererFactory).toFactory(({ container }) => () => {
169
+ const contextMenuRenderer = container.get(ContextMenuRenderer);
170
+ const tabBarDecoratorService = container.get(TabBarDecoratorService);
171
+ const iconThemeService = container.get(IconThemeService);
172
+ const selectionService = container.get(SelectionService);
173
+ return new TabBarRenderer(contextMenuRenderer, tabBarDecoratorService, iconThemeService, selectionService);
173
174
  });
174
175
 
175
176
  bindContributionProvider(bind, TabBarDecorator);
@@ -23,8 +23,8 @@ import { nls } from '../../common/nls';
23
23
 
24
24
  export namespace KeyboardCommands {
25
25
 
26
- const KEYBOARD_CATEGORY_KEY = 'vscode/settingsLayout/keyboard';
27
26
  const KEYBOARD_CATEGORY = 'Keyboard';
27
+ const KEYBOARD_CATEGORY_KEY = nls.getDefaultKey(KEYBOARD_CATEGORY);
28
28
 
29
29
  export const CHOOSE_KEYBOARD_LAYOUT = Command.toLocalizedCommand({
30
30
  id: 'core.keyboard.choose',
@@ -52,7 +52,7 @@ export class BrowserKeyboardFrontendContribution implements CommandContribution
52
52
  protected async chooseLayout(): Promise<KeyboardLayoutData | undefined> {
53
53
  const current = this.layoutProvider.currentLayoutData;
54
54
  const autodetect: QuickPickValue<'autodetect'> = {
55
- label: nls.localize('vscode/editorStatus/autoDetect', 'Auto-detect'),
55
+ label: nls.localizeByDefault('Auto-detect'),
56
56
  description: this.layoutProvider.currentLayoutSource !== 'user-choice' ? nls.localize('theia/core/keyboard/current', '(current: {0})', current.name) : undefined,
57
57
  detail: nls.localize('theia/core/keyboard/tryDetect', 'Try to detect the keyboard layout from browser information and pressed keys.'),
58
58
  value: 'autodetect'
@@ -14,6 +14,10 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
 
17
+ import { enableJSDOM } from '../test/jsdom';
18
+
19
+ let disableJSDOM = enableJSDOM();
20
+
17
21
  import { Container, injectable } from 'inversify';
18
22
  import type { IMacKeyboardLayoutInfo } from 'native-keymap';
19
23
  import * as chai from 'chai';
@@ -26,11 +30,15 @@ import { WindowService } from '../window/window-service';
26
30
  import { BrowserKeyboardLayoutProvider } from './browser-keyboard-layout-provider';
27
31
  import { Key } from './keys';
28
32
 
33
+ disableJSDOM();
34
+
29
35
  describe('browser keyboard layout provider', function (): void {
30
36
 
31
37
  let stubOSX: sinon.SinonStub;
32
38
  let stubWindows: sinon.SinonStub;
33
- let stubNavigator: sinon.SinonStub;
39
+
40
+ before(() => disableJSDOM = enableJSDOM());
41
+ after(() => disableJSDOM());
34
42
 
35
43
  const setup = (system: 'mac' | 'win' | 'linux') => {
36
44
  switch (system) {
@@ -47,7 +55,6 @@ describe('browser keyboard layout provider', function (): void {
47
55
  stubWindows = sinon.stub(os, 'isWindows').value(false);
48
56
  }
49
57
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
50
- stubNavigator = sinon.stub(global, 'navigator' as any).value({});
51
58
  const container = new Container();
52
59
  container.bind(BrowserKeyboardLayoutProvider).toSelf();
53
60
  container.bind(ILogger).to(MockLogger);
@@ -61,7 +68,6 @@ describe('browser keyboard layout provider', function (): void {
61
68
  afterEach(() => {
62
69
  stubOSX.restore();
63
70
  stubWindows.restore();
64
- stubNavigator.restore();
65
71
  });
66
72
 
67
73
  it('detects German Mac layout', async () => {
@@ -83,7 +89,7 @@ describe('browser keyboard layout provider', function (): void {
83
89
  currentLayout = l;
84
90
  });
85
91
 
86
- chai.expect((currentLayout.info as IMacKeyboardLayoutInfo).id).to.equal('com.apple.keylayout.US');
92
+ chai.expect((currentLayout.info as IMacKeyboardLayoutInfo).id).to.equal('com.apple.keylayout.German');
87
93
  service.validateKey({ code: Key.SEMICOLON.code, character: 'm' });
88
94
  chai.expect((currentLayout.info as IMacKeyboardLayoutInfo).id).to.equal('com.apple.keylayout.French');
89
95
  });