@theia/notebook 1.41.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.
- package/README.md +30 -0
- package/lib/browser/contributions/notebook-actions-contribution.d.ts +27 -0
- package/lib/browser/contributions/notebook-actions-contribution.d.ts.map +1 -0
- package/lib/browser/contributions/notebook-actions-contribution.js +172 -0
- package/lib/browser/contributions/notebook-actions-contribution.js.map +1 -0
- package/lib/browser/contributions/notebook-cell-actions-contribution.d.ts +30 -0
- package/lib/browser/contributions/notebook-cell-actions-contribution.d.ts.map +1 -0
- package/lib/browser/contributions/notebook-cell-actions-contribution.js +200 -0
- package/lib/browser/contributions/notebook-cell-actions-contribution.js.map +1 -0
- package/lib/browser/contributions/notebook-color-contribution.d.ts +6 -0
- package/lib/browser/contributions/notebook-color-contribution.d.ts.map +1 -0
- package/lib/browser/contributions/notebook-color-contribution.js +252 -0
- package/lib/browser/contributions/notebook-color-contribution.js.map +1 -0
- package/lib/browser/contributions/notebook-context-keys.d.ts +38 -0
- package/lib/browser/contributions/notebook-context-keys.d.ts.map +1 -0
- package/lib/browser/contributions/notebook-context-keys.js +95 -0
- package/lib/browser/contributions/notebook-context-keys.js.map +1 -0
- package/lib/browser/index.d.ts +11 -0
- package/lib/browser/index.d.ts.map +1 -0
- package/lib/browser/index.js +38 -0
- package/lib/browser/index.js.map +1 -0
- package/lib/browser/notebook-cell-resource-resolver.d.ts +20 -0
- package/lib/browser/notebook-cell-resource-resolver.d.ts.map +1 -0
- package/lib/browser/notebook-cell-resource-resolver.js +75 -0
- package/lib/browser/notebook-cell-resource-resolver.js.map +1 -0
- package/lib/browser/notebook-editor-widget-factory.d.ts +17 -0
- package/lib/browser/notebook-editor-widget-factory.d.ts.map +1 -0
- package/lib/browser/notebook-editor-widget-factory.js +78 -0
- package/lib/browser/notebook-editor-widget-factory.js.map +1 -0
- package/lib/browser/notebook-editor-widget.d.ts +49 -0
- package/lib/browser/notebook-editor-widget.d.ts.map +1 -0
- package/lib/browser/notebook-editor-widget.js +150 -0
- package/lib/browser/notebook-editor-widget.js.map +1 -0
- package/lib/browser/notebook-frontend-module.d.ts +5 -0
- package/lib/browser/notebook-frontend-module.d.ts.map +1 -0
- package/lib/browser/notebook-frontend-module.js +81 -0
- package/lib/browser/notebook-frontend-module.js.map +1 -0
- package/lib/browser/notebook-open-handler.d.ts +18 -0
- package/lib/browser/notebook-open-handler.d.ts.map +1 -0
- package/lib/browser/notebook-open-handler.js +94 -0
- package/lib/browser/notebook-open-handler.js.map +1 -0
- package/lib/browser/notebook-renderer-registry.d.ts +17 -0
- package/lib/browser/notebook-renderer-registry.d.ts.map +1 -0
- package/lib/browser/notebook-renderer-registry.js +63 -0
- package/lib/browser/notebook-renderer-registry.js.map +1 -0
- package/lib/browser/notebook-type-registry.d.ts +7 -0
- package/lib/browser/notebook-type-registry.d.ts.map +1 -0
- package/lib/browser/notebook-type-registry.js +42 -0
- package/lib/browser/notebook-type-registry.js.map +1 -0
- package/lib/browser/renderers/cell-output-webview.d.ts +12 -0
- package/lib/browser/renderers/cell-output-webview.d.ts.map +1 -0
- package/lib/browser/renderers/cell-output-webview.js +20 -0
- package/lib/browser/renderers/cell-output-webview.js.map +1 -0
- package/lib/browser/service/notebook-cell-context-manager.d.ts +16 -0
- package/lib/browser/service/notebook-cell-context-manager.d.ts.map +1 -0
- package/lib/browser/service/notebook-cell-context-manager.js +83 -0
- package/lib/browser/service/notebook-cell-context-manager.js.map +1 -0
- package/lib/browser/service/notebook-editor-service.d.ts +22 -0
- package/lib/browser/service/notebook-editor-service.d.ts.map +1 -0
- package/lib/browser/service/notebook-editor-service.js +95 -0
- package/lib/browser/service/notebook-editor-service.js.map +1 -0
- package/lib/browser/service/notebook-execution-service.d.ts +25 -0
- package/lib/browser/service/notebook-execution-service.d.ts.map +1 -0
- package/lib/browser/service/notebook-execution-service.js +140 -0
- package/lib/browser/service/notebook-execution-service.js.map +1 -0
- package/lib/browser/service/notebook-execution-state-service.d.ts +94 -0
- package/lib/browser/service/notebook-execution-state-service.d.ts.map +1 -0
- package/lib/browser/service/notebook-execution-state-service.js +250 -0
- package/lib/browser/service/notebook-execution-state-service.js.map +1 -0
- package/lib/browser/service/notebook-kernel-history-service.d.ts +23 -0
- package/lib/browser/service/notebook-kernel-history-service.d.ts.map +1 -0
- package/lib/browser/service/notebook-kernel-history-service.js +109 -0
- package/lib/browser/service/notebook-kernel-history-service.js.map +1 -0
- package/lib/browser/service/notebook-kernel-quick-pick-service.d.ts +65 -0
- package/lib/browser/service/notebook-kernel-quick-pick-service.d.ts.map +1 -0
- package/lib/browser/service/notebook-kernel-quick-pick-service.js +430 -0
- package/lib/browser/service/notebook-kernel-quick-pick-service.js.map +1 -0
- package/lib/browser/service/notebook-kernel-service.d.ts +112 -0
- package/lib/browser/service/notebook-kernel-service.d.ts.map +1 -0
- package/lib/browser/service/notebook-kernel-service.js +274 -0
- package/lib/browser/service/notebook-kernel-service.js.map +1 -0
- package/lib/browser/service/notebook-model-resolver-service.d.ts +26 -0
- package/lib/browser/service/notebook-model-resolver-service.d.ts.map +1 -0
- package/lib/browser/service/notebook-model-resolver-service.js +139 -0
- package/lib/browser/service/notebook-model-resolver-service.js.map +1 -0
- package/lib/browser/service/notebook-renderer-messaging-service.d.ts +30 -0
- package/lib/browser/service/notebook-renderer-messaging-service.d.ts.map +1 -0
- package/lib/browser/service/notebook-renderer-messaging-service.js +94 -0
- package/lib/browser/service/notebook-renderer-messaging-service.js.map +1 -0
- package/lib/browser/service/notebook-service.d.ts +64 -0
- package/lib/browser/service/notebook-service.d.ts.map +1 -0
- package/lib/browser/service/notebook-service.js +162 -0
- package/lib/browser/service/notebook-service.js.map +1 -0
- package/lib/browser/view/notebook-cell-editor.d.ts +26 -0
- package/lib/browser/view/notebook-cell-editor.d.ts.map +1 -0
- package/lib/browser/view/notebook-cell-editor.js +79 -0
- package/lib/browser/view/notebook-cell-editor.js.map +1 -0
- package/lib/browser/view/notebook-cell-list-view.d.ts +43 -0
- package/lib/browser/view/notebook-cell-list-view.d.ts.map +1 -0
- package/lib/browser/view/notebook-cell-list-view.js +111 -0
- package/lib/browser/view/notebook-cell-list-view.js.map +1 -0
- package/lib/browser/view/notebook-cell-toolbar-factory.d.ts +25 -0
- package/lib/browser/view/notebook-cell-toolbar-factory.d.ts.map +1 -0
- package/lib/browser/view/notebook-cell-toolbar-factory.js +93 -0
- package/lib/browser/view/notebook-cell-toolbar-factory.js.map +1 -0
- package/lib/browser/view/notebook-cell-toolbar.d.ts +25 -0
- package/lib/browser/view/notebook-cell-toolbar.d.ts.map +1 -0
- package/lib/browser/view/notebook-cell-toolbar.js +50 -0
- package/lib/browser/view/notebook-cell-toolbar.js.map +1 -0
- package/lib/browser/view/notebook-code-cell-view.d.ts +47 -0
- package/lib/browser/view/notebook-code-cell-view.d.ts.map +1 -0
- package/lib/browser/view/notebook-code-cell-view.js +166 -0
- package/lib/browser/view/notebook-code-cell-view.js.map +1 -0
- package/lib/browser/view/notebook-main-toolbar.d.ts +31 -0
- package/lib/browser/view/notebook-main-toolbar.d.ts.map +1 -0
- package/lib/browser/view/notebook-main-toolbar.js +118 -0
- package/lib/browser/view/notebook-main-toolbar.js.map +1 -0
- package/lib/browser/view/notebook-markdown-cell-view.d.ts +12 -0
- package/lib/browser/view/notebook-markdown-cell-view.d.ts.map +1 -0
- package/lib/browser/view/notebook-markdown-cell-view.js +70 -0
- package/lib/browser/view/notebook-markdown-cell-view.js.map +1 -0
- package/lib/browser/view-model/notebook-cell-model.d.ts +74 -0
- package/lib/browser/view-model/notebook-cell-model.d.ts.map +1 -0
- package/lib/browser/view-model/notebook-cell-model.js +226 -0
- package/lib/browser/view-model/notebook-cell-model.js.map +1 -0
- package/lib/browser/view-model/notebook-cell-output-model.d.ts +19 -0
- package/lib/browser/view-model/notebook-cell-output-model.d.ts.map +1 -0
- package/lib/browser/view-model/notebook-cell-output-model.js +61 -0
- package/lib/browser/view-model/notebook-cell-output-model.js.map +1 -0
- package/lib/browser/view-model/notebook-model.d.ts +59 -0
- package/lib/browser/view-model/notebook-model.d.ts.map +1 -0
- package/lib/browser/view-model/notebook-model.js +315 -0
- package/lib/browser/view-model/notebook-model.js.map +1 -0
- package/lib/common/index.d.ts +3 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +30 -0
- package/lib/common/index.js.map +1 -0
- package/lib/common/notebook-common.d.ts +344 -0
- package/lib/common/notebook-common.d.ts.map +1 -0
- package/lib/common/notebook-common.js +112 -0
- package/lib/common/notebook-common.js.map +1 -0
- package/lib/common/notebook-protocol.d.ts +21 -0
- package/lib/common/notebook-protocol.d.ts.map +1 -0
- package/lib/common/notebook-protocol.js +18 -0
- package/lib/common/notebook-protocol.js.map +1 -0
- package/lib/common/notebook-range.d.ts +14 -0
- package/lib/common/notebook-range.d.ts.map +1 -0
- package/lib/common/notebook-range.js +18 -0
- package/lib/common/notebook-range.js.map +1 -0
- package/package.json +52 -0
- package/src/browser/contributions/notebook-actions-contribution.ts +171 -0
- package/src/browser/contributions/notebook-cell-actions-contribution.ts +204 -0
- package/src/browser/contributions/notebook-color-contribution.ts +268 -0
- package/src/browser/contributions/notebook-context-keys.ts +99 -0
- package/src/browser/index.ts +26 -0
- package/src/browser/notebook-cell-resource-resolver.ts +79 -0
- package/src/browser/notebook-editor-widget-factory.ts +70 -0
- package/src/browser/notebook-editor-widget.tsx +157 -0
- package/src/browser/notebook-frontend-module.ts +95 -0
- package/src/browser/notebook-open-handler.ts +87 -0
- package/src/browser/notebook-renderer-registry.ts +62 -0
- package/src/browser/notebook-type-registry.ts +30 -0
- package/src/browser/renderers/cell-output-webview.ts +32 -0
- package/src/browser/service/notebook-cell-context-manager.ts +70 -0
- package/src/browser/service/notebook-editor-service.ts +86 -0
- package/src/browser/service/notebook-execution-service.ts +139 -0
- package/src/browser/service/notebook-execution-state-service.ts +322 -0
- package/src/browser/service/notebook-kernel-history-service.ts +109 -0
- package/src/browser/service/notebook-kernel-quick-pick-service.ts +494 -0
- package/src/browser/service/notebook-kernel-service.ts +357 -0
- package/src/browser/service/notebook-model-resolver-service.ts +141 -0
- package/src/browser/service/notebook-renderer-messaging-service.ts +111 -0
- package/src/browser/service/notebook-service.ts +178 -0
- package/src/browser/style/index.css +236 -0
- package/src/browser/view/notebook-cell-editor.tsx +97 -0
- package/src/browser/view/notebook-cell-list-view.tsx +171 -0
- package/src/browser/view/notebook-cell-toolbar-factory.tsx +91 -0
- package/src/browser/view/notebook-cell-toolbar.tsx +70 -0
- package/src/browser/view/notebook-code-cell-view.tsx +190 -0
- package/src/browser/view/notebook-main-toolbar.tsx +115 -0
- package/src/browser/view/notebook-markdown-cell-view.tsx +73 -0
- package/src/browser/view-model/notebook-cell-model.ts +271 -0
- package/src/browser/view-model/notebook-cell-output-model.ts +69 -0
- package/src/browser/view-model/notebook-model.ts +372 -0
- package/src/common/index.ts +18 -0
- package/src/common/notebook-common.ts +462 -0
- package/src/common/notebook-protocol.ts +35 -0
- package/src/common/notebook-range.ts +30 -0
|
@@ -0,0 +1,252 @@
|
|
|
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
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.NotebookColorContribution = void 0;
|
|
25
|
+
const color_1 = require("@theia/core/lib/common/color");
|
|
26
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
27
|
+
let NotebookColorContribution = class NotebookColorContribution {
|
|
28
|
+
registerColors(colors) {
|
|
29
|
+
colors.register({
|
|
30
|
+
id: 'notebook.cellBorderColor',
|
|
31
|
+
defaults: {
|
|
32
|
+
dark: color_1.Color.transparent('list.inactiveSelectionBackground', 1),
|
|
33
|
+
light: color_1.Color.transparent('list.inactiveSelectionBackground', 1),
|
|
34
|
+
hcDark: 'panel.border',
|
|
35
|
+
hcLight: 'panel.border'
|
|
36
|
+
},
|
|
37
|
+
description: 'The border color for notebook cells.'
|
|
38
|
+
}, {
|
|
39
|
+
id: 'notebook.focusedEditorBorder',
|
|
40
|
+
defaults: {
|
|
41
|
+
dark: 'focusBorder',
|
|
42
|
+
light: 'focusBorder',
|
|
43
|
+
hcDark: 'focusBorder',
|
|
44
|
+
hcLight: 'focusBorder'
|
|
45
|
+
},
|
|
46
|
+
description: 'The color of the notebook cell editor border.'
|
|
47
|
+
}, {
|
|
48
|
+
id: 'notebookStatusSuccessIcon.foreground',
|
|
49
|
+
defaults: {
|
|
50
|
+
dark: 'debugIcon.startForeground',
|
|
51
|
+
light: 'debugIcon.startForeground',
|
|
52
|
+
hcDark: 'debugIcon.startForeground',
|
|
53
|
+
hcLight: 'debugIcon.startForeground'
|
|
54
|
+
},
|
|
55
|
+
description: 'The error icon color of notebook cells in the cell status bar.'
|
|
56
|
+
}, {
|
|
57
|
+
id: 'notebookEditorOverviewRuler.runningCellForeground',
|
|
58
|
+
defaults: {
|
|
59
|
+
dark: 'debugIcon.startForeground',
|
|
60
|
+
light: 'debugIcon.startForeground',
|
|
61
|
+
hcDark: 'debugIcon.startForeground',
|
|
62
|
+
hcLight: 'debugIcon.startForeground'
|
|
63
|
+
},
|
|
64
|
+
description: 'The color of the running cell decoration in the notebook editor overview ruler.'
|
|
65
|
+
}, {
|
|
66
|
+
id: 'notebookStatusErrorIcon.foreground',
|
|
67
|
+
defaults: {
|
|
68
|
+
dark: 'errorForeground',
|
|
69
|
+
light: 'errorForeground',
|
|
70
|
+
hcDark: 'errorForeground',
|
|
71
|
+
hcLight: 'errorForeground'
|
|
72
|
+
},
|
|
73
|
+
description: 'The error icon color of notebook cells in the cell status bar.'
|
|
74
|
+
}, {
|
|
75
|
+
id: 'notebookStatusRunningIcon.foreground',
|
|
76
|
+
defaults: {
|
|
77
|
+
dark: 'foreground',
|
|
78
|
+
light: 'foreground',
|
|
79
|
+
hcDark: 'foreground',
|
|
80
|
+
hcLight: 'foreground'
|
|
81
|
+
},
|
|
82
|
+
description: 'The running icon color of notebook cells in the cell status bar.'
|
|
83
|
+
}, {
|
|
84
|
+
id: 'notebook.outputContainerBorderColor',
|
|
85
|
+
defaults: {
|
|
86
|
+
dark: undefined,
|
|
87
|
+
light: undefined,
|
|
88
|
+
hcDark: undefined,
|
|
89
|
+
hcLight: undefined
|
|
90
|
+
},
|
|
91
|
+
description: 'The border color of the notebook output container.'
|
|
92
|
+
}, {
|
|
93
|
+
id: 'notebook.outputContainerBackgroundColor',
|
|
94
|
+
defaults: {
|
|
95
|
+
dark: undefined,
|
|
96
|
+
light: undefined,
|
|
97
|
+
hcDark: undefined,
|
|
98
|
+
hcLight: undefined
|
|
99
|
+
},
|
|
100
|
+
description: 'The color of the notebook output container background.'
|
|
101
|
+
}, {
|
|
102
|
+
id: 'notebook.cellToolbarSeparator',
|
|
103
|
+
defaults: {
|
|
104
|
+
dark: color_1.Color.rgba(128, 128, 128, 0.35),
|
|
105
|
+
light: color_1.Color.rgba(128, 128, 128, 0.35),
|
|
106
|
+
hcDark: 'contrastBorder',
|
|
107
|
+
hcLight: 'contrastBorder'
|
|
108
|
+
},
|
|
109
|
+
description: 'The color of the separator in the cell bottom toolbar'
|
|
110
|
+
}, {
|
|
111
|
+
id: 'notebook.focusedCellBackground',
|
|
112
|
+
defaults: {
|
|
113
|
+
dark: undefined,
|
|
114
|
+
light: undefined,
|
|
115
|
+
hcDark: undefined,
|
|
116
|
+
hcLight: undefined
|
|
117
|
+
},
|
|
118
|
+
description: 'The background color of a cell when the cell is focused.'
|
|
119
|
+
}, {
|
|
120
|
+
id: 'notebook.selectedCellBackground',
|
|
121
|
+
defaults: {
|
|
122
|
+
dark: 'list.inactiveSelectionBackground',
|
|
123
|
+
light: 'list.inactiveSelectionBackground',
|
|
124
|
+
hcDark: undefined,
|
|
125
|
+
hcLight: undefined
|
|
126
|
+
},
|
|
127
|
+
description: 'The background color of a cell when the cell is selected.'
|
|
128
|
+
}, {
|
|
129
|
+
id: 'notebook.cellHoverBackground',
|
|
130
|
+
defaults: {
|
|
131
|
+
dark: color_1.Color.transparent('notebook.focusedCellBackground', 0.5),
|
|
132
|
+
light: color_1.Color.transparent('notebook.focusedCellBackground', 0.7),
|
|
133
|
+
hcDark: undefined,
|
|
134
|
+
hcLight: undefined
|
|
135
|
+
},
|
|
136
|
+
description: 'The background color of a cell when the cell is hovered.'
|
|
137
|
+
}, {
|
|
138
|
+
id: 'notebook.selectedCellBorder',
|
|
139
|
+
defaults: {
|
|
140
|
+
dark: 'notebook.cellBorderColor',
|
|
141
|
+
light: 'notebook.cellBorderColor',
|
|
142
|
+
hcDark: 'contrastBorder',
|
|
143
|
+
hcLight: 'contrastBorder'
|
|
144
|
+
},
|
|
145
|
+
description: "The color of the cell's top and bottom border when the cell is selected but not focused."
|
|
146
|
+
}, {
|
|
147
|
+
id: 'notebook.inactiveSelectedCellBorder',
|
|
148
|
+
defaults: {
|
|
149
|
+
dark: undefined,
|
|
150
|
+
light: undefined,
|
|
151
|
+
hcDark: 'focusBorder',
|
|
152
|
+
hcLight: 'focusBorder'
|
|
153
|
+
},
|
|
154
|
+
description: "The color of the cell's borders when multiple cells are selected."
|
|
155
|
+
}, {
|
|
156
|
+
id: 'notebook.focusedCellBorder',
|
|
157
|
+
defaults: {
|
|
158
|
+
dark: 'focusBorder',
|
|
159
|
+
light: 'focusBorder',
|
|
160
|
+
hcDark: 'focusBorder',
|
|
161
|
+
hcLight: 'focusBorder'
|
|
162
|
+
},
|
|
163
|
+
description: "The color of the cell's focus indicator borders when the cell is focused."
|
|
164
|
+
}, {
|
|
165
|
+
id: 'notebook.inactiveFocusedCellBorder',
|
|
166
|
+
defaults: {
|
|
167
|
+
dark: 'notebook.cellBorderColor',
|
|
168
|
+
light: 'notebook.cellBorderColor',
|
|
169
|
+
hcDark: 'notebook.cellBorderColor',
|
|
170
|
+
hcLight: 'notebook.cellBorderColor'
|
|
171
|
+
},
|
|
172
|
+
description: "The color of the cell's top and bottom border when a cell is focused while the primary focus is outside of the editor."
|
|
173
|
+
}, {
|
|
174
|
+
id: 'notebook.cellStatusBarItemHoverBackground',
|
|
175
|
+
defaults: {
|
|
176
|
+
dark: color_1.Color.rgba(0, 0, 0, 0.08),
|
|
177
|
+
light: color_1.Color.rgba(255, 255, 255, 0.15),
|
|
178
|
+
hcDark: color_1.Color.rgba(0, 0, 0, 0.08),
|
|
179
|
+
hcLight: color_1.Color.rgba(255, 255, 255, 0.15)
|
|
180
|
+
},
|
|
181
|
+
description: 'The background color of notebook cell status bar items.'
|
|
182
|
+
}, {
|
|
183
|
+
id: 'notebook.cellInsertionIndicator',
|
|
184
|
+
defaults: {
|
|
185
|
+
dark: 'focusBorder',
|
|
186
|
+
light: 'focusBorder',
|
|
187
|
+
hcDark: 'focusBorder',
|
|
188
|
+
hcLight: undefined
|
|
189
|
+
},
|
|
190
|
+
description: 'Notebook background color.'
|
|
191
|
+
}, {
|
|
192
|
+
id: 'notebookScrollbarSlider.background',
|
|
193
|
+
defaults: {
|
|
194
|
+
dark: 'scrollbarSlider.background',
|
|
195
|
+
light: 'scrollbarSlider.background',
|
|
196
|
+
hcDark: 'scrollbarSlider.background',
|
|
197
|
+
hcLight: 'scrollbarSlider.background'
|
|
198
|
+
},
|
|
199
|
+
description: 'Notebook scrollbar slider background color.'
|
|
200
|
+
}, {
|
|
201
|
+
id: 'notebookScrollbarSlider.hoverBackground',
|
|
202
|
+
defaults: {
|
|
203
|
+
dark: 'scrollbarSlider.hoverBackground',
|
|
204
|
+
light: 'scrollbarSlider.hoverBackground',
|
|
205
|
+
hcDark: 'scrollbarSlider.hoverBackground',
|
|
206
|
+
hcLight: 'scrollbarSlider.hoverBackground'
|
|
207
|
+
},
|
|
208
|
+
description: 'Notebook scrollbar slider background color when hovering.'
|
|
209
|
+
}, {
|
|
210
|
+
id: 'notebookScrollbarSlider.activeBackground',
|
|
211
|
+
defaults: {
|
|
212
|
+
dark: 'scrollbarSlider.activeBackground',
|
|
213
|
+
light: 'scrollbarSlider.activeBackground',
|
|
214
|
+
hcDark: 'scrollbarSlider.activeBackground',
|
|
215
|
+
hcLight: 'scrollbarSlider.activeBackground'
|
|
216
|
+
},
|
|
217
|
+
description: 'Notebook scrollbar slider background color when clicked on.'
|
|
218
|
+
}, {
|
|
219
|
+
id: 'notebook.symbolHighlightBackground',
|
|
220
|
+
defaults: {
|
|
221
|
+
dark: color_1.Color.rgba(255, 255, 255, 0.04),
|
|
222
|
+
light: color_1.Color.rgba(253, 255, 0, 0.2),
|
|
223
|
+
hcDark: undefined,
|
|
224
|
+
hcLight: undefined
|
|
225
|
+
},
|
|
226
|
+
description: 'Background color of highlighted cell'
|
|
227
|
+
}, {
|
|
228
|
+
id: 'notebook.cellEditorBackground',
|
|
229
|
+
defaults: {
|
|
230
|
+
dark: 'sideBar.background',
|
|
231
|
+
light: 'sideBar.background',
|
|
232
|
+
hcDark: undefined,
|
|
233
|
+
hcLight: undefined
|
|
234
|
+
},
|
|
235
|
+
description: 'Cell editor background color.'
|
|
236
|
+
}, {
|
|
237
|
+
id: 'notebook.editorBackground',
|
|
238
|
+
defaults: {
|
|
239
|
+
dark: 'editorPane.background',
|
|
240
|
+
light: 'editorPane.background',
|
|
241
|
+
hcDark: undefined,
|
|
242
|
+
hcLight: undefined
|
|
243
|
+
},
|
|
244
|
+
description: 'Notebook background color.'
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
NotebookColorContribution = __decorate([
|
|
249
|
+
(0, inversify_1.injectable)()
|
|
250
|
+
], NotebookColorContribution);
|
|
251
|
+
exports.NotebookColorContribution = NotebookColorContribution;
|
|
252
|
+
//# sourceMappingURL=notebook-color-contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notebook-color-contribution.js","sourceRoot":"","sources":["../../../src/browser/contributions/notebook-color-contribution.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;;;;;;;;;AAIhF,wDAAqD;AACrD,4DAA0D;AAG1D,IAAa,yBAAyB,GAAtC,MAAa,yBAAyB;IAClC,cAAc,CAAC,MAAqB;QAChC,MAAM,CAAC,QAAQ,CACX;YACI,EAAE,EAAE,0BAA0B;YAC9B,QAAQ,EAAE;gBACN,IAAI,EAAE,aAAK,CAAC,WAAW,CAAC,kCAAkC,EAAE,CAAC,CAAC;gBAC9D,KAAK,EAAE,aAAK,CAAC,WAAW,CAAC,kCAAkC,EAAE,CAAC,CAAC;gBAC/D,MAA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I,EAAE,EAAE,2BAA2B;YAC/B,QAAQ,EAAE;gBACN,IAAI,EAAE,uBAAuB;gBAC7B,KAAK,EAAE,uBAAuB;gBAC9B,MAAM,EAAE,SAAS;gBACjB,OAAO,EAAE,SAAS;aACrB;YACD,WAAW,EAAE,4BAA4B;SAC5C,CACJ,CAAC;IACN,CAAC;CACJ,CAAA;AArPY,yBAAyB;IADrC,IAAA,sBAAU,GAAE;GACA,yBAAyB,CAqPrC;AArPY,8DAAyB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
|
|
2
|
+
export declare type NotebookCellExecutionStateContext = 'idle' | 'pending' | 'executing' | 'succeeded' | 'failed';
|
|
3
|
+
export declare const HAS_OPENED_NOTEBOOK = "userHasOpenedNotebook";
|
|
4
|
+
export declare const KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED = "notebookFindWidgetFocused";
|
|
5
|
+
export declare const NOTEBOOK_EDITOR_FOCUSED = "notebookEditorFocused";
|
|
6
|
+
export declare const NOTEBOOK_CELL_LIST_FOCUSED = "notebookCellListFocused";
|
|
7
|
+
export declare const NOTEBOOK_OUTPUT_FOCUSED = "notebookOutputFocused";
|
|
8
|
+
export declare const NOTEBOOK_EDITOR_EDITABLE = "notebookEditable";
|
|
9
|
+
export declare const NOTEBOOK_HAS_RUNNING_CELL = "notebookHasRunningCell";
|
|
10
|
+
export declare const NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON = "notebookUseConsolidatedOutputButton";
|
|
11
|
+
export declare const NOTEBOOK_BREAKPOINT_MARGIN_ACTIVE = "notebookBreakpointMargin";
|
|
12
|
+
export declare const NOTEBOOK_CELL_TOOLBAR_LOCATION = "notebookCellToolbarLocation";
|
|
13
|
+
export declare const NOTEBOOK_CURSOR_NAVIGATION_MODE = "notebookCursorNavigationMode";
|
|
14
|
+
export declare const NOTEBOOK_LAST_CELL_FAILED = "notebookLastCellFailed";
|
|
15
|
+
export declare const NOTEBOOK_VIEW_TYPE = "notebookType";
|
|
16
|
+
export declare const NOTEBOOK_CELL_TYPE = "notebookCellType";
|
|
17
|
+
export declare const NOTEBOOK_CELL_EDITABLE = "notebookCellEditable";
|
|
18
|
+
export declare const NOTEBOOK_CELL_FOCUSED = "notebookCellFocused";
|
|
19
|
+
export declare const NOTEBOOK_CELL_EDITOR_FOCUSED = "notebookCellEditorFocused";
|
|
20
|
+
export declare const NOTEBOOK_CELL_MARKDOWN_EDIT_MODE = "notebookCellMarkdownEditMode";
|
|
21
|
+
export declare const NOTEBOOK_CELL_LINE_NUMBERS = "notebookCellLineNumbers";
|
|
22
|
+
export declare const NOTEBOOK_CELL_EXECUTION_STATE = "notebookCellExecutionState";
|
|
23
|
+
export declare const NOTEBOOK_CELL_EXECUTING = "notebookCellExecuting";
|
|
24
|
+
export declare const NOTEBOOK_CELL_HAS_OUTPUTS = "notebookCellHasOutputs";
|
|
25
|
+
export declare const NOTEBOOK_CELL_INPUT_COLLAPSED = "notebookCellInputIsCollapsed";
|
|
26
|
+
export declare const NOTEBOOK_CELL_OUTPUT_COLLAPSED = "notebookCellOutputIsCollapsed";
|
|
27
|
+
export declare const NOTEBOOK_CELL_RESOURCE = "notebookCellResource";
|
|
28
|
+
export declare const NOTEBOOK_KERNEL = "notebookKernel";
|
|
29
|
+
export declare const NOTEBOOK_KERNEL_COUNT = "notebookKernelCount";
|
|
30
|
+
export declare const NOTEBOOK_KERNEL_SOURCE_COUNT = "notebookKernelSourceCount";
|
|
31
|
+
export declare const NOTEBOOK_KERNEL_SELECTED = "notebookKernelSelected";
|
|
32
|
+
export declare const NOTEBOOK_INTERRUPTIBLE_KERNEL = "notebookInterruptibleKernel";
|
|
33
|
+
export declare const NOTEBOOK_MISSING_KERNEL_EXTENSION = "notebookMissingKernelExtension";
|
|
34
|
+
export declare const NOTEBOOK_HAS_OUTPUTS = "notebookHasOutputs";
|
|
35
|
+
export declare namespace NotebookContextKeys {
|
|
36
|
+
function initNotebookContextKeys(service: ContextKeyService): void;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=notebook-context-keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notebook-context-keys.d.ts","sourceRoot":"","sources":["../../../src/browser/contributions/notebook-context-keys.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAEhF,oBAAY,iCAAiC,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE1G,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAC3D,eAAO,MAAM,+CAA+C,8BAA8B,CAAC;AAC3F,eAAO,MAAM,uBAAuB,0BAA0B,CAAC;AAC/D,eAAO,MAAM,0BAA0B,4BAA4B,CAAC;AACpE,eAAO,MAAM,uBAAuB,0BAA0B,CAAC;AAC/D,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAC3D,eAAO,MAAM,yBAAyB,2BAA2B,CAAC;AAClE,eAAO,MAAM,uCAAuC,wCAAwC,CAAC;AAC7F,eAAO,MAAM,iCAAiC,6BAA6B,CAAC;AAC5E,eAAO,MAAM,8BAA8B,gCAAgC,CAAC;AAC5E,eAAO,MAAM,+BAA+B,iCAAiC,CAAC;AAC9E,eAAO,MAAM,yBAAyB,2BAA2B,CAAC;AAClE,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AACrD,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAC7D,eAAO,MAAM,qBAAqB,wBAAwB,CAAC;AAC3D,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AACxE,eAAO,MAAM,gCAAgC,iCAAiC,CAAC;AAC/E,eAAO,MAAM,0BAA0B,4BAA4B,CAAC;AACpE,eAAO,MAAM,6BAA6B,+BAA+B,CAAC;AAC1E,eAAO,MAAM,uBAAuB,0BAA0B,CAAC;AAC/D,eAAO,MAAM,yBAAyB,2BAA2B,CAAC;AAClE,eAAO,MAAM,6BAA6B,iCAAiC,CAAC;AAC5E,eAAO,MAAM,8BAA8B,kCAAkC,CAAC;AAC9E,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAC7D,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAChD,eAAO,MAAM,qBAAqB,wBAAwB,CAAC;AAC3D,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AACxE,eAAO,MAAM,wBAAwB,2BAA2B,CAAC;AACjE,eAAO,MAAM,6BAA6B,gCAAgC,CAAC;AAC3E,eAAO,MAAM,iCAAiC,mCAAmC,CAAC;AAClF,eAAO,MAAM,oBAAoB,uBAAuB,CAAC;AAEzD,yBAAiB,mBAAmB,CAAC;IACjC,SAAgB,uBAAuB,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CA2CxE;CACJ"}
|
|
@@ -0,0 +1,95 @@
|
|
|
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.NotebookContextKeys = exports.NOTEBOOK_HAS_OUTPUTS = exports.NOTEBOOK_MISSING_KERNEL_EXTENSION = exports.NOTEBOOK_INTERRUPTIBLE_KERNEL = exports.NOTEBOOK_KERNEL_SELECTED = exports.NOTEBOOK_KERNEL_SOURCE_COUNT = exports.NOTEBOOK_KERNEL_COUNT = exports.NOTEBOOK_KERNEL = exports.NOTEBOOK_CELL_RESOURCE = exports.NOTEBOOK_CELL_OUTPUT_COLLAPSED = exports.NOTEBOOK_CELL_INPUT_COLLAPSED = exports.NOTEBOOK_CELL_HAS_OUTPUTS = exports.NOTEBOOK_CELL_EXECUTING = exports.NOTEBOOK_CELL_EXECUTION_STATE = exports.NOTEBOOK_CELL_LINE_NUMBERS = exports.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE = exports.NOTEBOOK_CELL_EDITOR_FOCUSED = exports.NOTEBOOK_CELL_FOCUSED = exports.NOTEBOOK_CELL_EDITABLE = exports.NOTEBOOK_CELL_TYPE = exports.NOTEBOOK_VIEW_TYPE = exports.NOTEBOOK_LAST_CELL_FAILED = exports.NOTEBOOK_CURSOR_NAVIGATION_MODE = exports.NOTEBOOK_CELL_TOOLBAR_LOCATION = exports.NOTEBOOK_BREAKPOINT_MARGIN_ACTIVE = exports.NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON = exports.NOTEBOOK_HAS_RUNNING_CELL = exports.NOTEBOOK_EDITOR_EDITABLE = exports.NOTEBOOK_OUTPUT_FOCUSED = exports.NOTEBOOK_CELL_LIST_FOCUSED = exports.NOTEBOOK_EDITOR_FOCUSED = exports.KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED = exports.HAS_OPENED_NOTEBOOK = void 0;
|
|
19
|
+
exports.HAS_OPENED_NOTEBOOK = 'userHasOpenedNotebook';
|
|
20
|
+
exports.KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED = 'notebookFindWidgetFocused';
|
|
21
|
+
exports.NOTEBOOK_EDITOR_FOCUSED = 'notebookEditorFocused';
|
|
22
|
+
exports.NOTEBOOK_CELL_LIST_FOCUSED = 'notebookCellListFocused';
|
|
23
|
+
exports.NOTEBOOK_OUTPUT_FOCUSED = 'notebookOutputFocused';
|
|
24
|
+
exports.NOTEBOOK_EDITOR_EDITABLE = 'notebookEditable';
|
|
25
|
+
exports.NOTEBOOK_HAS_RUNNING_CELL = 'notebookHasRunningCell';
|
|
26
|
+
exports.NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON = 'notebookUseConsolidatedOutputButton';
|
|
27
|
+
exports.NOTEBOOK_BREAKPOINT_MARGIN_ACTIVE = 'notebookBreakpointMargin';
|
|
28
|
+
exports.NOTEBOOK_CELL_TOOLBAR_LOCATION = 'notebookCellToolbarLocation';
|
|
29
|
+
exports.NOTEBOOK_CURSOR_NAVIGATION_MODE = 'notebookCursorNavigationMode';
|
|
30
|
+
exports.NOTEBOOK_LAST_CELL_FAILED = 'notebookLastCellFailed';
|
|
31
|
+
exports.NOTEBOOK_VIEW_TYPE = 'notebookType';
|
|
32
|
+
exports.NOTEBOOK_CELL_TYPE = 'notebookCellType';
|
|
33
|
+
exports.NOTEBOOK_CELL_EDITABLE = 'notebookCellEditable';
|
|
34
|
+
exports.NOTEBOOK_CELL_FOCUSED = 'notebookCellFocused';
|
|
35
|
+
exports.NOTEBOOK_CELL_EDITOR_FOCUSED = 'notebookCellEditorFocused';
|
|
36
|
+
exports.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE = 'notebookCellMarkdownEditMode';
|
|
37
|
+
exports.NOTEBOOK_CELL_LINE_NUMBERS = 'notebookCellLineNumbers';
|
|
38
|
+
exports.NOTEBOOK_CELL_EXECUTION_STATE = 'notebookCellExecutionState';
|
|
39
|
+
exports.NOTEBOOK_CELL_EXECUTING = 'notebookCellExecuting';
|
|
40
|
+
exports.NOTEBOOK_CELL_HAS_OUTPUTS = 'notebookCellHasOutputs';
|
|
41
|
+
exports.NOTEBOOK_CELL_INPUT_COLLAPSED = 'notebookCellInputIsCollapsed';
|
|
42
|
+
exports.NOTEBOOK_CELL_OUTPUT_COLLAPSED = 'notebookCellOutputIsCollapsed';
|
|
43
|
+
exports.NOTEBOOK_CELL_RESOURCE = 'notebookCellResource';
|
|
44
|
+
exports.NOTEBOOK_KERNEL = 'notebookKernel';
|
|
45
|
+
exports.NOTEBOOK_KERNEL_COUNT = 'notebookKernelCount';
|
|
46
|
+
exports.NOTEBOOK_KERNEL_SOURCE_COUNT = 'notebookKernelSourceCount';
|
|
47
|
+
exports.NOTEBOOK_KERNEL_SELECTED = 'notebookKernelSelected';
|
|
48
|
+
exports.NOTEBOOK_INTERRUPTIBLE_KERNEL = 'notebookInterruptibleKernel';
|
|
49
|
+
exports.NOTEBOOK_MISSING_KERNEL_EXTENSION = 'notebookMissingKernelExtension';
|
|
50
|
+
exports.NOTEBOOK_HAS_OUTPUTS = 'notebookHasOutputs';
|
|
51
|
+
var NotebookContextKeys;
|
|
52
|
+
(function (NotebookContextKeys) {
|
|
53
|
+
function initNotebookContextKeys(service) {
|
|
54
|
+
service.createKey(exports.HAS_OPENED_NOTEBOOK, false);
|
|
55
|
+
service.createKey(exports.KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED, false);
|
|
56
|
+
// // Is Notebook
|
|
57
|
+
// export const NOTEBOOK_IS_ACTIVE_EDITOR = ContextKeyExpr.equals('activeEditor', NOTEBOOK_EDITOR_ID);
|
|
58
|
+
// export const INTERACTIVE_WINDOW_IS_ACTIVE_EDITOR = ContextKeyExpr.equals('activeEditor', INTERACTIVE_WINDOW_EDITOR_ID);
|
|
59
|
+
// Editor keys
|
|
60
|
+
service.createKey(exports.NOTEBOOK_EDITOR_FOCUSED, false);
|
|
61
|
+
service.createKey(exports.NOTEBOOK_CELL_LIST_FOCUSED, false);
|
|
62
|
+
service.createKey(exports.NOTEBOOK_OUTPUT_FOCUSED, false);
|
|
63
|
+
service.createKey(exports.NOTEBOOK_EDITOR_EDITABLE, true);
|
|
64
|
+
service.createKey(exports.NOTEBOOK_HAS_RUNNING_CELL, false);
|
|
65
|
+
service.createKey(exports.NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON, false);
|
|
66
|
+
service.createKey(exports.NOTEBOOK_BREAKPOINT_MARGIN_ACTIVE, false);
|
|
67
|
+
service.createKey(exports.NOTEBOOK_CELL_TOOLBAR_LOCATION, 'left');
|
|
68
|
+
service.createKey(exports.NOTEBOOK_CURSOR_NAVIGATION_MODE, false);
|
|
69
|
+
service.createKey(exports.NOTEBOOK_LAST_CELL_FAILED, false);
|
|
70
|
+
// Cell keys
|
|
71
|
+
service.createKey(exports.NOTEBOOK_VIEW_TYPE, undefined);
|
|
72
|
+
service.createKey(exports.NOTEBOOK_CELL_TYPE, undefined);
|
|
73
|
+
service.createKey(exports.NOTEBOOK_CELL_EDITABLE, false);
|
|
74
|
+
service.createKey(exports.NOTEBOOK_CELL_FOCUSED, false);
|
|
75
|
+
service.createKey(exports.NOTEBOOK_CELL_EDITOR_FOCUSED, false);
|
|
76
|
+
service.createKey(exports.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, false);
|
|
77
|
+
service.createKey(exports.NOTEBOOK_CELL_LINE_NUMBERS, 'inherit');
|
|
78
|
+
service.createKey(exports.NOTEBOOK_CELL_EXECUTION_STATE, undefined);
|
|
79
|
+
service.createKey(exports.NOTEBOOK_CELL_EXECUTING, false);
|
|
80
|
+
service.createKey(exports.NOTEBOOK_CELL_HAS_OUTPUTS, false);
|
|
81
|
+
service.createKey(exports.NOTEBOOK_CELL_INPUT_COLLAPSED, false);
|
|
82
|
+
service.createKey(exports.NOTEBOOK_CELL_OUTPUT_COLLAPSED, false);
|
|
83
|
+
service.createKey(exports.NOTEBOOK_CELL_RESOURCE, '');
|
|
84
|
+
// Kernels
|
|
85
|
+
service.createKey(exports.NOTEBOOK_KERNEL, undefined);
|
|
86
|
+
service.createKey(exports.NOTEBOOK_KERNEL_COUNT, 0);
|
|
87
|
+
service.createKey(exports.NOTEBOOK_KERNEL_SOURCE_COUNT, 0);
|
|
88
|
+
service.createKey(exports.NOTEBOOK_KERNEL_SELECTED, false);
|
|
89
|
+
service.createKey(exports.NOTEBOOK_INTERRUPTIBLE_KERNEL, false);
|
|
90
|
+
service.createKey(exports.NOTEBOOK_MISSING_KERNEL_EXTENSION, false);
|
|
91
|
+
service.createKey(exports.NOTEBOOK_HAS_OUTPUTS, false);
|
|
92
|
+
}
|
|
93
|
+
NotebookContextKeys.initNotebookContextKeys = initNotebookContextKeys;
|
|
94
|
+
})(NotebookContextKeys = exports.NotebookContextKeys || (exports.NotebookContextKeys = {}));
|
|
95
|
+
//# sourceMappingURL=notebook-context-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notebook-context-keys.js","sourceRoot":"","sources":["../../../src/browser/contributions/notebook-context-keys.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;;;AAMnE,QAAA,mBAAmB,GAAG,uBAAuB,CAAC;AAC9C,QAAA,+CAA+C,GAAG,2BAA2B,CAAC;AAC9E,QAAA,uBAAuB,GAAG,uBAAuB,CAAC;AAClD,QAAA,0BAA0B,GAAG,yBAAyB,CAAC;AACvD,QAAA,uBAAuB,GAAG,uBAAuB,CAAC;AAClD,QAAA,wBAAwB,GAAG,kBAAkB,CAAC;AAC9C,QAAA,yBAAyB,GAAG,wBAAwB,CAAC;AACrD,QAAA,uCAAuC,GAAG,qCAAqC,CAAC;AAChF,QAAA,iCAAiC,GAAG,0BAA0B,CAAC;AAC/D,QAAA,8BAA8B,GAAG,6BAA6B,CAAC;AAC/D,QAAA,+BAA+B,GAAG,8BAA8B,CAAC;AACjE,QAAA,yBAAyB,GAAG,wBAAwB,CAAC;AACrD,QAAA,kBAAk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C,CAAC;QACzD,OAAO,CAAC,SAAS,CAAC,8BAAsB,EAAE,EAAE,CAAC,CAAC;QAE9C,UAAU;QACV,OAAO,CAAC,SAAS,CAAC,uBAAe,EAAE,SAAS,CAAC,CAAC;QAC9C,OAAO,CAAC,SAAS,CAAC,6BAAqB,EAAE,CAAC,CAAC,CAAC;QAC5C,OAAO,CAAC,SAAS,CAAC,oCAA4B,EAAE,CAAC,CAAC,CAAC;QACnD,OAAO,CAAC,SAAS,CAAC,gCAAwB,EAAE,KAAK,CAAC,CAAC;QACnD,OAAO,CAAC,SAAS,CAAC,qCAA6B,EAAE,KAAK,CAAC,CAAC;QACxD,OAAO,CAAC,SAAS,CAAC,yCAAiC,EAAE,KAAK,CAAC,CAAC;QAC5D,OAAO,CAAC,SAAS,CAAC,4BAAoB,EAAE,KAAK,CAAC,CAAC;IACnD,CAAC;IA3Ce,2CAAuB,0BA2CtC,CAAA;AACL,CAAC,EA7CgB,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QA6CnC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './notebook-type-registry';
|
|
2
|
+
export * from './notebook-renderer-registry';
|
|
3
|
+
export * from './notebook-editor-widget';
|
|
4
|
+
export * from './service/notebook-service';
|
|
5
|
+
export * from './service/notebook-editor-service';
|
|
6
|
+
export * from './service/notebook-kernel-service';
|
|
7
|
+
export * from './service/notebook-execution-state-service';
|
|
8
|
+
export * from './service/notebook-model-resolver-service';
|
|
9
|
+
export * from './service/notebook-renderer-messaging-service';
|
|
10
|
+
export * from './renderers/cell-output-webview';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAgBA,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
__exportStar(require("./notebook-type-registry"), exports);
|
|
29
|
+
__exportStar(require("./notebook-renderer-registry"), exports);
|
|
30
|
+
__exportStar(require("./notebook-editor-widget"), exports);
|
|
31
|
+
__exportStar(require("./service/notebook-service"), exports);
|
|
32
|
+
__exportStar(require("./service/notebook-editor-service"), exports);
|
|
33
|
+
__exportStar(require("./service/notebook-kernel-service"), exports);
|
|
34
|
+
__exportStar(require("./service/notebook-execution-state-service"), exports);
|
|
35
|
+
__exportStar(require("./service/notebook-model-resolver-service"), exports);
|
|
36
|
+
__exportStar(require("./service/notebook-renderer-messaging-service"), exports);
|
|
37
|
+
__exportStar(require("./renderers/cell-output-webview"), exports);
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.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,2DAAyC;AACzC,+DAA6C;AAC7C,2DAAyC;AACzC,6DAA2C;AAC3C,oEAAkD;AAClD,oEAAkD;AAClD,6EAA2D;AAC3D,4EAA0D;AAC1D,gFAA8D;AAC9D,kEAAgD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Emitter, Resource, ResourceReadOptions, ResourceResolver, ResourceVersion, URI } from '@theia/core';
|
|
2
|
+
import { NotebookService } from './service/notebook-service';
|
|
3
|
+
import { NotebookCellModel } from './view-model/notebook-cell-model';
|
|
4
|
+
export declare class NotebookCellResource implements Resource {
|
|
5
|
+
uri: URI;
|
|
6
|
+
protected readonly didChangeContentsEmitter: Emitter<void>;
|
|
7
|
+
readonly onDidChangeContents: import("@theia/core").Event<void>;
|
|
8
|
+
version?: ResourceVersion | undefined;
|
|
9
|
+
encoding?: string | undefined;
|
|
10
|
+
isReadonly?: boolean | undefined;
|
|
11
|
+
private cell;
|
|
12
|
+
constructor(uri: URI, cell: NotebookCellModel);
|
|
13
|
+
readContents(options?: ResourceReadOptions | undefined): Promise<string>;
|
|
14
|
+
dispose(): void;
|
|
15
|
+
}
|
|
16
|
+
export declare class NotebookCellResourceResolver implements ResourceResolver {
|
|
17
|
+
protected readonly notebookService: NotebookService;
|
|
18
|
+
resolve(uri: URI): Promise<Resource>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=notebook-cell-resource-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notebook-cell-resource-resolver.d.ts","sourceRoot":"","sources":["../../src/browser/notebook-cell-resource-resolver.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAG7G,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,qBAAa,oBAAqB,YAAW,QAAQ;IAW9B,GAAG,EAAE,GAAG;IAT3B,SAAS,CAAC,QAAQ,CAAC,wBAAwB,gBAAuB;IAClE,QAAQ,CAAC,mBAAmB,oCAAuC;IAEnE,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAEjC,OAAO,CAAC,IAAI,CAAoB;gBAEb,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,iBAAiB;IAIpD,YAAY,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;IAIxE,OAAO,IAAI,IAAI;CAIlB;AAED,qBACa,4BAA6B,YAAW,gBAAgB;IAGjE,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAE9C,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC;CAyB7C"}
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.NotebookCellResourceResolver = exports.NotebookCellResource = void 0;
|
|
28
|
+
const core_1 = require("@theia/core");
|
|
29
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
30
|
+
const common_1 = require("../common");
|
|
31
|
+
const notebook_service_1 = require("./service/notebook-service");
|
|
32
|
+
class NotebookCellResource {
|
|
33
|
+
constructor(uri, cell) {
|
|
34
|
+
this.uri = uri;
|
|
35
|
+
this.didChangeContentsEmitter = new core_1.Emitter();
|
|
36
|
+
this.onDidChangeContents = this.didChangeContentsEmitter.event;
|
|
37
|
+
this.cell = cell;
|
|
38
|
+
}
|
|
39
|
+
readContents(options) {
|
|
40
|
+
return Promise.resolve(this.cell.source);
|
|
41
|
+
}
|
|
42
|
+
dispose() {
|
|
43
|
+
this.didChangeContentsEmitter.dispose();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.NotebookCellResource = NotebookCellResource;
|
|
47
|
+
let NotebookCellResourceResolver = class NotebookCellResourceResolver {
|
|
48
|
+
async resolve(uri) {
|
|
49
|
+
if (uri.scheme !== common_1.CellUri.scheme) {
|
|
50
|
+
throw new Error(`Cannot resolve cell uri with scheme '${uri.scheme}'`);
|
|
51
|
+
}
|
|
52
|
+
const parsedUri = common_1.CellUri.parse(uri);
|
|
53
|
+
if (!parsedUri) {
|
|
54
|
+
throw new Error(`Cannot parse uri '${uri.toString()}'`);
|
|
55
|
+
}
|
|
56
|
+
const notebookModel = this.notebookService.getNotebookEditorModel(parsedUri.notebook);
|
|
57
|
+
if (!notebookModel) {
|
|
58
|
+
throw new Error(`No notebook found for uri '${parsedUri.notebook}'`);
|
|
59
|
+
}
|
|
60
|
+
const notebookCellModel = notebookModel.cells.find(cell => cell.handle === parsedUri.handle);
|
|
61
|
+
if (!notebookCellModel) {
|
|
62
|
+
throw new Error(`No cell found with handle '${parsedUri.handle}' in '${parsedUri.notebook}'`);
|
|
63
|
+
}
|
|
64
|
+
return new NotebookCellResource(uri, notebookCellModel);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, inversify_1.inject)(notebook_service_1.NotebookService),
|
|
69
|
+
__metadata("design:type", notebook_service_1.NotebookService)
|
|
70
|
+
], NotebookCellResourceResolver.prototype, "notebookService", void 0);
|
|
71
|
+
NotebookCellResourceResolver = __decorate([
|
|
72
|
+
(0, inversify_1.injectable)()
|
|
73
|
+
], NotebookCellResourceResolver);
|
|
74
|
+
exports.NotebookCellResourceResolver = NotebookCellResourceResolver;
|
|
75
|
+
//# sourceMappingURL=notebook-cell-resource-resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notebook-cell-resource-resolver.js","sourceRoot":"","sources":["../../src/browser/notebook-cell-resource-resolver.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,sCAA6G;AAC7G,4DAAkE;AAClE,sCAAoC;AACpC,iEAA6D;AAG7D,MAAa,oBAAoB;IAW7B,YAAmB,GAAQ,EAAE,IAAuB;QAAjC,QAAG,GAAH,GAAG,CAAK;QATR,6BAAwB,GAAG,IAAI,cAAO,EAAQ,CAAC;QACzD,wBAAmB,GAAG,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC;QAS/D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAED,YAAY,CAAC,OAAyC;QAClD,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO;QACH,IAAI,CAAC,wBAAwB,CAAC,OAAO,EAAE,CAAC;IAC5C,CAAC;CAEJ;AAvBD,oDAuBC;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
+
import { NotebookEditorWidget, NotebookEditorProps } from './notebook-editor-widget';
|
|
3
|
+
import { NotebookService } from './service/notebook-service';
|
|
4
|
+
import { NotebookModelResolverService } from './service/notebook-model-resolver-service';
|
|
5
|
+
export interface NotebookEditorWidgetOptions extends NavigatableWidgetOptions {
|
|
6
|
+
notebookType: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class NotebookEditorWidgetFactory implements WidgetFactory {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
protected readonly notebookService: NotebookService;
|
|
11
|
+
protected readonly notebookModelResolver: NotebookModelResolverService;
|
|
12
|
+
protected readonly labelProvider: LabelProvider;
|
|
13
|
+
protected readonly createNotebookEditorWidget: (props: NotebookEditorProps) => NotebookEditorWidget;
|
|
14
|
+
createWidget(options?: NotebookEditorWidgetOptions): Promise<NotebookEditorWidget>;
|
|
15
|
+
private createEditor;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=notebook-editor-widget-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notebook-editor-widget-factory.d.ts","sourceRoot":"","sources":["../../src/browser/notebook-editor-widget-factory.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEjG,OAAO,EAAE,oBAAoB,EAAkC,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACrH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAEzF,MAAM,WAAW,2BAA4B,SAAQ,wBAAwB;IACzE,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,qBACa,2BAA4B,YAAW,aAAa;IAC7D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAA2B;IAG9C,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAGpD,SAAS,CAAC,QAAQ,CAAC,qBAAqB,EAAE,4BAA4B,CAAC;IAGvE,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAGhD,SAAS,CAAC,QAAQ,CAAC,0BAA0B,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,oBAAoB,CAAC;IAE9F,YAAY,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,oBAAoB,CAAC;YAiB1E,YAAY;CAS7B"}
|