@codingame/monaco-vscode-notebook-service-override 8.0.4 → 9.0.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 (58) hide show
  1. package/package.json +3 -2
  2. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +8 -8
  3. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +21 -21
  4. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +2 -2
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +1 -1
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +3 -3
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +6 -6
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +26 -24
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +2 -2
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +4 -4
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +1 -1
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +1 -1
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +624 -0
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +13 -13
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +1 -1
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +1 -1
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +4 -5
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +1 -1
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +9 -9
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +1 -1
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +12 -12
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +3 -3
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +24 -24
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +54 -55
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +22 -22
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +24 -24
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +23 -21
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +7 -7
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +12 -12
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +297 -21
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +124 -73
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +27 -19
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +33 -33
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +62 -39
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +7 -6
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +1 -1
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +3 -3
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +7 -1
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +18 -6
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +15 -40
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +0 -1
  42. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +28 -0
  43. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +55 -45
  44. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +6 -6
  45. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +12 -12
  46. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +1 -1
  47. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +0 -47
  48. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +0 -1303
  49. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +0 -267
  50. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +0 -569
  51. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +0 -115
  52. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +0 -39
  53. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css.js +0 -6
  54. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +0 -903
  55. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +0 -13
  56. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +0 -397
  57. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +0 -186
  58. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +0 -107
@@ -1,1303 +0,0 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
- import { append, $, reset, scheduleAtNextAnimationFrame, getWindow } from 'vscode/vscode/vs/base/browser/dom';
3
- import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
4
- import { Schemas } from 'vscode/vscode/vs/base/common/network';
5
- import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
6
- import { PropertyFoldingState, SideBySideDiffElementViewModel, getFormattedMetadataJSON, getFormattedOutputJSON, OUTPUT_EDITOR_HEIGHT_MAGIC, OutputComparison, outputEqual } from './diffElementViewModel.js';
7
- import { NOTEBOOK_DIFF_CELL_PROPERTY, NOTEBOOK_DIFF_CELL_PROPERTY_EXPANDED, DIFF_CELL_MARGIN, DiffSide, NOTEBOOK_DIFF_CELL_INPUT } from './notebookDiffEditorBrowser.js';
8
- import { CodeEditorWidget } from 'vscode/vscode/vs/editor/browser/widget/codeEditor/codeEditorWidget';
9
- import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
10
- import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
11
- import { CellEditType, CellUri } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
12
- import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
13
- import { MenuItemAction, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
14
- import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
15
- import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
16
- import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
17
- import { createAndFillInActionBarActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
18
- import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
19
- import { CodiconActionViewItem } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView';
20
- import { collapsedIcon, expandedIcon } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
21
- import { OutputContainer } from './diffElementOutputs.js';
22
- import { EditorExtensionsRegistry } from 'vscode/vscode/vs/editor/browser/editorExtensions';
23
- import { ContextMenuController } from 'vscode/vscode/vs/editor/contrib/contextmenu/browser/contextmenu';
24
- import { SnippetController2 } from 'vscode/vscode/vs/editor/contrib/snippet/browser/snippetController2';
25
- import { SuggestController } from 'vscode/vscode/vs/editor/contrib/suggest/browser/suggestController';
26
- import { MenuPreventer } from 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/menuPreventer';
27
- import { SelectionClipboardContributionID } from 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/selectionClipboard';
28
- import { TabCompletionController } from 'vscode/vscode/vs/workbench/contrib/snippets/browser/tabCompletion';
29
- import { renderIcon } from 'vscode/vscode/vs/base/browser/ui/iconLabel/iconLabels';
30
- import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
31
- import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
32
- import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
33
- import { WorkbenchToolBar } from 'vscode/vscode/vs/platform/actions/browser/toolbar';
34
- import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
35
- import { fixedDiffEditorOptions, fixedEditorOptions, fixedEditorPadding } from './diffCellEditorOptions.js';
36
- import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
37
- import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility.service';
38
- import { DiffEditorWidget } from 'vscode/vscode/vs/editor/browser/widget/diffEditor/diffEditorWidget';
39
- import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
40
-
41
- function getOptimizedNestedCodeEditorWidgetOptions() {
42
- return {
43
- isSimpleWidget: false,
44
- contributions: EditorExtensionsRegistry.getSomeEditorContributions([
45
- MenuPreventer.ID,
46
- SelectionClipboardContributionID,
47
- ContextMenuController.ID,
48
- SuggestController.ID,
49
- SnippetController2.ID,
50
- TabCompletionController.ID,
51
- ])
52
- };
53
- }
54
- let PropertyHeader = class PropertyHeader extends Disposable {
55
- constructor(cell, propertyHeaderContainer, notebookEditor, accessor, contextMenuService, keybindingService, commandService, notificationService, menuService, contextKeyService, themeService, telemetryService, accessibilityService) {
56
- super();
57
- this.cell = cell;
58
- this.propertyHeaderContainer = propertyHeaderContainer;
59
- this.notebookEditor = notebookEditor;
60
- this.accessor = accessor;
61
- this.contextMenuService = contextMenuService;
62
- this.keybindingService = keybindingService;
63
- this.commandService = commandService;
64
- this.notificationService = notificationService;
65
- this.menuService = menuService;
66
- this.contextKeyService = contextKeyService;
67
- this.themeService = themeService;
68
- this.telemetryService = telemetryService;
69
- this.accessibilityService = accessibilityService;
70
- }
71
- buildHeader() {
72
- const metadataChanged = this.accessor.checkIfModified(this.cell);
73
- this._foldingIndicator = append(this.propertyHeaderContainer, $('.property-folding-indicator'));
74
- this._foldingIndicator.classList.add(this.accessor.prefix);
75
- this._updateFoldingIcon();
76
- const metadataStatus = append(this.propertyHeaderContainer, $('div.property-status'));
77
- this._statusSpan = append(metadataStatus, $('span'));
78
- this._description = append(metadataStatus, $('span.property-description'));
79
- if (metadataChanged) {
80
- this._statusSpan.textContent = this.accessor.changedLabel;
81
- this._statusSpan.style.fontWeight = 'bold';
82
- if (metadataChanged.reason) {
83
- this._description.textContent = metadataChanged.reason;
84
- }
85
- this.propertyHeaderContainer.classList.add('modified');
86
- }
87
- else {
88
- this._statusSpan.textContent = this.accessor.unChangedLabel;
89
- this._description.textContent = '';
90
- this.propertyHeaderContainer.classList.remove('modified');
91
- }
92
- const cellToolbarContainer = append(this.propertyHeaderContainer, $('div.property-toolbar'));
93
- this._toolbar = ( new WorkbenchToolBar(cellToolbarContainer, {
94
- actionViewItemProvider: (action, options) => {
95
- if (action instanceof MenuItemAction) {
96
- const item = ( new CodiconActionViewItem(
97
- action,
98
- { hoverDelegate: options.hoverDelegate },
99
- this.keybindingService,
100
- this.notificationService,
101
- this.contextKeyService,
102
- this.themeService,
103
- this.contextMenuService,
104
- this.accessibilityService
105
- ));
106
- return item;
107
- }
108
- return undefined;
109
- }
110
- }, this.menuService, this.contextKeyService, this.contextMenuService, this.keybindingService, this.commandService, this.telemetryService));
111
- this._register(this._toolbar);
112
- this._toolbar.context = {
113
- cell: this.cell
114
- };
115
- const scopedContextKeyService = this.contextKeyService.createScoped(cellToolbarContainer);
116
- this._register(scopedContextKeyService);
117
- const propertyChanged = NOTEBOOK_DIFF_CELL_PROPERTY.bindTo(scopedContextKeyService);
118
- propertyChanged.set(!!metadataChanged);
119
- this._propertyExpanded = NOTEBOOK_DIFF_CELL_PROPERTY_EXPANDED.bindTo(scopedContextKeyService);
120
- this._menu = this.menuService.createMenu(this.accessor.menuId, scopedContextKeyService);
121
- this._register(this._menu);
122
- const actions = [];
123
- createAndFillInActionBarActions(this._menu, { shouldForwardArgs: true }, actions);
124
- this._toolbar.setActions(actions);
125
- this._register(this._menu.onDidChange(() => {
126
- const actions = [];
127
- createAndFillInActionBarActions(this._menu, { shouldForwardArgs: true }, actions);
128
- this._toolbar.setActions(actions);
129
- }));
130
- this._register(this.notebookEditor.onMouseUp(e => {
131
- if (!e.event.target) {
132
- return;
133
- }
134
- const target = e.event.target;
135
- if (target.classList.contains('codicon-notebook-collapsed') || target.classList.contains('codicon-notebook-expanded')) {
136
- const parent = target.parentElement;
137
- if (!parent) {
138
- return;
139
- }
140
- if (!parent.classList.contains(this.accessor.prefix)) {
141
- return;
142
- }
143
- if (!parent.classList.contains('property-folding-indicator')) {
144
- return;
145
- }
146
- const cellViewModel = e.target;
147
- if (cellViewModel === this.cell) {
148
- const oldFoldingState = this.accessor.getFoldingState(this.cell);
149
- this.accessor.updateFoldingState(this.cell, oldFoldingState === PropertyFoldingState.Expanded ? PropertyFoldingState.Collapsed : PropertyFoldingState.Expanded);
150
- this._updateFoldingIcon();
151
- this.accessor.updateInfoRendering(this.cell.renderOutput);
152
- }
153
- }
154
- return;
155
- }));
156
- this._updateFoldingIcon();
157
- this.accessor.updateInfoRendering(this.cell.renderOutput);
158
- }
159
- refresh() {
160
- const metadataChanged = this.accessor.checkIfModified(this.cell);
161
- if (metadataChanged) {
162
- this._statusSpan.textContent = this.accessor.changedLabel;
163
- this._statusSpan.style.fontWeight = 'bold';
164
- if (metadataChanged.reason) {
165
- this._description.textContent = metadataChanged.reason;
166
- }
167
- this.propertyHeaderContainer.classList.add('modified');
168
- const actions = [];
169
- createAndFillInActionBarActions(this._menu, undefined, actions);
170
- this._toolbar.setActions(actions);
171
- }
172
- else {
173
- this._statusSpan.textContent = this.accessor.unChangedLabel;
174
- this._statusSpan.style.fontWeight = 'normal';
175
- this._description.textContent = '';
176
- this.propertyHeaderContainer.classList.remove('modified');
177
- this._toolbar.setActions([]);
178
- }
179
- }
180
- _updateFoldingIcon() {
181
- if (this.accessor.getFoldingState(this.cell) === PropertyFoldingState.Collapsed) {
182
- reset(this._foldingIndicator, renderIcon(collapsedIcon));
183
- this._propertyExpanded?.set(false);
184
- }
185
- else {
186
- reset(this._foldingIndicator, renderIcon(expandedIcon));
187
- this._propertyExpanded?.set(true);
188
- }
189
- }
190
- };
191
- PropertyHeader = ( __decorate([
192
- ( __param(4, IContextMenuService)),
193
- ( __param(5, IKeybindingService)),
194
- ( __param(6, ICommandService)),
195
- ( __param(7, INotificationService)),
196
- ( __param(8, IMenuService)),
197
- ( __param(9, IContextKeyService)),
198
- ( __param(10, IThemeService)),
199
- ( __param(11, ITelemetryService)),
200
- ( __param(12, IAccessibilityService))
201
- ], PropertyHeader));
202
- class AbstractElementRenderer extends Disposable {
203
- constructor(notebookEditor, cell, templateData, style, instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService) {
204
- super();
205
- this.notebookEditor = notebookEditor;
206
- this.cell = cell;
207
- this.templateData = templateData;
208
- this.style = style;
209
- this.instantiationService = instantiationService;
210
- this.languageService = languageService;
211
- this.modelService = modelService;
212
- this.textModelService = textModelService;
213
- this.contextMenuService = contextMenuService;
214
- this.keybindingService = keybindingService;
215
- this.notificationService = notificationService;
216
- this.menuService = menuService;
217
- this.contextKeyService = contextKeyService;
218
- this.configurationService = configurationService;
219
- this._metadataLocalDisposable = this._register(( new DisposableStore()));
220
- this._outputLocalDisposable = this._register(( new DisposableStore()));
221
- this._ignoreMetadata = false;
222
- this._ignoreOutputs = false;
223
- this._isDisposed = false;
224
- this._metadataEditorDisposeStore = this._register(( new DisposableStore()));
225
- this._outputEditorDisposeStore = this._register(( new DisposableStore()));
226
- this._register(cell.onDidLayoutChange(e => this.layout(e)));
227
- this._register(cell.onDidLayoutChange(e => this.updateBorders()));
228
- this.init();
229
- this.buildBody();
230
- this._register(cell.onDidStateChange(() => {
231
- this.updateOutputRendering(this.cell.renderOutput);
232
- }));
233
- }
234
- buildBody() {
235
- const body = this.templateData.body;
236
- this._diffEditorContainer = this.templateData.diffEditorContainer;
237
- body.classList.remove('left', 'right', 'full');
238
- switch (this.style) {
239
- case 'left':
240
- body.classList.add('left');
241
- break;
242
- case 'right':
243
- body.classList.add('right');
244
- break;
245
- default:
246
- body.classList.add('full');
247
- break;
248
- }
249
- this.styleContainer(this._diffEditorContainer);
250
- this.updateSourceEditor();
251
- this._ignoreMetadata = this.configurationService.getValue('notebook.diff.ignoreMetadata');
252
- if (this._ignoreMetadata) {
253
- this._disposeMetadata();
254
- }
255
- else {
256
- this._buildMetadata();
257
- }
258
- this._ignoreOutputs = this.configurationService.getValue('notebook.diff.ignoreOutputs') || !!(this.notebookEditor.textModel?.transientOptions.transientOutputs);
259
- if (this._ignoreOutputs) {
260
- this._disposeOutput();
261
- }
262
- else {
263
- this._buildOutput();
264
- }
265
- this._register(this.configurationService.onDidChangeConfiguration(e => {
266
- let metadataLayoutChange = false;
267
- let outputLayoutChange = false;
268
- if (e.affectsConfiguration('notebook.diff.ignoreMetadata')) {
269
- const newValue = this.configurationService.getValue('notebook.diff.ignoreMetadata');
270
- if (newValue !== undefined && this._ignoreMetadata !== newValue) {
271
- this._ignoreMetadata = newValue;
272
- this._metadataLocalDisposable.clear();
273
- if (this.configurationService.getValue('notebook.diff.ignoreMetadata')) {
274
- this._disposeMetadata();
275
- }
276
- else {
277
- this.cell.metadataStatusHeight = 25;
278
- this._buildMetadata();
279
- this.updateMetadataRendering();
280
- metadataLayoutChange = true;
281
- }
282
- }
283
- }
284
- if (e.affectsConfiguration('notebook.diff.ignoreOutputs')) {
285
- const newValue = this.configurationService.getValue('notebook.diff.ignoreOutputs');
286
- if (newValue !== undefined && this._ignoreOutputs !== (newValue || this.notebookEditor.textModel?.transientOptions.transientOutputs)) {
287
- this._ignoreOutputs = newValue || !!(this.notebookEditor.textModel?.transientOptions.transientOutputs);
288
- this._outputLocalDisposable.clear();
289
- if (this._ignoreOutputs) {
290
- this._disposeOutput();
291
- }
292
- else {
293
- this.cell.outputStatusHeight = 25;
294
- this._buildOutput();
295
- outputLayoutChange = true;
296
- }
297
- }
298
- }
299
- if (metadataLayoutChange || outputLayoutChange) {
300
- this.layout({ metadataHeight: metadataLayoutChange, outputTotalHeight: outputLayoutChange });
301
- }
302
- }));
303
- }
304
- updateMetadataRendering() {
305
- if (this.cell.metadataFoldingState === PropertyFoldingState.Expanded) {
306
- this._metadataInfoContainer.style.display = 'block';
307
- if (!this._metadataEditorContainer || !this._metadataEditor) {
308
- this._metadataEditorContainer = append(this._metadataInfoContainer, $('.metadata-editor-container'));
309
- this._buildMetadataEditor();
310
- }
311
- else {
312
- this.cell.metadataHeight = this._metadataEditor.getContentHeight();
313
- }
314
- }
315
- else {
316
- this._metadataInfoContainer.style.display = 'none';
317
- this.cell.metadataHeight = 0;
318
- }
319
- }
320
- updateOutputRendering(renderRichOutput) {
321
- if (this.cell.outputFoldingState === PropertyFoldingState.Expanded) {
322
- this._outputInfoContainer.style.display = 'block';
323
- if (renderRichOutput) {
324
- this._hideOutputsRaw();
325
- this._buildOutputRendererContainer();
326
- this._showOutputsRenderer();
327
- this._showOutputsEmptyView();
328
- }
329
- else {
330
- this._hideOutputsRenderer();
331
- this._buildOutputRawContainer();
332
- this._showOutputsRaw();
333
- }
334
- }
335
- else {
336
- this._outputInfoContainer.style.display = 'none';
337
- this._hideOutputsRaw();
338
- this._hideOutputsRenderer();
339
- this._hideOutputsEmptyView();
340
- }
341
- }
342
- _buildOutputRawContainer() {
343
- if (!this._outputEditorContainer) {
344
- this._outputEditorContainer = append(this._outputInfoContainer, $('.output-editor-container'));
345
- this._buildOutputEditor();
346
- }
347
- }
348
- _showOutputsRaw() {
349
- if (this._outputEditorContainer) {
350
- this._outputEditorContainer.style.display = 'block';
351
- this.cell.rawOutputHeight = this._outputEditor.getContentHeight();
352
- }
353
- }
354
- _showOutputsEmptyView() {
355
- this.cell.layoutChange();
356
- }
357
- _hideOutputsRaw() {
358
- if (this._outputEditorContainer) {
359
- this._outputEditorContainer.style.display = 'none';
360
- this.cell.rawOutputHeight = 0;
361
- }
362
- }
363
- _hideOutputsEmptyView() {
364
- this.cell.layoutChange();
365
- }
366
- _applySanitizedMetadataChanges(currentMetadata, newMetadata) {
367
- const result = {};
368
- try {
369
- const newMetadataObj = JSON.parse(newMetadata);
370
- const keys = ( new Set([...( Object.keys(newMetadataObj))]));
371
- for (const key of keys) {
372
- switch (key) {
373
- case 'inputCollapsed':
374
- case 'outputCollapsed':
375
- if (typeof newMetadataObj[key] === 'boolean') {
376
- result[key] = newMetadataObj[key];
377
- }
378
- else {
379
- result[key] = currentMetadata[key];
380
- }
381
- break;
382
- default:
383
- result[key] = newMetadataObj[key];
384
- break;
385
- }
386
- }
387
- const index = this.notebookEditor.textModel.cells.indexOf(this.cell.modified.textModel);
388
- if (index < 0) {
389
- return;
390
- }
391
- this.notebookEditor.textModel.applyEdits([
392
- { editType: CellEditType.Metadata, index, metadata: result }
393
- ], true, undefined, () => undefined, undefined, true);
394
- }
395
- catch {
396
- }
397
- }
398
- async _buildMetadataEditor() {
399
- this._metadataEditorDisposeStore.clear();
400
- if (this.cell instanceof SideBySideDiffElementViewModel) {
401
- this._metadataEditor = this.instantiationService.createInstance(DiffEditorWidget, this._metadataEditorContainer, {
402
- ...fixedDiffEditorOptions,
403
- overflowWidgetsDomNode: this.notebookEditor.getOverflowContainerDomNode(),
404
- readOnly: false,
405
- originalEditable: false,
406
- ignoreTrimWhitespace: false,
407
- automaticLayout: false,
408
- dimension: {
409
- height: this.cell.layoutInfo.metadataHeight,
410
- width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), true, true)
411
- }
412
- }, {
413
- originalEditor: getOptimizedNestedCodeEditorWidgetOptions(),
414
- modifiedEditor: getOptimizedNestedCodeEditorWidgetOptions()
415
- });
416
- this.layout({ metadataHeight: true });
417
- this._metadataEditorDisposeStore.add(this._metadataEditor);
418
- this._metadataEditorContainer?.classList.add('diff');
419
- const originalMetadataModel = await this.textModelService.createModelReference(CellUri.generateCellPropertyUri(this.cell.originalDocument.uri, this.cell.original.handle, Schemas.vscodeNotebookCellMetadata));
420
- const modifiedMetadataModel = await this.textModelService.createModelReference(CellUri.generateCellPropertyUri(this.cell.modifiedDocument.uri, this.cell.modified.handle, Schemas.vscodeNotebookCellMetadata));
421
- this._metadataEditor.setModel({
422
- original: originalMetadataModel.object.textEditorModel,
423
- modified: modifiedMetadataModel.object.textEditorModel
424
- });
425
- this._metadataEditorDisposeStore.add(originalMetadataModel);
426
- this._metadataEditorDisposeStore.add(modifiedMetadataModel);
427
- this.cell.metadataHeight = this._metadataEditor.getContentHeight();
428
- this._metadataEditorDisposeStore.add(this._metadataEditor.onDidContentSizeChange((e) => {
429
- if (e.contentHeightChanged && this.cell.metadataFoldingState === PropertyFoldingState.Expanded) {
430
- this.cell.metadataHeight = e.contentHeight;
431
- }
432
- }));
433
- let respondingToContentChange = false;
434
- this._metadataEditorDisposeStore.add(modifiedMetadataModel.object.textEditorModel.onDidChangeContent(() => {
435
- respondingToContentChange = true;
436
- const value = modifiedMetadataModel.object.textEditorModel.getValue();
437
- this._applySanitizedMetadataChanges(this.cell.modified.metadata, value);
438
- this._metadataHeader.refresh();
439
- respondingToContentChange = false;
440
- }));
441
- this._metadataEditorDisposeStore.add(this.cell.modified.textModel.onDidChangeMetadata(() => {
442
- if (respondingToContentChange) {
443
- return;
444
- }
445
- const modifiedMetadataSource = getFormattedMetadataJSON(this.notebookEditor.textModel, this.cell.modified?.metadata || {}, this.cell.modified?.language);
446
- modifiedMetadataModel.object.textEditorModel.setValue(modifiedMetadataSource);
447
- }));
448
- return;
449
- }
450
- else {
451
- this._metadataEditor = this.instantiationService.createInstance(CodeEditorWidget, this._metadataEditorContainer, {
452
- ...fixedEditorOptions,
453
- dimension: {
454
- width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, true),
455
- height: this.cell.layoutInfo.metadataHeight
456
- },
457
- overflowWidgetsDomNode: this.notebookEditor.getOverflowContainerDomNode(),
458
- readOnly: false
459
- }, {});
460
- this.layout({ metadataHeight: true });
461
- this._metadataEditorDisposeStore.add(this._metadataEditor);
462
- const mode = this.languageService.createById('jsonc');
463
- const originalMetadataSource = getFormattedMetadataJSON(this.notebookEditor.textModel, this.cell.type === 'insert'
464
- ? this.cell.modified.metadata || {}
465
- : this.cell.original.metadata || {});
466
- const uri = this.cell.type === 'insert'
467
- ? this.cell.modified.uri
468
- : this.cell.original.uri;
469
- const handle = this.cell.type === 'insert'
470
- ? this.cell.modified.handle
471
- : this.cell.original.handle;
472
- const modelUri = CellUri.generateCellPropertyUri(uri, handle, Schemas.vscodeNotebookCellMetadata);
473
- const metadataModel = this.modelService.createModel(originalMetadataSource, mode, modelUri, false);
474
- this._metadataEditor.setModel(metadataModel);
475
- this._metadataEditorDisposeStore.add(metadataModel);
476
- this.cell.metadataHeight = this._metadataEditor.getContentHeight();
477
- this._metadataEditorDisposeStore.add(this._metadataEditor.onDidContentSizeChange((e) => {
478
- if (e.contentHeightChanged && this.cell.metadataFoldingState === PropertyFoldingState.Expanded) {
479
- this.cell.metadataHeight = e.contentHeight;
480
- }
481
- }));
482
- }
483
- }
484
- _buildOutputEditor() {
485
- this._outputEditorDisposeStore.clear();
486
- if ((this.cell.type === 'modified' || this.cell.type === 'unchanged') && !this.notebookEditor.textModel.transientOptions.transientOutputs) {
487
- const originalOutputsSource = getFormattedOutputJSON(this.cell.original?.outputs || []);
488
- const modifiedOutputsSource = getFormattedOutputJSON(this.cell.modified?.outputs || []);
489
- if (originalOutputsSource !== modifiedOutputsSource) {
490
- const mode = this.languageService.createById('json');
491
- const originalModel = this.modelService.createModel(originalOutputsSource, mode, undefined, true);
492
- const modifiedModel = this.modelService.createModel(modifiedOutputsSource, mode, undefined, true);
493
- this._outputEditorDisposeStore.add(originalModel);
494
- this._outputEditorDisposeStore.add(modifiedModel);
495
- const lineHeight = this.notebookEditor.getLayoutInfo().fontInfo.lineHeight || 17;
496
- const lineCount = Math.max(originalModel.getLineCount(), modifiedModel.getLineCount());
497
- this._outputEditor = this.instantiationService.createInstance(DiffEditorWidget, this._outputEditorContainer, {
498
- ...fixedDiffEditorOptions,
499
- overflowWidgetsDomNode: this.notebookEditor.getOverflowContainerDomNode(),
500
- readOnly: true,
501
- ignoreTrimWhitespace: false,
502
- automaticLayout: false,
503
- dimension: {
504
- height: Math.min(OUTPUT_EDITOR_HEIGHT_MAGIC, this.cell.layoutInfo.rawOutputHeight || lineHeight * lineCount),
505
- width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, true)
506
- },
507
- accessibilityVerbose: this.configurationService.getValue(AccessibilityVerbositySettingId.DiffEditor) ?? false
508
- }, {
509
- originalEditor: getOptimizedNestedCodeEditorWidgetOptions(),
510
- modifiedEditor: getOptimizedNestedCodeEditorWidgetOptions()
511
- });
512
- this._outputEditorDisposeStore.add(this._outputEditor);
513
- this._outputEditorContainer?.classList.add('diff');
514
- this._outputEditor.setModel({
515
- original: originalModel,
516
- modified: modifiedModel
517
- });
518
- this._outputEditor.restoreViewState(this.cell.getOutputEditorViewState());
519
- this.cell.rawOutputHeight = this._outputEditor.getContentHeight();
520
- this._outputEditorDisposeStore.add(this._outputEditor.onDidContentSizeChange((e) => {
521
- if (e.contentHeightChanged && this.cell.outputFoldingState === PropertyFoldingState.Expanded) {
522
- this.cell.rawOutputHeight = e.contentHeight;
523
- }
524
- }));
525
- this._outputEditorDisposeStore.add(this.cell.modified.textModel.onDidChangeOutputs(() => {
526
- const modifiedOutputsSource = getFormattedOutputJSON(this.cell.modified?.outputs || []);
527
- modifiedModel.setValue(modifiedOutputsSource);
528
- this._outputHeader.refresh();
529
- }));
530
- return;
531
- }
532
- }
533
- this._outputEditor = this.instantiationService.createInstance(CodeEditorWidget, this._outputEditorContainer, {
534
- ...fixedEditorOptions,
535
- dimension: {
536
- width: Math.min(OUTPUT_EDITOR_HEIGHT_MAGIC, this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, this.cell.type === 'unchanged' || this.cell.type === 'modified') - 32),
537
- height: this.cell.layoutInfo.rawOutputHeight
538
- },
539
- overflowWidgetsDomNode: this.notebookEditor.getOverflowContainerDomNode()
540
- }, {});
541
- this._outputEditorDisposeStore.add(this._outputEditor);
542
- const mode = this.languageService.createById('json');
543
- const originaloutputSource = getFormattedOutputJSON(this.notebookEditor.textModel.transientOptions.transientOutputs
544
- ? []
545
- : this.cell.type === 'insert'
546
- ? this.cell.modified.outputs || []
547
- : this.cell.original.outputs || []);
548
- const outputModel = this.modelService.createModel(originaloutputSource, mode, undefined, true);
549
- this._outputEditorDisposeStore.add(outputModel);
550
- this._outputEditor.setModel(outputModel);
551
- this._outputEditor.restoreViewState(this.cell.getOutputEditorViewState());
552
- this.cell.rawOutputHeight = this._outputEditor.getContentHeight();
553
- this._outputEditorDisposeStore.add(this._outputEditor.onDidContentSizeChange((e) => {
554
- if (e.contentHeightChanged && this.cell.outputFoldingState === PropertyFoldingState.Expanded) {
555
- this.cell.rawOutputHeight = e.contentHeight;
556
- }
557
- }));
558
- }
559
- layoutNotebookCell() {
560
- this.notebookEditor.layoutNotebookCell(this.cell, this.cell.layoutInfo.totalHeight);
561
- }
562
- updateBorders() {
563
- this.templateData.leftBorder.style.height = `${this.cell.layoutInfo.totalHeight - 32}px`;
564
- this.templateData.rightBorder.style.height = `${this.cell.layoutInfo.totalHeight - 32}px`;
565
- this.templateData.bottomBorder.style.top = `${this.cell.layoutInfo.totalHeight - 32}px`;
566
- }
567
- dispose() {
568
- if (this._outputEditor) {
569
- this.cell.saveOutputEditorViewState(this._outputEditor.saveViewState());
570
- }
571
- if (this._metadataEditor) {
572
- this.cell.saveMetadataEditorViewState(this._metadataEditor.saveViewState());
573
- }
574
- this._metadataEditorDisposeStore.dispose();
575
- this._outputEditorDisposeStore.dispose();
576
- this._isDisposed = true;
577
- super.dispose();
578
- }
579
- }
580
- class SingleSideDiffElement extends AbstractElementRenderer {
581
- constructor(notebookEditor, cell, templateData, style, instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService) {
582
- super(notebookEditor, cell, templateData, style, instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService);
583
- this.cell = cell;
584
- this.templateData = templateData;
585
- this.updateBorders();
586
- }
587
- init() {
588
- this._diagonalFill = this.templateData.diagonalFill;
589
- }
590
- buildBody() {
591
- const body = this.templateData.body;
592
- this._diffEditorContainer = this.templateData.diffEditorContainer;
593
- body.classList.remove('left', 'right', 'full');
594
- switch (this.style) {
595
- case 'left':
596
- body.classList.add('left');
597
- break;
598
- case 'right':
599
- body.classList.add('right');
600
- break;
601
- default:
602
- body.classList.add('full');
603
- break;
604
- }
605
- this.styleContainer(this._diffEditorContainer);
606
- this.updateSourceEditor();
607
- if (this.configurationService.getValue('notebook.diff.ignoreMetadata')) {
608
- this._disposeMetadata();
609
- }
610
- else {
611
- this._buildMetadata();
612
- }
613
- if (this.configurationService.getValue('notebook.diff.ignoreOutputs') || this.notebookEditor.textModel?.transientOptions.transientOutputs) {
614
- this._disposeOutput();
615
- }
616
- else {
617
- this._buildOutput();
618
- }
619
- this._register(this.configurationService.onDidChangeConfiguration(e => {
620
- let metadataLayoutChange = false;
621
- let outputLayoutChange = false;
622
- if (e.affectsConfiguration('notebook.diff.ignoreMetadata')) {
623
- this._metadataLocalDisposable.clear();
624
- if (this.configurationService.getValue('notebook.diff.ignoreMetadata')) {
625
- this._disposeMetadata();
626
- }
627
- else {
628
- this.cell.metadataStatusHeight = 25;
629
- this._buildMetadata();
630
- this.updateMetadataRendering();
631
- metadataLayoutChange = true;
632
- }
633
- }
634
- if (e.affectsConfiguration('notebook.diff.ignoreOutputs')) {
635
- this._outputLocalDisposable.clear();
636
- if (this.configurationService.getValue('notebook.diff.ignoreOutputs') || this.notebookEditor.textModel?.transientOptions.transientOutputs) {
637
- this._disposeOutput();
638
- }
639
- else {
640
- this.cell.outputStatusHeight = 25;
641
- this._buildOutput();
642
- outputLayoutChange = true;
643
- }
644
- }
645
- if (metadataLayoutChange || outputLayoutChange) {
646
- this.layout({ metadataHeight: metadataLayoutChange, outputTotalHeight: outputLayoutChange });
647
- }
648
- }));
649
- }
650
- _disposeMetadata() {
651
- this.cell.metadataStatusHeight = 0;
652
- this.cell.metadataHeight = 0;
653
- this.templateData.metadataHeaderContainer.style.display = 'none';
654
- this.templateData.metadataInfoContainer.style.display = 'none';
655
- this._metadataEditor = undefined;
656
- }
657
- _buildMetadata() {
658
- this._metadataHeaderContainer = this.templateData.metadataHeaderContainer;
659
- this._metadataInfoContainer = this.templateData.metadataInfoContainer;
660
- this._metadataHeaderContainer.style.display = 'flex';
661
- this._metadataInfoContainer.style.display = 'block';
662
- this._metadataHeaderContainer.innerText = '';
663
- this._metadataInfoContainer.innerText = '';
664
- this._metadataHeader = this.instantiationService.createInstance(PropertyHeader, this.cell, this._metadataHeaderContainer, this.notebookEditor, {
665
- updateInfoRendering: this.updateMetadataRendering.bind(this),
666
- checkIfModified: (cell) => {
667
- return cell.checkMetadataIfModified();
668
- },
669
- getFoldingState: (cell) => {
670
- return cell.metadataFoldingState;
671
- },
672
- updateFoldingState: (cell, state) => {
673
- cell.metadataFoldingState = state;
674
- },
675
- unChangedLabel: 'Metadata',
676
- changedLabel: 'Metadata changed',
677
- prefix: 'metadata',
678
- menuId: MenuId.NotebookDiffCellMetadataTitle
679
- });
680
- this._metadataLocalDisposable.add(this._metadataHeader);
681
- this._metadataHeader.buildHeader();
682
- }
683
- _buildOutput() {
684
- this.templateData.outputHeaderContainer.style.display = 'flex';
685
- this.templateData.outputInfoContainer.style.display = 'block';
686
- this._outputHeaderContainer = this.templateData.outputHeaderContainer;
687
- this._outputInfoContainer = this.templateData.outputInfoContainer;
688
- this._outputHeaderContainer.innerText = '';
689
- this._outputInfoContainer.innerText = '';
690
- this._outputHeader = this.instantiationService.createInstance(PropertyHeader, this.cell, this._outputHeaderContainer, this.notebookEditor, {
691
- updateInfoRendering: this.updateOutputRendering.bind(this),
692
- checkIfModified: (cell) => {
693
- return cell.checkIfOutputsModified();
694
- },
695
- getFoldingState: (cell) => {
696
- return cell.outputFoldingState;
697
- },
698
- updateFoldingState: (cell, state) => {
699
- cell.outputFoldingState = state;
700
- },
701
- unChangedLabel: 'Outputs',
702
- changedLabel: 'Outputs changed',
703
- prefix: 'output',
704
- menuId: MenuId.NotebookDiffCellOutputsTitle
705
- });
706
- this._outputLocalDisposable.add(this._outputHeader);
707
- this._outputHeader.buildHeader();
708
- }
709
- _disposeOutput() {
710
- this._hideOutputsRaw();
711
- this._hideOutputsRenderer();
712
- this._hideOutputsEmptyView();
713
- this.cell.rawOutputHeight = 0;
714
- this.cell.outputStatusHeight = 0;
715
- this.templateData.outputHeaderContainer.style.display = 'none';
716
- this.templateData.outputInfoContainer.style.display = 'none';
717
- this._outputViewContainer = undefined;
718
- }
719
- }
720
- let DeletedElement = class DeletedElement extends SingleSideDiffElement {
721
- constructor(notebookEditor, cell, templateData, languageService, modelService, textModelService, instantiationService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService) {
722
- super(notebookEditor, cell, templateData, 'left', instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService);
723
- }
724
- styleContainer(container) {
725
- container.classList.remove('inserted');
726
- container.classList.add('removed');
727
- }
728
- updateSourceEditor() {
729
- const originalCell = this.cell.original;
730
- const lineCount = originalCell.textModel.textBuffer.getLineCount();
731
- const lineHeight = this.notebookEditor.getLayoutInfo().fontInfo.lineHeight || 17;
732
- const editorHeight = lineCount * lineHeight + fixedEditorPadding.top + fixedEditorPadding.bottom;
733
- this._editor = this.templateData.sourceEditor;
734
- this._editor.layout({
735
- width: (this.notebookEditor.getLayoutInfo().width - 2 * DIFF_CELL_MARGIN) / 2 - 18,
736
- height: editorHeight
737
- });
738
- this.cell.editorHeight = editorHeight;
739
- this._register(this._editor.onDidContentSizeChange((e) => {
740
- if (e.contentHeightChanged && this.cell.layoutInfo.editorHeight !== e.contentHeight) {
741
- this.cell.editorHeight = e.contentHeight;
742
- }
743
- }));
744
- this.textModelService.createModelReference(originalCell.uri).then(ref => {
745
- if (this._isDisposed) {
746
- return;
747
- }
748
- this._register(ref);
749
- const textModel = ref.object.textEditorModel;
750
- this._editor.setModel(textModel);
751
- this.cell.editorHeight = this._editor.getContentHeight();
752
- });
753
- }
754
- layout(state) {
755
- scheduleAtNextAnimationFrame(getWindow(this._diffEditorContainer), () => {
756
- if (state.editorHeight || state.outerWidth) {
757
- this._editor.layout({
758
- width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, false),
759
- height: this.cell.layoutInfo.editorHeight
760
- });
761
- }
762
- if (state.metadataHeight || state.outerWidth) {
763
- this._metadataEditor?.layout({
764
- width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, false),
765
- height: this.cell.layoutInfo.metadataHeight
766
- });
767
- }
768
- if (state.outputTotalHeight || state.outerWidth) {
769
- this._outputEditor?.layout({
770
- width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, false),
771
- height: this.cell.layoutInfo.outputTotalHeight
772
- });
773
- }
774
- if (this._diagonalFill) {
775
- this._diagonalFill.style.height = `${this.cell.layoutInfo.totalHeight - 32}px`;
776
- }
777
- this.layoutNotebookCell();
778
- });
779
- }
780
- _buildOutputRendererContainer() {
781
- if (!this._outputViewContainer) {
782
- this._outputViewContainer = append(this._outputInfoContainer, $('.output-view-container'));
783
- this._outputEmptyElement = append(this._outputViewContainer, $('.output-empty-view'));
784
- const span = append(this._outputEmptyElement, $('span'));
785
- span.innerText = 'No outputs to render';
786
- if (this.cell.original.outputs.length === 0) {
787
- this._outputEmptyElement.style.display = 'block';
788
- }
789
- else {
790
- this._outputEmptyElement.style.display = 'none';
791
- }
792
- this.cell.layoutChange();
793
- this._outputLeftView = this.instantiationService.createInstance(OutputContainer, this.notebookEditor, this.notebookEditor.textModel, this.cell, this.cell.original, DiffSide.Original, this._outputViewContainer);
794
- this._register(this._outputLeftView);
795
- this._outputLeftView.render();
796
- const removedOutputRenderListener = this.notebookEditor.onDidDynamicOutputRendered(e => {
797
- if (( e.cell.uri.toString()) === ( this.cell.original.uri.toString())) {
798
- this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Original, this.cell.original.id, ['nb-cellDeleted'], []);
799
- removedOutputRenderListener.dispose();
800
- }
801
- });
802
- this._register(removedOutputRenderListener);
803
- }
804
- this._outputViewContainer.style.display = 'block';
805
- }
806
- _decorate() {
807
- this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Original, this.cell.original.id, ['nb-cellDeleted'], []);
808
- }
809
- _showOutputsRenderer() {
810
- if (this._outputViewContainer) {
811
- this._outputViewContainer.style.display = 'block';
812
- this._outputLeftView?.showOutputs();
813
- this._decorate();
814
- }
815
- }
816
- _hideOutputsRenderer() {
817
- if (this._outputViewContainer) {
818
- this._outputViewContainer.style.display = 'none';
819
- this._outputLeftView?.hideOutputs();
820
- }
821
- }
822
- dispose() {
823
- if (this._editor) {
824
- this.cell.saveSpirceEditorViewState(this._editor.saveViewState());
825
- }
826
- super.dispose();
827
- }
828
- };
829
- DeletedElement = ( __decorate([
830
- ( __param(3, ILanguageService)),
831
- ( __param(4, IModelService)),
832
- ( __param(5, ITextModelService)),
833
- ( __param(6, IInstantiationService)),
834
- ( __param(7, IContextMenuService)),
835
- ( __param(8, IKeybindingService)),
836
- ( __param(9, INotificationService)),
837
- ( __param(10, IMenuService)),
838
- ( __param(11, IContextKeyService)),
839
- ( __param(12, IConfigurationService))
840
- ], DeletedElement));
841
- let InsertElement = class InsertElement extends SingleSideDiffElement {
842
- constructor(notebookEditor, cell, templateData, instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService) {
843
- super(notebookEditor, cell, templateData, 'right', instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService);
844
- }
845
- styleContainer(container) {
846
- container.classList.remove('removed');
847
- container.classList.add('inserted');
848
- }
849
- updateSourceEditor() {
850
- const modifiedCell = this.cell.modified;
851
- const lineCount = modifiedCell.textModel.textBuffer.getLineCount();
852
- const lineHeight = this.notebookEditor.getLayoutInfo().fontInfo.lineHeight || 17;
853
- const editorHeight = lineCount * lineHeight + fixedEditorPadding.top + fixedEditorPadding.bottom;
854
- this._editor = this.templateData.sourceEditor;
855
- this._editor.layout({
856
- width: (this.notebookEditor.getLayoutInfo().width - 2 * DIFF_CELL_MARGIN) / 2 - 18,
857
- height: editorHeight
858
- });
859
- this._editor.updateOptions({ readOnly: false });
860
- this.cell.editorHeight = editorHeight;
861
- this._register(this._editor.onDidContentSizeChange((e) => {
862
- if (e.contentHeightChanged && this.cell.layoutInfo.editorHeight !== e.contentHeight) {
863
- this.cell.editorHeight = e.contentHeight;
864
- }
865
- }));
866
- this.textModelService.createModelReference(modifiedCell.uri).then(ref => {
867
- if (this._isDisposed) {
868
- return;
869
- }
870
- this._register(ref);
871
- const textModel = ref.object.textEditorModel;
872
- this._editor.setModel(textModel);
873
- this._editor.restoreViewState(this.cell.getSourceEditorViewState());
874
- this.cell.editorHeight = this._editor.getContentHeight();
875
- });
876
- }
877
- _buildOutputRendererContainer() {
878
- if (!this._outputViewContainer) {
879
- this._outputViewContainer = append(this._outputInfoContainer, $('.output-view-container'));
880
- this._outputEmptyElement = append(this._outputViewContainer, $('.output-empty-view'));
881
- this._outputEmptyElement.innerText = 'No outputs to render';
882
- if (this.cell.modified.outputs.length === 0) {
883
- this._outputEmptyElement.style.display = 'block';
884
- }
885
- else {
886
- this._outputEmptyElement.style.display = 'none';
887
- }
888
- this.cell.layoutChange();
889
- this._outputRightView = this.instantiationService.createInstance(OutputContainer, this.notebookEditor, this.notebookEditor.textModel, this.cell, this.cell.modified, DiffSide.Modified, this._outputViewContainer);
890
- this._register(this._outputRightView);
891
- this._outputRightView.render();
892
- const insertOutputRenderListener = this.notebookEditor.onDidDynamicOutputRendered(e => {
893
- if (( e.cell.uri.toString()) === ( this.cell.modified.uri.toString())) {
894
- this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Modified, this.cell.modified.id, ['nb-cellAdded'], []);
895
- insertOutputRenderListener.dispose();
896
- }
897
- });
898
- this._register(insertOutputRenderListener);
899
- }
900
- this._outputViewContainer.style.display = 'block';
901
- }
902
- _decorate() {
903
- this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Modified, this.cell.modified.id, ['nb-cellAdded'], []);
904
- }
905
- _showOutputsRenderer() {
906
- if (this._outputViewContainer) {
907
- this._outputViewContainer.style.display = 'block';
908
- this._outputRightView?.showOutputs();
909
- this._decorate();
910
- }
911
- }
912
- _hideOutputsRenderer() {
913
- if (this._outputViewContainer) {
914
- this._outputViewContainer.style.display = 'none';
915
- this._outputRightView?.hideOutputs();
916
- }
917
- }
918
- layout(state) {
919
- scheduleAtNextAnimationFrame(getWindow(this._diffEditorContainer), () => {
920
- if (state.editorHeight || state.outerWidth) {
921
- this._editor.layout({
922
- width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, false),
923
- height: this.cell.layoutInfo.editorHeight
924
- });
925
- }
926
- if (state.metadataHeight || state.outerWidth) {
927
- this._metadataEditor?.layout({
928
- width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, true),
929
- height: this.cell.layoutInfo.metadataHeight
930
- });
931
- }
932
- if (state.outputTotalHeight || state.outerWidth) {
933
- this._outputEditor?.layout({
934
- width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, false),
935
- height: this.cell.layoutInfo.outputTotalHeight
936
- });
937
- }
938
- this.layoutNotebookCell();
939
- if (this._diagonalFill) {
940
- this._diagonalFill.style.height = `${this.cell.layoutInfo.editorHeight + this.cell.layoutInfo.editorMargin + this.cell.layoutInfo.metadataStatusHeight + this.cell.layoutInfo.metadataHeight + this.cell.layoutInfo.outputTotalHeight + this.cell.layoutInfo.outputStatusHeight}px`;
941
- }
942
- });
943
- }
944
- dispose() {
945
- if (this._editor) {
946
- this.cell.saveSpirceEditorViewState(this._editor.saveViewState());
947
- }
948
- super.dispose();
949
- }
950
- };
951
- InsertElement = ( __decorate([
952
- ( __param(3, IInstantiationService)),
953
- ( __param(4, ILanguageService)),
954
- ( __param(5, IModelService)),
955
- ( __param(6, ITextModelService)),
956
- ( __param(7, IContextMenuService)),
957
- ( __param(8, IKeybindingService)),
958
- ( __param(9, INotificationService)),
959
- ( __param(10, IMenuService)),
960
- ( __param(11, IContextKeyService)),
961
- ( __param(12, IConfigurationService))
962
- ], InsertElement));
963
- let ModifiedElement = class ModifiedElement extends AbstractElementRenderer {
964
- constructor(notebookEditor, cell, templateData, instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService) {
965
- super(notebookEditor, cell, templateData, 'full', instantiationService, languageService, modelService, textModelService, contextMenuService, keybindingService, notificationService, menuService, contextKeyService, configurationService);
966
- this.cell = cell;
967
- this.templateData = templateData;
968
- this._editorViewStateChanged = false;
969
- this.updateBorders();
970
- }
971
- init() { }
972
- styleContainer(container) {
973
- container.classList.remove('inserted', 'removed');
974
- }
975
- _disposeMetadata() {
976
- this.cell.metadataStatusHeight = 0;
977
- this.cell.metadataHeight = 0;
978
- this.templateData.metadataHeaderContainer.style.display = 'none';
979
- this.templateData.metadataInfoContainer.style.display = 'none';
980
- this._metadataEditor = undefined;
981
- }
982
- _buildMetadata() {
983
- this._metadataHeaderContainer = this.templateData.metadataHeaderContainer;
984
- this._metadataInfoContainer = this.templateData.metadataInfoContainer;
985
- this._metadataHeaderContainer.style.display = 'flex';
986
- this._metadataInfoContainer.style.display = 'block';
987
- this._metadataHeaderContainer.innerText = '';
988
- this._metadataInfoContainer.innerText = '';
989
- this._metadataHeader = this.instantiationService.createInstance(PropertyHeader, this.cell, this._metadataHeaderContainer, this.notebookEditor, {
990
- updateInfoRendering: this.updateMetadataRendering.bind(this),
991
- checkIfModified: (cell) => {
992
- return cell.checkMetadataIfModified();
993
- },
994
- getFoldingState: (cell) => {
995
- return cell.metadataFoldingState;
996
- },
997
- updateFoldingState: (cell, state) => {
998
- cell.metadataFoldingState = state;
999
- },
1000
- unChangedLabel: 'Metadata',
1001
- changedLabel: 'Metadata changed',
1002
- prefix: 'metadata',
1003
- menuId: MenuId.NotebookDiffCellMetadataTitle
1004
- });
1005
- this._metadataLocalDisposable.add(this._metadataHeader);
1006
- this._metadataHeader.buildHeader();
1007
- }
1008
- _disposeOutput() {
1009
- this._hideOutputsRaw();
1010
- this._hideOutputsRenderer();
1011
- this._hideOutputsEmptyView();
1012
- this.cell.rawOutputHeight = 0;
1013
- this.cell.outputStatusHeight = 0;
1014
- this.templateData.outputHeaderContainer.style.display = 'none';
1015
- this.templateData.outputInfoContainer.style.display = 'none';
1016
- this._outputViewContainer = undefined;
1017
- }
1018
- _buildOutput() {
1019
- this.templateData.outputHeaderContainer.style.display = 'flex';
1020
- this.templateData.outputInfoContainer.style.display = 'block';
1021
- this._outputHeaderContainer = this.templateData.outputHeaderContainer;
1022
- this._outputInfoContainer = this.templateData.outputInfoContainer;
1023
- this._outputHeaderContainer.innerText = '';
1024
- this._outputInfoContainer.innerText = '';
1025
- if (this.cell.checkIfOutputsModified()) {
1026
- this._outputInfoContainer.classList.add('modified');
1027
- }
1028
- else {
1029
- this._outputInfoContainer.classList.remove('modified');
1030
- }
1031
- this._outputHeader = this.instantiationService.createInstance(PropertyHeader, this.cell, this._outputHeaderContainer, this.notebookEditor, {
1032
- updateInfoRendering: this.updateOutputRendering.bind(this),
1033
- checkIfModified: (cell) => {
1034
- return cell.checkIfOutputsModified();
1035
- },
1036
- getFoldingState: (cell) => {
1037
- return cell.outputFoldingState;
1038
- },
1039
- updateFoldingState: (cell, state) => {
1040
- cell.outputFoldingState = state;
1041
- },
1042
- unChangedLabel: 'Outputs',
1043
- changedLabel: 'Outputs changed',
1044
- prefix: 'output',
1045
- menuId: MenuId.NotebookDiffCellOutputsTitle
1046
- });
1047
- this._outputLocalDisposable.add(this._outputHeader);
1048
- this._outputHeader.buildHeader();
1049
- }
1050
- _buildOutputRendererContainer() {
1051
- if (!this._outputViewContainer) {
1052
- this._outputViewContainer = append(this._outputInfoContainer, $('.output-view-container'));
1053
- this._outputEmptyElement = append(this._outputViewContainer, $('.output-empty-view'));
1054
- this._outputEmptyElement.innerText = 'No outputs to render';
1055
- if (!this.cell.checkIfOutputsModified() && this.cell.modified.outputs.length === 0) {
1056
- this._outputEmptyElement.style.display = 'block';
1057
- }
1058
- else {
1059
- this._outputEmptyElement.style.display = 'none';
1060
- }
1061
- this.cell.layoutChange();
1062
- this._register(this.cell.modified.textModel.onDidChangeOutputs(() => {
1063
- if (!this.cell.checkIfOutputsModified() && this.cell.modified.outputs.length === 0) {
1064
- this._outputEmptyElement.style.display = 'block';
1065
- }
1066
- else {
1067
- this._outputEmptyElement.style.display = 'none';
1068
- }
1069
- this._decorate();
1070
- }));
1071
- this._outputLeftContainer = append(this._outputViewContainer, $('.output-view-container-left'));
1072
- this._outputRightContainer = append(this._outputViewContainer, $('.output-view-container-right'));
1073
- this._outputMetadataContainer = append(this._outputViewContainer, $('.output-view-container-metadata'));
1074
- const outputModified = this.cell.checkIfOutputsModified();
1075
- const outputMetadataChangeOnly = outputModified
1076
- && outputModified.kind === OutputComparison.Metadata
1077
- && this.cell.original.outputs.length === 1
1078
- && this.cell.modified.outputs.length === 1
1079
- && outputEqual(this.cell.original.outputs[0], this.cell.modified.outputs[0]) === OutputComparison.Metadata;
1080
- if (outputModified && !outputMetadataChangeOnly) {
1081
- const originalOutputRenderListener = this.notebookEditor.onDidDynamicOutputRendered(e => {
1082
- if (( e.cell.uri.toString()) === ( this.cell.original.uri.toString()) && this.cell.checkIfOutputsModified()) {
1083
- this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Original, this.cell.original.id, ['nb-cellDeleted'], []);
1084
- originalOutputRenderListener.dispose();
1085
- }
1086
- });
1087
- const modifiedOutputRenderListener = this.notebookEditor.onDidDynamicOutputRendered(e => {
1088
- if (( e.cell.uri.toString()) === ( this.cell.modified.uri.toString()) && this.cell.checkIfOutputsModified()) {
1089
- this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Modified, this.cell.modified.id, ['nb-cellAdded'], []);
1090
- modifiedOutputRenderListener.dispose();
1091
- }
1092
- });
1093
- this._register(originalOutputRenderListener);
1094
- this._register(modifiedOutputRenderListener);
1095
- }
1096
- this._outputLeftView = this.instantiationService.createInstance(OutputContainer, this.notebookEditor, this.notebookEditor.textModel, this.cell, this.cell.original, DiffSide.Original, this._outputLeftContainer);
1097
- this._outputLeftView.render();
1098
- this._register(this._outputLeftView);
1099
- this._outputRightView = this.instantiationService.createInstance(OutputContainer, this.notebookEditor, this.notebookEditor.textModel, this.cell, this.cell.modified, DiffSide.Modified, this._outputRightContainer);
1100
- this._outputRightView.render();
1101
- this._register(this._outputRightView);
1102
- if (outputModified && !outputMetadataChangeOnly) {
1103
- this._decorate();
1104
- }
1105
- if (outputMetadataChangeOnly) {
1106
- this._outputMetadataContainer.style.top = `${this.cell.layoutInfo.rawOutputHeight}px`;
1107
- this._outputMetadataEditor = this.instantiationService.createInstance(DiffEditorWidget, this._outputMetadataContainer, {
1108
- ...fixedDiffEditorOptions,
1109
- overflowWidgetsDomNode: this.notebookEditor.getOverflowContainerDomNode(),
1110
- readOnly: true,
1111
- ignoreTrimWhitespace: false,
1112
- automaticLayout: false,
1113
- dimension: {
1114
- height: OUTPUT_EDITOR_HEIGHT_MAGIC,
1115
- width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, true)
1116
- }
1117
- }, {
1118
- originalEditor: getOptimizedNestedCodeEditorWidgetOptions(),
1119
- modifiedEditor: getOptimizedNestedCodeEditorWidgetOptions()
1120
- });
1121
- this._register(this._outputMetadataEditor);
1122
- const originalOutputMetadataSource = JSON.stringify(this.cell.original.outputs[0].metadata ?? {}, undefined, '\t');
1123
- const modifiedOutputMetadataSource = JSON.stringify(this.cell.modified.outputs[0].metadata ?? {}, undefined, '\t');
1124
- const mode = this.languageService.createById('json');
1125
- const originalModel = this.modelService.createModel(originalOutputMetadataSource, mode, undefined, true);
1126
- const modifiedModel = this.modelService.createModel(modifiedOutputMetadataSource, mode, undefined, true);
1127
- this._outputMetadataEditor.setModel({
1128
- original: originalModel,
1129
- modified: modifiedModel
1130
- });
1131
- this.cell.outputMetadataHeight = this._outputMetadataEditor.getContentHeight();
1132
- this._register(this._outputMetadataEditor.onDidContentSizeChange((e) => {
1133
- this.cell.outputMetadataHeight = e.contentHeight;
1134
- }));
1135
- }
1136
- }
1137
- this._outputViewContainer.style.display = 'block';
1138
- }
1139
- _decorate() {
1140
- if (this.cell.checkIfOutputsModified()) {
1141
- this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Original, this.cell.original.id, ['nb-cellDeleted'], []);
1142
- this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Modified, this.cell.modified.id, ['nb-cellAdded'], []);
1143
- }
1144
- else {
1145
- this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Original, this.cell.original.id, [], ['nb-cellDeleted']);
1146
- this.notebookEditor.deltaCellOutputContainerClassNames(DiffSide.Modified, this.cell.modified.id, [], ['nb-cellAdded']);
1147
- }
1148
- }
1149
- _showOutputsRenderer() {
1150
- if (this._outputViewContainer) {
1151
- this._outputViewContainer.style.display = 'block';
1152
- this._outputLeftView?.showOutputs();
1153
- this._outputRightView?.showOutputs();
1154
- this._outputMetadataEditor?.layout();
1155
- this._decorate();
1156
- }
1157
- }
1158
- _hideOutputsRenderer() {
1159
- if (this._outputViewContainer) {
1160
- this._outputViewContainer.style.display = 'none';
1161
- this._outputLeftView?.hideOutputs();
1162
- this._outputRightView?.hideOutputs();
1163
- }
1164
- }
1165
- updateSourceEditor() {
1166
- const modifiedCell = this.cell.modified;
1167
- const lineCount = modifiedCell.textModel.textBuffer.getLineCount();
1168
- const lineHeight = this.notebookEditor.getLayoutInfo().fontInfo.lineHeight || 17;
1169
- const editorHeight = this.cell.layoutInfo.editorHeight !== 0 ? this.cell.layoutInfo.editorHeight : lineCount * lineHeight + fixedEditorPadding.top + fixedEditorPadding.bottom;
1170
- this._editorContainer = this.templateData.editorContainer;
1171
- this._editor = this.templateData.sourceEditor;
1172
- this._editorContainer.classList.add('diff');
1173
- this._editor.layout({
1174
- width: this.notebookEditor.getLayoutInfo().width - 2 * DIFF_CELL_MARGIN,
1175
- height: editorHeight
1176
- });
1177
- this._editorContainer.style.height = `${editorHeight}px`;
1178
- this._register(this._editor.onDidContentSizeChange((e) => {
1179
- if (e.contentHeightChanged && this.cell.layoutInfo.editorHeight !== e.contentHeight) {
1180
- this.cell.editorHeight = e.contentHeight;
1181
- }
1182
- }));
1183
- this._initializeSourceDiffEditor();
1184
- const scopedContextKeyService = this.contextKeyService.createScoped(this.templateData.inputToolbarContainer);
1185
- this._register(scopedContextKeyService);
1186
- const inputChanged = NOTEBOOK_DIFF_CELL_INPUT.bindTo(scopedContextKeyService);
1187
- this._inputToolbarContainer = this.templateData.inputToolbarContainer;
1188
- this._toolbar = this.templateData.toolbar;
1189
- this._toolbar.context = {
1190
- cell: this.cell
1191
- };
1192
- if (this.cell.modified.textModel.getValue() !== this.cell.original.textModel.getValue()) {
1193
- this._inputToolbarContainer.style.display = 'block';
1194
- inputChanged.set(true);
1195
- }
1196
- else {
1197
- this._inputToolbarContainer.style.display = 'none';
1198
- inputChanged.set(false);
1199
- }
1200
- this._register(this.cell.modified.textModel.onDidChangeContent(() => {
1201
- if (this.cell.modified.textModel.getValue() !== this.cell.original.textModel.getValue()) {
1202
- this._inputToolbarContainer.style.display = 'block';
1203
- inputChanged.set(true);
1204
- }
1205
- else {
1206
- this._inputToolbarContainer.style.display = 'none';
1207
- inputChanged.set(false);
1208
- }
1209
- }));
1210
- const menu = this.menuService.getMenuActions(MenuId.NotebookDiffCellInputTitle, scopedContextKeyService, { shouldForwardArgs: true });
1211
- const actions = [];
1212
- createAndFillInActionBarActions(menu, actions);
1213
- this._toolbar.setActions(actions);
1214
- }
1215
- async _initializeSourceDiffEditor() {
1216
- const originalCell = this.cell.original;
1217
- const modifiedCell = this.cell.modified;
1218
- const originalRef = await this.textModelService.createModelReference(originalCell.uri);
1219
- const modifiedRef = await this.textModelService.createModelReference(modifiedCell.uri);
1220
- if (this._isDisposed) {
1221
- return;
1222
- }
1223
- const textModel = originalRef.object.textEditorModel;
1224
- const modifiedTextModel = modifiedRef.object.textEditorModel;
1225
- this._register(originalRef);
1226
- this._register(modifiedRef);
1227
- this._editor.setModel({
1228
- original: textModel,
1229
- modified: modifiedTextModel
1230
- });
1231
- const handleViewStateChange = () => {
1232
- this._editorViewStateChanged = true;
1233
- };
1234
- const handleScrollChange = (e) => {
1235
- if (e.scrollTopChanged || e.scrollLeftChanged) {
1236
- this._editorViewStateChanged = true;
1237
- }
1238
- };
1239
- this._register(this._editor.getOriginalEditor().onDidChangeCursorSelection(handleViewStateChange));
1240
- this._register(this._editor.getOriginalEditor().onDidScrollChange(handleScrollChange));
1241
- this._register(this._editor.getModifiedEditor().onDidChangeCursorSelection(handleViewStateChange));
1242
- this._register(this._editor.getModifiedEditor().onDidScrollChange(handleScrollChange));
1243
- const editorViewState = this.cell.getSourceEditorViewState();
1244
- if (editorViewState) {
1245
- this._editor.restoreViewState(editorViewState);
1246
- }
1247
- const contentHeight = this._editor.getContentHeight();
1248
- this.cell.editorHeight = contentHeight;
1249
- }
1250
- layout(state) {
1251
- scheduleAtNextAnimationFrame(getWindow(this._diffEditorContainer), () => {
1252
- if (state.editorHeight) {
1253
- this._editorContainer.style.height = `${this.cell.layoutInfo.editorHeight}px`;
1254
- this._editor.layout({
1255
- width: this._editor.getViewWidth(),
1256
- height: this.cell.layoutInfo.editorHeight
1257
- });
1258
- }
1259
- if (state.outerWidth) {
1260
- this._editorContainer.style.height = `${this.cell.layoutInfo.editorHeight}px`;
1261
- this._editor.layout();
1262
- }
1263
- if (state.metadataHeight || state.outerWidth) {
1264
- if (this._metadataEditorContainer) {
1265
- this._metadataEditorContainer.style.height = `${this.cell.layoutInfo.metadataHeight}px`;
1266
- this._metadataEditor?.layout();
1267
- }
1268
- }
1269
- if (state.outputTotalHeight || state.outerWidth) {
1270
- if (this._outputEditorContainer) {
1271
- this._outputEditorContainer.style.height = `${this.cell.layoutInfo.outputTotalHeight}px`;
1272
- this._outputEditor?.layout();
1273
- }
1274
- if (this._outputMetadataContainer) {
1275
- this._outputMetadataContainer.style.height = `${this.cell.layoutInfo.outputMetadataHeight}px`;
1276
- this._outputMetadataContainer.style.top = `${this.cell.layoutInfo.outputTotalHeight - this.cell.layoutInfo.outputMetadataHeight}px`;
1277
- this._outputMetadataEditor?.layout();
1278
- }
1279
- }
1280
- this.layoutNotebookCell();
1281
- });
1282
- }
1283
- dispose() {
1284
- if (this._editor && this._editorViewStateChanged) {
1285
- this.cell.saveSpirceEditorViewState(this._editor.saveViewState());
1286
- }
1287
- super.dispose();
1288
- }
1289
- };
1290
- ModifiedElement = ( __decorate([
1291
- ( __param(3, IInstantiationService)),
1292
- ( __param(4, ILanguageService)),
1293
- ( __param(5, IModelService)),
1294
- ( __param(6, ITextModelService)),
1295
- ( __param(7, IContextMenuService)),
1296
- ( __param(8, IKeybindingService)),
1297
- ( __param(9, INotificationService)),
1298
- ( __param(10, IMenuService)),
1299
- ( __param(11, IContextKeyService)),
1300
- ( __param(12, IConfigurationService))
1301
- ], ModifiedElement));
1302
-
1303
- export { DeletedElement, InsertElement, ModifiedElement, getOptimizedNestedCodeEditorWidgetOptions };