@codingame/monaco-vscode-notebook-service-override 25.1.2 → 26.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 (94) hide show
  1. package/index.js +2 -2
  2. package/package.json +3 -3
  3. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +112 -94
  4. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +95 -96
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +28 -19
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +15 -9
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +22 -17
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +25 -10
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +37 -44
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +211 -115
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +16 -18
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +5 -8
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +57 -49
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +24 -11
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +78 -76
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +14 -15
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +43 -28
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +65 -34
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +19 -16
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +6 -10
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +15 -17
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +28 -16
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +211 -170
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +11 -11
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +158 -156
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.js +109 -105
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +1 -1
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +28 -22
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +26 -17
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +23 -16
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +72 -40
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +233 -186
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +22 -18
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +239 -151
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +85 -86
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +25 -11
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +13 -10
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +8 -5
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +218 -196
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +258 -255
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +106 -98
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +63 -49
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +55 -64
  44. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +21 -25
  45. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +149 -129
  46. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +57 -0
  47. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +286 -0
  48. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +22 -0
  49. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +82 -0
  50. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +452 -363
  51. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +44 -61
  52. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +9 -11
  53. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +203 -207
  54. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.js +148 -104
  55. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditorInput.js +19 -11
  56. package/vscode/src/vs/workbench/contrib/notebook/browser/replEditorAccessibleView.js +9 -11
  57. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +9 -6
  58. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +34 -22
  59. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +29 -18
  60. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +70 -52
  61. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +31 -19
  62. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +78 -41
  63. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +37 -27
  64. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +9 -6
  65. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +8 -7
  66. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +214 -119
  67. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +38 -36
  68. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSource.js +24 -25
  69. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.js +2 -6
  70. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +26 -15
  71. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +35 -15
  72. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +468 -258
  73. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +33 -0
  74. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +113 -0
  75. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +74 -58
  76. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.d.ts +1 -1
  77. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +7 -10
  78. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookCellMatching.js +72 -16
  79. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWebWorker.js +70 -51
  80. package/vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.js +195 -149
  81. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorAccessibilityHelp.js +60 -81
  82. package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +7 -12
  83. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +104 -66
  84. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +115 -77
  85. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +42 -26
  86. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +19 -12
  87. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +0 -7
  88. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +0 -198
  89. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +0 -8
  90. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +0 -333
  91. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.d.ts +0 -2
  92. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +0 -7
  93. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +0 -13
  94. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +0 -261
@@ -33,25 +33,29 @@ import { ViewContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/co
33
33
 
34
34
  var NotebookOutputEditor_1;
35
35
  class NoopCellEditorOptions extends Disposable {
36
- static { this.fixedEditorOptions = {
37
- scrollBeyondLastLine: false,
38
- scrollbar: {
39
- verticalScrollbarSize: 14,
40
- horizontal: 'auto',
41
- useShadows: true,
42
- verticalHasArrows: false,
43
- horizontalHasArrows: false,
44
- alwaysConsumeMouseWheel: false
45
- },
46
- renderLineHighlightOnlyWhenFocus: true,
47
- overviewRulerLanes: 0,
48
- lineDecorationsWidth: 0,
49
- folding: true,
50
- fixedOverflowWidgets: true,
51
- minimap: { enabled: false },
52
- renderValidationDecorations: 'on',
53
- lineNumbersMinChars: 3
54
- }; }
36
+ static {
37
+ this.fixedEditorOptions = {
38
+ scrollBeyondLastLine: false,
39
+ scrollbar: {
40
+ verticalScrollbarSize: 14,
41
+ horizontal: "auto",
42
+ useShadows: true,
43
+ verticalHasArrows: false,
44
+ horizontalHasArrows: false,
45
+ alwaysConsumeMouseWheel: false
46
+ },
47
+ renderLineHighlightOnlyWhenFocus: true,
48
+ overviewRulerLanes: 0,
49
+ lineDecorationsWidth: 0,
50
+ folding: true,
51
+ fixedOverflowWidgets: true,
52
+ minimap: {
53
+ enabled: false
54
+ },
55
+ renderValidationDecorations: "on",
56
+ lineNumbersMinChars: 3
57
+ };
58
+ }
55
59
  get value() {
56
60
  return this._value;
57
61
  }
@@ -61,19 +65,40 @@ class NoopCellEditorOptions extends Disposable {
61
65
  this.onDidChange = this._onDidChange.event;
62
66
  this._value = ( Object.freeze({
63
67
  ...NoopCellEditorOptions.fixedEditorOptions,
64
- padding: { top: 12, bottom: 12 },
68
+ padding: {
69
+ top: 12,
70
+ bottom: 12
71
+ },
65
72
  readOnly: true
66
73
  }));
67
74
  }
68
75
  }
69
76
  let NotebookOutputEditor = class NotebookOutputEditor extends EditorPane {
70
- static { NotebookOutputEditor_1 = this; }
71
- static { this.ID = NOTEBOOK_OUTPUT_EDITOR_ID; }
77
+ static {
78
+ NotebookOutputEditor_1 = this;
79
+ }
80
+ static {
81
+ this.ID = NOTEBOOK_OUTPUT_EDITOR_ID;
82
+ }
72
83
  get isDisposed() {
73
84
  return this._isDisposed;
74
85
  }
75
- constructor(group, instantiationService, themeService, telemetryService, storageService, configurationService, notebookService) {
76
- super(NotebookOutputEditor_1.ID, group, telemetryService, themeService, storageService);
86
+ constructor(
87
+ group,
88
+ instantiationService,
89
+ themeService,
90
+ telemetryService,
91
+ storageService,
92
+ configurationService,
93
+ notebookService
94
+ ) {
95
+ super(
96
+ NotebookOutputEditor_1.ID,
97
+ group,
98
+ telemetryService,
99
+ themeService,
100
+ storageService
101
+ );
77
102
  this.instantiationService = instantiationService;
78
103
  this.configurationService = configurationService;
79
104
  this.notebookService = notebookService;
@@ -84,7 +109,7 @@ let NotebookOutputEditor = class NotebookOutputEditor extends EditorPane {
84
109
  this._register(this._notebookOptions);
85
110
  }
86
111
  createEditor(parent) {
87
- this._rootElement = append(parent, $('.notebook-output-editor'));
112
+ this._rootElement = append(parent, $(".notebook-output-editor"));
88
113
  }
89
114
  get fontInfo() {
90
115
  if (!this._fontInfo) {
@@ -93,8 +118,11 @@ let NotebookOutputEditor = class NotebookOutputEditor extends EditorPane {
93
118
  return this._fontInfo;
94
119
  }
95
120
  createFontInfo() {
96
- const editorOptions = this.configurationService.getValue('editor');
97
- return FontMeasurements.readFontInfo(this.window, createBareFontInfoFromRawSettings(editorOptions, PixelRatio.getInstance(this.window).value));
121
+ const editorOptions = this.configurationService.getValue("editor");
122
+ return FontMeasurements.readFontInfo(
123
+ this.window,
124
+ createBareFontInfoFromRawSettings(editorOptions, PixelRatio.getInstance(this.window).value)
125
+ );
98
126
  }
99
127
  async _createOriginalWebview(id, viewType, resource) {
100
128
  this._outputWebview?.dispose();
@@ -114,59 +142,73 @@ let NotebookOutputEditor = class NotebookOutputEditor extends EditorPane {
114
142
  if (this.input) {
115
143
  return this.input.getName();
116
144
  }
117
- return localize(9681, "Notebook Output Editor");
145
+ return localize(10001, "Notebook Output Editor");
118
146
  }
119
147
  async setInput(input, options, context, token) {
120
148
  await super.setInput(input, options, context, token);
121
149
  const model = await input.resolve();
122
150
  if (!model) {
123
- throw ( new Error('Invalid notebook output editor input'));
151
+ throw ( new Error("Invalid notebook output editor input"));
124
152
  }
125
153
  const resolvedNotebookEditorModel = model.resolvedNotebookEditorModel;
126
- await this._createOriginalWebview(generateUuid(), resolvedNotebookEditorModel.viewType, ( URI.from(
127
- { scheme: Schemas.vscodeNotebookCellOutput, path: '', query: 'openIn=notebookOutputEditor' }
128
- )));
154
+ await this._createOriginalWebview(generateUuid(), resolvedNotebookEditorModel.viewType, ( URI.from({
155
+ scheme: Schemas.vscodeNotebookCellOutput,
156
+ path: "",
157
+ query: "openIn=notebookOutputEditor"
158
+ })));
129
159
  const notebookTextModel = resolvedNotebookEditorModel.notebook;
130
160
  const eventDispatcher = this._register(( new NotebookEventDispatcher()));
131
161
  const editorOptions = this._register(( new NoopCellEditorOptions()));
132
162
  const viewContext = ( new ViewContext(this._notebookOptions, eventDispatcher, _language => editorOptions));
133
- this._notebookViewModel = this.instantiationService.createInstance(NotebookViewModel, notebookTextModel.viewType, notebookTextModel, viewContext, null, { isReadOnly: true });
163
+ this._notebookViewModel = this.instantiationService.createInstance(
164
+ NotebookViewModel,
165
+ notebookTextModel.viewType,
166
+ notebookTextModel,
167
+ viewContext,
168
+ null,
169
+ {
170
+ isReadOnly: true
171
+ }
172
+ );
134
173
  const cellViewModel = this._notebookViewModel.getCellByHandle(model.cell.handle);
135
174
  if (!cellViewModel) {
136
- throw ( new Error('Invalid NotebookOutputEditorInput, no matching cell view model'));
175
+ throw ( new Error("Invalid NotebookOutputEditorInput, no matching cell view model"));
137
176
  }
138
177
  const cellOutputViewModel = cellViewModel.outputsViewModels.find(outputViewModel => outputViewModel.model.outputId === model.outputId);
139
178
  if (!cellOutputViewModel) {
140
- throw ( new Error('Invalid NotebookOutputEditorInput, no matching cell output view model'));
179
+ throw ( new Error("Invalid NotebookOutputEditorInput, no matching cell output view model"));
141
180
  }
142
181
  let result = undefined;
143
182
  const [mimeTypes, pick] = cellOutputViewModel.resolveMimeTypes(notebookTextModel, undefined);
144
183
  const pickedMimeTypeRenderer = cellOutputViewModel.pickedMimeType || mimeTypes[pick];
145
184
  if (mimeTypes.length !== 0) {
146
185
  const renderer = this.notebookService.getRendererInfo(pickedMimeTypeRenderer.rendererId);
147
- result = renderer
148
- ? { type: RenderOutputType.Extension, renderer, source: cellOutputViewModel, mimeType: pickedMimeTypeRenderer.mimeType }
149
- : this._renderMissingRenderer(cellOutputViewModel, pickedMimeTypeRenderer.mimeType);
186
+ result = renderer ? {
187
+ type: RenderOutputType.Extension,
188
+ renderer,
189
+ source: cellOutputViewModel,
190
+ mimeType: pickedMimeTypeRenderer.mimeType
191
+ } : this._renderMissingRenderer(cellOutputViewModel, pickedMimeTypeRenderer.mimeType);
150
192
  }
151
193
  if (!result) {
152
- throw ( new Error('No InsetRenderInfo for output'));
194
+ throw ( new Error("No InsetRenderInfo for output"));
153
195
  }
154
196
  const cellInfo = {
155
197
  cellId: cellViewModel.id,
156
198
  cellHandle: model.cell.handle,
157
- cellUri: model.cell.uri,
199
+ cellUri: model.cell.uri
158
200
  };
159
201
  this._outputWebview?.createOutput(cellInfo, result, 0, 0);
160
202
  }
161
203
  _renderMissingRenderer(viewModel, preferredMimeType) {
162
204
  if (!viewModel.model.outputs.length) {
163
- return this._renderMessage(viewModel, ( localize(9682, "Cell has no output")));
205
+ return this._renderMessage(viewModel, ( localize(10002, "Cell has no output")));
164
206
  }
165
207
  if (!preferredMimeType) {
166
208
  const mimeTypes = ( viewModel.model.outputs.map(op => op.mime));
167
- const mimeTypesMessage = mimeTypes.join(', ');
209
+ const mimeTypesMessage = mimeTypes.join(", ");
168
210
  return this._renderMessage(viewModel, ( localize(
169
- 9683,
211
+ 10003,
170
212
  "No renderer could be found for output. It has the following mimetypes: {0}",
171
213
  mimeTypesMessage
172
214
  )));
@@ -174,100 +216,102 @@ let NotebookOutputEditor = class NotebookOutputEditor extends EditorPane {
174
216
  return this._renderSearchForMimetype(viewModel, preferredMimeType);
175
217
  }
176
218
  _renderMessage(viewModel, message) {
177
- const el = $('p', undefined, message);
178
- return { type: RenderOutputType.Html, source: viewModel, htmlContent: el.outerHTML };
219
+ const el = $("p", undefined, message);
220
+ return {
221
+ type: RenderOutputType.Html,
222
+ source: viewModel,
223
+ htmlContent: el.outerHTML
224
+ };
179
225
  }
180
226
  _renderSearchForMimetype(viewModel, mimeType) {
181
227
  const query = `@tag:notebookRenderer ${mimeType}`;
182
- const p = $('p', undefined, `No renderer could be found for mimetype "${mimeType}", but one might be available on the Marketplace.`);
183
- const a = $('a', { href: `command:workbench.extensions.search?%22${query}%22`, class: 'monaco-button monaco-text-button', tabindex: 0, role: 'button', style: 'padding: 8px; text-decoration: none; color: rgb(255, 255, 255); background-color: rgb(14, 99, 156); max-width: 200px;' }, `Search Marketplace`);
228
+ const p = $(
229
+ "p",
230
+ undefined,
231
+ `No renderer could be found for mimetype "${mimeType}", but one might be available on the Marketplace.`
232
+ );
233
+ const a = $("a", {
234
+ href: `command:workbench.extensions.search?%22${query}%22`,
235
+ class: "monaco-button monaco-text-button",
236
+ tabindex: 0,
237
+ role: "button",
238
+ style: "padding: 8px; text-decoration: none; color: rgb(255, 255, 255); background-color: rgb(14, 99, 156); max-width: 200px;"
239
+ }, `Search Marketplace`);
184
240
  return {
185
241
  type: RenderOutputType.Html,
186
242
  source: viewModel,
187
- htmlContent: p.outerHTML + a.outerHTML,
243
+ htmlContent: p.outerHTML + a.outerHTML
188
244
  };
189
245
  }
190
246
  scheduleOutputHeightAck(cellInfo, outputId, height) {
191
247
  scheduleAtNextAnimationFrame(this.window, () => {
192
- this._outputWebview?.ackHeight([{ cellId: cellInfo.cellId, outputId, height }]);
248
+ this._outputWebview?.ackHeight([{
249
+ cellId: cellInfo.cellId,
250
+ outputId,
251
+ height
252
+ }]);
193
253
  }, 10);
194
254
  }
195
- async focusNotebookCell(cell, focus) {
196
- }
197
- async focusNextNotebookCell(cell, focus) {
198
- }
255
+ async focusNotebookCell(cell, focus) {}
256
+ async focusNextNotebookCell(cell, focus) {}
199
257
  toggleNotebookCellSelection(cell) {
200
- throw ( new Error('Not implemented.'));
258
+ throw ( new Error("Not implemented."));
201
259
  }
202
260
  getCellById(cellId) {
203
- throw ( new Error('Not implemented'));
261
+ throw ( new Error("Not implemented"));
204
262
  }
205
263
  getCellByInfo(cellInfo) {
206
264
  return this._notebookViewModel?.getCellByHandle(cellInfo.cellHandle);
207
265
  }
208
- layout(dimension, position) {
209
- }
210
- setScrollTop(scrollTop) {
211
- }
212
- triggerScroll(event) {
213
- }
214
- getOutputRenderer() {
215
- }
216
- updateOutputHeight(cellInfo, output, height, isInit, source) {
217
- }
218
- updateMarkupCellHeight(cellId, height, isInit) {
219
- }
220
- setMarkupCellEditState(cellId, editState) {
221
- }
222
- didResizeOutput(cellId) {
223
- }
224
- didStartDragMarkupCell(cellId, event) {
225
- }
226
- didDragMarkupCell(cellId, event) {
227
- }
228
- didDropMarkupCell(cellId, event) {
229
- }
230
- didEndDragMarkupCell(cellId) {
231
- }
232
- updatePerformanceMetadata(cellId, executionId, duration, rendererId) {
233
- }
234
- didFocusOutputInputChange(inputFocused) {
235
- }
266
+ layout(dimension, position) {}
267
+ setScrollTop(scrollTop) {}
268
+ triggerScroll(event) {}
269
+ getOutputRenderer() {}
270
+ updateOutputHeight(cellInfo, output, height, isInit, source) {}
271
+ updateMarkupCellHeight(cellId, height, isInit) {}
272
+ setMarkupCellEditState(cellId, editState) {}
273
+ didResizeOutput(cellId) {}
274
+ didStartDragMarkupCell(cellId, event) {}
275
+ didDragMarkupCell(cellId, event) {}
276
+ didDropMarkupCell(cellId, event) {}
277
+ didEndDragMarkupCell(cellId) {}
278
+ updatePerformanceMetadata(cellId, executionId, duration, rendererId) {}
279
+ didFocusOutputInputChange(inputFocused) {}
236
280
  dispose() {
237
281
  this._isDisposed = true;
238
282
  super.dispose();
239
283
  }
240
284
  };
241
- NotebookOutputEditor = NotebookOutputEditor_1 = ( __decorate([
242
- ( __param(1, IInstantiationService)),
243
- ( __param(2, IThemeService)),
244
- ( __param(3, ITelemetryService)),
245
- ( __param(4, IStorageService)),
246
- ( __param(5, IConfigurationService)),
247
- ( __param(6, INotebookService))
248
- ], NotebookOutputEditor));
285
+ NotebookOutputEditor = NotebookOutputEditor_1 = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, IThemeService)), ( __param(3, ITelemetryService)), ( __param(4, IStorageService)), ( __param(5, IConfigurationService)), ( __param(6, INotebookService))], NotebookOutputEditor));
249
286
  let NotebookOutputEditorContribution = class NotebookOutputEditorContribution {
250
- static { this.ID = 'workbench.contribution.notebookOutputEditorContribution'; }
287
+ static {
288
+ this.ID = "workbench.contribution.notebookOutputEditorContribution";
289
+ }
251
290
  constructor(editorResolverService, instantiationService, uriIdentityService) {
252
291
  this.instantiationService = instantiationService;
253
292
  this.uriIdentityService = uriIdentityService;
254
293
  editorResolverService.registerEditor(`${Schemas.vscodeNotebookCellOutput}:/**`, {
255
- id: 'notebookOutputEditor',
256
- label: 'Notebook Output Editor',
294
+ id: "notebookOutputEditor",
295
+ label: "Notebook Output Editor",
257
296
  priority: RegisteredEditorPriority.default
258
297
  }, {
259
- canSupportResource: (resource) => {
298
+ canSupportResource: resource => {
260
299
  if (resource.scheme === Schemas.vscodeNotebookCellOutput) {
261
300
  const params = ( new URLSearchParams(resource.query));
262
- return params.get('openIn') === 'notebookOutputEditor';
301
+ return params.get("openIn") === "notebookOutputEditor";
263
302
  }
264
303
  return false;
265
304
  }
266
305
  }, {
267
- createEditorInput: async ({ resource, options }) => {
306
+ createEditorInput: async (
307
+ {
308
+ resource,
309
+ options
310
+ }
311
+ ) => {
268
312
  const outputUriData = CellUri.parseCellOutputUri(resource);
269
313
  if (!outputUriData || !outputUriData.notebook || outputUriData.cellIndex === undefined || outputUriData.outputIndex === undefined || !outputUriData.outputId) {
270
- throw ( new Error('Invalid output uri for notebook output editor'));
314
+ throw ( new Error("Invalid output uri for notebook output editor"));
271
315
  }
272
316
  const notebookUri = this.uriIdentityService.asCanonicalUri(outputUriData.notebook);
273
317
  const cellIndex = outputUriData.cellIndex;
@@ -282,11 +326,11 @@ let NotebookOutputEditorContribution = class NotebookOutputEditorContribution {
282
326
  });
283
327
  }
284
328
  };
285
- NotebookOutputEditorContribution = ( __decorate([
286
- ( __param(0, IEditorResolverService)),
287
- ( __param(1, IInstantiationService)),
288
- ( __param(2, IUriIdentityService))
289
- ], NotebookOutputEditorContribution));
290
- registerWorkbenchContribution2(NotebookOutputEditorContribution.ID, NotebookOutputEditorContribution, WorkbenchPhase.BlockRestore);
329
+ NotebookOutputEditorContribution = ( __decorate([( __param(0, IEditorResolverService)), ( __param(1, IInstantiationService)), ( __param(2, IUriIdentityService))], NotebookOutputEditorContribution));
330
+ registerWorkbenchContribution2(
331
+ NotebookOutputEditorContribution.ID,
332
+ NotebookOutputEditorContribution,
333
+ WorkbenchPhase.BlockRestore
334
+ );
291
335
 
292
336
  export { NoopCellEditorOptions, NotebookOutputEditor, NotebookOutputEditorContribution };
@@ -19,9 +19,19 @@ class ResolvedNotebookOutputEditorInputModel {
19
19
  }
20
20
  }
21
21
  let NotebookOutputEditorInput = class NotebookOutputEditorInput extends EditorInput {
22
- static { NotebookOutputEditorInput_1 = this; }
23
- static { this.ID = 'workbench.input.notebookOutputEditorInput'; }
24
- constructor(notebookUri, cellIndex, outputId, outputIndex, notebookEditorModelResolverService) {
22
+ static {
23
+ NotebookOutputEditorInput_1 = this;
24
+ }
25
+ static {
26
+ this.ID = "workbench.input.notebookOutputEditorInput";
27
+ }
28
+ constructor(
29
+ notebookUri,
30
+ cellIndex,
31
+ outputId,
32
+ outputIndex,
33
+ notebookEditorModelResolverService
34
+ ) {
25
35
  super();
26
36
  this.notebookEditorModelResolverService = notebookEditorModelResolverService;
27
37
  this._notebookUri = notebookUri;
@@ -39,12 +49,12 @@ let NotebookOutputEditorInput = class NotebookOutputEditorInput extends EditorIn
39
49
  }
40
50
  const cell = this._notebookRef.object.notebook.cells[this.cellIndex];
41
51
  if (!cell) {
42
- throw ( new Error('Cell not found'));
52
+ throw ( new Error("Cell not found"));
43
53
  }
44
54
  this.cellUri = cell.uri;
45
55
  const resolvedOutputId = cell.outputs[this.outputIndex]?.outputId;
46
56
  if (!resolvedOutputId) {
47
- throw ( new Error('Output not found'));
57
+ throw ( new Error("Output not found"));
48
58
  }
49
59
  if (!this.outputId) {
50
60
  this.outputId = resolvedOutputId;
@@ -67,14 +77,14 @@ let NotebookOutputEditorInput = class NotebookOutputEditorInput extends EditorIn
67
77
  return {
68
78
  notebookUri: this._notebookUri,
69
79
  cellIndex: cellIndex,
70
- outputIndex: outputIndex,
80
+ outputIndex: outputIndex
71
81
  };
72
82
  }
73
83
  getName() {
74
- return localize(9684, "Notebook Output Preview");
84
+ return localize(10004, "Notebook Output Preview");
75
85
  }
76
86
  get editorId() {
77
- return 'notebookOutputEditor';
87
+ return "notebookOutputEditor";
78
88
  }
79
89
  get resource() {
80
90
  return;
@@ -86,8 +96,6 @@ let NotebookOutputEditorInput = class NotebookOutputEditorInput extends EditorIn
86
96
  super.dispose();
87
97
  }
88
98
  };
89
- NotebookOutputEditorInput = NotebookOutputEditorInput_1 = ( __decorate([
90
- ( __param(4, INotebookEditorModelResolverService))
91
- ], NotebookOutputEditorInput));
99
+ NotebookOutputEditorInput = NotebookOutputEditorInput_1 = ( __decorate([( __param(4, INotebookEditorModelResolverService))], NotebookOutputEditorInput));
92
100
 
93
101
  export { NotebookOutputEditorInput };
@@ -3,14 +3,14 @@ import { AccessibleViewType, AccessibleContentProvider, AccessibleViewProviderId
3
3
  import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
4
4
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
5
5
  import { AccessibilityVerbositySettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
6
- import { isReplEditorControl } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/replNotebook/browser/replEditor';
6
+ import { isReplEditorControl } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/replNotebook/browser/replEditor';
7
7
  import { IS_COMPOSITE_NOTEBOOK, NOTEBOOK_CELL_LIST_FOCUSED } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
8
8
  import { getAllOutputsText } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper';
9
9
 
10
10
  class ReplEditorAccessibleView {
11
11
  constructor() {
12
12
  this.priority = 100;
13
- this.name = 'replEditorInput';
13
+ this.name = "replEditorInput";
14
14
  this.type = AccessibleViewType.View;
15
15
  this.when = ( ContextKeyExpr.and(IS_COMPOSITE_NOTEBOOK, ( NOTEBOOK_CELL_LIST_FOCUSED.negate())));
16
16
  }
@@ -30,15 +30,13 @@ function getAccessibleOutputProvider(editorService) {
30
30
  const cell = viewModel.viewCells[lastCellIndex];
31
31
  const outputContent = getAllOutputsText(viewModel.notebookDocument, cell);
32
32
  if (outputContent) {
33
- return ( new AccessibleContentProvider(
34
- AccessibleViewProviderId.Notebook,
35
- { type: AccessibleViewType.View },
36
- () => { return outputContent; },
37
- () => {
38
- editorControl.activeCodeEditor?.focus();
39
- },
40
- AccessibilityVerbositySettingId.ReplEditor
41
- ));
33
+ return ( new AccessibleContentProvider(AccessibleViewProviderId.Notebook, {
34
+ type: AccessibleViewType.View
35
+ }, () => {
36
+ return outputContent;
37
+ }, () => {
38
+ editorControl.activeCodeEditor?.focus();
39
+ }, AccessibilityVerbositySettingId.ReplEditor));
42
40
  }
43
41
  }
44
42
  }
@@ -26,14 +26,17 @@ class NotebookCellStatusBarService extends Disposable {
26
26
  });
27
27
  }
28
28
  async getStatusBarItemsForCell(docUri, cellIndex, viewType, token) {
29
- const providers = this._providers.filter(p => p.viewType === viewType || p.viewType === '*');
30
- return await Promise.all(( providers.map(async (p) => {
29
+ const providers = this._providers.filter(p => p.viewType === viewType || p.viewType === "*");
30
+ return await Promise.all(( providers.map(async p => {
31
31
  try {
32
- return (await p.provideCellStatusBarItems(docUri, cellIndex, token)) ?? { items: [] };
33
- }
34
- catch (e) {
32
+ return (await p.provideCellStatusBarItems(docUri, cellIndex, token)) ?? {
33
+ items: []
34
+ };
35
+ } catch (e) {
35
36
  onUnexpectedExternalError(e);
36
- return { items: [] };
37
+ return {
38
+ items: []
39
+ };
37
40
  }
38
41
  })));
39
42
  }
@@ -13,7 +13,7 @@ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platf
13
13
  import { MOST_RECENT_REPL_EDITOR, InteractiveWindowOpen } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
14
14
  import { ServiceCollection } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/serviceCollection';
15
15
  import { IEditorProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
16
- import { NotebookDiffEditorInput } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/common/notebookDiffEditorInput';
16
+ import { NotebookDiffEditorInput } from '../../common/notebookDiffEditorInput.js';
17
17
 
18
18
  let NotebookEditorWidgetService = class NotebookEditorWidgetService {
19
19
  constructor(editorGroupService, editorService, contextKeyService, instantiationService) {
@@ -28,17 +28,17 @@ let NotebookEditorWidgetService = class NotebookEditorWidgetService {
28
28
  this.onDidAddNotebookEditor = this._onNotebookEditorAdd.event;
29
29
  this.onDidRemoveNotebookEditor = this._onNotebookEditorsRemove.event;
30
30
  this._borrowableEditors = ( new Map());
31
- const onNewGroup = (group) => {
32
- const { id } = group;
31
+ const onNewGroup = group => {
32
+ const {
33
+ id
34
+ } = group;
33
35
  const listeners = [];
34
36
  listeners.push(group.onDidCloseEditor(e => {
35
37
  const widgetMap = this._borrowableEditors.get(group.id);
36
38
  if (!widgetMap) {
37
39
  return;
38
40
  }
39
- const inputs = e.editor instanceof NotebookEditorInput || e.editor instanceof NotebookDiffEditorInput
40
- ? [e.editor]
41
- : (isCompositeNotebookEditorInput(e.editor) ? e.editor.editorInputs : []);
41
+ const inputs = e.editor instanceof NotebookEditorInput || e.editor instanceof NotebookDiffEditorInput ? [e.editor] : (isCompositeNotebookEditorInput(e.editor) ? e.editor.editorInputs : []);
42
42
  inputs.forEach(input => {
43
43
  const widgets = widgetMap.get(input.resource);
44
44
  const index = widgets?.findIndex(widget => widget.editorType === input.typeId);
@@ -91,8 +91,7 @@ let NotebookEditorWidgetService = class NotebookEditorWidgetService {
91
91
  if (editorService.editors.find(editor => isCompositeNotebookEditorInput(editor))) {
92
92
  interactiveWindowOpen.set(true);
93
93
  }
94
- }
95
- else if (e.event.kind === GroupModelChangeKind.EDITOR_CLOSE && interactiveWindowOpen.get()) {
94
+ } else if (e.event.kind === GroupModelChangeKind.EDITOR_CLOSE && interactiveWindowOpen.get()) {
96
95
  if (!editorService.editors.find(editor => isCompositeNotebookEditorInput(editor))) {
97
96
  interactiveWindowOpen.set(false);
98
97
  }
@@ -103,7 +102,7 @@ let NotebookEditorWidgetService = class NotebookEditorWidgetService {
103
102
  this._disposables.dispose();
104
103
  this._onNotebookEditorAdd.dispose();
105
104
  this._onNotebookEditorsRemove.dispose();
106
- this.groupListener.forEach((listeners) => {
105
+ this.groupListener.forEach(listeners => {
107
106
  listeners.forEach(listener => listener.dispose());
108
107
  });
109
108
  this.groupListener.clear();
@@ -131,7 +130,7 @@ let NotebookEditorWidgetService = class NotebookEditorWidgetService {
131
130
  }
132
131
  const widget = this._borrowableEditors.get(sourceID)?.get(input.resource)?.find(widget => widget.editorType === input.typeId);
133
132
  if (!widget) {
134
- throw ( new Error('no widget at source group'));
133
+ throw ( new Error("no widget at source group"));
135
134
  }
136
135
  const sourceWidgets = this._borrowableEditors.get(sourceID)?.get(input.resource);
137
136
  if (sourceWidgets) {
@@ -175,9 +174,21 @@ let NotebookEditorWidgetService = class NotebookEditorWidgetService {
175
174
  const editorGroupContextKeyService = accessor.get(IContextKeyService);
176
175
  const editorGroupEditorProgressService = accessor.get(IEditorProgressService);
177
176
  const widgetDisposeStore = ( new DisposableStore());
178
- const widget = this.createWidget(editorGroupContextKeyService, widgetDisposeStore, editorGroupEditorProgressService, creationOptions, codeWindow, initialDimension);
177
+ const widget = this.createWidget(
178
+ editorGroupContextKeyService,
179
+ widgetDisposeStore,
180
+ editorGroupEditorProgressService,
181
+ creationOptions,
182
+ codeWindow,
183
+ initialDimension
184
+ );
179
185
  const token = this._tokenPool++;
180
- value = { widget, editorType: input.typeId, token, disposableStore: widgetDisposeStore };
186
+ value = {
187
+ widget,
188
+ editorType: input.typeId,
189
+ token,
190
+ disposableStore: widgetDisposeStore
191
+ };
181
192
  let map = this._borrowableEditors.get(groupId);
182
193
  if (!map) {
183
194
  map = ( new ResourceMap());
@@ -186,13 +197,19 @@ let NotebookEditorWidgetService = class NotebookEditorWidgetService {
186
197
  const values = map.get(input.resource) ?? [];
187
198
  values.push(value);
188
199
  map.set(input.resource, values);
189
- }
190
- else {
200
+ } else {
191
201
  value.token = this._tokenPool++;
192
202
  }
193
203
  return this._createBorrowValue(value.token, value);
194
204
  }
195
- createWidget(editorGroupContextKeyService, widgetDisposeStore, editorGroupEditorProgressService, creationOptions, codeWindow, initialDimension) {
205
+ createWidget(
206
+ editorGroupContextKeyService,
207
+ widgetDisposeStore,
208
+ editorGroupEditorProgressService,
209
+ creationOptions,
210
+ codeWindow,
211
+ initialDimension
212
+ ) {
196
213
  const notebookInstantiationService = widgetDisposeStore.add(this.instantiationService.createChild(( new ServiceCollection(
197
214
  [IContextKeyService, editorGroupContextKeyService],
198
215
  [IEditorProgressService, editorGroupEditorProgressService]
@@ -200,7 +217,7 @@ let NotebookEditorWidgetService = class NotebookEditorWidgetService {
200
217
  const ctorOptions = creationOptions ?? getDefaultNotebookCreationOptions();
201
218
  const widget = notebookInstantiationService.createInstance(NotebookEditorWidget, {
202
219
  ...ctorOptions,
203
- codeWindow: codeWindow ?? ctorOptions.codeWindow,
220
+ codeWindow: codeWindow ?? ctorOptions.codeWindow
204
221
  }, initialDimension);
205
222
  return widget;
206
223
  }
@@ -244,11 +261,6 @@ let NotebookEditorWidgetService = class NotebookEditorWidgetService {
244
261
  this._mostRecentRepl.set(uri);
245
262
  }
246
263
  };
247
- NotebookEditorWidgetService = ( __decorate([
248
- ( __param(0, IEditorGroupsService)),
249
- ( __param(1, IEditorService)),
250
- ( __param(2, IContextKeyService)),
251
- ( __param(3, IInstantiationService))
252
- ], NotebookEditorWidgetService));
264
+ NotebookEditorWidgetService = ( __decorate([( __param(0, IEditorGroupsService)), ( __param(1, IEditorService)), ( __param(2, IContextKeyService)), ( __param(3, IInstantiationService))], NotebookEditorWidgetService));
253
265
 
254
266
  export { NotebookEditorWidgetService };