@jupyterlite/repl-extension 0.6.0-alpha.0 → 0.6.0-alpha.1
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/index.js +23 -67
- package/lib/index.js.map +1 -1
- package/package.json +9 -9
- package/src/index.ts +26 -81
package/lib/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
3
|
import { ILabStatus, IRouter, JupyterFrontEnd, Router, } from '@jupyterlab/application';
|
|
4
|
-
import {
|
|
4
|
+
import { IThemeManager, IToolbarWidgetRegistry } from '@jupyterlab/apputils';
|
|
5
5
|
import { IConsoleTracker } from '@jupyterlab/console';
|
|
6
6
|
import { ITranslator } from '@jupyterlab/translation';
|
|
7
|
-
import { clearIcon, refreshIcon, runIcon } from '@jupyterlab/ui-components';
|
|
8
7
|
import { SingleWidgetApp } from '@jupyterlite/application';
|
|
9
8
|
import { liteIcon } from '@jupyterlite/ui-components';
|
|
10
9
|
import { Widget } from '@lumino/widgets';
|
|
@@ -16,75 +15,32 @@ const I18N_BUNDLE = 'jupyterlite';
|
|
|
16
15
|
* A plugin to add buttons to the console toolbar.
|
|
17
16
|
*/
|
|
18
17
|
const buttons = {
|
|
19
|
-
id: '@jupyterlite/
|
|
18
|
+
id: '@jupyterlite/repl-extension:buttons',
|
|
20
19
|
autoStart: true,
|
|
21
20
|
requires: [ITranslator],
|
|
22
|
-
optional: [
|
|
23
|
-
activate: (app, translator,
|
|
24
|
-
if (!tracker) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const { commands } = app;
|
|
21
|
+
optional: [IToolbarWidgetRegistry],
|
|
22
|
+
activate: (app, translator, toolbarRegistry) => {
|
|
28
23
|
const trans = translator.load(I18N_BUNDLE);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return commands.execute('console:restart-kernel');
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
const restartButton = new CommandToolbarButton({
|
|
51
|
-
commands,
|
|
52
|
-
id: restartCommand,
|
|
53
|
-
});
|
|
54
|
-
const clearCommand = 'repl:clear';
|
|
55
|
-
commands.addCommand(clearCommand, {
|
|
56
|
-
caption: trans.__('Clear'),
|
|
57
|
-
icon: clearIcon,
|
|
58
|
-
execute: () => {
|
|
59
|
-
return commands.execute('console:clear');
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
const clearButton = new CommandToolbarButton({
|
|
63
|
-
commands,
|
|
64
|
-
id: clearCommand,
|
|
65
|
-
});
|
|
66
|
-
tracker.widgetAdded.connect((_, console) => {
|
|
67
|
-
const { toolbar } = console;
|
|
68
|
-
console.toolbar.addItem('run', runButton);
|
|
69
|
-
console.toolbar.addItem('restart', restartButton);
|
|
70
|
-
console.toolbar.addItem('clear', clearButton);
|
|
71
|
-
toolbar.addItem('spacer', Toolbar.createSpacerItem());
|
|
72
|
-
const node = document.createElement('a');
|
|
73
|
-
node.title = trans.__('Powered by JupyterLite');
|
|
74
|
-
node.href = 'https://github.com/jupyterlite/jupyterlite';
|
|
75
|
-
node.target = '_blank';
|
|
76
|
-
node.rel = 'noopener noreferrer';
|
|
77
|
-
const poweredBy = new Widget({ node });
|
|
78
|
-
liteIcon.element({
|
|
79
|
-
container: node,
|
|
80
|
-
elementPosition: 'center',
|
|
81
|
-
margin: '2px 2px 2px 8px',
|
|
82
|
-
height: 'auto',
|
|
83
|
-
width: '16px',
|
|
24
|
+
if (toolbarRegistry) {
|
|
25
|
+
const factory = 'ConsolePanel';
|
|
26
|
+
toolbarRegistry.addFactory(factory, 'liteIcon', (panel) => {
|
|
27
|
+
const node = document.createElement('a');
|
|
28
|
+
node.title = trans.__('Powered by JupyterLite');
|
|
29
|
+
node.href = 'https://github.com/jupyterlite/jupyterlite';
|
|
30
|
+
node.target = '_blank';
|
|
31
|
+
node.rel = 'noopener noreferrer';
|
|
32
|
+
const poweredBy = new Widget({ node });
|
|
33
|
+
liteIcon.element({
|
|
34
|
+
container: node,
|
|
35
|
+
elementPosition: 'center',
|
|
36
|
+
margin: '2px',
|
|
37
|
+
height: 'auto',
|
|
38
|
+
width: '16px',
|
|
39
|
+
});
|
|
40
|
+
poweredBy.addClass('jp-PoweredBy');
|
|
41
|
+
return poweredBy;
|
|
84
42
|
});
|
|
85
|
-
|
|
86
|
-
toolbar.insertAfter('spacer', 'powered-by', poweredBy);
|
|
87
|
-
});
|
|
43
|
+
}
|
|
88
44
|
},
|
|
89
45
|
};
|
|
90
46
|
/**
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EACL,UAAU,EACV,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EACL,UAAU,EACV,OAAO,EACP,eAAe,EAEf,MAAM,GACP,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EAAgB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB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console Extension",
|
|
5
5
|
"homepage": "https://github.com/jupyterlite/jupyterlite",
|
|
6
6
|
"bugs": {
|
|
@@ -38,13 +38,12 @@
|
|
|
38
38
|
"watch": "tsc -b --watch"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@jupyterlab/application": "~4.4.0-alpha.
|
|
42
|
-
"@jupyterlab/apputils": "~4.5.0-alpha.
|
|
43
|
-
"@jupyterlab/console": "~4.4.0-alpha.
|
|
44
|
-
"@jupyterlab/translation": "~4.4.0-alpha.
|
|
45
|
-
"@jupyterlab/ui-components": "~4.4.0-alpha.
|
|
46
|
-
"@jupyterlite/application": "^0.6.0-alpha.
|
|
47
|
-
"@jupyterlite/ui-components": "^0.6.0-alpha.0",
|
|
41
|
+
"@jupyterlab/application": "~4.4.0-alpha.3",
|
|
42
|
+
"@jupyterlab/apputils": "~4.5.0-alpha.3",
|
|
43
|
+
"@jupyterlab/console": "~4.4.0-alpha.3",
|
|
44
|
+
"@jupyterlab/translation": "~4.4.0-alpha.3",
|
|
45
|
+
"@jupyterlab/ui-components": "~4.4.0-alpha.3",
|
|
46
|
+
"@jupyterlite/application": "^0.6.0-alpha.1",
|
|
48
47
|
"@lumino/widgets": "^2.5.0"
|
|
49
48
|
},
|
|
50
49
|
"devDependencies": {
|
|
@@ -60,7 +59,8 @@
|
|
|
60
59
|
"access": "public"
|
|
61
60
|
},
|
|
62
61
|
"jupyterlab": {
|
|
63
|
-
"extension": true
|
|
62
|
+
"extension": true,
|
|
63
|
+
"schemaDir": "schema"
|
|
64
64
|
},
|
|
65
65
|
"styleModule": "style/index.js"
|
|
66
66
|
}
|
package/src/index.ts
CHANGED
|
@@ -4,19 +4,17 @@
|
|
|
4
4
|
import {
|
|
5
5
|
ILabStatus,
|
|
6
6
|
IRouter,
|
|
7
|
-
JupyterFrontEndPlugin,
|
|
8
7
|
JupyterFrontEnd,
|
|
8
|
+
JupyterFrontEndPlugin,
|
|
9
9
|
Router,
|
|
10
10
|
} from '@jupyterlab/application';
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import { IThemeManager, IToolbarWidgetRegistry } from '@jupyterlab/apputils';
|
|
13
13
|
|
|
14
|
-
import { IConsoleTracker } from '@jupyterlab/console';
|
|
14
|
+
import { ConsolePanel, IConsoleTracker } from '@jupyterlab/console';
|
|
15
15
|
|
|
16
16
|
import { ITranslator } from '@jupyterlab/translation';
|
|
17
17
|
|
|
18
|
-
import { clearIcon, refreshIcon, runIcon } from '@jupyterlab/ui-components';
|
|
19
|
-
|
|
20
18
|
import { SingleWidgetApp } from '@jupyterlite/application';
|
|
21
19
|
|
|
22
20
|
import { liteIcon } from '@jupyterlite/ui-components';
|
|
@@ -32,91 +30,38 @@ const I18N_BUNDLE = 'jupyterlite';
|
|
|
32
30
|
* A plugin to add buttons to the console toolbar.
|
|
33
31
|
*/
|
|
34
32
|
const buttons: JupyterFrontEndPlugin<void> = {
|
|
35
|
-
id: '@jupyterlite/
|
|
33
|
+
id: '@jupyterlite/repl-extension:buttons',
|
|
36
34
|
autoStart: true,
|
|
37
35
|
requires: [ITranslator],
|
|
38
|
-
optional: [
|
|
36
|
+
optional: [IToolbarWidgetRegistry],
|
|
39
37
|
activate: (
|
|
40
38
|
app: JupyterFrontEnd,
|
|
41
39
|
translator: ITranslator,
|
|
42
|
-
|
|
40
|
+
toolbarRegistry: IToolbarWidgetRegistry | null,
|
|
43
41
|
) => {
|
|
44
|
-
if (!tracker) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const { commands } = app;
|
|
49
42
|
const trans = translator.load(I18N_BUNDLE);
|
|
50
43
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
execute: () => {
|
|
71
|
-
return commands.execute('console:restart-kernel');
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
const restartButton = new CommandToolbarButton({
|
|
76
|
-
commands,
|
|
77
|
-
id: restartCommand,
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
const clearCommand = 'repl:clear';
|
|
81
|
-
commands.addCommand(clearCommand, {
|
|
82
|
-
caption: trans.__('Clear'),
|
|
83
|
-
icon: clearIcon,
|
|
84
|
-
execute: () => {
|
|
85
|
-
return commands.execute('console:clear');
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
const clearButton = new CommandToolbarButton({
|
|
90
|
-
commands,
|
|
91
|
-
id: clearCommand,
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
tracker.widgetAdded.connect((_, console) => {
|
|
95
|
-
const { toolbar } = console;
|
|
96
|
-
|
|
97
|
-
console.toolbar.addItem('run', runButton);
|
|
98
|
-
console.toolbar.addItem('restart', restartButton);
|
|
99
|
-
console.toolbar.addItem('clear', clearButton);
|
|
100
|
-
|
|
101
|
-
toolbar.addItem('spacer', Toolbar.createSpacerItem());
|
|
102
|
-
|
|
103
|
-
const node = document.createElement('a');
|
|
104
|
-
node.title = trans.__('Powered by JupyterLite');
|
|
105
|
-
node.href = 'https://github.com/jupyterlite/jupyterlite';
|
|
106
|
-
node.target = '_blank';
|
|
107
|
-
node.rel = 'noopener noreferrer';
|
|
108
|
-
const poweredBy = new Widget({ node });
|
|
109
|
-
liteIcon.element({
|
|
110
|
-
container: node,
|
|
111
|
-
elementPosition: 'center',
|
|
112
|
-
margin: '2px 2px 2px 8px',
|
|
113
|
-
height: 'auto',
|
|
114
|
-
width: '16px',
|
|
44
|
+
if (toolbarRegistry) {
|
|
45
|
+
const factory = 'ConsolePanel';
|
|
46
|
+
toolbarRegistry.addFactory<ConsolePanel>(factory, 'liteIcon', (panel) => {
|
|
47
|
+
const node = document.createElement('a');
|
|
48
|
+
node.title = trans.__('Powered by JupyterLite');
|
|
49
|
+
node.href = 'https://github.com/jupyterlite/jupyterlite';
|
|
50
|
+
node.target = '_blank';
|
|
51
|
+
node.rel = 'noopener noreferrer';
|
|
52
|
+
const poweredBy = new Widget({ node });
|
|
53
|
+
liteIcon.element({
|
|
54
|
+
container: node,
|
|
55
|
+
elementPosition: 'center',
|
|
56
|
+
margin: '2px',
|
|
57
|
+
height: 'auto',
|
|
58
|
+
width: '16px',
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
poweredBy.addClass('jp-PoweredBy');
|
|
62
|
+
return poweredBy;
|
|
115
63
|
});
|
|
116
|
-
|
|
117
|
-
poweredBy.addClass('jp-PoweredBy');
|
|
118
|
-
toolbar.insertAfter('spacer', 'powered-by', poweredBy);
|
|
119
|
-
});
|
|
64
|
+
}
|
|
120
65
|
},
|
|
121
66
|
};
|
|
122
67
|
|