@@ -54,81 +54,102 @@ const jupyterCommands = set([
54
54
"compute_server" ,
55
55
] ) ;
56
56
57
- export const EDITOR_SPEC = {
58
- jupyter_cell_notebook : {
59
- short : "Jupyter" ,
60
- name : "Jupyter Notebook" ,
61
- icon : "ipynb" ,
62
- component : CellNotebook ,
63
- commands : jupyterCommands ,
64
- buttons : set ( [
65
- "jupyter-insert-cell" ,
66
- "jupyter-run current cell and select next" ,
67
- "jupyter-interrupt kernel" ,
68
- "jupyter-restart" ,
69
- "jupyter-cell-type" ,
70
- "jupyter-cell-format" ,
71
- "jupyter-cell-toolbar" ,
72
- "jupyter-nbgrader validate" ,
73
- ] ) ,
74
- customizeCommands : {
75
- guide : {
76
- label : "Snippets" ,
77
- icon : SNIPPET_ICON_NAME ,
78
- title : "Open a panel containing code snippets." ,
79
- } ,
80
- shell : {
81
- label : jupyter . editor . console_label ,
82
- icon : "ipynb" ,
83
- title : jupyter . editor . console_title ,
84
- } ,
57
+ const jupyter_cell_notebook : EditorDescription = {
58
+ type : "jupyter" ,
59
+ short : "Jupyter" ,
60
+ name : "Jupyter Notebook" ,
61
+ icon : "ipynb" ,
62
+ component : CellNotebook ,
63
+ commands : jupyterCommands ,
64
+ buttons : set ( [
65
+ "jupyter-insert-cell" ,
66
+ "jupyter-run current cell and select next" ,
67
+ "jupyter-interrupt kernel" ,
68
+ "jupyter-restart" ,
69
+ "jupyter-cell-type" ,
70
+ "jupyter-cell-format" ,
71
+ "jupyter-cell-toolbar" ,
72
+ "jupyter-nbgrader validate" ,
73
+ ] ) ,
74
+ customizeCommands : {
75
+ guide : {
76
+ label : "Snippets" ,
77
+ icon : SNIPPET_ICON_NAME ,
78
+ title : "Open a panel containing code snippets." ,
79
+ } ,
80
+ shell : {
81
+ label : jupyter . editor . console_label ,
82
+ icon : "ipynb" ,
83
+ title : jupyter . editor . console_title ,
85
84
} ,
86
- } as EditorDescription ,
87
- commands_guide : {
88
- short : labels . snippets ,
89
- name : labels . snippets ,
90
- icon : SNIPPET_ICON_NAME ,
91
- component : JupyterSnippets ,
92
- commands : set ( [ "decrease_font_size" , "increase_font_size" ] ) ,
93
- } as EditorDescription ,
94
- jupyter_slideshow_revealjs : {
95
- short : "Slideshow" ,
96
- name : "Slideshow (Reveal.js)" ,
97
- icon : "slides" ,
98
- component : Slideshow ,
99
- commands : set ( [ "build" ] ) ,
100
- } as EditorDescription ,
101
- jupyter_table_of_contents : {
102
- short : editor . table_of_contents_short ,
103
- name : editor . table_of_contents_name ,
104
- icon : "align-right" ,
105
- component : TableOfContents ,
106
- commands : set ( [ "decrease_font_size" , "increase_font_size" ] ) ,
107
- } as EditorDescription ,
108
- introspect : {
109
- short : "Introspect" ,
110
- name : "Introspection" ,
111
- icon : "info" ,
112
- component : Introspect ,
113
- commands : set ( [ "decrease_font_size" , "increase_font_size" ] ) ,
114
- } as EditorDescription ,
85
+ } ,
86
+ } as const ;
87
+
88
+ const commands_guide : EditorDescription = {
89
+ type : "snippets" ,
90
+ short : labels . snippets ,
91
+ name : labels . snippets ,
92
+ icon : SNIPPET_ICON_NAME ,
93
+ component : JupyterSnippets ,
94
+ commands : set ( [ "decrease_font_size" , "increase_font_size" ] ) ,
95
+ } as const ;
96
+
97
+ const jupyter_slideshow_revealjs : EditorDescription = {
98
+ type : "slideshow-revealjs" ,
99
+ short : "Slideshow" ,
100
+ name : "Slideshow (Reveal.js)" ,
101
+ icon : "slides" ,
102
+ component : Slideshow ,
103
+ commands : set ( [ "build" ] ) ,
104
+ } as const ;
105
+
106
+ const jupyter_table_of_contents : EditorDescription = {
107
+ type : "jupyter-toc" ,
108
+ short : editor . table_of_contents_short ,
109
+ name : editor . table_of_contents_name ,
110
+ icon : "align-right" ,
111
+ component : TableOfContents ,
112
+ commands : set ( [ "decrease_font_size" , "increase_font_size" ] ) ,
113
+ } as const ;
114
+
115
+ const introspect : EditorDescription = {
116
+ type : "introspect" ,
117
+ short : "Introspect" ,
118
+ name : "Introspection" ,
119
+ icon : "info" ,
120
+ component : Introspect ,
121
+ commands : set ( [ "decrease_font_size" , "increase_font_size" ] ) ,
122
+ } as const ;
123
+
124
+ const jupyter_json : EditorDescription = {
125
+ type : "jupyter_json_view" ,
126
+ short : "JSON view" ,
127
+ name : "Raw JSON viewer" ,
128
+ icon : "js-square" ,
129
+ component : JSONIPynb ,
130
+ commands : set ( [ "decrease_font_size" , "increase_font_size" ] ) ,
131
+ } as const ;
132
+
133
+ const jupyter_raw : EditorDescription = {
134
+ type : "jupyter_json_edit" ,
135
+ short : "JSON edit" ,
136
+ name : "Raw JSON editor" ,
137
+ icon : "markdown" ,
138
+ component : RawIPynb ,
139
+ commands : set ( [ "decrease_font_size" , "increase_font_size" ] ) ,
140
+ } as const ;
141
+
142
+ export const EDITOR_SPEC = {
143
+ jupyter_cell_notebook,
144
+ commands_guide,
145
+ jupyter_slideshow_revealjs,
146
+ jupyter_table_of_contents,
147
+ introspect,
115
148
terminal,
116
149
time_travel,
117
- jupyter_json : {
118
- short : "JSON view" ,
119
- name : "Raw JSON viewer" ,
120
- icon : "js-square" ,
121
- component : JSONIPynb ,
122
- commands : set ( [ "decrease_font_size" , "increase_font_size" ] ) ,
123
- } as EditorDescription ,
124
- jupyter_raw : {
125
- short : "JSON edit" ,
126
- name : "Raw JSON editor" ,
127
- icon : "markdown" ,
128
- component : RawIPynb ,
129
- commands : set ( [ "decrease_font_size" , "increase_font_size" ] ) ,
130
- } as EditorDescription ,
131
- } ;
150
+ jupyter_json,
151
+ jupyter_raw,
152
+ } as const ;
132
153
133
154
const JUPYTER_MENUS = {
134
155
file : {
0 commit comments