@theia/notebook 1.53.2 → 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.
Files changed (46) hide show
  1. package/lib/browser/contributions/notebook-actions-contribution.d.ts.map +1 -1
  2. package/lib/browser/contributions/notebook-actions-contribution.js +5 -2
  3. package/lib/browser/contributions/notebook-actions-contribution.js.map +1 -1
  4. package/lib/browser/contributions/notebook-cell-actions-contribution.js +5 -5
  5. package/lib/browser/contributions/notebook-cell-actions-contribution.js.map +1 -1
  6. package/lib/browser/index.d.ts +1 -0
  7. package/lib/browser/index.d.ts.map +1 -1
  8. package/lib/browser/index.js +1 -0
  9. package/lib/browser/index.js.map +1 -1
  10. package/lib/browser/notebook-editor-widget.js +1 -1
  11. package/lib/browser/notebook-editor-widget.js.map +1 -1
  12. package/lib/browser/notebook-frontend-module.d.ts.map +1 -1
  13. package/lib/browser/notebook-frontend-module.js +2 -0
  14. package/lib/browser/notebook-frontend-module.js.map +1 -1
  15. package/lib/browser/notebook-open-handler.d.ts +3 -2
  16. package/lib/browser/notebook-open-handler.d.ts.map +1 -1
  17. package/lib/browser/notebook-open-handler.js +12 -5
  18. package/lib/browser/notebook-open-handler.js.map +1 -1
  19. package/lib/browser/service/notebook-cell-editor-service.d.ts +16 -0
  20. package/lib/browser/service/notebook-cell-editor-service.d.ts.map +1 -0
  21. package/lib/browser/service/notebook-cell-editor-service.js +53 -0
  22. package/lib/browser/service/notebook-cell-editor-service.js.map +1 -0
  23. package/lib/browser/view/notebook-cell-editor.d.ts +2 -0
  24. package/lib/browser/view/notebook-cell-editor.d.ts.map +1 -1
  25. package/lib/browser/view/notebook-cell-editor.js +12 -1
  26. package/lib/browser/view/notebook-cell-editor.js.map +1 -1
  27. package/lib/browser/view/notebook-code-cell-view.d.ts +2 -0
  28. package/lib/browser/view/notebook-code-cell-view.d.ts.map +1 -1
  29. package/lib/browser/view/notebook-code-cell-view.js +6 -1
  30. package/lib/browser/view/notebook-code-cell-view.js.map +1 -1
  31. package/lib/browser/view/notebook-markdown-cell-view.d.ts +2 -0
  32. package/lib/browser/view/notebook-markdown-cell-view.d.ts.map +1 -1
  33. package/lib/browser/view/notebook-markdown-cell-view.js +8 -3
  34. package/lib/browser/view/notebook-markdown-cell-view.js.map +1 -1
  35. package/package.json +8 -8
  36. package/src/browser/contributions/notebook-actions-contribution.ts +4 -1
  37. package/src/browser/contributions/notebook-cell-actions-contribution.ts +6 -6
  38. package/src/browser/index.ts +1 -0
  39. package/src/browser/notebook-editor-widget.tsx +1 -1
  40. package/src/browser/notebook-frontend-module.ts +2 -0
  41. package/src/browser/notebook-open-handler.ts +13 -7
  42. package/src/browser/service/notebook-cell-editor-service.ts +56 -0
  43. package/src/browser/style/index.css +6 -1
  44. package/src/browser/view/notebook-cell-editor.tsx +18 -5
  45. package/src/browser/view/notebook-code-cell-view.tsx +5 -0
  46. 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}