@codingame/monaco-vscode-notebook-service-override 4.5.0 → 4.5.2

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 (49) hide show
  1. package/index.d.ts +1 -1
  2. package/package.json +2 -2
  3. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +30 -44
  4. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +24 -32
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +30 -53
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +40 -84
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +9 -12
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +35 -48
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +13 -16
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +2 -5
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +94 -77
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +13 -16
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +8 -11
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +3 -12
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +25 -28
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +71 -89
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +4 -7
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +97 -119
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +7 -18
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +128 -177
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +132 -145
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +70 -130
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +32 -92
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +39 -64
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +28 -43
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +7 -7
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +2 -2
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +23 -66
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +58 -57
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +162 -264
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +33 -36
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +58 -153
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +1 -1
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +15 -14
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +5 -5
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +13 -16
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +2 -2
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +22 -29
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +5 -8
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +100 -92
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +2 -2
  42. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +4 -4
  43. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +2 -2
  44. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +6 -2
  45. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +6 -4
  46. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +1 -1
  47. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +41 -76
  48. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +42 -45
  49. package/notebook.d.ts +0 -5
package/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { default } from './notebook.js';
1
+ export { default } from 'vscode/service-override/notebook';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-notebook-service-override",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -29,6 +29,6 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "vscode": "npm:@codingame/monaco-vscode-api@4.5.0"
32
+ "vscode": "npm:@codingame/monaco-vscode-api@4.5.2"
33
33
  }
34
34
  }
@@ -28,8 +28,9 @@ import { SEARCH_RESULT_LANGUAGE_ID } from 'vscode/vscode/vs/workbench/services/s
28
28
  import { setupCustomHover } from 'vscode/vscode/vs/base/browser/ui/hover/updatableHoverWidget';
29
29
  import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
30
30
 
31
+ const _moduleId = "vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint";
31
32
  const $ = $$1;
32
- ( Registry.as(Extensions.ConfigurationMigration))
33
+ ( (Registry.as(Extensions.ConfigurationMigration)))
33
34
  .registerConfigurationMigrations([{
34
35
  key: 'workbench.editor.untitled.hint',
35
36
  migrateFn: (value, _accessor) => ([
@@ -120,7 +121,7 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution {
120
121
  update() {
121
122
  const shouldRenderHint = this._shouldRenderHint();
122
123
  if (shouldRenderHint && !this.textHintContentWidget) {
123
- this.textHintContentWidget = ( new EmptyTextEditorHintContentWidget(
124
+ this.textHintContentWidget = ( (new EmptyTextEditorHintContentWidget(
124
125
  this.editor,
125
126
  this._getOptions(),
126
127
  this.editorGroupsService,
@@ -130,7 +131,7 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution {
130
131
  this.inlineChatService,
131
132
  this.telemetryService,
132
133
  this.productService
133
- ));
134
+ )));
134
135
  }
135
136
  else if (!shouldRenderHint && this.textHintContentWidget) {
136
137
  this.textHintContentWidget.dispose();
@@ -142,16 +143,16 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution {
142
143
  this.textHintContentWidget?.dispose();
143
144
  }
144
145
  };
145
- EmptyTextEditorHintContribution = ( __decorate([
146
- ( __param(1, IEditorGroupsService)),
147
- ( __param(2, ICommandService)),
148
- ( __param(3, IConfigurationService)),
149
- ( __param(4, IKeybindingService)),
150
- ( __param(5, IInlineChatSessionService)),
151
- ( __param(6, IInlineChatService)),
152
- ( __param(7, ITelemetryService)),
153
- ( __param(8, IProductService))
154
- ], EmptyTextEditorHintContribution));
146
+ EmptyTextEditorHintContribution = ( (__decorate([
147
+ ( (__param(1, IEditorGroupsService))),
148
+ ( (__param(2, ICommandService))),
149
+ ( (__param(3, IConfigurationService))),
150
+ ( (__param(4, IKeybindingService))),
151
+ ( (__param(5, IInlineChatSessionService))),
152
+ ( (__param(6, IInlineChatService))),
153
+ ( (__param(7, ITelemetryService))),
154
+ ( (__param(8, IProductService)))
155
+ ], EmptyTextEditorHintContribution)));
155
156
  class EmptyTextEditorHintContentWidget {
156
157
  static { this.ID = 'editor.widget.emptyHint'; }
157
158
  constructor(editor, options, editorGroupsService, commandService, configurationService, keybindingService, inlineChatService, telemetryService, productService) {
@@ -166,7 +167,7 @@ class EmptyTextEditorHintContentWidget {
166
167
  this.productService = productService;
167
168
  this.isVisible = false;
168
169
  this.ariaLabel = '';
169
- this.toDispose = ( new DisposableStore());
170
+ this.toDispose = ( (new DisposableStore()));
170
171
  this.toDispose.add(this.editor.onDidChangeConfiguration((e) => {
171
172
  if (this.domNode && e.hasChanged(50 )) {
172
173
  this.editor.applyFontInfo(this.domNode);
@@ -210,13 +211,13 @@ class EmptyTextEditorHintContentWidget {
210
211
  const keybindingHintLabel = keybindingHint?.getLabel();
211
212
  if (keybindingHint && keybindingHintLabel) {
212
213
  const actionPart = ( localizeWithPath(
213
- 'vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint',
214
- 'emptyHintText',
214
+ _moduleId,
215
+ 0,
215
216
  'Press {0} to ask {1} to do something. ',
216
217
  keybindingHintLabel,
217
218
  providerName
218
219
  ));
219
- const [before, after] = ( actionPart.split(keybindingHintLabel).map((fragment) => {
220
+ const [before, after] = ( (actionPart.split(keybindingHintLabel).map((fragment) => {
220
221
  if (this.options.clickable) {
221
222
  const hintPart = $('a', undefined, fragment);
222
223
  hintPart.style.fontStyle = 'italic';
@@ -229,9 +230,9 @@ class EmptyTextEditorHintContentWidget {
229
230
  hintPart.style.fontStyle = 'italic';
230
231
  return hintPart;
231
232
  }
232
- }));
233
+ })));
233
234
  hintElement.appendChild(before);
234
- const label = hintHandler.disposables.add(( new KeybindingLabel(hintElement, OS)));
235
+ const label = hintHandler.disposables.add(( (new KeybindingLabel(hintElement, OS))));
235
236
  label.set(keybindingHint);
236
237
  label.element.style.width = 'min-content';
237
238
  label.element.style.display = 'inline';
@@ -240,11 +241,7 @@ class EmptyTextEditorHintContentWidget {
240
241
  this.toDispose.add(addDisposableListener(label.element, EventType.CLICK, handleClick));
241
242
  }
242
243
  hintElement.appendChild(after);
243
- const typeToDismiss = ( localizeWithPath(
244
- 'vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint',
245
- 'emptyHintTextDismiss',
246
- 'Start typing to dismiss.'
247
- ));
244
+ const typeToDismiss = ( localizeWithPath(_moduleId, 1, 'Start typing to dismiss.'));
248
245
  const textHint2 = $('span', undefined, typeToDismiss);
249
246
  textHint2.style.fontStyle = 'italic';
250
247
  hintElement.appendChild(textHint2);
@@ -252,13 +249,8 @@ class EmptyTextEditorHintContentWidget {
252
249
  }
253
250
  else {
254
251
  const hintMsg = ( localizeWithPath(
255
- 'vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint',
256
- {
257
- key: 'inlineChatHint',
258
- comment: [
259
- 'Preserve double-square brackets and their order',
260
- ]
261
- },
252
+ _moduleId,
253
+ 2,
262
254
  '[[Ask {0} to do something]] or start typing to dismiss.',
263
255
  providerName
264
256
  ));
@@ -323,14 +315,8 @@ class EmptyTextEditorHintContentWidget {
323
315
  this.editor.focus();
324
316
  };
325
317
  const hintMsg = ( localizeWithPath(
326
- 'vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint',
327
- {
328
- key: 'message',
329
- comment: [
330
- 'Preserve double-square brackets and their order',
331
- 'language refers to a programming language'
332
- ]
333
- },
318
+ _moduleId,
319
+ 3,
334
320
  '[[Select a language]], or [[fill with template]], or [[open a different editor]] to get started.\nStart typing to dismiss or [[don\'t show]] this again.'
335
321
  ));
336
322
  const hintElement = renderFormattedText(hintMsg, {
@@ -339,10 +325,10 @@ class EmptyTextEditorHintContentWidget {
339
325
  });
340
326
  hintElement.style.fontStyle = 'italic';
341
327
  const keybindingsLookup = [ChangeLanguageAction.ID, ApplyFileSnippetAction.Id, 'welcome.showNewFileEntries'];
342
- const keybindingLabels = ( keybindingsLookup.map((id) => this.keybindingService.lookupKeybinding(id)?.getLabel() ?? id));
328
+ const keybindingLabels = ( (keybindingsLookup.map((id) => this.keybindingService.lookupKeybinding(id)?.getLabel() ?? id)));
343
329
  const ariaLabel = ( localizeWithPath(
344
- 'vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint',
345
- 'defaultHintAriaLabel',
330
+ _moduleId,
331
+ 4,
346
332
  'Execute {0} to select a language, execute {1} to fill with template, or execute {2} to open a different editor and get started. Start typing to dismiss.',
347
333
  ...keybindingLabels
348
334
  ));
@@ -363,8 +349,8 @@ class EmptyTextEditorHintContentWidget {
363
349
  const { hintElement, ariaLabel } = !inlineChatProviders.length ? this._getHintDefault() : this._getHintInlineChat(inlineChatProviders);
364
350
  this.domNode.append(hintElement);
365
351
  this.ariaLabel = ariaLabel.concat(( localizeWithPath(
366
- 'vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint',
367
- 'disableHint',
352
+ _moduleId,
353
+ 5,
368
354
  ' Toggle {0} in settings to disable this hint.',
369
355
  "accessibility.verbosity.emptyEditorHint"
370
356
  )));
@@ -15,6 +15,7 @@ import { INotebookKernelService } from 'vscode/vscode/vs/workbench/contrib/noteb
15
15
  import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
16
16
  import { ILanguageDetectionService } from 'vscode/vscode/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.service';
17
17
 
18
+ const _moduleId = "vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders";
18
19
  let CellStatusBarLanguagePickerProvider = class CellStatusBarLanguagePickerProvider {
19
20
  constructor(_notebookService, _languageService) {
20
21
  this._notebookService = _notebookService;
@@ -39,8 +40,8 @@ let CellStatusBarLanguagePickerProvider = class CellStatusBarLanguagePickerProvi
39
40
  }
40
41
  else {
41
42
  const searchTooltip = ( localizeWithPath(
42
- 'vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders',
43
- 'notebook.cell.status.searchLanguageExtensions',
43
+ _moduleId,
44
+ 0,
44
45
  "Unknown cell language. Click to search for '{0}' extensions",
45
46
  cell.language
46
47
  ));
@@ -56,11 +57,7 @@ let CellStatusBarLanguagePickerProvider = class CellStatusBarLanguagePickerProvi
56
57
  statusBarItems.push({
57
58
  text: displayLanguage,
58
59
  command: CHANGE_CELL_LANGUAGE,
59
- tooltip: ( localizeWithPath(
60
- 'vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders',
61
- 'notebook.cell.status.language',
62
- "Select Cell Language Mode"
63
- )),
60
+ tooltip: ( localizeWithPath(_moduleId, 1, "Select Cell Language Mode")),
64
61
  alignment: 2 ,
65
62
  priority: -Number.MAX_SAFE_INTEGER
66
63
  });
@@ -69,10 +66,10 @@ let CellStatusBarLanguagePickerProvider = class CellStatusBarLanguagePickerProvi
69
66
  };
70
67
  }
71
68
  };
72
- CellStatusBarLanguagePickerProvider = ( __decorate([
73
- ( __param(0, INotebookService)),
74
- ( __param(1, ILanguageService))
75
- ], CellStatusBarLanguagePickerProvider));
69
+ CellStatusBarLanguagePickerProvider = ( (__decorate([
70
+ ( (__param(0, INotebookService))),
71
+ ( (__param(1, ILanguageService)))
72
+ ], CellStatusBarLanguagePickerProvider)));
76
73
  let CellStatusBarLanguageDetectionProvider = class CellStatusBarLanguageDetectionProvider {
77
74
  constructor(_notebookService, _notebookKernelService, _languageService, _configurationService, _languageDetectionService, _keybindingService) {
78
75
  this._notebookService = _notebookService;
@@ -82,7 +79,7 @@ let CellStatusBarLanguageDetectionProvider = class CellStatusBarLanguageDetectio
82
79
  this._languageDetectionService = _languageDetectionService;
83
80
  this._keybindingService = _keybindingService;
84
81
  this.viewType = '*';
85
- this.cache = ( new ResourceMap());
82
+ this.cache = ( (new ResourceMap()));
86
83
  }
87
84
  async provideCellStatusBarItems(uri, index, token) {
88
85
  const doc = this._notebookService.getNotebookTextModel(uri);
@@ -103,7 +100,7 @@ let CellStatusBarLanguageDetectionProvider = class CellStatusBarLanguageDetectio
103
100
  const currentLanguageId = cell.cellKind === CellKind.Markup ?
104
101
  'markdown' :
105
102
  (this._languageService.getLanguageIdByLanguageName(cell.language) || cell.language);
106
- if (!( this.cache.has(cellUri))) {
103
+ if (!( (this.cache.has(cellUri)))) {
107
104
  this.cache.set(cellUri, {
108
105
  cellLanguage: currentLanguageId,
109
106
  updateTimestamp: 0,
@@ -124,12 +121,7 @@ let CellStatusBarLanguageDetectionProvider = class CellStatusBarLanguageDetectio
124
121
  const items = [];
125
122
  if (cached.guess && currentLanguageId !== cached.guess) {
126
123
  const detectedName = this._languageService.getLanguageName(cached.guess) || cached.guess;
127
- let tooltip = ( localizeWithPath(
128
- 'vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders',
129
- 'notebook.cell.status.autoDetectLanguage',
130
- "Accept Detected Language: {0}",
131
- detectedName
132
- ));
124
+ let tooltip = ( localizeWithPath(_moduleId, 2, "Accept Detected Language: {0}", detectedName));
133
125
  const keybinding = this._keybindingService.lookupKeybinding(DETECT_CELL_LANGUAGE);
134
126
  const label = keybinding?.getLabel();
135
127
  if (label) {
@@ -146,14 +138,14 @@ let CellStatusBarLanguageDetectionProvider = class CellStatusBarLanguageDetectio
146
138
  return { items };
147
139
  }
148
140
  };
149
- CellStatusBarLanguageDetectionProvider = ( __decorate([
150
- ( __param(0, INotebookService)),
151
- ( __param(1, INotebookKernelService)),
152
- ( __param(2, ILanguageService)),
153
- ( __param(3, IConfigurationService)),
154
- ( __param(4, ILanguageDetectionService)),
155
- ( __param(5, IKeybindingService))
156
- ], CellStatusBarLanguageDetectionProvider));
141
+ CellStatusBarLanguageDetectionProvider = ( (__decorate([
142
+ ( (__param(0, INotebookService))),
143
+ ( (__param(1, INotebookKernelService))),
144
+ ( (__param(2, ILanguageService))),
145
+ ( (__param(3, IConfigurationService))),
146
+ ( (__param(4, ILanguageDetectionService))),
147
+ ( (__param(5, IKeybindingService)))
148
+ ], CellStatusBarLanguageDetectionProvider)));
157
149
  let BuiltinCellStatusBarProviders = class BuiltinCellStatusBarProviders extends Disposable {
158
150
  constructor(instantiationService, notebookCellStatusBarService) {
159
151
  super();
@@ -166,8 +158,8 @@ let BuiltinCellStatusBarProviders = class BuiltinCellStatusBarProviders extends
166
158
  });
167
159
  }
168
160
  };
169
- BuiltinCellStatusBarProviders = ( __decorate([
170
- ( __param(0, IInstantiationService)),
171
- ( __param(1, INotebookCellStatusBarService))
172
- ], BuiltinCellStatusBarProviders));
173
- ( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(BuiltinCellStatusBarProviders, 3 );
161
+ BuiltinCellStatusBarProviders = ( (__decorate([
162
+ ( (__param(0, IInstantiationService))),
163
+ ( (__param(1, INotebookCellStatusBarService)))
164
+ ], BuiltinCellStatusBarProviders)));
165
+ ( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(BuiltinCellStatusBarProviders, 3 );
@@ -22,6 +22,7 @@ import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/comma
22
22
  import { showWindowLogActionId } from 'vscode/vscode/vs/workbench/services/log/common/logConstants';
23
23
  import { getWindow, getActiveElement, isAncestor } from 'vscode/vscode/vs/base/browser/dom';
24
24
 
25
+ const _moduleId = "vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard";
25
26
  let _logging = false;
26
27
  function toggleLogging() {
27
28
  _logging = !_logging;
@@ -111,7 +112,7 @@ function runPasteCells(editor, activeCell, pasteCells) {
111
112
  editType: 1 ,
112
113
  index: newFocusIndex,
113
114
  count: 0,
114
- cells: ( pasteCells.items.map(cell => cloneNotebookCellTextModel(cell)))
115
+ cells: ( (pasteCells.items.map(cell => cloneNotebookCellTextModel(cell))))
115
116
  }
116
117
  ], true, originalState, () => ({
117
118
  kind: SelectionStateType.Index,
@@ -128,7 +129,7 @@ function runPasteCells(editor, activeCell, pasteCells) {
128
129
  editType: 1 ,
129
130
  index: 0,
130
131
  count: 0,
131
- cells: ( pasteCells.items.map(cell => cloneNotebookCellTextModel(cell)))
132
+ cells: ( (pasteCells.items.map(cell => cloneNotebookCellTextModel(cell))))
132
133
  }
133
134
  ], true, originalState, () => ({
134
135
  kind: SelectionStateType.Index,
@@ -163,8 +164,8 @@ function runCopyCells(accessor, editor, targetCell) {
163
164
  if (!selectedCells.length) {
164
165
  return false;
165
166
  }
166
- clipboardService.writeText(( selectedCells.map(cell => cell.getText())).join('\n'));
167
- notebookService.setToCopy(( selectedCells.map(cell => cell.model)), true);
167
+ clipboardService.writeText(( (selectedCells.map(cell => cell.getText()))).join('\n'));
168
+ notebookService.setToCopy(( (selectedCells.map(cell => cell.model))), true);
168
169
  return true;
169
170
  }
170
171
  function runCutCells(accessor, editor, targetCell) {
@@ -182,9 +183,9 @@ function runCutCells(accessor, editor, targetCell) {
182
183
  clipboardService.writeText(targetCell.getText());
183
184
  const focus = editor.getFocus();
184
185
  const newFocus = focus.end <= targetCellIndex ? focus : { start: focus.start - 1, end: focus.end - 1 };
185
- const newSelections = ( selections.map(
186
+ const newSelections = ( (selections.map(
186
187
  selection => (selection.end <= targetCellIndex ? selection : { start: selection.start - 1, end: selection.end - 1 })
187
- ));
188
+ )));
188
189
  textModel.applyEdits([
189
190
  { editType: 1 , index: targetCellIndex, count: 1, cells: [] }
190
191
  ], true, { kind: SelectionStateType.Index, focus: editor.getFocus(), selections: selections }, () => ({ kind: SelectionStateType.Index, focus: newFocus, selections: newSelections }), undefined, true);
@@ -198,9 +199,9 @@ function runCutCells(accessor, editor, targetCell) {
198
199
  const targetCell = editor.cellAt(focus.start);
199
200
  clipboardService.writeText(targetCell.getText());
200
201
  const newFocus = focus.end === editor.getLength() ? { start: focus.start - 1, end: focus.end - 1 } : focus;
201
- const newSelections = ( selections.map(
202
+ const newSelections = ( (selections.map(
202
203
  selection => (selection.end <= focus.start ? selection : { start: selection.start - 1, end: selection.end - 1 })
203
- ));
204
+ )));
204
205
  textModel.applyEdits([
205
206
  { editType: 1 , index: focus.start, count: 1, cells: [] }
206
207
  ], true, { kind: SelectionStateType.Index, focus: editor.getFocus(), selections: selections }, () => ({ kind: SelectionStateType.Index, focus: newFocus, selections: newSelections }), undefined, true);
@@ -212,10 +213,10 @@ function runCutCells(accessor, editor, targetCell) {
212
213
  if (!selectedCells.length) {
213
214
  return false;
214
215
  }
215
- clipboardService.writeText(( selectedCells.map(cell => cell.getText())).join('\n'));
216
- const edits = ( selectionRanges.map(
216
+ clipboardService.writeText(( (selectedCells.map(cell => cell.getText()))).join('\n'));
217
+ const edits = ( (selectionRanges.map(
217
218
  range => ({ editType: 1 , index: range.start, count: range.end - range.start, cells: [] })
218
- ));
219
+ )));
219
220
  const firstSelectIndex = selectionRanges[0].start;
220
221
  const newFocusedCellIndex = firstSelectIndex < textModel.cells.length - 1
221
222
  ? firstSelectIndex
@@ -227,7 +228,7 @@ function runCutCells(accessor, editor, targetCell) {
227
228
  selections: [{ start: newFocusedCellIndex, end: newFocusedCellIndex + 1 }]
228
229
  };
229
230
  }, undefined, true);
230
- notebookService.setToCopy(( selectedCells.map(cell => cell.model)), false);
231
+ notebookService.setToCopy(( (selectedCells.map(cell => cell.model))), false);
231
232
  return true;
232
233
  }
233
234
  let NotebookClipboardContribution = class NotebookClipboardContribution extends Disposable {
@@ -335,9 +336,9 @@ let NotebookClipboardContribution = class NotebookClipboardContribution extends
335
336
  return runCutCells(accessor, editor, undefined);
336
337
  }
337
338
  };
338
- NotebookClipboardContribution = ( __decorate([
339
- ( __param(0, IEditorService))
340
- ], NotebookClipboardContribution));
339
+ NotebookClipboardContribution = ( (__decorate([
340
+ ( (__param(0, IEditorService)))
341
+ ], NotebookClipboardContribution)));
341
342
  registerWorkbenchContribution2(NotebookClipboardContribution.ID, NotebookClipboardContribution, 2 );
342
343
  const COPY_CELL_COMMAND_ID = 'notebook.cell.copy';
343
344
  const CUT_CELL_COMMAND_ID = 'notebook.cell.cut';
@@ -347,11 +348,7 @@ registerAction2(class extends NotebookCellAction {
347
348
  constructor() {
348
349
  super({
349
350
  id: COPY_CELL_COMMAND_ID,
350
- title: ( localizeWithPath(
351
- 'vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard',
352
- 'notebookActions.copy',
353
- "Copy Cell"
354
- )),
351
+ title: ( localizeWithPath(_moduleId, 0, "Copy Cell")),
355
352
  menu: {
356
353
  id: MenuId.NotebookCellTitle,
357
354
  when: NOTEBOOK_EDITOR_FOCUSED,
@@ -361,7 +358,7 @@ registerAction2(class extends NotebookCellAction {
361
358
  keybinding: isNative ? undefined : {
362
359
  primary: 2048 | 33 ,
363
360
  win: { primary: 2048 | 33 , secondary: [2048 | 19 ] },
364
- when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
361
+ when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
365
362
  weight: 200
366
363
  }
367
364
  });
@@ -374,19 +371,15 @@ registerAction2(class extends NotebookCellAction {
374
371
  constructor() {
375
372
  super({
376
373
  id: CUT_CELL_COMMAND_ID,
377
- title: ( localizeWithPath(
378
- 'vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard',
379
- 'notebookActions.cut',
380
- "Cut Cell"
381
- )),
374
+ title: ( localizeWithPath(_moduleId, 1, "Cut Cell")),
382
375
  menu: {
383
376
  id: MenuId.NotebookCellTitle,
384
- when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE)),
377
+ when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE))),
385
378
  group: "1_copy" ,
386
379
  order: 1,
387
380
  },
388
381
  keybinding: isNative ? undefined : {
389
- when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
382
+ when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
390
383
  primary: 2048 | 54 ,
391
384
  win: { primary: 2048 | 54 , secondary: [1024 | 20 ] },
392
385
  weight: 200
@@ -401,19 +394,15 @@ registerAction2(class extends NotebookAction {
401
394
  constructor() {
402
395
  super({
403
396
  id: PASTE_CELL_COMMAND_ID,
404
- title: ( localizeWithPath(
405
- 'vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard',
406
- 'notebookActions.paste',
407
- "Paste Cell"
408
- )),
397
+ title: ( localizeWithPath(_moduleId, 2, "Paste Cell")),
409
398
  menu: {
410
399
  id: MenuId.NotebookCellTitle,
411
- when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE)),
400
+ when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE))),
412
401
  group: "1_copy" ,
413
402
  order: 3,
414
403
  },
415
404
  keybinding: isNative ? undefined : {
416
- when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
405
+ when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
417
406
  primary: 2048 | 52 ,
418
407
  win: { primary: 2048 | 52 , secondary: [1024 | 19 ] },
419
408
  linux: { primary: 2048 | 52 , secondary: [1024 | 19 ] },
@@ -437,13 +426,9 @@ registerAction2(class extends NotebookCellAction {
437
426
  constructor() {
438
427
  super({
439
428
  id: PASTE_CELL_ABOVE_COMMAND_ID,
440
- title: ( localizeWithPath(
441
- 'vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard',
442
- 'notebookActions.pasteAbove',
443
- "Paste Cell Above"
444
- )),
429
+ title: ( localizeWithPath(_moduleId, 3, "Paste Cell Above")),
445
430
  keybinding: {
446
- when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
431
+ when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
447
432
  primary: 2048 | 1024 | 52 ,
448
433
  weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
449
434
  },
@@ -472,7 +457,7 @@ registerAction2(class extends NotebookCellAction {
472
457
  editType: 1 ,
473
458
  index: currCellIndex,
474
459
  count: 0,
475
- cells: ( pasteCells.items.map(cell => cloneNotebookCellTextModel(cell)))
460
+ cells: ( (pasteCells.items.map(cell => cloneNotebookCellTextModel(cell))))
476
461
  }
477
462
  ], true, originalState, () => ({
478
463
  kind: SelectionStateType.Index,
@@ -485,11 +470,7 @@ registerAction2(class extends Action2 {
485
470
  constructor() {
486
471
  super({
487
472
  id: 'workbench.action.toggleNotebookClipboardLog',
488
- title: ( localize2WithPath(
489
- 'vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard',
490
- 'toggleNotebookClipboardLog',
491
- 'Toggle Notebook Clipboard Troubleshooting'
492
- )),
473
+ title: ( localize2WithPath(_moduleId, 4, 'Toggle Notebook Clipboard Troubleshooting')),
493
474
  category: Categories.Developer,
494
475
  f1: true
495
476
  });
@@ -506,14 +487,10 @@ registerAction2(class extends NotebookCellAction {
506
487
  constructor() {
507
488
  super({
508
489
  id: 'notebook.cell.output.selectAll',
509
- title: ( localizeWithPath(
510
- 'vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard',
511
- 'notebook.cell.output.selectAll',
512
- "Select All"
513
- )),
490
+ title: ( localizeWithPath(_moduleId, 5, "Select All")),
514
491
  keybinding: {
515
492
  primary: 2048 | 31 ,
516
- when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED)),
493
+ when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED))),
517
494
  weight: NOTEBOOK_OUTPUT_WEBVIEW_ACTION_WEIGHT
518
495
  }
519
496
  });