@codingame/monaco-vscode-walkthrough-service-override 4.5.1 → 5.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 (18) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.js +51 -136
  3. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.js +146 -253
  4. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors.js +8 -35
  5. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +61 -116
  6. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons.js +5 -4
  7. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +3 -6
  8. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService._contribution.js +44 -0
  9. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +74 -77
  10. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.js +29 -32
  11. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +147 -498
  12. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile.js +4 -15
  13. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.js +6 -25
  14. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.js +13 -13
  15. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution.js +5 -12
  16. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.js +24 -31
  17. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.js +2 -2
  18. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils.js +4 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-walkthrough-service-override",
3
- "version": "4.5.1",
3
+ "version": "5.0.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,6 +26,6 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@4.5.1"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@5.0.0"
30
30
  }
31
31
  }
@@ -11,7 +11,6 @@ import { SIDE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/ed
11
11
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
12
12
  import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
13
13
  import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
14
- import { hiddenEntriesConfigurationKey, walkthroughMetadataConfigurationKey } from './gettingStartedService.js';
15
14
  import { IWalkthroughsService } from 'vscode/vscode/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.service';
16
15
  import { GettingStartedInput } from './gettingStartedInput.js';
17
16
  import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
@@ -28,25 +27,24 @@ import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extension
28
27
  import { StartupPageEditorResolverContribution, StartupPageRunnerContribution } from './startupPage.js';
29
28
  import { ExtensionsInput } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensionsInput';
30
29
  import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
31
- import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
32
- import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
30
+ import './gettingStartedService._contribution.js';
33
31
  import './gettingStartedIcons.js';
34
32
 
33
+ const _moduleId = "vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution";
35
34
  registerAction2(class extends Action2 {
36
35
  constructor() {
37
36
  super({
38
37
  id: 'workbench.action.openWalkthrough',
39
- title: ( localize2WithPath(
40
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
41
- 'miWelcome',
42
- 'Welcome'
43
- )),
38
+ title: ( localize2WithPath(_moduleId, 0, 'Welcome')),
44
39
  category: Categories.Help,
45
40
  f1: true,
46
41
  menu: {
47
42
  id: MenuId.MenubarHelpMenu,
48
43
  group: '1_welcome',
49
44
  order: 1,
45
+ },
46
+ metadata: {
47
+ description: ( localize2WithPath(_moduleId, 1, 'Opens a Walkthrough to help you get started in VS Code.'))
50
48
  }
51
49
  });
52
50
  }
@@ -112,35 +110,23 @@ registerAction2(class extends Action2 {
112
110
  }
113
111
  }
114
112
  });
115
- ( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(GettingStartedInput.ID, GettingStartedInputSerializer);
116
- ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(GettingStartedPage, GettingStartedPage.ID, ( localizeWithPath(
117
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
118
- 'welcome',
119
- "Welcome"
120
- ))), [
121
- ( new SyncDescriptor(GettingStartedInput))
113
+ ( (Registry.as(EditorExtensions.EditorFactory))).registerEditorSerializer(GettingStartedInput.ID, GettingStartedInputSerializer);
114
+ ( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(GettingStartedPage, GettingStartedPage.ID, ( localizeWithPath(_moduleId, 2, "Welcome"))), [
115
+ ( (new SyncDescriptor(GettingStartedInput)))
122
116
  ]);
123
- const category = ( localize2WithPath(
124
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
125
- 'welcome',
126
- "Welcome"
127
- ));
117
+ const category = ( localize2WithPath(_moduleId, 2, "Welcome"));
128
118
  registerAction2(class extends Action2 {
129
119
  constructor() {
130
120
  super({
131
121
  id: 'welcome.goBack',
132
- title: ( localize2WithPath(
133
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
134
- 'welcome.goBack',
135
- 'Go Back'
136
- )),
122
+ title: ( localize2WithPath(_moduleId, 3, 'Go Back')),
137
123
  category,
138
124
  keybinding: {
139
125
  weight: 100 ,
140
126
  primary: 9 ,
141
127
  when: inWelcomeContext
142
128
  },
143
- precondition: ( ContextKeyExpr.equals('activeEditor', 'gettingStartedPage')),
129
+ precondition: ( (ContextKeyExpr.equals('activeEditor', 'gettingStartedPage'))),
144
130
  f1: true
145
131
  });
146
132
  }
@@ -169,11 +155,7 @@ registerAction2(class extends Action2 {
169
155
  constructor() {
170
156
  super({
171
157
  id: 'welcome.markStepComplete',
172
- title: ( localizeWithPath(
173
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
174
- 'welcome.markStepComplete',
175
- "Mark Step Complete"
176
- )),
158
+ title: ( localizeWithPath(_moduleId, 4, "Mark Step Complete")),
177
159
  category,
178
160
  });
179
161
  }
@@ -189,11 +171,7 @@ registerAction2(class extends Action2 {
189
171
  constructor() {
190
172
  super({
191
173
  id: 'welcome.markStepIncomplete',
192
- title: ( localizeWithPath(
193
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
194
- 'welcome.markStepInomplete',
195
- "Mark Step Incomplete"
196
- )),
174
+ title: ( localizeWithPath(_moduleId, 5, "Mark Step Incomplete")),
197
175
  category,
198
176
  });
199
177
  }
@@ -209,25 +187,23 @@ registerAction2(class extends Action2 {
209
187
  constructor() {
210
188
  super({
211
189
  id: 'welcome.showAllWalkthroughs',
212
- title: ( localize2WithPath(
213
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
214
- 'welcome.showAllWalkthroughs',
215
- 'Open Walkthrough...'
216
- )),
190
+ title: ( localize2WithPath(_moduleId, 6, 'Open Walkthrough...')),
217
191
  category,
218
192
  f1: true,
219
193
  });
220
194
  }
221
195
  async getQuickPickItems(contextService, gettingStartedService) {
222
196
  const categories = await gettingStartedService.getWalkthroughs();
223
- return ( categories
224
- .filter(c => contextService.contextMatchesRules(c.when))
225
- .map(x => ({
226
- id: x.id,
227
- label: x.title,
228
- detail: x.description,
229
- description: x.source,
230
- })));
197
+ return (
198
+ (categories
199
+ .filter(c => contextService.contextMatchesRules(c.when))
200
+ .map(x => ({
201
+ id: x.id,
202
+ label: x.title,
203
+ detail: x.description,
204
+ description: x.source,
205
+ })))
206
+ );
231
207
  }
232
208
  async run(accessor) {
233
209
  const commandService = accessor.get(ICommandService);
@@ -239,11 +215,7 @@ registerAction2(class extends Action2 {
239
215
  quickPick.canSelectMany = false;
240
216
  quickPick.matchOnDescription = true;
241
217
  quickPick.matchOnDetail = true;
242
- quickPick.placeholder = ( localizeWithPath(
243
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
244
- 'pickWalkthroughs',
245
- 'Select a walkthrough to open'
246
- ));
218
+ quickPick.placeholder = ( localizeWithPath(_moduleId, 7, 'Select a walkthrough to open'));
247
219
  quickPick.items = await this.getQuickPickItems(contextService, gettingStartedService);
248
220
  quickPick.busy = true;
249
221
  quickPick.onDidAccept(() => {
@@ -262,11 +234,11 @@ registerAction2(class extends Action2 {
262
234
  quickPick.busy = false;
263
235
  }
264
236
  });
265
- const WorkspacePlatform = ( new RawContextKey('workspacePlatform', undefined, ( localizeWithPath(
266
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
267
- 'workspacePlatform',
237
+ const WorkspacePlatform = ( (new RawContextKey('workspacePlatform', undefined, ( localizeWithPath(
238
+ _moduleId,
239
+ 8,
268
240
  "The platform of the current workspace, which in remote or serverless contexts may be different from the platform of the UI"
269
- ))));
241
+ )))));
270
242
  let WorkspacePlatformContribution = class WorkspacePlatformContribution {
271
243
  static { this.ID = 'workbench.contrib.workspacePlatform'; }
272
244
  constructor(extensionManagementServerService, remoteAgentService, contextService) {
@@ -302,12 +274,12 @@ let WorkspacePlatformContribution = class WorkspacePlatformContribution {
302
274
  });
303
275
  }
304
276
  };
305
- WorkspacePlatformContribution = ( __decorate([
306
- ( __param(0, IExtensionManagementServerService)),
307
- ( __param(1, IRemoteAgentService)),
308
- ( __param(2, IContextKeyService))
309
- ], WorkspacePlatformContribution));
310
- const configurationRegistry = ( Registry.as(Extensions.Configuration));
277
+ WorkspacePlatformContribution = ( (__decorate([
278
+ ( (__param(0, IExtensionManagementServerService))),
279
+ ( (__param(1, IRemoteAgentService))),
280
+ ( (__param(2, IContextKeyService)))
281
+ ], WorkspacePlatformContribution)));
282
+ const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
311
283
  configurationRegistry.registerConfiguration({
312
284
  ...workbenchConfigurationNodeBase,
313
285
  properties: {
@@ -316,8 +288,8 @@ configurationRegistry.registerConfiguration({
316
288
  type: 'boolean',
317
289
  default: true,
318
290
  description: ( localizeWithPath(
319
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
320
- 'workbench.welcomePage.walkthroughs.openOnInstall',
291
+ _moduleId,
292
+ 9,
321
293
  "When enabled, an extension's walkthrough will open upon install of the extension."
322
294
  ))
323
295
  },
@@ -326,41 +298,29 @@ configurationRegistry.registerConfiguration({
326
298
  'type': 'string',
327
299
  'enum': ['none', 'welcomePage', 'readme', 'newUntitledFile', 'welcomePageInEmptyWorkbench', 'terminal'],
328
300
  'enumDescriptions': [
301
+ ( localizeWithPath(_moduleId, 10, "Start without an editor.")),
329
302
  ( localizeWithPath(
330
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
331
- { comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.none' },
332
- "Start without an editor."
333
- )),
334
- ( localizeWithPath(
335
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
336
- { comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.welcomePage' },
303
+ _moduleId,
304
+ 11,
337
305
  "Open the Welcome page, with content to aid in getting started with VS Code and extensions."
338
306
  )),
339
307
  ( localizeWithPath(
340
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
341
- { comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.readme' },
308
+ _moduleId,
309
+ 12,
342
310
  "Open the README when opening a folder that contains one, fallback to 'welcomePage' otherwise. Note: This is only observed as a global configuration, it will be ignored if set in a workspace or folder configuration."
343
311
  )),
344
312
  ( localizeWithPath(
345
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
346
- { comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.newUntitledFile' },
313
+ _moduleId,
314
+ 13,
347
315
  "Open a new untitled text file (only applies when opening an empty window)."
348
316
  )),
349
- ( localizeWithPath(
350
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
351
- { comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.welcomePageInEmptyWorkbench' },
352
- "Open the Welcome page when opening an empty workbench."
353
- )),
354
- ( localizeWithPath(
355
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
356
- { comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.terminal' },
357
- "Open a new terminal in the editor area."
358
- )),
317
+ ( localizeWithPath(_moduleId, 14, "Open the Welcome page when opening an empty workbench.")),
318
+ ( localizeWithPath(_moduleId, 15, "Open a new terminal in the editor area.")),
359
319
  ],
360
320
  'default': 'welcomePage',
361
321
  'description': ( localizeWithPath(
362
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
363
- 'workbench.startupEditor',
322
+ _moduleId,
323
+ 16,
364
324
  "Controls which editor is shown at startup, if none are restored from the previous session."
365
325
  ))
366
326
  },
@@ -368,58 +328,13 @@ configurationRegistry.registerConfiguration({
368
328
  scope: 1 ,
369
329
  type: 'boolean',
370
330
  default: false,
371
- deprecationMessage: ( localizeWithPath(
372
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
373
- 'deprecationMessage',
374
- "Deprecated, use the global `workbench.reduceMotion`."
375
- )),
376
- description: ( localizeWithPath(
377
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
378
- 'workbench.welcomePage.preferReducedMotion',
379
- "When enabled, reduce motion in welcome page."
380
- ))
331
+ deprecationMessage: ( localizeWithPath(_moduleId, 17, "Deprecated, use the global `workbench.reduceMotion`.")),
332
+ description: ( localizeWithPath(_moduleId, 18, "When enabled, reduce motion in welcome page."))
381
333
  }
382
334
  }
383
335
  });
384
336
  registerWorkbenchContribution2(WorkspacePlatformContribution.ID, WorkspacePlatformContribution, 3 );
385
337
  registerWorkbenchContribution2(StartupPageEditorResolverContribution.ID, StartupPageEditorResolverContribution, 2 );
386
338
  registerWorkbenchContribution2(StartupPageRunnerContribution.ID, StartupPageRunnerContribution, 3 );
387
- registerAction2(class extends Action2 {
388
- constructor() {
389
- super({
390
- id: 'resetGettingStartedProgress',
391
- category: ( localize2WithPath(
392
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
393
- 'developer',
394
- "Developer"
395
- )),
396
- title: ( localize2WithPath(
397
- 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution',
398
- 'resetWelcomePageWalkthroughProgress',
399
- "Reset Welcome Page Walkthrough Progress"
400
- )),
401
- f1: true
402
- });
403
- }
404
- run(accessor) {
405
- const gettingStartedService = accessor.get(IWalkthroughsService);
406
- const storageService = accessor.get(IStorageService);
407
- storageService.store(hiddenEntriesConfigurationKey, JSON.stringify([]), 0 , 0 );
408
- storageService.store(walkthroughMetadataConfigurationKey, JSON.stringify([]), 0 , 0 );
409
- const memento = ( new Memento('gettingStartedService', accessor.get(IStorageService)));
410
- const record = memento.getMemento(0 , 0 );
411
- for (const key in record) {
412
- if (Object.prototype.hasOwnProperty.call(record, key)) {
413
- try {
414
- gettingStartedService.deprogressStep(key);
415
- }
416
- catch (e) {
417
- console.error(e);
418
- }
419
- }
420
- }
421
- memento.saveMemento();
422
- }
423
- });
424
339
 
425
340
  export { WorkspacePlatform };