@codingame/monaco-vscode-scm-service-override 37.6.1 → 38.0.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-scm-service-override",
3
- "version": "37.6.1",
3
+ "version": "38.0.1",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - scm service-override",
6
6
  "keywords": [],
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "37.6.1"
18
+ "@codingame/monaco-vscode-api": "38.0.1"
19
19
  },
20
20
  "main": "index.js",
21
21
  "module": "index.js",
@@ -112,7 +112,9 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
112
112
  this._register(autorun(reader => {
113
113
  const activeRepository = this.scmViewService.activeRepository.read(reader);
114
114
  const historyItemRefName = this._activeRepositoryHistoryItemRefName.read(reader);
115
- this._updateActiveRepositoryContextKeys(activeRepository?.repository.provider.name, historyItemRefName);
115
+ const provider = activeRepository?.repository.provider;
116
+ const repositoryName = provider?.activeRepositoryName.read(reader) ?? provider?.name;
117
+ this._updateActiveRepositoryContextKeys(repositoryName, historyItemRefName);
116
118
  }));
117
119
  }
118
120
  _getRepositoryResourceCount(repository) {
@@ -126,7 +128,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
126
128
  if (count === 0) {
127
129
  return;
128
130
  }
129
- const badge = ( new NumberBadge(count, num => ( localize(17882, "{0} pending changes", num))));
131
+ const badge = ( new NumberBadge(count, num => ( localize(20418, "{0} pending changes", num))));
130
132
  store.add(this.activityService.showViewActivity(VIEW_PANE_ID, {
131
133
  badge
132
134
  }));
@@ -141,7 +143,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
141
143
  const tooltip = `${label}${command.tooltip ? ` - ${command.tooltip}` : ""}`;
142
144
  const genericCommandName = getStatusBarCommandGenericName(command);
143
145
  const statusbarEntry = {
144
- name: ( localize(17883, "Source Control")) + (genericCommandName ? ` ${genericCommandName}` : ""),
146
+ name: ( localize(20419, "Source Control")) + (genericCommandName ? ` ${genericCommandName}` : ""),
145
147
  text: command.title,
146
148
  ariaLabel: tooltip,
147
149
  tooltip,
@@ -169,7 +171,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
169
171
  if (this.scmViewService.repositories.length > 1) {
170
172
  const icon = getSCMRepositoryIcon(activeRepository, activeRepository.repository);
171
173
  const repositoryStatusbarEntry = {
172
- name: ( localize(17884, "Source Control Provider")),
174
+ name: ( localize(20420, "Source Control Provider")),
173
175
  text: `$(${icon.id}) ${activeRepository.repository.provider.name}`,
174
176
  ariaLabel: label,
175
177
  tooltip: label,
@@ -202,8 +204,8 @@ let SCMActiveResourceContextKeyController = class SCMActiveResourceContextKeyCon
202
204
  this.scmService = scmService;
203
205
  this.uriIdentityService = uriIdentityService;
204
206
  this._onDidRepositoryChange = ( new Emitter());
205
- const activeResourceHasChangesContextKey = new RawContextKey("scmActiveResourceHasChanges", false, ( localize(17885, "Whether the active resource has changes")));
206
- const activeResourceRepositoryContextKey = new RawContextKey("scmActiveResourceRepository", undefined, ( localize(17886, "The active resource's repository")));
207
+ const activeResourceHasChangesContextKey = new RawContextKey("scmActiveResourceHasChanges", false, ( localize(20421, "Whether the active resource has changes")));
208
+ const activeResourceRepositoryContextKey = new RawContextKey("scmActiveResourceRepository", undefined, ( localize(20422, "The active resource's repository")));
207
209
  this._repositories = observableFromEvent(
208
210
  this,
209
211
  Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository),
@@ -295,6 +295,19 @@
295
295
  margin-right: 3px;
296
296
  }
297
297
 
298
+ .scm-view .monaco-list-row .resource > .name > .monaco-icon-label.monaco-decoration-text-badge::after {
299
+ display: inline-flex;
300
+ align-items: center;
301
+ justify-content: center;
302
+ box-sizing: border-box;
303
+ flex-shrink: 0;
304
+ min-width: var(--vscode-spacing-size160);
305
+ height: var(--vscode-spacing-size160);
306
+ margin-block: auto;
307
+ font-size: var(--vscode-fontSize-label2);
308
+ font-weight: var(--vscode-fontWeight-semiBold);
309
+ }
310
+
298
311
  .scm-view .monaco-list-row .resource > .decoration-icon {
299
312
  width: 16px;
300
313
  height: 100%;
@@ -313,7 +313,7 @@ let SCMMenus = class SCMMenus {
313
313
  };
314
314
  SCMMenus = ( __decorate([( __param(0, ISCMService)), ( __param(1, IInstantiationService))], SCMMenus));
315
315
  MenuRegistry.appendMenuItem(MenuId.SCMResourceContext, {
316
- title: ( localize(17887, "Share")),
316
+ title: ( localize(20423, "Share")),
317
317
  submenu: MenuId.SCMResourceContextShare,
318
318
  group: "45_share",
319
319
  order: 3
@@ -15,7 +15,7 @@ import './quickDiffModel.js';
15
15
  import { QuickDiffEditorController } from './quickDiffWidget.js';
16
16
 
17
17
  MenuRegistry.appendMenuItem(MenuId.EditorLineNumberContext, {
18
- title: ( localize(17888, "Diff Decorations")),
18
+ title: ( localize(20424, "Diff Decorations")),
19
19
  submenu: MenuId.SCMQuickDiffDecorations,
20
20
  when: ( ContextKeyExpr.or(( ContextKeyExpr.equals("config.scm.diffDecorations", "all")), ( ContextKeyExpr.equals("config.scm.diffDecorations", "gutter")))),
21
21
  group: "9_quickDiffDecorations"
@@ -29,32 +29,32 @@ registerEditorContribution(
29
29
  ( Registry.as(Extensions$1.Configuration)).registerConfiguration({
30
30
  id: "scm",
31
31
  order: 5,
32
- title: ( localize(17889, "Source Control")),
32
+ title: ( localize(20425, "Source Control")),
33
33
  type: "object",
34
34
  scope: ConfigurationScope.RESOURCE,
35
35
  properties: {
36
36
  "scm.diffDecorations": {
37
37
  type: "string",
38
38
  enum: ["all", "gutter", "overview", "minimap", "none"],
39
- enumDescriptions: [( localize(17890, "Show the diff decorations in all available locations.")), ( localize(17891, "Show the diff decorations only in the editor gutter.")), ( localize(17892, "Show the diff decorations only in the overview ruler.")), ( localize(17893, "Show the diff decorations only in the minimap.")), ( localize(17894, "Do not show the diff decorations."))],
39
+ enumDescriptions: [( localize(20426, "Show the diff decorations in all available locations.")), ( localize(20427, "Show the diff decorations only in the editor gutter.")), ( localize(20428, "Show the diff decorations only in the overview ruler.")), ( localize(20429, "Show the diff decorations only in the minimap.")), ( localize(20430, "Do not show the diff decorations."))],
40
40
  default: "all",
41
- description: ( localize(17895, "Controls diff decorations in the editor."))
41
+ description: ( localize(20431, "Controls diff decorations in the editor."))
42
42
  },
43
43
  "scm.diffDecorationsGutterWidth": {
44
44
  type: "number",
45
45
  enum: [1, 2, 3, 4, 5],
46
46
  default: 3,
47
47
  description: ( localize(
48
- 17896,
48
+ 20432,
49
49
  "Controls the width(px) of diff decorations in gutter (added & modified)."
50
50
  ))
51
51
  },
52
52
  "scm.diffDecorationsGutterVisibility": {
53
53
  type: "string",
54
54
  enum: ["always", "hover"],
55
- enumDescriptions: [( localize(17897, "Show the diff decorator in the gutter at all times.")), ( localize(17898, "Show the diff decorator in the gutter only on hover."))],
55
+ enumDescriptions: [( localize(20433, "Show the diff decorator in the gutter at all times.")), ( localize(20434, "Show the diff decorator in the gutter only on hover."))],
56
56
  description: ( localize(
57
- 17899,
57
+ 20435,
58
58
  "Controls the visibility of the Source Control diff decorator in the gutter."
59
59
  )),
60
60
  default: "always"
@@ -62,26 +62,26 @@ registerEditorContribution(
62
62
  "scm.diffDecorationsGutterAction": {
63
63
  type: "string",
64
64
  enum: ["diff", "none"],
65
- enumDescriptions: [( localize(17900, "Show the inline diff Peek view on click.")), ( localize(17901, "Do nothing."))],
66
- description: ( localize(17902, "Controls the behavior of Source Control diff gutter decorations.")),
65
+ enumDescriptions: [( localize(20436, "Show the inline diff Peek view on click.")), ( localize(20437, "Do nothing."))],
66
+ description: ( localize(20438, "Controls the behavior of Source Control diff gutter decorations.")),
67
67
  default: "diff"
68
68
  },
69
69
  "scm.diffDecorationsGutterPattern": {
70
70
  type: "object",
71
71
  description: ( localize(
72
- 17903,
72
+ 20439,
73
73
  "Controls whether a pattern is used for the diff decorations in gutter."
74
74
  )),
75
75
  additionalProperties: false,
76
76
  properties: {
77
77
  "added": {
78
78
  type: "boolean",
79
- description: ( localize(17904, "Use pattern for the diff decorations in gutter for added lines."))
79
+ description: ( localize(20440, "Use pattern for the diff decorations in gutter for added lines."))
80
80
  },
81
81
  "modified": {
82
82
  type: "boolean",
83
83
  description: ( localize(
84
- 17905,
84
+ 20441,
85
85
  "Use pattern for the diff decorations in gutter for modified lines."
86
86
  ))
87
87
  }
@@ -94,9 +94,9 @@ registerEditorContribution(
94
94
  "scm.diffDecorationsIgnoreTrimWhitespace": {
95
95
  type: "string",
96
96
  enum: ["true", "false", "inherit"],
97
- enumDescriptions: [( localize(17906, "Ignore leading and trailing whitespace.")), ( localize(17907, "Do not ignore leading and trailing whitespace.")), ( localize(17908, "Inherit from `diffEditor.ignoreTrimWhitespace`."))],
97
+ enumDescriptions: [( localize(20442, "Ignore leading and trailing whitespace.")), ( localize(20443, "Do not ignore leading and trailing whitespace.")), ( localize(20444, "Inherit from `diffEditor.ignoreTrimWhitespace`."))],
98
98
  description: ( localize(
99
- 17909,
99
+ 20445,
100
100
  "Controls whether leading and trailing whitespace is ignored in Source Control diff gutter decorations."
101
101
  )),
102
102
  default: "false"
@@ -61,7 +61,7 @@ let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends
61
61
  const gutter = decorations === "all" || decorations === "gutter";
62
62
  const overview = decorations === "all" || decorations === "overview";
63
63
  const minimap = decorations === "all" || decorations === "minimap";
64
- const diffAdded = ( localize(17910, "Added lines"));
64
+ const diffAdded = ( localize(20446, "Added lines"));
65
65
  const diffAddedOptions = {
66
66
  gutter,
67
67
  overview: {
@@ -78,7 +78,7 @@ let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends
78
78
  this.addedPatternOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-added primary pattern", diffAdded, diffAddedOptions);
79
79
  this.addedSecondaryOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-added secondary", diffAdded, diffAddedOptions);
80
80
  this.addedSecondaryPatternOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-added secondary pattern", diffAdded, diffAddedOptions);
81
- const diffModified = ( localize(17911, "Changed lines"));
81
+ const diffModified = ( localize(20447, "Changed lines"));
82
82
  const diffModifiedOptions = {
83
83
  gutter,
84
84
  overview: {
@@ -95,7 +95,7 @@ let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends
95
95
  this.modifiedPatternOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-modified primary pattern", diffModified, diffModifiedOptions);
96
96
  this.modifiedSecondaryOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-modified secondary", diffModified, diffModifiedOptions);
97
97
  this.modifiedSecondaryPatternOptions = QuickDiffDecorator_1.createDecoration("dirty-diff-modified secondary pattern", diffModified, diffModifiedOptions);
98
- const diffDeleted = ( localize(17912, "Removed lines"));
98
+ const diffDeleted = ( localize(20448, "Removed lines"));
99
99
  const diffDeletedOptions = {
100
100
  gutter,
101
101
  overview: {
@@ -71,7 +71,7 @@ let QuickDiffPickerViewItem = class QuickDiffPickerViewItem extends SelectAction
71
71
  const opaqueTitleColor = peekTitleColor?.makeOpaque(editorBackgroundColor) ?? editorBackgroundColor;
72
72
  styles.selectBackground = ( ( opaqueTitleColor.lighten(.6)).toString());
73
73
  super(null, action, [], 0, contextViewService, styles, {
74
- ariaLabel: ( localize(17913, "Switch quick diff base")),
74
+ ariaLabel: ( localize(20449, "Switch quick diff base")),
75
75
  useCustomDrawn: !hasNativeContextMenu(configurationService)
76
76
  });
77
77
  this.optionsItems = [];
@@ -98,7 +98,7 @@ class QuickDiffPickerBaseAction extends Action {
98
98
  this.ID = "quickDiff.base.switch";
99
99
  }
100
100
  static {
101
- this.LABEL = ( localize(17914, "Switch Quick Diff Base"));
101
+ this.LABEL = ( localize(20450, "Switch Quick Diff Base"));
102
102
  }
103
103
  constructor(callback) {
104
104
  super(
@@ -248,13 +248,13 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
248
248
  if (!this.shouldUseDropdown()) {
249
249
  const label = this.model.quickDiffs.find(quickDiff => quickDiff.id === this._providerId)?.label ?? "";
250
250
  detail = this.model.changes.length > 1 ? ( localize(
251
- 17915,
251
+ 20451,
252
252
  "{0} - {1} of {2} changes",
253
253
  label,
254
254
  providerIndex + 1,
255
255
  providerChanges.length
256
256
  )) : ( localize(
257
- 17916,
257
+ 20452,
258
258
  "{0} - {1} of {2} change",
259
259
  label,
260
260
  providerIndex + 1,
@@ -262,7 +262,7 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
262
262
  ));
263
263
  this.dropdownContainer.style.display = "none";
264
264
  } else {
265
- detail = this.model.changes.length > 1 ? ( localize(17917, "{0} of {1} changes", providerIndex + 1, providerChanges.length)) : ( localize(17918, "{0} of {1} change", providerIndex + 1, providerChanges.length));
265
+ detail = this.model.changes.length > 1 ? ( localize(20453, "{0} of {1} changes", providerIndex + 1, providerChanges.length)) : ( localize(20454, "{0} of {1} change", providerIndex + 1, providerChanges.length));
266
266
  this.dropdownContainer.style.display = "inherit";
267
267
  }
268
268
  this.setTitle(this.title, detail);
@@ -321,7 +321,7 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
321
321
  label: false,
322
322
  icon: true
323
323
  });
324
- this._actionbarWidget.push(this._disposables.add(( new Action("peekview.close", ( localize(17919, "Close")), ThemeIcon.asClassName(Codicon.close), true, () => this.dispose()))), {
324
+ this._actionbarWidget.push(this._disposables.add(( new Action("peekview.close", ( localize(20455, "Close")), ThemeIcon.asClassName(Codicon.close), true, () => this.dispose()))), {
325
325
  label: false,
326
326
  icon: true
327
327
  });
@@ -706,7 +706,7 @@ class ShowPreviousChangeAction extends EditorAction {
706
706
  constructor(outerEditor) {
707
707
  super({
708
708
  id: "editor.action.dirtydiff.previous",
709
- label: ( localize2(17920, "Show Previous Change")),
709
+ label: ( localize2(20456, "Show Previous Change")),
710
710
  precondition: ( TextCompareEditorActiveContext.toNegated()),
711
711
  kbOpts: {
712
712
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -736,7 +736,7 @@ class ShowNextChangeAction extends EditorAction {
736
736
  constructor(outerEditor) {
737
737
  super({
738
738
  id: "editor.action.dirtydiff.next",
739
- label: ( localize2(17921, "Show Next Change")),
739
+ label: ( localize2(20457, "Show Next Change")),
740
740
  precondition: ( TextCompareEditorActiveContext.toNegated()),
741
741
  kbOpts: {
742
742
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -766,7 +766,7 @@ class GotoPreviousChangeAction extends EditorAction {
766
766
  constructor() {
767
767
  super({
768
768
  id: "workbench.action.editor.previousChange",
769
- label: ( localize2(17922, "Go to Previous Change")),
769
+ label: ( localize2(20458, "Go to Previous Change")),
770
770
  precondition: ( ContextKeyExpr.and(( TextCompareEditorActiveContext.toNegated()), ( quickDiffDecorationCount.notEqualsTo(0)))),
771
771
  kbOpts: {
772
772
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -804,7 +804,7 @@ class GotoNextChangeAction extends EditorAction {
804
804
  constructor() {
805
805
  super({
806
806
  id: "workbench.action.editor.nextChange",
807
- label: ( localize2(17923, "Go to Next Change")),
807
+ label: ( localize2(20459, "Go to Next Change")),
808
808
  precondition: ( ContextKeyExpr.and(( TextCompareEditorActiveContext.toNegated()), ( quickDiffDecorationCount.notEqualsTo(0)))),
809
809
  kbOpts: {
810
810
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -842,7 +842,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
842
842
  group: "7_change_nav",
843
843
  command: {
844
844
  id: "editor.action.dirtydiff.next",
845
- title: ( localize(17924, "Next &&Change"))
845
+ title: ( localize(20460, "Next &&Change"))
846
846
  },
847
847
  order: 1
848
848
  });
@@ -850,7 +850,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
850
850
  group: "7_change_nav",
851
851
  command: {
852
852
  id: "editor.action.dirtydiff.previous",
853
- title: ( localize(17925, "Previous &&Change"))
853
+ title: ( localize(20461, "Previous &&Change"))
854
854
  },
855
855
  order: 2
856
856
  });