@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.
- package/assets/commandPalette.svg +50 -0
- package/assets/dark-hc.png +0 -0
- package/assets/dark.png +0 -0
- package/assets/debug.svg +87 -0
- package/assets/extensions-web.svg +216 -0
- package/assets/extensions.svg +236 -0
- package/assets/git.svg +105 -0
- package/assets/languages.svg +88 -0
- package/assets/learn.svg +85 -0
- package/assets/light-hc.png +0 -0
- package/assets/light.png +0 -0
- package/assets/menuBar.svg +100 -0
- package/assets/openFolder.svg +91 -0
- package/assets/profiles.svg +47 -0
- package/assets/runTask.svg +42 -0
- package/assets/search.svg +48 -0
- package/assets/settings.svg +53 -0
- package/assets/settingsSync.svg +148 -0
- package/assets/shortcuts.svg +180 -0
- package/assets/terminal.svg +42 -0
- package/assets/workspaceTrust.svg +43 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +23 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.js +421 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.js +1528 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors.js +48 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.js +263 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons.js +16 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +53 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedList.js +97 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.js +218 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/all.png.js +8 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/all.svg.js +21 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile.js +37 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.js +53 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.js +63 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough.js +190 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/media/walkThroughPart.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution.js +39 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughActions.js +59 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput.js +115 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.js +431 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.js +76 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils.js +19 -0
- package/walkthrough.d.ts +5 -0
- package/walkthrough.js +21 -0
package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
+
import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
3
|
+
import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
|
|
4
|
+
import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
|
|
5
|
+
import marked_1 from 'vscode/external/vscode-marked/lib/marked.esm.js';
|
|
6
|
+
import { Schemas, FileAccess } from 'vscode/vscode/vs/base/common/network';
|
|
7
|
+
import { Range } from 'vscode/vscode/vs/editor/common/core/range';
|
|
8
|
+
import { createTextBufferFactory } from 'vscode/vscode/vs/editor/common/model/textModel';
|
|
9
|
+
import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
|
|
10
|
+
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
|
+
|
|
12
|
+
async function requireToContent(instantiationService, resource) {
|
|
13
|
+
if (!resource.query) {
|
|
14
|
+
throw new Error('Welcome: invalid resource');
|
|
15
|
+
}
|
|
16
|
+
const query = JSON.parse(resource.query);
|
|
17
|
+
if (!query.moduleId) {
|
|
18
|
+
throw new Error('Welcome: invalid resource');
|
|
19
|
+
}
|
|
20
|
+
const content = await FileAccess.toModuleContent(query.moduleId);
|
|
21
|
+
return instantiationService.invokeFunction(content);
|
|
22
|
+
}
|
|
23
|
+
let WalkThroughSnippetContentProvider = class WalkThroughSnippetContentProvider {
|
|
24
|
+
static { this.ID = 'workbench.contrib.walkThroughSnippetContentProvider'; }
|
|
25
|
+
constructor(textModelResolverService, languageService, modelService, instantiationService) {
|
|
26
|
+
this.textModelResolverService = textModelResolverService;
|
|
27
|
+
this.languageService = languageService;
|
|
28
|
+
this.modelService = modelService;
|
|
29
|
+
this.instantiationService = instantiationService;
|
|
30
|
+
this.loads = ( new Map());
|
|
31
|
+
this.textModelResolverService.registerTextModelContentProvider(Schemas.walkThroughSnippet, this);
|
|
32
|
+
}
|
|
33
|
+
async textBufferFactoryFromResource(resource) {
|
|
34
|
+
let ongoing = this.loads.get(( resource.toString()));
|
|
35
|
+
if (!ongoing) {
|
|
36
|
+
ongoing = requireToContent(this.instantiationService, resource)
|
|
37
|
+
.then(content => createTextBufferFactory(content))
|
|
38
|
+
.finally(() => this.loads.delete(( resource.toString())));
|
|
39
|
+
this.loads.set(( resource.toString()), ongoing);
|
|
40
|
+
}
|
|
41
|
+
return ongoing;
|
|
42
|
+
}
|
|
43
|
+
async provideTextContent(resource) {
|
|
44
|
+
const factory = await this.textBufferFactoryFromResource(resource.with({ fragment: '' }));
|
|
45
|
+
let codeEditorModel = this.modelService.getModel(resource);
|
|
46
|
+
if (!codeEditorModel) {
|
|
47
|
+
const j = parseInt(resource.fragment);
|
|
48
|
+
let i = 0;
|
|
49
|
+
const renderer = new marked_1.Renderer();
|
|
50
|
+
renderer.code = (code, lang) => {
|
|
51
|
+
i++;
|
|
52
|
+
const languageId = typeof lang === 'string' ? this.languageService.getLanguageIdByLanguageName(lang) || '' : '';
|
|
53
|
+
const languageSelection = this.languageService.createById(languageId);
|
|
54
|
+
const model = this.modelService.createModel(code, languageSelection, resource.with({ fragment: `${i}.${lang}` }));
|
|
55
|
+
if (i === j) {
|
|
56
|
+
codeEditorModel = model;
|
|
57
|
+
}
|
|
58
|
+
return '';
|
|
59
|
+
};
|
|
60
|
+
const textBuffer = factory.create(1 ).textBuffer;
|
|
61
|
+
const lineCount = textBuffer.getLineCount();
|
|
62
|
+
const range = ( new Range(1, 1, lineCount, textBuffer.getLineLength(lineCount) + 1));
|
|
63
|
+
const markdown = textBuffer.getValueInRange(range, 0 );
|
|
64
|
+
marked_1(markdown, { renderer });
|
|
65
|
+
}
|
|
66
|
+
return assertIsDefined(codeEditorModel);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
WalkThroughSnippetContentProvider = ( __decorate([
|
|
70
|
+
( __param(0, ITextModelService)),
|
|
71
|
+
( __param(1, ILanguageService)),
|
|
72
|
+
( __param(2, IModelService)),
|
|
73
|
+
( __param(3, IInstantiationService))
|
|
74
|
+
], WalkThroughSnippetContentProvider));
|
|
75
|
+
|
|
76
|
+
export { WalkThroughSnippetContentProvider, requireToContent };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { registerColor } from 'vscode/vscode/vs/platform/theme/common/colorUtils';
|
|
2
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
|
|
3
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/chartsColors';
|
|
4
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/editorColors';
|
|
5
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/inputColors';
|
|
6
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/listColors';
|
|
7
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/menuColors';
|
|
8
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/minimapColors';
|
|
9
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
|
|
10
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
11
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
12
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
13
|
+
import { Color, RGBA } from 'vscode/vscode/vs/base/common/color';
|
|
14
|
+
|
|
15
|
+
registerColor('walkThrough.embeddedEditorBackground', { dark: ( new Color(( new RGBA(0, 0, 0, .4)))), light: '#f4f4f4', hcDark: null, hcLight: null }, ( localizeWithPath(
|
|
16
|
+
'vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils',
|
|
17
|
+
'walkThrough.embeddedEditorBackground',
|
|
18
|
+
'Background color for the embedded editors on the Interactive Playground.'
|
|
19
|
+
)));
|
package/walkthrough.d.ts
ADDED
package/walkthrough.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
2
|
+
import { IWalkthroughsService, WalkthroughsService } from 'vscode/vscode/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService';
|
|
3
|
+
import './vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.js';
|
|
4
|
+
import './vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution.js';
|
|
5
|
+
import svgAssets from './vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/all.svg.js';
|
|
6
|
+
import pngAssets from './vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/all.png.js';
|
|
7
|
+
import { FileAccess } from 'vscode/vscode/vs/base/common/network';
|
|
8
|
+
import { registerAssets } from 'vscode/assets';
|
|
9
|
+
|
|
10
|
+
registerAssets(svgAssets);
|
|
11
|
+
registerAssets(pngAssets);
|
|
12
|
+
FileAccess.registerModuleContentProvider('vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough', () => import('./vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough.js').then(module => module.default ?? module));
|
|
13
|
+
FileAccess.registerModuleContentProvider('vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker', () => import('./vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.js').then(module => module.default ?? module));
|
|
14
|
+
FileAccess.registerModuleContentProvider('vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile', () => import('./vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile.js').then(module => module.default ?? module));
|
|
15
|
+
function getServiceOverride() {
|
|
16
|
+
return {
|
|
17
|
+
[( IWalkthroughsService.toString())]: new SyncDescriptor(WalkthroughsService, [], true)
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { getServiceOverride as default };
|