@codingame/monaco-vscode-notebook-service-override 38.0.2 → 38.0.3
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.
- package/package.json +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-notebook-service-override",
|
|
3
|
-
"version": "38.0.
|
|
3
|
+
"version": "38.0.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - notebook service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "38.0.
|
|
19
|
-
"@codingame/monaco-vscode-katex-common": "38.0.
|
|
18
|
+
"@codingame/monaco-vscode-api": "38.0.3",
|
|
19
|
+
"@codingame/monaco-vscode-katex-common": "38.0.3"
|
|
20
20
|
},
|
|
21
21
|
"main": "index.js",
|
|
22
22
|
"module": "index.js",
|
|
@@ -32,7 +32,7 @@ class ToggleCellToolbarPositionAction extends Action2 {
|
|
|
32
32
|
}
|
|
33
33
|
togglePosition(viewType, toolbarPosition) {
|
|
34
34
|
if (typeof toolbarPosition === "string") {
|
|
35
|
-
if (["left", "right", "hidden"].indexOf(toolbarPosition) >= 0) {
|
|
35
|
+
if (( ["left", "right", "hidden"].indexOf(toolbarPosition)) >= 0) {
|
|
36
36
|
const newViewValue = toolbarPosition === "right" ? "left" : "right";
|
|
37
37
|
const config = {
|
|
38
38
|
default: toolbarPosition
|
|
@@ -424,7 +424,7 @@ let NotebookInlineVariablesController = class NotebookInlineVariablesController
|
|
|
424
424
|
}
|
|
425
425
|
if (blockComments) {
|
|
426
426
|
if (!inBlockComment) {
|
|
427
|
-
const startIndex = line.indexOf(blockComments.start);
|
|
427
|
+
const startIndex = ( line.indexOf(blockComments.start));
|
|
428
428
|
if (startIndex !== -1) {
|
|
429
429
|
inBlockComment = true;
|
|
430
430
|
blockCommentStartLine = lineNumber;
|
|
@@ -432,7 +432,7 @@ let NotebookInlineVariablesController = class NotebookInlineVariablesController
|
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
if (inBlockComment) {
|
|
435
|
-
const endIndex = line.indexOf(blockComments.end);
|
|
435
|
+
const endIndex = ( line.indexOf(blockComments.end));
|
|
436
436
|
if (endIndex !== -1) {
|
|
437
437
|
commentRanges.push(( new Range(
|
|
438
438
|
blockCommentStartLine + 1,
|
|
@@ -446,7 +446,7 @@ let NotebookInlineVariablesController = class NotebookInlineVariablesController
|
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
if (!inBlockComment && lineCommentToken && line.trimLeft().startsWith(lineCommentToken)) {
|
|
449
|
-
const startCol = line.indexOf(lineCommentToken);
|
|
449
|
+
const startCol = ( line.indexOf(lineCommentToken));
|
|
450
450
|
commentRanges.push(( new Range(lineNumber + 1, startCol + 1, lineNumber + 1, line.length + 1)));
|
|
451
451
|
}
|
|
452
452
|
}
|
|
@@ -249,7 +249,7 @@ registerAction2(class ClearCellOutputsAction extends NotebookCellAction {
|
|
|
249
249
|
return;
|
|
250
250
|
}
|
|
251
251
|
const cell = context.cell;
|
|
252
|
-
const index = editor.textModel.cells.indexOf(cell.model);
|
|
252
|
+
const index = ( editor.textModel.cells.indexOf(cell.model));
|
|
253
253
|
if (index < 0) {
|
|
254
254
|
return;
|
|
255
255
|
}
|
|
@@ -527,7 +527,7 @@ async function setCellToLanguage(languageId, context) {
|
|
|
527
527
|
ui: true
|
|
528
528
|
}, languageId);
|
|
529
529
|
} else {
|
|
530
|
-
const index = context.notebookEditor.textModel.cells.indexOf(context.cell.model);
|
|
530
|
+
const index = ( context.notebookEditor.textModel.cells.indexOf(context.cell.model));
|
|
531
531
|
context.notebookEditor.textModel.applyEdits([{
|
|
532
532
|
editType: CellEditType.CellLanguage,
|
|
533
533
|
index,
|
|
@@ -358,7 +358,7 @@ registerAction2(class extends Action2 {
|
|
|
358
358
|
}
|
|
359
359
|
const original = context.original;
|
|
360
360
|
const modified = context.modified;
|
|
361
|
-
const modifiedCellIndex = context.mainDocumentTextModel.cells.indexOf(modified.textModel);
|
|
361
|
+
const modifiedCellIndex = ( context.mainDocumentTextModel.cells.indexOf(modified.textModel));
|
|
362
362
|
if (modifiedCellIndex === -1) {
|
|
363
363
|
return;
|
|
364
364
|
}
|
|
@@ -420,7 +420,7 @@ registerAction2(class extends Action2 {
|
|
|
420
420
|
}
|
|
421
421
|
const original = context.original;
|
|
422
422
|
const modified = context.modified;
|
|
423
|
-
const modifiedCellIndex = context.mainDocumentTextModel.cells.indexOf(modified.textModel);
|
|
423
|
+
const modifiedCellIndex = ( context.mainDocumentTextModel.cells.indexOf(modified.textModel));
|
|
424
424
|
if (modifiedCellIndex === -1) {
|
|
425
425
|
return;
|
|
426
426
|
}
|
|
@@ -420,7 +420,7 @@ let CellInfoContentProvider = class CellInfoContentProvider {
|
|
|
420
420
|
const disposables = ( new DisposableStore());
|
|
421
421
|
for (const cell of ref.object.notebook.cells) {
|
|
422
422
|
if (cell.handle === data.handle) {
|
|
423
|
-
const cellIndex = ref.object.notebook.cells.indexOf(cell);
|
|
423
|
+
const cellIndex = ( ref.object.notebook.cells.indexOf(cell));
|
|
424
424
|
const metadataSource = getFormattedMetadataJSON(
|
|
425
425
|
ref.object.notebook.transientOptions.transientCellMetadata,
|
|
426
426
|
cell.metadata,
|
package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js
CHANGED
|
@@ -31,7 +31,7 @@ class NotebookTextModelLikeId {
|
|
|
31
31
|
return `${k.notebookType}/${( k.uri.toString())}`;
|
|
32
32
|
}
|
|
33
33
|
static obj(s) {
|
|
34
|
-
const idx = s.indexOf("/");
|
|
34
|
+
const idx = ( s.indexOf("/"));
|
|
35
35
|
return {
|
|
36
36
|
notebookType: s.substring(0, idx),
|
|
37
37
|
uri: ( URI.parse(s.substring(idx + 1)))
|
|
@@ -329,7 +329,7 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
|
|
|
329
329
|
this._onDidChangeKernelDetectionTasks.fire(notebookType);
|
|
330
330
|
return toDisposable(() => {
|
|
331
331
|
const all = this._kernelDetectionTasks.get(notebookType) ?? [];
|
|
332
|
-
const idx = all.indexOf(task);
|
|
332
|
+
const idx = ( all.indexOf(task));
|
|
333
333
|
if (idx >= 0) {
|
|
334
334
|
all.splice(idx, 1);
|
|
335
335
|
this._kernelDetectionTasks.set(notebookType, all);
|
|
@@ -354,7 +354,7 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
|
|
|
354
354
|
});
|
|
355
355
|
return toDisposable(() => {
|
|
356
356
|
const providers = this._kernelSourceActionProviders.get(viewType) ?? [];
|
|
357
|
-
const idx = providers.indexOf(provider);
|
|
357
|
+
const idx = ( providers.indexOf(provider));
|
|
358
358
|
if (idx >= 0) {
|
|
359
359
|
providers.splice(idx, 1);
|
|
360
360
|
this._kernelSourceActionProviders.set(viewType, providers);
|
package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js
CHANGED
|
@@ -115,7 +115,7 @@ function isNotebookKeymapExtension(extension) {
|
|
|
115
115
|
if (!keywords) {
|
|
116
116
|
return false;
|
|
117
117
|
}
|
|
118
|
-
return keywords.indexOf("notebook-keymap") !== -1;
|
|
118
|
+
return ( keywords.indexOf("notebook-keymap")) !== -1;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
export { NotebookKeymapService, isNotebookKeymapExtension };
|
|
@@ -924,7 +924,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
|
|
|
924
924
|
}
|
|
925
925
|
_overwriteAlternativeVersionId(newAlternativeVersionId) {
|
|
926
926
|
this._alternativeVersionId = newAlternativeVersionId;
|
|
927
|
-
this._notebookSpecificAlternativeId = Number(newAlternativeVersionId.substring(0, newAlternativeVersionId.indexOf("_")));
|
|
927
|
+
this._notebookSpecificAlternativeId = Number(newAlternativeVersionId.substring(0, ( newAlternativeVersionId.indexOf("_"))));
|
|
928
928
|
}
|
|
929
929
|
_updateNotebookCellMetadata(metadata, computeUndoRedo, beginSelectionState, undoRedoGroup) {
|
|
930
930
|
const oldMetadata = this.metadata;
|
|
@@ -1102,7 +1102,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
|
|
|
1102
1102
|
const triggerDirtyChange = this._isCellMetadataChanged(cell.metadata, metadata);
|
|
1103
1103
|
if (triggerDirtyChange) {
|
|
1104
1104
|
if (computeUndoRedo) {
|
|
1105
|
-
const index = this._cells.indexOf(cell);
|
|
1105
|
+
const index = ( this._cells.indexOf(cell));
|
|
1106
1106
|
this._operationManager.pushEditOperation(( new CellMetadataEdit(this.uri, index, ( Object.freeze(cell.metadata)), ( Object.freeze(metadata)), {
|
|
1107
1107
|
updateCellMetadata: (index, newMetadata) => {
|
|
1108
1108
|
const cell = this._cells[index];
|
|
@@ -1118,7 +1118,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
|
|
|
1118
1118
|
this._pauseableEmitter.fire({
|
|
1119
1119
|
rawEvents: [{
|
|
1120
1120
|
kind: NotebookCellsChangeType.ChangeCellMetadata,
|
|
1121
|
-
index: this._cells.indexOf(cell),
|
|
1121
|
+
index: ( this._cells.indexOf(cell)),
|
|
1122
1122
|
metadata: cell.metadata,
|
|
1123
1123
|
transient: !triggerDirtyChange
|
|
1124
1124
|
}],
|
|
@@ -1140,7 +1140,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
|
|
|
1140
1140
|
this._pauseableEmitter.fire({
|
|
1141
1141
|
rawEvents: [{
|
|
1142
1142
|
kind: NotebookCellsChangeType.ChangeCellInternalMetadata,
|
|
1143
|
-
index: this._cells.indexOf(cell),
|
|
1143
|
+
index: ( this._cells.indexOf(cell)),
|
|
1144
1144
|
internalMetadata: cell.internalMetadata,
|
|
1145
1145
|
transient: true
|
|
1146
1146
|
}],
|
|
@@ -1177,7 +1177,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
|
|
|
1177
1177
|
this._pauseableEmitter.fire({
|
|
1178
1178
|
rawEvents: [{
|
|
1179
1179
|
kind: NotebookCellsChangeType.ChangeCellLanguage,
|
|
1180
|
-
index: this._cells.indexOf(cell),
|
|
1180
|
+
index: ( this._cells.indexOf(cell)),
|
|
1181
1181
|
language: languageId,
|
|
1182
1182
|
transient: false
|
|
1183
1183
|
}],
|
|
@@ -1214,7 +1214,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
|
|
|
1214
1214
|
this._pauseableEmitter.fire({
|
|
1215
1215
|
rawEvents: [{
|
|
1216
1216
|
kind: NotebookCellsChangeType.Output,
|
|
1217
|
-
index: this._cells.indexOf(cell),
|
|
1217
|
+
index: ( this._cells.indexOf(cell)),
|
|
1218
1218
|
outputs: cell.outputs.map(output => output.asDto()) ?? [],
|
|
1219
1219
|
append,
|
|
1220
1220
|
transient: this.transientOptions.transientOutputs
|
|
@@ -1229,7 +1229,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
|
|
|
1229
1229
|
this._pauseableEmitter.fire({
|
|
1230
1230
|
rawEvents: [{
|
|
1231
1231
|
kind: NotebookCellsChangeType.OutputItem,
|
|
1232
|
-
index: this._cells.indexOf(cell),
|
|
1232
|
+
index: ( this._cells.indexOf(cell)),
|
|
1233
1233
|
outputId: outputId,
|
|
1234
1234
|
outputItems: items,
|
|
1235
1235
|
append: true,
|
|
@@ -1246,7 +1246,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
|
|
|
1246
1246
|
this._pauseableEmitter.fire({
|
|
1247
1247
|
rawEvents: [{
|
|
1248
1248
|
kind: NotebookCellsChangeType.OutputItem,
|
|
1249
|
-
index: this._cells.indexOf(cell),
|
|
1249
|
+
index: ( this._cells.indexOf(cell)),
|
|
1250
1250
|
outputId: outputId,
|
|
1251
1251
|
outputItems: items,
|
|
1252
1252
|
append: false,
|