@codingame/monaco-vscode-walkthrough-service-override 4.3.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 (48) hide show
  1. package/assets/commandPalette.svg +50 -0
  2. package/assets/dark-hc.png +0 -0
  3. package/assets/dark.png +0 -0
  4. package/assets/debug.svg +87 -0
  5. package/assets/extensions-web.svg +216 -0
  6. package/assets/extensions.svg +236 -0
  7. package/assets/git.svg +105 -0
  8. package/assets/languages.svg +88 -0
  9. package/assets/learn.svg +85 -0
  10. package/assets/light-hc.png +0 -0
  11. package/assets/light.png +0 -0
  12. package/assets/menuBar.svg +100 -0
  13. package/assets/openFolder.svg +91 -0
  14. package/assets/profiles.svg +47 -0
  15. package/assets/runTask.svg +42 -0
  16. package/assets/search.svg +48 -0
  17. package/assets/settings.svg +53 -0
  18. package/assets/settingsSync.svg +148 -0
  19. package/assets/shortcuts.svg +180 -0
  20. package/assets/terminal.svg +42 -0
  21. package/assets/workspaceTrust.svg +43 -0
  22. package/index.d.ts +1 -0
  23. package/index.js +1 -0
  24. package/package.json +23 -0
  25. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.js +421 -0
  26. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.js +1528 -0
  27. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors.js +48 -0
  28. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.js +263 -0
  29. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons.js +16 -0
  30. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +53 -0
  31. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedList.js +97 -0
  32. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css.js +6 -0
  33. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.js +218 -0
  34. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/all.png.js +8 -0
  35. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/all.svg.js +21 -0
  36. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile.js +37 -0
  37. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.js +53 -0
  38. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.js +63 -0
  39. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough.js +190 -0
  40. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/media/walkThroughPart.css.js +6 -0
  41. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution.js +39 -0
  42. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughActions.js +59 -0
  43. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput.js +115 -0
  44. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.js +431 -0
  45. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.js +76 -0
  46. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils.js +19 -0
  47. package/walkthrough.d.ts +5 -0
  48. package/walkthrough.js +21 -0
@@ -0,0 +1,218 @@
1
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
+ import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
3
+ import { coalesce } from 'vscode/vscode/vs/base/common/arrays';
4
+ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
5
+ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
6
+ import { onUnexpectedError } from 'vscode/vscode/vs/base/common/errors';
7
+ import { UNKNOWN_EMPTY_WINDOW_WORKSPACE, IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace';
8
+ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
9
+ import { IWorkingCopyBackupService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyBackup';
10
+ import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
11
+ import { IFileService } from 'vscode/vscode/vs/platform/files/common/files';
12
+ import { joinPath } from 'vscode/vscode/vs/base/common/resources';
13
+ import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
14
+ import { GettingStartedInput, gettingStartedInputTypeId } from './gettingStartedInput.js';
15
+ import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
16
+ import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
17
+ import { getTelemetryLevel } from 'vscode/vscode/vs/platform/telemetry/common/telemetryUtils';
18
+ import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService';
19
+ import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
20
+ import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification';
21
+ import { localizeWithPath } from 'vscode/vscode/vs/nls';
22
+ import { RegisteredEditorPriority, IEditorResolverService } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
23
+
24
+ const restoreWalkthroughsConfigurationKey = 'workbench.welcomePage.restorableWalkthroughs';
25
+ const configurationKey = 'workbench.startupEditor';
26
+ const oldConfigurationKey = 'workbench.welcome.enabled';
27
+ const telemetryOptOutStorageKey = 'workbench.telemetryOptOutShown';
28
+ let StartupPageEditorResolverContribution = class StartupPageEditorResolverContribution {
29
+ static { this.ID = 'workbench.contrib.startupPageEditorResolver'; }
30
+ constructor(instantiationService, editorResolverService) {
31
+ this.instantiationService = instantiationService;
32
+ editorResolverService.registerEditor(`${GettingStartedInput.RESOURCE.scheme}:/**`, {
33
+ id: GettingStartedInput.ID,
34
+ label: ( localizeWithPath(
35
+ 'vs/workbench/contrib/welcomeGettingStarted/browser/startupPage',
36
+ 'welcome.displayName',
37
+ "Welcome Page"
38
+ )),
39
+ priority: RegisteredEditorPriority.builtin,
40
+ }, {
41
+ singlePerResource: false,
42
+ canSupportResource: uri => uri.scheme === GettingStartedInput.RESOURCE.scheme,
43
+ }, {
44
+ createEditorInput: ({ resource, options }) => {
45
+ return {
46
+ editor: this.instantiationService.createInstance(GettingStartedInput, options),
47
+ options: {
48
+ ...options,
49
+ pinned: false
50
+ }
51
+ };
52
+ }
53
+ });
54
+ }
55
+ };
56
+ StartupPageEditorResolverContribution = ( __decorate([
57
+ ( __param(0, IInstantiationService)),
58
+ ( __param(1, IEditorResolverService))
59
+ ], StartupPageEditorResolverContribution));
60
+ let StartupPageRunnerContribution = class StartupPageRunnerContribution {
61
+ static { this.ID = 'workbench.contrib.startupPageRunner'; }
62
+ constructor(configurationService, editorService, workingCopyBackupService, fileService, contextService, lifecycleService, layoutService, productService, commandService, environmentService, storageService, logService, notificationService) {
63
+ this.configurationService = configurationService;
64
+ this.editorService = editorService;
65
+ this.workingCopyBackupService = workingCopyBackupService;
66
+ this.fileService = fileService;
67
+ this.contextService = contextService;
68
+ this.lifecycleService = lifecycleService;
69
+ this.layoutService = layoutService;
70
+ this.productService = productService;
71
+ this.commandService = commandService;
72
+ this.environmentService = environmentService;
73
+ this.storageService = storageService;
74
+ this.logService = logService;
75
+ this.notificationService = notificationService;
76
+ this.run().then(undefined, onUnexpectedError);
77
+ }
78
+ async run() {
79
+ await this.lifecycleService.when(3 );
80
+ if (this.productService.enableTelemetry
81
+ && this.productService.showTelemetryOptOut
82
+ && getTelemetryLevel(this.configurationService) !== 0
83
+ && !this.environmentService.skipWelcome
84
+ && !this.storageService.get(telemetryOptOutStorageKey, 0 )) {
85
+ this.storageService.store(telemetryOptOutStorageKey, true, 0 , 0 );
86
+ await this.openGettingStarted(true);
87
+ return;
88
+ }
89
+ if (this.tryOpenWalkthroughForFolder()) {
90
+ return;
91
+ }
92
+ const enabled = isStartupPageEnabled(this.configurationService, this.contextService, this.environmentService);
93
+ if (enabled && this.lifecycleService.startupKind !== 3 ) {
94
+ const hasBackups = await this.workingCopyBackupService.hasBackups();
95
+ if (hasBackups) {
96
+ return;
97
+ }
98
+ if (!this.editorService.activeEditor || this.layoutService.openedDefaultEditors) {
99
+ const startupEditorSetting = this.configurationService.inspect(configurationKey);
100
+ const isStartupEditorReadme = startupEditorSetting.value === 'readme';
101
+ const isStartupEditorUserReadme = startupEditorSetting.userValue === 'readme';
102
+ const isStartupEditorDefaultReadme = startupEditorSetting.defaultValue === 'readme';
103
+ if (isStartupEditorReadme && (!isStartupEditorUserReadme || !isStartupEditorDefaultReadme)) {
104
+ this.logService.warn(`Warning: 'workbench.startupEditor: readme' setting ignored due to being set somewhere other than user or default settings (user=${startupEditorSetting.userValue}, default=${startupEditorSetting.defaultValue})`);
105
+ }
106
+ const openWithReadme = isStartupEditorReadme && (isStartupEditorUserReadme || isStartupEditorDefaultReadme);
107
+ if (openWithReadme) {
108
+ await this.openReadme();
109
+ }
110
+ else if (startupEditorSetting.value === 'welcomePage' || startupEditorSetting.value === 'welcomePageInEmptyWorkbench') {
111
+ await this.openGettingStarted();
112
+ }
113
+ else if (startupEditorSetting.value === 'terminal') {
114
+ this.commandService.executeCommand("workbench.action.createTerminalEditor" );
115
+ }
116
+ }
117
+ }
118
+ }
119
+ tryOpenWalkthroughForFolder() {
120
+ const toRestore = this.storageService.get(restoreWalkthroughsConfigurationKey, 0 );
121
+ if (!toRestore) {
122
+ return false;
123
+ }
124
+ else {
125
+ const restoreData = JSON.parse(toRestore);
126
+ const currentWorkspace = this.contextService.getWorkspace();
127
+ if (restoreData.folder === UNKNOWN_EMPTY_WINDOW_WORKSPACE.id || restoreData.folder === ( currentWorkspace.folders[0].uri.toString())) {
128
+ this.editorService.openEditor({
129
+ resource: GettingStartedInput.RESOURCE,
130
+ options: { selectedCategory: restoreData.category, selectedStep: restoreData.step, pinned: false },
131
+ });
132
+ this.storageService.remove(restoreWalkthroughsConfigurationKey, 0 );
133
+ return true;
134
+ }
135
+ }
136
+ return false;
137
+ }
138
+ async openReadme() {
139
+ const readmes = coalesce(await Promise.all(( this.contextService.getWorkspace().folders.map(async (folder) => {
140
+ const folderUri = folder.uri;
141
+ const folderStat = await this.fileService.resolve(folderUri).catch(onUnexpectedError);
142
+ const files = folderStat?.children ? ( folderStat.children.map(child => child.name)).sort() : [];
143
+ const file = files.find(file => file.toLowerCase() === 'readme.md') || files.find(file => file.toLowerCase().startsWith('readme'));
144
+ if (file) {
145
+ return joinPath(folderUri, file);
146
+ }
147
+ else {
148
+ return undefined;
149
+ }
150
+ }))));
151
+ if (!this.editorService.activeEditor) {
152
+ if (readmes.length) {
153
+ const isMarkDown = (readme) => readme.path.toLowerCase().endsWith('.md');
154
+ await Promise.all([
155
+ this.commandService.executeCommand('markdown.showPreview', null, readmes.filter(isMarkDown), { locked: true }).catch(error => {
156
+ this.notificationService.error(( localizeWithPath(
157
+ 'vs/workbench/contrib/welcomeGettingStarted/browser/startupPage',
158
+ 'startupPage.markdownPreviewError',
159
+ 'Could not open markdown preview: {0}.\n\nPlease make sure the markdown extension is enabled.',
160
+ error.message
161
+ )));
162
+ }),
163
+ this.editorService.openEditors(( readmes.filter(readme => !isMarkDown(readme)).map(readme => ({ resource: readme })))),
164
+ ]);
165
+ }
166
+ else {
167
+ await this.openGettingStarted();
168
+ }
169
+ }
170
+ }
171
+ async openGettingStarted(showTelemetryNotice) {
172
+ const startupEditorTypeID = gettingStartedInputTypeId;
173
+ const editor = this.editorService.activeEditor;
174
+ if (editor?.typeId === startupEditorTypeID || ( this.editorService.editors.some(e => e.typeId === startupEditorTypeID))) {
175
+ return;
176
+ }
177
+ const options = editor ? { pinned: false, index: 0 } : { pinned: false };
178
+ {
179
+ this.editorService.openEditor({
180
+ resource: GettingStartedInput.RESOURCE,
181
+ options: { showTelemetryNotice, ...options },
182
+ });
183
+ }
184
+ }
185
+ };
186
+ StartupPageRunnerContribution = ( __decorate([
187
+ ( __param(0, IConfigurationService)),
188
+ ( __param(1, IEditorService)),
189
+ ( __param(2, IWorkingCopyBackupService)),
190
+ ( __param(3, IFileService)),
191
+ ( __param(4, IWorkspaceContextService)),
192
+ ( __param(5, ILifecycleService)),
193
+ ( __param(6, IWorkbenchLayoutService)),
194
+ ( __param(7, IProductService)),
195
+ ( __param(8, ICommandService)),
196
+ ( __param(9, IWorkbenchEnvironmentService)),
197
+ ( __param(10, IStorageService)),
198
+ ( __param(11, ILogService)),
199
+ ( __param(12, INotificationService))
200
+ ], StartupPageRunnerContribution));
201
+ function isStartupPageEnabled(configurationService, contextService, environmentService) {
202
+ if (environmentService.skipWelcome) {
203
+ return false;
204
+ }
205
+ const startupEditor = configurationService.inspect(configurationKey);
206
+ if (!startupEditor.userValue && !startupEditor.workspaceValue) {
207
+ const welcomeEnabled = configurationService.inspect(oldConfigurationKey);
208
+ if (welcomeEnabled.value !== undefined && welcomeEnabled.value !== null) {
209
+ return welcomeEnabled.value;
210
+ }
211
+ }
212
+ return startupEditor.value === 'welcomePage'
213
+ || startupEditor.value === 'readme' && (startupEditor.userValue === 'readme' || startupEditor.defaultValue === 'readme')
214
+ || (contextService.getWorkbenchState() === 1 && startupEditor.value === 'welcomePageInEmptyWorkbench')
215
+ || startupEditor.value === 'terminal';
216
+ }
217
+
218
+ export { StartupPageEditorResolverContribution, StartupPageRunnerContribution, restoreWalkthroughsConfigurationKey };
@@ -0,0 +1,8 @@
1
+ var pngAssets = {
2
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/dark-hc.png': new URL('../../../../../../../../assets/dark-hc.png', import.meta.url).href,
3
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/dark.png': new URL('../../../../../../../../assets/dark.png', import.meta.url).href,
4
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/light-hc.png': new URL('../../../../../../../../assets/light-hc.png', import.meta.url).href,
5
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/light.png': new URL('../../../../../../../../assets/light.png', import.meta.url).href
6
+ };
7
+
8
+ export { pngAssets as default };
@@ -0,0 +1,21 @@
1
+ var svgAssets = {
2
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/commandPalette.svg': new URL('../../../../../../../../assets/commandPalette.svg', import.meta.url).href,
3
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/debug.svg': new URL('../../../../../../../../assets/debug.svg', import.meta.url).href,
4
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/extensions-web.svg': new URL('../../../../../../../../assets/extensions-web.svg', import.meta.url).href,
5
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/extensions.svg': new URL('../../../../../../../../assets/extensions.svg', import.meta.url).href,
6
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/git.svg': new URL('../../../../../../../../assets/git.svg', import.meta.url).href,
7
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/languages.svg': new URL('../../../../../../../../assets/languages.svg', import.meta.url).href,
8
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/learn.svg': new URL('../../../../../../../../assets/learn.svg', import.meta.url).href,
9
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/menuBar.svg': new URL('../../../../../../../../assets/menuBar.svg', import.meta.url).href,
10
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/openFolder.svg': new URL('../../../../../../../../assets/openFolder.svg', import.meta.url).href,
11
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/profiles.svg': new URL('../../../../../../../../assets/profiles.svg', import.meta.url).href,
12
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/runTask.svg': new URL('../../../../../../../../assets/runTask.svg', import.meta.url).href,
13
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/search.svg': new URL('../../../../../../../../assets/search.svg', import.meta.url).href,
14
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/settings.svg': new URL('../../../../../../../../assets/settings.svg', import.meta.url).href,
15
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/settingsSync.svg': new URL('../../../../../../../../assets/settingsSync.svg', import.meta.url).href,
16
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/shortcuts.svg': new URL('../../../../../../../../assets/shortcuts.svg', import.meta.url).href,
17
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/terminal.svg': new URL('../../../../../../../../assets/terminal.svg', import.meta.url).href,
18
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/workspaceTrust.svg': new URL('../../../../../../../../assets/workspaceTrust.svg', import.meta.url).href
19
+ };
20
+
21
+ export { svgAssets as default };
@@ -0,0 +1,37 @@
1
+ import { escape } from 'vscode/vscode/vs/base/common/strings';
2
+ import { localizeWithPath } from 'vscode/vscode/vs/nls';
3
+
4
+ const profileArg = (profile) => encodeURIComponent(JSON.stringify({ profile }));
5
+ const imageSize = 400;
6
+ var notebookProfile = () => `
7
+ <vertically-centered>
8
+ <checklist>
9
+ <checkbox on-checked="command:notebook.setProfile?${profileArg('default')}" checked-on="config.notebook.cellFocusIndicator == 'border' && config.notebook.insertToolbarLocation == 'both' && config.notebook.globalToolbar == false && config.notebook.compactView == true && config.notebook.showCellStatusBar == 'visible'">
10
+ <img width="${imageSize}" src="./notebookThemes/default.png"/>
11
+ ${escape(( localizeWithPath(
12
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile',
13
+ 'default',
14
+ "Default"
15
+ )))}
16
+ </checkbox>
17
+ <checkbox on-checked="command:notebook.setProfile?${profileArg('jupyter')}" checked-on="config.notebook.cellFocusIndicator == 'gutter' && config.notebook.insertToolbarLocation == 'notebookToolbar' && config.notebook.globalToolbar == true && config.notebook.compactView == true && config.notebook.showCellStatusBar == 'visible'">
18
+ <img width="${imageSize}" src="./notebookThemes/jupyter.png"/>
19
+ ${escape(( localizeWithPath(
20
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile',
21
+ 'jupyter',
22
+ "Jupyter"
23
+ )))}
24
+ </checkbox>
25
+ <checkbox on-checked="command:notebook.setProfile?${profileArg('colab')}" checked-on="config.notebook.cellFocusIndicator == 'border' && config.notebook.insertToolbarLocation == 'betweenCells' && config.notebook.globalToolbar == false && config.notebook.compactView == false && config.notebook.showCellStatusBar == 'hidden'">
26
+ <img width="${imageSize}" src="./notebookThemes/colab.png"/>
27
+ ${escape(( localizeWithPath(
28
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile',
29
+ 'colab',
30
+ "Colab"
31
+ )))}
32
+ </checkbox>
33
+ </checklist>
34
+ </vertically-centered>
35
+ `;
36
+
37
+ export { notebookProfile as default };
@@ -0,0 +1,53 @@
1
+ import { escape } from 'vscode/vscode/vs/base/common/strings';
2
+ import { localizeWithPath } from 'vscode/vscode/vs/nls';
3
+ import { ThemeSettingDefaults } from 'vscode/vscode/vs/workbench/services/themes/common/workbenchThemeService';
4
+
5
+ var theme_picker = () => `
6
+ <checklist>
7
+ <div class="theme-picker-row">
8
+ <checkbox when-checked="setTheme:${ThemeSettingDefaults.COLOR_THEME_DARK}" checked-on="config.workbench.colorTheme == '${ThemeSettingDefaults.COLOR_THEME_DARK}'">
9
+ <img width="200" src="./dark.png"/>
10
+ ${escape(( localizeWithPath(
11
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker',
12
+ 'dark',
13
+ "Dark Modern"
14
+ )))}
15
+ </checkbox>
16
+ <checkbox when-checked="setTheme:${ThemeSettingDefaults.COLOR_THEME_LIGHT}" checked-on="config.workbench.colorTheme == '${ThemeSettingDefaults.COLOR_THEME_LIGHT}'">
17
+ <img width="200" src="./light.png"/>
18
+ ${escape(( localizeWithPath(
19
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker',
20
+ 'light',
21
+ "Light Modern"
22
+ )))}
23
+ </checkbox>
24
+ </div>
25
+ <div class="theme-picker-row">
26
+ <checkbox when-checked="setTheme:${ThemeSettingDefaults.COLOR_THEME_HC_DARK}" checked-on="config.workbench.colorTheme == '${ThemeSettingDefaults.COLOR_THEME_HC_DARK}'">
27
+ <img width="200" src="./dark-hc.png"/>
28
+ ${escape(( localizeWithPath(
29
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker',
30
+ 'HighContrast',
31
+ "Dark High Contrast"
32
+ )))}
33
+ </checkbox>
34
+ <checkbox when-checked="setTheme:${ThemeSettingDefaults.COLOR_THEME_HC_LIGHT}" checked-on="config.workbench.colorTheme == '${ThemeSettingDefaults.COLOR_THEME_HC_LIGHT}'">
35
+ <img width="200" src="./light-hc.png"/>
36
+ ${escape(( localizeWithPath(
37
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker',
38
+ 'HighContrastLight',
39
+ "Light High Contrast"
40
+ )))}
41
+ </checkbox>
42
+ </div>
43
+ </checklist>
44
+ <checkbox class="theme-picker-link" when-checked="command:workbench.action.selectTheme" checked-on="false">
45
+ ${escape(( localizeWithPath(
46
+ 'vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker',
47
+ 'seeMore',
48
+ "See More Themes..."
49
+ )))}
50
+ </checkbox>
51
+ `;
52
+
53
+ export { theme_picker as default };
@@ -0,0 +1,63 @@
1
+ import 'vscode/vscode/vs/base/common/platform';
2
+ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
3
+ import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
4
+ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
5
+ import { WalkThroughInput } from '../walkThroughInput.js';
6
+ import { FileAccess, Schemas } from 'vscode/vscode/vs/base/common/network';
7
+ import { Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
8
+ import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
9
+
10
+ const typeId = 'workbench.editors.walkThroughInput';
11
+ const inputOptions = {
12
+ typeId,
13
+ name: ( localizeWithPath(
14
+ 'vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough',
15
+ 'editorWalkThrough.title',
16
+ "Editor Playground"
17
+ )),
18
+ resource: ( FileAccess.asBrowserUri(
19
+ 'vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough.md'
20
+ ))
21
+ .with({
22
+ scheme: Schemas.walkThrough,
23
+ query: JSON.stringify({ moduleId: 'vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough' })
24
+ }),
25
+ telemetryFrom: 'walkThrough'
26
+ };
27
+ class EditorWalkThroughAction extends Action2 {
28
+ static { this.ID = 'workbench.action.showInteractivePlayground'; }
29
+ static { this.LABEL = ( localize2WithPath(
30
+ 'vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough',
31
+ 'editorWalkThrough',
32
+ 'Interactive Editor Playground'
33
+ )); }
34
+ constructor() {
35
+ super({
36
+ id: EditorWalkThroughAction.ID,
37
+ title: EditorWalkThroughAction.LABEL,
38
+ category: Categories.Help,
39
+ f1: true
40
+ });
41
+ }
42
+ run(serviceAccessor) {
43
+ const editorService = serviceAccessor.get(IEditorService);
44
+ const instantiationService = serviceAccessor.get(IInstantiationService);
45
+ const input = instantiationService.createInstance(WalkThroughInput, inputOptions);
46
+ return editorService.openEditor(input, { pinned: true })
47
+ .then(() => void (0));
48
+ }
49
+ }
50
+ class EditorWalkThroughInputSerializer {
51
+ static { this.ID = typeId; }
52
+ canSerialize(editorInput) {
53
+ return true;
54
+ }
55
+ serialize(editorInput) {
56
+ return '';
57
+ }
58
+ deserialize(instantiationService) {
59
+ return instantiationService.createInstance(WalkThroughInput, inputOptions);
60
+ }
61
+ }
62
+
63
+ export { EditorWalkThroughAction, EditorWalkThroughInputSerializer };
@@ -0,0 +1,190 @@
1
+ import { isWeb } from 'vscode/vscode/vs/base/common/platform';
2
+ import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
3
+
4
+ function content(accessor) {
5
+ const isServerless = isWeb && !accessor.get(IWorkbenchEnvironmentService).remoteAuthority;
6
+ return `
7
+ ## Interactive Editor Playground
8
+ The core editor in VS Code is packed with features. This page highlights a number of them and lets you interactively try them out through the use of a number of embedded editors. For full details on the editor features for VS Code and more head over to our [documentation](command:workbench.action.openDocumentationUrl).
9
+
10
+ * [Multi-cursor Editing](#multi-cursor-editing) - block selection, select all occurrences, add additional cursors and more.
11
+ * [IntelliSense](#intellisense) - get code assistance and parameter suggestions for your code and external modules.
12
+ * [Line Actions](#line-actions) - quickly move lines around to re-order your code.${!isServerless ? `
13
+ * [Rename Refactoring](#rename-refactoring) - quickly rename symbols across your code base.` : ''}
14
+ * [Formatting](#formatting) - keep your code looking great with inbuilt document & selection formatting.
15
+ * [Code Folding](#code-folding) - focus on the most relevant parts of your code by folding other areas.
16
+ * [Errors and Warnings](#errors-and-warnings) - see errors and warnings as you type.
17
+ * [Snippets](#snippets) - spend less time typing with snippets.
18
+ * [Emmet](#emmet) - integrated Emmet support takes HTML and CSS editing to the next level.
19
+ * [JavaScript Type Checking](#javascript-type-checking) - perform type checking on your JavaScript file using TypeScript with zero configuration.
20
+
21
+
22
+
23
+ ### Multi-Cursor Editing
24
+ Using multiple cursors allows you to edit multiple parts of the document at once, greatly improving your productivity. Try the following actions in the code block below:
25
+ 1. Box Selection - press <span class="mac-only windows-only">any combination of kb(cursorColumnSelectDown), kb(cursorColumnSelectRight), kb(cursorColumnSelectUp), kb(cursorColumnSelectLeft) to select a block of text. You can also press</span> <span class="shortcut mac-only">|⇧⌥|</span><span class="shortcut windows-only linux-only">|Shift+Alt|</span> while selecting text with the mouse or drag-select using the middle mouse button.
26
+ 2. Add a cursor - press kb(editor.action.insertCursorAbove) to add a new cursor above, or kb(editor.action.insertCursorBelow) to add a new cursor below. You can also use your mouse with <span class="shortcut"><span class="multi-cursor-modifier"></span>+Click</span> to add a cursor anywhere.
27
+ 3. Create cursors on all occurrences of a string - select one instance of a string e.g. |background-color| and press kb(editor.action.selectHighlights). Now you can replace all instances by simply typing.
28
+
29
+ That is the tip of the iceberg for multi-cursor editing. Have a look at the selection menu and our handy [keyboard reference guide](command:workbench.action.keybindingsReference) for additional actions.
30
+
31
+ |||css
32
+ #p1 {background-color: #ff0000;} /* red in HEX format */
33
+ #p2 {background-color: hsl(120, 100%, 50%);} /* green in HSL format */
34
+ #p3 {background-color: rgba(0, 4, 255, 0.733);} /* blue with alpha channel in RGBA format */
35
+ |||
36
+
37
+ > **CSS Tip:** You may have noticed in the example above we also provide color swatches inline for CSS, additionally if you hover over an element such as |#p1| we will show how this is represented in HTML. These swatches also act as color pickers that allow you to easily change a color value. A simple example of some language-specific editor features.
38
+
39
+ ### IntelliSense
40
+
41
+ Visual Studio Code comes with the powerful IntelliSense for JavaScript and TypeScript pre-installed. In the below example, position the text cursor right after the dot and press kb(editor.action.triggerSuggest) to invoke IntelliSense. Notice how the suggestions come from the Canvas API.
42
+
43
+ |||js
44
+ const canvas = document.querySelector('canvas');
45
+ const context = canvas.getContext('2d');
46
+
47
+ context.strokeStyle = 'blue';
48
+ context.
49
+ |||
50
+
51
+ >**Tip:** While we ship JavaScript and TypeScript support out of the box other languages can be upgraded with better IntelliSense through one of the many [extensions](command:workbench.extensions.action.showPopularExtensions).
52
+
53
+
54
+ ### Line Actions
55
+ Since it's very common to work with the entire text in a line we provide a set of useful shortcuts to help with this.
56
+ 1. <span class="mac-only windows-only">Copy a line and insert it above or below the current position with kb(editor.action.copyLinesDownAction) or kb(editor.action.copyLinesUpAction) respectively.</span><span class="linux-only">Copy the entire current line when no text is selected with kb(editor.action.clipboardCopyAction).</span>
57
+ 2. Move an entire line or selection of lines up or down with kb(editor.action.moveLinesUpAction) and kb(editor.action.moveLinesDownAction) respectively.
58
+ 3. Delete the entire line with kb(editor.action.deleteLines).
59
+
60
+ |||json
61
+ {
62
+ "name": "John",
63
+ "age": 31,
64
+ "city": "New York"
65
+ }
66
+ |||
67
+
68
+ >**Tip:** Another very common task is to comment out a block of code - you can toggle commenting by pressing kb(editor.action.commentLine).
69
+
70
+
71
+ ${!isServerless ? `
72
+ ### Rename Refactoring
73
+ It's easy to rename a symbol such as a function name or variable name. Hit kb(editor.action.rename) while in the symbol |Book| to rename all instances - this will occur across all files in a project. You also have |Rename Symbol| in the right-click context menu.
74
+
75
+ |||js
76
+ // Reference the function
77
+ new Book("War of the Worlds", "H G Wells");
78
+ new Book("The Martian", "Andy Weir");
79
+
80
+ /**
81
+ * Represents a book.
82
+ *
83
+ * @param {string} title Title of the book
84
+ * @param {string} author Who wrote the book
85
+ */
86
+ function Book(title, author) {
87
+ this.title = title;
88
+ this.author = author;
89
+ }
90
+ |||
91
+
92
+ > **JSDoc Tip:** VS Code's IntelliSense uses JSDoc comments to provide richer suggestions. The types and documentation from JSDoc comments show up when you hover over a reference to |Book| or in IntelliSense when you create a new instance of |Book|.
93
+
94
+ ` : ''}
95
+ ### Formatting
96
+ Keeping your code looking great is hard without a good formatter. Luckily it's easy to format content, either for the entire document with kb(editor.action.formatDocument) or for the current selection with kb(editor.action.formatSelection). Both of these options are also available through the right-click context menu.
97
+
98
+ |||js
99
+ const cars = ["🚗", "🚙", "🚕"];
100
+
101
+ for (const car of cars){
102
+ // Drive the car
103
+ console.log(|This is the car \${car}|);
104
+ }
105
+ |||
106
+
107
+ >**Tip:** Additional formatters are available in the [extension gallery](command:workbench.extensions.action.showPopularExtensions). Formatting support can also be configured via [settings](command:workbench.action.openGlobalSettings) e.g. enabling |editor.formatOnSave|.
108
+
109
+
110
+ ### Code Folding
111
+ In a large file it can often be useful to collapse sections of code to increase readability. To do this, you can simply press kb(editor.fold) to fold or press kb(editor.unfold) to unfold the ranges at the current cursor position. Folding can also be done with the down and right angle bracket icons in the left gutter. To fold all sections use kb(editor.foldAll) or to unfold all use kb(editor.unfoldAll).
112
+
113
+ |||html
114
+ <div>
115
+ <header>
116
+ <ul>
117
+ <li><a href=""></a></li>
118
+ <li><a href=""></a></li>
119
+ </ul>
120
+ </header>
121
+ <footer>
122
+ <p></p>
123
+ </footer>
124
+ </div>
125
+ |||
126
+
127
+ >**Tip:** Folding is based on indentation and as a result can apply to all languages. Simply indent your code to create a foldable section you can fold a certain number of levels with shortcuts like kb(editor.foldLevel1) through to kb(editor.foldLevel5).
128
+
129
+ ### Errors and Warnings
130
+ Errors and warnings are highlighted as you edit your code with squiggles. In the sample below you can see a number of syntax errors. By pressing kb(editor.action.marker.nextInFiles) you can navigate across them in sequence and see the detailed error message. As you correct them the squiggles and scrollbar indicators will update.
131
+
132
+ |||js
133
+ // This code has a few syntax errors
134
+ Console.log(add(1, 1.5));
135
+
136
+
137
+ function Add(a, b)
138
+ return a + b;
139
+ }
140
+ |||
141
+
142
+
143
+ ### Snippets
144
+ You can greatly accelerate your editing through the use of snippets. Simply start typing |try| and select |trycatch| from the suggestion list and press kb(insertSnippet) to create a |try|->|catch| block. Your cursor will be placed on the text |error| for easy editing. If more than one parameter exists then press kb(jumpToNextSnippetPlaceholder) to jump to it.
145
+
146
+ |||js
147
+
148
+ |||
149
+
150
+ >**Tip:** The [extension gallery](command:workbench.extensions.action.showPopularExtensions) includes snippets for almost every framework and language imaginable. You can also create your own [user-defined snippets](command:workbench.action.openSnippets).
151
+
152
+
153
+ ### Emmet
154
+ Emmet takes the snippets idea to a whole new level: you can type CSS-like expressions that can be dynamically parsed, and produce output depending on what you type in the abbreviation. Try it by selecting |Emmet: Expand Abbreviation| from the |Edit| menu with the cursor at the end of a valid Emmet abbreviation or snippet and the expansion will occur.
155
+
156
+ |||html
157
+ ul>li.item$*5
158
+ |||
159
+
160
+ >**Tip:** The [Emmet cheat sheet](https://docs.emmet.io/cheat-sheet/) is a great source of Emmet syntax suggestions. To expand Emmet abbreviations and snippets using the |tab| key use the |emmet.triggerExpansionOnTab| [setting](command:workbench.action.openGlobalSettings). Check out the docs on [Emmet in VS Code](https://code.visualstudio.com/docs/editor/emmet) to learn more.
161
+
162
+
163
+
164
+ ### JavaScript Type Checking
165
+ Sometimes type checking your JavaScript code can help you spot mistakes you might have not caught otherwise. You can run the TypeScript type checker against your existing JavaScript code by simply adding a |// @ts-check| comment to the top of your file.
166
+
167
+ |||js
168
+ // @ts-nocheck
169
+
170
+ let easy = true;
171
+ easy = 42;
172
+ |||
173
+
174
+ >**Tip:** You can also enable the checks workspace or application wide by adding |"js/ts.implicitProjectConfig.checkJs": true| to your workspace or user settings and explicitly ignoring files or lines using |// @ts-nocheck| and |// @ts-expect-error|. Check out the docs on [JavaScript in VS Code](https://code.visualstudio.com/docs/languages/javascript) to learn more.
175
+
176
+
177
+ ## Thanks!
178
+ Well if you have got this far then you will have touched on some of the editing features in Visual Studio Code. But don't stop now :) We have lots of additional [documentation](https://code.visualstudio.com/docs), [introductory videos](https://code.visualstudio.com/docs/getstarted/introvideos) and [tips and tricks](https://go.microsoft.com/fwlink/?linkid=852118) for the product that will help you learn how to use it. And while you are here, here are a few additional things you can try:
179
+ - Open the Integrated Terminal by pressing kb(workbench.action.terminal.toggleTerminal), then see what's possible by [reviewing the terminal documentation](https://code.visualstudio.com/docs/editor/integrated-terminal)
180
+ - Work with version control by pressing kb(workbench.view.scm). Understand how to stage, commit, change branches, and view diffs and more by reviewing the [version control documentation](https://code.visualstudio.com/docs/editor/versioncontrol)
181
+ - Browse thousands of extensions in our integrated gallery by pressing kb(workbench.view.extensions). The [documentation](https://code.visualstudio.com/docs/editor/extension-gallery) will show you how to see the most popular extensions, disable installed ones and more.
182
+
183
+ That's all for now,
184
+
185
+ Happy Coding! 🎉
186
+
187
+ `.replace(/\|/g, '`');
188
+ }
189
+
190
+ export { content as default };
@@ -0,0 +1,6 @@
1
+ import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css.js';
2
+
3
+ var css = ".monaco-workbench .part.editor>.content .walkThroughContent{box-sizing:border-box;height:inherit;line-height:22px;padding:10px 20px;user-select:auto;-webkit-user-select:initial}.monaco-workbench .part.editor>.content .walkThroughContent img{max-height:100%;max-width:100%}.monaco-workbench .part.editor>.content .walkThroughContent a{text-decoration:none}.monaco-workbench .part.editor>.content .walkThroughContent a:focus,.monaco-workbench .part.editor>.content .walkThroughContent input:focus,.monaco-workbench .part.editor>.content .walkThroughContent select:focus,.monaco-workbench .part.editor>.content .walkThroughContent textarea:focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-workbench .part.editor>.content .walkThroughContent hr{border:0;border-bottom:2px solid;height:2px}.monaco-workbench .part.editor>.content .walkThroughContent h1,.monaco-workbench .part.editor>.content .walkThroughContent h2,.monaco-workbench .part.editor>.content .walkThroughContent h3{font-weight:lighter;margin-bottom:10px;margin-top:20px}.monaco-workbench .part.editor>.content .walkThroughContent h1{border-bottom-style:solid;border-bottom-width:1px;font-size:40px;line-height:1.2;margin-bottom:15px;padding-bottom:.3em}.monaco-workbench .part.editor>.content .walkThroughContent h2{font-size:30px;margin-top:30px}.monaco-workbench .part.editor>.content .walkThroughContent h3{font-size:22px}.monaco-workbench .part.editor>.content .walkThroughContent h4{font-size:12px;margin-bottom:10px;margin-top:30px;text-transform:uppercase}.monaco-workbench .part.editor>.content .walkThroughContent a:hover{text-decoration:underline}.monaco-workbench .part.editor>.content .walkThroughContent table{border-collapse:collapse}.monaco-workbench .part.editor>.content .walkThroughContent table>thead>tr>th{border-bottom:1px solid;text-align:left}.monaco-workbench .part.editor>.content .walkThroughContent table>tbody>tr>td,.monaco-workbench .part.editor>.content .walkThroughContent table>tbody>tr>th,.monaco-workbench .part.editor>.content .walkThroughContent table>thead>tr>td,.monaco-workbench .part.editor>.content .walkThroughContent table>thead>tr>th{padding:5px 10px}.monaco-workbench .part.editor>.content .walkThroughContent table>tbody>tr+tr>td{border-top:1px solid}.monaco-workbench .part.editor>.content .walkThroughContent .shortcut,.monaco-workbench .part.editor>.content .walkThroughContent code{font-family:var(--monaco-monospace-font);font-size:14px;line-height:19px}.monaco-workbench .part.editor>.content .walkThroughContent blockquote{background:var(--vscode-textBlockQuote-background);border-left:5px solid;border-color:var(--vscode-textBlockQuote-border);margin:0 7px 0 5px;padding:0 16px 0 10px}.monaco-workbench .part.editor>.content .walkThroughContent .monaco-tokenized-source{white-space:pre}.file-icons-enabled .show-file-icons .vs_code_editor_walkthrough\\.md-name-file-icon.md-ext-file-icon.ext-file-icon.markdown-lang-file-icon.file-icon:before{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGQ9Ik0xMDI0IDEwMjRIMFYwaDEwMjR2MTAyNHoiIHN0eWxlPSJmaWxsOiNmNmY2ZjY7ZmlsbC1vcGFjaXR5OjAiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTAyNCA4NS4zMzN2ODUzLjMzM0gwVjg1LjMzM2gxMDI0eiIgc3R5bGU9ImZpbGw6I2ZmZiIvPjxwYXRoIGQ9Ik0wIDg1LjMzM2gyOTguNjY3djg1My4zMzNIMFY4NS4zMzN6bTEwMjQgMHY4NTMuMzMzSDM4NFY4NS4zMzNoNjQwem0tNTU0LjY2NyAxNjBoMzQxLjMzM3YtNjRINDY5LjMzM3Y2NHptMzQxLjMzNCA1MzMuMzM0SDQ2OS4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0xMjgtMTQ5LjMzNEg1OTcuMzMzdjY0aDM0MS4zMzNsLjAwMS02NHptMC0xNDkuMzMzSDU5Ny4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0wLTE0OS4zMzNINTk3LjMzM3Y2NGgzNDEuMzMzbC4wMDEtNjR6IiBzdHlsZT0iZmlsbDojMTY3YWJmIi8+PC9zdmc+\");content:\" \"}.monaco-workbench .part.editor>.content .walkThroughContent .linux-only,.monaco-workbench .part.editor>.content .walkThroughContent .mac-only,.monaco-workbench .part.editor>.content .walkThroughContent .windows-only{display:none}.monaco-workbench.linux .part.editor>.content .walkThroughContent .linux-only,.monaco-workbench.mac .part.editor>.content .walkThroughContent .mac-only,.monaco-workbench.windows .part.editor>.content .walkThroughContent .windows-only{display:initial}.monaco-workbench.hc-black .part.editor>.content .walkThroughContent .monaco-editor,.monaco-workbench.hc-light .part.editor>.content .walkThroughContent .monaco-editor{border-style:solid;border-width:1px}.monaco-workbench .part.editor>.content .walkThroughContent a[href]{color:var(--vscode-textLink-foreground)}.monaco-workbench .part.editor>.content .walkThroughContent a:hover,.monaco-workbench .part.editor>.content .walkThroughContent a[href]:active{color:var(--vscode-textLink-activeForeground)}.monaco-workbench .part.editor>.content .walkThroughContent a[href]:focus{outline-color:var(--vscode-focusBorder)}.monaco-workbench .part.editor>.content .walkThroughContent .shortcut,.monaco-workbench .part.editor>.content .walkThroughContent code{color:var(--vscode-textPreformat-foreground)}.monaco-workbench .part.editor>.content .walkThroughContent .monaco-editor{border-color:var(--vscode-contrastBorder)}.monaco-workbench .part.editor>.content .walkThroughContent .margin-view-overlays,.monaco-workbench .part.editor>.content .walkThroughContent .monaco-editor-background{background:var(--vscode-walkThrough-embeddedEditorBackground)}";
4
+ n(css,{});
5
+
6
+ export { css, css as default };