@codingame/monaco-vscode-accessibility-service-override 7.1.0 → 7.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-accessibility-service-override",
3
- "version": "7.1.0",
3
+ "version": "7.1.1",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,6 +26,6 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@7.1.0"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@7.1.1"
30
30
  }
31
31
  }
@@ -2,7 +2,7 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { Disposable, MutableDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
3
3
  import { Event } from 'vscode/vscode/vs/base/common/event';
4
4
  import Severity$1 from 'vscode/vscode/vs/base/common/severity';
5
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
5
+ import { localize } from 'vscode/vscode/vs/nls';
6
6
  import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility.service';
7
7
  import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
8
8
  import { ConfigurationTarget } from 'vscode/vscode/vs/platform/configuration/common/configuration';
@@ -12,7 +12,6 @@ import { INotificationService } from 'vscode/vscode/vs/platform/notification/com
12
12
  import { StatusbarAlignment } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
13
13
  import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
14
14
 
15
- const _moduleId = "vs/workbench/contrib/accessibility/browser/accessibilityStatus";
16
15
  let AccessibilityStatus = class AccessibilityStatus extends Disposable {
17
16
  static { this.ID = 'workbench.contrib.accessibilityStatus'; }
18
17
  constructor(configurationService, notificationService, accessibilityService, statusbarService) {
@@ -37,13 +36,13 @@ let AccessibilityStatus = class AccessibilityStatus extends Disposable {
37
36
  }));
38
37
  }
39
38
  showScreenReaderNotification() {
40
- this.screenReaderNotification = this.notificationService.prompt(Severity$1.Info, ( localizeWithPath(_moduleId, 0, "Are you using a screen reader to operate VS Code?")), [{
41
- label: ( localizeWithPath(_moduleId, 1, "Yes")),
39
+ this.screenReaderNotification = this.notificationService.prompt(Severity$1.Info, ( localize(5553, "Are you using a screen reader to operate VS Code?")), [{
40
+ label: ( localize(5554, "Yes")),
42
41
  run: () => {
43
42
  this.configurationService.updateValue('editor.accessibilitySupport', 'on', ConfigurationTarget.USER);
44
43
  }
45
44
  }, {
46
- label: ( localizeWithPath(_moduleId, 2, "No")),
45
+ label: ( localize(5555, "No")),
47
46
  run: () => {
48
47
  this.configurationService.updateValue('editor.accessibilitySupport', 'off', ConfigurationTarget.USER);
49
48
  }
@@ -56,9 +55,9 @@ let AccessibilityStatus = class AccessibilityStatus extends Disposable {
56
55
  updateScreenReaderModeElement(visible) {
57
56
  if (visible) {
58
57
  if (!this.screenReaderModeElement.value) {
59
- const text = ( localizeWithPath(_moduleId, 3, "Screen Reader Optimized"));
58
+ const text = ( localize(5556, "Screen Reader Optimized"));
60
59
  this.screenReaderModeElement.value = this.statusbarService.addEntry({
61
- name: ( localizeWithPath(_moduleId, 4, "Screen Reader Mode")),
60
+ name: ( localize(5557, "Screen Reader Mode")),
62
61
  text,
63
62
  ariaLabel: text,
64
63
  command: 'showEditorScreenReaderNotification',
@@ -7,7 +7,7 @@ import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
7
7
  import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
8
8
  import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
9
9
  import marked_1 from 'vscode/external/vscode-marked/lib/marked.esm.js';
10
- import { isMacintosh, isWindows } from 'vscode/vscode/vs/base/common/platform';
10
+ import { isWindows, isMacintosh } from 'vscode/vscode/vs/base/common/platform';
11
11
  import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
12
12
  import { URI } from 'vscode/vscode/vs/base/common/uri';
13
13
  import { EditorExtensionsRegistry } from 'vscode/vscode/vs/editor/browser/editorExtensions';
@@ -16,8 +16,8 @@ import { Position } from 'vscode/vscode/vs/editor/common/core/position';
16
16
  import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
17
17
  import { AccessibilityHelpNLS } from 'vscode/vscode/vs/editor/common/standaloneStrings';
18
18
  import { CodeActionController } from 'vscode/vscode/vs/editor/contrib/codeAction/browser/codeActionController';
19
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
20
- import { AdvancedContentProvider, AccessibleViewProviderId, ExtensionContentProvider, AccessibleViewType } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
19
+ import { localize } from 'vscode/vscode/vs/nls';
20
+ import { AccessibleContentProvider, AccessibleViewProviderId, ExtensionContentProvider, AccessibleViewType } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
21
21
  import { ACCESSIBLE_VIEW_SHOWN_STORAGE_PREFIX } from 'vscode/vscode/vs/platform/accessibility/common/accessibility';
22
22
  import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility.service';
23
23
  import { createAndFillInActionBarActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
@@ -36,13 +36,12 @@ import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.s
36
36
  import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
37
37
  import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
38
38
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
39
- import { accessibilityHelpIsShown, accessibleViewIsShown, accessibleViewSupportsNavigation, accessibleViewVerbosityEnabled, accessibleViewGoToSymbolSupported, accessibleViewCurrentProviderId, accessibleViewInCodeBlock, accessibleViewContainsCodeBlocks, accessibleViewOnLastLine, AccessibilityWorkbenchSettingId, AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
39
+ import { accessibilityHelpIsShown, accessibleViewIsShown, accessibleViewSupportsNavigation, accessibleViewVerbosityEnabled, accessibleViewGoToSymbolSupported, accessibleViewCurrentProviderId, accessibleViewInCodeBlock, accessibleViewContainsCodeBlocks, accessibleViewOnLastLine, accessibleViewHasUnassignedKeybindings, accessibleViewHasAssignedKeybindings, AccessibilityWorkbenchSettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
40
40
  import { resolveContentAndKeybindingItems } from './accessibleViewKeybindingResolver.js';
41
41
  import { AccessibilityCommandId } from 'vscode/vscode/vs/workbench/contrib/accessibility/common/accessibilityCommands';
42
42
  import { IChatCodeBlockContextProviderService } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chat.service';
43
43
  import { getSimpleEditorOptions } from 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions';
44
44
 
45
- const _moduleId = "vs/workbench/contrib/accessibility/browser/accessibleView";
46
45
  var DIMENSIONS;
47
46
  ( ((function(DIMENSIONS) {
48
47
  DIMENSIONS[DIMENSIONS["MAX_WIDTH"] = 600] = "MAX_WIDTH";
@@ -75,6 +74,8 @@ let AccessibleView = class AccessibleView extends Disposable {
75
74
  this._accessibleViewInCodeBlock = accessibleViewInCodeBlock.bindTo(this._contextKeyService);
76
75
  this._accessibleViewContainsCodeBlocks = accessibleViewContainsCodeBlocks.bindTo(this._contextKeyService);
77
76
  this._onLastLine = accessibleViewOnLastLine.bindTo(this._contextKeyService);
77
+ this._hasUnassignedKeybindings = accessibleViewHasUnassignedKeybindings.bindTo(this._contextKeyService);
78
+ this._hasAssignedKeybindings = accessibleViewHasAssignedKeybindings.bindTo(this._contextKeyService);
78
79
  this._container = document.createElement('div');
79
80
  this._container.classList.add('accessible-view');
80
81
  if (this._configurationService.getValue(AccessibilityWorkbenchSettingId.HideAccessibleView)) {
@@ -101,6 +102,7 @@ let AccessibleView = class AccessibleView extends Disposable {
101
102
  lineDecorationsWidth: 6,
102
103
  dragAndDrop: false,
103
104
  cursorWidth: 1,
105
+ wordWrap: 'off',
104
106
  wrappingStrategy: 'advanced',
105
107
  wrappingIndent: 'none',
106
108
  padding: { top: 2, bottom: 2 },
@@ -117,7 +119,7 @@ let AccessibleView = class AccessibleView extends Disposable {
117
119
  }
118
120
  }));
119
121
  this._register(this._configurationService.onDidChangeConfiguration(e => {
120
- if (this._currentProvider instanceof AdvancedContentProvider && e.affectsConfiguration(this._currentProvider.verbositySettingKey)) {
122
+ if (this._currentProvider instanceof AccessibleContentProvider && e.affectsConfiguration(this._currentProvider.verbositySettingKey)) {
121
123
  if (this._accessiblityHelpIsShown.get()) {
122
124
  this.show(this._currentProvider);
123
125
  }
@@ -147,6 +149,8 @@ let AccessibleView = class AccessibleView extends Disposable {
147
149
  this._accessibleViewVerbosityEnabled.reset();
148
150
  this._accessibleViewGoToSymbolSupported.reset();
149
151
  this._accessibleViewCurrentProviderId.reset();
152
+ this._hasAssignedKeybindings.reset();
153
+ this._hasUnassignedKeybindings.reset();
150
154
  }
151
155
  getPosition(id) {
152
156
  if (!id || !this._lastProvider || this._lastProvider.id !== id) {
@@ -202,17 +206,17 @@ let AccessibleView = class AccessibleView extends Disposable {
202
206
  return;
203
207
  }
204
208
  provider.onOpen?.();
205
- let viewContainer;
206
209
  const delegate = {
207
210
  getAnchor: () => { return { x: (getActiveWindow().innerWidth / 2) - ((Math.min(this._layoutService.activeContainerDimension.width * 0.62 , DIMENSIONS.MAX_WIDTH)) / 2), y: this._layoutService.activeContainerOffset.quickPickTop }; },
208
211
  render: (container) => {
209
- viewContainer = container;
210
- viewContainer.classList.add('accessible-view-container');
212
+ this._viewContainer = container;
213
+ this._viewContainer.classList.add('accessible-view-container');
211
214
  return this._render(provider, container, showAccessibleViewHelp);
212
215
  },
213
216
  onHide: () => {
214
217
  if (!showAccessibleViewHelp) {
215
218
  this._updateLastProvider();
219
+ this._currentProvider?.dispose();
216
220
  this._currentProvider = undefined;
217
221
  this._resetContextKeys();
218
222
  }
@@ -228,7 +232,7 @@ let AccessibleView = class AccessibleView extends Disposable {
228
232
  if (symbol && this._currentProvider) {
229
233
  this.showSymbol(this._currentProvider, symbol);
230
234
  }
231
- if (provider instanceof AdvancedContentProvider && provider.onDidRequestClearLastProvider) {
235
+ if (provider instanceof AccessibleContentProvider && provider.onDidRequestClearLastProvider) {
232
236
  this._register(provider.onDidRequestClearLastProvider((id) => {
233
237
  if (this._lastProvider?.options.id === id) {
234
238
  this._lastProvider = undefined;
@@ -246,23 +250,31 @@ let AccessibleView = class AccessibleView extends Disposable {
246
250
  }
247
251
  if (provider.onDidChangeContent) {
248
252
  this._register(provider.onDidChangeContent(() => {
249
- if (viewContainer) {
250
- this._render(provider, viewContainer, showAccessibleViewHelp);
253
+ if (this._viewContainer) {
254
+ this._render(provider, this._viewContainer, showAccessibleViewHelp);
251
255
  }
252
256
  }));
253
257
  }
254
258
  }
255
259
  previous() {
256
- this._currentProvider?.previous?.();
260
+ const newContent = this._currentProvider?.providePreviousContent?.();
261
+ if (!this._currentProvider || !this._viewContainer || !newContent) {
262
+ return;
263
+ }
264
+ this._render(this._currentProvider, this._viewContainer, undefined, newContent);
257
265
  }
258
266
  next() {
259
- this._currentProvider?.next?.();
267
+ const newContent = this._currentProvider?.provideNextContent?.();
268
+ if (!this._currentProvider || !this._viewContainer || !newContent) {
269
+ return;
270
+ }
271
+ this._render(this._currentProvider, this._viewContainer, undefined, newContent);
260
272
  }
261
273
  _verbosityEnabled() {
262
274
  if (!this._currentProvider) {
263
275
  return false;
264
276
  }
265
- return this._currentProvider instanceof AdvancedContentProvider ? this._configurationService.getValue(this._currentProvider.verbositySettingKey) === true : this._storageService.getBoolean(`${ACCESSIBLE_VIEW_SHOWN_STORAGE_PREFIX}${this._currentProvider.id}`, StorageScope.APPLICATION, false);
277
+ return this._currentProvider instanceof AccessibleContentProvider ? this._configurationService.getValue(this._currentProvider.verbositySettingKey) === true : this._storageService.getBoolean(`${ACCESSIBLE_VIEW_SHOWN_STORAGE_PREFIX}${this._currentProvider.id}`, StorageScope.APPLICATION, false);
266
278
  }
267
279
  goToSymbol() {
268
280
  if (!this._currentProvider) {
@@ -271,6 +283,9 @@ let AccessibleView = class AccessibleView extends Disposable {
271
283
  this._instantiationService.createInstance(AccessibleViewSymbolQuickPick, this).show(this._currentProvider);
272
284
  }
273
285
  calculateCodeBlocks(markdown) {
286
+ if (!markdown) {
287
+ return;
288
+ }
274
289
  if (this._currentProvider?.id !== AccessibleViewProviderId.Chat) {
275
290
  return;
276
291
  }
@@ -298,7 +313,7 @@ let AccessibleView = class AccessibleView extends Disposable {
298
313
  this._accessibleViewContainsCodeBlocks.set(this._codeBlocks.length > 0);
299
314
  }
300
315
  getSymbols() {
301
- const provider = this._currentProvider instanceof AdvancedContentProvider ? this._currentProvider : undefined;
316
+ const provider = this._currentProvider instanceof AccessibleContentProvider ? this._currentProvider : undefined;
302
317
  if (!this._currentContent || !provider) {
303
318
  return;
304
319
  }
@@ -322,18 +337,18 @@ let AccessibleView = class AccessibleView extends Disposable {
322
337
  }
323
338
  this._openerService.open(( (URI.parse(this._currentProvider.options.readMoreUrl))));
324
339
  }
325
- configureKeybindings() {
340
+ configureKeybindings(unassigned) {
326
341
  this._inQuickPick = true;
327
342
  const provider = this._updateLastProvider();
328
- const items = provider?.options?.configureKeybindingItems;
343
+ const items = unassigned ? provider?.options?.configureKeybindingItems : provider?.options?.configuredKeybindingItems;
329
344
  if (!items) {
330
345
  return;
331
346
  }
332
347
  const quickPick = this._quickInputService.createQuickPick();
333
348
  this._register(quickPick);
334
349
  quickPick.items = items;
335
- quickPick.title = ( localizeWithPath(_moduleId, 0, 'Configure keybindings'));
336
- quickPick.placeholder = ( localizeWithPath(_moduleId, 1, 'Select a command ID to configure a keybinding for it'));
350
+ quickPick.title = ( localize(2242, 'Configure keybindings'));
351
+ quickPick.placeholder = ( localize(2243, 'Select a command ID to configure a keybinding for it'));
337
352
  quickPick.show();
338
353
  quickPick.onDidAccept(async () => {
339
354
  const item = quickPick.selectedItems[0];
@@ -373,7 +388,7 @@ let AccessibleView = class AccessibleView extends Disposable {
373
388
  }
374
389
  }
375
390
  if (label) {
376
- symbols.push({ markdownToParse: label, label: ( localizeWithPath(_moduleId, 2, "({0}) {1}", token.type, label)), ariaLabel: ( localizeWithPath(_moduleId, 3, "({0}) {1}", token.type, label)), firstListItem });
391
+ symbols.push({ markdownToParse: label, label: ( localize(2244, "({0}) {1}", token.type, label)), ariaLabel: ( localize(2245, "({0}) {1}", token.type, label)), firstListItem });
377
392
  firstListItem = undefined;
378
393
  }
379
394
  }
@@ -400,13 +415,12 @@ let AccessibleView = class AccessibleView extends Disposable {
400
415
  this._updateContextKeys(provider, true);
401
416
  }
402
417
  disableHint() {
403
- if (!(this._currentProvider instanceof AdvancedContentProvider)) {
418
+ if (!(this._currentProvider instanceof AccessibleContentProvider)) {
404
419
  return;
405
420
  }
406
421
  this._configurationService.updateValue(this._currentProvider?.verbositySettingKey, false);
407
- alert(( localizeWithPath(
408
- _moduleId,
409
- 4,
422
+ alert(( localize(
423
+ 2246,
410
424
  '{0} accessibility verbosity is now disabled',
411
425
  this._currentProvider.verbositySettingKey
412
426
  )));
@@ -420,53 +434,52 @@ let AccessibleView = class AccessibleView extends Disposable {
420
434
  this._accessibleViewIsShown.set(shown);
421
435
  this._accessiblityHelpIsShown.reset();
422
436
  }
423
- this._accessibleViewSupportsNavigation.set(provider.next !== undefined || provider.previous !== undefined);
437
+ this._accessibleViewSupportsNavigation.set(provider.provideNextContent !== undefined || provider.providePreviousContent !== undefined);
424
438
  this._accessibleViewVerbosityEnabled.set(this._verbosityEnabled());
425
439
  this._accessibleViewGoToSymbolSupported.set(this._goToSymbolsSupported() ? this.getSymbols()?.length > 0 : false);
426
440
  }
427
- _render(provider, container, showAccessibleViewHelp) {
428
- this._currentProvider = provider;
429
- this._accessibleViewCurrentProviderId.set(provider.id);
430
- const verbose = this._verbosityEnabled();
431
- const readMoreLink = provider.options.readMoreUrl ? ( localizeWithPath(
432
- _moduleId,
433
- 5,
434
- "\n\nOpen a browser window with more information related to accessibility<keybinding:{0}>.",
435
- AccessibilityCommandId.AccessibilityHelpOpenHelpLink
436
- )) : '';
437
- let disableHelpHint = '';
438
- if (provider instanceof AdvancedContentProvider && provider.options.type === AccessibleViewType.Help && verbose) {
439
- disableHelpHint = this._getDisableVerbosityHint();
441
+ _updateContent(provider, updatedContent) {
442
+ let content = updatedContent ?? provider.provideContent();
443
+ if (provider.options.type === AccessibleViewType.View) {
444
+ this._currentContent = content;
445
+ this._hasUnassignedKeybindings.reset();
446
+ this._hasAssignedKeybindings.reset();
447
+ return;
440
448
  }
441
- const accessibilitySupport = this._accessibilityService.isScreenReaderOptimized();
442
- let message = '';
443
- if (provider.options.type === AccessibleViewType.Help) {
444
- const turnOnMessage = (isMacintosh
445
- ? AccessibilityHelpNLS.changeConfigToOnMac
446
- : AccessibilityHelpNLS.changeConfigToOnWinLinux);
447
- if (accessibilitySupport && provider instanceof AdvancedContentProvider && provider.verbositySettingKey === AccessibilityVerbositySettingId.Editor) {
448
- message = AccessibilityHelpNLS.auto_on;
449
- message += '\n';
449
+ const readMoreLinkHint = this._readMoreHint(provider);
450
+ const disableHelpHint = this._disableVerbosityHint(provider);
451
+ const screenReaderModeHint = this._screenReaderModeHint(provider);
452
+ const exitThisDialogHint = this._exitDialogHint(provider);
453
+ let configureKbHint = '';
454
+ let configureAssignedKbHint = '';
455
+ const resolvedContent = resolveContentAndKeybindingItems(this._keybindingService, screenReaderModeHint + content + readMoreLinkHint + disableHelpHint + exitThisDialogHint);
456
+ if (resolvedContent) {
457
+ content = resolvedContent.content.value;
458
+ if (resolvedContent.configureKeybindingItems) {
459
+ provider.options.configureKeybindingItems = resolvedContent.configureKeybindingItems;
460
+ this._hasUnassignedKeybindings.set(true);
461
+ configureKbHint = this._configureUnassignedKbHint();
450
462
  }
451
- else if (!accessibilitySupport) {
452
- message = AccessibilityHelpNLS.auto_off + '\n' + turnOnMessage;
453
- message += '\n';
463
+ else {
464
+ this._hasAssignedKeybindings.reset();
454
465
  }
455
- }
456
- const exitThisDialogHint = verbose && !provider.options.position ? ( localizeWithPath(_moduleId, 6, '\n\nExit this dialog (Escape).')) : '';
457
- let content = provider.provideContent();
458
- if (provider.options.type === AccessibleViewType.Help) {
459
- const resolvedContent = resolveContentAndKeybindingItems(this._keybindingService, content + readMoreLink + disableHelpHint + exitThisDialogHint);
460
- if (resolvedContent) {
461
- content = resolvedContent.content.value;
462
- if (resolvedContent.configureKeybindingItems) {
463
- provider.options.configureKeybindingItems = resolvedContent.configureKeybindingItems;
464
- }
466
+ if (resolvedContent.configuredKeybindingItems) {
467
+ provider.options.configuredKeybindingItems = resolvedContent.configuredKeybindingItems;
468
+ this._hasAssignedKeybindings.set(true);
469
+ configureAssignedKbHint = this._configureAssignedKbHint();
470
+ }
471
+ else {
472
+ this._hasAssignedKeybindings.reset();
465
473
  }
466
474
  }
467
- const newContent = message + content;
468
- this.calculateCodeBlocks(newContent);
469
- this._currentContent = newContent;
475
+ this._currentContent = content + configureKbHint + configureAssignedKbHint;
476
+ }
477
+ _render(provider, container, showAccessibleViewHelp, updatedContent) {
478
+ this._currentProvider = provider;
479
+ this._accessibleViewCurrentProviderId.set(provider.id);
480
+ const verbose = this._verbosityEnabled();
481
+ this._updateContent(provider, updatedContent);
482
+ this.calculateCodeBlocks(this._currentContent);
470
483
  this._updateContextKeys(provider, true);
471
484
  const widgetIsFocused = this._editorWidget.hasTextFocus() || this._editorWidget.hasWidgetFocus();
472
485
  this._getTextModel(( (URI.from(
@@ -485,19 +498,18 @@ let AccessibleView = class AccessibleView extends Disposable {
485
498
  let actionsHint = '';
486
499
  const hasActions = this._accessibleViewSupportsNavigation.get() || this._accessibleViewVerbosityEnabled.get() || this._accessibleViewGoToSymbolSupported.get() || provider.actions?.length;
487
500
  if (verbose && !showAccessibleViewHelp && hasActions) {
488
- actionsHint = provider.options.position ? ( localizeWithPath(
489
- _moduleId,
490
- 7,
501
+ actionsHint = provider.options.position ? ( localize(
502
+ 2247,
491
503
  'Explore actions such as disabling this hint (Shift+Tab), use Escape to exit this dialog.'
492
- )) : ( localizeWithPath(_moduleId, 8, 'Explore actions such as disabling this hint (Shift+Tab).'));
504
+ )) : ( localize(2248, 'Explore actions such as disabling this hint (Shift+Tab).'));
493
505
  }
494
- let ariaLabel = provider.options.type === AccessibleViewType.Help ? ( localizeWithPath(_moduleId, 9, "Accessibility Help")) : ( localizeWithPath(_moduleId, 10, "Accessible View"));
506
+ let ariaLabel = provider.options.type === AccessibleViewType.Help ? ( localize(2249, "Accessibility Help")) : ( localize(2250, "Accessible View"));
495
507
  this._title.textContent = ariaLabel;
496
508
  if (actionsHint && provider.options.type === AccessibleViewType.View) {
497
- ariaLabel = ( localizeWithPath(_moduleId, 11, "Accessible View, {0}", actionsHint));
509
+ ariaLabel = ( localize(2251, "Accessible View, {0}", actionsHint));
498
510
  }
499
511
  else if (actionsHint) {
500
- ariaLabel = ( localizeWithPath(_moduleId, 12, "Accessibility Help, {0}", actionsHint));
512
+ ariaLabel = ( localize(2252, "Accessibility Help, {0}", actionsHint));
501
513
  }
502
514
  if (isWindows && widgetIsFocused) {
503
515
  ariaLabel = '';
@@ -527,6 +539,8 @@ let AccessibleView = class AccessibleView extends Disposable {
527
539
  this._updateContextKeys(provider, false);
528
540
  this._lastProvider = undefined;
529
541
  this._currentContent = undefined;
542
+ this._currentProvider?.dispose();
543
+ this._currentProvider = undefined;
530
544
  };
531
545
  const disposableStore = ( (new DisposableStore()));
532
546
  disposableStore.add(this._editorWidget.onKeyDown((e) => {
@@ -543,7 +557,7 @@ let AccessibleView = class AccessibleView extends Disposable {
543
557
  e.preventDefault();
544
558
  e.stopPropagation();
545
559
  }
546
- if (provider instanceof AdvancedContentProvider) {
560
+ if (provider instanceof AccessibleContentProvider) {
547
561
  provider.onKeyDown?.(e);
548
562
  }
549
563
  }));
@@ -563,7 +577,7 @@ let AccessibleView = class AccessibleView extends Disposable {
563
577
  return disposableStore;
564
578
  }
565
579
  _updateToolbar(providedActions, type) {
566
- this._toolbar.setAriaLabel(type === AccessibleViewType.Help ? ( localizeWithPath(_moduleId, 13, 'Accessibility Help')) : ( localizeWithPath(_moduleId, 14, "Accessible View")));
580
+ this._toolbar.setAriaLabel(type === AccessibleViewType.Help ? ( localize(2253, 'Accessibility Help')) : ( localize(2254, "Accessible View")));
567
581
  const menuActions = [];
568
582
  const toolbarMenu = this._register(this._menuService.createMenu(MenuId.AccessibleView, this._contextKeyService));
569
583
  createAndFillInActionBarActions(toolbarMenu, {}, menuActions);
@@ -596,14 +610,14 @@ let AccessibleView = class AccessibleView extends Disposable {
596
610
  if (!this._currentProvider) {
597
611
  return false;
598
612
  }
599
- return this._currentProvider.options.type === AccessibleViewType.Help || this._currentProvider.options.language === 'markdown' || this._currentProvider.options.language === undefined || (this._currentProvider instanceof AdvancedContentProvider && !!this._currentProvider.getSymbols?.());
613
+ return this._currentProvider.options.type === AccessibleViewType.Help || this._currentProvider.options.language === 'markdown' || this._currentProvider.options.language === undefined || (this._currentProvider instanceof AccessibleContentProvider && !!this._currentProvider.getSymbols?.());
600
614
  }
601
615
  _updateLastProvider() {
602
616
  const provider = this._currentProvider;
603
617
  if (!provider) {
604
618
  return;
605
619
  }
606
- const lastProvider = provider instanceof AdvancedContentProvider ? ( (new AdvancedContentProvider(
620
+ const lastProvider = provider instanceof AccessibleContentProvider ? ( (new AccessibleContentProvider(
607
621
  provider.id,
608
622
  provider.options,
609
623
  provider.provideContent.bind(provider),
@@ -611,8 +625,8 @@ let AccessibleView = class AccessibleView extends Disposable {
611
625
  provider.verbositySettingKey,
612
626
  provider.onOpen?.bind(provider),
613
627
  provider.actions,
614
- provider.next?.bind(provider),
615
- provider.previous?.bind(provider),
628
+ provider.provideNextContent?.bind(provider),
629
+ provider.providePreviousContent?.bind(provider),
616
630
  provider.onDidChangeContent?.bind(provider),
617
631
  provider.onKeyDown?.bind(provider),
618
632
  provider.getSymbols?.bind(provider)
@@ -622,8 +636,8 @@ let AccessibleView = class AccessibleView extends Disposable {
622
636
  provider.provideContent.bind(provider),
623
637
  provider.onClose.bind(provider),
624
638
  provider.onOpen?.bind(provider),
625
- provider.next?.bind(provider),
626
- provider.previous?.bind(provider),
639
+ provider.provideNextContent?.bind(provider),
640
+ provider.providePreviousContent?.bind(provider),
627
641
  provider.actions,
628
642
  provider.onDidChangeContent?.bind(provider)
629
643
  )));
@@ -634,25 +648,41 @@ let AccessibleView = class AccessibleView extends Disposable {
634
648
  if (!lastProvider) {
635
649
  return;
636
650
  }
637
- const accessibleViewHelpProvider = {
638
- id: lastProvider.id,
639
- provideContent: () => lastProvider.options.customHelp ? lastProvider?.options.customHelp() : this._getAccessibleViewHelpDialogContent(this._goToSymbolsSupported()),
640
- onClose: () => {
641
- this._contextViewService.hideContextView();
642
- queueMicrotask(() => this.show(lastProvider));
643
- },
644
- options: { type: AccessibleViewType.Help },
645
- verbositySettingKey: lastProvider instanceof AdvancedContentProvider ? lastProvider.verbositySettingKey : undefined
646
- };
651
+ let accessibleViewHelpProvider;
652
+ if (lastProvider instanceof AccessibleContentProvider) {
653
+ accessibleViewHelpProvider = ( (new AccessibleContentProvider(
654
+ lastProvider.id,
655
+ { type: AccessibleViewType.Help },
656
+ () => lastProvider.options.customHelp ? lastProvider?.options.customHelp() : this._accessibleViewHelpDialogContent(this._goToSymbolsSupported()),
657
+ () => {
658
+ this._contextViewService.hideContextView();
659
+ queueMicrotask(() => this.show(lastProvider));
660
+ },
661
+ lastProvider.verbositySettingKey
662
+ )));
663
+ }
664
+ else {
665
+ accessibleViewHelpProvider = ( (new ExtensionContentProvider(
666
+ lastProvider.id,
667
+ { type: AccessibleViewType.Help },
668
+ () => lastProvider.options.customHelp ? lastProvider?.options.customHelp() : this._accessibleViewHelpDialogContent(this._goToSymbolsSupported()),
669
+ () => {
670
+ this._contextViewService.hideContextView();
671
+ queueMicrotask(() => this.show(lastProvider));
672
+ }
673
+ )));
674
+ }
647
675
  this._contextViewService.hideContextView();
648
- queueMicrotask(() => this.show(accessibleViewHelpProvider, undefined, true));
676
+ if (accessibleViewHelpProvider) {
677
+ queueMicrotask(() => this.show(accessibleViewHelpProvider, undefined, true));
678
+ }
649
679
  }
650
- _getAccessibleViewHelpDialogContent(providerHasSymbols) {
651
- const navigationHint = this._getNavigationHint();
652
- const goToSymbolHint = this._getGoToSymbolHint(providerHasSymbols);
653
- const toolbarHint = ( localizeWithPath(_moduleId, 15, "Navigate to the toolbar (Shift+Tab)."));
680
+ _accessibleViewHelpDialogContent(providerHasSymbols) {
681
+ const navigationHint = this._navigationHint();
682
+ const goToSymbolHint = this._goToSymbolHint(providerHasSymbols);
683
+ const toolbarHint = ( localize(2255, "Navigate to the toolbar (Shift+Tab)."));
654
684
  const chatHints = this._getChatHints();
655
- let hint = ( localizeWithPath(_moduleId, 16, "In the accessible view, you can:\n"));
685
+ let hint = ( localize(2256, "In the accessible view, you can:\n"));
656
686
  if (navigationHint) {
657
687
  hint += ' - ' + navigationHint + '\n';
658
688
  }
@@ -671,50 +701,94 @@ let AccessibleView = class AccessibleView extends Disposable {
671
701
  if (this._currentProvider?.id !== AccessibleViewProviderId.Chat) {
672
702
  return;
673
703
  }
674
- return [( localizeWithPath(
675
- _moduleId,
676
- 17,
677
- " - Insert the code block at the cursor<keybinding:workbench.action.chat.insertCodeBlock>."
704
+ return [( localize(
705
+ 2257,
706
+ " - Insert the code block at the cursor{0}.",
707
+ '<keybinding:workbench.action.chat.insertCodeBlock>'
678
708
  )),
679
- ( localizeWithPath(
680
- _moduleId,
681
- 18,
682
- " - Insert the code block into a new file<keybinding:workbench.action.chat.insertIntoNewFile>."
709
+ ( localize(
710
+ 2258,
711
+ " - Insert the code block into a new file{0}.",
712
+ '<keybinding:workbench.action.chat.insertIntoNewFile>'
683
713
  )),
684
- ( localizeWithPath(
685
- _moduleId,
686
- 19,
687
- " - Run the code block in the terminal<keybinding:'workbench.action.chat.runInTerminal>.\n"
714
+ ( localize(
715
+ 2259,
716
+ " - Run the code block in the terminal{0}.\n",
717
+ '<keybinding:workbench.action.chat.runInTerminal>'
688
718
  ))].join('\n');
689
719
  }
690
- _getNavigationHint() {
691
- return ( localizeWithPath(
692
- _moduleId,
693
- 20,
694
- "Show the next item<keybinding:{0}> or previous item<keybinding:{1}>.",
695
- AccessibilityCommandId.ShowNext,
696
- AccessibilityCommandId.ShowPrevious
720
+ _navigationHint() {
721
+ return ( localize(
722
+ 2260,
723
+ "Show the next item{0} or previous item{1}.",
724
+ `<keybinding:${AccessibilityCommandId.ShowNext}`,
725
+ `<keybinding:${AccessibilityCommandId.ShowPrevious}>`
697
726
  ));
698
727
  }
699
- _getDisableVerbosityHint() {
700
- return ( localizeWithPath(
701
- _moduleId,
702
- 21,
703
- "\n\nDisable accessibility verbosity for this feature<keybinding:{0}>.",
704
- AccessibilityCommandId.DisableVerbosityHint
705
- ));
728
+ _disableVerbosityHint(provider) {
729
+ if (provider.options.type === AccessibleViewType.Help && this._verbosityEnabled()) {
730
+ return ( localize(
731
+ 2261,
732
+ "\nDisable accessibility verbosity for this feature{0}.",
733
+ `<keybinding:${AccessibilityCommandId.DisableVerbosityHint}>`
734
+ ));
735
+ }
736
+ return '';
706
737
  }
707
- _getGoToSymbolHint(providerHasSymbols) {
738
+ _goToSymbolHint(providerHasSymbols) {
708
739
  if (!providerHasSymbols) {
709
740
  return;
710
741
  }
711
- return ( localizeWithPath(
712
- _moduleId,
713
- 22,
714
- 'Go to a symbol<keybinding:{0}>.',
715
- AccessibilityCommandId.GoToSymbol
742
+ return ( localize(
743
+ 2262,
744
+ 'Go to a symbol{0}.',
745
+ `<keybinding:${AccessibilityCommandId.GoToSymbol}>`
716
746
  ));
717
747
  }
748
+ _configureUnassignedKbHint() {
749
+ const configureKb = this._keybindingService.lookupKeybinding(AccessibilityCommandId.AccessibilityHelpConfigureKeybindings)?.getAriaLabel();
750
+ const keybindingToConfigureQuickPick = configureKb ? '(' + configureKb + ')' : 'by assigning a keybinding to the command Accessibility Help Configure Unassigned Keybindings.';
751
+ return ( localize(
752
+ 2263,
753
+ '\nConfigure keybindings for commands that lack them {0}.',
754
+ keybindingToConfigureQuickPick
755
+ ));
756
+ }
757
+ _configureAssignedKbHint() {
758
+ const configureKb = this._keybindingService.lookupKeybinding(AccessibilityCommandId.AccessibilityHelpConfigureAssignedKeybindings)?.getAriaLabel();
759
+ const keybindingToConfigureQuickPick = configureKb ? '(' + configureKb + ')' : 'by assigning a keybinding to the command Accessibility Help Configure Assigned Keybindings.';
760
+ return ( localize(
761
+ 2264,
762
+ '\nConfigure keybindings for commands that already have assignments {0}.',
763
+ keybindingToConfigureQuickPick
764
+ ));
765
+ }
766
+ _screenReaderModeHint(provider) {
767
+ const accessibilitySupport = this._accessibilityService.isScreenReaderOptimized();
768
+ let screenReaderModeHint = '';
769
+ const turnOnMessage = (isMacintosh
770
+ ? AccessibilityHelpNLS.changeConfigToOnMac
771
+ : AccessibilityHelpNLS.changeConfigToOnWinLinux);
772
+ if (accessibilitySupport && provider.id === AccessibleViewProviderId.Editor) {
773
+ screenReaderModeHint = AccessibilityHelpNLS.auto_on;
774
+ screenReaderModeHint += '\n';
775
+ }
776
+ else if (!accessibilitySupport) {
777
+ screenReaderModeHint = AccessibilityHelpNLS.auto_off + '\n' + turnOnMessage;
778
+ screenReaderModeHint += '\n';
779
+ }
780
+ return screenReaderModeHint;
781
+ }
782
+ _exitDialogHint(provider) {
783
+ return this._verbosityEnabled() && !provider.options.position ? ( localize(2265, '\nExit this dialog (Escape).')) : '';
784
+ }
785
+ _readMoreHint(provider) {
786
+ return provider.options.readMoreUrl ? ( localize(
787
+ 2266,
788
+ "\nOpen a browser window with more information related to accessibility{0}.",
789
+ `<keybinding:${AccessibilityCommandId.AccessibilityHelpOpenHelpLink}>`
790
+ )) : '';
791
+ }
718
792
  };
719
793
  AccessibleView = ( (__decorate([
720
794
  ( (__param(0, IOpenerService))),
@@ -745,8 +819,8 @@ let AccessibleViewService = class AccessibleViewService extends Disposable {
745
819
  }
746
820
  this._accessibleView.show(provider, undefined, undefined, position);
747
821
  }
748
- configureKeybindings() {
749
- this._accessibleView?.configureKeybindings();
822
+ configureKeybindings(unassigned) {
823
+ this._accessibleView?.configureKeybindings(unassigned);
750
824
  }
751
825
  openHelpLink() {
752
826
  this._accessibleView?.openHelpLink();
@@ -770,12 +844,11 @@ let AccessibleViewService = class AccessibleViewService extends Disposable {
770
844
  const keybinding = this._keybindingService.lookupKeybinding(AccessibilityCommandId.OpenAccessibleView)?.getAriaLabel();
771
845
  let hint = null;
772
846
  if (keybinding) {
773
- hint = ( localizeWithPath(_moduleId, 23, "Inspect this in the accessible view with {0}", keybinding));
847
+ hint = ( localize(2267, "Inspect this in the accessible view with {0}", keybinding));
774
848
  }
775
849
  else {
776
- hint = ( localizeWithPath(
777
- _moduleId,
778
- 24,
850
+ hint = ( localize(
851
+ 2268,
779
852
  "Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."
780
853
  ));
781
854
  }
@@ -820,8 +893,8 @@ let AccessibleViewSymbolQuickPick = class AccessibleViewSymbolQuickPick {
820
893
  }
821
894
  show(provider) {
822
895
  const quickPick = this._quickInputService.createQuickPick();
823
- quickPick.placeholder = ( localizeWithPath(_moduleId, 25, "Type to search symbols"));
824
- quickPick.title = ( localizeWithPath(_moduleId, 26, "Go to Symbol Accessible View"));
896
+ quickPick.placeholder = ( localize(2269, "Type to search symbols"));
897
+ quickPick.title = ( localize(2270, "Go to Symbol Accessible View"));
825
898
  const symbols = this._accessibleView.getSymbols();
826
899
  if (!symbols) {
827
900
  return;
@@ -20,11 +20,17 @@ class AccesibleViewContributions extends Disposable {
20
20
  AccessibleViewRegistry.getImplementations().forEach(impl => {
21
21
  const implementation = (accessor) => {
22
22
  const provider = impl.getProvider(accessor);
23
- if (provider) {
23
+ if (!provider) {
24
+ return false;
25
+ }
26
+ try {
24
27
  accessor.get(IAccessibleViewService).show(provider);
25
28
  return true;
26
29
  }
27
- return false;
30
+ catch {
31
+ provider.dispose();
32
+ return false;
33
+ }
28
34
  };
29
35
  if (impl.type === AccessibleViewType.View) {
30
36
  this._register(AccessibleViewAction.addImplementation(impl.priority, impl.name, implementation, impl.when));
@@ -1,11 +1,11 @@
1
1
  import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
2
- import { AccessibilityCommandId } from 'vscode/vscode/vs/workbench/contrib/accessibility/common/accessibilityCommands';
3
2
 
4
3
  function resolveContentAndKeybindingItems(keybindingService, value) {
5
4
  if (!value) {
6
5
  return;
7
6
  }
8
7
  const configureKeybindingItems = [];
8
+ const configuredKeybindingItems = [];
9
9
  const matches = value.matchAll(/\<keybinding:(?<commandId>.*)\>/gm);
10
10
  for (const match of [...matches]) {
11
11
  const commandId = match?.groups?.commandId;
@@ -13,9 +13,7 @@ function resolveContentAndKeybindingItems(keybindingService, value) {
13
13
  if (match?.length && commandId) {
14
14
  const keybinding = keybindingService.lookupKeybinding(commandId)?.getAriaLabel();
15
15
  if (!keybinding) {
16
- const configureKb = keybindingService.lookupKeybinding(AccessibilityCommandId.AccessibilityHelpConfigureKeybindings)?.getAriaLabel();
17
- const keybindingToConfigureQuickPick = configureKb ? '(' + configureKb + ')' : 'by assigning a keybinding to the command Accessibility Help Configure Keybindings.';
18
- kbLabel = `, configure a keybinding ` + keybindingToConfigureQuickPick;
16
+ kbLabel = ` (unassigned keybinding)`;
19
17
  configureKeybindingItems.push({
20
18
  label: commandId,
21
19
  id: commandId
@@ -23,13 +21,17 @@ function resolveContentAndKeybindingItems(keybindingService, value) {
23
21
  }
24
22
  else {
25
23
  kbLabel = ' (' + keybinding + ')';
24
+ configuredKeybindingItems.push({
25
+ label: commandId,
26
+ id: commandId
27
+ });
26
28
  }
27
29
  value = value.replace(match[0], kbLabel);
28
30
  }
29
31
  }
30
32
  const content = ( new MarkdownString(value));
31
33
  content.isTrusted = true;
32
- return { content, configureKeybindingItems: configureKeybindingItems.length ? configureKeybindingItems : undefined };
34
+ return { content, configureKeybindingItems: configureKeybindingItems.length ? configureKeybindingItems : undefined, configuredKeybindingItems: configuredKeybindingItems.length ? configuredKeybindingItems : undefined };
33
35
  }
34
36
 
35
37
  export { resolveContentAndKeybindingItems };
@@ -54,7 +54,6 @@ function registerAccessibilityHelpAction(keybindingService, viewDescriptor) {
54
54
  () => viewsService.openView(viewDescriptor.id, true)
55
55
  ));
56
56
  },
57
- dispose: () => { },
58
57
  }));
59
58
  disposableStore.add(keybindingService.onDidUpdateKeybindings(() => {
60
59
  disposableStore.clear();
@@ -6,9 +6,9 @@ import { registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs
6
6
  import { AccessibilitySignalLineDebuggerContribution } from './accessibilitySignalDebuggerContribution.js';
7
7
  import { ShowSignalSoundHelp, ShowAccessibilityAnnouncementHelp } from './commands.js';
8
8
  import { EditorTextPropertySignalsContribution } from './editorTextPropertySignalsContribution.js';
9
- import { wrapInReloadableClass } from './reloadableWorkbenchContribution.js';
9
+ import { wrapInReloadableClass0 } from 'vscode/vscode/vs/platform/observable/common/wrapInReloadableClass';
10
10
 
11
- registerWorkbenchContribution2('EditorTextPropertySignalsContribution', wrapInReloadableClass(() => EditorTextPropertySignalsContribution), WorkbenchPhase.AfterRestored);
11
+ registerWorkbenchContribution2('EditorTextPropertySignalsContribution', wrapInReloadableClass0(() => EditorTextPropertySignalsContribution), WorkbenchPhase.AfterRestored);
12
12
  registerWorkbenchContribution2('AccessibilitySignalLineDebuggerContribution', AccessibilitySignalLineDebuggerContribution, WorkbenchPhase.AfterRestored);
13
13
  registerAction2(ShowSignalSoundHelp);
14
14
  registerAction2(ShowAccessibilityAnnouncementHelp);
@@ -1,6 +1,6 @@
1
1
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
2
2
  import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
3
- import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
3
+ import { localize2, localize } from 'vscode/vscode/vs/nls';
4
4
  import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility.service';
5
5
  import { Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
6
6
  import { AccessibilitySignal, AcknowledgeDocCommentsToken } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
@@ -9,18 +9,16 @@ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/c
9
9
  import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
10
10
  import { IPreferencesService } from 'vscode/vscode/vs/workbench/services/preferences/common/preferences.service';
11
11
 
12
- const _moduleId = "vs/workbench/contrib/accessibilitySignals/browser/commands";
13
12
  class ShowSignalSoundHelp extends Action2 {
14
13
  static { this.ID = 'signals.sounds.help'; }
15
14
  constructor() {
16
15
  super({
17
16
  id: ShowSignalSoundHelp.ID,
18
- title: ( localize2WithPath(_moduleId, 0, "Help: List Signal Sounds")),
17
+ title: ( localize2(5559, "Help: List Signal Sounds")),
19
18
  f1: true,
20
19
  metadata: {
21
- description: ( localizeWithPath(
22
- _moduleId,
23
- 1,
20
+ description: ( localize(
21
+ 5560,
24
22
  "List all accessibility sounds, noises, or audio cues and configure their settings"
25
23
  ))
26
24
  }
@@ -38,7 +36,7 @@ class ShowSignalSoundHelp extends Action2 {
38
36
  signal,
39
37
  buttons: userGestureSignals.includes(signal) ? [{
40
38
  iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
41
- tooltip: ( localizeWithPath(_moduleId, 2, 'Configure Sound')),
39
+ tooltip: ( localize(5561, 'Configure Sound')),
42
40
  alwaysVisible: true
43
41
  }] : []
44
42
  })))).sort((a, b) => a.label.localeCompare(b.label));
@@ -72,7 +70,7 @@ class ShowSignalSoundHelp extends Action2 {
72
70
  qp.onDidChangeActive(() => {
73
71
  accessibilitySignalService.playSound(qp.activeItems[0].signal.sound.getSound(true), true, AcknowledgeDocCommentsToken);
74
72
  });
75
- qp.placeholder = ( localizeWithPath(_moduleId, 3, 'Select a sound to play and configure'));
73
+ qp.placeholder = ( localize(5562, 'Select a sound to play and configure'));
76
74
  qp.canSelectMany = true;
77
75
  await qp.show();
78
76
  }
@@ -85,12 +83,11 @@ class ShowAccessibilityAnnouncementHelp extends Action2 {
85
83
  constructor() {
86
84
  super({
87
85
  id: ShowAccessibilityAnnouncementHelp.ID,
88
- title: ( localize2WithPath(_moduleId, 4, "Help: List Signal Announcements")),
86
+ title: ( localize2(5563, "Help: List Signal Announcements")),
89
87
  f1: true,
90
88
  metadata: {
91
- description: ( localizeWithPath(
92
- _moduleId,
93
- 5,
89
+ description: ( localize(
90
+ 5564,
94
91
  "List all accessibility announcements, alerts, braille messages, and configure their settings"
95
92
  ))
96
93
  }
@@ -108,7 +105,7 @@ class ShowAccessibilityAnnouncementHelp extends Action2 {
108
105
  signal,
109
106
  buttons: userGestureSignals.includes(signal) ? [{
110
107
  iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
111
- tooltip: ( localizeWithPath(_moduleId, 6, 'Configure Announcement')),
108
+ tooltip: ( localize(5565, 'Configure Announcement')),
112
109
  alwaysVisible: true,
113
110
  }] : []
114
111
  })))).sort((a, b) => a.label.localeCompare(b.label));
@@ -139,9 +136,8 @@ class ShowAccessibilityAnnouncementHelp extends Action2 {
139
136
  qp.onDidTriggerItemButton(e => {
140
137
  preferencesService.openUserSettings({ jsonEditor: true, revealSetting: { key: e.item.signal.settingsKey, edit: true } });
141
138
  });
142
- qp.placeholder = screenReaderOptimized ? ( localizeWithPath(_moduleId, 7, 'Select an announcement to configure')) : ( localizeWithPath(
143
- _moduleId,
144
- 8,
139
+ qp.placeholder = screenReaderOptimized ? ( localize(5566, 'Select an announcement to configure')) : ( localize(
140
+ 5567,
145
141
  'Screen reader is not active, announcements are disabled by default.'
146
142
  ));
147
143
  qp.canSelectMany = true;
@@ -58,7 +58,7 @@ let EditorTextPropertySignalsContribution = class EditorTextPropertySignalsContr
58
58
  _registerAccessibilitySignalsForEditor(editor, editorModel, store) {
59
59
  let lastLine = -1;
60
60
  const ignoredLineSignalsForCurrentLine = ( new Set());
61
- const timeouts = ( new DisposableStore());
61
+ const timeouts = store.add(( new DisposableStore()));
62
62
  const propertySources = ( this._textProperties.map(p => ({ source: p.createSource(editor, editorModel), property: p })));
63
63
  const didType = wasEventTriggeredRecently(editor.onDidChangeModelContent, 100, store);
64
64
  store.add(editor.onDidChangeCursorPosition(args => {
@@ -1,14 +1,13 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
3
3
  import { isDiffEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
4
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
4
+ import { localize } from 'vscode/vscode/vs/nls';
5
5
  import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility.service';
6
6
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
7
7
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
8
8
  import { Event } from 'vscode/vscode/vs/base/common/event';
9
9
  import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
10
10
 
11
- const _moduleId = "vs/workbench/contrib/accessibilitySignals/browser/openDiffEditorAnnouncement";
12
11
  let DiffEditorActiveAnnouncementContribution = class DiffEditorActiveAnnouncementContribution extends Disposable {
13
12
  static { this.ID = 'workbench.contrib.diffEditorActiveAnnouncement'; }
14
13
  constructor(_editorService, _accessibilityService, _configurationService) {
@@ -36,7 +35,7 @@ let DiffEditorActiveAnnouncementContribution = class DiffEditorActiveAnnouncemen
36
35
  }
37
36
  this._onDidActiveEditorChangeListener = this._register(this._editorService.onDidActiveEditorChange(() => {
38
37
  if (isDiffEditor(this._editorService.activeTextEditorControl)) {
39
- this._accessibilityService.alert(( localizeWithPath(_moduleId, 0, "Diff editor")));
38
+ this._accessibilityService.alert(( localize(5558, "Diff editor")));
40
39
  }
41
40
  }));
42
41
  }
@@ -1,5 +1,5 @@
1
1
  import './accessibility.css.js';
2
- import { localize2WithPath } from 'vscode/vscode/vs/nls';
2
+ import { localize2 } from 'vscode/vscode/vs/nls';
3
3
  import { ConfigurationTarget } from 'vscode/vscode/vs/platform/configuration/common/configuration';
4
4
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
5
5
  import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility.service';
@@ -10,16 +10,14 @@ import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
10
10
  import { alert } from 'vscode/vscode/vs/base/browser/ui/aria/aria';
11
11
  import { AccessibilityHelpNLS } from 'vscode/vscode/vs/editor/common/standaloneStrings';
12
12
 
13
- const _moduleId = "vs/workbench/contrib/codeEditor/browser/accessibility/accessibility";
14
13
  class ToggleScreenReaderMode extends Action2 {
15
14
  constructor() {
16
15
  super({
17
16
  id: 'editor.action.toggleScreenReaderAccessibilityMode',
18
- title: ( localize2WithPath(_moduleId, 0, "Toggle Screen Reader Accessibility Mode")),
17
+ title: ( localize2(2320, "Toggle Screen Reader Accessibility Mode")),
19
18
  metadata: {
20
- description: ( localize2WithPath(
21
- _moduleId,
22
- 1,
19
+ description: ( localize2(
20
+ 2321,
23
21
  "Toggles an optimized mode for usage with screen readers, braille devices, and other assistive technologies."
24
22
  )),
25
23
  },
@@ -1,42 +0,0 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
- import { isHotReloadEnabled } from 'vscode/vscode/vs/base/common/hotReload';
3
- import 'vscode/vscode/vs/base/common/arrays';
4
- import 'vscode/vscode/vs/base/common/observableInternal/derived';
5
- import { autorunWithStore } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
6
- import 'vscode/vscode/vs/base/common/observableInternal/utils';
7
- import 'vscode/vscode/vs/base/common/cancellation';
8
- import { readHotReloadableExport } from 'vscode/vscode/vs/editor/browser/widget/diffEditor/utils';
9
- import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
10
-
11
- function wrapInReloadableClass(getClass) {
12
- if (!isHotReloadEnabled()) {
13
- return getClass();
14
- }
15
- return class ReloadableWrapper extends BaseClass {
16
- constructor() {
17
- super(...arguments);
18
- this._autorun = undefined;
19
- }
20
- init() {
21
- this._autorun = autorunWithStore((reader, store) => {
22
- const clazz = readHotReloadableExport(getClass(), reader);
23
- store.add(this.instantiationService.createInstance(clazz));
24
- });
25
- }
26
- dispose() {
27
- this._autorun?.dispose();
28
- }
29
- };
30
- }
31
- let BaseClass = class BaseClass {
32
- constructor(instantiationService) {
33
- this.instantiationService = instantiationService;
34
- this.init();
35
- }
36
- init() { }
37
- };
38
- BaseClass = ( __decorate([
39
- ( __param(0, IInstantiationService))
40
- ], BaseClass));
41
-
42
- export { wrapInReloadableClass };