@codingame/monaco-vscode-notebook-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.
Files changed (51) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +38 -48
  3. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +24 -32
  4. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +30 -53
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +3 -1
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +9 -7
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +43 -87
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +9 -12
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +35 -48
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +13 -16
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +2 -5
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +121 -79
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +13 -16
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +8 -11
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +25 -19
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +29 -30
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +107 -109
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +4 -7
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +97 -119
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +7 -18
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +199 -196
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +132 -145
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +70 -130
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +32 -92
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +39 -64
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +13 -8
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +28 -43
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +7 -7
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +2 -2
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +23 -66
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +58 -57
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +200 -278
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +33 -36
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +58 -153
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +1 -1
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +15 -14
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +5 -5
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +13 -16
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +2 -2
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +22 -29
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +5 -8
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +100 -92
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +2 -2
  44. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +4 -4
  45. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +11 -6
  46. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +6 -2
  47. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +6 -4
  48. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +1 -1
  49. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +42 -77
  50. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +43 -46
  51. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +1 -1
@@ -6,34 +6,28 @@ import { FoldingController } from 'vscode/vscode/vs/workbench/contrib/notebook/b
6
6
  import { executeIcon } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
7
7
  import { CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
8
8
 
9
+ const _moduleId = "vs/workbench/contrib/notebook/browser/controller/sectionActions";
9
10
  class NotebookRunSingleCellInSection extends Action2 {
10
11
  constructor() {
11
12
  super({
12
13
  id: 'notebook.section.runSingleCell',
13
14
  title: {
14
- ...( localize2WithPath(
15
- 'vs/workbench/contrib/notebook/browser/controller/sectionActions',
16
- 'runCell',
17
- "Run Cell"
18
- )),
19
- mnemonicTitle: ( localizeWithPath(
20
- 'vs/workbench/contrib/notebook/browser/controller/sectionActions',
21
- { key: 'mirunCell', comment: ['&& denotes a mnemonic'] },
22
- "&&Run Cell"
23
- )),
15
+ ...( localize2WithPath(_moduleId, 0, "Run Cell")),
16
+ mnemonicTitle: ( localizeWithPath(_moduleId, 1, "&&Run Cell")),
24
17
  },
25
- shortTitle: ( localizeWithPath(
26
- 'vs/workbench/contrib/notebook/browser/controller/sectionActions',
27
- 'runCell',
28
- "Run Cell"
29
- )),
18
+ shortTitle: ( localizeWithPath(_moduleId, 0, "Run Cell")),
30
19
  icon: executeIcon,
31
20
  menu: [
32
21
  {
33
22
  id: MenuId.NotebookOutlineActionMenu,
34
23
  group: 'inline',
35
24
  order: 1,
36
- when: ( ContextKeyExpr.and(( NotebookOutlineContext.CellKind.isEqualTo(CellKind.Code)), ( NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )), ( NotebookOutlineContext.CellHasChildren.toNegated()), ( NotebookOutlineContext.CellHasHeader.toNegated())))
25
+ when: ( (ContextKeyExpr.and(
26
+ (NotebookOutlineContext.CellKind.isEqualTo(CellKind.Code)),
27
+ (NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )),
28
+ (NotebookOutlineContext.CellHasChildren.toNegated()),
29
+ (NotebookOutlineContext.CellHasHeader.toNegated())
30
+ )))
37
31
  }
38
32
  ]
39
33
  });
@@ -50,22 +44,10 @@ class NotebookRunCellsInSection extends Action2 {
50
44
  super({
51
45
  id: 'notebook.section.runCells',
52
46
  title: {
53
- ...( localize2WithPath(
54
- 'vs/workbench/contrib/notebook/browser/controller/sectionActions',
55
- 'runCellsInSection',
56
- "Run Cells In Section"
57
- )),
58
- mnemonicTitle: ( localizeWithPath(
59
- 'vs/workbench/contrib/notebook/browser/controller/sectionActions',
60
- { key: 'mirunCellsInSection', comment: ['&& denotes a mnemonic'] },
61
- "&&Run Cells In Section"
62
- )),
47
+ ...( localize2WithPath(_moduleId, 2, "Run Cells In Section")),
48
+ mnemonicTitle: ( localizeWithPath(_moduleId, 3, "&&Run Cells In Section")),
63
49
  },
64
- shortTitle: ( localizeWithPath(
65
- 'vs/workbench/contrib/notebook/browser/controller/sectionActions',
66
- 'runCellsInSection',
67
- "Run Cells In Section"
68
- )),
50
+ shortTitle: ( localizeWithPath(_moduleId, 2, "Run Cells In Section")),
69
51
  menu: [
70
52
  {
71
53
  id: MenuId.NotebookStickyScrollContext,
@@ -76,7 +58,12 @@ class NotebookRunCellsInSection extends Action2 {
76
58
  id: MenuId.NotebookOutlineActionMenu,
77
59
  group: 'inline',
78
60
  order: 1,
79
- when: ( ContextKeyExpr.and(( NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)), ( NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )), NotebookOutlineContext.CellHasChildren, NotebookOutlineContext.CellHasHeader))
61
+ when: ( (ContextKeyExpr.and(
62
+ (NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)),
63
+ (NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )),
64
+ NotebookOutlineContext.CellHasChildren,
65
+ NotebookOutlineContext.CellHasHeader
66
+ )))
80
67
  }
81
68
  ]
82
69
  });
@@ -103,28 +90,22 @@ class NotebookFoldSection extends Action2 {
103
90
  super({
104
91
  id: 'notebook.section.foldSection',
105
92
  title: {
106
- ...( localize2WithPath(
107
- 'vs/workbench/contrib/notebook/browser/controller/sectionActions',
108
- 'foldSection',
109
- "Fold Section"
110
- )),
111
- mnemonicTitle: ( localizeWithPath(
112
- 'vs/workbench/contrib/notebook/browser/controller/sectionActions',
113
- { key: 'mifoldSection', comment: ['&& denotes a mnemonic'] },
114
- "&&Fold Section"
115
- )),
93
+ ...( localize2WithPath(_moduleId, 4, "Fold Section")),
94
+ mnemonicTitle: ( localizeWithPath(_moduleId, 5, "&&Fold Section")),
116
95
  },
117
- shortTitle: ( localizeWithPath(
118
- 'vs/workbench/contrib/notebook/browser/controller/sectionActions',
119
- 'foldSection',
120
- "Fold Section"
121
- )),
96
+ shortTitle: ( localizeWithPath(_moduleId, 4, "Fold Section")),
122
97
  menu: [
123
98
  {
124
99
  id: MenuId.NotebookOutlineActionMenu,
125
100
  group: 'notebookFolding',
126
101
  order: 2,
127
- when: ( ContextKeyExpr.and(( NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)), ( NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )), NotebookOutlineContext.CellHasChildren, NotebookOutlineContext.CellHasHeader, ( NotebookOutlineContext.CellFoldingState.isEqualTo(1 ))))
102
+ when: ( (ContextKeyExpr.and(
103
+ (NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)),
104
+ (NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )),
105
+ NotebookOutlineContext.CellHasChildren,
106
+ NotebookOutlineContext.CellHasHeader,
107
+ (NotebookOutlineContext.CellFoldingState.isEqualTo(1 ))
108
+ )))
128
109
  }
129
110
  ]
130
111
  });
@@ -148,28 +129,22 @@ class NotebookExpandSection extends Action2 {
148
129
  super({
149
130
  id: 'notebook.section.expandSection',
150
131
  title: {
151
- ...( localize2WithPath(
152
- 'vs/workbench/contrib/notebook/browser/controller/sectionActions',
153
- 'expandSection',
154
- "Expand Section"
155
- )),
156
- mnemonicTitle: ( localizeWithPath(
157
- 'vs/workbench/contrib/notebook/browser/controller/sectionActions',
158
- { key: 'miexpandSection', comment: ['&& denotes a mnemonic'] },
159
- "&&Expand Section"
160
- )),
132
+ ...( localize2WithPath(_moduleId, 6, "Expand Section")),
133
+ mnemonicTitle: ( localizeWithPath(_moduleId, 7, "&&Expand Section")),
161
134
  },
162
- shortTitle: ( localizeWithPath(
163
- 'vs/workbench/contrib/notebook/browser/controller/sectionActions',
164
- 'expandSection',
165
- "Expand Section"
166
- )),
135
+ shortTitle: ( localizeWithPath(_moduleId, 6, "Expand Section")),
167
136
  menu: [
168
137
  {
169
138
  id: MenuId.NotebookOutlineActionMenu,
170
139
  group: 'notebookFolding',
171
140
  order: 2,
172
- when: ( ContextKeyExpr.and(( NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)), ( NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )), NotebookOutlineContext.CellHasChildren, NotebookOutlineContext.CellHasHeader, ( NotebookOutlineContext.CellFoldingState.isEqualTo(2 ))))
141
+ when: ( (ContextKeyExpr.and(
142
+ (NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)),
143
+ (NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )),
144
+ NotebookOutlineContext.CellHasChildren,
145
+ NotebookOutlineContext.CellHasHeader,
146
+ (NotebookOutlineContext.CellFoldingState.isEqualTo(2 ))
147
+ )))
173
148
  }
174
149
  ]
175
150
  });
@@ -35,6 +35,7 @@ import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/te
35
35
  import { fixedDiffEditorOptions, fixedEditorOptions, fixedEditorPadding } from './diffCellEditorOptions.js';
36
36
  import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility.service';
37
37
  import { DiffEditorWidget } from 'vscode/vscode/vs/editor/browser/widget/diffEditor/diffEditorWidget';
38
+ import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
38
39
 
39
40
  function getOptimizedNestedCodeEditorWidgetOptions() {
40
41
  return {
@@ -50,7 +51,7 @@ function getOptimizedNestedCodeEditorWidgetOptions() {
50
51
  };
51
52
  }
52
53
  let PropertyHeader = class PropertyHeader extends Disposable {
53
- constructor(cell, propertyHeaderContainer, notebookEditor, accessor, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, themeService, telemetryService, accessibilityService) {
54
+ constructor(cell, propertyHeaderContainer, notebookEditor, accessor, contextMenuService, keybindingService, commandService, notificationService, menuService, contextKeyService, themeService, telemetryService, accessibilityService) {
54
55
  super();
55
56
  this.cell = cell;
56
57
  this.propertyHeaderContainer = propertyHeaderContainer;
@@ -58,6 +59,7 @@ let PropertyHeader = class PropertyHeader extends Disposable {
58
59
  this.accessor = accessor;
59
60
  this.contextMenuService = contextMenuService;
60
61
  this.keybindingService = keybindingService;
62
+ this.commandService = commandService;
61
63
  this.notificationService = notificationService;
62
64
  this.menuService = menuService;
63
65
  this.contextKeyService = contextKeyService;
@@ -104,7 +106,7 @@ let PropertyHeader = class PropertyHeader extends Disposable {
104
106
  }
105
107
  return undefined;
106
108
  }
107
- }, this.menuService, this.contextKeyService, this.contextMenuService, this.keybindingService, this.telemetryService));
109
+ }, this.menuService, this.contextKeyService, this.contextMenuService, this.keybindingService, this.commandService, this.telemetryService));
108
110
  this._register(this._toolbar);
109
111
  this._toolbar.context = {
110
112
  cell: this.cell
@@ -188,12 +190,13 @@ let PropertyHeader = class PropertyHeader extends Disposable {
188
190
  PropertyHeader = ( __decorate([
189
191
  ( __param(4, IContextMenuService)),
190
192
  ( __param(5, IKeybindingService)),
191
- ( __param(6, INotificationService)),
192
- ( __param(7, IMenuService)),
193
- ( __param(8, IContextKeyService)),
194
- ( __param(9, IThemeService)),
195
- ( __param(10, ITelemetryService)),
196
- ( __param(11, IAccessibilityService))
193
+ ( __param(6, ICommandService)),
194
+ ( __param(7, INotificationService)),
195
+ ( __param(8, IMenuService)),
196
+ ( __param(9, IContextKeyService)),
197
+ ( __param(10, IThemeService)),
198
+ ( __param(11, ITelemetryService)),
199
+ ( __param(12, IAccessibilityService))
197
200
  ], PropertyHeader));
198
201
  class AbstractElementRenderer extends Disposable {
199
202
  constructor(notebookEditor, cell, templateData, style, instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService) {
@@ -578,6 +581,7 @@ class SingleSideDiffElement extends AbstractElementRenderer {
578
581
  super(notebookEditor, cell, templateData, style, instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService);
579
582
  this.cell = cell;
580
583
  this.templateData = templateData;
584
+ this.updateBorders();
581
585
  }
582
586
  init() {
583
587
  this._diagonalFill = this.templateData.diagonalFill;
@@ -961,6 +965,7 @@ let ModifiedElement = class ModifiedElement extends AbstractElementRenderer {
961
965
  this.cell = cell;
962
966
  this.templateData = templateData;
963
967
  this._editorViewStateChanged = false;
968
+ this.updateBorders();
964
969
  }
965
970
  init() { }
966
971
  styleContainer(container) {
@@ -10,6 +10,7 @@ import { mimetypeIcon } from 'vscode/vscode/vs/workbench/contrib/notebook/browse
10
10
  import { StandardKeyboardEvent } from 'vscode/vscode/vs/base/browser/keyboardEvent';
11
11
  import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
12
12
 
13
+ const _moduleId = "vs/workbench/contrib/notebook/browser/diff/diffElementOutputs";
13
14
  class OutputElement extends Disposable {
14
15
  constructor(_notebookEditor, _notebookTextModel, _notebookService, _quickInputService, _diffElementViewModel, _diffSide, _nestedCell, _outputContainer, output) {
15
16
  super();
@@ -22,7 +23,7 @@ class OutputElement extends Disposable {
22
23
  this._nestedCell = _nestedCell;
23
24
  this._outputContainer = _outputContainer;
24
25
  this.output = output;
25
- this.resizeListener = this._register(( new DisposableStore()));
26
+ this.resizeListener = this._register(( (new DisposableStore())));
26
27
  }
27
28
  render(index, beforeElement) {
28
29
  const outputItemDiv = document.createElement('div');
@@ -35,10 +36,10 @@ class OutputElement extends Disposable {
35
36
  mimeTypePicker.classList.add(...ThemeIcon.asClassNameArray(mimetypeIcon));
36
37
  mimeTypePicker.tabIndex = 0;
37
38
  mimeTypePicker.title = ( localizeWithPath(
38
- 'vs/workbench/contrib/notebook/browser/diff/diffElementOutputs',
39
- 'mimeTypePicker',
39
+ _moduleId,
40
+ 0,
40
41
  "Choose a different output mimetype, available mimetypes: {0}",
41
- ( mimeTypes.map(mimeType => mimeType.mimeType)).join(', ')
42
+ ( (mimeTypes.map(mimeType => mimeType.mimeType))).join(', ')
42
43
  ));
43
44
  outputItemDiv.appendChild(mimeTypePicker);
44
45
  this.resizeListener.add(addStandardDisposableListener(mimeTypePicker, 'mousedown', async (e) => {
@@ -49,7 +50,7 @@ class OutputElement extends Disposable {
49
50
  }
50
51
  }));
51
52
  this.resizeListener.add((addDisposableListener(mimeTypePicker, EventType.KEY_DOWN, async (e) => {
52
- const event = ( new StandardKeyboardEvent(e));
53
+ const event = ( (new StandardKeyboardEvent(e)));
53
54
  if ((event.equals(3 ) || event.equals(10 ))) {
54
55
  e.preventDefault();
55
56
  e.stopPropagation();
@@ -83,18 +84,14 @@ class OutputElement extends Disposable {
83
84
  }
84
85
  _renderMissingRenderer(viewModel, preferredMimeType) {
85
86
  if (!viewModel.model.outputs.length) {
86
- return this._renderMessage(viewModel, ( localizeWithPath(
87
- 'vs/workbench/contrib/notebook/browser/diff/diffElementOutputs',
88
- 'empty',
89
- "Cell has no output"
90
- )));
87
+ return this._renderMessage(viewModel, ( localizeWithPath(_moduleId, 1, "Cell has no output")));
91
88
  }
92
89
  if (!preferredMimeType) {
93
- const mimeTypes = ( viewModel.model.outputs.map(op => op.mime));
90
+ const mimeTypes = ( (viewModel.model.outputs.map(op => op.mime)));
94
91
  const mimeTypesMessage = mimeTypes.join(', ');
95
92
  return this._renderMessage(viewModel, ( localizeWithPath(
96
- 'vs/workbench/contrib/notebook/browser/diff/diffElementOutputs',
97
- 'noRenderer.2',
93
+ _moduleId,
94
+ 2,
98
95
  "No renderer could be found for output. It has the following mimetypes: {0}",
99
96
  mimeTypesMessage
100
97
  )));
@@ -117,39 +114,31 @@ class OutputElement extends Disposable {
117
114
  }
118
115
  async pickActiveMimeTypeRenderer(notebookTextModel, viewModel) {
119
116
  const [mimeTypes, currIndex] = viewModel.resolveMimeTypes(notebookTextModel, undefined);
120
- const items = ( mimeTypes.filter(mimeType => mimeType.isTrusted).map((mimeType, index) => ({
117
+ const items = ( (mimeTypes.filter(mimeType => mimeType.isTrusted).map((mimeType, index) => ({
121
118
  label: mimeType.mimeType,
122
119
  id: mimeType.mimeType,
123
120
  index: index,
124
121
  picked: index === currIndex,
125
122
  detail: this.generateRendererInfo(mimeType.rendererId),
126
- description: index === currIndex ? ( localizeWithPath(
127
- 'vs/workbench/contrib/notebook/browser/diff/diffElementOutputs',
128
- 'curruentActiveMimeType',
129
- "Currently Active"
130
- )) : undefined
131
- })));
123
+ description: index === currIndex ? ( localizeWithPath(_moduleId, 3, "Currently Active")) : undefined
124
+ }))));
132
125
  const picker = this._quickInputService.createQuickPick();
133
126
  picker.items = items;
134
127
  picker.activeItems = items.filter(item => !!item.picked);
135
128
  picker.placeholder = items.length !== mimeTypes.length
136
129
  ? ( localizeWithPath(
137
- 'vs/workbench/contrib/notebook/browser/diff/diffElementOutputs',
138
- 'promptChooseMimeTypeInSecure.placeHolder',
130
+ _moduleId,
131
+ 4,
139
132
  "Select mimetype to render for current output. Rich mimetypes are available only when the notebook is trusted"
140
133
  ))
141
- : ( localizeWithPath(
142
- 'vs/workbench/contrib/notebook/browser/diff/diffElementOutputs',
143
- 'promptChooseMimeType.placeHolder',
144
- "Select mimetype to render for current output"
145
- ));
146
- const pick = await ( new Promise(resolve => {
134
+ : ( localizeWithPath(_moduleId, 5, "Select mimetype to render for current output"));
135
+ const pick = await ( (new Promise(resolve => {
147
136
  picker.onDidAccept(() => {
148
137
  resolve(picker.selectedItems.length === 1 ? picker.selectedItems[0].index : undefined);
149
138
  picker.dispose();
150
139
  });
151
140
  picker.show();
152
- }));
141
+ })));
153
142
  if (pick === undefined) {
154
143
  return;
155
144
  }
@@ -172,11 +161,7 @@ class OutputElement extends Disposable {
172
161
  const displayName = renderInfo.displayName !== '' ? renderInfo.displayName : renderInfo.id;
173
162
  return `${displayName} (${renderInfo.extensionId.value})`;
174
163
  }
175
- return ( localizeWithPath(
176
- 'vs/workbench/contrib/notebook/browser/diff/diffElementOutputs',
177
- 'builtinRenderInfo',
178
- "built-in"
179
- ));
164
+ return ( localizeWithPath(_moduleId, 6, "built-in"));
180
165
  }
181
166
  getCellOutputCurrentIndex() {
182
167
  return this._diffElementViewModel.getNestedCellViewModel(this._diffSide).outputs.indexOf(this.output.model);
@@ -202,7 +187,7 @@ let OutputContainer = class OutputContainer extends Disposable {
202
187
  this._outputContainer = _outputContainer;
203
188
  this._notebookService = _notebookService;
204
189
  this._quickInputService = _quickInputService;
205
- this._outputEntries = ( new Map());
190
+ this._outputEntries = ( (new Map()));
206
191
  this._register(this._diffElementViewModel.onDidLayoutChange(() => {
207
192
  this._outputEntries.forEach((value, key) => {
208
193
  const index = _nestedCellViewModel.outputs.indexOf(key.model);
@@ -232,7 +217,7 @@ let OutputContainer = class OutputContainer extends Disposable {
232
217
  let prevElement = undefined;
233
218
  const outputsToRender = this._nestedCellViewModel.outputsViewModels;
234
219
  outputsToRender.reverse().forEach(output => {
235
- if (( this._outputEntries.has(output))) {
220
+ if (( (this._outputEntries.has(output)))) {
236
221
  prevElement = this._outputEntries.get(output).domNode;
237
222
  return;
238
223
  }
@@ -259,8 +244,8 @@ let OutputContainer = class OutputContainer extends Disposable {
259
244
  });
260
245
  }
261
246
  _renderOutput(currOutput, index, beforeElement) {
262
- if (!( this._outputEntries.has(currOutput))) {
263
- this._outputEntries.set(currOutput, ( new OutputElement(
247
+ if (!( (this._outputEntries.has(currOutput)))) {
248
+ this._outputEntries.set(currOutput, ( (new OutputElement(
264
249
  this._editor,
265
250
  this._notebookTextModel,
266
251
  this._notebookService,
@@ -270,15 +255,15 @@ let OutputContainer = class OutputContainer extends Disposable {
270
255
  this._nestedCellViewModel,
271
256
  this._outputContainer,
272
257
  currOutput
273
- )));
258
+ ))));
274
259
  }
275
260
  const renderElement = this._outputEntries.get(currOutput);
276
261
  renderElement.render(index, beforeElement);
277
262
  }
278
263
  };
279
- OutputContainer = ( __decorate([
280
- ( __param(6, INotebookService)),
281
- ( __param(7, IQuickInputService))
282
- ], OutputContainer));
264
+ OutputContainer = ( (__decorate([
265
+ ( (__param(6, INotebookService))),
266
+ ( (__param(7, IQuickInputService)))
267
+ ], OutputContainer)));
283
268
 
284
269
  export { OutputContainer, OutputElement };
@@ -19,43 +19,43 @@ class DiffElementViewModelBase extends Disposable {
19
19
  this._layout({ rawOutputHeight: Math.min(OUTPUT_EDITOR_HEIGHT_MAGIC, height) });
20
20
  }
21
21
  get rawOutputHeight() {
22
- throw new Error('Use Cell.layoutInfo.rawOutputHeight');
22
+ throw ( new Error('Use Cell.layoutInfo.rawOutputHeight'));
23
23
  }
24
24
  set outputStatusHeight(height) {
25
25
  this._layout({ outputStatusHeight: height });
26
26
  }
27
27
  get outputStatusHeight() {
28
- throw new Error('Use Cell.layoutInfo.outputStatusHeight');
28
+ throw ( new Error('Use Cell.layoutInfo.outputStatusHeight'));
29
29
  }
30
30
  set outputMetadataHeight(height) {
31
31
  this._layout({ outputMetadataHeight: height });
32
32
  }
33
33
  get outputMetadataHeight() {
34
- throw new Error('Use Cell.layoutInfo.outputStatusHeight');
34
+ throw ( new Error('Use Cell.layoutInfo.outputStatusHeight'));
35
35
  }
36
36
  set editorHeight(height) {
37
37
  this._layout({ editorHeight: height });
38
38
  }
39
39
  get editorHeight() {
40
- throw new Error('Use Cell.layoutInfo.editorHeight');
40
+ throw ( new Error('Use Cell.layoutInfo.editorHeight'));
41
41
  }
42
42
  set editorMargin(margin) {
43
43
  this._layout({ editorMargin: margin });
44
44
  }
45
45
  get editorMargin() {
46
- throw new Error('Use Cell.layoutInfo.editorMargin');
46
+ throw ( new Error('Use Cell.layoutInfo.editorMargin'));
47
47
  }
48
48
  set metadataStatusHeight(height) {
49
49
  this._layout({ metadataStatusHeight: height });
50
50
  }
51
51
  get metadataStatusHeight() {
52
- throw new Error('Use Cell.layoutInfo.outputStatusHeight');
52
+ throw ( new Error('Use Cell.layoutInfo.outputStatusHeight'));
53
53
  }
54
54
  set metadataHeight(height) {
55
55
  this._layout({ metadataHeight: height });
56
56
  }
57
57
  get metadataHeight() {
58
- throw new Error('Use Cell.layoutInfo.metadataHeight');
58
+ throw ( new Error('Use Cell.layoutInfo.metadataHeight'));
59
59
  }
60
60
  set renderOutput(value) {
61
61
  this._renderOutput = value;
@@ -83,13 +83,13 @@ let DiffNestedCellViewModel = class DiffNestedCellViewModel extends Disposable {
83
83
  getOutputOffset(index) {
84
84
  this._ensureOutputsTop();
85
85
  if (index >= this._outputCollection.length) {
86
- throw new Error('Output index out of range!');
86
+ throw ( new Error('Output index out of range!'));
87
87
  }
88
88
  return this._outputsTop.getPrefixSum(index - 1);
89
89
  }
90
90
  updateOutputHeight(index, height) {
91
91
  if (index >= this._outputCollection.length) {
92
- throw new Error('Output index out of range!');
92
+ throw ( new Error('Output index out of range!'));
93
93
  }
94
94
  this._ensureOutputsTop();
95
95
  this._outputCollection[index] = height;