@codingame/monaco-vscode-scm-service-override 37.0.0 → 37.1.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/index.js CHANGED
@@ -11,7 +11,7 @@ import { QuickDiffModelService } from './vscode/src/vs/workbench/contrib/scm/bro
11
11
  import { IGitService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/git/common/gitService.service';
12
12
  import { GitService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/git/browser/gitService';
13
13
  import './vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js';
14
- import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
14
+ import './vscode/src/vs/workbench/contrib/scm/browser/quickDiff.contribution.js';
15
15
 
16
16
  function getServiceOverride() {
17
17
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-scm-service-override",
3
- "version": "37.0.0",
3
+ "version": "37.1.0",
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.0.0"
18
+ "@codingame/monaco-vscode-api": "37.1.0"
19
19
  },
20
20
  "main": "index.js",
21
21
  "module": "index.js",
@@ -126,7 +126,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
126
126
  if (count === 0) {
127
127
  return;
128
128
  }
129
- const badge = ( new NumberBadge(count, num => ( localize(15402, "{0} pending changes", num))));
129
+ const badge = ( new NumberBadge(count, num => ( localize(15622, "{0} pending changes", num))));
130
130
  store.add(this.activityService.showViewActivity(VIEW_PANE_ID, {
131
131
  badge
132
132
  }));
@@ -141,7 +141,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
141
141
  const tooltip = `${label}${command.tooltip ? ` - ${command.tooltip}` : ""}`;
142
142
  const genericCommandName = getStatusBarCommandGenericName(command);
143
143
  const statusbarEntry = {
144
- name: ( localize(15403, "Source Control")) + (genericCommandName ? ` ${genericCommandName}` : ""),
144
+ name: ( localize(15623, "Source Control")) + (genericCommandName ? ` ${genericCommandName}` : ""),
145
145
  text: command.title,
146
146
  ariaLabel: tooltip,
147
147
  tooltip,
@@ -169,7 +169,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
169
169
  if (this.scmViewService.repositories.length > 1) {
170
170
  const icon = getSCMRepositoryIcon(activeRepository, activeRepository.repository);
171
171
  const repositoryStatusbarEntry = {
172
- name: ( localize(15404, "Source Control Provider")),
172
+ name: ( localize(15624, "Source Control Provider")),
173
173
  text: `$(${icon.id}) ${activeRepository.repository.provider.name}`,
174
174
  ariaLabel: label,
175
175
  tooltip: label,
@@ -202,8 +202,8 @@ let SCMActiveResourceContextKeyController = class SCMActiveResourceContextKeyCon
202
202
  this.scmService = scmService;
203
203
  this.uriIdentityService = uriIdentityService;
204
204
  this._onDidRepositoryChange = ( new Emitter());
205
- const activeResourceHasChangesContextKey = ( new RawContextKey("scmActiveResourceHasChanges", false, ( localize(15405, "Whether the active resource has changes"))));
206
- const activeResourceRepositoryContextKey = ( new RawContextKey("scmActiveResourceRepository", undefined, ( localize(15406, "The active resource's repository"))));
205
+ const activeResourceHasChangesContextKey = ( new RawContextKey("scmActiveResourceHasChanges", false, ( localize(15625, "Whether the active resource has changes"))));
206
+ const activeResourceRepositoryContextKey = ( new RawContextKey("scmActiveResourceRepository", undefined, ( localize(15626, "The active resource's repository"))));
207
207
  this._repositories = observableFromEvent(
208
208
  this,
209
209
  Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository),
@@ -0,0 +1,173 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ .monaco-editor .dirty-diff-glyph {
7
+ margin-left: 5px;
8
+ z-index: 5;
9
+ }
10
+
11
+ .monaco-editor .dirty-diff-glyph:before {
12
+ position: absolute;
13
+ content: '';
14
+ height: 100%;
15
+ width: 0;
16
+ left: -2px;
17
+ }
18
+
19
+ .monaco-workbench.monaco-enable-motion .monaco-editor .dirty-diff-glyph:before {
20
+ transition: width 80ms linear, left 80ms linear, transform 80ms linear;
21
+ }
22
+
23
+ /* Hide glyph decorations when inside the inline diff editor */
24
+ .monaco-editor.modified-in-monaco-diff-editor .margin-view-overlays > div > .dirty-diff-glyph {
25
+ display: none;
26
+ }
27
+
28
+ .monaco-editor .dirty-diff-added:not(.pattern) {
29
+ border-left-style: solid;
30
+ }
31
+
32
+ .monaco-editor .dirty-diff-added.primary {
33
+ border-left-color: var(--vscode-editorGutter-addedBackground);
34
+ }
35
+
36
+ .monaco-editor .dirty-diff-added.primary:before {
37
+ background: var(--vscode-editorGutter-addedBackground);
38
+ }
39
+
40
+ .monaco-editor .dirty-diff-added.secondary {
41
+ border-left-color: var(--vscode-editorGutter-addedSecondaryBackground);
42
+ }
43
+
44
+ .monaco-editor .dirty-diff-added.secondary:before {
45
+ background: var(--vscode-editorGutter-addedSecondaryBackground);
46
+ }
47
+
48
+ .monaco-editor .dirty-diff-added.pattern {
49
+ background-repeat: repeat-y;
50
+ }
51
+
52
+ .monaco-editor .dirty-diff-added.pattern:before {
53
+ transform: translateX(3px);
54
+ }
55
+
56
+ .monaco-editor .dirty-diff-added.pattern.primary,
57
+ .monaco-editor .dirty-diff-added.pattern.primary:before {
58
+ 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));
59
+ }
60
+
61
+ .monaco-editor .dirty-diff-added.pattern.secondary,
62
+ .monaco-editor .dirty-diff-added.pattern.secondary:before {
63
+ background-image: linear-gradient(45deg, var(--vscode-editorGutter-addedSecondaryBackground) 25%, var(--vscode-editorGutter-background) 25%, var(--vscode-editorGutter-background) 50%, var(--vscode-editorGutter-addedSecondaryBackground) 50%, var(--vscode-editorGutter-addedSecondaryBackground) 75%, var(--vscode-editorGutter-background) 75%, var(--vscode-editorGutter-background));
64
+ }
65
+
66
+ .monaco-editor .dirty-diff-modified:not(.pattern) {
67
+ border-left-style: solid;
68
+ }
69
+
70
+ .monaco-editor .dirty-diff-modified.primary {
71
+ border-left-color: var(--vscode-editorGutter-modifiedBackground);
72
+ }
73
+
74
+ .monaco-editor .dirty-diff-modified.primary:before {
75
+ background: var(--vscode-editorGutter-modifiedBackground);
76
+ }
77
+
78
+ .monaco-editor .dirty-diff-modified.secondary {
79
+ border-left-color: var(--vscode-editorGutter-modifiedSecondaryBackground);
80
+ }
81
+
82
+ .monaco-editor .dirty-diff-modified.secondary:before {
83
+ background: var(--vscode-editorGutter-modifiedSecondaryBackground);
84
+ }
85
+
86
+ .monaco-editor .dirty-diff-modified.pattern {
87
+ background-repeat: repeat-y;
88
+ }
89
+
90
+ .monaco-editor .dirty-diff-modified.pattern:before {
91
+ transform: translateX(3px);
92
+ }
93
+
94
+ .monaco-editor .dirty-diff-modified.pattern.primary,
95
+ .monaco-editor .dirty-diff-modified.pattern.primary:before {
96
+ 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));
97
+ }
98
+
99
+ .monaco-editor .dirty-diff-modified.pattern.secondary,
100
+ .monaco-editor .dirty-diff-modified.pattern.secondary:before {
101
+ background-image: linear-gradient(45deg, var(--vscode-editorGutter-modifiedSecondaryBackground) 25%, var(--vscode-editorGutter-background) 25%, var(--vscode-editorGutter-background) 50%, var(--vscode-editorGutter-modifiedSecondaryBackground) 50%, var(--vscode-editorGutter-modifiedSecondaryBackground) 75%, var(--vscode-editorGutter-background) 75%, var(--vscode-editorGutter-background));
102
+ }
103
+
104
+ .monaco-workbench.monaco-enable-motion .monaco-editor .dirty-diff-added,
105
+ .monaco-workbench.monaco-enable-motion .monaco-editor .dirty-diff-modified,
106
+ .monaco-workbench.monaco-enable-motion .monaco-editor .dirty-diff-deleted {
107
+ transition: opacity 0.5s;
108
+ }
109
+
110
+ .monaco-editor .margin:hover .dirty-diff-added,
111
+ .monaco-editor .margin:hover .dirty-diff-modified,
112
+ .monaco-editor .margin:hover .dirty-diff-deleted {
113
+ opacity: 1;
114
+ }
115
+
116
+ .monaco-editor .dirty-diff-deleted:after {
117
+ content: '';
118
+ position: absolute;
119
+ bottom: -4px;
120
+ box-sizing: border-box;
121
+ width: 4px;
122
+ height: 0;
123
+ z-index: 9;
124
+ border-top: 4px solid transparent;
125
+ border-bottom: 4px solid transparent;
126
+ pointer-events: none;
127
+ }
128
+
129
+ .monaco-editor .dirty-diff-deleted.primary:after {
130
+ border-left: 4px solid var(--vscode-editorGutter-deletedBackground);
131
+ }
132
+
133
+ .monaco-editor .dirty-diff-deleted.secondary:after {
134
+ border-left: 4px solid var(--vscode-editorGutter-deletedSecondaryBackground);
135
+ }
136
+
137
+ .monaco-workbench.monaco-enable-motion .monaco-editor .dirty-diff-deleted:after {
138
+ transition: border-top-width 80ms linear, border-bottom-width 80ms linear, bottom 80ms linear, opacity 0.5s;
139
+ }
140
+
141
+ .monaco-editor .dirty-diff-deleted:before {
142
+ background: var(--vscode-editorGutter-deletedBackground);
143
+ margin-left: 3px;
144
+ height: 0;
145
+ bottom: 0;
146
+ }
147
+
148
+ .monaco-editor .dirty-diff-deleted.primary:before {
149
+ background: var(--vscode-editorGutter-deletedBackground);
150
+ }
151
+
152
+ .monaco-editor .dirty-diff-deleted.secondary:before {
153
+ background: var(--vscode-editorGutter-deletedSecondaryBackground);
154
+ }
155
+
156
+ .monaco-workbench.monaco-enable-motion .monaco-editor .dirty-diff-deleted:before {
157
+ transition: height 80ms linear;
158
+ }
159
+
160
+ .dirty-diff .peekview-title .dropdown {
161
+ margin-right: 10px;
162
+ }
163
+
164
+ .dirty-diff .peekview-title .dropdown.select-container {
165
+ cursor: default;
166
+ }
167
+
168
+ .dirty-diff .peekview-title .dropdown .monaco-select-box {
169
+ cursor: pointer;
170
+ min-width: 100px;
171
+ min-height: 18px;
172
+ padding: 0px 23px 0px 8px;
173
+ }
@@ -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(15407, "Share")),
316
+ title: ( localize(15627, "Share")),
317
317
  submenu: MenuId.SCMResourceContextShare,
318
318
  group: "45_share",
319
319
  order: 3
@@ -0,0 +1,105 @@
1
+
2
+ import { registerEditorContribution, EditorContributionInstantiation } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorExtensions';
3
+ import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
4
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
5
+ import { MenuRegistry, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
6
+ import { Extensions as Extensions$1, ConfigurationScope } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
7
+ import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
8
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
9
+ import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
10
+ import { LifecyclePhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle';
11
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
12
+ import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiffService';
13
+ import { QuickDiffWorkbenchController } from './quickDiffDecorator.js';
14
+ import './quickDiffModel.js';
15
+ import { QuickDiffEditorController } from './quickDiffWidget.js';
16
+
17
+ MenuRegistry.appendMenuItem(MenuId.EditorLineNumberContext, {
18
+ title: ( localize(15628, "Diff Decorations")),
19
+ submenu: MenuId.SCMQuickDiffDecorations,
20
+ when: ( ContextKeyExpr.or(( ContextKeyExpr.equals("config.scm.diffDecorations", "all")), ( ContextKeyExpr.equals("config.scm.diffDecorations", "gutter")))),
21
+ group: "9_quickDiffDecorations"
22
+ });
23
+ ( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(QuickDiffWorkbenchController, LifecyclePhase.Restored);
24
+ registerEditorContribution(
25
+ QuickDiffEditorController.ID,
26
+ QuickDiffEditorController,
27
+ EditorContributionInstantiation.AfterFirstRender
28
+ );
29
+ ( Registry.as(Extensions$1.Configuration)).registerConfiguration({
30
+ id: "scm",
31
+ order: 5,
32
+ title: ( localize(15629, "Source Control")),
33
+ type: "object",
34
+ scope: ConfigurationScope.RESOURCE,
35
+ properties: {
36
+ "scm.diffDecorations": {
37
+ type: "string",
38
+ enum: ["all", "gutter", "overview", "minimap", "none"],
39
+ enumDescriptions: [( localize(15630, "Show the diff decorations in all available locations.")), ( localize(15631, "Show the diff decorations only in the editor gutter.")), ( localize(15632, "Show the diff decorations only in the overview ruler.")), ( localize(15633, "Show the diff decorations only in the minimap.")), ( localize(15634, "Do not show the diff decorations."))],
40
+ default: "all",
41
+ description: ( localize(15635, "Controls diff decorations in the editor."))
42
+ },
43
+ "scm.diffDecorationsGutterWidth": {
44
+ type: "number",
45
+ enum: [1, 2, 3, 4, 5],
46
+ default: 3,
47
+ description: ( localize(
48
+ 15636,
49
+ "Controls the width(px) of diff decorations in gutter (added & modified)."
50
+ ))
51
+ },
52
+ "scm.diffDecorationsGutterVisibility": {
53
+ type: "string",
54
+ enum: ["always", "hover"],
55
+ enumDescriptions: [( localize(15637, "Show the diff decorator in the gutter at all times.")), ( localize(15638, "Show the diff decorator in the gutter only on hover."))],
56
+ description: ( localize(
57
+ 15639,
58
+ "Controls the visibility of the Source Control diff decorator in the gutter."
59
+ )),
60
+ default: "always"
61
+ },
62
+ "scm.diffDecorationsGutterAction": {
63
+ type: "string",
64
+ enum: ["diff", "none"],
65
+ enumDescriptions: [( localize(15640, "Show the inline diff Peek view on click.")), ( localize(15641, "Do nothing."))],
66
+ description: ( localize(15642, "Controls the behavior of Source Control diff gutter decorations.")),
67
+ default: "diff"
68
+ },
69
+ "scm.diffDecorationsGutterPattern": {
70
+ type: "object",
71
+ description: ( localize(
72
+ 15643,
73
+ "Controls whether a pattern is used for the diff decorations in gutter."
74
+ )),
75
+ additionalProperties: false,
76
+ properties: {
77
+ "added": {
78
+ type: "boolean",
79
+ description: ( localize(15644, "Use pattern for the diff decorations in gutter for added lines."))
80
+ },
81
+ "modified": {
82
+ type: "boolean",
83
+ description: ( localize(
84
+ 15645,
85
+ "Use pattern for the diff decorations in gutter for modified lines."
86
+ ))
87
+ }
88
+ },
89
+ default: {
90
+ "added": false,
91
+ "modified": true
92
+ }
93
+ },
94
+ "scm.diffDecorationsIgnoreTrimWhitespace": {
95
+ type: "string",
96
+ enum: ["true", "false", "inherit"],
97
+ enumDescriptions: [( localize(15646, "Ignore leading and trailing whitespace.")), ( localize(15647, "Do not ignore leading and trailing whitespace.")), ( localize(15648, "Inherit from `diffEditor.ignoreTrimWhitespace`."))],
98
+ description: ( localize(
99
+ 15649,
100
+ "Controls whether leading and trailing whitespace is ignored in Source Control diff gutter decorations."
101
+ )),
102
+ default: "false"
103
+ }
104
+ }
105
+ });
@@ -0,0 +1,36 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
3
+ import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
4
+ import { IQuickDiffService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff.service";
5
+ import { IQuickDiffModelService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/browser/quickDiffModel.service";
6
+ import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
7
+ import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
8
+ import { RawContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
9
+ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
10
+ export declare const quickDiffDecorationCount: RawContextKey<number>;
11
+ export declare class QuickDiffWorkbenchController extends Disposable implements IWorkbenchContribution {
12
+ private readonly editorService;
13
+ private readonly configurationService;
14
+ private readonly quickDiffModelService;
15
+ private readonly quickDiffService;
16
+ private readonly uriIdentityService;
17
+ private enabled;
18
+ private readonly quickDiffDecorationCount;
19
+ private readonly activeEditor;
20
+ private readonly quickDiffProviders;
21
+ private readonly decorators;
22
+ private viewState;
23
+ private readonly transientDisposables;
24
+ private readonly stylesheet;
25
+ constructor(editorService: IEditorService, configurationService: IConfigurationService, quickDiffModelService: IQuickDiffModelService, quickDiffService: IQuickDiffService, uriIdentityService: IUriIdentityService, contextKeyService: IContextKeyService);
26
+ private onDidChangeConfiguration;
27
+ private onDidChangeDiffWidthConfiguration;
28
+ private onDidChangeDiffVisibilityConfiguration;
29
+ private setViewState;
30
+ private enable;
31
+ private disable;
32
+ private onDidActiveEditorChange;
33
+ private onDidChangeQuickDiffProviders;
34
+ private onEditorsChanged;
35
+ dispose(): void;
36
+ }