@codingame/monaco-vscode-walkthrough-service-override 11.1.2 → 12.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.
- package/assets/multi-file-edits.svg +513 -0
- package/index.d.ts +2 -1
- package/index.js +19 -1
- package/package.json +24 -8
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.js +67 -66
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.d.ts +146 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.js +153 -150
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedAccessibleView.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedAccessibleView.js +84 -32
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors.js +8 -7
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.js +3 -2
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +41 -37
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons.js +3 -2
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +3 -2
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedList.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedList.js +1 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService._contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService._contribution.js +10 -8
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.d.ts +147 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +86 -83
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.d.ts +49 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.js +43 -38
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +208 -165
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/all.svg.js +1 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile.js +4 -3
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.js +7 -6
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.js +7 -6
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough.js +1 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/media/walkThroughPart.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution.js +6 -5
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughActions.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughActions.js +11 -8
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput.js +6 -4
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.js +34 -31
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.js +5 -3
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils.js +3 -2
- package/walkthrough.js +0 -18
|
@@ -7,6 +7,7 @@ var svgAssets = {
|
|
|
7
7
|
'vs/workbench/contrib/welcomeGettingStarted/common/media/languages.svg': new URL('../../../../../../../../assets/languages.svg', import.meta.url).href,
|
|
8
8
|
'vs/workbench/contrib/welcomeGettingStarted/common/media/learn.svg': new URL('../../../../../../../../assets/learn.svg', import.meta.url).href,
|
|
9
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/multi-file-edits.svg': new URL('../../../../../../../../assets/multi-file-edits.svg', import.meta.url).href,
|
|
10
11
|
'vs/workbench/contrib/welcomeGettingStarted/common/media/openFolder.svg': new URL('../../../../../../../../assets/openFolder.svg', import.meta.url).href,
|
|
11
12
|
'vs/workbench/contrib/welcomeGettingStarted/common/media/profiles.svg': new URL('../../../../../../../../assets/profiles.svg', import.meta.url).href,
|
|
12
13
|
'vs/workbench/contrib/welcomeGettingStarted/common/media/runTask.svg': new URL('../../../../../../../../assets/runTask.svg', import.meta.url).href,
|
package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
import { escape } from 'vscode/vscode/vs/base/common/strings';
|
|
2
3
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
4
|
|
|
@@ -8,15 +9,15 @@ var notebookProfileContent = () => `
|
|
|
8
9
|
<checklist>
|
|
9
10
|
<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
11
|
<img width="${imageSize}" src="./notebookThemes/default.png"/>
|
|
11
|
-
${escape(( localize(
|
|
12
|
+
${escape(( localize(10961, "Default")))}
|
|
12
13
|
</checkbox>
|
|
13
14
|
<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'">
|
|
14
15
|
<img width="${imageSize}" src="./notebookThemes/jupyter.png"/>
|
|
15
|
-
${escape(( localize(
|
|
16
|
+
${escape(( localize(10962, "Jupyter")))}
|
|
16
17
|
</checkbox>
|
|
17
18
|
<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'">
|
|
18
19
|
<img width="${imageSize}" src="./notebookThemes/colab.png"/>
|
|
19
|
-
${escape(( localize(
|
|
20
|
+
${escape(( localize(10963, "Colab")))}
|
|
20
21
|
</checkbox>
|
|
21
22
|
</checklist>
|
|
22
23
|
</vertically-centered>
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
+
|
|
1
2
|
import { escape } from 'vscode/vscode/vs/base/common/strings';
|
|
2
3
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
|
-
import { ThemeSettingDefaults } from 'vscode/vscode/vs/workbench/services/themes/common/workbenchThemeService';
|
|
4
|
+
import { ThemeSettingDefaults } from '@codingame/monaco-vscode-9d0168a3-519b-57f3-9bcc-89efc41f951a-common/vscode/vs/workbench/services/themes/common/workbenchThemeService';
|
|
4
5
|
|
|
5
6
|
var themePickerContent = () => `
|
|
6
7
|
<checklist>
|
|
7
8
|
<div class="theme-picker-row">
|
|
8
9
|
<checkbox when-checked="setTheme:${ThemeSettingDefaults.COLOR_THEME_DARK}" checked-on="config.workbench.colorTheme == '${ThemeSettingDefaults.COLOR_THEME_DARK}'">
|
|
9
10
|
<img width="200" src="./dark.png"/>
|
|
10
|
-
${escape(( localize(
|
|
11
|
+
${escape(( localize(10964, "Dark Modern")))}
|
|
11
12
|
</checkbox>
|
|
12
13
|
<checkbox when-checked="setTheme:${ThemeSettingDefaults.COLOR_THEME_LIGHT}" checked-on="config.workbench.colorTheme == '${ThemeSettingDefaults.COLOR_THEME_LIGHT}'">
|
|
13
14
|
<img width="200" src="./light.png"/>
|
|
14
|
-
${escape(( localize(
|
|
15
|
+
${escape(( localize(10965, "Light Modern")))}
|
|
15
16
|
</checkbox>
|
|
16
17
|
</div>
|
|
17
18
|
<div class="theme-picker-row">
|
|
18
19
|
<checkbox when-checked="setTheme:${ThemeSettingDefaults.COLOR_THEME_HC_DARK}" checked-on="config.workbench.colorTheme == '${ThemeSettingDefaults.COLOR_THEME_HC_DARK}'">
|
|
19
20
|
<img width="200" src="./dark-hc.png"/>
|
|
20
|
-
${escape(( localize(
|
|
21
|
+
${escape(( localize(10966, "Dark High Contrast")))}
|
|
21
22
|
</checkbox>
|
|
22
23
|
<checkbox when-checked="setTheme:${ThemeSettingDefaults.COLOR_THEME_HC_LIGHT}" checked-on="config.workbench.colorTheme == '${ThemeSettingDefaults.COLOR_THEME_HC_LIGHT}'">
|
|
23
24
|
<img width="200" src="./light-hc.png"/>
|
|
24
|
-
${escape(( localize(
|
|
25
|
+
${escape(( localize(10967, "Light High Contrast")))}
|
|
25
26
|
</checkbox>
|
|
26
27
|
</div>
|
|
27
28
|
</checklist>
|
|
28
29
|
<checkbox class="theme-picker-link" when-checked="command:workbench.action.selectTheme" checked-on="false">
|
|
29
|
-
${escape(( localize(
|
|
30
|
+
${escape(( localize(10968, "See More Themes...")))}
|
|
30
31
|
</checkbox>
|
|
31
32
|
`;
|
|
32
33
|
|
package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IInstantiationService, ServicesAccessor } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
2
|
+
import { WalkThroughInput } from "../walkThroughInput.js";
|
|
3
|
+
import { IEditorSerializer } from "vscode/vscode/vs/workbench/common/editor";
|
|
4
|
+
import { EditorInput } from "vscode/vscode/vs/workbench/common/editor/editorInput";
|
|
5
|
+
import { Action2 } from "vscode/vscode/vs/platform/actions/common/actions";
|
|
6
|
+
export declare class EditorWalkThroughAction extends Action2 {
|
|
7
|
+
static readonly ID = "workbench.action.showInteractivePlayground";
|
|
8
|
+
static readonly LABEL: import("vscode/vscode/vs/nls").ILocalizedString;
|
|
9
|
+
constructor();
|
|
10
|
+
run(serviceAccessor: ServicesAccessor): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export declare class EditorWalkThroughInputSerializer implements IEditorSerializer {
|
|
13
|
+
static readonly ID = "workbench.editors.walkThroughInput";
|
|
14
|
+
canSerialize(editorInput: EditorInput): boolean;
|
|
15
|
+
serialize(editorInput: EditorInput): string;
|
|
16
|
+
deserialize(instantiationService: IInstantiationService): WalkThroughInput;
|
|
17
|
+
}
|
package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
import content from './vs_code_editor_walkthrough.js';
|
|
2
3
|
import { localize, localize2 } from 'vscode/vscode/vs/nls';
|
|
3
4
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
@@ -12,10 +13,10 @@ walkThroughContentRegistry.registerProvider('vs/workbench/contrib/welcomeWalkthr
|
|
|
12
13
|
const typeId = 'workbench.editors.walkThroughInput';
|
|
13
14
|
const inputOptions = {
|
|
14
15
|
typeId,
|
|
15
|
-
name: ( localize(
|
|
16
|
-
resource: (
|
|
16
|
+
name: ( localize(10987, "Editor Playground")),
|
|
17
|
+
resource: ( FileAccess.asBrowserUri(
|
|
17
18
|
'vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough.md'
|
|
18
|
-
))
|
|
19
|
+
))
|
|
19
20
|
.with({
|
|
20
21
|
scheme: Schemas.walkThrough,
|
|
21
22
|
query: JSON.stringify({ moduleId: 'vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough' })
|
|
@@ -24,7 +25,7 @@ const inputOptions = {
|
|
|
24
25
|
};
|
|
25
26
|
class EditorWalkThroughAction extends Action2 {
|
|
26
27
|
static { this.ID = 'workbench.action.showInteractivePlayground'; }
|
|
27
|
-
static { this.LABEL = ( localize2(
|
|
28
|
+
static { this.LABEL = ( localize2(10988, 'Interactive Editor Playground')); }
|
|
28
29
|
constructor() {
|
|
29
30
|
super({
|
|
30
31
|
id: EditorWalkThroughAction.ID,
|
|
@@ -32,7 +33,7 @@ class EditorWalkThroughAction extends Action2 {
|
|
|
32
33
|
category: Categories.Help,
|
|
33
34
|
f1: true,
|
|
34
35
|
metadata: {
|
|
35
|
-
description: ( localize2(
|
|
36
|
+
description: ( localize2(10989, "Opens an interactive playground for learning about the editor."))
|
|
36
37
|
}
|
|
37
38
|
});
|
|
38
39
|
}
|
|
@@ -41,7 +42,7 @@ class EditorWalkThroughAction extends Action2 {
|
|
|
41
42
|
const instantiationService = serviceAccessor.get(IInstantiationService);
|
|
42
43
|
const input = instantiationService.createInstance(WalkThroughInput, inputOptions);
|
|
43
44
|
return editorService.openEditor(input, { pinned: true })
|
|
44
|
-
.then(() =>
|
|
45
|
+
.then(() => undefined);
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
class EditorWalkThroughInputSerializer {
|
package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/media/walkThroughPart.css.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css
|
|
1
|
+
import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css';
|
|
2
2
|
|
|
3
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:var(--text-link-decoration)}.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{background-color:var(--vscode-textPreformat-background);border-radius:3px;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
4
|
n(css,{});
|
package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
2
3
|
import { WalkThroughInput } from './walkThroughInput.js';
|
|
3
4
|
import { WalkThroughPart } from './walkThroughPart.js';
|
|
@@ -9,13 +10,13 @@ import { EditorExtensions } from 'vscode/vscode/vs/workbench/common/editor';
|
|
|
9
10
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
10
11
|
import { registerAction2, MenuRegistry, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
11
12
|
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
12
|
-
import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
|
|
13
|
+
import { EditorPaneDescriptor } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/browser/editor';
|
|
13
14
|
import { KeybindingsRegistry } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
14
15
|
|
|
15
|
-
(
|
|
16
|
-
.registerEditorPane(EditorPaneDescriptor.create(WalkThroughPart, WalkThroughPart.ID, ( localize(
|
|
16
|
+
( Registry.as(EditorExtensions.EditorPane))
|
|
17
|
+
.registerEditorPane(EditorPaneDescriptor.create(WalkThroughPart, WalkThroughPart.ID, ( localize(10990, "Playground"))), [( new SyncDescriptor(WalkThroughInput))]);
|
|
17
18
|
registerAction2(EditorWalkThroughAction);
|
|
18
|
-
(
|
|
19
|
+
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(EditorWalkThroughInputSerializer.ID, EditorWalkThroughInputSerializer);
|
|
19
20
|
registerWorkbenchContribution2(WalkThroughSnippetContentProvider.ID, WalkThroughSnippetContentProvider, { editorTypeId: WalkThroughPart.ID });
|
|
20
21
|
KeybindingsRegistry.registerCommandAndKeybindingRule(WalkThroughArrowUp);
|
|
21
22
|
KeybindingsRegistry.registerCommandAndKeybindingRule(WalkThroughArrowDown);
|
|
@@ -25,7 +26,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarHelpMenu, {
|
|
|
25
26
|
group: '1_welcome',
|
|
26
27
|
command: {
|
|
27
28
|
id: 'workbench.action.showInteractivePlayground',
|
|
28
|
-
title: ( localize(
|
|
29
|
+
title: ( localize(10991, "Editor Playgrou&&nd"))
|
|
29
30
|
},
|
|
30
31
|
order: 3
|
|
31
32
|
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ICommandAndKeybindingRule } from "vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry";
|
|
2
|
+
export declare const WalkThroughArrowUp: ICommandAndKeybindingRule;
|
|
3
|
+
export declare const WalkThroughArrowDown: ICommandAndKeybindingRule;
|
|
4
|
+
export declare const WalkThroughPageUp: ICommandAndKeybindingRule;
|
|
5
|
+
export declare const WalkThroughPageDown: ICommandAndKeybindingRule;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
|
|
1
2
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
2
3
|
import { WALK_THROUGH_FOCUS, WalkThroughPart } from './walkThroughPart.js';
|
|
4
|
+
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
3
5
|
import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
|
|
4
6
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
7
|
+
import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
5
8
|
|
|
6
9
|
const WalkThroughArrowUp = {
|
|
7
10
|
id: 'workbench.action.interactivePlayground.arrowUp',
|
|
8
|
-
weight:
|
|
11
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
9
12
|
when: ( ContextKeyExpr.and(WALK_THROUGH_FOCUS, ( EditorContextKeys.editorTextFocus.toNegated()))),
|
|
10
|
-
primary:
|
|
13
|
+
primary: KeyCode.UpArrow,
|
|
11
14
|
handler: accessor => {
|
|
12
15
|
const editorService = accessor.get(IEditorService);
|
|
13
16
|
const activeEditorPane = editorService.activeEditorPane;
|
|
@@ -18,9 +21,9 @@ const WalkThroughArrowUp = {
|
|
|
18
21
|
};
|
|
19
22
|
const WalkThroughArrowDown = {
|
|
20
23
|
id: 'workbench.action.interactivePlayground.arrowDown',
|
|
21
|
-
weight:
|
|
24
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
22
25
|
when: ( ContextKeyExpr.and(WALK_THROUGH_FOCUS, ( EditorContextKeys.editorTextFocus.toNegated()))),
|
|
23
|
-
primary:
|
|
26
|
+
primary: KeyCode.DownArrow,
|
|
24
27
|
handler: accessor => {
|
|
25
28
|
const editorService = accessor.get(IEditorService);
|
|
26
29
|
const activeEditorPane = editorService.activeEditorPane;
|
|
@@ -31,9 +34,9 @@ const WalkThroughArrowDown = {
|
|
|
31
34
|
};
|
|
32
35
|
const WalkThroughPageUp = {
|
|
33
36
|
id: 'workbench.action.interactivePlayground.pageUp',
|
|
34
|
-
weight:
|
|
37
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
35
38
|
when: ( ContextKeyExpr.and(WALK_THROUGH_FOCUS, ( EditorContextKeys.editorTextFocus.toNegated()))),
|
|
36
|
-
primary:
|
|
39
|
+
primary: KeyCode.PageUp,
|
|
37
40
|
handler: accessor => {
|
|
38
41
|
const editorService = accessor.get(IEditorService);
|
|
39
42
|
const activeEditorPane = editorService.activeEditorPane;
|
|
@@ -44,9 +47,9 @@ const WalkThroughPageUp = {
|
|
|
44
47
|
};
|
|
45
48
|
const WalkThroughPageDown = {
|
|
46
49
|
id: 'workbench.action.interactivePlayground.pageDown',
|
|
47
|
-
weight:
|
|
50
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
48
51
|
when: ( ContextKeyExpr.and(WALK_THROUGH_FOCUS, ( EditorContextKeys.editorTextFocus.toNegated()))),
|
|
49
|
-
primary:
|
|
52
|
+
primary: KeyCode.PageDown,
|
|
50
53
|
handler: accessor => {
|
|
51
54
|
const editorService = accessor.get(IEditorService);
|
|
52
55
|
const activeEditorPane = editorService.activeEditorPane;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Dimension } from "vscode/vscode/vs/base/browser/dom";
|
|
2
|
+
import { DisposableStore, IReference } from "vscode/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
4
|
+
import { ITextEditorModel, ITextModelService } from "vscode/vscode/vs/editor/common/services/resolverService";
|
|
5
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
|
+
import { EditorInputCapabilities, IUntypedEditorInput } from "vscode/vscode/vs/workbench/common/editor";
|
|
7
|
+
import { EditorInput } from "vscode/vscode/vs/workbench/common/editor/editorInput";
|
|
8
|
+
import { EditorModel } from "@codingame/monaco-vscode-e571cbbb-526b-5d8b-92c5-a0437d2dabb3-common/vscode/vs/workbench/common/editor/editorModel";
|
|
9
|
+
declare class WalkThroughModel extends EditorModel {
|
|
10
|
+
private mainRef;
|
|
11
|
+
private snippetRefs;
|
|
12
|
+
constructor(mainRef: string, snippetRefs: IReference<ITextEditorModel>[]);
|
|
13
|
+
get main(): string;
|
|
14
|
+
get snippets(): ITextEditorModel[];
|
|
15
|
+
dispose(): void;
|
|
16
|
+
}
|
|
17
|
+
export interface WalkThroughInputOptions {
|
|
18
|
+
readonly typeId: string;
|
|
19
|
+
readonly name: string;
|
|
20
|
+
readonly description?: string;
|
|
21
|
+
readonly resource: URI;
|
|
22
|
+
readonly telemetryFrom: string;
|
|
23
|
+
readonly onReady?: (container: HTMLElement, contentDisposables: DisposableStore) => void;
|
|
24
|
+
readonly layout?: (dimension: Dimension) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare class WalkThroughInput extends EditorInput {
|
|
27
|
+
private readonly options;
|
|
28
|
+
private readonly instantiationService;
|
|
29
|
+
private readonly textModelResolverService;
|
|
30
|
+
get capabilities(): EditorInputCapabilities;
|
|
31
|
+
private promise;
|
|
32
|
+
private maxTopScroll;
|
|
33
|
+
private maxBottomScroll;
|
|
34
|
+
get resource(): URI;
|
|
35
|
+
constructor(options: WalkThroughInputOptions, instantiationService: IInstantiationService, textModelResolverService: ITextModelService);
|
|
36
|
+
get typeId(): string;
|
|
37
|
+
getName(): string;
|
|
38
|
+
getDescription(): string;
|
|
39
|
+
getTelemetryFrom(): string;
|
|
40
|
+
getTelemetryDescriptor(): {
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
};
|
|
43
|
+
get onReady(): ((container: HTMLElement, contentDisposables: DisposableStore) => void) | undefined;
|
|
44
|
+
get layout(): ((dimension: Dimension) => void) | undefined;
|
|
45
|
+
resolve(): Promise<WalkThroughModel>;
|
|
46
|
+
matches(otherInput: EditorInput | IUntypedEditorInput): boolean;
|
|
47
|
+
dispose(): void;
|
|
48
|
+
relativeScrollPosition(topScroll: number, bottomScroll: number): void;
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { marked, Marked } from 'marked';
|
|
3
4
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
4
5
|
import { isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
5
6
|
import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
6
7
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
|
+
import { EditorInputCapabilities } from 'vscode/vscode/vs/workbench/common/editor';
|
|
7
9
|
import { EditorInput } from 'vscode/vscode/vs/workbench/common/editor/editorInput';
|
|
8
|
-
import { EditorModel } from 'vscode/vscode/vs/workbench/common/editor/editorModel';
|
|
9
|
-
import { markedGfmHeadingIdPlugin } from 'vscode/vscode/vs/workbench/contrib/markdown/browser/markedGfmHeadingIdPlugin';
|
|
10
|
+
import { EditorModel } from '@codingame/monaco-vscode-e571cbbb-526b-5d8b-92c5-a0437d2dabb3-common/vscode/vs/workbench/common/editor/editorModel';
|
|
11
|
+
import { markedGfmHeadingIdPlugin } from '@codingame/monaco-vscode-5e324391-11e3-5ceb-93ee-938e4098e4ad-common/vscode/vs/workbench/contrib/markdown/browser/markedGfmHeadingIdPlugin';
|
|
10
12
|
import { moduleToContent } from '../common/walkThroughContentProvider.js';
|
|
11
13
|
|
|
12
14
|
var WalkThroughInput_1;
|
|
@@ -29,7 +31,7 @@ class WalkThroughModel extends EditorModel {
|
|
|
29
31
|
}
|
|
30
32
|
let WalkThroughInput = WalkThroughInput_1 = class WalkThroughInput extends EditorInput {
|
|
31
33
|
get capabilities() {
|
|
32
|
-
return
|
|
34
|
+
return EditorInputCapabilities.Singleton | super.capabilities;
|
|
33
35
|
}
|
|
34
36
|
get resource() { return this.options.resource; }
|
|
35
37
|
constructor(options, instantiationService, textModelResolverService) {
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { IEditorOpenContext } from "vscode/vscode/vs/workbench/common/editor";
|
|
2
|
+
import { EditorPane } from "@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/browser/parts/editor/editorPane";
|
|
3
|
+
import { ITelemetryService } from "vscode/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
4
|
+
import { WalkThroughInput } from "./walkThroughInput.js";
|
|
5
|
+
import { IOpenerService } from "vscode/vscode/vs/platform/opener/common/opener.service";
|
|
6
|
+
import { ITextResourceConfigurationService } from "vscode/vscode/vs/editor/common/services/textResourceConfiguration";
|
|
7
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
8
|
+
import { IKeybindingService } from "vscode/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
9
|
+
import { IStorageService } from "vscode/vscode/vs/platform/storage/common/storage.service";
|
|
10
|
+
import { RawContextKey } from "vscode/vscode/vs/platform/contextkey/common/contextkey";
|
|
11
|
+
import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
12
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
13
|
+
import { IThemeService } from "vscode/vscode/vs/platform/theme/common/themeService.service";
|
|
14
|
+
import { INotificationService } from "vscode/vscode/vs/platform/notification/common/notification.service";
|
|
15
|
+
import { Dimension } from "vscode/vscode/vs/base/browser/dom";
|
|
16
|
+
import { IEditorGroup } from "vscode/vscode/vs/workbench/services/editor/common/editorGroupsService";
|
|
17
|
+
import { IEditorGroupsService } from "vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
18
|
+
import { CancellationToken } from "vscode/vscode/vs/base/common/cancellation";
|
|
19
|
+
import { IExtensionService } from "vscode/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
20
|
+
import { IEditorOptions } from "vscode/vscode/vs/platform/editor/common/editor";
|
|
21
|
+
export declare const WALK_THROUGH_FOCUS: RawContextKey<boolean>;
|
|
22
|
+
export declare class WalkThroughPart extends EditorPane {
|
|
23
|
+
private readonly instantiationService;
|
|
24
|
+
private readonly openerService;
|
|
25
|
+
private readonly keybindingService;
|
|
26
|
+
private readonly contextKeyService;
|
|
27
|
+
private readonly configurationService;
|
|
28
|
+
private readonly notificationService;
|
|
29
|
+
private readonly extensionService;
|
|
30
|
+
static readonly ID: string;
|
|
31
|
+
private readonly disposables;
|
|
32
|
+
private contentDisposables;
|
|
33
|
+
private content;
|
|
34
|
+
private scrollbar;
|
|
35
|
+
private editorFocus;
|
|
36
|
+
private lastFocus;
|
|
37
|
+
private size;
|
|
38
|
+
private editorMemento;
|
|
39
|
+
constructor(group: IEditorGroup, telemetryService: ITelemetryService, themeService: IThemeService, textResourceConfigurationService: ITextResourceConfigurationService, instantiationService: IInstantiationService, openerService: IOpenerService, keybindingService: IKeybindingService, storageService: IStorageService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, notificationService: INotificationService, extensionService: IExtensionService, editorGroupService: IEditorGroupsService);
|
|
40
|
+
protected createEditor(container: HTMLElement): void;
|
|
41
|
+
private updatedScrollPosition;
|
|
42
|
+
private onTouchChange;
|
|
43
|
+
private addEventListener;
|
|
44
|
+
private registerFocusHandlers;
|
|
45
|
+
private registerClickHandler;
|
|
46
|
+
private open;
|
|
47
|
+
private addFrom;
|
|
48
|
+
layout(dimension: Dimension): void;
|
|
49
|
+
private updateSizeClasses;
|
|
50
|
+
focus(): void;
|
|
51
|
+
arrowUp(): void;
|
|
52
|
+
arrowDown(): void;
|
|
53
|
+
private getArrowScrollHeight;
|
|
54
|
+
pageUp(): void;
|
|
55
|
+
pageDown(): void;
|
|
56
|
+
setInput(input: WalkThroughInput, options: IEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise<void>;
|
|
57
|
+
private getEditorOptions;
|
|
58
|
+
private expandMacros;
|
|
59
|
+
private decorateContent;
|
|
60
|
+
private multiCursorModifier;
|
|
61
|
+
private saveTextEditorViewState;
|
|
62
|
+
private loadTextEditorViewState;
|
|
63
|
+
clearInput(): void;
|
|
64
|
+
protected saveState(): void;
|
|
65
|
+
dispose(): void;
|
|
66
|
+
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import '../common/walkThroughUtils.js';
|
|
3
4
|
import './media/walkThroughPart.css.js';
|
|
4
5
|
import { DomScrollableElement } from 'vscode/vscode/vs/base/browser/ui/scrollbar/scrollableElement';
|
|
5
6
|
import { Gesture, EventType } from 'vscode/vscode/vs/base/browser/touch';
|
|
7
|
+
import { ScrollbarVisibility } from 'vscode/vscode/vs/base/common/scrollable';
|
|
6
8
|
import { escape } from 'vscode/vscode/vs/base/common/strings';
|
|
7
9
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
8
10
|
import { DisposableStore, toDisposable, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
9
|
-
import { EditorPane } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
11
|
+
import { EditorPane } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
10
12
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
11
13
|
import { WalkThroughInput } from './walkThroughInput.js';
|
|
12
14
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
@@ -21,9 +23,10 @@ import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/
|
|
|
21
23
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
22
24
|
import { isObject } from 'vscode/vscode/vs/base/common/types';
|
|
23
25
|
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
26
|
+
import { EditorOption } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
24
27
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
25
28
|
import { UILabelProvider } from 'vscode/vscode/vs/base/common/keybindingLabels';
|
|
26
|
-
import { OS } from 'vscode/vscode/vs/base/common/platform';
|
|
29
|
+
import { OS, OperatingSystem } from 'vscode/vscode/vs/base/common/platform';
|
|
27
30
|
import { deepClone } from 'vscode/vscode/vs/base/common/objects';
|
|
28
31
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
29
32
|
import { isHTMLElement, isHTMLAnchorElement, isHTMLButtonElement, size, safeInnerHtml, addDisposableListener } from 'vscode/vscode/vs/base/browser/dom';
|
|
@@ -31,8 +34,8 @@ import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor
|
|
|
31
34
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
32
35
|
|
|
33
36
|
var WalkThroughPart_1;
|
|
34
|
-
const WALK_THROUGH_FOCUS = (
|
|
35
|
-
const UNBOUND_COMMAND = ( localize(
|
|
37
|
+
const WALK_THROUGH_FOCUS = ( new RawContextKey('interactivePlaygroundFocus', false));
|
|
38
|
+
const UNBOUND_COMMAND = ( localize(10992, "unbound"));
|
|
36
39
|
const WALK_THROUGH_EDITOR_VIEW_STATE_PREFERENCE_KEY = 'walkThroughEditorViewState';
|
|
37
40
|
let WalkThroughPart = class WalkThroughPart extends EditorPane {
|
|
38
41
|
static { WalkThroughPart_1 = this; }
|
|
@@ -46,7 +49,7 @@ let WalkThroughPart = class WalkThroughPart extends EditorPane {
|
|
|
46
49
|
this.configurationService = configurationService;
|
|
47
50
|
this.notificationService = notificationService;
|
|
48
51
|
this.extensionService = extensionService;
|
|
49
|
-
this.disposables = (
|
|
52
|
+
this.disposables = ( new DisposableStore());
|
|
50
53
|
this.contentDisposables = [];
|
|
51
54
|
this.editorFocus = WALK_THROUGH_FOCUS.bindTo(this.contextKeyService);
|
|
52
55
|
this.editorMemento = this.getEditorMemento(editorGroupService, textResourceConfigurationService, WALK_THROUGH_EDITOR_VIEW_STATE_PREFERENCE_KEY);
|
|
@@ -56,10 +59,10 @@ let WalkThroughPart = class WalkThroughPart extends EditorPane {
|
|
|
56
59
|
this.content.classList.add('welcomePageFocusElement');
|
|
57
60
|
this.content.tabIndex = 0;
|
|
58
61
|
this.content.style.outlineStyle = 'none';
|
|
59
|
-
this.scrollbar = (
|
|
60
|
-
horizontal:
|
|
61
|
-
vertical:
|
|
62
|
-
}))
|
|
62
|
+
this.scrollbar = ( new DomScrollableElement(this.content, {
|
|
63
|
+
horizontal: ScrollbarVisibility.Auto,
|
|
64
|
+
vertical: ScrollbarVisibility.Auto
|
|
65
|
+
}));
|
|
63
66
|
this.disposables.add(this.scrollbar);
|
|
64
67
|
container.appendChild(this.scrollbar.getDomNode());
|
|
65
68
|
this.registerFocusHandlers();
|
|
@@ -122,7 +125,7 @@ let WalkThroughPart = class WalkThroughPart extends EditorPane {
|
|
|
122
125
|
}
|
|
123
126
|
}
|
|
124
127
|
else {
|
|
125
|
-
this.open((
|
|
128
|
+
this.open(( URI.parse(node.href)));
|
|
126
129
|
}
|
|
127
130
|
event.preventDefault();
|
|
128
131
|
break;
|
|
@@ -130,7 +133,7 @@ let WalkThroughPart = class WalkThroughPart extends EditorPane {
|
|
|
130
133
|
else if (isHTMLButtonElement(node)) {
|
|
131
134
|
const href = node.getAttribute('data-href');
|
|
132
135
|
if (href) {
|
|
133
|
-
this.open((
|
|
136
|
+
this.open(( URI.parse(href)));
|
|
134
137
|
}
|
|
135
138
|
break;
|
|
136
139
|
}
|
|
@@ -142,7 +145,7 @@ let WalkThroughPart = class WalkThroughPart extends EditorPane {
|
|
|
142
145
|
}
|
|
143
146
|
open(uri) {
|
|
144
147
|
if (uri.scheme === 'command' && uri.path === 'git.clone' && !CommandsRegistry.getCommand('git.clone')) {
|
|
145
|
-
this.notificationService.info(( localize(
|
|
148
|
+
this.notificationService.info(( localize(10993, "It looks like Git is not installed on your system.")));
|
|
146
149
|
return;
|
|
147
150
|
}
|
|
148
151
|
this.openerService.open(this.addFrom(uri), { allowCommands: true });
|
|
@@ -213,7 +216,7 @@ let WalkThroughPart = class WalkThroughPart extends EditorPane {
|
|
|
213
216
|
this.scrollbar.setScrollPosition({ scrollTop: scrollPosition.scrollTop + scrollDimensions.height });
|
|
214
217
|
}
|
|
215
218
|
setInput(input, options, context, token) {
|
|
216
|
-
const store = (
|
|
219
|
+
const store = ( new DisposableStore());
|
|
217
220
|
this.contentDisposables.push(store);
|
|
218
221
|
this.content.innerText = '';
|
|
219
222
|
return super.setInput(input, options, context, token)
|
|
@@ -262,7 +265,7 @@ let WalkThroughPart = class WalkThroughPart extends EditorPane {
|
|
|
262
265
|
editor.setModel(model);
|
|
263
266
|
this.contentDisposables.push(editor);
|
|
264
267
|
const updateHeight = (initial) => {
|
|
265
|
-
const lineHeight = editor.getOption(
|
|
268
|
+
const lineHeight = editor.getOption(EditorOption.lineHeight);
|
|
266
269
|
const height = `${Math.max(model.getLineCount() + 1, 4) * lineHeight}px`;
|
|
267
270
|
if (div.style.height !== height) {
|
|
268
271
|
div.style.height = height;
|
|
@@ -279,7 +282,7 @@ let WalkThroughPart = class WalkThroughPart extends EditorPane {
|
|
|
279
282
|
if (innerContent) {
|
|
280
283
|
const targetTop = div.getBoundingClientRect().top;
|
|
281
284
|
const containerTop = innerContent.getBoundingClientRect().top;
|
|
282
|
-
const lineHeight = editor.getOption(
|
|
285
|
+
const lineHeight = editor.getOption(EditorOption.lineHeight);
|
|
283
286
|
const lineTop = (targetTop + (e.position.lineNumber - 1) * lineHeight) - containerTop;
|
|
284
287
|
const lineBottom = lineTop + lineHeight;
|
|
285
288
|
const scrollDimensions = this.scrollbar.getScrollDimensions();
|
|
@@ -362,7 +365,7 @@ let WalkThroughPart = class WalkThroughPart extends EditorPane {
|
|
|
362
365
|
multiCursorModifier() {
|
|
363
366
|
const labels = UILabelProvider.modifierLabels[OS];
|
|
364
367
|
const value = this.configurationService.getValue('editor.multiCursorModifier');
|
|
365
|
-
const modifier = labels[value === 'ctrlCmd' ? (OS ===
|
|
368
|
+
const modifier = labels[value === 'ctrlCmd' ? (OS === OperatingSystem.Macintosh ? 'metaKey' : 'ctrlKey') : 'altKey'];
|
|
366
369
|
const keys = this.content.querySelectorAll('.multi-cursor-modifier');
|
|
367
370
|
Array.prototype.forEach.call(keys, (key) => {
|
|
368
371
|
while (key.firstChild) {
|
|
@@ -406,19 +409,19 @@ let WalkThroughPart = class WalkThroughPart extends EditorPane {
|
|
|
406
409
|
super.dispose();
|
|
407
410
|
}
|
|
408
411
|
};
|
|
409
|
-
WalkThroughPart = WalkThroughPart_1 = (
|
|
410
|
-
(
|
|
411
|
-
(
|
|
412
|
-
(
|
|
413
|
-
(
|
|
414
|
-
(
|
|
415
|
-
(
|
|
416
|
-
(
|
|
417
|
-
(
|
|
418
|
-
(
|
|
419
|
-
(
|
|
420
|
-
(
|
|
421
|
-
(
|
|
422
|
-
], WalkThroughPart))
|
|
412
|
+
WalkThroughPart = WalkThroughPart_1 = ( __decorate([
|
|
413
|
+
( __param(1, ITelemetryService)),
|
|
414
|
+
( __param(2, IThemeService)),
|
|
415
|
+
( __param(3, ITextResourceConfigurationService)),
|
|
416
|
+
( __param(4, IInstantiationService)),
|
|
417
|
+
( __param(5, IOpenerService)),
|
|
418
|
+
( __param(6, IKeybindingService)),
|
|
419
|
+
( __param(7, IStorageService)),
|
|
420
|
+
( __param(8, IContextKeyService)),
|
|
421
|
+
( __param(9, IConfigurationService)),
|
|
422
|
+
( __param(10, INotificationService)),
|
|
423
|
+
( __param(11, IExtensionService)),
|
|
424
|
+
( __param(12, IEditorGroupsService))
|
|
425
|
+
], WalkThroughPart));
|
|
423
426
|
|
|
424
427
|
export { WALK_THROUGH_FOCUS, WalkThroughPart };
|
package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
2
|
+
import { ITextModelService, ITextModelContentProvider } from "vscode/vscode/vs/editor/common/services/resolverService";
|
|
3
|
+
import { IModelService } from "vscode/vscode/vs/editor/common/services/model";
|
|
4
|
+
import { ITextModel } from "vscode/vscode/vs/editor/common/model";
|
|
5
|
+
import { ILanguageService } from "vscode/vscode/vs/editor/common/languages/language";
|
|
6
|
+
import { IWorkbenchContribution } from "vscode/vscode/vs/workbench/common/contributions";
|
|
7
|
+
import { IInstantiationService, ServicesAccessor } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
8
|
+
interface IWalkThroughContentProvider {
|
|
9
|
+
(accessor: ServicesAccessor): string;
|
|
10
|
+
}
|
|
11
|
+
declare class WalkThroughContentProviderRegistry {
|
|
12
|
+
private readonly providers;
|
|
13
|
+
registerProvider(moduleId: string, provider: IWalkThroughContentProvider): void;
|
|
14
|
+
getProvider(moduleId: string): IWalkThroughContentProvider | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare const walkThroughContentRegistry: WalkThroughContentProviderRegistry;
|
|
17
|
+
export declare function moduleToContent(instantiationService: IInstantiationService, resource: URI): Promise<string>;
|
|
18
|
+
export declare class WalkThroughSnippetContentProvider implements ITextModelContentProvider, IWorkbenchContribution {
|
|
19
|
+
private readonly textModelResolverService;
|
|
20
|
+
private readonly languageService;
|
|
21
|
+
private readonly modelService;
|
|
22
|
+
private readonly instantiationService;
|
|
23
|
+
static readonly ID = "workbench.contrib.walkThroughSnippetContentProvider";
|
|
24
|
+
private loads;
|
|
25
|
+
constructor(textModelResolverService: ITextModelService, languageService: ILanguageService, modelService: IModelService, instantiationService: IInstantiationService);
|
|
26
|
+
private textBufferFactoryFromResource;
|
|
27
|
+
provideTextContent(resource: URI): Promise<ITextModel>;
|
|
28
|
+
}
|
|
29
|
+
export {};
|