@theia/notebook 1.67.0-next.3 → 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.
Files changed (244) hide show
  1. package/README.md +1 -1
  2. package/package.json +7 -7
  3. package/src/browser/contributions/notebook-actions-contribution.ts +25 -22
  4. package/src/browser/contributions/notebook-cell-actions-contribution.ts +20 -9
  5. package/src/browser/contributions/notebook-label-provider-contribution.ts +2 -1
  6. package/src/browser/contributions/notebook-outline-contribution.ts +8 -6
  7. package/src/browser/contributions/notebook-status-bar-contribution.ts +4 -6
  8. package/src/browser/index.ts +1 -0
  9. package/src/browser/notebook-cell-open-handler.ts +3 -3
  10. package/src/browser/notebook-editor-split-contribution.ts +51 -0
  11. package/src/browser/notebook-editor-widget-factory.ts +11 -1
  12. package/src/browser/notebook-editor-widget.tsx +18 -3
  13. package/src/browser/notebook-frontend-module.ts +5 -0
  14. package/src/browser/notebook-open-handler.ts +19 -11
  15. package/src/browser/notebook-types.ts +1 -0
  16. package/src/browser/service/notebook-context-manager.ts +17 -9
  17. package/src/browser/view/notebook-cell-editor.tsx +13 -5
  18. package/src/browser/view/notebook-cell-list-view.tsx +15 -12
  19. package/src/browser/view/notebook-cell-toolbar-factory.tsx +5 -4
  20. package/src/browser/view/notebook-code-cell-view.tsx +6 -1
  21. package/src/browser/view/notebook-markdown-cell-view.tsx +27 -7
  22. package/src/browser/view-model/notebook-cell-model.ts +8 -41
  23. package/src/browser/view-model/notebook-model.ts +2 -33
  24. package/src/browser/view-model/notebook-view-model.ts +138 -0
  25. package/lib/browser/contributions/cell-operations.d.ts +0 -8
  26. package/lib/browser/contributions/cell-operations.d.ts.map +0 -1
  27. package/lib/browser/contributions/cell-operations.js +0 -45
  28. package/lib/browser/contributions/cell-operations.js.map +0 -1
  29. package/lib/browser/contributions/notebook-actions-contribution.d.ts +0 -48
  30. package/lib/browser/contributions/notebook-actions-contribution.d.ts.map +0 -1
  31. package/lib/browser/contributions/notebook-actions-contribution.js +0 -341
  32. package/lib/browser/contributions/notebook-actions-contribution.js.map +0 -1
  33. package/lib/browser/contributions/notebook-cell-actions-contribution.d.ts +0 -66
  34. package/lib/browser/contributions/notebook-cell-actions-contribution.d.ts.map +0 -1
  35. package/lib/browser/contributions/notebook-cell-actions-contribution.js +0 -512
  36. package/lib/browser/contributions/notebook-cell-actions-contribution.js.map +0 -1
  37. package/lib/browser/contributions/notebook-color-contribution.d.ts +0 -6
  38. package/lib/browser/contributions/notebook-color-contribution.d.ts.map +0 -1
  39. package/lib/browser/contributions/notebook-color-contribution.js +0 -247
  40. package/lib/browser/contributions/notebook-color-contribution.js.map +0 -1
  41. package/lib/browser/contributions/notebook-context-keys.d.ts +0 -44
  42. package/lib/browser/contributions/notebook-context-keys.d.ts.map +0 -1
  43. package/lib/browser/contributions/notebook-context-keys.js +0 -108
  44. package/lib/browser/contributions/notebook-context-keys.js.map +0 -1
  45. package/lib/browser/contributions/notebook-label-provider-contribution.d.ts +0 -19
  46. package/lib/browser/contributions/notebook-label-provider-contribution.d.ts.map +0 -1
  47. package/lib/browser/contributions/notebook-label-provider-contribution.js +0 -85
  48. package/lib/browser/contributions/notebook-label-provider-contribution.js.map +0 -1
  49. package/lib/browser/contributions/notebook-outline-contribution.d.ts +0 -28
  50. package/lib/browser/contributions/notebook-outline-contribution.d.ts.map +0 -1
  51. package/lib/browser/contributions/notebook-outline-contribution.js +0 -113
  52. package/lib/browser/contributions/notebook-outline-contribution.js.map +0 -1
  53. package/lib/browser/contributions/notebook-output-action-contribution.d.ts +0 -16
  54. package/lib/browser/contributions/notebook-output-action-contribution.d.ts.map +0 -1
  55. package/lib/browser/contributions/notebook-output-action-contribution.js +0 -83
  56. package/lib/browser/contributions/notebook-output-action-contribution.js.map +0 -1
  57. package/lib/browser/contributions/notebook-status-bar-contribution.d.ts +0 -12
  58. package/lib/browser/contributions/notebook-status-bar-contribution.d.ts.map +0 -1
  59. package/lib/browser/contributions/notebook-status-bar-contribution.js +0 -63
  60. package/lib/browser/contributions/notebook-status-bar-contribution.js.map +0 -1
  61. package/lib/browser/contributions/notebook-undo-redo-handler.d.ts +0 -10
  62. package/lib/browser/contributions/notebook-undo-redo-handler.d.ts.map +0 -1
  63. package/lib/browser/contributions/notebook-undo-redo-handler.js +0 -49
  64. package/lib/browser/contributions/notebook-undo-redo-handler.js.map +0 -1
  65. package/lib/browser/index.d.ts +0 -13
  66. package/lib/browser/index.d.ts.map +0 -1
  67. package/lib/browser/index.js +0 -31
  68. package/lib/browser/index.js.map +0 -1
  69. package/lib/browser/notebook-cell-open-handler.d.ts +0 -10
  70. package/lib/browser/notebook-cell-open-handler.d.ts.map +0 -1
  71. package/lib/browser/notebook-cell-open-handler.js +0 -51
  72. package/lib/browser/notebook-cell-open-handler.js.map +0 -1
  73. package/lib/browser/notebook-cell-resource-resolver.d.ts +0 -26
  74. package/lib/browser/notebook-cell-resource-resolver.d.ts.map +0 -1
  75. package/lib/browser/notebook-cell-resource-resolver.js +0 -109
  76. package/lib/browser/notebook-cell-resource-resolver.js.map +0 -1
  77. package/lib/browser/notebook-editor-widget-factory.d.ts +0 -19
  78. package/lib/browser/notebook-editor-widget-factory.d.ts.map +0 -1
  79. package/lib/browser/notebook-editor-widget-factory.js +0 -93
  80. package/lib/browser/notebook-editor-widget-factory.js.map +0 -1
  81. package/lib/browser/notebook-editor-widget.d.ts +0 -99
  82. package/lib/browser/notebook-editor-widget.d.ts.map +0 -1
  83. package/lib/browser/notebook-editor-widget.js +0 -323
  84. package/lib/browser/notebook-editor-widget.js.map +0 -1
  85. package/lib/browser/notebook-frontend-module.d.ts +0 -5
  86. package/lib/browser/notebook-frontend-module.d.ts.map +0 -1
  87. package/lib/browser/notebook-frontend-module.js +0 -112
  88. package/lib/browser/notebook-frontend-module.js.map +0 -1
  89. package/lib/browser/notebook-open-handler.d.ts +0 -23
  90. package/lib/browser/notebook-open-handler.d.ts.map +0 -1
  91. package/lib/browser/notebook-open-handler.js +0 -113
  92. package/lib/browser/notebook-open-handler.js.map +0 -1
  93. package/lib/browser/notebook-output-utils.d.ts +0 -13
  94. package/lib/browser/notebook-output-utils.d.ts.map +0 -1
  95. package/lib/browser/notebook-output-utils.js +0 -112
  96. package/lib/browser/notebook-output-utils.js.map +0 -1
  97. package/lib/browser/notebook-renderer-registry.d.ts +0 -25
  98. package/lib/browser/notebook-renderer-registry.d.ts.map +0 -1
  99. package/lib/browser/notebook-renderer-registry.js +0 -72
  100. package/lib/browser/notebook-renderer-registry.js.map +0 -1
  101. package/lib/browser/notebook-type-registry.d.ts +0 -12
  102. package/lib/browser/notebook-type-registry.d.ts.map +0 -1
  103. package/lib/browser/notebook-type-registry.js +0 -60
  104. package/lib/browser/notebook-type-registry.js.map +0 -1
  105. package/lib/browser/notebook-types.d.ts +0 -130
  106. package/lib/browser/notebook-types.d.ts.map +0 -1
  107. package/lib/browser/notebook-types.js +0 -28
  108. package/lib/browser/notebook-types.js.map +0 -1
  109. package/lib/browser/renderers/cell-output-webview.d.ts +0 -26
  110. package/lib/browser/renderers/cell-output-webview.d.ts.map +0 -1
  111. package/lib/browser/renderers/cell-output-webview.js +0 -21
  112. package/lib/browser/renderers/cell-output-webview.js.map +0 -1
  113. package/lib/browser/service/notebook-cell-editor-service.d.ts +0 -23
  114. package/lib/browser/service/notebook-cell-editor-service.d.ts.map +0 -1
  115. package/lib/browser/service/notebook-cell-editor-service.js +0 -89
  116. package/lib/browser/service/notebook-cell-editor-service.js.map +0 -1
  117. package/lib/browser/service/notebook-cell-status-bar-service.d.ts +0 -39
  118. package/lib/browser/service/notebook-cell-status-bar-service.d.ts.map +0 -1
  119. package/lib/browser/service/notebook-cell-status-bar-service.js +0 -69
  120. package/lib/browser/service/notebook-cell-status-bar-service.js.map +0 -1
  121. package/lib/browser/service/notebook-clipboard-service.d.ts +0 -10
  122. package/lib/browser/service/notebook-clipboard-service.d.ts.map +0 -1
  123. package/lib/browser/service/notebook-clipboard-service.js +0 -42
  124. package/lib/browser/service/notebook-clipboard-service.js.map +0 -1
  125. package/lib/browser/service/notebook-context-manager.d.ts +0 -26
  126. package/lib/browser/service/notebook-context-manager.d.ts.map +0 -1
  127. package/lib/browser/service/notebook-context-manager.js +0 -131
  128. package/lib/browser/service/notebook-context-manager.js.map +0 -1
  129. package/lib/browser/service/notebook-editor-widget-service.d.ts +0 -27
  130. package/lib/browser/service/notebook-editor-widget-service.d.ts.map +0 -1
  131. package/lib/browser/service/notebook-editor-widget-service.js +0 -124
  132. package/lib/browser/service/notebook-editor-widget-service.js.map +0 -1
  133. package/lib/browser/service/notebook-execution-service.d.ts +0 -25
  134. package/lib/browser/service/notebook-execution-service.d.ts.map +0 -1
  135. package/lib/browser/service/notebook-execution-service.js +0 -150
  136. package/lib/browser/service/notebook-execution-service.js.map +0 -1
  137. package/lib/browser/service/notebook-execution-state-service.d.ts +0 -78
  138. package/lib/browser/service/notebook-execution-state-service.d.ts.map +0 -1
  139. package/lib/browser/service/notebook-execution-state-service.js +0 -247
  140. package/lib/browser/service/notebook-execution-state-service.js.map +0 -1
  141. package/lib/browser/service/notebook-kernel-history-service.d.ts +0 -28
  142. package/lib/browser/service/notebook-kernel-history-service.d.ts.map +0 -1
  143. package/lib/browser/service/notebook-kernel-history-service.js +0 -116
  144. package/lib/browser/service/notebook-kernel-history-service.js.map +0 -1
  145. package/lib/browser/service/notebook-kernel-quick-pick-service.d.ts +0 -61
  146. package/lib/browser/service/notebook-kernel-quick-pick-service.d.ts.map +0 -1
  147. package/lib/browser/service/notebook-kernel-quick-pick-service.js +0 -425
  148. package/lib/browser/service/notebook-kernel-quick-pick-service.js.map +0 -1
  149. package/lib/browser/service/notebook-kernel-service.d.ts +0 -125
  150. package/lib/browser/service/notebook-kernel-service.d.ts.map +0 -1
  151. package/lib/browser/service/notebook-kernel-service.js +0 -268
  152. package/lib/browser/service/notebook-kernel-service.js.map +0 -1
  153. package/lib/browser/service/notebook-model-resolver-service.d.ts +0 -28
  154. package/lib/browser/service/notebook-model-resolver-service.d.ts.map +0 -1
  155. package/lib/browser/service/notebook-model-resolver-service.js +0 -157
  156. package/lib/browser/service/notebook-model-resolver-service.js.map +0 -1
  157. package/lib/browser/service/notebook-monaco-text-model-service.d.ts +0 -21
  158. package/lib/browser/service/notebook-monaco-text-model-service.d.ts.map +0 -1
  159. package/lib/browser/service/notebook-monaco-text-model-service.js +0 -73
  160. package/lib/browser/service/notebook-monaco-text-model-service.js.map +0 -1
  161. package/lib/browser/service/notebook-options.d.ts +0 -30
  162. package/lib/browser/service/notebook-options.d.ts.map +0 -1
  163. package/lib/browser/service/notebook-options.js +0 -130
  164. package/lib/browser/service/notebook-options.js.map +0 -1
  165. package/lib/browser/service/notebook-renderer-messaging-service.d.ts +0 -35
  166. package/lib/browser/service/notebook-renderer-messaging-service.d.ts.map +0 -1
  167. package/lib/browser/service/notebook-renderer-messaging-service.js +0 -100
  168. package/lib/browser/service/notebook-renderer-messaging-service.js.map +0 -1
  169. package/lib/browser/service/notebook-service.d.ts +0 -68
  170. package/lib/browser/service/notebook-service.d.ts.map +0 -1
  171. package/lib/browser/service/notebook-service.js +0 -184
  172. package/lib/browser/service/notebook-service.js.map +0 -1
  173. package/lib/browser/view/notebook-cell-editor.d.ts +0 -44
  174. package/lib/browser/view/notebook-cell-editor.d.ts.map +0 -1
  175. package/lib/browser/view/notebook-cell-editor.js +0 -267
  176. package/lib/browser/view/notebook-cell-editor.js.map +0 -1
  177. package/lib/browser/view/notebook-cell-list-view.d.ts +0 -56
  178. package/lib/browser/view/notebook-cell-list-view.d.ts.map +0 -1
  179. package/lib/browser/view/notebook-cell-list-view.js +0 -222
  180. package/lib/browser/view/notebook-cell-list-view.js.map +0 -1
  181. package/lib/browser/view/notebook-cell-toolbar-factory.d.ts +0 -33
  182. package/lib/browser/view/notebook-cell-toolbar-factory.d.ts.map +0 -1
  183. package/lib/browser/view/notebook-cell-toolbar-factory.js +0 -110
  184. package/lib/browser/view/notebook-cell-toolbar-factory.js.map +0 -1
  185. package/lib/browser/view/notebook-cell-toolbar.d.ts +0 -25
  186. package/lib/browser/view/notebook-cell-toolbar.d.ts.map +0 -1
  187. package/lib/browser/view/notebook-cell-toolbar.js +0 -51
  188. package/lib/browser/view/notebook-cell-toolbar.js.map +0 -1
  189. package/lib/browser/view/notebook-code-cell-view.d.ts +0 -91
  190. package/lib/browser/view/notebook-code-cell-view.d.ts.map +0 -1
  191. package/lib/browser/view/notebook-code-cell-view.js +0 -333
  192. package/lib/browser/view/notebook-code-cell-view.js.map +0 -1
  193. package/lib/browser/view/notebook-find-widget.d.ts +0 -63
  194. package/lib/browser/view/notebook-find-widget.d.ts.map +0 -1
  195. package/lib/browser/view/notebook-find-widget.js +0 -225
  196. package/lib/browser/view/notebook-find-widget.js.map +0 -1
  197. package/lib/browser/view/notebook-main-toolbar.d.ts +0 -53
  198. package/lib/browser/view/notebook-main-toolbar.d.ts.map +0 -1
  199. package/lib/browser/view/notebook-main-toolbar.js +0 -184
  200. package/lib/browser/view/notebook-main-toolbar.js.map +0 -1
  201. package/lib/browser/view/notebook-markdown-cell-view.d.ts +0 -26
  202. package/lib/browser/view/notebook-markdown-cell-view.d.ts.map +0 -1
  203. package/lib/browser/view/notebook-markdown-cell-view.js +0 -198
  204. package/lib/browser/view/notebook-markdown-cell-view.js.map +0 -1
  205. package/lib/browser/view/notebook-viewport-service.d.ts +0 -17
  206. package/lib/browser/view/notebook-viewport-service.d.ts.map +0 -1
  207. package/lib/browser/view/notebook-viewport-service.js +0 -61
  208. package/lib/browser/view/notebook-viewport-service.js.map +0 -1
  209. package/lib/browser/view-model/notebook-cell-model.d.ts +0 -149
  210. package/lib/browser/view-model/notebook-cell-model.d.ts.map +0 -1
  211. package/lib/browser/view-model/notebook-cell-model.js +0 -391
  212. package/lib/browser/view-model/notebook-cell-model.js.map +0 -1
  213. package/lib/browser/view-model/notebook-cell-output-model.d.ts +0 -17
  214. package/lib/browser/view-model/notebook-cell-output-model.d.ts.map +0 -1
  215. package/lib/browser/view-model/notebook-cell-output-model.js +0 -87
  216. package/lib/browser/view-model/notebook-cell-output-model.js.map +0 -1
  217. package/lib/browser/view-model/notebook-model.d.ts +0 -93
  218. package/lib/browser/view-model/notebook-model.d.ts.map +0 -1
  219. package/lib/browser/view-model/notebook-model.js +0 -468
  220. package/lib/browser/view-model/notebook-model.js.map +0 -1
  221. package/lib/common/index.d.ts +0 -3
  222. package/lib/common/index.d.ts.map +0 -1
  223. package/lib/common/index.js +0 -21
  224. package/lib/common/index.js.map +0 -1
  225. package/lib/common/notebook-common.d.ts +0 -227
  226. package/lib/common/notebook-common.d.ts.map +0 -1
  227. package/lib/common/notebook-common.js +0 -151
  228. package/lib/common/notebook-common.js.map +0 -1
  229. package/lib/common/notebook-preferences.d.ts +0 -15
  230. package/lib/common/notebook-preferences.d.ts.map +0 -1
  231. package/lib/common/notebook-preferences.js +0 -89
  232. package/lib/common/notebook-preferences.js.map +0 -1
  233. package/lib/common/notebook-protocol.d.ts +0 -21
  234. package/lib/common/notebook-protocol.d.ts.map +0 -1
  235. package/lib/common/notebook-protocol.js +0 -18
  236. package/lib/common/notebook-protocol.js.map +0 -1
  237. package/lib/common/notebook-range.d.ts +0 -14
  238. package/lib/common/notebook-range.d.ts.map +0 -1
  239. package/lib/common/notebook-range.js +0 -18
  240. package/lib/common/notebook-range.js.map +0 -1
  241. package/lib/node/notebook-backend-module.d.ts +0 -4
  242. package/lib/node/notebook-backend-module.d.ts.map +0 -1
  243. package/lib/node/notebook-backend-module.js +0 -23
  244. package/lib/node/notebook-backend-module.js.map +0 -1
@@ -0,0 +1,138 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2025 Typefox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { injectable } from '@theia/core/shared/inversify';
18
+ import { NotebookCellModel } from './notebook-cell-model';
19
+ import { Disposable, Emitter } from '@theia/core';
20
+ import { NotebookModel } from './notebook-model';
21
+
22
+ export interface SelectedCellChangeEvent {
23
+ cell: NotebookCellModel | undefined;
24
+ scrollIntoView: boolean;
25
+ }
26
+
27
+ export type CellEditorFocusRequest = number | 'lastLine' | undefined;
28
+
29
+ /**
30
+ * Model containing the editor state/view information of a notebook editor. The actual notebook data can be found in the {@link NotebookModel}.
31
+ */
32
+ @injectable()
33
+ export class NotebookViewModel implements Disposable {
34
+
35
+ protected readonly onDidChangeSelectedCellEmitter = new Emitter<SelectedCellChangeEvent>();
36
+ readonly onDidChangeSelectedCell = this.onDidChangeSelectedCellEmitter.event;
37
+
38
+ selectedCell?: NotebookCellModel;
39
+ get selectedCellViewModel(): CellViewModel | undefined {
40
+ if (this.selectedCell) {
41
+ return this.cellViewModels.get(this.selectedCell.handle);
42
+ }
43
+ }
44
+
45
+ // Cell handle to CellViewModel mapping
46
+ readonly cellViewModels: Map<number, CellViewModel> = new Map();
47
+
48
+ initDataModel(model: NotebookModel): void {
49
+ model.onDidAddOrRemoveCell(e => {
50
+
51
+ for (const cellId of e.newCellIds || []) {
52
+ const cell = model.getCellByHandle(cellId);
53
+ if (cell) {
54
+ this.cellViewModels.set(cell.handle, new CellViewModel(cell, () => {
55
+ this.cellViewModels.delete(cell.handle);
56
+ }));
57
+ }
58
+ }
59
+
60
+ if (e.newCellIds && e.newCellIds?.length > 0 && e.externalEvent) {
61
+ const lastNewCellHandle = e.newCellIds[e.newCellIds.length - 1];
62
+ const newSelectedCell = model.getCellByHandle(lastNewCellHandle)!;
63
+ this.setSelectedCell(newSelectedCell, true);
64
+ this.cellViewModels.get(newSelectedCell.handle)?.requestEdit();
65
+ } else if (this.selectedCell && !model.getCellByHandle(this.selectedCell.handle)) {
66
+ const newSelectedIndex = e.rawEvent.changes[e.rawEvent.changes.length - 1].start;
67
+ const newSelectedCell = model.cells[Math.min(newSelectedIndex, model.cells.length - 1)];
68
+ this.setSelectedCell(newSelectedCell, false);
69
+ }
70
+ });
71
+
72
+ for (const cell of model.cells) {
73
+ this.cellViewModels.set(cell.handle, new CellViewModel(cell, () => {
74
+ this.cellViewModels.delete(cell.handle);
75
+ }));
76
+ }
77
+ }
78
+
79
+ setSelectedCell(cell: NotebookCellModel, scrollIntoView: boolean = true): void {
80
+ if (this.selectedCell !== cell) {
81
+ this.selectedCell = cell;
82
+ this.onDidChangeSelectedCellEmitter.fire({ cell, scrollIntoView });
83
+ }
84
+ }
85
+
86
+ dispose(): void {
87
+ this.onDidChangeSelectedCellEmitter.dispose();
88
+ }
89
+
90
+ }
91
+
92
+ export class CellViewModel implements Disposable {
93
+
94
+ protected readonly onDidRequestCellEditChangeEmitter = new Emitter<boolean>();
95
+ readonly onDidRequestCellEditChange = this.onDidRequestCellEditChangeEmitter.event;
96
+
97
+ protected readonly onWillFocusCellEditorEmitter = new Emitter<CellEditorFocusRequest>();
98
+ readonly onWillFocusCellEditor = this.onWillFocusCellEditorEmitter.event;
99
+
100
+ protected readonly onWillBlurCellEditorEmitter = new Emitter<void>();
101
+ readonly onWillBlurCellEditor = this.onWillBlurCellEditorEmitter.event;
102
+
103
+ protected _editing: boolean = false;
104
+ get editing(): boolean {
105
+ return this._editing;
106
+ }
107
+
108
+ constructor(protected readonly cell: NotebookCellModel, protected onDispose: () => void) {
109
+ cell.toDispose.push(this);
110
+ }
111
+
112
+ requestEdit(): void {
113
+ if (this.cell.isTextModelWritable) {
114
+ this._editing = true;
115
+ this.onDidRequestCellEditChangeEmitter.fire(true);
116
+ }
117
+ }
118
+
119
+ requestStopEdit(): void {
120
+ this._editing = false;
121
+ this.onDidRequestCellEditChangeEmitter.fire(false);
122
+ }
123
+
124
+ requestFocusEditor(focusRequest?: CellEditorFocusRequest): void {
125
+ this.requestEdit();
126
+ this.onWillFocusCellEditorEmitter.fire(focusRequest);
127
+ }
128
+
129
+ requestBlurEditor(): void {
130
+ this.requestStopEdit();
131
+ this.onWillBlurCellEditorEmitter.fire();
132
+ }
133
+
134
+ dispose(): void {
135
+ this.onDispose();
136
+ this.onDidRequestCellEditChangeEmitter.dispose();
137
+ }
138
+ }
@@ -1,8 +0,0 @@
1
- import { CellKind } from '../../common';
2
- import { NotebookCellModel } from '../view-model/notebook-cell-model';
3
- import { NotebookModel } from '../view-model/notebook-model';
4
- /**
5
- * a collection of different reusable notbook cell operations
6
- */
7
- export declare function changeCellType(notebookModel: NotebookModel, cell: NotebookCellModel, type: CellKind, language?: string): void;
8
- //# sourceMappingURL=cell-operations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cell-operations.d.ts","sourceRoot":"","sources":["../../../src/browser/contributions/cell-operations.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAgB,QAAQ,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D;;GAEG;AAEH,wBAAgB,cAAc,CAAC,aAAa,EAAE,aAAa,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAmB7H"}
@@ -1,45 +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.changeCellType = void 0;
19
- const common_1 = require("../../common");
20
- /**
21
- * a collection of different reusable notbook cell operations
22
- */
23
- function changeCellType(notebookModel, cell, type, language) {
24
- if (cell.cellKind === type) {
25
- return;
26
- }
27
- if (type === common_1.CellKind.Markup) {
28
- language = 'markdown';
29
- }
30
- else {
31
- language !== null && language !== void 0 ? language : (language = cell.language);
32
- }
33
- notebookModel.applyEdits([{
34
- editType: 1 /* CellEditType.Replace */,
35
- index: notebookModel.cells.indexOf(cell),
36
- count: 1,
37
- cells: [{
38
- ...cell.getData(),
39
- cellKind: type,
40
- language
41
- }]
42
- }], true);
43
- }
44
- exports.changeCellType = changeCellType;
45
- //# sourceMappingURL=cell-operations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cell-operations.js","sourceRoot":"","sources":["../../../src/browser/contributions/cell-operations.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,yCAAsD;AAItD;;GAEG;AAEH,SAAgB,cAAc,CAAC,aAA4B,EAAE,IAAuB,EAAE,IAAc,EAAE,QAAiB;IACnH,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;QACzB,OAAO;IACX,CAAC;IACD,IAAI,IAAI,KAAK,iBAAQ,CAAC,MAAM,EAAE,CAAC;QAC3B,QAAQ,GAAG,UAAU,CAAC;IAC1B,CAAC;SAAM,CAAC;QACJ,QAAQ,aAAR,QAAQ,cAAR,QAAQ,IAAR,QAAQ,GAAK,IAAI,CAAC,QAAQ,EAAC;IAC/B,CAAC;IACD,aAAa,CAAC,UAAU,CAAC,CAAC;YACtB,QAAQ,8BAAsB;YAC9B,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;YACxC,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,CAAC;oBACJ,GAAG,IAAI,CAAC,OAAO,EAAE;oBACjB,QAAQ,EAAE,IAAI;oBACd,QAAQ;iBACX,CAAC;SACL,CAAC,EAAE,IAAI,CAAC,CAAC;AACd,CAAC;AAnBD,wCAmBC"}
@@ -1,48 +0,0 @@
1
- import { Command, CommandContribution, CommandHandler, CommandRegistry, MenuContribution, MenuModelRegistry, URI } from '@theia/core';
2
- import { ApplicationShell, KeybindingContribution, KeybindingRegistry } from '@theia/core/lib/browser';
3
- import { NotebookModel } from '../view-model/notebook-model';
4
- import { NotebookService } from '../service/notebook-service';
5
- import { NotebookKernelQuickPickService } from '../service/notebook-kernel-quick-pick-service';
6
- import { NotebookExecutionService } from '../service/notebook-execution-service';
7
- import { NotebookEditorWidgetService } from '../service/notebook-editor-widget-service';
8
- import { NotebookClipboardService } from '../service/notebook-clipboard-service';
9
- import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
10
- export declare namespace NotebookCommands {
11
- const ADD_NEW_CELL_COMMAND: Command;
12
- const ADD_NEW_MARKDOWN_CELL_COMMAND: Command;
13
- const ADD_NEW_CODE_CELL_COMMAND: Command;
14
- const SELECT_KERNEL_COMMAND: Command;
15
- const EXECUTE_NOTEBOOK_COMMAND: Command;
16
- const CLEAR_ALL_OUTPUTS_COMMAND: Command;
17
- const CHANGE_SELECTED_CELL: Command;
18
- const CUT_SELECTED_CELL: Command;
19
- const COPY_SELECTED_CELL: Command;
20
- const PASTE_CELL: Command;
21
- const NOTEBOOK_FIND: Command;
22
- const CENTER_ACTIVE_CELL: Command;
23
- }
24
- export declare enum CellChangeDirection {
25
- Up = "up",
26
- Down = "down"
27
- }
28
- export declare class NotebookActionsContribution implements CommandContribution, MenuContribution, KeybindingContribution {
29
- protected notebookService: NotebookService;
30
- protected notebookKernelQuickPickService: NotebookKernelQuickPickService;
31
- protected notebookExecutionService: NotebookExecutionService;
32
- protected shell: ApplicationShell;
33
- protected notebookEditorWidgetService: NotebookEditorWidgetService;
34
- protected notebookClipboardService: NotebookClipboardService;
35
- protected contextKeyService: ContextKeyService;
36
- registerCommands(commands: CommandRegistry): void;
37
- protected editableCommandHandler(execute: (notebookModel: NotebookModel) => void): CommandHandler;
38
- protected withModel<T>(item: URI | NotebookModel, execute: (notebookModel: NotebookModel) => T, defaultValue: T): T;
39
- registerMenus(menus: MenuModelRegistry): void;
40
- registerKeybindings(keybindings: KeybindingRegistry): void;
41
- }
42
- export declare namespace NotebookMenus {
43
- const NOTEBOOK_MAIN_TOOLBAR: string[];
44
- const NOTEBOOK_MAIN_TOOLBAR_CELL_ADD_GROUP: string[];
45
- const NOTEBOOK_MAIN_TOOLBAR_EXECUTION_GROUP: string[];
46
- const NOTEBOOK_MAIN_TOOLBAR_HIDDEN_ITEMS_CONTEXT_MENU: string[];
47
- }
48
- //# sourceMappingURL=notebook-actions-contribution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notebook-actions-contribution.d.ts","sourceRoot":"","sources":["../../../src/browser/contributions/notebook-actions-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAO,GAAG,EAAE,MAAM,aAAa,CAAC;AAE3I,OAAO,EAAE,gBAAgB,EAAW,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAChH,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,+CAA+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a,KAAK,IAAI,GAAG,cAAc;IAUjG,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,GAAG,aAAa,EAAE,OAAO,EAAE,CAAC,aAAa,EAAE,aAAa,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC,GAAG,CAAC;IAWnH,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAiC7C,mBAAmB,CAAC,WAAW,EAAE,kBAAkB,GAAG,IAAI;CA0C7D;AAED,yBAAiB,aAAa,CAAC;IACpB,MAAM,qBAAqB,UAA0B,CAAC;IACtD,MAAM,oCAAoC,UAA+C,CAAC;IAC1F,MAAM,qCAAqC,UAAqD,CAAC;IACjG,MAAM,+CAA+C,UAAsD,CAAC;CACtH"}
@@ -1,341 +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.NotebookMenus = exports.NotebookActionsContribution = exports.CellChangeDirection = exports.NotebookCommands = void 0;
19
- const tslib_1 = require("tslib");
20
- const core_1 = require("@theia/core");
21
- const inversify_1 = require("@theia/core/shared/inversify");
22
- const browser_1 = require("@theia/core/lib/browser");
23
- const notebook_service_1 = require("../service/notebook-service");
24
- const common_1 = require("../../common");
25
- const notebook_kernel_quick_pick_service_1 = require("../service/notebook-kernel-quick-pick-service");
26
- const notebook_execution_service_1 = require("../service/notebook-execution-service");
27
- const notebook_editor_widget_service_1 = require("../service/notebook-editor-widget-service");
28
- const notebook_context_keys_1 = require("./notebook-context-keys");
29
- const notebook_clipboard_service_1 = require("../service/notebook-clipboard-service");
30
- const context_key_service_1 = require("@theia/core/lib/browser/context-key-service");
31
- var NotebookCommands;
32
- (function (NotebookCommands) {
33
- NotebookCommands.ADD_NEW_CELL_COMMAND = core_1.Command.toDefaultLocalizedCommand({
34
- id: 'notebook.add-new-cell',
35
- iconClass: (0, browser_1.codicon)('add')
36
- });
37
- NotebookCommands.ADD_NEW_MARKDOWN_CELL_COMMAND = core_1.Command.toDefaultLocalizedCommand({
38
- id: 'notebook.add-new-markdown-cell',
39
- iconClass: (0, browser_1.codicon)('add'),
40
- tooltip: core_1.nls.localizeByDefault('Add Markdown Cell')
41
- });
42
- NotebookCommands.ADD_NEW_CODE_CELL_COMMAND = core_1.Command.toDefaultLocalizedCommand({
43
- id: 'notebook.add-new-code-cell',
44
- iconClass: (0, browser_1.codicon)('add'),
45
- tooltip: core_1.nls.localizeByDefault('Add Code Cell')
46
- });
47
- NotebookCommands.SELECT_KERNEL_COMMAND = core_1.Command.toDefaultLocalizedCommand({
48
- id: 'notebook.selectKernel',
49
- category: 'Notebook',
50
- iconClass: (0, browser_1.codicon)('server-environment')
51
- });
52
- NotebookCommands.EXECUTE_NOTEBOOK_COMMAND = core_1.Command.toDefaultLocalizedCommand({
53
- id: 'notebook.execute',
54
- category: 'Notebook',
55
- iconClass: (0, browser_1.codicon)('run-all')
56
- });
57
- NotebookCommands.CLEAR_ALL_OUTPUTS_COMMAND = core_1.Command.toDefaultLocalizedCommand({
58
- id: 'notebook.clear-all-outputs',
59
- category: 'Notebook',
60
- iconClass: (0, browser_1.codicon)('clear-all')
61
- });
62
- NotebookCommands.CHANGE_SELECTED_CELL = core_1.Command.toDefaultLocalizedCommand({
63
- id: 'notebook.change-selected-cell',
64
- category: 'Notebook',
65
- });
66
- NotebookCommands.CUT_SELECTED_CELL = core_1.Command.toDefaultLocalizedCommand({
67
- id: 'notebook.cell.cut',
68
- category: 'Notebook',
69
- });
70
- NotebookCommands.COPY_SELECTED_CELL = core_1.Command.toDefaultLocalizedCommand({
71
- id: 'notebook.cell.copy',
72
- category: 'Notebook',
73
- });
74
- NotebookCommands.PASTE_CELL = core_1.Command.toDefaultLocalizedCommand({
75
- id: 'notebook.cell.paste',
76
- category: 'Notebook',
77
- });
78
- NotebookCommands.NOTEBOOK_FIND = core_1.Command.toDefaultLocalizedCommand({
79
- id: 'notebook.find',
80
- category: 'Notebook',
81
- });
82
- NotebookCommands.CENTER_ACTIVE_CELL = core_1.Command.toDefaultLocalizedCommand({
83
- id: 'notebook.centerActiveCell',
84
- category: 'Notebook',
85
- });
86
- })(NotebookCommands || (exports.NotebookCommands = NotebookCommands = {}));
87
- var CellChangeDirection;
88
- (function (CellChangeDirection) {
89
- CellChangeDirection["Up"] = "up";
90
- CellChangeDirection["Down"] = "down";
91
- })(CellChangeDirection || (exports.CellChangeDirection = CellChangeDirection = {}));
92
- let NotebookActionsContribution = class NotebookActionsContribution {
93
- registerCommands(commands) {
94
- commands.registerCommand(NotebookCommands.ADD_NEW_CELL_COMMAND, {
95
- execute: (notebookModel, cellKind = common_1.CellKind.Markup, index, focusContainer) => {
96
- var _a, _b;
97
- notebookModel = notebookModel !== null && notebookModel !== void 0 ? notebookModel : (_a = this.notebookEditorWidgetService.focusedEditor) === null || _a === void 0 ? void 0 : _a.model;
98
- let insertIndex = 0;
99
- if (typeof index === 'number' && index >= 0) {
100
- insertIndex = index;
101
- }
102
- else if (notebookModel.selectedCell && typeof index === 'string') {
103
- // if index is -1 insert below otherwise at the index of the selected cell which is above the selected.
104
- insertIndex = notebookModel.cells.indexOf(notebookModel.selectedCell) + (index === 'below' ? 1 : 0);
105
- }
106
- let cellLanguage = 'markdown';
107
- if (cellKind === common_1.CellKind.Code) {
108
- cellLanguage = this.notebookService.getCodeCellLanguage(notebookModel);
109
- }
110
- notebookModel.applyEdits([{
111
- editType: 1 /* CellEditType.Replace */,
112
- index: insertIndex,
113
- count: 0,
114
- cells: [{
115
- cellKind,
116
- language: cellLanguage,
117
- source: '',
118
- outputs: [],
119
- metadata: {},
120
- }]
121
- }], true);
122
- if (focusContainer) {
123
- (_b = notebookModel.selectedCell) === null || _b === void 0 ? void 0 : _b.requestBlurEditor();
124
- }
125
- }
126
- });
127
- commands.registerCommand(NotebookCommands.ADD_NEW_MARKDOWN_CELL_COMMAND, this.editableCommandHandler(notebookModel => commands.executeCommand(NotebookCommands.ADD_NEW_CELL_COMMAND.id, notebookModel, common_1.CellKind.Markup, 'below')));
128
- commands.registerCommand(NotebookCommands.ADD_NEW_CODE_CELL_COMMAND, this.editableCommandHandler(notebookModel => commands.executeCommand(NotebookCommands.ADD_NEW_CELL_COMMAND.id, notebookModel, common_1.CellKind.Code, 'below')));
129
- commands.registerCommand(NotebookCommands.SELECT_KERNEL_COMMAND, this.editableCommandHandler(notebookModel => this.notebookKernelQuickPickService.showQuickPick(notebookModel)));
130
- commands.registerCommand(NotebookCommands.EXECUTE_NOTEBOOK_COMMAND, this.editableCommandHandler(notebookModel => this.notebookExecutionService.executeNotebookCells(notebookModel, notebookModel.cells)));
131
- commands.registerCommand(NotebookCommands.CLEAR_ALL_OUTPUTS_COMMAND, this.editableCommandHandler(notebookModel => notebookModel.applyEdits(notebookModel.cells.map(cell => ({
132
- editType: 2 /* CellEditType.Output */,
133
- handle: cell.handle, deleteCount: cell.outputs.length, outputs: []
134
- })), false)));
135
- commands.registerCommand(NotebookCommands.CHANGE_SELECTED_CELL, {
136
- execute: (change) => {
137
- var _a, _b, _c, _d, _e, _f;
138
- const focusedEditor = this.notebookEditorWidgetService.focusedEditor;
139
- const model = focusedEditor === null || focusedEditor === void 0 ? void 0 : focusedEditor.model;
140
- if (model && typeof change === 'number') {
141
- model.setSelectedCell(model.cells[change]);
142
- }
143
- else if (model && model.selectedCell) {
144
- const currentIndex = model.cells.indexOf(model.selectedCell);
145
- const shouldFocusEditor = this.contextKeyService.match('editorTextFocus');
146
- if (change === CellChangeDirection.Up && currentIndex > 0) {
147
- model.setSelectedCell(model.cells[currentIndex - 1]);
148
- if ((((_a = model.selectedCell) === null || _a === void 0 ? void 0 : _a.cellKind) === common_1.CellKind.Code
149
- || (((_b = model.selectedCell) === null || _b === void 0 ? void 0 : _b.cellKind) === common_1.CellKind.Markup && ((_c = model.selectedCell) === null || _c === void 0 ? void 0 : _c.editing))) && shouldFocusEditor) {
150
- model.selectedCell.requestFocusEditor('lastLine');
151
- }
152
- }
153
- else if (change === CellChangeDirection.Down && currentIndex < model.cells.length - 1) {
154
- model.setSelectedCell(model.cells[currentIndex + 1]);
155
- if ((((_d = model.selectedCell) === null || _d === void 0 ? void 0 : _d.cellKind) === common_1.CellKind.Code
156
- || (((_e = model.selectedCell) === null || _e === void 0 ? void 0 : _e.cellKind) === common_1.CellKind.Markup && ((_f = model.selectedCell) === null || _f === void 0 ? void 0 : _f.editing))) && shouldFocusEditor) {
157
- model.selectedCell.requestFocusEditor();
158
- }
159
- }
160
- if (model.selectedCell.cellKind === common_1.CellKind.Markup) {
161
- // since were losing focus from the cell editor, we need to focus the notebook editor again
162
- focusedEditor === null || focusedEditor === void 0 ? void 0 : focusedEditor.node.focus();
163
- }
164
- }
165
- }
166
- });
167
- commands.registerCommand({ id: 'list.focusUp' }, {
168
- execute: () => commands.executeCommand(NotebookCommands.CHANGE_SELECTED_CELL.id, CellChangeDirection.Up)
169
- });
170
- commands.registerCommand({ id: 'list.focusDown' }, {
171
- execute: () => commands.executeCommand(NotebookCommands.CHANGE_SELECTED_CELL.id, CellChangeDirection.Down)
172
- });
173
- commands.registerCommand(NotebookCommands.CUT_SELECTED_CELL, this.editableCommandHandler(() => {
174
- var _a;
175
- const model = (_a = this.notebookEditorWidgetService.focusedEditor) === null || _a === void 0 ? void 0 : _a.model;
176
- const selectedCell = model === null || model === void 0 ? void 0 : model.selectedCell;
177
- if (selectedCell) {
178
- model.applyEdits([{ editType: 1 /* CellEditType.Replace */, index: model.cells.indexOf(selectedCell), count: 1, cells: [] }], true);
179
- this.notebookClipboardService.copyCell(selectedCell);
180
- }
181
- }));
182
- commands.registerCommand(NotebookCommands.COPY_SELECTED_CELL, {
183
- execute: () => {
184
- var _a;
185
- const model = (_a = this.notebookEditorWidgetService.focusedEditor) === null || _a === void 0 ? void 0 : _a.model;
186
- const selectedCell = model === null || model === void 0 ? void 0 : model.selectedCell;
187
- if (selectedCell) {
188
- this.notebookClipboardService.copyCell(selectedCell);
189
- }
190
- }
191
- });
192
- commands.registerCommand(NotebookCommands.PASTE_CELL, {
193
- isEnabled: () => { var _a, _b; return !Boolean((_b = (_a = this.notebookEditorWidgetService.focusedEditor) === null || _a === void 0 ? void 0 : _a.model) === null || _b === void 0 ? void 0 : _b.readOnly); },
194
- isVisible: () => { var _a, _b; return !Boolean((_b = (_a = this.notebookEditorWidgetService.focusedEditor) === null || _a === void 0 ? void 0 : _a.model) === null || _b === void 0 ? void 0 : _b.readOnly); },
195
- execute: (position) => {
196
- var _a;
197
- const copiedCell = this.notebookClipboardService.getCell();
198
- if (copiedCell) {
199
- const model = (_a = this.notebookEditorWidgetService.focusedEditor) === null || _a === void 0 ? void 0 : _a.model;
200
- const insertIndex = (model === null || model === void 0 ? void 0 : model.selectedCell) ? model.cells.indexOf(model.selectedCell) + (position === 'above' ? 0 : 1) : 0;
201
- model === null || model === void 0 ? void 0 : model.applyEdits([{ editType: 1 /* CellEditType.Replace */, index: insertIndex, count: 0, cells: [copiedCell] }], true);
202
- }
203
- }
204
- });
205
- commands.registerCommand(NotebookCommands.NOTEBOOK_FIND, {
206
- execute: () => {
207
- var _a;
208
- (_a = this.notebookEditorWidgetService.focusedEditor) === null || _a === void 0 ? void 0 : _a.showFindWidget();
209
- }
210
- });
211
- commands.registerCommand(NotebookCommands.CENTER_ACTIVE_CELL, {
212
- execute: (editor) => {
213
- var _a, _b;
214
- const model = editor ? editor.model : (_a = this.notebookEditorWidgetService.focusedEditor) === null || _a === void 0 ? void 0 : _a.model;
215
- (_b = model === null || model === void 0 ? void 0 : model.selectedCell) === null || _b === void 0 ? void 0 : _b.requestCenterEditor();
216
- }
217
- });
218
- }
219
- editableCommandHandler(execute) {
220
- return {
221
- isEnabled: (item) => this.withModel(item, model => !Boolean(model === null || model === void 0 ? void 0 : model.readOnly), false),
222
- isVisible: (item) => this.withModel(item, model => !Boolean(model === null || model === void 0 ? void 0 : model.readOnly), false),
223
- execute: (uri) => {
224
- this.withModel(uri, execute, undefined);
225
- }
226
- };
227
- }
228
- withModel(item, execute, defaultValue) {
229
- if (item instanceof core_1.URI) {
230
- const model = this.notebookService.getNotebookEditorModel(item);
231
- if (!model) {
232
- return defaultValue;
233
- }
234
- item = model;
235
- }
236
- return execute(item);
237
- }
238
- registerMenus(menus) {
239
- // independent submenu for plugins to add commands
240
- menus.registerSubmenu(NotebookMenus.NOTEBOOK_MAIN_TOOLBAR, 'Notebook Main Toolbar');
241
- // Add Notebook Cell items
242
- menus.registerMenuAction(NotebookMenus.NOTEBOOK_MAIN_TOOLBAR_CELL_ADD_GROUP, {
243
- commandId: NotebookCommands.ADD_NEW_CODE_CELL_COMMAND.id,
244
- label: core_1.nls.localizeByDefault('Code'),
245
- icon: (0, browser_1.codicon)('add'),
246
- });
247
- menus.registerMenuAction(NotebookMenus.NOTEBOOK_MAIN_TOOLBAR_CELL_ADD_GROUP, {
248
- commandId: NotebookCommands.ADD_NEW_MARKDOWN_CELL_COMMAND.id,
249
- label: core_1.nls.localizeByDefault('Markdown'),
250
- icon: (0, browser_1.codicon)('add'),
251
- });
252
- // Execution related items
253
- menus.registerMenuAction(NotebookMenus.NOTEBOOK_MAIN_TOOLBAR_EXECUTION_GROUP, {
254
- commandId: NotebookCommands.EXECUTE_NOTEBOOK_COMMAND.id,
255
- label: core_1.nls.localizeByDefault('Run All'),
256
- icon: (0, browser_1.codicon)('run-all'),
257
- order: '10'
258
- });
259
- menus.registerMenuAction(NotebookMenus.NOTEBOOK_MAIN_TOOLBAR_EXECUTION_GROUP, {
260
- commandId: NotebookCommands.CLEAR_ALL_OUTPUTS_COMMAND.id,
261
- label: core_1.nls.localizeByDefault('Clear All Outputs'),
262
- icon: (0, browser_1.codicon)('clear-all'),
263
- order: '30',
264
- when: notebook_context_keys_1.NOTEBOOK_HAS_OUTPUTS
265
- });
266
- menus.registerSubmenu(NotebookMenus.NOTEBOOK_MAIN_TOOLBAR_HIDDEN_ITEMS_CONTEXT_MENU, '');
267
- }
268
- registerKeybindings(keybindings) {
269
- keybindings.registerKeybindings({
270
- command: NotebookCommands.CHANGE_SELECTED_CELL.id,
271
- keybinding: 'up',
272
- args: CellChangeDirection.Up,
273
- when: `(!editorTextFocus || ${notebook_context_keys_1.NOTEBOOK_CELL_CURSOR_FIRST_LINE}) && !suggestWidgetVisible && ${notebook_context_keys_1.NOTEBOOK_EDITOR_FOCUSED} && ${notebook_context_keys_1.NOTEBOOK_CELL_FOCUSED}`
274
- }, {
275
- command: NotebookCommands.CHANGE_SELECTED_CELL.id,
276
- keybinding: 'down',
277
- args: CellChangeDirection.Down,
278
- when: `(!editorTextFocus || ${notebook_context_keys_1.NOTEBOOK_CELL_CURSOR_LAST_LINE}) && !suggestWidgetVisible && ${notebook_context_keys_1.NOTEBOOK_EDITOR_FOCUSED} && ${notebook_context_keys_1.NOTEBOOK_CELL_FOCUSED}`
279
- }, {
280
- command: NotebookCommands.CUT_SELECTED_CELL.id,
281
- keybinding: 'ctrlcmd+x',
282
- when: `${notebook_context_keys_1.NOTEBOOK_EDITOR_FOCUSED} && !inputFocus && !${notebook_context_keys_1.NOTEBOOK_OUTPUT_FOCUSED}`
283
- }, {
284
- command: NotebookCommands.COPY_SELECTED_CELL.id,
285
- keybinding: 'ctrlcmd+c',
286
- when: `${notebook_context_keys_1.NOTEBOOK_EDITOR_FOCUSED} && !inputFocus && !${notebook_context_keys_1.NOTEBOOK_OUTPUT_FOCUSED}`
287
- }, {
288
- command: NotebookCommands.PASTE_CELL.id,
289
- keybinding: 'ctrlcmd+v',
290
- when: `${notebook_context_keys_1.NOTEBOOK_EDITOR_FOCUSED} && !inputFocus && !${notebook_context_keys_1.NOTEBOOK_OUTPUT_FOCUSED}`
291
- }, {
292
- command: NotebookCommands.NOTEBOOK_FIND.id,
293
- keybinding: 'ctrlcmd+f',
294
- when: `${notebook_context_keys_1.NOTEBOOK_EDITOR_FOCUSED}`
295
- }, {
296
- command: NotebookCommands.CENTER_ACTIVE_CELL.id,
297
- keybinding: 'ctrlcmd+l',
298
- when: `${notebook_context_keys_1.NOTEBOOK_EDITOR_FOCUSED}`
299
- });
300
- }
301
- };
302
- exports.NotebookActionsContribution = NotebookActionsContribution;
303
- tslib_1.__decorate([
304
- (0, inversify_1.inject)(notebook_service_1.NotebookService),
305
- tslib_1.__metadata("design:type", notebook_service_1.NotebookService)
306
- ], NotebookActionsContribution.prototype, "notebookService", void 0);
307
- tslib_1.__decorate([
308
- (0, inversify_1.inject)(notebook_kernel_quick_pick_service_1.NotebookKernelQuickPickService),
309
- tslib_1.__metadata("design:type", notebook_kernel_quick_pick_service_1.NotebookKernelQuickPickService)
310
- ], NotebookActionsContribution.prototype, "notebookKernelQuickPickService", void 0);
311
- tslib_1.__decorate([
312
- (0, inversify_1.inject)(notebook_execution_service_1.NotebookExecutionService),
313
- tslib_1.__metadata("design:type", notebook_execution_service_1.NotebookExecutionService)
314
- ], NotebookActionsContribution.prototype, "notebookExecutionService", void 0);
315
- tslib_1.__decorate([
316
- (0, inversify_1.inject)(browser_1.ApplicationShell),
317
- tslib_1.__metadata("design:type", browser_1.ApplicationShell)
318
- ], NotebookActionsContribution.prototype, "shell", void 0);
319
- tslib_1.__decorate([
320
- (0, inversify_1.inject)(notebook_editor_widget_service_1.NotebookEditorWidgetService),
321
- tslib_1.__metadata("design:type", notebook_editor_widget_service_1.NotebookEditorWidgetService)
322
- ], NotebookActionsContribution.prototype, "notebookEditorWidgetService", void 0);
323
- tslib_1.__decorate([
324
- (0, inversify_1.inject)(notebook_clipboard_service_1.NotebookClipboardService),
325
- tslib_1.__metadata("design:type", notebook_clipboard_service_1.NotebookClipboardService)
326
- ], NotebookActionsContribution.prototype, "notebookClipboardService", void 0);
327
- tslib_1.__decorate([
328
- (0, inversify_1.inject)(context_key_service_1.ContextKeyService),
329
- tslib_1.__metadata("design:type", Object)
330
- ], NotebookActionsContribution.prototype, "contextKeyService", void 0);
331
- exports.NotebookActionsContribution = NotebookActionsContribution = tslib_1.__decorate([
332
- (0, inversify_1.injectable)()
333
- ], NotebookActionsContribution);
334
- var NotebookMenus;
335
- (function (NotebookMenus) {
336
- NotebookMenus.NOTEBOOK_MAIN_TOOLBAR = ['notebook', 'toolbar'];
337
- NotebookMenus.NOTEBOOK_MAIN_TOOLBAR_CELL_ADD_GROUP = [...NotebookMenus.NOTEBOOK_MAIN_TOOLBAR, 'cell-add-group'];
338
- NotebookMenus.NOTEBOOK_MAIN_TOOLBAR_EXECUTION_GROUP = [...NotebookMenus.NOTEBOOK_MAIN_TOOLBAR, 'cell-execution-group'];
339
- NotebookMenus.NOTEBOOK_MAIN_TOOLBAR_HIDDEN_ITEMS_CONTEXT_MENU = ['notebook-main-toolbar-hidden-items-context-menu'];
340
- })(NotebookMenus || (exports.NotebookMenus = NotebookMenus = {}));
341
- //# sourceMappingURL=notebook-actions-contribution.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notebook-actions-contribution.js","sourceRoot":"","sources":["../../../src/browser/contributions/notebook-actions-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;;;;AAEhF,sCAA2I;AAC3I,4DAAkE;AAClE,qDAAgH;AAEhH,kEAA8D;AAC9D,yCAAuE;AACvE,sGAA+F;AAC/F,sFAAi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