@codingame/monaco-vscode-view-title-bar-service-override 32.0.2 → 34.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-view-title-bar-service-override",
3
- "version": "32.0.2",
3
+ "version": "34.0.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - view-title-bar service-override",
6
6
  "keywords": [],
7
+ "license": "MIT",
7
8
  "author": {
8
9
  "name": "CodinGame",
9
10
  "url": "http://www.codingame.com"
10
11
  },
11
- "license": "MIT",
12
12
  "repository": {
13
13
  "type": "git",
14
14
  "url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "32.0.2"
18
+ "@codingame/monaco-vscode-api": "34.0.0"
19
19
  },
20
20
  "main": "index.js",
21
21
  "module": "index.js",
@@ -208,13 +208,13 @@ let CommandCenterCenterViewItem = class CommandCenterCenterViewItem extends Base
208
208
  label = that._windowTitle.fileName ?? label;
209
209
  }
210
210
  if (!label) {
211
- label = ( localize(3768, "Search"));
211
+ label = ( localize(3849, "Search"));
212
212
  }
213
213
  if (prefix) {
214
- label = ( localize(3769, "{0} {1}", prefix, label));
214
+ label = ( localize(3850, "{0} {1}", prefix, label));
215
215
  }
216
216
  if (suffix) {
217
- label = ( localize(3770, "{0} {1}", label, suffix));
217
+ label = ( localize(3851, "{0} {1}", label, suffix));
218
218
  }
219
219
  return label.replaceAll(/\r\n|\r|\n/g, "⏎");
220
220
  }
@@ -235,13 +235,13 @@ let CommandCenterCenterViewItem = class CommandCenterCenterViewItem extends Base
235
235
  getTooltip() {
236
236
  const kb = this._keybindingService.lookupKeybinding(this.action.id)?.getLabel();
237
237
  const title = kb ? ( localize(
238
- 3771,
238
+ 3852,
239
239
  "Search {0} ({1}) — {2}",
240
240
  this._windowTitle.workspaceName,
241
241
  kb,
242
242
  this._windowTitle.value
243
243
  )) : ( localize(
244
- 3772,
244
+ 3853,
245
245
  "Search {0} — {1}",
246
246
  this._windowTitle.workspaceName,
247
247
  this._windowTitle.value
@@ -252,7 +252,7 @@ let CommandCenterCenterViewItem = class CommandCenterCenterViewItem extends Base
252
252
  CommandCenterCenterViewItem = CommandCenterCenterViewItem_1 = ( __decorate([( __param(3, IHoverService)), ( __param(4, IKeybindingService)), ( __param(5, IInstantiationService)), ( __param(6, IEditorGroupsService)), ( __param(7, IConfigurationService))], CommandCenterCenterViewItem));
253
253
  MenuRegistry.appendMenuItem(MenuId.CommandCenter, {
254
254
  submenu: MenuId.CommandCenterCenter,
255
- title: ( localize(3773, "Command Center")),
255
+ title: ( localize(3854, "Command Center")),
256
256
  icon: Codicon.shield,
257
257
  order: 101
258
258
  });
@@ -16,6 +16,7 @@ import { MenuId } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/
16
16
  import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
17
17
  import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
18
18
  import { IHostService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service";
19
+ import { WindowTitle } from "@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/titlebar/windowTitle";
19
20
  import { IActionViewItemService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/actionViewItemService.service";
20
21
  import { IEditorGroupsContainer } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService";
21
22
  import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
@@ -61,6 +62,7 @@ export declare class BrowserTitleService extends MultiWindowParts<BrowserTitleba
61
62
  updateProperties(properties: ITitleProperties): void;
62
63
  private readonly variables;
63
64
  registerVariables(variables: ITitleVariable[]): void;
65
+ get windowTitle(): WindowTitle;
64
66
  }
65
67
  export declare class BrowserTitlebarPart extends Part implements ITitlebarPart {
66
68
  private readonly editorGroupsContainer;
@@ -111,7 +113,7 @@ export declare class BrowserTitlebarPart extends Part implements ITitlebarPart {
111
113
  private readonly isAuxiliary;
112
114
  private isCompact;
113
115
  private readonly isCompactContextKey;
114
- private readonly windowTitle;
116
+ readonly windowTitle: WindowTitle;
115
117
  protected readonly instantiationService: IInstantiationService;
116
118
  constructor(id: string, targetWindow: CodeWindow, editorGroupsContainer: IEditorGroupsContainer, contextMenuService: IContextMenuService, configurationService: IConfigurationService, environmentService: IBrowserWorkbenchEnvironmentService, instantiationService: IInstantiationService, themeService: IThemeService, storageService: IStorageService, layoutService: IWorkbenchLayoutService, contextKeyService: IContextKeyService, hostService: IHostService, editorService: IEditorService, menuService: IMenuService, keybindingService: IKeybindingService, actionViewItemService: IActionViewItemService);
117
119
  private registerListeners;
@@ -37,7 +37,7 @@ import { GLOBAL_ACTIVITY_ID, ACCOUNTS_ACTIVITY_ID } from '@codingame/monaco-vsco
37
37
  import { SimpleGlobalActivityActionViewItem, SimpleAccountActivityActionViewItem, isAccountsActionVisible, AccountsActivityActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/globalCompositeBar';
38
38
  import { HoverPosition } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverWidget';
39
39
  import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
40
- import { ActionRunner } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
40
+ import { Separator, ActionRunner } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
41
41
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
42
42
  import { ActionsOrientation, prepareActions } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
43
43
  import { EDITOR_CORE_NAVIGATION_COMMANDS } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorCommands';
@@ -77,7 +77,7 @@ let BrowserTitleService = class BrowserTitleService extends MultiWindowParts {
77
77
  constructor() {
78
78
  super({
79
79
  id: `workbench.action.focusTitleBar`,
80
- title: ( localize2(3809, "Focus Title Bar")),
80
+ title: ( localize2(3890, "Focus Title Bar")),
81
81
  category: Categories.View,
82
82
  f1: true,
83
83
  precondition: TitleBarVisibleContext
@@ -164,6 +164,9 @@ let BrowserTitleService = class BrowserTitleService extends MultiWindowParts {
164
164
  part.registerVariables(newVariables);
165
165
  }
166
166
  }
167
+ get windowTitle() {
168
+ return this.mainPart.windowTitle;
169
+ }
167
170
  };
168
171
  BrowserTitleService = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IStorageService)), ( __param(2, IThemeService))], BrowserTitleService));
169
172
  let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
@@ -501,10 +504,10 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
501
504
  this.instantiationService.createInstance(WorkbenchToolBar, this.actionToolBarElement, {
502
505
  contextMenu: MenuId.TitleBarContext,
503
506
  orientation: ActionsOrientation.HORIZONTAL,
504
- ariaLabel: ( localize(3810, "Title actions")),
507
+ ariaLabel: ( localize(3891, "Title actions")),
505
508
  getKeyBinding: action => this.getKeybinding(action),
506
509
  overflowBehavior: {
507
- maxItems: 9,
510
+ maxItems: 12,
508
511
  exempted: [
509
512
  ACCOUNTS_ACTIVITY_ID,
510
513
  GLOBAL_ACTIVITY_ID,
@@ -513,7 +516,7 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
513
516
  },
514
517
  anchorAlignmentProvider: () => AnchorAlignment.RIGHT,
515
518
  telemetrySource: "titlePart",
516
- highlightToggledItems: this.editorActionsEnabled || this.isAuxiliary,
519
+ highlightToggledItems: this.isAuxiliary,
517
520
  actionViewItemProvider: (action, options) => this.actionViewItemProvider(action, options),
518
521
  hoverDelegate: this.hoverDelegate
519
522
  })
@@ -540,6 +543,19 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
540
543
  primary: [],
541
544
  secondary: []
542
545
  };
546
+ if (this.globalToolbarMenu) {
547
+ const leading = {
548
+ primary: [],
549
+ secondary: []
550
+ };
551
+ fillInActionBarActions(
552
+ this.globalToolbarMenu.getActions(),
553
+ leading,
554
+ actionGroup => actionGroup === TitleBarLeadingActionsGroup
555
+ );
556
+ actions.primary.push(...leading.primary);
557
+ actions.primary.push(( new Separator()));
558
+ }
543
559
  if (this.editorActionsEnabled) {
544
560
  this.editorActionsChangeDisposable.clear();
545
561
  const activeGroup = this.editorGroupsContainer.activeGroup;
@@ -550,26 +566,15 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
550
566
  );
551
567
  actions.primary.push(...editorActions.actions.primary);
552
568
  actions.secondary.push(...editorActions.actions.secondary);
569
+ actions.primary.push(( new Separator()));
553
570
  this.editorActionsChangeDisposable.add(editorActions.onDidChange(() => updateToolBarActions()));
554
571
  }
555
572
  }
556
- if (this.globalToolbarMenu) {
557
- const leading = {
558
- primary: [],
559
- secondary: []
560
- };
561
- fillInActionBarActions(
562
- this.globalToolbarMenu.getActions(),
563
- leading,
564
- actionGroup => actionGroup === TitleBarLeadingActionsGroup
565
- );
566
- actions.primary.push(...leading.primary);
567
- }
568
573
  if (this.layoutToolbarMenu) {
569
574
  fillInActionBarActions(
570
575
  this.layoutToolbarMenu.getActions(),
571
576
  actions,
572
- () => !this.editorActionsEnabled || this.isCompact
577
+ group => group === "navigation"
573
578
  );
574
579
  }
575
580
  if (this.globalToolbarMenu) {