@codingame/monaco-vscode-scm-service-override 15.0.2 → 16.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.
Files changed (26) hide show
  1. package/package.json +17 -13
  2. package/vscode/src/vs/workbench/contrib/scm/browser/activity.d.ts +1 -1
  3. package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +24 -12
  4. package/vscode/src/vs/workbench/contrib/scm/browser/media/dirtydiffDecorator.css +96 -0
  5. package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css +525 -0
  6. package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +2 -2
  7. package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffDecorator.js +6 -6
  8. package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.d.ts +1 -1
  9. package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.js +1 -1
  10. package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffWidget.js +15 -15
  11. package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +96 -81
  12. package/vscode/src/vs/workbench/contrib/scm/browser/scmAccessibilityHelp.js +30 -30
  13. package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.js +45 -46
  14. package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.d.ts +1 -0
  15. package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +8 -2
  16. package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.d.ts +1 -1
  17. package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +1 -1
  18. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +30 -27
  19. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.d.ts +1 -1
  20. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.js +2 -2
  21. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.d.ts +22 -5
  22. package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js +52 -9
  23. package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.d.ts +1 -1
  24. package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.js +2 -2
  25. package/vscode/src/vs/workbench/contrib/scm/browser/media/dirtydiffDecorator.css.js +0 -6
  26. package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css.js +0 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-scm-service-override",
3
- "version": "15.0.2",
3
+ "version": "16.0.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - scm service-override",
6
6
  "keywords": [],
@@ -15,18 +15,19 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-12c5f9eb-72d3-57ca-babd-5bef7aa9de3b-common": "15.0.2",
19
- "@codingame/monaco-vscode-1bb39316-6fbf-572e-ab6a-818a2496c14f-common": "15.0.2",
20
- "@codingame/monaco-vscode-27663a0b-1249-58ba-9085-e52d706b50bc-common": "15.0.2",
21
- "@codingame/monaco-vscode-38f25ab8-ea30-5ba9-8a08-ae3308c297c0-common": "15.0.2",
22
- "@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "15.0.2",
23
- "@codingame/monaco-vscode-81f603ca-d6ea-5402-90dd-3014dffc63b4-common": "15.0.2",
24
- "@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "15.0.2",
25
- "@codingame/monaco-vscode-aff8bc9b-c6f8-578f-9c8a-f70d14f9c13c-common": "15.0.2",
26
- "@codingame/monaco-vscode-api": "15.0.2",
27
- "@codingame/monaco-vscode-be8ddbb5-094a-5657-b1cc-fe106c94c632-common": "15.0.2",
28
- "@codingame/monaco-vscode-f99b74f5-fcb7-512f-8c6c-35f5a107577d-common": "15.0.2",
29
- "@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common": "15.0.2"
18
+ "@codingame/monaco-vscode-12c5f9eb-72d3-57ca-babd-5bef7aa9de3b-common": "16.0.0",
19
+ "@codingame/monaco-vscode-27663a0b-1249-58ba-9085-e52d706b50bc-common": "16.0.0",
20
+ "@codingame/monaco-vscode-38f25ab8-ea30-5ba9-8a08-ae3308c297c0-common": "16.0.0",
21
+ "@codingame/monaco-vscode-3e369455-cc41-54c6-86fb-8b7cd999a5da-common": "16.0.0",
22
+ "@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "16.0.0",
23
+ "@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "16.0.0",
24
+ "@codingame/monaco-vscode-ae8a8ca1-f243-508b-9c37-c88ebbd295fa-common": "16.0.0",
25
+ "@codingame/monaco-vscode-aff8bc9b-c6f8-578f-9c8a-f70d14f9c13c-common": "16.0.0",
26
+ "@codingame/monaco-vscode-api": "16.0.0",
27
+ "@codingame/monaco-vscode-b1110435-a331-5549-ab1e-aa3d763c3a1f-common": "16.0.0",
28
+ "@codingame/monaco-vscode-be8ddbb5-094a-5657-b1cc-fe106c94c632-common": "16.0.0",
29
+ "@codingame/monaco-vscode-f99b74f5-fcb7-512f-8c6c-35f5a107577d-common": "16.0.0",
30
+ "@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common": "16.0.0"
30
31
  },
31
32
  "main": "index.js",
32
33
  "module": "index.js",
@@ -35,6 +36,9 @@
35
36
  ".": {
36
37
  "default": "./index.js"
37
38
  },
39
+ "./vscode/*.css": {
40
+ "default": "./vscode/src/*.css"
41
+ },
38
42
  "./vscode/*": {
39
43
  "types": "./vscode/src/*.d.ts",
40
44
  "default": "./vscode/src/*.js"
@@ -17,9 +17,9 @@ export declare class SCMActiveRepositoryController extends Disposable implements
17
17
  private readonly scmViewService;
18
18
  private readonly statusbarService;
19
19
  private readonly titleService;
20
- private readonly _countBadgeConfig;
21
20
  private readonly _repositories;
22
21
  private readonly _activeRepositoryHistoryItemRefName;
22
+ private readonly _countBadgeConfig;
23
23
  private readonly _countBadgeRepositories;
24
24
  private readonly _countBadge;
25
25
  private _activeRepositoryNameContextKey;
@@ -39,6 +39,12 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
39
39
  this.scmViewService = scmViewService;
40
40
  this.statusbarService = statusbarService;
41
41
  this.titleService = titleService;
42
+ this._activeRepositoryNameContextKey = ActiveRepositoryContextKeys.ActiveRepositoryName.bindTo(this.contextKeyService);
43
+ this._activeRepositoryBranchNameContextKey = ActiveRepositoryContextKeys.ActiveRepositoryBranchName.bindTo(this.contextKeyService);
44
+ this.titleService.registerVariables([
45
+ { name: 'activeRepositoryName', contextKey: ActiveRepositoryContextKeys.ActiveRepositoryName.key },
46
+ { name: 'activeRepositoryBranchName', contextKey: ActiveRepositoryContextKeys.ActiveRepositoryBranchName.key, }
47
+ ]);
42
48
  this._countBadgeConfig = observableConfigValue('scm.countBadge', 'all', this.configurationService);
43
49
  this._repositories = observableFromEvent(this, Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository), () => this.scmService.repositories);
44
50
  this._activeRepositoryHistoryItemRefName = derived(reader => {
@@ -75,16 +81,12 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
75
81
  }
76
82
  return total;
77
83
  });
78
- this._activeRepositoryNameContextKey = ActiveRepositoryContextKeys.ActiveRepositoryName.bindTo(this.contextKeyService);
79
- this._activeRepositoryBranchNameContextKey = ActiveRepositoryContextKeys.ActiveRepositoryBranchName.bindTo(this.contextKeyService);
80
- this.titleService.registerVariables([
81
- { name: 'activeRepositoryName', contextKey: ActiveRepositoryContextKeys.ActiveRepositoryName.key },
82
- { name: 'activeRepositoryBranchName', contextKey: ActiveRepositoryContextKeys.ActiveRepositoryBranchName.key, }
83
- ]);
84
84
  this._register(autorunWithStore((reader, store) => {
85
- this._updateActivityCountBadge(this._countBadge.read(reader), store);
85
+ const countBadge = this._countBadge.read(reader);
86
+ this._updateActivityCountBadge(countBadge, store);
86
87
  }));
87
88
  this._register(autorunWithStore((reader, store) => {
89
+ this._repositories.read(reader);
88
90
  const repository = this.scmViewService.activeRepository.read(reader);
89
91
  const commands = repository?.provider.statusBarCommands.read(reader);
90
92
  this._updateStatusBar(repository, commands ?? [], store);
@@ -102,7 +104,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
102
104
  if (count === 0) {
103
105
  return;
104
106
  }
105
- const badge = ( new NumberBadge(count, num => ( localize(8690, '{0} pending changes', num))));
107
+ const badge = ( new NumberBadge(count, num => ( localize(8970, '{0} pending changes', num))));
106
108
  store.add(this.activityService.showViewActivity(VIEW_PANE_ID, { badge }));
107
109
  }
108
110
  _updateStatusBar(repository, commands, store) {
@@ -128,7 +130,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
128
130
  repoAgnosticActionName = '';
129
131
  }
130
132
  const statusbarEntry = {
131
- name: ( localize(8691, "Source Control")) + (repoAgnosticActionName ? ` ${repoAgnosticActionName}` : ''),
133
+ name: ( localize(8971, "Source Control")) + (repoAgnosticActionName ? ` ${repoAgnosticActionName}` : ''),
132
134
  text: command.title,
133
135
  ariaLabel: tooltip,
134
136
  tooltip,
@@ -138,6 +140,16 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
138
140
  this.statusbarService.addEntry(statusbarEntry, `status.scm.${index}`, StatusbarAlignment.LEFT, 10000) :
139
141
  this.statusbarService.addEntry(statusbarEntry, `status.scm.${index}`, StatusbarAlignment.LEFT, { location: { id: `status.scm.${index - 1}`, priority: 10000 }, alignment: StatusbarAlignment.RIGHT, compact: true }));
140
142
  }
143
+ if (this.scmService.repositoryCount > 1) {
144
+ const repositoryStatusbarEntry = {
145
+ name: ( localize(8972, "Source Control Provider")),
146
+ text: `$(repo) ${repository.provider.name}`,
147
+ ariaLabel: label,
148
+ tooltip: label,
149
+ command: 'scm.setActiveProvider'
150
+ };
151
+ store.add(this.statusbarService.addEntry(repositoryStatusbarEntry, 'status.scm.provider', StatusbarAlignment.LEFT, { location: { id: `status.scm.0`, priority: 10000 }, alignment: StatusbarAlignment.LEFT, compact: true }));
152
+ }
141
153
  }
142
154
  _updateActiveRepositoryContextKeys(repositoryName, branchName) {
143
155
  this._activeRepositoryNameContextKey.set(repositoryName ?? '');
@@ -158,10 +170,10 @@ let SCMActiveResourceContextKeyController = class SCMActiveResourceContextKeyCon
158
170
  super();
159
171
  this.scmService = scmService;
160
172
  this.uriIdentityService = uriIdentityService;
161
- this._repositories = observableFromEvent(this, Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository), () => this.scmService.repositories);
162
173
  this._onDidRepositoryChange = ( new Emitter());
163
- const activeResourceHasChangesContextKey = ( new RawContextKey('scmActiveResourceHasChanges', false, ( localize(8692, "Whether the active resource has changes"))));
164
- const activeResourceRepositoryContextKey = ( new RawContextKey('scmActiveResourceRepository', undefined, ( localize(8693, "The active resource's repository"))));
174
+ const activeResourceHasChangesContextKey = ( new RawContextKey('scmActiveResourceHasChanges', false, ( localize(8973, "Whether the active resource has changes"))));
175
+ const activeResourceRepositoryContextKey = ( new RawContextKey('scmActiveResourceRepository', undefined, ( localize(8974, "The active resource's repository"))));
176
+ this._repositories = observableFromEvent(this, Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository), () => this.scmService.repositories);
165
177
  this._store.add(autorunWithStore((reader, store) => {
166
178
  for (const repository of this._repositories.read(reader)) {
167
179
  store.add(Event.runAndSubscribe(repository.provider.onDidChangeResources, () => {
@@ -0,0 +1,96 @@
1
+ .monaco-editor .dirty-diff-glyph {
2
+ margin-left: 5px;
3
+ z-index: 5;
4
+ }
5
+ .monaco-editor .dirty-diff-glyph:before {
6
+ position: absolute;
7
+ content: '';
8
+ height: 100%;
9
+ width: 0;
10
+ left: -2px;
11
+ }
12
+ .monaco-workbench:not(.reduce-motion) .monaco-editor .dirty-diff-glyph:before {
13
+ transition: width 80ms linear, left 80ms linear, transform 80ms linear;
14
+ }
15
+ .monaco-editor.modified-in-monaco-diff-editor .margin-view-overlays > div > .dirty-diff-glyph {
16
+ display: none;
17
+ }
18
+ .monaco-editor .dirty-diff-added {
19
+ border-left-color: var(--vscode-editorGutter-addedBackground);
20
+ border-left-style: solid;
21
+ }
22
+ .monaco-editor .dirty-diff-added:before {
23
+ background: var(--vscode-editorGutter-addedBackground);
24
+ }
25
+ .monaco-editor .dirty-diff-added-pattern {
26
+ background-image: linear-gradient(-45deg, var(--vscode-editorGutter-addedBackground) 25%, var(--vscode-editorGutter-background) 25%, var(--vscode-editorGutter-background) 50%, var(--vscode-editorGutter-addedBackground) 50%, var(--vscode-editorGutter-addedBackground) 75%, var(--vscode-editorGutter-background) 75%, var(--vscode-editorGutter-background));
27
+ background-repeat: repeat-y;
28
+ }
29
+ .monaco-editor .dirty-diff-added-pattern:before {
30
+ background-image: linear-gradient(-45deg, var(--vscode-editorGutter-addedBackground) 25%, var(--vscode-editorGutter-background) 25%, var(--vscode-editorGutter-background) 50%, var(--vscode-editorGutter-addedBackground) 50%, var(--vscode-editorGutter-addedBackground) 75%, var(--vscode-editorGutter-background) 75%, var(--vscode-editorGutter-background));
31
+ transform: translateX(3px);
32
+ }
33
+ .monaco-editor .dirty-diff-modified {
34
+ border-left-color: var(--vscode-editorGutter-modifiedBackground);
35
+ border-left-style: solid;
36
+ }
37
+ .monaco-editor .dirty-diff-modified:before {
38
+ background: var(--vscode-editorGutter-modifiedBackground);
39
+ }
40
+ .monaco-editor .dirty-diff-modified-pattern {
41
+ background-image: linear-gradient(-45deg, var(--vscode-editorGutter-modifiedBackground) 25%, var(--vscode-editorGutter-background) 25%, var(--vscode-editorGutter-background) 50%, var(--vscode-editorGutter-modifiedBackground) 50%, var(--vscode-editorGutter-modifiedBackground) 75%, var(--vscode-editorGutter-background) 75%, var(--vscode-editorGutter-background));
42
+ background-repeat: repeat-y;
43
+ }
44
+ .monaco-workbench:not(.reduce-motion) .monaco-editor .dirty-diff-added,
45
+ .monaco-workbench:not(.reduce-motion) .monaco-editor .dirty-diff-added-pattern,
46
+ .monaco-workbench:not(.reduce-motion) .monaco-editor .dirty-diff-modified,
47
+ .monaco-workbench:not(.reduce-motion) .monaco-editor .dirty-diff-modified-pattern {
48
+ transition: opacity 0.5s;
49
+ }
50
+ .monaco-editor .dirty-diff-modified-pattern:before {
51
+ background-image: linear-gradient(-45deg, var(--vscode-editorGutter-modifiedBackground) 25%, var(--vscode-editorGutter-background) 25%, var(--vscode-editorGutter-background) 50%, var(--vscode-editorGutter-modifiedBackground) 50%, var(--vscode-editorGutter-modifiedBackground) 75%, var(--vscode-editorGutter-background) 75%, var(--vscode-editorGutter-background));
52
+ transform: translateX(3px);
53
+ }
54
+ .monaco-editor .margin:hover .dirty-diff-added,
55
+ .monaco-editor .margin:hover .dirty-diff-added-pattern,
56
+ .monaco-editor .margin:hover .dirty-diff-modified,
57
+ .monaco-editor .margin:hover .dirty-diff-modified-pattern {
58
+ opacity: 1;
59
+ }
60
+ .monaco-editor .dirty-diff-deleted:after {
61
+ content: '';
62
+ position: absolute;
63
+ bottom: -4px;
64
+ box-sizing: border-box;
65
+ width: 4px;
66
+ height: 0;
67
+ z-index: 9;
68
+ border-top: 4px solid transparent;
69
+ border-bottom: 4px solid transparent;
70
+ border-left: 4px solid var(--vscode-editorGutter-deletedBackground);
71
+ pointer-events: none;
72
+ }
73
+ .monaco-workbench:not(.reduce-motion) .monaco-editor .dirty-diff-deleted:after {
74
+ transition: border-top-width 80ms linear, border-bottom-width 80ms linear, bottom 80ms linear, opacity 0.5s;
75
+ }
76
+ .monaco-editor .dirty-diff-deleted:before {
77
+ background: var(--vscode-editorGutter-deletedBackground);
78
+ margin-left: 3px;
79
+ height: 0;
80
+ bottom: 0;
81
+ }
82
+ .monaco-workbench:not(.reduce-motion) .monaco-editor .dirty-diff-deleted:before {
83
+ transition: height 80ms linear;
84
+ }
85
+ .dirty-diff .peekview-title .dropdown {
86
+ margin-right: 10px;
87
+ }
88
+ .dirty-diff .peekview-title .dropdown.select-container {
89
+ cursor: default;
90
+ }
91
+ .dirty-diff .peekview-title .dropdown .monaco-select-box {
92
+ cursor: pointer;
93
+ min-width: 100px;
94
+ min-height: 18px;
95
+ padding: 0px 23px 0px 8px;
96
+ }