@codingame/monaco-vscode-update-service-override 37.2.0 → 37.3.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 +2 -2
- package/vscode/src/vs/platform/update/common/update.config.contribution.js +18 -18
- package/vscode/src/vs/workbench/contrib/update/browser/postUpdateWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/update/browser/update.contribution.js +19 -19
- package/vscode/src/vs/workbench/browser/media/code-icon.svg +0 -1
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownSettingRenderer.d.ts +0 -43
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownSettingRenderer.js +0 -330
- package/vscode/src/vs/workbench/contrib/update/browser/media/updateTitleBarEntry.css +0 -91
- package/vscode/src/vs/workbench/contrib/update/browser/media/updateTooltip.css +0 -165
- package/vscode/src/vs/workbench/contrib/update/browser/releaseNotesEditor.d.ts +0 -67
- package/vscode/src/vs/workbench/contrib/update/browser/releaseNotesEditor.js +0 -646
- package/vscode/src/vs/workbench/contrib/update/browser/update.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/update/browser/update.js +0 -498
- package/vscode/src/vs/workbench/contrib/update/browser/updateTitleBarEntry.d.ts +0 -64
- package/vscode/src/vs/workbench/contrib/update/browser/updateTitleBarEntry.js +0 -364
- package/vscode/src/vs/workbench/contrib/update/browser/updateTooltip.d.ts +0 -61
- package/vscode/src/vs/workbench/contrib/update/browser/updateTooltip.js +0 -395
- package/vscode/src/vs/workbench/contrib/update/common/updateUtils.d.ts +0 -61
- package/vscode/src/vs/workbench/contrib/update/common/updateUtils.js +0 -129
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { ActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems';
|
|
4
|
-
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
5
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
|
-
import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service';
|
|
7
|
-
import { ConfigurationTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration';
|
|
8
|
-
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
|
-
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
10
|
-
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
11
|
-
import { IPreferencesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/preferences/common/preferences.service';
|
|
12
|
-
import { settingKeyToDisplayFormat } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/preferences/browser/settingsTreeModels';
|
|
13
|
-
|
|
14
|
-
let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
15
|
-
constructor(
|
|
16
|
-
_configurationService,
|
|
17
|
-
_contextMenuService,
|
|
18
|
-
_preferencesService,
|
|
19
|
-
_telemetryService,
|
|
20
|
-
_clipboardService
|
|
21
|
-
) {
|
|
22
|
-
this._configurationService = _configurationService;
|
|
23
|
-
this._contextMenuService = _contextMenuService;
|
|
24
|
-
this._preferencesService = _preferencesService;
|
|
25
|
-
this._telemetryService = _telemetryService;
|
|
26
|
-
this._clipboardService = _clipboardService;
|
|
27
|
-
this._updatedSettings = ( new Map());
|
|
28
|
-
this._encounteredSettings = ( new Map());
|
|
29
|
-
this._featuredSettings = ( new Map());
|
|
30
|
-
this.codeSettingAnchorRegex = ( new RegExp(
|
|
31
|
-
`^<a (href)=".*code.*://settings/([^\\s"]+)"(?:\\s*codesetting="([^"]+)")?>`
|
|
32
|
-
));
|
|
33
|
-
this.codeSettingSimpleRegex = ( new RegExp(`^setting\\(([^\\s:)]+)(?::([^)]+))?\\)$`));
|
|
34
|
-
}
|
|
35
|
-
get featuredSettingStates() {
|
|
36
|
-
const result = ( new Map());
|
|
37
|
-
for (const [settingId, value] of this._featuredSettings) {
|
|
38
|
-
result.set(settingId, this._configurationService.getValue(settingId) === value);
|
|
39
|
-
}
|
|
40
|
-
return result;
|
|
41
|
-
}
|
|
42
|
-
replaceAnchor(raw) {
|
|
43
|
-
const match = this.codeSettingAnchorRegex.exec(raw);
|
|
44
|
-
if (match && match.length === 4) {
|
|
45
|
-
const settingId = match[2];
|
|
46
|
-
const rendered = this.render(settingId, match[3]);
|
|
47
|
-
if (rendered) {
|
|
48
|
-
return raw.replace(this.codeSettingAnchorRegex, rendered);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return undefined;
|
|
52
|
-
}
|
|
53
|
-
replaceSimple(raw) {
|
|
54
|
-
const match = this.codeSettingSimpleRegex.exec(raw);
|
|
55
|
-
if (match && match.length === 3) {
|
|
56
|
-
const settingId = match[1];
|
|
57
|
-
const rendered = this.render(settingId, match[2]);
|
|
58
|
-
if (rendered) {
|
|
59
|
-
return raw.replace(this.codeSettingSimpleRegex, rendered);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return undefined;
|
|
63
|
-
}
|
|
64
|
-
getHtmlRenderer() {
|
|
65
|
-
return (
|
|
66
|
-
{
|
|
67
|
-
raw
|
|
68
|
-
}
|
|
69
|
-
) => {
|
|
70
|
-
const replacedAnchor = this.replaceAnchor(raw);
|
|
71
|
-
if (replacedAnchor) {
|
|
72
|
-
raw = replacedAnchor;
|
|
73
|
-
}
|
|
74
|
-
return raw;
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
getCodeSpanRenderer() {
|
|
78
|
-
return (
|
|
79
|
-
{
|
|
80
|
-
text
|
|
81
|
-
}
|
|
82
|
-
) => {
|
|
83
|
-
const replacedSimple = this.replaceSimple(text);
|
|
84
|
-
if (replacedSimple) {
|
|
85
|
-
return replacedSimple;
|
|
86
|
-
}
|
|
87
|
-
return `<code>${text}</code>`;
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
settingToUriString(settingId, value) {
|
|
91
|
-
return `${Schemas.codeSetting}://${settingId}${value ? `/${value}` : ""}`;
|
|
92
|
-
}
|
|
93
|
-
getSetting(settingId) {
|
|
94
|
-
if (( this._encounteredSettings.has(settingId))) {
|
|
95
|
-
return this._encounteredSettings.get(settingId);
|
|
96
|
-
}
|
|
97
|
-
return this._preferencesService.getSetting(settingId);
|
|
98
|
-
}
|
|
99
|
-
parseValue(settingId, value) {
|
|
100
|
-
if (value === "undefined" || value === "") {
|
|
101
|
-
return undefined;
|
|
102
|
-
}
|
|
103
|
-
const setting = this.getSetting(settingId);
|
|
104
|
-
if (!setting) {
|
|
105
|
-
return value;
|
|
106
|
-
}
|
|
107
|
-
switch (setting.type) {
|
|
108
|
-
case "boolean":
|
|
109
|
-
return value === "true";
|
|
110
|
-
case "number":
|
|
111
|
-
return parseInt(value, 10);
|
|
112
|
-
case "string":
|
|
113
|
-
default:
|
|
114
|
-
return value;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
render(settingId, newValue) {
|
|
118
|
-
const setting = this.getSetting(settingId);
|
|
119
|
-
if (!setting) {
|
|
120
|
-
return `<code>${settingId}</code>`;
|
|
121
|
-
}
|
|
122
|
-
return this.renderSetting(setting, newValue);
|
|
123
|
-
}
|
|
124
|
-
viewInSettingsMessage(settingId, alreadyDisplayed) {
|
|
125
|
-
if (alreadyDisplayed) {
|
|
126
|
-
return localize(13567, "View in Settings");
|
|
127
|
-
} else {
|
|
128
|
-
const displayName = settingKeyToDisplayFormat(settingId);
|
|
129
|
-
return localize(
|
|
130
|
-
13568,
|
|
131
|
-
"View \"{0}: {1}\" in Settings",
|
|
132
|
-
displayName.category,
|
|
133
|
-
displayName.label
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
restorePreviousSettingMessage(settingId) {
|
|
138
|
-
const displayName = settingKeyToDisplayFormat(settingId);
|
|
139
|
-
return localize(
|
|
140
|
-
13569,
|
|
141
|
-
"Restore value of \"{0}: {1}\"",
|
|
142
|
-
displayName.category,
|
|
143
|
-
displayName.label
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
isAlreadySet(setting, value) {
|
|
147
|
-
const currentValue = this._configurationService.getValue(setting.key);
|
|
148
|
-
return (currentValue === value || (currentValue === undefined && setting.value === value));
|
|
149
|
-
}
|
|
150
|
-
booleanSettingMessage(setting, booleanValue) {
|
|
151
|
-
const displayName = settingKeyToDisplayFormat(setting.key);
|
|
152
|
-
if (this.isAlreadySet(setting, booleanValue)) {
|
|
153
|
-
if (booleanValue) {
|
|
154
|
-
return localize(
|
|
155
|
-
13570,
|
|
156
|
-
"\"{0}: {1}\" is already enabled",
|
|
157
|
-
displayName.category,
|
|
158
|
-
displayName.label
|
|
159
|
-
);
|
|
160
|
-
} else {
|
|
161
|
-
return localize(
|
|
162
|
-
13571,
|
|
163
|
-
"\"{0}: {1}\" is already disabled",
|
|
164
|
-
displayName.category,
|
|
165
|
-
displayName.label
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
if (booleanValue) {
|
|
170
|
-
return localize(13572, "Enable \"{0}: {1}\"", displayName.category, displayName.label);
|
|
171
|
-
} else {
|
|
172
|
-
return localize(13573, "Disable \"{0}: {1}\"", displayName.category, displayName.label);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
stringSettingMessage(setting, stringValue) {
|
|
176
|
-
const displayName = settingKeyToDisplayFormat(setting.key);
|
|
177
|
-
if (this.isAlreadySet(setting, stringValue)) {
|
|
178
|
-
return localize(
|
|
179
|
-
13574,
|
|
180
|
-
"\"{0}: {1}\" is already set to \"{2}\"",
|
|
181
|
-
displayName.category,
|
|
182
|
-
displayName.label,
|
|
183
|
-
stringValue
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
return localize(
|
|
187
|
-
13575,
|
|
188
|
-
"Set \"{0}: {1}\" to \"{2}\"",
|
|
189
|
-
displayName.category,
|
|
190
|
-
displayName.label,
|
|
191
|
-
stringValue
|
|
192
|
-
);
|
|
193
|
-
}
|
|
194
|
-
numberSettingMessage(setting, numberValue) {
|
|
195
|
-
const displayName = settingKeyToDisplayFormat(setting.key);
|
|
196
|
-
if (this.isAlreadySet(setting, numberValue)) {
|
|
197
|
-
return localize(
|
|
198
|
-
13576,
|
|
199
|
-
"\"{0}: {1}\" is already set to {2}",
|
|
200
|
-
displayName.category,
|
|
201
|
-
displayName.label,
|
|
202
|
-
numberValue
|
|
203
|
-
);
|
|
204
|
-
}
|
|
205
|
-
return localize(
|
|
206
|
-
13577,
|
|
207
|
-
"Set \"{0}: {1}\" to {2}",
|
|
208
|
-
displayName.category,
|
|
209
|
-
displayName.label,
|
|
210
|
-
numberValue
|
|
211
|
-
);
|
|
212
|
-
}
|
|
213
|
-
renderSetting(setting, newValue) {
|
|
214
|
-
const href = this.settingToUriString(setting.key, newValue);
|
|
215
|
-
const title = ( localize(13578, "View or change setting"));
|
|
216
|
-
return `<code tabindex="0"><a href="${href}" class="codesetting" title="${title}" aria-role="button"><svg width="14" height="14" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M9.1 4.4L8.6 2H7.4l-.5 2.4-.7.3-2-1.3-.9.8 1.3 2-.2.7-2.4.5v1.2l2.4.5.3.8-1.3 2 .8.8 2-1.3.8.3.4 2.3h1.2l.5-2.4.8-.3 2 1.3.8-.8-1.3-2 .3-.8 2.3-.4V7.4l-2.4-.5-.3-.8 1.3-2-.8-.8-2 1.3-.7-.2zM9.4 1l.5 2.4L12 2.1l2 2-1.4 2.1 2.4.4v2.8l-2.4.5L14 12l-2 2-2.1-1.4-.5 2.4H6.6l-.5-2.4L4 13.9l-2-2 1.4-2.1L1 9.4V6.6l2.4-.5L2.1 4l2-2 2.1 1.4.4-2.4h2.8zm.6 7c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zM8 9c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1z"/></svg>
|
|
217
|
-
<span class="separator"></span>
|
|
218
|
-
<span class="setting-name">${setting.key}</span>
|
|
219
|
-
</a></code>`;
|
|
220
|
-
}
|
|
221
|
-
getSettingMessage(setting, newValue) {
|
|
222
|
-
if (setting.type === "boolean") {
|
|
223
|
-
return this.booleanSettingMessage(setting, newValue);
|
|
224
|
-
} else if (setting.type === "string") {
|
|
225
|
-
return this.stringSettingMessage(setting, newValue);
|
|
226
|
-
} else if (setting.type === "number") {
|
|
227
|
-
return this.numberSettingMessage(setting, newValue);
|
|
228
|
-
}
|
|
229
|
-
return undefined;
|
|
230
|
-
}
|
|
231
|
-
async restoreSetting(settingId) {
|
|
232
|
-
const userOriginalSettingValue = this._updatedSettings.get(settingId);
|
|
233
|
-
this._updatedSettings.delete(settingId);
|
|
234
|
-
return this._configurationService.updateValue(settingId, userOriginalSettingValue, ConfigurationTarget.USER);
|
|
235
|
-
}
|
|
236
|
-
async setSetting(settingId, currentSettingValue, newSettingValue) {
|
|
237
|
-
this._updatedSettings.set(settingId, currentSettingValue);
|
|
238
|
-
return this._configurationService.updateValue(settingId, newSettingValue, ConfigurationTarget.USER);
|
|
239
|
-
}
|
|
240
|
-
getActions(uri) {
|
|
241
|
-
if (uri.scheme !== Schemas.codeSetting) {
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
const actions = [];
|
|
245
|
-
const settingId = uri.authority;
|
|
246
|
-
const newSettingValue = this.parseValue(uri.authority, uri.path.substring(1));
|
|
247
|
-
const currentSettingValue = this._configurationService.inspect(settingId).userValue;
|
|
248
|
-
if ((newSettingValue !== undefined) && newSettingValue === currentSettingValue && ( this._updatedSettings.has(settingId))) {
|
|
249
|
-
const restoreMessage = this.restorePreviousSettingMessage(settingId);
|
|
250
|
-
actions.push({
|
|
251
|
-
class: undefined,
|
|
252
|
-
id: "restoreSetting",
|
|
253
|
-
enabled: true,
|
|
254
|
-
tooltip: restoreMessage,
|
|
255
|
-
label: restoreMessage,
|
|
256
|
-
run: () => {
|
|
257
|
-
return this.restoreSetting(settingId);
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
} else if (newSettingValue !== undefined) {
|
|
261
|
-
const setting = this.getSetting(settingId);
|
|
262
|
-
const trySettingMessage = setting ? this.getSettingMessage(setting, newSettingValue) : undefined;
|
|
263
|
-
if (setting && trySettingMessage) {
|
|
264
|
-
actions.push({
|
|
265
|
-
class: undefined,
|
|
266
|
-
id: "trySetting",
|
|
267
|
-
enabled: !this.isAlreadySet(setting, newSettingValue),
|
|
268
|
-
tooltip: trySettingMessage,
|
|
269
|
-
label: trySettingMessage,
|
|
270
|
-
run: () => {
|
|
271
|
-
this.setSetting(settingId, currentSettingValue, newSettingValue);
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
const viewInSettingsMessage = this.viewInSettingsMessage(settingId, actions.length > 0);
|
|
277
|
-
actions.push({
|
|
278
|
-
class: undefined,
|
|
279
|
-
enabled: true,
|
|
280
|
-
id: "viewInSettings",
|
|
281
|
-
tooltip: viewInSettingsMessage,
|
|
282
|
-
label: viewInSettingsMessage,
|
|
283
|
-
run: () => {
|
|
284
|
-
return this._preferencesService.openApplicationSettings({
|
|
285
|
-
query: `@id:${settingId}`
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
});
|
|
289
|
-
actions.push({
|
|
290
|
-
class: undefined,
|
|
291
|
-
enabled: true,
|
|
292
|
-
id: "copySettingId",
|
|
293
|
-
tooltip: ( localize(13579, "Copy Setting ID")),
|
|
294
|
-
label: ( localize(13579, "Copy Setting ID")),
|
|
295
|
-
run: () => {
|
|
296
|
-
this._clipboardService.writeText(settingId);
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
return actions;
|
|
300
|
-
}
|
|
301
|
-
showContextMenu(uri, x, y) {
|
|
302
|
-
const actions = this.getActions(uri);
|
|
303
|
-
if (!actions) {
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
this._contextMenuService.showContextMenu({
|
|
307
|
-
getAnchor: () => ({
|
|
308
|
-
x,
|
|
309
|
-
y
|
|
310
|
-
}),
|
|
311
|
-
getActions: () => actions,
|
|
312
|
-
getActionViewItem: action => {
|
|
313
|
-
return ( new ActionViewItem(action, action, {
|
|
314
|
-
label: true
|
|
315
|
-
}));
|
|
316
|
-
}
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
async updateSetting(uri, x, y) {
|
|
320
|
-
if (uri.scheme === Schemas.codeSetting) {
|
|
321
|
-
this._telemetryService.publicLog2("releaseNotesSettingAction", {
|
|
322
|
-
settingId: uri.authority
|
|
323
|
-
});
|
|
324
|
-
return this.showContextMenu(uri, x, y);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
};
|
|
328
|
-
SimpleSettingRenderer = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IContextMenuService)), ( __param(2, IPreferencesService)), ( __param(3, ITelemetryService)), ( __param(4, IClipboardService))], SimpleSettingRenderer));
|
|
329
|
-
|
|
330
|
-
export { SimpleSettingRenderer };
|
|
@@ -1,91 +0,0 @@
|
|
|
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-action-bar .update-indicator {
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
border-radius: var(--vscode-cornerRadius-small);
|
|
10
|
-
white-space: nowrap;
|
|
11
|
-
padding: 0px 8px;
|
|
12
|
-
height: 22px;
|
|
13
|
-
box-sizing: border-box;
|
|
14
|
-
background-color: transparent;
|
|
15
|
-
border: 1px solid transparent;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.monaco-action-bar .update-indicator:hover {
|
|
19
|
-
background-color: var(--vscode-toolbar-hoverBackground);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.monaco-action-bar .update-indicator .indicator-label {
|
|
23
|
-
font-size: var(--vscode-bodyFontSize-small);
|
|
24
|
-
position: relative;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* Prominent state (action required) — primary button style */
|
|
28
|
-
.monaco-action-bar .update-indicator.prominent {
|
|
29
|
-
background-color: var(--vscode-button-background);
|
|
30
|
-
color: var(--vscode-button-foreground);
|
|
31
|
-
border-color: var(--vscode-button-background);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.monaco-action-bar .update-indicator.prominent:hover {
|
|
35
|
-
background-color: var(--vscode-button-hoverBackground);
|
|
36
|
-
border-color: var(--vscode-button-hoverBackground);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* Disabled state */
|
|
40
|
-
.monaco-action-bar .update-indicator.update-disabled .indicator-label {
|
|
41
|
-
color: var(--vscode-disabledForeground);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/* Progress underline bar (shared base) */
|
|
45
|
-
.monaco-action-bar .update-indicator.progress-indefinite .indicator-label::after,
|
|
46
|
-
.monaco-action-bar .update-indicator.progress-percent .indicator-label::after {
|
|
47
|
-
content: '';
|
|
48
|
-
position: absolute;
|
|
49
|
-
left: 0;
|
|
50
|
-
bottom: 1px;
|
|
51
|
-
height: 1px;
|
|
52
|
-
border-radius: 1px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/* Progress: indefinite — animated shimmer underline */
|
|
56
|
-
.monaco-action-bar .update-indicator.progress-indefinite .indicator-label::after {
|
|
57
|
-
width: 100%;
|
|
58
|
-
background: linear-gradient(
|
|
59
|
-
90deg,
|
|
60
|
-
transparent 0%,
|
|
61
|
-
var(--vscode-progressBar-background) 80%,
|
|
62
|
-
transparent 100%
|
|
63
|
-
);
|
|
64
|
-
background-size: 200% 100%;
|
|
65
|
-
animation: update-indicator-shimmer 1.5s ease-in-out infinite;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
@keyframes update-indicator-shimmer {
|
|
69
|
-
0% { background-position: 100% 0; }
|
|
70
|
-
100% { background-position: -100% 0; }
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* Progress: percentage — left-to-right fill underline */
|
|
74
|
-
.monaco-action-bar .update-indicator.progress-percent .indicator-label::after {
|
|
75
|
-
width: 100%;
|
|
76
|
-
background: linear-gradient(
|
|
77
|
-
90deg,
|
|
78
|
-
var(--vscode-progressBar-background) var(--update-progress, 0%),
|
|
79
|
-
color-mix(in srgb, var(--vscode-progressBar-background) 25%, transparent) var(--update-progress, 0%)
|
|
80
|
-
);
|
|
81
|
-
transition: background 0.3s ease;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/* Reduced motion */
|
|
85
|
-
.monaco-workbench.monaco-reduce-motion .update-indicator.progress-indefinite .indicator-label::after {
|
|
86
|
-
animation: none;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.monaco-workbench.monaco-reduce-motion .update-indicator.progress-percent .indicator-label::after {
|
|
90
|
-
transition: none;
|
|
91
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
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
|
-
.update-tooltip {
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
gap: 12px;
|
|
10
|
-
padding: 6px 6px;
|
|
11
|
-
width: 300px;
|
|
12
|
-
max-width: calc(100% - var(--vscode-spacing-size120));
|
|
13
|
-
color: var(--vscode-descriptionForeground);
|
|
14
|
-
font-size: var(--vscode-bodyFontSize-small);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* Header */
|
|
18
|
-
.update-tooltip .header {
|
|
19
|
-
display: flex;
|
|
20
|
-
justify-content: space-between;
|
|
21
|
-
align-items: center;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.update-tooltip .header .title {
|
|
25
|
-
font-weight: 600;
|
|
26
|
-
font-size: var(--vscode-bodyFontSize);
|
|
27
|
-
color: var(--vscode-foreground);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* Product info */
|
|
31
|
-
.update-tooltip .product-info {
|
|
32
|
-
display: flex;
|
|
33
|
-
gap: 12px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.update-tooltip .product-logo {
|
|
37
|
-
width: 48px;
|
|
38
|
-
height: 48px;
|
|
39
|
-
border-radius: var(--vscode-cornerRadius-large);
|
|
40
|
-
padding: 5px;
|
|
41
|
-
flex-shrink: 0;
|
|
42
|
-
background: url('../../../../browser/media/code-icon.svg') center / contain no-repeat;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.update-tooltip .product-details {
|
|
46
|
-
display: flex;
|
|
47
|
-
flex-direction: column;
|
|
48
|
-
justify-content: center;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.update-tooltip .product-name {
|
|
52
|
-
font-weight: 600;
|
|
53
|
-
color: var(--vscode-foreground);
|
|
54
|
-
margin-bottom: 4px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.update-tooltip .product-version {
|
|
58
|
-
display: flex;
|
|
59
|
-
align-items: center;
|
|
60
|
-
gap: 4px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.update-tooltip .copy-version-button {
|
|
64
|
-
cursor: pointer;
|
|
65
|
-
opacity: 0;
|
|
66
|
-
color: var(--vscode-descriptionForeground);
|
|
67
|
-
transition: opacity 0.1s;
|
|
68
|
-
margin-top: -2px;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.update-tooltip .product-version:hover .copy-version-button,
|
|
72
|
-
.update-tooltip .product-version:focus-within .copy-version-button {
|
|
73
|
-
opacity: 1;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.update-tooltip .copy-version-button:hover,
|
|
77
|
-
.update-tooltip .copy-version-button:focus-visible {
|
|
78
|
-
color: var(--vscode-foreground);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/* Button bar */
|
|
82
|
-
.update-tooltip .button-bar {
|
|
83
|
-
display: flex;
|
|
84
|
-
justify-content: flex-end;
|
|
85
|
-
align-items: center;
|
|
86
|
-
gap: 8px;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.update-tooltip .button-bar button {
|
|
90
|
-
padding: 4px 12px;
|
|
91
|
-
border-radius: var(--vscode-cornerRadius-small);
|
|
92
|
-
font-size: var(--vscode-bodyFontSize-small);
|
|
93
|
-
cursor: pointer;
|
|
94
|
-
white-space: nowrap;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.update-tooltip .release-notes-button {
|
|
98
|
-
background-color: var(--vscode-button-secondaryBackground);
|
|
99
|
-
color: var(--vscode-button-secondaryForeground);
|
|
100
|
-
border: 1px solid var(--vscode-button-secondaryBorder, var(--vscode-button-border, transparent));
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.update-tooltip .release-notes-button:hover {
|
|
104
|
-
background-color: var(--vscode-button-secondaryHoverBackground);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.update-tooltip .action-button {
|
|
108
|
-
background-color: var(--vscode-button-background);
|
|
109
|
-
color: var(--vscode-button-foreground);
|
|
110
|
-
border: 1px solid var(--vscode-button-border, transparent);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.update-tooltip .action-button:hover {
|
|
114
|
-
background-color: var(--vscode-button-hoverBackground);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/* Progress bar */
|
|
118
|
-
.update-tooltip .progress-bar {
|
|
119
|
-
height: 4px;
|
|
120
|
-
background-color: color-mix(in srgb, var(--vscode-progressBar-background) 30%, transparent);
|
|
121
|
-
border-radius: var(--vscode-cornerRadius-small);
|
|
122
|
-
overflow: hidden;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.update-tooltip .progress-fill {
|
|
126
|
-
height: 100%;
|
|
127
|
-
background-color: var(--vscode-progressBar-background);
|
|
128
|
-
border-radius: var(--vscode-cornerRadius-small);
|
|
129
|
-
transition: width 0.3s ease;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.monaco-workbench.monaco-reduce-motion .update-tooltip .progress-fill {
|
|
133
|
-
transition: none;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.update-tooltip .progress-text,
|
|
137
|
-
.update-tooltip .download-stats {
|
|
138
|
-
display: flex;
|
|
139
|
-
justify-content: space-between;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.update-tooltip .progress-text {
|
|
143
|
-
margin-top: 4px;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.update-tooltip .state-message {
|
|
147
|
-
display: flex;
|
|
148
|
-
align-items: flex-start;
|
|
149
|
-
font-size: var(--vscode-bodyFontSize);
|
|
150
|
-
gap: 4px;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.update-tooltip .state-message-icon.codicon[class*='codicon-'] {
|
|
154
|
-
font-size: 16px;
|
|
155
|
-
flex-shrink: 0;
|
|
156
|
-
margin-top: 2px;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.update-tooltip .state-message-icon.codicon.codicon-warning {
|
|
160
|
-
color: var(--vscode-editorWarning-foreground);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.update-tooltip .state-message-icon.codicon.codicon-error {
|
|
164
|
-
color: var(--vscode-editorError-foreground);
|
|
165
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
|
|
2
|
-
import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
|
|
3
|
-
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
4
|
-
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
5
|
-
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
6
|
-
import { IRequestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request.service";
|
|
7
|
-
import { IWebviewWorkbenchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.service";
|
|
8
|
-
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
9
|
-
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
10
|
-
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
11
|
-
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
12
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
13
|
-
import { SimpleSettingRenderer } from "../../markdown/browser/markdownSettingRenderer.js";
|
|
14
|
-
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
15
|
-
import { ICodeEditorService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service";
|
|
16
|
-
export declare class ReleaseNotesManager extends Disposable {
|
|
17
|
-
private readonly _environmentService;
|
|
18
|
-
private readonly _keybindingService;
|
|
19
|
-
private readonly _languageService;
|
|
20
|
-
private readonly _openerService;
|
|
21
|
-
private readonly _requestService;
|
|
22
|
-
private readonly _configurationService;
|
|
23
|
-
private readonly _editorService;
|
|
24
|
-
private readonly _editorGroupService;
|
|
25
|
-
private readonly _codeEditorService;
|
|
26
|
-
private readonly _webviewWorkbenchService;
|
|
27
|
-
private readonly _extensionService;
|
|
28
|
-
private readonly _productService;
|
|
29
|
-
private readonly _instantiationService;
|
|
30
|
-
private readonly _simpleSettingRenderer;
|
|
31
|
-
private readonly _releaseNotesCache;
|
|
32
|
-
private _currentReleaseNotes;
|
|
33
|
-
private _lastMeta;
|
|
34
|
-
constructor(_environmentService: IEnvironmentService, _keybindingService: IKeybindingService, _languageService: ILanguageService, _openerService: IOpenerService, _requestService: IRequestService, _configurationService: IConfigurationService, _editorService: IEditorService, _editorGroupService: IEditorGroupsService, _codeEditorService: ICodeEditorService, _webviewWorkbenchService: IWebviewWorkbenchService, _extensionService: IExtensionService, _productService: IProductService, _instantiationService: IInstantiationService);
|
|
35
|
-
private updateHtml;
|
|
36
|
-
private getBase;
|
|
37
|
-
show(version: string, useCurrentFile: boolean): Promise<boolean>;
|
|
38
|
-
private loadReleaseNotes;
|
|
39
|
-
private onDidClickLink;
|
|
40
|
-
private addGAParameters;
|
|
41
|
-
private renderBody;
|
|
42
|
-
private onDidChangeConfiguration;
|
|
43
|
-
private onDidChangeActiveWebviewEditor;
|
|
44
|
-
private updateCheckboxWebview;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Processes conditional blocks in the release notes markdown.
|
|
48
|
-
*
|
|
49
|
-
* Conditional blocks use a single HTML comment with the format:
|
|
50
|
-
* ```
|
|
51
|
-
* <!-- %IF CONDITION %
|
|
52
|
-
* Content only visible when CONDITION is active.
|
|
53
|
-
* %ENDIF % -->
|
|
54
|
-
* ```
|
|
55
|
-
*
|
|
56
|
-
* Supported conditions:
|
|
57
|
-
* - `IN_PRODUCT` - Content shown in VS Code (both Stable and Insiders)
|
|
58
|
-
* - `WEB` - Content shown on the website only
|
|
59
|
-
* - `STABLE` - Content shown in VS Code Stable only
|
|
60
|
-
* - `INSIDERS` - Content shown in VS Code Insiders only
|
|
61
|
-
*
|
|
62
|
-
* On the website, the entire block is a single HTML comment, so the
|
|
63
|
-
* content is hidden by default. The website renderer would activate
|
|
64
|
-
* `WEB` blocks by stripping the comment markers.
|
|
65
|
-
*/
|
|
66
|
-
export declare function processConditionalBlocks(text: string, activeConditions: ReadonlySet<string>): string;
|
|
67
|
-
export declare function renderReleaseNotesMarkdown(text: string, extensionService: IExtensionService, languageService: ILanguageService, simpleSettingRenderer: SimpleSettingRenderer, quality?: string): Promise<TrustedHTML>;
|