@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
@@ -1,13 +0,0 @@
1
- import { BinaryBuffer } from '@theia/core/lib/common/buffer';
2
- /**
3
- * Given a stream of individual stdout outputs, this function will return the compressed lines, escaping some of the common terminal escape codes.
4
- * E.g. some terminal escape codes would result in the previous line getting cleared, such if we had 3 lines and
5
- * last line contained such a code, then the result string would be just the first two lines.
6
- * @returns a single VSBuffer with the concatenated and compressed data, and whether any compression was done.
7
- */
8
- export declare function compressOutputItemStreams(outputs: Uint8Array[]): {
9
- data: BinaryBuffer;
10
- didCompression: boolean;
11
- };
12
- export declare const MOVE_CURSOR_1_LINE_COMMAND: string;
13
- //# sourceMappingURL=notebook-output-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notebook-output-utils.d.ts","sourceRoot":"","sources":["../../src/browser/notebook-output-utils.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAI7D;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,cAAc,EAAE,OAAO,CAAA;CAAE,CAiBhH;AAED,eAAO,MAAM,0BAA0B,QAAiC,CAAC"}
@@ -1,112 +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
- /*---------------------------------------------------------------------------------------------
18
- * Copyright (c) Microsoft Corporation. All rights reserved.
19
- * Licensed under the MIT License. See License.txt in the project root for license information.
20
- * Copied from commit 18b2c92451b076943e5b508380e0eba66ba7d934 from file src\vs\workbench\contrib\notebook\common\notebookCommon.ts
21
- *--------------------------------------------------------------------------------------------*/
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.MOVE_CURSOR_1_LINE_COMMAND = exports.compressOutputItemStreams = void 0;
24
- const buffer_1 = require("@theia/core/lib/common/buffer");
25
- const textDecoder = new TextDecoder();
26
- /**
27
- * Given a stream of individual stdout outputs, this function will return the compressed lines, escaping some of the common terminal escape codes.
28
- * E.g. some terminal escape codes would result in the previous line getting cleared, such if we had 3 lines and
29
- * last line contained such a code, then the result string would be just the first two lines.
30
- * @returns a single VSBuffer with the concatenated and compressed data, and whether any compression was done.
31
- */
32
- function compressOutputItemStreams(outputs) {
33
- const buffers = [];
34
- let startAppending = false;
35
- // Pick the first set of outputs with the same mime type.
36
- for (const output of outputs) {
37
- if ((buffers.length === 0 || startAppending)) {
38
- buffers.push(output);
39
- startAppending = true;
40
- }
41
- }
42
- let didCompression = compressStreamBuffer(buffers);
43
- const concatenated = buffer_1.BinaryBuffer.concat(buffers.map(buffer => buffer_1.BinaryBuffer.wrap(buffer)));
44
- const data = formatStreamText(concatenated);
45
- didCompression = didCompression || data.byteLength !== concatenated.byteLength;
46
- return { data, didCompression };
47
- }
48
- exports.compressOutputItemStreams = compressOutputItemStreams;
49
- exports.MOVE_CURSOR_1_LINE_COMMAND = `${String.fromCharCode(27)}[A`;
50
- const MOVE_CURSOR_1_LINE_COMMAND_BYTES = exports.MOVE_CURSOR_1_LINE_COMMAND.split('').map(c => c.charCodeAt(0));
51
- const LINE_FEED = 10;
52
- function compressStreamBuffer(streams) {
53
- let didCompress = false;
54
- streams.forEach((stream, index) => {
55
- if (index === 0 || stream.length < exports.MOVE_CURSOR_1_LINE_COMMAND.length) {
56
- return;
57
- }
58
- const previousStream = streams[index - 1];
59
- // Remove the previous line if required.
60
- const command = stream.subarray(0, exports.MOVE_CURSOR_1_LINE_COMMAND.length);
61
- if (command[0] === MOVE_CURSOR_1_LINE_COMMAND_BYTES[0] && command[1] === MOVE_CURSOR_1_LINE_COMMAND_BYTES[1] && command[2] === MOVE_CURSOR_1_LINE_COMMAND_BYTES[2]) {
62
- const lastIndexOfLineFeed = previousStream.lastIndexOf(LINE_FEED);
63
- if (lastIndexOfLineFeed === -1) {
64
- return;
65
- }
66
- didCompress = true;
67
- streams[index - 1] = previousStream.subarray(0, lastIndexOfLineFeed);
68
- streams[index] = stream.subarray(exports.MOVE_CURSOR_1_LINE_COMMAND.length);
69
- }
70
- });
71
- return didCompress;
72
- }
73
- const BACKSPACE_CHARACTER = '\b'.charCodeAt(0);
74
- const CARRIAGE_RETURN_CHARACTER = '\r'.charCodeAt(0);
75
- function formatStreamText(buffer) {
76
- // We have special handling for backspace and carriage return characters.
77
- // Don't unnecessary decode the bytes if we don't need to perform any processing.
78
- if (!buffer.buffer.includes(BACKSPACE_CHARACTER) && !buffer.buffer.includes(CARRIAGE_RETURN_CHARACTER)) {
79
- return buffer;
80
- }
81
- // Do the same thing jupyter is doing
82
- return buffer_1.BinaryBuffer.fromString(fixCarriageReturn(fixBackspace(textDecoder.decode(buffer.buffer))));
83
- }
84
- /**
85
- * Took this from jupyter/notebook
86
- * https://github.com/jupyter/notebook/blob/b8b66332e2023e83d2ee04f83d8814f567e01a4e/notebook/static/base/js/utils.js
87
- * Remove characters that are overridden by backspace characters
88
- */
89
- function fixBackspace(txt) {
90
- let tmp = txt;
91
- do {
92
- txt = tmp;
93
- // Cancel out anything-but-newline followed by backspace
94
- tmp = txt.replace(/[^\n]\x08/gm, '');
95
- } while (tmp.length < txt.length);
96
- return txt;
97
- }
98
- /**
99
- * Remove chunks that should be overridden by the effect of carriage return characters
100
- * From https://github.com/jupyter/notebook/blob/master/notebook/static/base/js/utils.js
101
- */
102
- function fixCarriageReturn(txt) {
103
- txt = txt.replace(/\r+\n/gm, '\n'); // \r followed by \n --> newline
104
- while (txt.search(/\r[^$]/g) > -1) {
105
- const base = txt.match(/^(.*)\r+/m)[1];
106
- let insert = txt.match(/\r+(.*)$/m)[1];
107
- insert = insert + base.slice(insert.length, base.length);
108
- txt = txt.replace(/\r+.*$/m, '\r').replace(/^.*\r/m, insert);
109
- }
110
- return txt;
111
- }
112
- //# sourceMappingURL=notebook-output-utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notebook-output-utils.js","sourceRoot":"","sources":["../../src/browser/noteb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CAAC;QACxC,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACzD,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC"}
@@ -1,25 +0,0 @@
1
- import { Disposable } from '@theia/core';
2
- import { NotebookRendererDescriptor } from '../common/notebook-protocol';
3
- export interface NotebookRendererInfo {
4
- readonly id: string;
5
- readonly displayName: string;
6
- readonly mimeTypes: string[];
7
- readonly entrypoint: {
8
- readonly extends?: string;
9
- readonly uri: string;
10
- };
11
- readonly requiresMessaging: boolean;
12
- }
13
- export interface NotebookPreloadInfo {
14
- readonly type: string;
15
- readonly entrypoint: string;
16
- }
17
- export declare class NotebookRendererRegistry {
18
- private readonly _notebookRenderers;
19
- get notebookRenderers(): readonly NotebookRendererInfo[];
20
- private readonly _staticNotebookPreloads;
21
- get staticNotebookPreloads(): readonly NotebookPreloadInfo[];
22
- registerNotebookRenderer(type: NotebookRendererDescriptor, basePath: string): Disposable;
23
- registerStaticNotebookPreload(type: string, entrypoint: string, basePath: string): Disposable;
24
- }
25
- //# sourceMappingURL=notebook-renderer-registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notebook-renderer-registry.d.ts","sourceRoot":"","sources":["../../src/browser/notebook-renderer-registry.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,UAAU,EAAQ,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAEzE,MAAM,WAAW,oBAAoB;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE;QAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACzE,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;CACvC;AAED,MAAM,WAAW,mBAAmB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC/B;AAED,qBACa,wBAAwB;IAEjC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA8B;IAEjE,IAAI,iBAAiB,IAAI,SAAS,oBAAoB,EAAE,CAEvD;IAED,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAA6B;IAErE,IAAI,sBAAsB,IAAI,SAAS,mBAAmB,EAAE,CAE3D;IAED,wBAAwB,CAAC,IAAI,EAAE,0BAA0B,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU;IAwBxF,6BAA6B,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU;CAOhG"}
@@ -1,72 +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
- /*---------------------------------------------------------------------------------------------
18
- * Copyright (c) Microsoft Corporation. All rights reserved.
19
- * Licensed under the MIT License. See License.txt in the project root for license information.
20
- *--------------------------------------------------------------------------------------------*/
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.NotebookRendererRegistry = void 0;
23
- const tslib_1 = require("tslib");
24
- const core_1 = require("@theia/core");
25
- const inversify_1 = require("@theia/core/shared/inversify");
26
- let NotebookRendererRegistry = class NotebookRendererRegistry {
27
- constructor() {
28
- this._notebookRenderers = [];
29
- this._staticNotebookPreloads = [];
30
- }
31
- get notebookRenderers() {
32
- return this._notebookRenderers;
33
- }
34
- get staticNotebookPreloads() {
35
- return this._staticNotebookPreloads;
36
- }
37
- registerNotebookRenderer(type, basePath) {
38
- let entrypoint;
39
- if (typeof type.entrypoint === 'string') {
40
- entrypoint = {
41
- uri: new core_1.Path(basePath).join(type.entrypoint).toString()
42
- };
43
- }
44
- else {
45
- entrypoint = {
46
- uri: new core_1.Path(basePath).join(type.entrypoint.path).toString(),
47
- extends: type.entrypoint.extends
48
- };
49
- }
50
- this._notebookRenderers.push({
51
- ...type,
52
- mimeTypes: type.mimeTypes || [],
53
- requiresMessaging: type.requiresMessaging === 'always' || type.requiresMessaging === 'optional',
54
- entrypoint
55
- });
56
- return core_1.Disposable.create(() => {
57
- this._notebookRenderers.splice(this._notebookRenderers.findIndex(renderer => renderer.id === type.id), 1);
58
- });
59
- }
60
- registerStaticNotebookPreload(type, entrypoint, basePath) {
61
- const staticPreload = { type, entrypoint: new core_1.Path(basePath).join(entrypoint).toString() };
62
- this._staticNotebookPreloads.push(staticPreload);
63
- return core_1.Disposable.create(() => {
64
- this._staticNotebookPreloads.splice(this._staticNotebookPreloads.indexOf(staticPreload), 1);
65
- });
66
- }
67
- };
68
- exports.NotebookRendererRegistry = NotebookRendererRegistry;
69
- exports.NotebookRendererRegistry = NotebookRendererRegistry = tslib_1.__decorate([
70
- (0, inversify_1.injectable)()
71
- ], NotebookRendererRegistry);
72
- //# sourceMappingURL=notebook-renderer-registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notebook-renderer-registry.js","sourceRoot":"","sources":["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KAAK,QAAQ,IAAI,IAAI,CAAC,iBAAiB,KAAK,UAAU;YAC/F,UAAU;SACb,CAAC,CAAC;QACH,OAAO,iBAAU,CAAC,MAAM,CAAC,GAAG,EAAE;YAC1B,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9G,CAAC,CAAC,CAAC;IACP,CAAC;IAED,6BAA6B,CAAC,IAAY,EAAE,UAAkB,EAAE,QAAgB;QAC5E,MAAM,aAAa,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,WAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;QAC3F,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACjD,OAAO,iBAAU,CAAC,MAAM,CAAC,GAAG,EAAE;YAC1B,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC;QAChG,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AA7CY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,sBAAU,GAAE;GACA,wBAAwB,CA6CpC"}
@@ -1,12 +0,0 @@
1
- import { Disposable } from '@theia/core';
2
- import { OpenWithService } from '@theia/core/lib/browser';
3
- import { NotebookTypeDescriptor } from '../common/notebook-protocol';
4
- import { NotebookOpenHandler } from './notebook-open-handler';
5
- export declare class NotebookTypeRegistry {
6
- protected readonly openWithService: OpenWithService;
7
- protected readonly notebookOpenHandler: NotebookOpenHandler;
8
- private readonly _notebookTypes;
9
- get notebookTypes(): readonly NotebookTypeDescriptor[];
10
- registerNotebookType(type: NotebookTypeDescriptor, providerName: string): Disposable;
11
- }
12
- //# sourceMappingURL=notebook-type-registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notebook-type-registry.d.ts","sourceRoot":"","sources":["../../src/browser/notebook-type-registry.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAwB,MAAM,aAAa,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,qBACa,oBAAoB;IAG7B,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAGpD,SAAS,CAAC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAE5D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgC;IAE/D,IAAI,aAAa,IAAI,SAAS,sBAAsB,EAAE,CAErD;IAED,oBAAoB,CAAC,IAAI,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,GAAG,UAAU;CAgBvF"}
@@ -1,60 +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.NotebookTypeRegistry = 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_open_handler_1 = require("./notebook-open-handler");
24
- let NotebookTypeRegistry = class NotebookTypeRegistry {
25
- constructor() {
26
- this._notebookTypes = [];
27
- }
28
- get notebookTypes() {
29
- return this._notebookTypes;
30
- }
31
- registerNotebookType(type, providerName) {
32
- const toDispose = new core_1.DisposableCollection();
33
- toDispose.push(core_1.Disposable.create(() => {
34
- this._notebookTypes.splice(this._notebookTypes.indexOf(type), 1);
35
- }));
36
- this._notebookTypes.push(type);
37
- toDispose.push(this.notebookOpenHandler.registerNotebookType(type));
38
- toDispose.push(this.openWithService.registerHandler({
39
- id: type.type,
40
- label: type.displayName,
41
- providerName,
42
- canHandle: uri => this.notebookOpenHandler.canHandleType(uri, type),
43
- open: uri => this.notebookOpenHandler.open(uri, { notebookType: type.type })
44
- }));
45
- return toDispose;
46
- }
47
- };
48
- exports.NotebookTypeRegistry = NotebookTypeRegistry;
49
- tslib_1.__decorate([
50
- (0, inversify_1.inject)(browser_1.OpenWithService),
51
- tslib_1.__metadata("design:type", browser_1.OpenWithService)
52
- ], NotebookTypeRegistry.prototype, "openWithService", void 0);
53
- tslib_1.__decorate([
54
- (0, inversify_1.inject)(notebook_open_handler_1.NotebookOpenHandler),
55
- tslib_1.__metadata("design:type", notebook_open_handler_1.NotebookOpenHandler)
56
- ], NotebookTypeRegistry.prototype, "notebookOpenHandler", void 0);
57
- exports.NotebookTypeRegistry = NotebookTypeRegistry = tslib_1.__decorate([
58
- (0, inversify_1.injectable)()
59
- ], NotebookTypeRegistry);
60
- //# sourceMappingURL=notebook-type-registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notebook-type-registry.js","sourceRoot":"","sources":["../../src/browser/notebook-type-registry.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E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AA;AA9BY,oDAAoB;AAGV;IADlB,IAAA,kBAAM,EAAC,yBAAe,CAAC;sCACY,yBAAe;6DAAC;AAGjC;IADlB,IAAA,kBAAM,EAAC,2CAAmB,CAAC;sCACY,2CAAmB;iEAAC;+BANnD,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CA8BhC"}
@@ -1,130 +0,0 @@
1
- import { CellData, CellEditType, CellMetadataEdit, CellOutput, CellOutputItem, CellRange, NotebookCellContentChangeEvent, NotebookCellInternalMetadata, NotebookCellMetadata, NotebookCellsChangeInternalMetadataEvent, NotebookCellsChangeLanguageEvent, NotebookCellsChangeMetadataEvent, NotebookCellsChangeType, NotebookCellTextModelSplice, NotebookDocumentMetadata } from '../common';
2
- import { NotebookCell } from './view-model/notebook-cell-model';
3
- export interface NotebookTextModelChangedEvent {
4
- readonly rawEvents: NotebookContentChangedEvent[];
5
- readonly synchronous?: boolean;
6
- readonly endSelectionState?: SelectionState;
7
- }
8
- export type NotebookContentChangedEvent = (NotebookCellsInitializeEvent<NotebookCell> | NotebookDocumentChangeMetadataEvent | NotebookCellContentChangeEvent | NotebookCellsModelChangedEvent<NotebookCell> | NotebookCellsModelMoveEvent<NotebookCell> | NotebookOutputChangedEvent | NotebookOutputItemChangedEvent | NotebookCellsChangeLanguageEvent | NotebookCellsChangeMetadataEvent | NotebookCellsChangeInternalMetadataEvent | NotebookDocumentUnknownChangeEvent);
9
- export interface NotebookCellsInitializeEvent<T> {
10
- readonly kind: NotebookCellsChangeType.Initialize;
11
- readonly changes: NotebookCellTextModelSplice<T>[];
12
- }
13
- export interface NotebookDocumentChangeMetadataEvent {
14
- readonly kind: NotebookCellsChangeType.ChangeDocumentMetadata;
15
- readonly metadata: NotebookDocumentMetadata;
16
- }
17
- export interface NotebookCellsModelChangedEvent<T> {
18
- readonly kind: NotebookCellsChangeType.ModelChange;
19
- readonly changes: NotebookCellTextModelSplice<T>[];
20
- }
21
- export interface NotebookModelWillAddRemoveEvent {
22
- readonly rawEvent: NotebookCellsModelChangedEvent<CellData>;
23
- }
24
- export interface NotebookCellsModelMoveEvent<T> {
25
- readonly kind: NotebookCellsChangeType.Move;
26
- readonly index: number;
27
- readonly length: number;
28
- readonly newIdx: number;
29
- readonly cells: T[];
30
- }
31
- export interface NotebookOutputChangedEvent {
32
- readonly kind: NotebookCellsChangeType.Output;
33
- readonly index: number;
34
- readonly outputs: CellOutput[];
35
- readonly append: boolean;
36
- }
37
- export interface NotebookOutputItemChangedEvent {
38
- readonly kind: NotebookCellsChangeType.OutputItem;
39
- readonly index: number;
40
- readonly outputId: string;
41
- readonly outputItems: CellOutputItem[];
42
- readonly append: boolean;
43
- }
44
- export interface NotebookDocumentUnknownChangeEvent {
45
- readonly kind: NotebookCellsChangeType.Unknown;
46
- }
47
- export declare enum SelectionStateType {
48
- Handle = 0,
49
- Index = 1
50
- }
51
- export interface SelectionHandleState {
52
- kind: SelectionStateType.Handle;
53
- primary: number | null;
54
- selections: number[];
55
- }
56
- export interface SelectionIndexState {
57
- kind: SelectionStateType.Index;
58
- focus: CellRange;
59
- selections: CellRange[];
60
- }
61
- export type SelectionState = SelectionHandleState | SelectionIndexState;
62
- export interface NotebookModelWillAddRemoveEvent {
63
- readonly newCellIds?: number[];
64
- readonly rawEvent: NotebookCellsModelChangedEvent<CellData>;
65
- }
66
- export interface CellOutputEdit {
67
- editType: CellEditType.Output;
68
- index: number;
69
- outputs: CellOutput[];
70
- deleteCount?: number;
71
- append?: boolean;
72
- }
73
- export interface CellOutputEditByHandle {
74
- editType: CellEditType.Output;
75
- handle: number;
76
- outputs: CellOutput[];
77
- deleteCount?: number;
78
- append?: boolean;
79
- }
80
- export interface CellOutputItemEdit {
81
- editType: CellEditType.OutputItems;
82
- items: CellOutputItem[];
83
- outputId: string;
84
- append?: boolean;
85
- }
86
- export interface CellLanguageEdit {
87
- editType: CellEditType.CellLanguage;
88
- index: number;
89
- language: string;
90
- }
91
- export interface DocumentMetadataEdit {
92
- editType: CellEditType.DocumentMetadata;
93
- metadata: NotebookDocumentMetadata;
94
- }
95
- export interface CellMoveEdit {
96
- editType: CellEditType.Move;
97
- index: number;
98
- length: number;
99
- newIdx: number;
100
- }
101
- export interface CellReplaceEdit {
102
- editType: CellEditType.Replace;
103
- index: number;
104
- count: number;
105
- cells: CellData[];
106
- }
107
- export interface CellPartialMetadataEdit {
108
- editType: CellEditType.PartialMetadata;
109
- index: number;
110
- metadata: NullablePartialNotebookCellMetadata;
111
- }
112
- export type ImmediateCellEditOperation = CellOutputEditByHandle | CellOutputItemEdit | CellPartialInternalMetadataEditByHandle;
113
- export type CellEditOperation = ImmediateCellEditOperation | CellReplaceEdit | CellOutputEdit | CellMetadataEdit | CellLanguageEdit | DocumentMetadataEdit | CellMoveEdit | CellPartialMetadataEdit;
114
- export type NullablePartialNotebookCellInternalMetadata = {
115
- [Key in keyof Partial<NotebookCellInternalMetadata>]: NotebookCellInternalMetadata[Key] | null;
116
- };
117
- export type NullablePartialNotebookCellMetadata = {
118
- [Key in keyof Partial<NotebookCellMetadata>]: NotebookCellMetadata[Key] | null;
119
- };
120
- export interface CellPartialInternalMetadataEditByHandle {
121
- editType: CellEditType.PartialInternalMetadata;
122
- handle: number;
123
- internalMetadata: NullablePartialNotebookCellInternalMetadata;
124
- }
125
- export interface NotebookCellOutputsSplice {
126
- start: number;
127
- deleteCount: number;
128
- newOutputs: CellOutput[];
129
- }
130
- //# sourceMappingURL=notebook-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notebook-types.d.ts","sourceRoot":"","sources":["../../src/browser/notebook-types.ts"],"names":[],"mappings":"AAgBA,OAAO,EACH,QAAQ,EAAE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,8BAA8B,EAC/G,4BAA4B,EAC5B,oBAAoB,EACpB,wCAAwC,EACxC,gCAAgC,EAChC,gCAAgC,EAChC,uBAAuB,EAAE,2BAA2B,EAAE,wBAAwB,EACjF,MAAM,WAAW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AAE,QAAQ,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,uBAAuB;IACpC,QAAQ,EAAE,YAAY,CAAC,eAAe,CAAC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,mCAAmC,CAAC;CACjD;AAED,MAAM,MAAM,0BAA0B,GAAG,sBAAsB,GAAG,kBAAkB,GAAG,uCAAuC,CAAC;AAC/H,MAAM,MAAM,iBAAiB,GAAG,0BAA0B,GAAG,eAAe,GAAG,cAAc,GACzF,gBAAgB,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,YAAY,GAAG,uBAAuB,CAAC;AAExG,MAAM,MAAM,2CAA2C,GAAG;KACrD,GAAG,IAAI,MAAM,OAAO,CAAC,4BAA4B,CAAC,GAAG,4BAA4B,CAAC,GAAG,CAAC,GAAG,IAAI;CACjG,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG;KAC7C,GAAG,IAAI,MAAM,OAAO,CAAC,oBAAoB,CAAC,GAAG,oBAAoB,CAAC,GAAG,CAAC,GAAG,IAAI;CACjF,CAAC;AAEF,MAAM,WAAW,uCAAuC;IACpD,QAAQ,EAAE,YAAY,CAAC,uBAAuB,CAAC;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,2CAA2C,CAAC;CACjE;AAED,MAAM,WAAW,yBAAyB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,UAAU,EAAE,CAAC;CAC5B"}
@@ -1,28 +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.SelectionStateType = void 0;
19
- ;
20
- ;
21
- var SelectionStateType;
22
- (function (SelectionStateType) {
23
- SelectionStateType[SelectionStateType["Handle"] = 0] = "Handle";
24
- SelectionStateType[SelectionStateType["Index"] = 1] = "Index";
25
- })(SelectionStateType || (exports.SelectionStateType = SelectionStateType = {}));
26
- ;
27
- ;
28
- //# sourceMappingURL=notebook-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notebook-types.js","sourceRoot":"","sources":["../../src/browser/notebook-types.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;;;AAkB/E,CAAC;AAwBD,CAAC;AA6BF,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,+DAAU,CAAA;IACV,6DAAS,CAAA;AACb,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAmBA,CAAC;AA8ED,CAAC"}
@@ -1,26 +0,0 @@
1
- /// <reference types="react" />
2
- import { Disposable, Event } from '@theia/core';
3
- import { NotebookModel } from '../view-model/notebook-model';
4
- import { NotebookEditorWidget } from '../notebook-editor-widget';
5
- import { NotebookContentChangedEvent } from '../notebook-types';
6
- import { NotebookCellOutputModel } from '../view-model/notebook-cell-output-model';
7
- import { NotebookCellModel } from '../view-model/notebook-cell-model';
8
- export declare const CellOutputWebviewFactory: unique symbol;
9
- export declare const CellOutputWebview: unique symbol;
10
- export type CellOutputWebviewFactory = () => Promise<CellOutputWebview>;
11
- export interface OutputRenderEvent {
12
- cellHandle: number;
13
- outputId: string;
14
- outputHeight: number;
15
- }
16
- export interface CellOutputWebview extends Disposable {
17
- readonly id: string;
18
- init(notebook: NotebookModel, editor: NotebookEditorWidget): void;
19
- render(): React.ReactNode;
20
- setCellHeight(cell: NotebookCellModel, height: number): void;
21
- cellsChanged(cellEvent: NotebookContentChangedEvent[]): void;
22
- onDidRenderOutput: Event<OutputRenderEvent>;
23
- requestOutputPresentationUpdate(cellHandle: number, output: NotebookCellOutputModel): void;
24
- isAttached(): boolean;
25
- }
26
- //# sourceMappingURL=cell-output-webview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cell-output-webview.d.ts","sourceRoot":"","sources":["../../../src/browser/renderers/cell-output-webview.ts"],"names":[],"mappings":";AAgBA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,eAAO,MAAM,wBAAwB,eAAiC,CAAC;AACvE,eAAO,MAAM,iBAAiB,eAA0B,CAAC;AAEzD,MAAM,MAAM,wBAAwB,GAAG,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAExE,MAAM,WAAW,iBAAiB;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IAEjD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAElE,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC;IAE1B,aAAa,CAAC,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7D,YAAY,CAAC,SAAS,EAAE,2BAA2B,EAAE,GAAG,IAAI,CAAC;IAC7D,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAA;IAE3C,+BAA+B,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC3F,UAAU,IAAI,OAAO,CAAA;CACxB"}
@@ -1,21 +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.CellOutputWebview = exports.CellOutputWebviewFactory = void 0;
19
- exports.CellOutputWebviewFactory = Symbol('outputWebviewFactory');
20
- exports.CellOutputWebview = Symbol('outputWebview');
21
- //# sourceMappingURL=cell-output-webview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cell-output-webview.js","sourceRoot":"","sources":["../../../src/browser/renderers/cell-output-webview.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;;;AASnE,QAAA,wBAAwB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAC1D,QAAA,iBAAiB,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC"}
@@ -1,23 +0,0 @@
1
- import { Emitter, URI } from '@theia/core';
2
- import { SimpleMonacoEditor } from '@theia/monaco/lib/browser/simple-monaco-editor';
3
- import { NotebookEditorWidgetService } from './notebook-editor-widget-service';
4
- import { ActiveMonacoEditorContribution, MonacoEditorService } from '@theia/monaco/lib/browser/monaco-editor-service';
5
- import { ICodeEditor } from '@theia/monaco-editor-core/esm/vs/editor/browser/editorBrowser';
6
- export declare class NotebookCellEditorService implements ActiveMonacoEditorContribution {
7
- protected readonly notebookEditorWidgetService: NotebookEditorWidgetService;
8
- protected readonly monacoEditorService: MonacoEditorService;
9
- protected onDidChangeCellEditorsEmitter: Emitter<void>;
10
- readonly onDidChangeCellEditors: import("@theia/core").Event<void>;
11
- protected onDidChangeFocusedCellEditorEmitter: Emitter<SimpleMonacoEditor | undefined>;
12
- readonly onDidChangeFocusedCellEditor: import("@theia/core").Event<SimpleMonacoEditor | undefined>;
13
- protected currentActiveCell?: SimpleMonacoEditor;
14
- protected currentCellEditors: Map<string, SimpleMonacoEditor>;
15
- protected init(): void;
16
- get allCellEditors(): SimpleMonacoEditor[];
17
- editorCreated(uri: URI, editor: SimpleMonacoEditor): void;
18
- editorDisposed(uri: URI): void;
19
- editorFocusChanged(editor?: SimpleMonacoEditor): void;
20
- getActiveCell(): SimpleMonacoEditor | undefined;
21
- getActiveEditor(): ICodeEditor | undefined;
22
- }
23
- //# sourceMappingURL=notebook-cell-editor-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notebook-cell-editor-service.d.ts","sourceRoot":"","sources":["../../../src/browser/service/notebook-cell-editor-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,MAAM,+DAA+D,CAAC;AAE5F,qBACa,yBAA0B,YAAW,8BAA8B;IAG5E,SAAS,CAAC,QAAQ,CAAC,2BAA2B,EAAE,2BAA2B,CAAC;IAG5E,SAAS,CAAC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAE5D,SAAS,CAAC,6BAA6B,gBAAuB;IAC9D,QAAQ,CAAC,sBAAsB,oCAA4C;IAE3E,SAAS,CAAC,mCAAmC,0CAAiD;IAC9F,QAAQ,CAAC,4BAA4B,8DAAkD;IAEvF,SAAS,CAAC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IAEjD,SAAS,CAAC,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAa;IAG1E,SAAS,CAAC,IAAI,IAAI,IAAI;IAYtB,IAAI,cAAc,IAAI,kBAAkB,EAAE,CAEzC;IAED,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,kBAAkB,GAAG,IAAI;IAKzD,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAK9B,kBAAkB,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,IAAI;IAQrD,aAAa,IAAI,kBAAkB,GAAG,SAAS;IAI/C,eAAe,IAAI,WAAW,GAAG,SAAS;CAG7C"}