@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
@@ -11,7 +11,9 @@ import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench
11
11
  import { n, createElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
12
12
 
13
13
  class TroubleshootController extends Disposable {
14
- static { this.id = 'workbench.notebook.troubleshoot'; }
14
+ static {
15
+ this.id = "workbench.notebook.troubleshoot";
16
+ }
15
17
  constructor(_notebookEditor) {
16
18
  super();
17
19
  this._notebookEditor = _notebookEditor;
@@ -57,7 +59,7 @@ class TroubleshootController extends Disposable {
57
59
  this._createCellOverlay(cell, i);
58
60
  }
59
61
  this._localStore.add(this._notebookEditor.onDidChangeViewCells(e => {
60
- const addedCells = e.splices.reduce((acc, [, , newCells]) => [...acc, ...newCells], []);
62
+ const addedCells = e.splices.reduce((acc, [,, newCells]) => [...acc, ...newCells], []);
61
63
  for (let i = 0; i < addedCells.length; i++) {
62
64
  const cellIndex = this._notebookEditor.getCellIndex(addedCells[i]);
63
65
  if (cellIndex !== undefined) {
@@ -74,42 +76,41 @@ class TroubleshootController extends Disposable {
74
76
  const scrollTop = this._notebookEditor.scrollTop;
75
77
  const overlay = n.div({
76
78
  style: {
77
- position: 'absolute',
78
- top: '0',
79
- left: '0',
80
- width: '100%',
81
- height: '100%',
82
- pointerEvents: 'none',
83
- zIndex: '1000'
79
+ position: "absolute",
80
+ top: "0",
81
+ left: "0",
82
+ width: "100%",
83
+ height: "100%",
84
+ pointerEvents: "none",
85
+ zIndex: "1000"
84
86
  }
85
87
  }, [
86
- n.div({
87
- style: {
88
- position: 'absolute',
89
- top: `${listViewTop}px`,
90
- left: '0',
91
- width: '100%',
92
- height: '2px',
93
- backgroundColor: 'rgba(0, 0, 255, 0.7)'
94
- }
95
- }),
96
- n.div({
97
- style: {
98
- position: 'absolute',
99
- top: `${listViewTop}px`,
100
- left: '10px',
101
- backgroundColor: 'rgba(0, 0, 255, 0.7)',
102
- color: 'white',
103
- fontSize: '11px',
104
- fontWeight: 'bold',
105
- padding: '2px 6px',
106
- borderRadius: '3px',
107
- whiteSpace: 'nowrap',
108
- pointerEvents: 'none',
109
- zIndex: '1001'
110
- }
111
- }, [`ScrollTop: ${scrollTop}px`])
112
- ]).keepUpdated(this._store);
88
+ n.div({
89
+ style: {
90
+ position: "absolute",
91
+ top: `${listViewTop}px`,
92
+ left: "0",
93
+ width: "100%",
94
+ height: "2px",
95
+ backgroundColor: "rgba(0, 0, 255, 0.7)"
96
+ }
97
+ }),
98
+ n.div({
99
+ style: {
100
+ position: "absolute",
101
+ top: `${listViewTop}px`,
102
+ left: "10px",
103
+ backgroundColor: "rgba(0, 0, 255, 0.7)",
104
+ color: "white",
105
+ fontSize: "11px",
106
+ fontWeight: "bold",
107
+ padding: "2px 6px",
108
+ borderRadius: "3px",
109
+ whiteSpace: "nowrap",
110
+ pointerEvents: "none",
111
+ zIndex: "1001"
112
+ }
113
+ }, [`ScrollTop: ${scrollTop}px`])]).keepUpdated(this._store);
113
114
  this._notebookOverlayDomNode = overlay.element;
114
115
  if (this._notebookOverlayDomNode) {
115
116
  this._notebookEditor.getDomNode().appendChild(this._notebookOverlayDomNode);
@@ -118,12 +119,12 @@ class TroubleshootController extends Disposable {
118
119
  const scrollTop = this._notebookEditor.scrollTop;
119
120
  const listViewTop = this._notebookEditor.getLayoutInfo().listViewOffsetTop;
120
121
  if (this._notebookOverlayDomNode) {
121
- const labelElement = this._notebookOverlayDomNode.querySelector('div:nth-child(2)');
122
+ const labelElement = this._notebookOverlayDomNode.querySelector("div:nth-child(2)");
122
123
  if (labelElement) {
123
124
  labelElement.textContent = `ScrollTop: ${scrollTop}px`;
124
125
  labelElement.style.top = `${listViewTop}px`;
125
126
  }
126
- const topLineElement = this._notebookOverlayDomNode.querySelector('div:first-child');
127
+ const topLineElement = this._notebookOverlayDomNode.querySelector("div:first-child");
127
128
  if (topLineElement) {
128
129
  topLineElement.style.top = `${listViewTop}px`;
129
130
  }
@@ -131,47 +132,47 @@ class TroubleshootController extends Disposable {
131
132
  }));
132
133
  }
133
134
  _createCellOverlay(cell, index) {
134
- const overlayContainer = createElement('div');
135
- overlayContainer.style.position = 'absolute';
136
- overlayContainer.style.top = '0';
137
- overlayContainer.style.left = '0';
138
- overlayContainer.style.width = '100%';
139
- overlayContainer.style.height = '100%';
140
- overlayContainer.style.pointerEvents = 'none';
141
- overlayContainer.style.zIndex = '1000';
142
- const topLine = createElement('div');
143
- topLine.style.position = 'absolute';
144
- topLine.style.top = '0';
145
- topLine.style.left = '0';
146
- topLine.style.width = '100%';
147
- topLine.style.height = '2px';
148
- topLine.style.backgroundColor = 'rgba(255, 0, 0, 0.7)';
135
+ const overlayContainer = createElement("div");
136
+ overlayContainer.style.position = "absolute";
137
+ overlayContainer.style.top = "0";
138
+ overlayContainer.style.left = "0";
139
+ overlayContainer.style.width = "100%";
140
+ overlayContainer.style.height = "100%";
141
+ overlayContainer.style.pointerEvents = "none";
142
+ overlayContainer.style.zIndex = "1000";
143
+ const topLine = createElement("div");
144
+ topLine.style.position = "absolute";
145
+ topLine.style.top = "0";
146
+ topLine.style.left = "0";
147
+ topLine.style.width = "100%";
148
+ topLine.style.height = "2px";
149
+ topLine.style.backgroundColor = "rgba(255, 0, 0, 0.7)";
149
150
  overlayContainer.appendChild(topLine);
150
151
  const getLayoutInfo = () => {
151
- const eol = cell.textBuffer.getEOL() === '\n' ? 'LF' : 'CRLF';
152
- let scrollTop = '';
152
+ const eol = cell.textBuffer.getEOL() === "\n" ? "LF" : "CRLF";
153
+ let scrollTop = "";
153
154
  if (cell.layoutInfo.layoutState > 0) {
154
155
  scrollTop = `| AbsoluteTopOfElement: ${this._notebookEditor.getAbsoluteTopOfElement(cell)}px`;
155
156
  }
156
157
  return `cell #${index} (handle: ${cell.handle}) ${scrollTop} | EOL: ${eol}`;
157
158
  };
158
- const label = createElement('div');
159
+ const label = createElement("div");
159
160
  label.textContent = getLayoutInfo();
160
- label.style.position = 'absolute';
161
- label.style.top = '0px';
162
- label.style.right = '10px';
163
- label.style.backgroundColor = 'rgba(255, 0, 0, 0.5)';
164
- label.style.color = 'white';
165
- label.style.fontSize = '11px';
166
- label.style.fontWeight = 'bold';
167
- label.style.padding = '2px 6px';
168
- label.style.borderRadius = '3px';
169
- label.style.whiteSpace = 'nowrap';
170
- label.style.pointerEvents = 'none';
171
- label.style.zIndex = '1001';
161
+ label.style.position = "absolute";
162
+ label.style.top = "0px";
163
+ label.style.right = "10px";
164
+ label.style.backgroundColor = "rgba(255, 0, 0, 0.5)";
165
+ label.style.color = "white";
166
+ label.style.fontSize = "11px";
167
+ label.style.fontWeight = "bold";
168
+ label.style.padding = "2px 6px";
169
+ label.style.borderRadius = "3px";
170
+ label.style.whiteSpace = "nowrap";
171
+ label.style.pointerEvents = "none";
172
+ label.style.zIndex = "1001";
172
173
  overlayContainer.appendChild(label);
173
174
  let overlayId = undefined;
174
- this._notebookEditor.changeCellOverlays((accessor) => {
175
+ this._notebookEditor.changeCellOverlays(accessor => {
175
176
  overlayId = accessor.addOverlay({
176
177
  cell,
177
178
  domNode: overlayContainer
@@ -181,13 +182,13 @@ class TroubleshootController extends Disposable {
181
182
  const updateLayout = () => {
182
183
  label.textContent = getLayoutInfo();
183
184
  if (overlayId) {
184
- this._notebookEditor.changeCellOverlays((accessor) => {
185
+ this._notebookEditor.changeCellOverlays(accessor => {
185
186
  accessor.layoutOverlay(overlayId);
186
187
  });
187
188
  }
188
189
  };
189
190
  const disposables = this._cellDisposables[index];
190
- disposables.add(cell.onDidChangeLayout((e) => {
191
+ disposables.add(cell.onDidChangeLayout(e => {
191
192
  updateLayout();
192
193
  }));
193
194
  disposables.add(cell.textBuffer.onDidChangeContent(() => {
@@ -202,7 +203,7 @@ class TroubleshootController extends Disposable {
202
203
  updateLayout();
203
204
  }));
204
205
  disposables.add(toDisposable(() => {
205
- this._notebookEditor.changeCellOverlays((accessor) => {
206
+ this._notebookEditor.changeCellOverlays(accessor => {
206
207
  if (overlayId) {
207
208
  accessor.removeOverlay(overlayId);
208
209
  }
@@ -240,7 +241,7 @@ class TroubleshootController extends Disposable {
240
241
  })));
241
242
  dispose(deletedCells);
242
243
  });
243
- const addedCells = e.splices.reduce((acc, [, , newCells]) => [...acc, ...newCells], []);
244
+ const addedCells = e.splices.reduce((acc, [,, newCells]) => [...acc, ...newCells], []);
244
245
  for (let i = 0; i < addedCells.length; i++) {
245
246
  const cellIndex = this._notebookEditor.getCellIndex(addedCells[i]);
246
247
  if (cellIndex !== undefined) {
@@ -260,13 +261,11 @@ class TroubleshootController extends Disposable {
260
261
  for (let i = 0; i < this._notebookEditor.getLength(); i++) {
261
262
  items.push({
262
263
  handle: i,
263
- items: [
264
- {
265
- text: `index: ${i}`,
266
- alignment: CellStatusbarAlignment.Left,
267
- priority: Number.MAX_SAFE_INTEGER
268
- }
269
- ]
264
+ items: [{
265
+ text: `index: ${i}`,
266
+ alignment: CellStatusbarAlignment.Left,
267
+ priority: Number.MAX_SAFE_INTEGER
268
+ }]
270
269
  });
271
270
  }
272
271
  return items;
@@ -282,8 +281,8 @@ registerNotebookContribution(TroubleshootController.id, TroubleshootController);
282
281
  registerAction2(class extends Action2 {
283
282
  constructor() {
284
283
  super({
285
- id: 'notebook.toggleLayoutTroubleshoot',
286
- title: ( localize2(9345, "Toggle Notebook Layout Troubleshoot")),
284
+ id: "notebook.toggleLayoutTroubleshoot",
285
+ title: ( localize2(9665, "Toggle Notebook Layout Troubleshoot")),
287
286
  category: Categories.Developer,
288
287
  f1: true
289
288
  });
@@ -301,8 +300,8 @@ registerAction2(class extends Action2 {
301
300
  registerAction2(class extends Action2 {
302
301
  constructor() {
303
302
  super({
304
- id: 'notebook.inspectLayout',
305
- title: ( localize2(9346, "Inspect Notebook Layout")),
303
+ id: "notebook.inspectLayout",
304
+ title: ( localize2(9666, "Inspect Notebook Layout")),
306
305
  category: Categories.Developer,
307
306
  f1: true
308
307
  });
@@ -322,8 +321,8 @@ registerAction2(class extends Action2 {
322
321
  registerAction2(class extends Action2 {
323
322
  constructor() {
324
323
  super({
325
- id: 'notebook.clearNotebookEdtitorTypeCache',
326
- title: ( localize2(9347, "Clear Notebook Editor Type Cache")),
324
+ id: "notebook.clearNotebookEdtitorTypeCache",
325
+ title: ( localize2(9667, "Clear Notebook Editor Type Cache")),
327
326
  category: Categories.Developer,
328
327
  f1: true
329
328
  });
@@ -8,12 +8,14 @@ import { getNotebookEditorFromEditorPane, CellEditState } from '@codingame/monac
8
8
  import { UndoCommand, RedoCommand } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorExtensions';
9
9
 
10
10
  let NotebookUndoRedoContribution = class NotebookUndoRedoContribution extends Disposable {
11
- static { this.ID = 'workbench.contrib.notebookUndoRedo'; }
11
+ static {
12
+ this.ID = "workbench.contrib.notebookUndoRedo";
13
+ }
12
14
  constructor(_editorService) {
13
15
  super();
14
16
  this._editorService = _editorService;
15
17
  const PRIORITY = 105;
16
- this._register(UndoCommand.addImplementation(PRIORITY, 'notebook-undo-redo', () => {
18
+ this._register(UndoCommand.addImplementation(PRIORITY, "notebook-undo-redo", () => {
17
19
  const editor = getNotebookEditorFromEditorPane(this._editorService.activeEditorPane);
18
20
  const viewModel = editor?.getViewModel();
19
21
  if (editor && editor.hasEditorFocus() && editor.hasModel() && viewModel) {
@@ -22,16 +24,21 @@ let NotebookUndoRedoContribution = class NotebookUndoRedoContribution extends Di
22
24
  for (let i = 0; i < editor.getLength(); i++) {
23
25
  const cell = editor.cellAt(i);
24
26
  if (cell.cellKind === CellKind.Markup && cellResources.find(resource => resource.fragment === cell.model.uri.fragment)) {
25
- cell.updateEditState(CellEditState.Editing, 'undo');
27
+ cell.updateEditState(CellEditState.Editing, "undo");
26
28
  }
27
29
  }
28
- editor?.setOptions({ cellOptions: { resource: cellResources[0] }, preserveFocus: true });
30
+ editor?.setOptions({
31
+ cellOptions: {
32
+ resource: cellResources[0]
33
+ },
34
+ preserveFocus: true
35
+ });
29
36
  }
30
37
  });
31
38
  }
32
39
  return false;
33
40
  }));
34
- this._register(RedoCommand.addImplementation(PRIORITY, 'notebook-undo-redo', () => {
41
+ this._register(RedoCommand.addImplementation(PRIORITY, "notebook-undo-redo", () => {
35
42
  const editor = getNotebookEditorFromEditorPane(this._editorService.activeEditorPane);
36
43
  const viewModel = editor?.getViewModel();
37
44
  if (editor && editor.hasEditorFocus() && editor.hasModel() && viewModel) {
@@ -40,10 +47,15 @@ let NotebookUndoRedoContribution = class NotebookUndoRedoContribution extends Di
40
47
  for (let i = 0; i < editor.getLength(); i++) {
41
48
  const cell = editor.cellAt(i);
42
49
  if (cell.cellKind === CellKind.Markup && cellResources.find(resource => resource.fragment === cell.model.uri.fragment)) {
43
- cell.updateEditState(CellEditState.Editing, 'redo');
50
+ cell.updateEditState(CellEditState.Editing, "redo");
44
51
  }
45
52
  }
46
- editor?.setOptions({ cellOptions: { resource: cellResources[0] }, preserveFocus: true });
53
+ editor?.setOptions({
54
+ cellOptions: {
55
+ resource: cellResources[0]
56
+ },
57
+ preserveFocus: true
58
+ });
47
59
  }
48
60
  });
49
61
  }
@@ -51,7 +63,9 @@ let NotebookUndoRedoContribution = class NotebookUndoRedoContribution extends Di
51
63
  }));
52
64
  }
53
65
  };
54
- NotebookUndoRedoContribution = ( __decorate([
55
- ( __param(0, IEditorService))
56
- ], NotebookUndoRedoContribution));
57
- registerWorkbenchContribution2(NotebookUndoRedoContribution.ID, NotebookUndoRedoContribution, WorkbenchPhase.BlockRestore);
66
+ NotebookUndoRedoContribution = ( __decorate([( __param(0, IEditorService))], NotebookUndoRedoContribution));
67
+ registerWorkbenchContribution2(
68
+ NotebookUndoRedoContribution.ID,
69
+ NotebookUndoRedoContribution,
70
+ WorkbenchPhase.BlockRestore
71
+ );
@@ -11,7 +11,9 @@ import { cellRangesToIndexes } from '@codingame/monaco-vscode-api/vscode/vs/work
11
11
  import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
12
12
 
13
13
  let NotebookViewportContribution = class NotebookViewportContribution extends Disposable {
14
- static { this.id = 'workbench.notebook.viewportWarmup'; }
14
+ static {
15
+ this.id = "workbench.notebook.viewportWarmup";
16
+ }
15
17
  constructor(_notebookEditor, _notebookService, accessibilityService) {
16
18
  super();
17
19
  this._notebookEditor = _notebookEditor;
@@ -37,8 +39,8 @@ let NotebookViewportContribution = class NotebookViewportContribution extends Di
37
39
  if (this._notebookEditor.hasModel()) {
38
40
  for (let i = 0; i < this._notebookEditor.getLength(); i++) {
39
41
  const cell = this._notebookEditor.cellAt(i);
40
- if (cell?.cellKind === CellKind.Markup && cell?.getEditState() === CellEditState.Preview && !cell.isInputCollapsed) ;
41
- else if (cell?.cellKind === CellKind.Code) {
42
+ if (cell?.cellKind === CellKind.Markup && cell?.getEditState() === CellEditState.Preview && !cell.isInputCollapsed)
43
+ ; else if (cell?.cellKind === CellKind.Code) {
42
44
  this._warmupCodeCell(cell);
43
45
  }
44
46
  }
@@ -56,8 +58,7 @@ let NotebookViewportContribution = class NotebookViewportContribution extends Di
56
58
  const cell = this._notebookEditor.cellAt(index);
57
59
  if (cell?.cellKind === CellKind.Markup && cell?.getEditState() === CellEditState.Preview && !cell.isInputCollapsed) {
58
60
  this._notebookEditor.createMarkupPreview(cell);
59
- }
60
- else if (cell?.cellKind === CellKind.Code) {
61
+ } else if (cell?.cellKind === CellKind.Code) {
61
62
  this._warmupCodeCell(cell);
62
63
  }
63
64
  });
@@ -83,13 +84,15 @@ let NotebookViewportContribution = class NotebookViewportContribution extends Di
83
84
  if (!renderer) {
84
85
  return;
85
86
  }
86
- const result = { type: RenderOutputType.Extension, renderer, source: output, mimeType: pickedMimeTypeRenderer.mimeType };
87
+ const result = {
88
+ type: RenderOutputType.Extension,
89
+ renderer,
90
+ source: output,
91
+ mimeType: pickedMimeTypeRenderer.mimeType
92
+ };
87
93
  this._notebookEditor.createOutput(viewCell, result, 0, true);
88
94
  }
89
95
  }
90
96
  };
91
- NotebookViewportContribution = ( __decorate([
92
- ( __param(1, INotebookService)),
93
- ( __param(2, IAccessibilityService))
94
- ], NotebookViewportContribution));
97
+ NotebookViewportContribution = ( __decorate([( __param(1, INotebookService)), ( __param(2, IAccessibilityService))], NotebookViewportContribution));
95
98
  registerNotebookContribution(NotebookViewportContribution.id, NotebookViewportContribution);
@@ -6,12 +6,12 @@ import { isDocumentExcludePattern } from '@codingame/monaco-vscode-api/vscode/vs
6
6
  import { INotebookKernelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
7
7
  import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
8
8
 
9
- CommandsRegistry.registerCommand('_resolveNotebookContentProvider', (accessor) => {
9
+ CommandsRegistry.registerCommand("_resolveNotebookContentProvider", accessor => {
10
10
  const notebookService = accessor.get(INotebookService);
11
11
  const contentProviders = notebookService.getContributedNotebookTypes();
12
12
  return ( contentProviders.map(provider => {
13
13
  const filenamePatterns = ( provider.selectors.map(selector => {
14
- if (typeof selector === 'string') {
14
+ if (typeof selector === "string") {
15
15
  return selector;
16
16
  }
17
17
  if (isRelativePattern(selector)) {
@@ -37,16 +37,19 @@ CommandsRegistry.registerCommand('_resolveNotebookContentProvider', (accessor) =
37
37
  };
38
38
  }));
39
39
  });
40
- CommandsRegistry.registerCommand('_resolveNotebookKernels', async (accessor, args) => {
40
+ CommandsRegistry.registerCommand("_resolveNotebookKernels", async (accessor, args) => {
41
41
  const notebookKernelService = accessor.get(INotebookKernelService);
42
42
  const uri = URI.revive(args.uri);
43
- const kernels = notebookKernelService.getMatchingKernel({ uri, notebookType: args.viewType });
43
+ const kernels = notebookKernelService.getMatchingKernel({
44
+ uri,
45
+ notebookType: args.viewType
46
+ });
44
47
  return ( kernels.all.map(provider => ({
45
48
  id: provider.id,
46
49
  label: provider.label,
47
50
  description: provider.description,
48
51
  detail: provider.detail,
49
52
  isPreferred: false,
50
- preloads: provider.preloadUris,
53
+ preloads: provider.preloadUris
51
54
  })));
52
55
  });