@codingame/monaco-vscode-welcome-service-override 7.1.0 → 8.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/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/welcomeViews/common/newFile.contribution.js +11 -12
- package/vscode/src/vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution.js +3 -5
- package/vscode/src/vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint.js +14 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-welcome-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@8.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -3,7 +3,7 @@ import { promiseWithResolvers } from 'vscode/vscode/vs/base/common/async';
|
|
|
3
3
|
import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
4
4
|
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
|
|
6
|
-
import {
|
|
6
|
+
import { localize, localize2 } from 'vscode/vscode/vs/nls';
|
|
7
7
|
import { registerAction2, Action2, MenuId, MenuItemAction, MenuRegistry } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
8
8
|
import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
|
|
9
9
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
@@ -16,14 +16,13 @@ import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
|
16
16
|
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
17
17
|
|
|
18
18
|
var NewFileTemplatesManager_1;
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const category = ( localize2WithPath(_moduleId, 1, 'Create'));
|
|
19
|
+
const builtInSource = ( localize(2544, "Built-In"));
|
|
20
|
+
const category = ( localize2(2545, 'Create'));
|
|
22
21
|
registerAction2(class extends Action2 {
|
|
23
22
|
constructor() {
|
|
24
23
|
super({
|
|
25
24
|
id: 'welcome.showNewFileEntries',
|
|
26
|
-
title: (
|
|
25
|
+
title: ( localize2(2546, 'New File...')),
|
|
27
26
|
category,
|
|
28
27
|
f1: true,
|
|
29
28
|
keybinding: {
|
|
@@ -83,8 +82,8 @@ let NewFileTemplatesManager = class NewFileTemplatesManager extends Disposable {
|
|
|
83
82
|
const { promise: resultPromise, resolve: resolveResult } = promiseWithResolvers();
|
|
84
83
|
const disposables = ( (new DisposableStore()));
|
|
85
84
|
const qp = this.quickInputService.createQuickPick();
|
|
86
|
-
qp.title = (
|
|
87
|
-
qp.placeholder = (
|
|
85
|
+
qp.title = ( localize(2547, "New File..."));
|
|
86
|
+
qp.placeholder = ( localize(2548, "Select File Type or Enter File Name..."));
|
|
88
87
|
qp.sortByLabel = false;
|
|
89
88
|
qp.matchOnDetail = true;
|
|
90
89
|
qp.matchOnDescription = true;
|
|
@@ -110,8 +109,8 @@ let NewFileTemplatesManager = class NewFileTemplatesManager extends Disposable {
|
|
|
110
109
|
return a.from.localeCompare(b.from);
|
|
111
110
|
};
|
|
112
111
|
const displayCategory = {
|
|
113
|
-
'file': (
|
|
114
|
-
'notebook': (
|
|
112
|
+
'file': ( localize(2549, "File")),
|
|
113
|
+
'notebook': ( localize(2550, "Notebook")),
|
|
115
114
|
};
|
|
116
115
|
const refreshQp = (entries) => {
|
|
117
116
|
const items = [];
|
|
@@ -136,7 +135,7 @@ let NewFileTemplatesManager = class NewFileTemplatesManager extends Disposable {
|
|
|
136
135
|
buttons: command ? [
|
|
137
136
|
{
|
|
138
137
|
iconClass: 'codicon codicon-gear',
|
|
139
|
-
tooltip: (
|
|
138
|
+
tooltip: ( localize(2551, "Configure Keybinding"))
|
|
140
139
|
}
|
|
141
140
|
] : [],
|
|
142
141
|
detail: '',
|
|
@@ -155,7 +154,7 @@ let NewFileTemplatesManager = class NewFileTemplatesManager extends Disposable {
|
|
|
155
154
|
const currentTextEntry = {
|
|
156
155
|
commandID: 'workbench.action.files.newFile',
|
|
157
156
|
commandArgs: { languageId: undefined, viewType: undefined, fileName: val },
|
|
158
|
-
title: (
|
|
157
|
+
title: ( localize(2552, "Create New File ({0})", val)),
|
|
159
158
|
group: 'file',
|
|
160
159
|
from: builtInSource,
|
|
161
160
|
};
|
|
@@ -196,7 +195,7 @@ MenuRegistry.appendMenuItem(MenuId.NewFile, {
|
|
|
196
195
|
group: 'file',
|
|
197
196
|
command: {
|
|
198
197
|
id: 'workbench.action.files.newUntitledFile',
|
|
199
|
-
title: (
|
|
198
|
+
title: ( localize(2553, "Text File"))
|
|
200
199
|
},
|
|
201
200
|
order: 1
|
|
202
201
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
2
2
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
3
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
4
4
|
import { ViewIdentifierMap } from './viewsWelcomeExtensionPoint.js';
|
|
@@ -6,7 +6,6 @@ import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
|
6
6
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/views';
|
|
7
7
|
import { isProposedApiEnabled } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
8
8
|
|
|
9
|
-
const _moduleId = "vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution";
|
|
10
9
|
const viewsRegistry = ( (Registry.as(Extensions.ViewsRegistry)));
|
|
11
10
|
class ViewsWelcomeContribution extends Disposable {
|
|
12
11
|
constructor(extensionPoint) {
|
|
@@ -53,9 +52,8 @@ function parseGroupAndOrder(welcome, contribution) {
|
|
|
53
52
|
let order;
|
|
54
53
|
if (welcome.group) {
|
|
55
54
|
if (!isProposedApiEnabled(contribution.description, 'contribViewsWelcome')) {
|
|
56
|
-
contribution.collector.warn((
|
|
57
|
-
|
|
58
|
-
0,
|
|
55
|
+
contribution.collector.warn(( localize(
|
|
56
|
+
6784,
|
|
59
57
|
"The viewsWelcome contribution in '{0}' requires 'enabledApiProposals: [\"contribViewsWelcome\"]' in order to use the 'group' proposed property.",
|
|
60
58
|
contribution.description.identifier.value
|
|
61
59
|
)));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
2
2
|
|
|
3
|
-
const _moduleId = "vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint";
|
|
4
3
|
var ViewsWelcomeExtensionPointFields;
|
|
5
4
|
( ((function(ViewsWelcomeExtensionPointFields) {
|
|
6
5
|
ViewsWelcomeExtensionPointFields["view"] = "view";
|
|
@@ -19,14 +18,13 @@ const ViewIdentifierMap = {
|
|
|
19
18
|
};
|
|
20
19
|
const viewsWelcomeExtensionPointSchema = ( (Object.freeze({
|
|
21
20
|
type: 'array',
|
|
22
|
-
description: (
|
|
23
|
-
|
|
24
|
-
0,
|
|
21
|
+
description: ( localize(
|
|
22
|
+
6785,
|
|
25
23
|
"Contributed views welcome content. Welcome content will be rendered in tree based views whenever they have no meaningful content to display, ie. the File Explorer when no folder is open. Such content is useful as in-product documentation to drive users to use certain features before they are available. A good example would be a `Clone Repository` button in the File Explorer welcome view."
|
|
26
24
|
)),
|
|
27
25
|
items: {
|
|
28
26
|
type: 'object',
|
|
29
|
-
description: (
|
|
27
|
+
description: ( localize(6786, "Contributed welcome content for a specific view.")),
|
|
30
28
|
required: [
|
|
31
29
|
ViewsWelcomeExtensionPointFields.view,
|
|
32
30
|
ViewsWelcomeExtensionPointFields.contents
|
|
@@ -36,17 +34,15 @@ const viewsWelcomeExtensionPointSchema = ( (Object.freeze({
|
|
|
36
34
|
anyOf: [
|
|
37
35
|
{
|
|
38
36
|
type: 'string',
|
|
39
|
-
description: (
|
|
40
|
-
|
|
41
|
-
2,
|
|
37
|
+
description: ( localize(
|
|
38
|
+
6787,
|
|
42
39
|
"Target view identifier for this welcome content. Only tree based views are supported."
|
|
43
40
|
))
|
|
44
41
|
},
|
|
45
42
|
{
|
|
46
43
|
type: 'string',
|
|
47
|
-
description: (
|
|
48
|
-
|
|
49
|
-
2,
|
|
44
|
+
description: ( localize(
|
|
45
|
+
6787,
|
|
50
46
|
"Target view identifier for this welcome content. Only tree based views are supported."
|
|
51
47
|
)),
|
|
52
48
|
enum: ( (Object.keys(ViewIdentifierMap)))
|
|
@@ -55,25 +51,23 @@ const viewsWelcomeExtensionPointSchema = ( (Object.freeze({
|
|
|
55
51
|
},
|
|
56
52
|
[ViewsWelcomeExtensionPointFields.contents]: {
|
|
57
53
|
type: 'string',
|
|
58
|
-
description: (
|
|
59
|
-
|
|
60
|
-
3,
|
|
54
|
+
description: ( localize(
|
|
55
|
+
6788,
|
|
61
56
|
"Welcome content to be displayed. The format of the contents is a subset of Markdown, with support for links only."
|
|
62
57
|
)),
|
|
63
58
|
},
|
|
64
59
|
[ViewsWelcomeExtensionPointFields.when]: {
|
|
65
60
|
type: 'string',
|
|
66
|
-
description: (
|
|
61
|
+
description: ( localize(6789, "Condition when the welcome content should be displayed.")),
|
|
67
62
|
},
|
|
68
63
|
[ViewsWelcomeExtensionPointFields.group]: {
|
|
69
64
|
type: 'string',
|
|
70
|
-
description: (
|
|
65
|
+
description: ( localize(6790, "Group to which this welcome content belongs. Proposed API.")),
|
|
71
66
|
},
|
|
72
67
|
[ViewsWelcomeExtensionPointFields.enablement]: {
|
|
73
68
|
type: 'string',
|
|
74
|
-
description: (
|
|
75
|
-
|
|
76
|
-
6,
|
|
69
|
+
description: ( localize(
|
|
70
|
+
6791,
|
|
77
71
|
"Condition when the welcome content buttons and command links should be enabled."
|
|
78
72
|
)),
|
|
79
73
|
},
|