@codingame/monaco-vscode-welcome-service-override 4.5.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-welcome-service-override",
3
- "version": "4.5.1",
3
+ "version": "5.0.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,6 +26,6 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@4.5.1"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@5.0.0"
30
30
  }
31
31
  }
@@ -13,25 +13,14 @@ import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
13
13
  import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
14
14
 
15
15
  var NewFileTemplatesManager_1;
16
- const builtInSource = ( localizeWithPath(
17
- 'vs/workbench/contrib/welcomeViews/common/newFile.contribution',
18
- 'Built-In',
19
- "Built-In"
20
- ));
21
- const category = ( localize2WithPath(
22
- 'vs/workbench/contrib/welcomeViews/common/newFile.contribution',
23
- 'Create',
24
- 'Create'
25
- ));
16
+ const _moduleId = "vs/workbench/contrib/welcomeViews/common/newFile.contribution";
17
+ const builtInSource = ( localizeWithPath(_moduleId, 0, "Built-In"));
18
+ const category = ( localize2WithPath(_moduleId, 1, 'Create'));
26
19
  registerAction2(class extends Action2 {
27
20
  constructor() {
28
21
  super({
29
22
  id: 'welcome.showNewFileEntries',
30
- title: ( localize2WithPath(
31
- 'vs/workbench/contrib/welcomeViews/common/newFile.contribution',
32
- 'welcome.newFile',
33
- 'New File...'
34
- )),
23
+ title: ( localize2WithPath(_moduleId, 2, 'New File...')),
35
24
  category,
36
25
  f1: true,
37
26
  keybinding: {
@@ -89,18 +78,10 @@ let NewFileTemplatesManager = class NewFileTemplatesManager extends Disposable {
89
78
  }
90
79
  async selectNewEntry(entries) {
91
80
  const { promise: resultPromise, resolve: resolveResult } = promiseWithResolvers();
92
- const disposables = ( new DisposableStore());
81
+ const disposables = ( (new DisposableStore()));
93
82
  const qp = this.quickInputService.createQuickPick();
94
- qp.title = ( localizeWithPath(
95
- 'vs/workbench/contrib/welcomeViews/common/newFile.contribution',
96
- 'newFileTitle',
97
- "New File..."
98
- ));
99
- qp.placeholder = ( localizeWithPath(
100
- 'vs/workbench/contrib/welcomeViews/common/newFile.contribution',
101
- 'newFilePlaceholder',
102
- "Select File Type or Enter File Name..."
103
- ));
83
+ qp.title = ( localizeWithPath(_moduleId, 3, "New File..."));
84
+ qp.placeholder = ( localizeWithPath(_moduleId, 4, "Select File Type or Enter File Name..."));
104
85
  qp.sortByLabel = false;
105
86
  qp.matchOnDetail = true;
106
87
  qp.matchOnDescription = true;
@@ -126,16 +107,8 @@ let NewFileTemplatesManager = class NewFileTemplatesManager extends Disposable {
126
107
  return a.from.localeCompare(b.from);
127
108
  };
128
109
  const displayCategory = {
129
- 'file': ( localizeWithPath(
130
- 'vs/workbench/contrib/welcomeViews/common/newFile.contribution',
131
- 'file',
132
- "File"
133
- )),
134
- 'notebook': ( localizeWithPath(
135
- 'vs/workbench/contrib/welcomeViews/common/newFile.contribution',
136
- 'notebook',
137
- "Notebook"
138
- )),
110
+ 'file': ( localizeWithPath(_moduleId, 5, "File")),
111
+ 'notebook': ( localizeWithPath(_moduleId, 6, "Notebook")),
139
112
  };
140
113
  const refreshQp = (entries) => {
141
114
  const items = [];
@@ -160,11 +133,7 @@ let NewFileTemplatesManager = class NewFileTemplatesManager extends Disposable {
160
133
  buttons: command ? [
161
134
  {
162
135
  iconClass: 'codicon codicon-gear',
163
- tooltip: ( localizeWithPath(
164
- 'vs/workbench/contrib/welcomeViews/common/newFile.contribution',
165
- 'change keybinding',
166
- "Configure Keybinding"
167
- ))
136
+ tooltip: ( localizeWithPath(_moduleId, 7, "Configure Keybinding"))
168
137
  }
169
138
  ] : [],
170
139
  detail: '',
@@ -183,12 +152,7 @@ let NewFileTemplatesManager = class NewFileTemplatesManager extends Disposable {
183
152
  const currentTextEntry = {
184
153
  commandID: 'workbench.action.files.newFile',
185
154
  commandArgs: { languageId: undefined, viewType: undefined, fileName: val },
186
- title: ( localizeWithPath(
187
- 'vs/workbench/contrib/welcomeViews/common/newFile.contribution',
188
- 'miNewFileWithName',
189
- "Create New File ({0})",
190
- val
191
- )),
155
+ title: ( localizeWithPath(_moduleId, 8, "Create New File ({0})", val)),
192
156
  group: 'file',
193
157
  from: builtInSource,
194
158
  };
@@ -216,24 +180,20 @@ let NewFileTemplatesManager = class NewFileTemplatesManager extends Disposable {
216
180
  return resultPromise;
217
181
  }
218
182
  };
219
- NewFileTemplatesManager = NewFileTemplatesManager_1 = ( __decorate([
220
- ( __param(0, IQuickInputService)),
221
- ( __param(1, IContextKeyService)),
222
- ( __param(2, ICommandService)),
223
- ( __param(3, IKeybindingService)),
224
- ( __param(4, IMenuService))
225
- ], NewFileTemplatesManager));
226
- ( Registry.as(Extensions.Workbench))
183
+ NewFileTemplatesManager = NewFileTemplatesManager_1 = ( (__decorate([
184
+ ( (__param(0, IQuickInputService))),
185
+ ( (__param(1, IContextKeyService))),
186
+ ( (__param(2, ICommandService))),
187
+ ( (__param(3, IKeybindingService))),
188
+ ( (__param(4, IMenuService)))
189
+ ], NewFileTemplatesManager)));
190
+ ( (Registry.as(Extensions.Workbench)))
227
191
  .registerWorkbenchContribution(NewFileTemplatesManager, 3 );
228
192
  MenuRegistry.appendMenuItem(MenuId.NewFile, {
229
193
  group: 'file',
230
194
  command: {
231
195
  id: 'workbench.action.files.newUntitledFile',
232
- title: ( localizeWithPath(
233
- 'vs/workbench/contrib/welcomeViews/common/newFile.contribution',
234
- 'miNewFile2',
235
- "Text File"
236
- ))
196
+ title: ( localizeWithPath(_moduleId, 9, "Text File"))
237
197
  },
238
198
  order: 1
239
199
  });
@@ -6,11 +6,12 @@ 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 viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
9
+ const _moduleId = "vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution";
10
+ const viewsRegistry = ( (Registry.as(Extensions.ViewsRegistry)));
10
11
  class ViewsWelcomeContribution extends Disposable {
11
12
  constructor(extensionPoint) {
12
13
  super();
13
- this.viewWelcomeContents = ( new Map());
14
+ this.viewWelcomeContents = ( (new Map()));
14
15
  extensionPoint.setHandler((_, { added, removed }) => {
15
16
  for (const contribution of removed) {
16
17
  for (const welcome of contribution.value) {
@@ -18,7 +19,7 @@ class ViewsWelcomeContribution extends Disposable {
18
19
  disposable?.dispose();
19
20
  }
20
21
  }
21
- const welcomesByViewId = ( new Map());
22
+ const welcomesByViewId = ( (new Map()));
22
23
  for (const contribution of added) {
23
24
  for (const welcome of contribution.value) {
24
25
  const { group, order } = parseGroupAndOrder(welcome, contribution);
@@ -26,7 +27,7 @@ class ViewsWelcomeContribution extends Disposable {
26
27
  const id = ViewIdentifierMap[welcome.view] ?? welcome.view;
27
28
  let viewContentMap = welcomesByViewId.get(id);
28
29
  if (!viewContentMap) {
29
- viewContentMap = ( new Map());
30
+ viewContentMap = ( (new Map()));
30
31
  welcomesByViewId.set(id, viewContentMap);
31
32
  }
32
33
  viewContentMap.set(welcome, {
@@ -53,8 +54,8 @@ function parseGroupAndOrder(welcome, contribution) {
53
54
  if (welcome.group) {
54
55
  if (!isProposedApiEnabled(contribution.description, 'contribViewsWelcome')) {
55
56
  contribution.collector.warn(( localizeWithPath(
56
- 'vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution',
57
- 'ViewsWelcomeExtensionPoint.proposedAPI',
57
+ _moduleId,
58
+ 0,
58
59
  "The viewsWelcome contribution in '{0}' requires 'enabledApiProposals: [\"contribViewsWelcome\"]' in order to use the 'group' proposed property.",
59
60
  contribution.description.identifier.value
60
61
  )));
@@ -1,7 +1,8 @@
1
1
  import { localizeWithPath } from 'vscode/vscode/vs/nls';
2
2
 
3
+ const _moduleId = "vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint";
3
4
  var ViewsWelcomeExtensionPointFields;
4
- ( (function(ViewsWelcomeExtensionPointFields) {
5
+ ( ((function(ViewsWelcomeExtensionPointFields) {
5
6
  ViewsWelcomeExtensionPointFields["view"] = "view";
6
7
  ViewsWelcomeExtensionPointFields["contents"] = "contents";
7
8
  ViewsWelcomeExtensionPointFields["when"] = "when";
@@ -9,27 +10,23 @@ var ViewsWelcomeExtensionPointFields;
9
10
  ViewsWelcomeExtensionPointFields["enablement"] = "enablement";
10
11
  })(
11
12
  ViewsWelcomeExtensionPointFields || (ViewsWelcomeExtensionPointFields = {})
12
- ));
13
+ )));
13
14
  const ViewIdentifierMap = {
14
15
  'explorer': 'workbench.explorer.emptyView',
15
16
  'debug': 'workbench.debug.welcome',
16
17
  'scm': 'workbench.scm',
17
18
  'testing': 'workbench.view.testing'
18
19
  };
19
- const viewsWelcomeExtensionPointSchema = ( Object.freeze({
20
+ const viewsWelcomeExtensionPointSchema = ( (Object.freeze({
20
21
  type: 'array',
21
22
  description: ( localizeWithPath(
22
- 'vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint',
23
- 'contributes.viewsWelcome',
23
+ _moduleId,
24
+ 0,
24
25
  "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."
25
26
  )),
26
27
  items: {
27
28
  type: 'object',
28
- description: ( localizeWithPath(
29
- 'vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint',
30
- 'contributes.viewsWelcome.view',
31
- "Contributed welcome content for a specific view."
32
- )),
29
+ description: ( localizeWithPath(_moduleId, 1, "Contributed welcome content for a specific view.")),
33
30
  required: [
34
31
  ViewsWelcomeExtensionPointFields.view,
35
32
  ViewsWelcomeExtensionPointFields.contents
@@ -40,57 +37,49 @@ const viewsWelcomeExtensionPointSchema = ( Object.freeze({
40
37
  {
41
38
  type: 'string',
42
39
  description: ( localizeWithPath(
43
- 'vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint',
44
- 'contributes.viewsWelcome.view.view',
40
+ _moduleId,
41
+ 2,
45
42
  "Target view identifier for this welcome content. Only tree based views are supported."
46
43
  ))
47
44
  },
48
45
  {
49
46
  type: 'string',
50
47
  description: ( localizeWithPath(
51
- 'vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint',
52
- 'contributes.viewsWelcome.view.view',
48
+ _moduleId,
49
+ 2,
53
50
  "Target view identifier for this welcome content. Only tree based views are supported."
54
51
  )),
55
- enum: ( Object.keys(ViewIdentifierMap))
52
+ enum: ( (Object.keys(ViewIdentifierMap)))
56
53
  }
57
54
  ]
58
55
  },
59
56
  [ViewsWelcomeExtensionPointFields.contents]: {
60
57
  type: 'string',
61
58
  description: ( localizeWithPath(
62
- 'vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint',
63
- 'contributes.viewsWelcome.view.contents',
59
+ _moduleId,
60
+ 3,
64
61
  "Welcome content to be displayed. The format of the contents is a subset of Markdown, with support for links only."
65
62
  )),
66
63
  },
67
64
  [ViewsWelcomeExtensionPointFields.when]: {
68
65
  type: 'string',
69
- description: ( localizeWithPath(
70
- 'vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint',
71
- 'contributes.viewsWelcome.view.when',
72
- "Condition when the welcome content should be displayed."
73
- )),
66
+ description: ( localizeWithPath(_moduleId, 4, "Condition when the welcome content should be displayed.")),
74
67
  },
75
68
  [ViewsWelcomeExtensionPointFields.group]: {
76
69
  type: 'string',
77
- description: ( localizeWithPath(
78
- 'vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint',
79
- 'contributes.viewsWelcome.view.group',
80
- "Group to which this welcome content belongs. Proposed API."
81
- )),
70
+ description: ( localizeWithPath(_moduleId, 5, "Group to which this welcome content belongs. Proposed API.")),
82
71
  },
83
72
  [ViewsWelcomeExtensionPointFields.enablement]: {
84
73
  type: 'string',
85
74
  description: ( localizeWithPath(
86
- 'vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint',
87
- 'contributes.viewsWelcome.view.enablement',
75
+ _moduleId,
76
+ 6,
88
77
  "Condition when the welcome content buttons and command links should be enabled."
89
78
  )),
90
79
  },
91
80
  }
92
81
  }
93
- }));
82
+ })));
94
83
  const viewsWelcomeExtensionPointDescriptor = {
95
84
  extensionPoint: 'viewsWelcome',
96
85
  jsonSchema: viewsWelcomeExtensionPointSchema