@theia/scm 1.53.0-next.4 → 1.53.0-next.55

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 (41) hide show
  1. package/README.md +31 -31
  2. package/lib/browser/scm-commit-widget.js +1 -1
  3. package/lib/browser/scm-contribution.js +5 -5
  4. package/package.json +7 -7
  5. package/src/browser/decorations/scm-decorations-service.ts +102 -102
  6. package/src/browser/decorations/scm-navigator-decorator.ts +121 -121
  7. package/src/browser/decorations/scm-tab-bar-decorator.ts +83 -83
  8. package/src/browser/dirty-diff/content-lines.spec.ts +42 -42
  9. package/src/browser/dirty-diff/content-lines.ts +121 -121
  10. package/src/browser/dirty-diff/diff-computer.spec.ts +455 -455
  11. package/src/browser/dirty-diff/diff-computer.ts +177 -177
  12. package/src/browser/dirty-diff/dirty-diff-decorator.ts +114 -114
  13. package/src/browser/dirty-diff/dirty-diff-module.ts +33 -33
  14. package/src/browser/dirty-diff/dirty-diff-navigator.ts +288 -288
  15. package/src/browser/dirty-diff/dirty-diff-widget.ts +364 -364
  16. package/src/browser/scm-amend-component.tsx +600 -600
  17. package/src/browser/scm-amend-widget.tsx +77 -77
  18. package/src/browser/scm-avatar-service.ts +27 -27
  19. package/src/browser/scm-colors.ts +21 -21
  20. package/src/browser/scm-commit-widget.tsx +215 -215
  21. package/src/browser/scm-context-key-service.ts +46 -46
  22. package/src/browser/scm-contribution.ts +452 -452
  23. package/src/browser/scm-frontend-module.ts +149 -149
  24. package/src/browser/scm-groups-tree-model.ts +78 -78
  25. package/src/browser/scm-input.ts +164 -164
  26. package/src/browser/scm-layout-migrations.ts +64 -64
  27. package/src/browser/scm-no-repository-widget.tsx +41 -41
  28. package/src/browser/scm-preferences.ts +63 -63
  29. package/src/browser/scm-provider.ts +91 -91
  30. package/src/browser/scm-quick-open-service.ts +48 -48
  31. package/src/browser/scm-repository.ts +52 -52
  32. package/src/browser/scm-service.ts +108 -108
  33. package/src/browser/scm-tree-label-provider.ts +44 -44
  34. package/src/browser/scm-tree-model.ts +405 -405
  35. package/src/browser/scm-tree-widget.tsx +838 -838
  36. package/src/browser/scm-widget.tsx +204 -204
  37. package/src/browser/style/dirty-diff-decorator.css +53 -53
  38. package/src/browser/style/dirty-diff.css +50 -50
  39. package/src/browser/style/index.css +271 -271
  40. package/src/browser/style/scm-amend-component.css +94 -94
  41. package/src/browser/style/scm.svg +4 -4
@@ -1,204 +1,204 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2019 Red Hat, Inc. and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- /* eslint-disable no-null/no-null, @typescript-eslint/no-explicit-any */
18
-
19
- import { Message } from '@theia/core/shared/@phosphor/messaging';
20
- import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
21
- import { DisposableCollection } from '@theia/core/lib/common/disposable';
22
- import {
23
- BaseWidget, Widget, StatefulWidget, Panel, PanelLayout, MessageLoop, CompositeTreeNode, SelectableTreeNode, ApplicationShell, NavigatableWidget,
24
- } from '@theia/core/lib/browser';
25
- import { ScmCommitWidget } from './scm-commit-widget';
26
- import { ScmAmendWidget } from './scm-amend-widget';
27
- import { ScmNoRepositoryWidget } from './scm-no-repository-widget';
28
- import { ScmService } from './scm-service';
29
- import { ScmTreeWidget } from './scm-tree-widget';
30
- import { ScmPreferences } from './scm-preferences';
31
- import { nls } from '@theia/core/lib/common/nls';
32
-
33
- @injectable()
34
- export class ScmWidget extends BaseWidget implements StatefulWidget {
35
-
36
- protected panel: Panel;
37
-
38
- static ID = 'scm-view';
39
-
40
- @inject(ApplicationShell) protected readonly shell: ApplicationShell;
41
- @inject(ScmService) protected readonly scmService: ScmService;
42
- @inject(ScmCommitWidget) protected readonly commitWidget: ScmCommitWidget;
43
- @inject(ScmTreeWidget) readonly resourceWidget: ScmTreeWidget;
44
- @inject(ScmAmendWidget) protected readonly amendWidget: ScmAmendWidget;
45
- @inject(ScmNoRepositoryWidget) readonly noRepositoryWidget: ScmNoRepositoryWidget;
46
- @inject(ScmPreferences) protected readonly scmPreferences: ScmPreferences;
47
-
48
- set viewMode(mode: 'tree' | 'list') {
49
- this.resourceWidget.viewMode = mode;
50
- }
51
- get viewMode(): 'tree' | 'list' {
52
- return this.resourceWidget.viewMode;
53
- }
54
-
55
- constructor() {
56
- super();
57
- this.node.tabIndex = 0;
58
- this.id = ScmWidget.ID;
59
- this.addClass('theia-scm');
60
- this.addClass('theia-scm-main-container');
61
- }
62
-
63
- @postConstruct()
64
- protected init(): void {
65
- const layout = new PanelLayout();
66
- this.layout = layout;
67
- this.panel = new Panel({
68
- layout: new PanelLayout({
69
- })
70
- });
71
- this.panel.node.tabIndex = -1;
72
- this.panel.node.setAttribute('class', 'theia-scm-panel');
73
- layout.addWidget(this.panel);
74
-
75
- this.containerLayout.addWidget(this.commitWidget);
76
- this.containerLayout.addWidget(this.resourceWidget);
77
- this.containerLayout.addWidget(this.amendWidget);
78
- this.containerLayout.addWidget(this.noRepositoryWidget);
79
-
80
- this.refresh();
81
- this.toDispose.push(this.scmService.onDidChangeSelectedRepository(() => this.refresh()));
82
- this.updateViewMode(this.scmPreferences.get('scm.defaultViewMode'));
83
- this.toDispose.push(this.scmPreferences.onPreferenceChanged(e => {
84
- if (e.preferenceName === 'scm.defaultViewMode') {
85
- this.updateViewMode(e.newValue);
86
- }
87
- }));
88
- this.toDispose.push(this.shell.onDidChangeCurrentWidget(({ newValue }) => {
89
- const uri = NavigatableWidget.getUri(newValue || undefined);
90
- if (uri) {
91
- this.resourceWidget.selectNodeByUri(uri);
92
- }
93
- }));
94
-
95
- }
96
-
97
- get containerLayout(): PanelLayout {
98
- return this.panel.layout as PanelLayout;
99
- }
100
-
101
- /**
102
- * Updates the view mode based on the preference value.
103
- * @param preference the view mode preference.
104
- */
105
- protected updateViewMode(preference: 'tree' | 'list'): void {
106
- this.viewMode = preference;
107
- }
108
-
109
- protected readonly toDisposeOnRefresh = new DisposableCollection();
110
- protected refresh(): void {
111
- this.toDisposeOnRefresh.dispose();
112
- this.toDispose.push(this.toDisposeOnRefresh);
113
- const repository = this.scmService.selectedRepository;
114
- this.title.label = repository ? repository.provider.label : nls.localize('theia/scm/noRepositoryFound', 'No repository found');
115
- this.title.caption = this.title.label;
116
- this.update();
117
- if (repository) {
118
- this.toDisposeOnRefresh.push(repository.onDidChange(() => this.update()));
119
- // render synchronously to avoid cursor jumping
120
- // see https://stackoverflow.com/questions/28922275/in-reactjs-why-does-setstate-behave-differently-when-called-synchronously/28922465#28922465
121
- this.toDisposeOnRefresh.push(repository.input.onDidChange(() => this.updateImmediately()));
122
- this.toDisposeOnRefresh.push(repository.input.onDidFocus(() => this.focusInput()));
123
-
124
- this.commitWidget.show();
125
- this.resourceWidget.show();
126
- this.amendWidget.show();
127
- this.noRepositoryWidget.hide();
128
- } else {
129
- this.commitWidget.hide();
130
- this.resourceWidget.hide();
131
- this.amendWidget.hide();
132
- this.noRepositoryWidget.show();
133
- }
134
- }
135
-
136
- protected updateImmediately(): void {
137
- this.onUpdateRequest(Widget.Msg.UpdateRequest);
138
- }
139
-
140
- protected override onUpdateRequest(msg: Message): void {
141
- MessageLoop.sendMessage(this.commitWidget, msg);
142
- MessageLoop.sendMessage(this.resourceWidget, msg);
143
- MessageLoop.sendMessage(this.amendWidget, msg);
144
- MessageLoop.sendMessage(this.noRepositoryWidget, msg);
145
- super.onUpdateRequest(msg);
146
- }
147
-
148
- protected override onAfterAttach(msg: Message): void {
149
- this.node.appendChild(this.commitWidget.node);
150
- this.node.appendChild(this.resourceWidget.node);
151
- this.node.appendChild(this.amendWidget.node);
152
- this.node.appendChild(this.noRepositoryWidget.node);
153
-
154
- super.onAfterAttach(msg);
155
- this.update();
156
- }
157
-
158
- protected override onActivateRequest(msg: Message): void {
159
- super.onActivateRequest(msg);
160
- this.refresh();
161
- if (this.commitWidget.isVisible) {
162
- this.commitWidget.focus();
163
- } else {
164
- this.node.focus();
165
- }
166
- }
167
-
168
- protected focusInput(): void {
169
- this.commitWidget.focus();
170
- }
171
-
172
- storeState(): any {
173
- const state: object = {
174
- commitState: this.commitWidget.storeState(),
175
- changesTreeState: this.resourceWidget.storeState(),
176
- };
177
- return state;
178
- }
179
-
180
- restoreState(oldState: any): void {
181
- const { commitState, changesTreeState } = oldState;
182
- this.commitWidget.restoreState(commitState);
183
- this.resourceWidget.restoreState(changesTreeState);
184
- }
185
-
186
- collapseScmTree(): void {
187
- const { model } = this.resourceWidget;
188
- const root = model.root;
189
- if (CompositeTreeNode.is(root)) {
190
- root.children.map(group => {
191
- if (CompositeTreeNode.is(group)) {
192
- group.children.map(folderNode => {
193
- if (CompositeTreeNode.is(folderNode)) {
194
- model.collapseAll(folderNode);
195
- }
196
- if (SelectableTreeNode.isSelected(folderNode)) {
197
- model.toggleNode(folderNode);
198
- }
199
- });
200
- }
201
- });
202
- }
203
- }
204
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2019 Red Hat, Inc. and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ /* eslint-disable no-null/no-null, @typescript-eslint/no-explicit-any */
18
+
19
+ import { Message } from '@theia/core/shared/@phosphor/messaging';
20
+ import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
21
+ import { DisposableCollection } from '@theia/core/lib/common/disposable';
22
+ import {
23
+ BaseWidget, Widget, StatefulWidget, Panel, PanelLayout, MessageLoop, CompositeTreeNode, SelectableTreeNode, ApplicationShell, NavigatableWidget,
24
+ } from '@theia/core/lib/browser';
25
+ import { ScmCommitWidget } from './scm-commit-widget';
26
+ import { ScmAmendWidget } from './scm-amend-widget';
27
+ import { ScmNoRepositoryWidget } from './scm-no-repository-widget';
28
+ import { ScmService } from './scm-service';
29
+ import { ScmTreeWidget } from './scm-tree-widget';
30
+ import { ScmPreferences } from './scm-preferences';
31
+ import { nls } from '@theia/core/lib/common/nls';
32
+
33
+ @injectable()
34
+ export class ScmWidget extends BaseWidget implements StatefulWidget {
35
+
36
+ protected panel: Panel;
37
+
38
+ static ID = 'scm-view';
39
+
40
+ @inject(ApplicationShell) protected readonly shell: ApplicationShell;
41
+ @inject(ScmService) protected readonly scmService: ScmService;
42
+ @inject(ScmCommitWidget) protected readonly commitWidget: ScmCommitWidget;
43
+ @inject(ScmTreeWidget) readonly resourceWidget: ScmTreeWidget;
44
+ @inject(ScmAmendWidget) protected readonly amendWidget: ScmAmendWidget;
45
+ @inject(ScmNoRepositoryWidget) readonly noRepositoryWidget: ScmNoRepositoryWidget;
46
+ @inject(ScmPreferences) protected readonly scmPreferences: ScmPreferences;
47
+
48
+ set viewMode(mode: 'tree' | 'list') {
49
+ this.resourceWidget.viewMode = mode;
50
+ }
51
+ get viewMode(): 'tree' | 'list' {
52
+ return this.resourceWidget.viewMode;
53
+ }
54
+
55
+ constructor() {
56
+ super();
57
+ this.node.tabIndex = 0;
58
+ this.id = ScmWidget.ID;
59
+ this.addClass('theia-scm');
60
+ this.addClass('theia-scm-main-container');
61
+ }
62
+
63
+ @postConstruct()
64
+ protected init(): void {
65
+ const layout = new PanelLayout();
66
+ this.layout = layout;
67
+ this.panel = new Panel({
68
+ layout: new PanelLayout({
69
+ })
70
+ });
71
+ this.panel.node.tabIndex = -1;
72
+ this.panel.node.setAttribute('class', 'theia-scm-panel');
73
+ layout.addWidget(this.panel);
74
+
75
+ this.containerLayout.addWidget(this.commitWidget);
76
+ this.containerLayout.addWidget(this.resourceWidget);
77
+ this.containerLayout.addWidget(this.amendWidget);
78
+ this.containerLayout.addWidget(this.noRepositoryWidget);
79
+
80
+ this.refresh();
81
+ this.toDispose.push(this.scmService.onDidChangeSelectedRepository(() => this.refresh()));
82
+ this.updateViewMode(this.scmPreferences.get('scm.defaultViewMode'));
83
+ this.toDispose.push(this.scmPreferences.onPreferenceChanged(e => {
84
+ if (e.preferenceName === 'scm.defaultViewMode') {
85
+ this.updateViewMode(e.newValue);
86
+ }
87
+ }));
88
+ this.toDispose.push(this.shell.onDidChangeCurrentWidget(({ newValue }) => {
89
+ const uri = NavigatableWidget.getUri(newValue || undefined);
90
+ if (uri) {
91
+ this.resourceWidget.selectNodeByUri(uri);
92
+ }
93
+ }));
94
+
95
+ }
96
+
97
+ get containerLayout(): PanelLayout {
98
+ return this.panel.layout as PanelLayout;
99
+ }
100
+
101
+ /**
102
+ * Updates the view mode based on the preference value.
103
+ * @param preference the view mode preference.
104
+ */
105
+ protected updateViewMode(preference: 'tree' | 'list'): void {
106
+ this.viewMode = preference;
107
+ }
108
+
109
+ protected readonly toDisposeOnRefresh = new DisposableCollection();
110
+ protected refresh(): void {
111
+ this.toDisposeOnRefresh.dispose();
112
+ this.toDispose.push(this.toDisposeOnRefresh);
113
+ const repository = this.scmService.selectedRepository;
114
+ this.title.label = repository ? repository.provider.label : nls.localize('theia/scm/noRepositoryFound', 'No repository found');
115
+ this.title.caption = this.title.label;
116
+ this.update();
117
+ if (repository) {
118
+ this.toDisposeOnRefresh.push(repository.onDidChange(() => this.update()));
119
+ // render synchronously to avoid cursor jumping
120
+ // see https://stackoverflow.com/questions/28922275/in-reactjs-why-does-setstate-behave-differently-when-called-synchronously/28922465#28922465
121
+ this.toDisposeOnRefresh.push(repository.input.onDidChange(() => this.updateImmediately()));
122
+ this.toDisposeOnRefresh.push(repository.input.onDidFocus(() => this.focusInput()));
123
+
124
+ this.commitWidget.show();
125
+ this.resourceWidget.show();
126
+ this.amendWidget.show();
127
+ this.noRepositoryWidget.hide();
128
+ } else {
129
+ this.commitWidget.hide();
130
+ this.resourceWidget.hide();
131
+ this.amendWidget.hide();
132
+ this.noRepositoryWidget.show();
133
+ }
134
+ }
135
+
136
+ protected updateImmediately(): void {
137
+ this.onUpdateRequest(Widget.Msg.UpdateRequest);
138
+ }
139
+
140
+ protected override onUpdateRequest(msg: Message): void {
141
+ MessageLoop.sendMessage(this.commitWidget, msg);
142
+ MessageLoop.sendMessage(this.resourceWidget, msg);
143
+ MessageLoop.sendMessage(this.amendWidget, msg);
144
+ MessageLoop.sendMessage(this.noRepositoryWidget, msg);
145
+ super.onUpdateRequest(msg);
146
+ }
147
+
148
+ protected override onAfterAttach(msg: Message): void {
149
+ this.node.appendChild(this.commitWidget.node);
150
+ this.node.appendChild(this.resourceWidget.node);
151
+ this.node.appendChild(this.amendWidget.node);
152
+ this.node.appendChild(this.noRepositoryWidget.node);
153
+
154
+ super.onAfterAttach(msg);
155
+ this.update();
156
+ }
157
+
158
+ protected override onActivateRequest(msg: Message): void {
159
+ super.onActivateRequest(msg);
160
+ this.refresh();
161
+ if (this.commitWidget.isVisible) {
162
+ this.commitWidget.focus();
163
+ } else {
164
+ this.node.focus();
165
+ }
166
+ }
167
+
168
+ protected focusInput(): void {
169
+ this.commitWidget.focus();
170
+ }
171
+
172
+ storeState(): any {
173
+ const state: object = {
174
+ commitState: this.commitWidget.storeState(),
175
+ changesTreeState: this.resourceWidget.storeState(),
176
+ };
177
+ return state;
178
+ }
179
+
180
+ restoreState(oldState: any): void {
181
+ const { commitState, changesTreeState } = oldState;
182
+ this.commitWidget.restoreState(commitState);
183
+ this.resourceWidget.restoreState(changesTreeState);
184
+ }
185
+
186
+ collapseScmTree(): void {
187
+ const { model } = this.resourceWidget;
188
+ const root = model.root;
189
+ if (CompositeTreeNode.is(root)) {
190
+ root.children.map(group => {
191
+ if (CompositeTreeNode.is(group)) {
192
+ group.children.map(folderNode => {
193
+ if (CompositeTreeNode.is(folderNode)) {
194
+ model.collapseAll(folderNode);
195
+ }
196
+ if (SelectableTreeNode.isSelected(folderNode)) {
197
+ model.toggleNode(folderNode);
198
+ }
199
+ });
200
+ }
201
+ });
202
+ }
203
+ }
204
+ }
@@ -1,53 +1,53 @@
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
- .dirty-diff-glyph {
7
- margin-left: 5px;
8
- cursor: pointer;
9
- }
10
-
11
- .dirty-diff-removed-line:after {
12
- content: '';
13
- position: absolute;
14
- bottom: -4px;
15
- box-sizing: border-box;
16
- width: 4px;
17
- height: 0;
18
- z-index: 9;
19
- border-top: 4px solid transparent;
20
- border-bottom: 4px solid transparent;
21
- transition: border-top-width 80ms linear, border-bottom-width 80ms linear, bottom 80ms linear;
22
- pointer-events: none;
23
- }
24
-
25
- .dirty-diff-glyph:before {
26
- position: absolute;
27
- content: '';
28
- height: 100%;
29
- width: 0;
30
- left: -2px;
31
- transition: width 80ms linear, left 80ms linear;
32
- }
33
-
34
- .dirty-diff-removed-line:before {
35
- margin-left: 3px;
36
- height: 0;
37
- bottom: 0;
38
- transition: height 80ms linear;
39
- }
40
-
41
- .margin-view-overlays > div:hover > .dirty-diff-glyph:before {
42
- position: absolute;
43
- content: '';
44
- height: 100%;
45
- width: 6px;
46
- left: -6px;
47
- }
48
-
49
- .margin-view-overlays > div:hover > .dirty-diff-removed-line:after {
50
- bottom: 0;
51
- border-top-width: 0;
52
- border-bottom-width: 0;
53
- }
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
+ .dirty-diff-glyph {
7
+ margin-left: 5px;
8
+ cursor: pointer;
9
+ }
10
+
11
+ .dirty-diff-removed-line:after {
12
+ content: '';
13
+ position: absolute;
14
+ bottom: -4px;
15
+ box-sizing: border-box;
16
+ width: 4px;
17
+ height: 0;
18
+ z-index: 9;
19
+ border-top: 4px solid transparent;
20
+ border-bottom: 4px solid transparent;
21
+ transition: border-top-width 80ms linear, border-bottom-width 80ms linear, bottom 80ms linear;
22
+ pointer-events: none;
23
+ }
24
+
25
+ .dirty-diff-glyph:before {
26
+ position: absolute;
27
+ content: '';
28
+ height: 100%;
29
+ width: 0;
30
+ left: -2px;
31
+ transition: width 80ms linear, left 80ms linear;
32
+ }
33
+
34
+ .dirty-diff-removed-line:before {
35
+ margin-left: 3px;
36
+ height: 0;
37
+ bottom: 0;
38
+ transition: height 80ms linear;
39
+ }
40
+
41
+ .margin-view-overlays > div:hover > .dirty-diff-glyph:before {
42
+ position: absolute;
43
+ content: '';
44
+ height: 100%;
45
+ width: 6px;
46
+ left: -6px;
47
+ }
48
+
49
+ .margin-view-overlays > div:hover > .dirty-diff-removed-line:after {
50
+ bottom: 0;
51
+ border-top-width: 0;
52
+ border-bottom-width: 0;
53
+ }
@@ -1,50 +1,50 @@
1
- /********************************************************************************
2
- * Copyright (C) 2018 TypeFox and others.
3
- *
4
- * This program and the accompanying materials are made available under the
5
- * terms of the Eclipse Public License v. 2.0 which is available at
6
- * http://www.eclipse.org/legal/epl-2.0.
7
- *
8
- * This Source Code may also be made available under the following Secondary
9
- * Licenses when the conditions for such availability set forth in the Eclipse
10
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- * with the GNU Classpath Exception which is available at
12
- * https://www.gnu.org/software/classpath/license.html.
13
- *
14
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- ********************************************************************************/
16
-
17
- @import "dirty-diff-decorator.css";
18
-
19
- .monaco-editor .dirty-diff-added-line {
20
- border-left: 3px solid var(--theia-editorGutter-addedBackground);
21
- transition: opacity 0.5s;
22
- }
23
- .monaco-editor .dirty-diff-added-line:before {
24
- background: var(--theia-editorGutter-addedBackground);
25
- }
26
- .monaco-editor .margin:hover .dirty-diff-added-line {
27
- opacity: 1;
28
- }
29
-
30
- .monaco-editor .dirty-diff-removed-line:after {
31
- border-left: 4px solid var(--theia-editorGutter-deletedBackground);
32
- transition: opacity 0.5s;
33
- }
34
- .monaco-editor .dirty-diff-removed-line:before {
35
- background: var(--theia-editorGutter-deletedBackground);
36
- }
37
- .monaco-editor .margin:hover .dirty-diff-removed-line {
38
- opacity: 1;
39
- }
40
-
41
- .monaco-editor .dirty-diff-modified-line {
42
- border-left: 3px solid var(--theia-editorGutter-modifiedBackground);
43
- transition: opacity 0.5s;
44
- }
45
- .monaco-editor .dirty-diff-modified-line:before {
46
- background: var(--theia-editorGutter-modifiedBackground);
47
- }
48
- .monaco-editor .margin:hover .dirty-diff-modified-line {
49
- opacity: 1;
50
- }
1
+ /********************************************************************************
2
+ * Copyright (C) 2018 TypeFox and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+
17
+ @import "dirty-diff-decorator.css";
18
+
19
+ .monaco-editor .dirty-diff-added-line {
20
+ border-left: 3px solid var(--theia-editorGutter-addedBackground);
21
+ transition: opacity 0.5s;
22
+ }
23
+ .monaco-editor .dirty-diff-added-line:before {
24
+ background: var(--theia-editorGutter-addedBackground);
25
+ }
26
+ .monaco-editor .margin:hover .dirty-diff-added-line {
27
+ opacity: 1;
28
+ }
29
+
30
+ .monaco-editor .dirty-diff-removed-line:after {
31
+ border-left: 4px solid var(--theia-editorGutter-deletedBackground);
32
+ transition: opacity 0.5s;
33
+ }
34
+ .monaco-editor .dirty-diff-removed-line:before {
35
+ background: var(--theia-editorGutter-deletedBackground);
36
+ }
37
+ .monaco-editor .margin:hover .dirty-diff-removed-line {
38
+ opacity: 1;
39
+ }
40
+
41
+ .monaco-editor .dirty-diff-modified-line {
42
+ border-left: 3px solid var(--theia-editorGutter-modifiedBackground);
43
+ transition: opacity 0.5s;
44
+ }
45
+ .monaco-editor .dirty-diff-modified-line:before {
46
+ background: var(--theia-editorGutter-modifiedBackground);
47
+ }
48
+ .monaco-editor .margin:hover .dirty-diff-modified-line {
49
+ opacity: 1;
50
+ }