@theia/notebook 1.53.1 → 1.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/contributions/notebook-actions-contribution.d.ts.map +1 -1
- package/lib/browser/contributions/notebook-actions-contribution.js +5 -2
- package/lib/browser/contributions/notebook-actions-contribution.js.map +1 -1
- package/lib/browser/contributions/notebook-cell-actions-contribution.js +5 -5
- package/lib/browser/contributions/notebook-cell-actions-contribution.js.map +1 -1
- package/lib/browser/index.d.ts +1 -0
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +1 -0
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/notebook-editor-widget.js +1 -1
- package/lib/browser/notebook-editor-widget.js.map +1 -1
- package/lib/browser/notebook-frontend-module.d.ts.map +1 -1
- package/lib/browser/notebook-frontend-module.js +2 -0
- package/lib/browser/notebook-frontend-module.js.map +1 -1
- package/lib/browser/notebook-open-handler.d.ts +3 -2
- package/lib/browser/notebook-open-handler.d.ts.map +1 -1
- package/lib/browser/notebook-open-handler.js +12 -5
- package/lib/browser/notebook-open-handler.js.map +1 -1
- package/lib/browser/service/notebook-cell-editor-service.d.ts +16 -0
- package/lib/browser/service/notebook-cell-editor-service.d.ts.map +1 -0
- package/lib/browser/service/notebook-cell-editor-service.js +53 -0
- package/lib/browser/service/notebook-cell-editor-service.js.map +1 -0
- package/lib/browser/view/notebook-cell-editor.d.ts +2 -0
- package/lib/browser/view/notebook-cell-editor.d.ts.map +1 -1
- package/lib/browser/view/notebook-cell-editor.js +12 -1
- package/lib/browser/view/notebook-cell-editor.js.map +1 -1
- package/lib/browser/view/notebook-code-cell-view.d.ts +2 -0
- package/lib/browser/view/notebook-code-cell-view.d.ts.map +1 -1
- package/lib/browser/view/notebook-code-cell-view.js +6 -1
- package/lib/browser/view/notebook-code-cell-view.js.map +1 -1
- package/lib/browser/view/notebook-markdown-cell-view.d.ts +2 -0
- package/lib/browser/view/notebook-markdown-cell-view.d.ts.map +1 -1
- package/lib/browser/view/notebook-markdown-cell-view.js +8 -3
- package/lib/browser/view/notebook-markdown-cell-view.js.map +1 -1
- package/package.json +8 -8
- package/src/browser/contributions/notebook-actions-contribution.ts +4 -1
- package/src/browser/contributions/notebook-cell-actions-contribution.ts +6 -6
- package/src/browser/index.ts +1 -0
- package/src/browser/notebook-editor-widget.tsx +1 -1
- package/src/browser/notebook-frontend-module.ts +2 -0
- package/src/browser/notebook-open-handler.ts +13 -7
- package/src/browser/service/notebook-cell-editor-service.ts +56 -0
- package/src/browser/style/index.css +6 -1
- package/src/browser/view/notebook-cell-editor.tsx +18 -5
- package/src/browser/view/notebook-code-cell-view.tsx +5 -0
- package/src/browser/view/notebook-markdown-cell-view.tsx +9 -2
|
@@ -29,6 +29,7 @@ import { NotebookOptionsService } from '../service/notebook-options';
|
|
|
29
29
|
import { NotebookCodeCellStatus } from './notebook-code-cell-view';
|
|
30
30
|
import { NotebookEditorFindMatch, NotebookEditorFindMatchOptions } from './notebook-find-widget';
|
|
31
31
|
import * as mark from 'advanced-mark.js';
|
|
32
|
+
import { NotebookCellEditorService } from '../service/notebook-cell-editor-service';
|
|
32
33
|
|
|
33
34
|
@injectable()
|
|
34
35
|
export class NotebookMarkdownCellRenderer implements CellRenderer {
|
|
@@ -47,6 +48,9 @@ export class NotebookMarkdownCellRenderer implements CellRenderer {
|
|
|
47
48
|
@inject(NotebookOptionsService)
|
|
48
49
|
protected readonly notebookOptionsService: NotebookOptionsService;
|
|
49
50
|
|
|
51
|
+
@inject(NotebookCellEditorService)
|
|
52
|
+
protected readonly notebookCellEditorService: NotebookCellEditorService;
|
|
53
|
+
|
|
50
54
|
render(notebookModel: NotebookModel, cell: NotebookCellModel): React.ReactNode {
|
|
51
55
|
return <MarkdownCell
|
|
52
56
|
markdownRenderer={this.markdownRenderer}
|
|
@@ -55,7 +59,8 @@ export class NotebookMarkdownCellRenderer implements CellRenderer {
|
|
|
55
59
|
notebookOptionsService={this.notebookOptionsService}
|
|
56
60
|
cell={cell}
|
|
57
61
|
notebookModel={notebookModel}
|
|
58
|
-
notebookContextManager={this.notebookContextManager}
|
|
62
|
+
notebookContextManager={this.notebookContextManager}
|
|
63
|
+
notebookCellEditorService={this.notebookCellEditorService} />;
|
|
59
64
|
}
|
|
60
65
|
|
|
61
66
|
renderDragImage(cell: NotebookCellModel): HTMLElement {
|
|
@@ -77,10 +82,11 @@ interface MarkdownCellProps {
|
|
|
77
82
|
notebookModel: NotebookModel;
|
|
78
83
|
notebookContextManager: NotebookContextManager;
|
|
79
84
|
notebookOptionsService: NotebookOptionsService;
|
|
85
|
+
notebookCellEditorService: NotebookCellEditorService
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
function MarkdownCell({
|
|
83
|
-
markdownRenderer, monacoServices, cell, notebookModel, notebookContextManager, notebookOptionsService, commandRegistry
|
|
89
|
+
markdownRenderer, monacoServices, cell, notebookModel, notebookContextManager, notebookOptionsService, commandRegistry, notebookCellEditorService
|
|
84
90
|
}: MarkdownCellProps): React.JSX.Element {
|
|
85
91
|
const [editMode, setEditMode] = React.useState(cell.editing);
|
|
86
92
|
let empty = false;
|
|
@@ -133,6 +139,7 @@ function MarkdownCell({
|
|
|
133
139
|
<CellEditor notebookModel={notebookModel} cell={cell}
|
|
134
140
|
monacoServices={monacoServices}
|
|
135
141
|
notebookContextManager={notebookContextManager}
|
|
142
|
+
notebookCellEditorService={notebookCellEditorService}
|
|
136
143
|
fontInfo={notebookOptionsService.editorFontInfo} />
|
|
137
144
|
<NotebookCodeCellStatus cell={cell} notebook={notebookModel}
|
|
138
145
|
commandRegistry={commandRegistry}
|