@theia/notebook 1.67.0-next.13 → 1.67.0-next.56
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/README.md +1 -1
- package/package.json +7 -7
- package/src/browser/contributions/notebook-actions-contribution.ts +25 -22
- package/src/browser/contributions/notebook-cell-actions-contribution.ts +20 -9
- package/src/browser/contributions/notebook-label-provider-contribution.ts +2 -1
- package/src/browser/contributions/notebook-outline-contribution.ts +8 -6
- package/src/browser/contributions/notebook-status-bar-contribution.ts +4 -6
- package/src/browser/index.ts +1 -0
- package/src/browser/notebook-cell-open-handler.ts +3 -3
- package/src/browser/notebook-editor-split-contribution.ts +51 -0
- package/src/browser/notebook-editor-widget-factory.ts +11 -1
- package/src/browser/notebook-editor-widget.tsx +18 -3
- package/src/browser/notebook-frontend-module.ts +5 -0
- package/src/browser/notebook-open-handler.ts +19 -11
- package/src/browser/notebook-types.ts +1 -0
- package/src/browser/service/notebook-context-manager.ts +17 -9
- package/src/browser/view/notebook-cell-editor.tsx +13 -5
- package/src/browser/view/notebook-cell-list-view.tsx +15 -12
- package/src/browser/view/notebook-cell-toolbar-factory.tsx +5 -4
- package/src/browser/view/notebook-code-cell-view.tsx +6 -1
- package/src/browser/view/notebook-markdown-cell-view.tsx +27 -7
- package/src/browser/view-model/notebook-cell-model.ts +8 -41
- package/src/browser/view-model/notebook-model.ts +2 -33
- package/src/browser/view-model/notebook-view-model.ts +138 -0
- package/lib/browser/contributions/cell-operations.d.ts +0 -8
- package/lib/browser/contributions/cell-operations.d.ts.map +0 -1
- package/lib/browser/contributions/cell-operations.js +0 -45
- package/lib/browser/contributions/cell-operations.js.map +0 -1
- package/lib/browser/contributions/notebook-actions-contribution.d.ts +0 -48
- package/lib/browser/contributions/notebook-actions-contribution.d.ts.map +0 -1
- package/lib/browser/contributions/notebook-actions-contribution.js +0 -341
- package/lib/browser/contributions/notebook-actions-contribution.js.map +0 -1
- package/lib/browser/contributions/notebook-cell-actions-contribution.d.ts +0 -66
- package/lib/browser/contributions/notebook-cell-actions-contribution.d.ts.map +0 -1
- package/lib/browser/contributions/notebook-cell-actions-contribution.js +0 -512
- package/lib/browser/contributions/notebook-cell-actions-contribution.js.map +0 -1
- package/lib/browser/contributions/notebook-color-contribution.d.ts +0 -6
- package/lib/browser/contributions/notebook-color-contribution.d.ts.map +0 -1
- package/lib/browser/contributions/notebook-color-contribution.js +0 -247
- package/lib/browser/contributions/notebook-color-contribution.js.map +0 -1
- package/lib/browser/contributions/notebook-context-keys.d.ts +0 -44
- package/lib/browser/contributions/notebook-context-keys.d.ts.map +0 -1
- package/lib/browser/contributions/notebook-context-keys.js +0 -108
- package/lib/browser/contributions/notebook-context-keys.js.map +0 -1
- package/lib/browser/contributions/notebook-label-provider-contribution.d.ts +0 -19
- package/lib/browser/contributions/notebook-label-provider-contribution.d.ts.map +0 -1
- package/lib/browser/contributions/notebook-label-provider-contribution.js +0 -85
- package/lib/browser/contributions/notebook-label-provider-contribution.js.map +0 -1
- package/lib/browser/contributions/notebook-outline-contribution.d.ts +0 -28
- package/lib/browser/contributions/notebook-outline-contribution.d.ts.map +0 -1
- package/lib/browser/contributions/notebook-outline-contribution.js +0 -113
- package/lib/browser/contributions/notebook-outline-contribution.js.map +0 -1
- package/lib/browser/contributions/notebook-output-action-contribution.d.ts +0 -16
- package/lib/browser/contributions/notebook-output-action-contribution.d.ts.map +0 -1
- package/lib/browser/contributions/notebook-output-action-contribution.js +0 -83
- package/lib/browser/contributions/notebook-output-action-contribution.js.map +0 -1
- package/lib/browser/contributions/notebook-status-bar-contribution.d.ts +0 -12
- package/lib/browser/contributions/notebook-status-bar-contribution.d.ts.map +0 -1
- package/lib/browser/contributions/notebook-status-bar-contribution.js +0 -63
- package/lib/browser/contributions/notebook-status-bar-contribution.js.map +0 -1
- package/lib/browser/contributions/notebook-undo-redo-handler.d.ts +0 -10
- package/lib/browser/contributions/notebook-undo-redo-handler.d.ts.map +0 -1
- package/lib/browser/contributions/notebook-undo-redo-handler.js +0 -49
- package/lib/browser/contributions/notebook-undo-redo-handler.js.map +0 -1
- package/lib/browser/index.d.ts +0 -13
- package/lib/browser/index.d.ts.map +0 -1
- package/lib/browser/index.js +0 -31
- package/lib/browser/index.js.map +0 -1
- package/lib/browser/notebook-cell-open-handler.d.ts +0 -10
- package/lib/browser/notebook-cell-open-handler.d.ts.map +0 -1
- package/lib/browser/notebook-cell-open-handler.js +0 -51
- package/lib/browser/notebook-cell-open-handler.js.map +0 -1
- package/lib/browser/notebook-cell-resource-resolver.d.ts +0 -26
- package/lib/browser/notebook-cell-resource-resolver.d.ts.map +0 -1
- package/lib/browser/notebook-cell-resource-resolver.js +0 -109
- package/lib/browser/notebook-cell-resource-resolver.js.map +0 -1
- package/lib/browser/notebook-editor-widget-factory.d.ts +0 -19
- package/lib/browser/notebook-editor-widget-factory.d.ts.map +0 -1
- package/lib/browser/notebook-editor-widget-factory.js +0 -93
- package/lib/browser/notebook-editor-widget-factory.js.map +0 -1
- package/lib/browser/notebook-editor-widget.d.ts +0 -99
- package/lib/browser/notebook-editor-widget.d.ts.map +0 -1
- package/lib/browser/notebook-editor-widget.js +0 -323
- package/lib/browser/notebook-editor-widget.js.map +0 -1
- package/lib/browser/notebook-frontend-module.d.ts +0 -5
- package/lib/browser/notebook-frontend-module.d.ts.map +0 -1
- package/lib/browser/notebook-frontend-module.js +0 -112
- package/lib/browser/notebook-frontend-module.js.map +0 -1
- package/lib/browser/notebook-open-handler.d.ts +0 -23
- package/lib/browser/notebook-open-handler.d.ts.map +0 -1
- package/lib/browser/notebook-open-handler.js +0 -113
- package/lib/browser/notebook-open-handler.js.map +0 -1
- package/lib/browser/notebook-output-utils.d.ts +0 -13
- package/lib/browser/notebook-output-utils.d.ts.map +0 -1
- package/lib/browser/notebook-output-utils.js +0 -112
- package/lib/browser/notebook-output-utils.js.map +0 -1
- package/lib/browser/notebook-renderer-registry.d.ts +0 -25
- package/lib/browser/notebook-renderer-registry.d.ts.map +0 -1
- package/lib/browser/notebook-renderer-registry.js +0 -72
- package/lib/browser/notebook-renderer-registry.js.map +0 -1
- package/lib/browser/notebook-type-registry.d.ts +0 -12
- package/lib/browser/notebook-type-registry.d.ts.map +0 -1
- package/lib/browser/notebook-type-registry.js +0 -60
- package/lib/browser/notebook-type-registry.js.map +0 -1
- package/lib/browser/notebook-types.d.ts +0 -130
- package/lib/browser/notebook-types.d.ts.map +0 -1
- package/lib/browser/notebook-types.js +0 -28
- package/lib/browser/notebook-types.js.map +0 -1
- package/lib/browser/renderers/cell-output-webview.d.ts +0 -26
- package/lib/browser/renderers/cell-output-webview.d.ts.map +0 -1
- package/lib/browser/renderers/cell-output-webview.js +0 -21
- package/lib/browser/renderers/cell-output-webview.js.map +0 -1
- package/lib/browser/service/notebook-cell-editor-service.d.ts +0 -23
- package/lib/browser/service/notebook-cell-editor-service.d.ts.map +0 -1
- package/lib/browser/service/notebook-cell-editor-service.js +0 -89
- package/lib/browser/service/notebook-cell-editor-service.js.map +0 -1
- package/lib/browser/service/notebook-cell-status-bar-service.d.ts +0 -39
- package/lib/browser/service/notebook-cell-status-bar-service.d.ts.map +0 -1
- package/lib/browser/service/notebook-cell-status-bar-service.js +0 -69
- package/lib/browser/service/notebook-cell-status-bar-service.js.map +0 -1
- package/lib/browser/service/notebook-clipboard-service.d.ts +0 -10
- package/lib/browser/service/notebook-clipboard-service.d.ts.map +0 -1
- package/lib/browser/service/notebook-clipboard-service.js +0 -42
- package/lib/browser/service/notebook-clipboard-service.js.map +0 -1
- package/lib/browser/service/notebook-context-manager.d.ts +0 -26
- package/lib/browser/service/notebook-context-manager.d.ts.map +0 -1
- package/lib/browser/service/notebook-context-manager.js +0 -131
- package/lib/browser/service/notebook-context-manager.js.map +0 -1
- package/lib/browser/service/notebook-editor-widget-service.d.ts +0 -27
- package/lib/browser/service/notebook-editor-widget-service.d.ts.map +0 -1
- package/lib/browser/service/notebook-editor-widget-service.js +0 -124
- package/lib/browser/service/notebook-editor-widget-service.js.map +0 -1
- package/lib/browser/service/notebook-execution-service.d.ts +0 -25
- package/lib/browser/service/notebook-execution-service.d.ts.map +0 -1
- package/lib/browser/service/notebook-execution-service.js +0 -150
- package/lib/browser/service/notebook-execution-service.js.map +0 -1
- package/lib/browser/service/notebook-execution-state-service.d.ts +0 -78
- package/lib/browser/service/notebook-execution-state-service.d.ts.map +0 -1
- package/lib/browser/service/notebook-execution-state-service.js +0 -247
- package/lib/browser/service/notebook-execution-state-service.js.map +0 -1
- package/lib/browser/service/notebook-kernel-history-service.d.ts +0 -28
- package/lib/browser/service/notebook-kernel-history-service.d.ts.map +0 -1
- package/lib/browser/service/notebook-kernel-history-service.js +0 -116
- package/lib/browser/service/notebook-kernel-history-service.js.map +0 -1
- package/lib/browser/service/notebook-kernel-quick-pick-service.d.ts +0 -61
- package/lib/browser/service/notebook-kernel-quick-pick-service.d.ts.map +0 -1
- package/lib/browser/service/notebook-kernel-quick-pick-service.js +0 -425
- package/lib/browser/service/notebook-kernel-quick-pick-service.js.map +0 -1
- package/lib/browser/service/notebook-kernel-service.d.ts +0 -125
- package/lib/browser/service/notebook-kernel-service.d.ts.map +0 -1
- package/lib/browser/service/notebook-kernel-service.js +0 -268
- package/lib/browser/service/notebook-kernel-service.js.map +0 -1
- package/lib/browser/service/notebook-model-resolver-service.d.ts +0 -28
- package/lib/browser/service/notebook-model-resolver-service.d.ts.map +0 -1
- package/lib/browser/service/notebook-model-resolver-service.js +0 -157
- package/lib/browser/service/notebook-model-resolver-service.js.map +0 -1
- package/lib/browser/service/notebook-monaco-text-model-service.d.ts +0 -21
- package/lib/browser/service/notebook-monaco-text-model-service.d.ts.map +0 -1
- package/lib/browser/service/notebook-monaco-text-model-service.js +0 -73
- package/lib/browser/service/notebook-monaco-text-model-service.js.map +0 -1
- package/lib/browser/service/notebook-options.d.ts +0 -30
- package/lib/browser/service/notebook-options.d.ts.map +0 -1
- package/lib/browser/service/notebook-options.js +0 -130
- package/lib/browser/service/notebook-options.js.map +0 -1
- package/lib/browser/service/notebook-renderer-messaging-service.d.ts +0 -35
- package/lib/browser/service/notebook-renderer-messaging-service.d.ts.map +0 -1
- package/lib/browser/service/notebook-renderer-messaging-service.js +0 -100
- package/lib/browser/service/notebook-renderer-messaging-service.js.map +0 -1
- package/lib/browser/service/notebook-service.d.ts +0 -68
- package/lib/browser/service/notebook-service.d.ts.map +0 -1
- package/lib/browser/service/notebook-service.js +0 -184
- package/lib/browser/service/notebook-service.js.map +0 -1
- package/lib/browser/view/notebook-cell-editor.d.ts +0 -44
- package/lib/browser/view/notebook-cell-editor.d.ts.map +0 -1
- package/lib/browser/view/notebook-cell-editor.js +0 -267
- package/lib/browser/view/notebook-cell-editor.js.map +0 -1
- package/lib/browser/view/notebook-cell-list-view.d.ts +0 -56
- package/lib/browser/view/notebook-cell-list-view.d.ts.map +0 -1
- package/lib/browser/view/notebook-cell-list-view.js +0 -222
- package/lib/browser/view/notebook-cell-list-view.js.map +0 -1
- package/lib/browser/view/notebook-cell-toolbar-factory.d.ts +0 -33
- package/lib/browser/view/notebook-cell-toolbar-factory.d.ts.map +0 -1
- package/lib/browser/view/notebook-cell-toolbar-factory.js +0 -110
- package/lib/browser/view/notebook-cell-toolbar-factory.js.map +0 -1
- package/lib/browser/view/notebook-cell-toolbar.d.ts +0 -25
- package/lib/browser/view/notebook-cell-toolbar.d.ts.map +0 -1
- package/lib/browser/view/notebook-cell-toolbar.js +0 -51
- package/lib/browser/view/notebook-cell-toolbar.js.map +0 -1
- package/lib/browser/view/notebook-code-cell-view.d.ts +0 -91
- package/lib/browser/view/notebook-code-cell-view.d.ts.map +0 -1
- package/lib/browser/view/notebook-code-cell-view.js +0 -333
- package/lib/browser/view/notebook-code-cell-view.js.map +0 -1
- package/lib/browser/view/notebook-find-widget.d.ts +0 -63
- package/lib/browser/view/notebook-find-widget.d.ts.map +0 -1
- package/lib/browser/view/notebook-find-widget.js +0 -225
- package/lib/browser/view/notebook-find-widget.js.map +0 -1
- package/lib/browser/view/notebook-main-toolbar.d.ts +0 -53
- package/lib/browser/view/notebook-main-toolbar.d.ts.map +0 -1
- package/lib/browser/view/notebook-main-toolbar.js +0 -184
- package/lib/browser/view/notebook-main-toolbar.js.map +0 -1
- package/lib/browser/view/notebook-markdown-cell-view.d.ts +0 -26
- package/lib/browser/view/notebook-markdown-cell-view.d.ts.map +0 -1
- package/lib/browser/view/notebook-markdown-cell-view.js +0 -198
- package/lib/browser/view/notebook-markdown-cell-view.js.map +0 -1
- package/lib/browser/view/notebook-viewport-service.d.ts +0 -17
- package/lib/browser/view/notebook-viewport-service.d.ts.map +0 -1
- package/lib/browser/view/notebook-viewport-service.js +0 -61
- package/lib/browser/view/notebook-viewport-service.js.map +0 -1
- package/lib/browser/view-model/notebook-cell-model.d.ts +0 -149
- package/lib/browser/view-model/notebook-cell-model.d.ts.map +0 -1
- package/lib/browser/view-model/notebook-cell-model.js +0 -391
- package/lib/browser/view-model/notebook-cell-model.js.map +0 -1
- package/lib/browser/view-model/notebook-cell-output-model.d.ts +0 -17
- package/lib/browser/view-model/notebook-cell-output-model.d.ts.map +0 -1
- package/lib/browser/view-model/notebook-cell-output-model.js +0 -87
- package/lib/browser/view-model/notebook-cell-output-model.js.map +0 -1
- package/lib/browser/view-model/notebook-model.d.ts +0 -93
- package/lib/browser/view-model/notebook-model.d.ts.map +0 -1
- package/lib/browser/view-model/notebook-model.js +0 -468
- package/lib/browser/view-model/notebook-model.js.map +0 -1
- package/lib/common/index.d.ts +0 -3
- package/lib/common/index.d.ts.map +0 -1
- package/lib/common/index.js +0 -21
- package/lib/common/index.js.map +0 -1
- package/lib/common/notebook-common.d.ts +0 -227
- package/lib/common/notebook-common.d.ts.map +0 -1
- package/lib/common/notebook-common.js +0 -151
- package/lib/common/notebook-common.js.map +0 -1
- package/lib/common/notebook-preferences.d.ts +0 -15
- package/lib/common/notebook-preferences.d.ts.map +0 -1
- package/lib/common/notebook-preferences.js +0 -89
- package/lib/common/notebook-preferences.js.map +0 -1
- package/lib/common/notebook-protocol.d.ts +0 -21
- package/lib/common/notebook-protocol.d.ts.map +0 -1
- package/lib/common/notebook-protocol.js +0 -18
- package/lib/common/notebook-protocol.js.map +0 -1
- package/lib/common/notebook-range.d.ts +0 -14
- package/lib/common/notebook-range.d.ts.map +0 -1
- package/lib/common/notebook-range.js +0 -18
- package/lib/common/notebook-range.js.map +0 -1
- package/lib/node/notebook-backend-module.d.ts +0 -4
- package/lib/node/notebook-backend-module.d.ts.map +0 -1
- package/lib/node/notebook-backend-module.js +0 -23
- package/lib/node/notebook-backend-module.js.map +0 -1
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2023 TypeFox and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.NotebookCellOutputModel = void 0;
|
|
19
|
-
const core_1 = require("@theia/core");
|
|
20
|
-
const common_1 = require("../../common");
|
|
21
|
-
const notebook_output_utils_1 = require("../notebook-output-utils");
|
|
22
|
-
class NotebookCellOutputModel {
|
|
23
|
-
get outputId() {
|
|
24
|
-
return this.rawOutput.outputId;
|
|
25
|
-
}
|
|
26
|
-
get outputs() {
|
|
27
|
-
return this.rawOutput.outputs || [];
|
|
28
|
-
}
|
|
29
|
-
get metadata() {
|
|
30
|
-
return this.rawOutput.metadata;
|
|
31
|
-
}
|
|
32
|
-
constructor(rawOutput) {
|
|
33
|
-
this.rawOutput = rawOutput;
|
|
34
|
-
this.didChangeDataEmitter = new core_1.Emitter();
|
|
35
|
-
this.onDidChangeData = this.didChangeDataEmitter.event;
|
|
36
|
-
}
|
|
37
|
-
replaceData(rawData) {
|
|
38
|
-
this.rawOutput = rawData;
|
|
39
|
-
this.optimizeOutputItems();
|
|
40
|
-
this.didChangeDataEmitter.fire();
|
|
41
|
-
}
|
|
42
|
-
appendData(items) {
|
|
43
|
-
this.rawOutput.outputs.push(...items);
|
|
44
|
-
this.optimizeOutputItems();
|
|
45
|
-
this.didChangeDataEmitter.fire();
|
|
46
|
-
}
|
|
47
|
-
dispose() {
|
|
48
|
-
this.didChangeDataEmitter.dispose();
|
|
49
|
-
}
|
|
50
|
-
getData() {
|
|
51
|
-
return {
|
|
52
|
-
outputs: this.outputs,
|
|
53
|
-
metadata: this.metadata,
|
|
54
|
-
outputId: this.outputId
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
optimizeOutputItems() {
|
|
58
|
-
if (this.outputs.length > 1 && this.outputs.every(item => (0, common_1.isTextStreamMime)(item.mime))) {
|
|
59
|
-
// Look for the mimes in the items, and keep track of their order.
|
|
60
|
-
// Merge the streams into one output item, per mime type.
|
|
61
|
-
const mimeOutputs = new Map();
|
|
62
|
-
const mimeTypes = [];
|
|
63
|
-
this.outputs.forEach(item => {
|
|
64
|
-
let items;
|
|
65
|
-
if (mimeOutputs.has(item.mime)) {
|
|
66
|
-
items = mimeOutputs.get(item.mime);
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
items = [];
|
|
70
|
-
mimeOutputs.set(item.mime, items);
|
|
71
|
-
mimeTypes.push(item.mime);
|
|
72
|
-
}
|
|
73
|
-
items.push(item.data.buffer);
|
|
74
|
-
});
|
|
75
|
-
this.outputs.length = 0;
|
|
76
|
-
mimeTypes.forEach(mime => {
|
|
77
|
-
const compressionResult = (0, notebook_output_utils_1.compressOutputItemStreams)(mimeOutputs.get(mime));
|
|
78
|
-
this.outputs.push({
|
|
79
|
-
mime,
|
|
80
|
-
data: compressionResult.data
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
exports.NotebookCellOutputModel = NotebookCellOutputModel;
|
|
87
|
-
//# sourceMappingURL=notebook-cell-output-model.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notebook-cell-output-model.js","sourceRoot":"","sources":["../../../src/browser/view-model/notebook-cell-output-model.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,sCAAkD;AAClD,yCAA4E;AAC5E,oEAAqE;AAErE,MAAa,uBAAuB;IAKhC,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;IACnC,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,IAAI,EAAE,CAAC;IACxC,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;IACnC,CAAC;IAED,YAAsB,SAAqB;QAArB,cAAS,GAAT,SAAS,CAAY;QAfnC,yBAAoB,GAAG,IAAI,cAAO,EAAQ,CAAC;QAC1C,oBAAe,GAAG,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC;IAcZ,CAAC;IAEhD,WAAW,CAAC,OAAmB;QAC3B,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC;QACzB,IAAI,CAAC,mBAAmB,EAAE,C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AAC,CAAC;gBAC9B,CAAC;gBACD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACjC,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;YACxB,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBACrB,MAAM,iBAAiB,GAAG,IAAA,iDAAyB,EAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC,CAAC;gBAC5E,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;oBACd,IAAI;oBACJ,IAAI,EAAE,iBAAiB,CAAC,IAAI;iBAC/B,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;CAEJ;AAvED,0DAuEC"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { Disposable, Emitter, Event, QueueableEmitter, Resource, URI } from '@theia/core';
|
|
2
|
-
import { Saveable, SaveOptions } from '@theia/core/lib/browser';
|
|
3
|
-
import { CellData, NotebookCellMetadata, NotebookData, NotebookDocumentMetadata } from '../../common';
|
|
4
|
-
import { NotebookContentChangedEvent, NotebookModelWillAddRemoveEvent, CellEditOperation, NullablePartialNotebookCellInternalMetadata, NullablePartialNotebookCellMetadata } from '../notebook-types';
|
|
5
|
-
import { NotebookSerializer } from '../service/notebook-service';
|
|
6
|
-
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
7
|
-
import { NotebookCellModel, NotebookCellModelFactory } from './notebook-cell-model';
|
|
8
|
-
import { interfaces } from '@theia/core/shared/inversify';
|
|
9
|
-
import { UndoRedoService } from '@theia/editor/lib/browser/undo-redo-service';
|
|
10
|
-
import { MarkdownString } from '@theia/core/lib/common/markdown-rendering';
|
|
11
|
-
import type { NotebookModelResolverService } from '../service/notebook-model-resolver-service';
|
|
12
|
-
import { BinaryBuffer } from '@theia/core/lib/common/buffer';
|
|
13
|
-
import { NotebookEditorFindMatch, NotebookEditorFindMatchOptions } from '../view/notebook-find-widget';
|
|
14
|
-
export declare const NotebookModelFactory: unique symbol;
|
|
15
|
-
export declare function createNotebookModelContainer(parent: interfaces.Container, props: NotebookModelProps): interfaces.Container;
|
|
16
|
-
export declare const NotebookModelResolverServiceProxy: unique symbol;
|
|
17
|
-
export interface NotebookModelProps {
|
|
18
|
-
data: NotebookData;
|
|
19
|
-
resource: Resource;
|
|
20
|
-
viewType: string;
|
|
21
|
-
serializer: NotebookSerializer;
|
|
22
|
-
}
|
|
23
|
-
export interface SelectedCellChangeEvent {
|
|
24
|
-
cell: NotebookCellModel | undefined;
|
|
25
|
-
scrollIntoView: boolean;
|
|
26
|
-
}
|
|
27
|
-
export declare class NotebookModel implements Saveable, Disposable {
|
|
28
|
-
protected readonly onDirtyChangedEmitter: Emitter<void>;
|
|
29
|
-
readonly onDirtyChanged: Event<void>;
|
|
30
|
-
protected readonly onDidSaveNotebookEmitter: Emitter<void>;
|
|
31
|
-
readonly onDidSaveNotebook: Event<void>;
|
|
32
|
-
protected readonly onDidAddOrRemoveCellEmitter: Emitter<NotebookModelWillAddRemoveEvent>;
|
|
33
|
-
readonly onDidAddOrRemoveCell: Event<NotebookModelWillAddRemoveEvent>;
|
|
34
|
-
protected readonly onDidChangeContentEmitter: QueueableEmitter<NotebookContentChangedEvent>;
|
|
35
|
-
readonly onDidChangeContent: Event<NotebookContentChangedEvent[]>;
|
|
36
|
-
protected readonly onContentChangedEmitter: Emitter<void>;
|
|
37
|
-
readonly onContentChanged: Event<void>;
|
|
38
|
-
protected readonly onDidChangeSelectedCellEmitter: Emitter<SelectedCellChangeEvent>;
|
|
39
|
-
readonly onDidChangeSelectedCell: Event<SelectedCellChangeEvent>;
|
|
40
|
-
protected readonly onDidDisposeEmitter: Emitter<void>;
|
|
41
|
-
readonly onDidDispose: Event<void>;
|
|
42
|
-
get onDidChangeReadOnly(): Event<boolean | MarkdownString>;
|
|
43
|
-
protected readonly fileService: FileService;
|
|
44
|
-
protected readonly undoRedoService: UndoRedoService;
|
|
45
|
-
protected props: NotebookModelProps;
|
|
46
|
-
protected cellModelFactory: NotebookCellModelFactory;
|
|
47
|
-
protected modelResolverService: NotebookModelResolverService;
|
|
48
|
-
protected nextHandle: number;
|
|
49
|
-
protected _dirty: boolean;
|
|
50
|
-
set dirty(dirty: boolean);
|
|
51
|
-
get dirty(): boolean;
|
|
52
|
-
get readOnly(): boolean | MarkdownString;
|
|
53
|
-
protected _selectedText: string;
|
|
54
|
-
set selectedText(value: string);
|
|
55
|
-
get selectedText(): string;
|
|
56
|
-
selectedCell?: NotebookCellModel;
|
|
57
|
-
protected dirtyCells: NotebookCellModel[];
|
|
58
|
-
cells: NotebookCellModel[];
|
|
59
|
-
get uri(): URI;
|
|
60
|
-
get viewType(): string;
|
|
61
|
-
metadata: NotebookDocumentMetadata;
|
|
62
|
-
initialize(): void;
|
|
63
|
-
dispose(): void;
|
|
64
|
-
save(options?: SaveOptions): Promise<void>;
|
|
65
|
-
createSnapshot(): Saveable.Snapshot;
|
|
66
|
-
serialize(): Promise<BinaryBuffer>;
|
|
67
|
-
applySnapshot(snapshot: Saveable.Snapshot): Promise<void>;
|
|
68
|
-
revert(options?: Saveable.RevertOptions): Promise<void>;
|
|
69
|
-
isDirty(): boolean;
|
|
70
|
-
cellDirtyChanged(cell: NotebookCellModel, dirtyState: boolean): void;
|
|
71
|
-
setData(data: NotebookData, markDirty?: boolean): void;
|
|
72
|
-
getData(): NotebookData;
|
|
73
|
-
undo(): void;
|
|
74
|
-
redo(): void;
|
|
75
|
-
setSelectedCell(cell: NotebookCellModel, scrollIntoView?: boolean): void;
|
|
76
|
-
private addCellOutputListeners;
|
|
77
|
-
getVisibleCells(): NotebookCellModel[];
|
|
78
|
-
applyEdits(rawEdits: CellEditOperation[], computeUndoRedo: boolean): void;
|
|
79
|
-
protected fireContentChange(): void;
|
|
80
|
-
protected replaceCells(start: number, deleteCount: number, newCells: CellData[], computeUndoRedo: boolean, requestEdit: boolean): void;
|
|
81
|
-
protected changeCellInternalMetadataPartial(cell: NotebookCellModel, internalMetadata: NullablePartialNotebookCellInternalMetadata): void;
|
|
82
|
-
protected updateNotebookMetadata(metadata: NotebookDocumentMetadata, computeUndoRedo: boolean): void;
|
|
83
|
-
protected changeCellMetadataPartial(cell: NotebookCellModel, metadata: NullablePartialNotebookCellMetadata, computeUndoRedo: boolean): void;
|
|
84
|
-
protected changeCellMetadata(cell: NotebookCellModel, metadata: NotebookCellMetadata, computeUndoRedo: boolean): void;
|
|
85
|
-
protected changeCellLanguage(cell: NotebookCellModel, languageId: string, computeUndoRedo: boolean): void;
|
|
86
|
-
protected moveCellToIndex(fromIndex: number, length: number, toIndex: number, computeUndoRedo: boolean): boolean;
|
|
87
|
-
getCellIndexByHandle(handle: number): number;
|
|
88
|
-
getCellByHandle(handle: number): NotebookCellModel | undefined;
|
|
89
|
-
protected isCellMetadataChanged(a: NotebookCellMetadata, b: NotebookCellMetadata): boolean;
|
|
90
|
-
findMatches(options: NotebookEditorFindMatchOptions): NotebookEditorFindMatch[];
|
|
91
|
-
replaceAll(matches: NotebookEditorFindMatch[], text: string): void;
|
|
92
|
-
}
|
|
93
|
-
//# sourceMappingURL=notebook-model.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notebook-model.d.ts","sourceRoot":"","sources":["../../../src/browser/view-model/notebook-model.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EACH,QAAQ,EACR,oBAAoB,EACkC,YAAY,EAClE,wBAAwB,EAC3B,MAAM,cAAc,CAAC;AACtB,OAAO,EACH,2BAA2B,EAAE,+BAA+B,EAC5D,iBAAiB,EAAE,2CAA2C,EAC9D,mCAAmC,EACtC,MA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Q,EAAE,wBAAwB,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI;IAapG,SAAS,CAAC,yBAAyB,CAAC,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,mCAAmC,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI;IAc3I,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI;IAkBrH,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI;IAUzG,SAAS,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,GAAG,OAAO;IAqBhH,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAI5C,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAI9D,SAAS,CAAC,qBAAqB,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,GAAG,OAAO;IAW1F,WAAW,CAAC,OAAO,EAAE,8BAA8B,GAAG,uBAAuB,EAAE;IAQ/E,UAAU,CAAC,OAAO,EAAE,uBAAuB,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;CAerE"}
|
|
@@ -1,468 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2023 Typefox and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.NotebookModel = exports.NotebookModelResolverServiceProxy = exports.createNotebookModelContainer = exports.NotebookModelFactory = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const core_1 = require("@theia/core");
|
|
21
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
22
|
-
const common_1 = require("../../common");
|
|
23
|
-
const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
|
|
24
|
-
const notebook_cell_model_1 = require("./notebook-cell-model");
|
|
25
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
26
|
-
const undo_redo_service_1 = require("@theia/editor/lib/browser/undo-redo-service");
|
|
27
|
-
exports.NotebookModelFactory = Symbol('NotebookModelFactory');
|
|
28
|
-
function createNotebookModelContainer(parent, props) {
|
|
29
|
-
const child = parent.createChild();
|
|
30
|
-
child.bind(NotebookModelProps).toConstantValue(props);
|
|
31
|
-
child.bind(NotebookModel).toSelf();
|
|
32
|
-
return child;
|
|
33
|
-
}
|
|
34
|
-
exports.createNotebookModelContainer = createNotebookModelContainer;
|
|
35
|
-
exports.NotebookModelResolverServiceProxy = Symbol('NotebookModelResolverServiceProxy');
|
|
36
|
-
const NotebookModelProps = Symbol('NotebookModelProps');
|
|
37
|
-
let NotebookModel = class NotebookModel {
|
|
38
|
-
constructor() {
|
|
39
|
-
this.onDirtyChangedEmitter = new core_1.Emitter();
|
|
40
|
-
this.onDirtyChanged = this.onDirtyChangedEmitter.event;
|
|
41
|
-
this.onDidSaveNotebookEmitter = new core_1.Emitter();
|
|
42
|
-
this.onDidSaveNotebook = this.onDidSaveNotebookEmitter.event;
|
|
43
|
-
this.onDidAddOrRemoveCellEmitter = new core_1.Emitter();
|
|
44
|
-
this.onDidAddOrRemoveCell = this.onDidAddOrRemoveCellEmitter.event;
|
|
45
|
-
this.onDidChangeContentEmitter = new core_1.QueueableEmitter();
|
|
46
|
-
this.onDidChangeContent = this.onDidChangeContentEmitter.event;
|
|
47
|
-
this.onContentChangedEmitter = new core_1.Emitter();
|
|
48
|
-
this.onContentChanged = this.onContentChangedEmitter.event;
|
|
49
|
-
this.onDidChangeSelectedCellEmitter = new core_1.Emitter();
|
|
50
|
-
this.onDidChangeSelectedCell = this.onDidChangeSelectedCellEmitter.event;
|
|
51
|
-
this.onDidDisposeEmitter = new core_1.Emitter();
|
|
52
|
-
this.onDidDispose = this.onDidDisposeEmitter.event;
|
|
53
|
-
this.nextHandle = 0;
|
|
54
|
-
this._dirty = false;
|
|
55
|
-
this._selectedText = '';
|
|
56
|
-
this.dirtyCells = [];
|
|
57
|
-
this.metadata = {};
|
|
58
|
-
}
|
|
59
|
-
get onDidChangeReadOnly() {
|
|
60
|
-
var _a;
|
|
61
|
-
return (_a = this.props.resource.onDidChangeReadOnly) !== null && _a !== void 0 ? _a : core_1.Event.None;
|
|
62
|
-
}
|
|
63
|
-
set dirty(dirty) {
|
|
64
|
-
const oldState = this._dirty;
|
|
65
|
-
this._dirty = dirty;
|
|
66
|
-
if (oldState !== dirty) {
|
|
67
|
-
this.onDirtyChangedEmitter.fire();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
get dirty() {
|
|
71
|
-
return this._dirty;
|
|
72
|
-
}
|
|
73
|
-
get readOnly() {
|
|
74
|
-
var _a;
|
|
75
|
-
return (_a = this.props.resource.readOnly) !== null && _a !== void 0 ? _a : false;
|
|
76
|
-
}
|
|
77
|
-
set selectedText(value) {
|
|
78
|
-
this._selectedText = value;
|
|
79
|
-
}
|
|
80
|
-
get selectedText() {
|
|
81
|
-
return this._selectedText;
|
|
82
|
-
}
|
|
83
|
-
get uri() {
|
|
84
|
-
return this.props.resource.uri;
|
|
85
|
-
}
|
|
86
|
-
get viewType() {
|
|
87
|
-
return this.props.viewType;
|
|
88
|
-
}
|
|
89
|
-
initialize() {
|
|
90
|
-
this.dirty = false;
|
|
91
|
-
this.cells = this.props.data.cells.map((cell, index) => this.cellModelFactory({
|
|
92
|
-
uri: common_1.CellUri.generate(this.props.resource.uri, index),
|
|
93
|
-
handle: index,
|
|
94
|
-
source: cell.source,
|
|
95
|
-
language: cell.language,
|
|
96
|
-
cellKind: cell.cellKind,
|
|
97
|
-
outputs: cell.outputs,
|
|
98
|
-
metadata: cell.metadata,
|
|
99
|
-
internalMetadata: cell.internalMetadata,
|
|
100
|
-
collapseState: cell.collapseState
|
|
101
|
-
}));
|
|
102
|
-
this.addCellOutputListeners(this.cells);
|
|
103
|
-
this.metadata = this.props.data.metadata;
|
|
104
|
-
this.nextHandle = this.cells.length;
|
|
105
|
-
}
|
|
106
|
-
dispose() {
|
|
107
|
-
this.onDirtyChangedEmitter.dispose();
|
|
108
|
-
this.onDidSaveNotebookEmitter.dispose();
|
|
109
|
-
this.onDidAddOrRemoveCellEmitter.dispose();
|
|
110
|
-
this.onDidChangeContentEmitter.dispose();
|
|
111
|
-
this.onDidChangeSelectedCellEmitter.dispose();
|
|
112
|
-
this.cells.forEach(cell => cell.dispose());
|
|
113
|
-
this.onDidDisposeEmitter.fire();
|
|
114
|
-
}
|
|
115
|
-
async save(options) {
|
|
116
|
-
this.dirtyCells = [];
|
|
117
|
-
this.dirty = false;
|
|
118
|
-
const serializedNotebook = await this.serialize();
|
|
119
|
-
this.fileService.writeFile(this.uri, serializedNotebook);
|
|
120
|
-
this.onDidSaveNotebookEmitter.fire();
|
|
121
|
-
}
|
|
122
|
-
createSnapshot() {
|
|
123
|
-
return {
|
|
124
|
-
read: () => JSON.stringify(this.getData())
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
serialize() {
|
|
128
|
-
return this.props.serializer.fromNotebook(this.getData());
|
|
129
|
-
}
|
|
130
|
-
async applySnapshot(snapshot) {
|
|
131
|
-
const rawData = browser_1.Saveable.Snapshot.read(snapshot);
|
|
132
|
-
if (!rawData) {
|
|
133
|
-
throw new Error('could not read notebook snapshot');
|
|
134
|
-
}
|
|
135
|
-
const data = JSON.parse(rawData);
|
|
136
|
-
this.setData(data);
|
|
137
|
-
}
|
|
138
|
-
async revert(options) {
|
|
139
|
-
if (!(options === null || options === void 0 ? void 0 : options.soft)) {
|
|
140
|
-
// Load the data from the file again
|
|
141
|
-
try {
|
|
142
|
-
const data = await this.modelResolverService.resolveExistingNotebookData(this.props.resource, this.props.viewType);
|
|
143
|
-
this.setData(data, false);
|
|
144
|
-
}
|
|
145
|
-
catch (err) {
|
|
146
|
-
console.error('Failed to revert notebook', err);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
this.dirty = false;
|
|
150
|
-
}
|
|
151
|
-
isDirty() {
|
|
152
|
-
return this.dirty;
|
|
153
|
-
}
|
|
154
|
-
cellDirtyChanged(cell, dirtyState) {
|
|
155
|
-
if (dirtyState) {
|
|
156
|
-
this.dirtyCells.push(cell);
|
|
157
|
-
}
|
|
158
|
-
else {
|
|
159
|
-
this.dirtyCells.splice(this.dirtyCells.indexOf(cell), 1);
|
|
160
|
-
}
|
|
161
|
-
this.dirty = this.dirtyCells.length > 0;
|
|
162
|
-
// Only fire `onContentChangedEmitter` here, because `onDidChangeContentEmitter` is used for model level changes only
|
|
163
|
-
// However, this event indicates that the content of a cell has changed
|
|
164
|
-
this.onContentChangedEmitter.fire();
|
|
165
|
-
}
|
|
166
|
-
setData(data, markDirty = true) {
|
|
167
|
-
// Replace all cells in the model
|
|
168
|
-
this.dirtyCells = [];
|
|
169
|
-
this.replaceCells(0, this.cells.length, data.cells, false, false);
|
|
170
|
-
this.metadata = data.metadata;
|
|
171
|
-
this.dirty = markDirty;
|
|
172
|
-
this.onDidChangeContentEmitter.fire();
|
|
173
|
-
}
|
|
174
|
-
getData() {
|
|
175
|
-
return {
|
|
176
|
-
cells: this.cells.map(cell => cell.getData()),
|
|
177
|
-
metadata: this.metadata
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
undo() {
|
|
181
|
-
if (!this.readOnly) {
|
|
182
|
-
this.undoRedoService.undo(this.uri);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
redo() {
|
|
186
|
-
if (!this.readOnly) {
|
|
187
|
-
this.undoRedoService.redo(this.uri);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
setSelectedCell(cell, scrollIntoView) {
|
|
191
|
-
if (this.selectedCell !== cell) {
|
|
192
|
-
this.selectedCell = cell;
|
|
193
|
-
this.onDidChangeSelectedCellEmitter.fire({ cell, scrollIntoView: scrollIntoView !== null && scrollIntoView !== void 0 ? scrollIntoView : true });
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
addCellOutputListeners(cells) {
|
|
197
|
-
for (const cell of cells) {
|
|
198
|
-
cell.onDidChangeOutputs(() => {
|
|
199
|
-
this.dirty = true;
|
|
200
|
-
});
|
|
201
|
-
cell.onDidRequestCellEditChange(() => {
|
|
202
|
-
this.onContentChangedEmitter.fire();
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
getVisibleCells() {
|
|
207
|
-
return this.cells;
|
|
208
|
-
}
|
|
209
|
-
applyEdits(rawEdits, computeUndoRedo) {
|
|
210
|
-
var _a, _b, _c;
|
|
211
|
-
const editsWithDetails = rawEdits.map((edit, index) => {
|
|
212
|
-
let cellIndex = -1;
|
|
213
|
-
if ('index' in edit) {
|
|
214
|
-
cellIndex = edit.index;
|
|
215
|
-
}
|
|
216
|
-
else if ('handle' in edit) {
|
|
217
|
-
cellIndex = this.getCellIndexByHandle(edit.handle);
|
|
218
|
-
}
|
|
219
|
-
else if ('outputId' in edit) {
|
|
220
|
-
cellIndex = this.cells.findIndex(cell => cell.outputs.some(output => output.outputId === edit.outputId));
|
|
221
|
-
}
|
|
222
|
-
return {
|
|
223
|
-
edit,
|
|
224
|
-
cellIndex,
|
|
225
|
-
end: edit.editType === 1 /* CellEditType.Replace */ ? edit.index + edit.count : cellIndex,
|
|
226
|
-
originalIndex: index
|
|
227
|
-
};
|
|
228
|
-
});
|
|
229
|
-
for (const { edit, cellIndex } of editsWithDetails) {
|
|
230
|
-
const cell = this.cells[cellIndex];
|
|
231
|
-
if (cell) {
|
|
232
|
-
this.cellDirtyChanged(cell, true);
|
|
233
|
-
}
|
|
234
|
-
let scrollIntoView = true;
|
|
235
|
-
switch (edit.editType) {
|
|
236
|
-
case 1 /* CellEditType.Replace */:
|
|
237
|
-
this.replaceCells(edit.index, edit.count, edit.cells, computeUndoRedo, true);
|
|
238
|
-
scrollIntoView = edit.cells.length > 0;
|
|
239
|
-
break;
|
|
240
|
-
case 2 /* CellEditType.Output */: {
|
|
241
|
-
if (edit.append) {
|
|
242
|
-
cell.spliceNotebookCellOutputs({ deleteCount: 0, newOutputs: edit.outputs, start: cell.outputs.length });
|
|
243
|
-
}
|
|
244
|
-
else {
|
|
245
|
-
// could definitely be more efficient. See vscode __spliceNotebookCellOutputs2
|
|
246
|
-
// For now, just replace the whole existing output with the new output
|
|
247
|
-
cell.spliceNotebookCellOutputs({ start: 0, deleteCount: (_a = edit.deleteCount) !== null && _a !== void 0 ? _a : cell.outputs.length, newOutputs: edit.outputs });
|
|
248
|
-
}
|
|
249
|
-
this.onDidChangeContentEmitter.queue({ kind: common_1.NotebookCellsChangeType.Output, index: cellIndex, outputs: cell.outputs, append: (_b = edit.append) !== null && _b !== void 0 ? _b : false });
|
|
250
|
-
break;
|
|
251
|
-
}
|
|
252
|
-
case 7 /* CellEditType.OutputItems */:
|
|
253
|
-
cell.changeOutputItems(edit.outputId, !!edit.append, edit.items);
|
|
254
|
-
this.onDidChangeContentEmitter.queue({
|
|
255
|
-
kind: common_1.NotebookCellsChangeType.OutputItem, index: cellIndex, outputItems: edit.items,
|
|
256
|
-
outputId: edit.outputId, append: (_c = edit.append) !== null && _c !== void 0 ? _c : false
|
|
257
|
-
});
|
|
258
|
-
break;
|
|
259
|
-
case 3 /* CellEditType.Metadata */:
|
|
260
|
-
this.changeCellMetadata(this.cells[cellIndex], edit.metadata, false);
|
|
261
|
-
break;
|
|
262
|
-
case 8 /* CellEditType.PartialMetadata */:
|
|
263
|
-
this.changeCellMetadataPartial(this.cells[cellIndex], edit.metadata, false);
|
|
264
|
-
break;
|
|
265
|
-
case 9 /* CellEditType.PartialInternalMetadata */:
|
|
266
|
-
this.changeCellInternalMetadataPartial(this.cells[cellIndex], edit.internalMetadata);
|
|
267
|
-
break;
|
|
268
|
-
case 4 /* CellEditType.CellLanguage */:
|
|
269
|
-
this.changeCellLanguage(this.cells[cellIndex], edit.language, computeUndoRedo);
|
|
270
|
-
break;
|
|
271
|
-
case 5 /* CellEditType.DocumentMetadata */:
|
|
272
|
-
this.updateNotebookMetadata(edit.metadata, false);
|
|
273
|
-
break;
|
|
274
|
-
case 6 /* CellEditType.Move */:
|
|
275
|
-
this.moveCellToIndex(cellIndex, edit.length, edit.newIdx, computeUndoRedo);
|
|
276
|
-
break;
|
|
277
|
-
}
|
|
278
|
-
// if selected cell is affected update it because it can potentially have been replaced
|
|
279
|
-
if (cell === this.selectedCell) {
|
|
280
|
-
this.setSelectedCell(this.cells[Math.min(cellIndex, this.cells.length - 1)], scrollIntoView);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
this.fireContentChange();
|
|
284
|
-
}
|
|
285
|
-
fireContentChange() {
|
|
286
|
-
this.onDidChangeContentEmitter.fire();
|
|
287
|
-
this.onContentChangedEmitter.fire();
|
|
288
|
-
}
|
|
289
|
-
replaceCells(start, deleteCount, newCells, computeUndoRedo, requestEdit) {
|
|
290
|
-
var _a, _b;
|
|
291
|
-
const cells = newCells.map(cell => {
|
|
292
|
-
const handle = this.nextHandle++;
|
|
293
|
-
return this.cellModelFactory({
|
|
294
|
-
uri: common_1.CellUri.generate(this.uri, handle),
|
|
295
|
-
handle: handle,
|
|
296
|
-
source: cell.source,
|
|
297
|
-
language: cell.language,
|
|
298
|
-
cellKind: cell.cellKind,
|
|
299
|
-
outputs: cell.outputs,
|
|
300
|
-
metadata: cell.metadata,
|
|
301
|
-
internalMetadata: cell.internalMetadata,
|
|
302
|
-
collapseState: cell.collapseState
|
|
303
|
-
});
|
|
304
|
-
});
|
|
305
|
-
this.addCellOutputListeners(cells);
|
|
306
|
-
const changes = [{
|
|
307
|
-
start,
|
|
308
|
-
deleteCount,
|
|
309
|
-
newItems: cells,
|
|
310
|
-
startHandle: (_b = (_a = this.cells[start]) === null || _a === void 0 ? void 0 : _a.handle) !== null && _b !== void 0 ? _b : -1 // -1 in case of new Cells are added at the end.
|
|
311
|
-
}];
|
|
312
|
-
const deletedCells = this.cells.splice(start, deleteCount, ...cells);
|
|
313
|
-
for (const cell of deletedCells) {
|
|
314
|
-
cell.dispose();
|
|
315
|
-
}
|
|
316
|
-
if (computeUndoRedo) {
|
|
317
|
-
this.undoRedoService.pushElement(this.uri, async () => {
|
|
318
|
-
this.replaceCells(start, newCells.length, deletedCells.map(cell => cell.getData()), false, false);
|
|
319
|
-
this.fireContentChange();
|
|
320
|
-
}, async () => {
|
|
321
|
-
this.replaceCells(start, deleteCount, newCells, false, false);
|
|
322
|
-
this.fireContentChange();
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
this.onDidAddOrRemoveCellEmitter.fire({ rawEvent: { kind: common_1.NotebookCellsChangeType.ModelChange, changes }, newCellIds: cells.map(cell => cell.handle) });
|
|
326
|
-
this.onDidChangeContentEmitter.queue({ kind: common_1.NotebookCellsChangeType.ModelChange, changes });
|
|
327
|
-
if (cells.length > 0 && requestEdit) {
|
|
328
|
-
this.setSelectedCell(cells[cells.length - 1]);
|
|
329
|
-
cells[cells.length - 1].requestEdit();
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
changeCellInternalMetadataPartial(cell, internalMetadata) {
|
|
333
|
-
var _a;
|
|
334
|
-
const newInternalMetadata = {
|
|
335
|
-
...cell.internalMetadata
|
|
336
|
-
};
|
|
337
|
-
let k;
|
|
338
|
-
// eslint-disable-next-line guard-for-in
|
|
339
|
-
for (k in internalMetadata) {
|
|
340
|
-
newInternalMetadata[k] = ((_a = internalMetadata[k]) !== null && _a !== void 0 ? _a : undefined);
|
|
341
|
-
}
|
|
342
|
-
cell.internalMetadata = newInternalMetadata;
|
|
343
|
-
this.onDidChangeContentEmitter.queue({ kind: common_1.NotebookCellsChangeType.ChangeCellInternalMetadata, index: this.cells.indexOf(cell), internalMetadata: newInternalMetadata });
|
|
344
|
-
}
|
|
345
|
-
updateNotebookMetadata(metadata, computeUndoRedo) {
|
|
346
|
-
const oldMetadata = this.metadata;
|
|
347
|
-
if (computeUndoRedo) {
|
|
348
|
-
this.undoRedoService.pushElement(this.uri, async () => this.updateNotebookMetadata(oldMetadata, false), async () => this.updateNotebookMetadata(metadata, false));
|
|
349
|
-
}
|
|
350
|
-
this.metadata = metadata;
|
|
351
|
-
this.onDidChangeContentEmitter.queue({ kind: common_1.NotebookCellsChangeType.ChangeDocumentMetadata, metadata: this.metadata });
|
|
352
|
-
}
|
|
353
|
-
changeCellMetadataPartial(cell, metadata, computeUndoRedo) {
|
|
354
|
-
var _a;
|
|
355
|
-
const newMetadata = {
|
|
356
|
-
...cell.metadata
|
|
357
|
-
};
|
|
358
|
-
let k;
|
|
359
|
-
// eslint-disable-next-line guard-for-in
|
|
360
|
-
for (k in metadata) {
|
|
361
|
-
const value = (_a = metadata[k]) !== null && _a !== void 0 ? _a : undefined;
|
|
362
|
-
newMetadata[k] = value;
|
|
363
|
-
}
|
|
364
|
-
this.changeCellMetadata(cell, newMetadata, computeUndoRedo);
|
|
365
|
-
}
|
|
366
|
-
changeCellMetadata(cell, metadata, computeUndoRedo) {
|
|
367
|
-
const triggerDirtyChange = this.isCellMetadataChanged(cell.metadata, metadata);
|
|
368
|
-
if (triggerDirtyChange) {
|
|
369
|
-
if (computeUndoRedo) {
|
|
370
|
-
const oldMetadata = cell.metadata;
|
|
371
|
-
cell.metadata = metadata;
|
|
372
|
-
this.undoRedoService.pushElement(this.uri, async () => { cell.metadata = oldMetadata; }, async () => { cell.metadata = metadata; });
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
cell.metadata = metadata;
|
|
376
|
-
this.onDidChangeContentEmitter.queue({ kind: common_1.NotebookCellsChangeType.ChangeCellMetadata, index: this.cells.indexOf(cell), metadata: cell.metadata });
|
|
377
|
-
}
|
|
378
|
-
changeCellLanguage(cell, languageId, computeUndoRedo) {
|
|
379
|
-
if (cell.language === languageId) {
|
|
380
|
-
return;
|
|
381
|
-
}
|
|
382
|
-
cell.language = languageId;
|
|
383
|
-
this.onDidChangeContentEmitter.queue({ kind: common_1.NotebookCellsChangeType.ChangeCellLanguage, index: this.cells.indexOf(cell), language: languageId });
|
|
384
|
-
}
|
|
385
|
-
moveCellToIndex(fromIndex, length, toIndex, computeUndoRedo) {
|
|
386
|
-
if (computeUndoRedo) {
|
|
387
|
-
this.undoRedoService.pushElement(this.uri, async () => {
|
|
388
|
-
this.moveCellToIndex(toIndex, length, fromIndex, false);
|
|
389
|
-
this.fireContentChange();
|
|
390
|
-
}, async () => {
|
|
391
|
-
this.moveCellToIndex(fromIndex, length, toIndex, false);
|
|
392
|
-
this.fireContentChange();
|
|
393
|
-
});
|
|
394
|
-
}
|
|
395
|
-
const cells = this.cells.splice(fromIndex, length);
|
|
396
|
-
this.cells.splice(toIndex, 0, ...cells);
|
|
397
|
-
this.onDidChangeContentEmitter.queue({ kind: common_1.NotebookCellsChangeType.Move, index: fromIndex, length, newIdx: toIndex, cells });
|
|
398
|
-
return true;
|
|
399
|
-
}
|
|
400
|
-
getCellIndexByHandle(handle) {
|
|
401
|
-
return this.cells.findIndex(c => c.handle === handle);
|
|
402
|
-
}
|
|
403
|
-
getCellByHandle(handle) {
|
|
404
|
-
return this.cells.find(c => c.handle === handle);
|
|
405
|
-
}
|
|
406
|
-
isCellMetadataChanged(a, b) {
|
|
407
|
-
const keys = new Set([...Object.keys(a || {}), ...Object.keys(b || {})]);
|
|
408
|
-
for (const key of keys) {
|
|
409
|
-
if (a[key] !== b[key]) {
|
|
410
|
-
return true;
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
return false;
|
|
414
|
-
}
|
|
415
|
-
findMatches(options) {
|
|
416
|
-
const matches = [];
|
|
417
|
-
for (const cell of this.cells) {
|
|
418
|
-
matches.push(...cell.findMatches(options));
|
|
419
|
-
}
|
|
420
|
-
return matches;
|
|
421
|
-
}
|
|
422
|
-
replaceAll(matches, text) {
|
|
423
|
-
var _a;
|
|
424
|
-
const matchMap = new Map();
|
|
425
|
-
for (const match of matches) {
|
|
426
|
-
if (match instanceof notebook_cell_model_1.NotebookCodeEditorFindMatch) {
|
|
427
|
-
if (!matchMap.has(match.cell)) {
|
|
428
|
-
matchMap.set(match.cell, []);
|
|
429
|
-
}
|
|
430
|
-
(_a = matchMap.get(match.cell)) === null || _a === void 0 ? void 0 : _a.push(match);
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
for (const [cell, cellMatches] of matchMap) {
|
|
434
|
-
cell.replaceAll(cellMatches, text);
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
};
|
|
438
|
-
exports.NotebookModel = NotebookModel;
|
|
439
|
-
tslib_1.__decorate([
|
|
440
|
-
(0, inversify_1.inject)(file_service_1.FileService),
|
|
441
|
-
tslib_1.__metadata("design:type", file_service_1.FileService)
|
|
442
|
-
], NotebookModel.prototype, "fileService", void 0);
|
|
443
|
-
tslib_1.__decorate([
|
|
444
|
-
(0, inversify_1.inject)(undo_redo_service_1.UndoRedoService),
|
|
445
|
-
tslib_1.__metadata("design:type", undo_redo_service_1.UndoRedoService)
|
|
446
|
-
], NotebookModel.prototype, "undoRedoService", void 0);
|
|
447
|
-
tslib_1.__decorate([
|
|
448
|
-
(0, inversify_1.inject)(NotebookModelProps),
|
|
449
|
-
tslib_1.__metadata("design:type", Object)
|
|
450
|
-
], NotebookModel.prototype, "props", void 0);
|
|
451
|
-
tslib_1.__decorate([
|
|
452
|
-
(0, inversify_1.inject)(notebook_cell_model_1.NotebookCellModelFactory),
|
|
453
|
-
tslib_1.__metadata("design:type", Function)
|
|
454
|
-
], NotebookModel.prototype, "cellModelFactory", void 0);
|
|
455
|
-
tslib_1.__decorate([
|
|
456
|
-
(0, inversify_1.inject)(exports.NotebookModelResolverServiceProxy),
|
|
457
|
-
tslib_1.__metadata("design:type", Function)
|
|
458
|
-
], NotebookModel.prototype, "modelResolverService", void 0);
|
|
459
|
-
tslib_1.__decorate([
|
|
460
|
-
(0, inversify_1.postConstruct)(),
|
|
461
|
-
tslib_1.__metadata("design:type", Function),
|
|
462
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
463
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
464
|
-
], NotebookModel.prototype, "initialize", null);
|
|
465
|
-
exports.NotebookModel = NotebookModel = tslib_1.__decorate([
|
|
466
|
-
(0, inversify_1.injectable)()
|
|
467
|
-
], NotebookModel);
|
|
468
|
-
//# sourceMappingURL=notebook-model.js.map
|