@jupyter-notebook/help-extension 7.0.0-alpha.15 → 7.0.0-alpha.17
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 +20 -20
- package/package.json +7 -7
package/lib/index.js
CHANGED
|
@@ -11,12 +11,12 @@ import * as React from 'react';
|
|
|
11
11
|
const RESOURCES = [
|
|
12
12
|
{
|
|
13
13
|
text: 'About Jupyter',
|
|
14
|
-
url: 'https://jupyter.org'
|
|
14
|
+
url: 'https://jupyter.org',
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
text: 'Markdown Reference',
|
|
18
|
-
url: 'https://commonmark.org/help/'
|
|
19
|
-
}
|
|
18
|
+
url: 'https://commonmark.org/help/',
|
|
19
|
+
},
|
|
20
20
|
];
|
|
21
21
|
/**
|
|
22
22
|
* The command IDs used by the help plugin.
|
|
@@ -36,13 +36,13 @@ const open = {
|
|
|
36
36
|
activate: (app) => {
|
|
37
37
|
const { commands } = app;
|
|
38
38
|
commands.addCommand(CommandIDs.open, {
|
|
39
|
-
label: args => args['text'],
|
|
40
|
-
execute: args => {
|
|
39
|
+
label: (args) => args['text'],
|
|
40
|
+
execute: (args) => {
|
|
41
41
|
const url = args['url'];
|
|
42
42
|
window.open(url);
|
|
43
|
-
}
|
|
43
|
+
},
|
|
44
44
|
});
|
|
45
|
-
}
|
|
45
|
+
},
|
|
46
46
|
};
|
|
47
47
|
/**
|
|
48
48
|
* Plugin to add a command to show an About Jupyter Notebook and Markdown Reference.
|
|
@@ -81,25 +81,25 @@ const about = {
|
|
|
81
81
|
buttons: [
|
|
82
82
|
Dialog.createButton({
|
|
83
83
|
label: trans.__('Dismiss'),
|
|
84
|
-
className: 'jp-AboutNotebook-about-button jp-mod-reject jp-mod-styled'
|
|
85
|
-
})
|
|
86
|
-
]
|
|
84
|
+
className: 'jp-AboutNotebook-about-button jp-mod-reject jp-mod-styled',
|
|
85
|
+
}),
|
|
86
|
+
],
|
|
87
87
|
});
|
|
88
88
|
dialog.addClass('jp-AboutNotebook');
|
|
89
89
|
void dialog.launch();
|
|
90
|
-
}
|
|
90
|
+
},
|
|
91
91
|
});
|
|
92
92
|
if (palette) {
|
|
93
93
|
palette.addItem({ command: CommandIDs.about, category });
|
|
94
94
|
}
|
|
95
|
-
const resourcesGroup = RESOURCES.map(args => ({
|
|
95
|
+
const resourcesGroup = RESOURCES.map((args) => ({
|
|
96
96
|
args,
|
|
97
|
-
command: CommandIDs.open
|
|
97
|
+
command: CommandIDs.open,
|
|
98
98
|
}));
|
|
99
99
|
if (menu) {
|
|
100
100
|
menu.helpMenu.addGroup(resourcesGroup, 30);
|
|
101
101
|
}
|
|
102
|
-
}
|
|
102
|
+
},
|
|
103
103
|
};
|
|
104
104
|
/**
|
|
105
105
|
* A plugin to add a command to display Keyboard Shortcuts.
|
|
@@ -124,7 +124,7 @@ const shortcuts = {
|
|
|
124
124
|
React.createElement("th", null, trans.__('Name')),
|
|
125
125
|
React.createElement("th", null, trans.__('Shortcut')))),
|
|
126
126
|
React.createElement("tbody", null, commands.keyBindings
|
|
127
|
-
.filter(binding => commands.isEnabled(binding.command))
|
|
127
|
+
.filter((binding) => commands.isEnabled(binding.command))
|
|
128
128
|
.map((binding, i) => (React.createElement("tr", { key: i },
|
|
129
129
|
React.createElement("td", null, commands.label(binding.command)),
|
|
130
130
|
React.createElement("td", null,
|
|
@@ -135,16 +135,16 @@ const shortcuts = {
|
|
|
135
135
|
buttons: [
|
|
136
136
|
Dialog.createButton({
|
|
137
137
|
label: trans.__('Dismiss'),
|
|
138
|
-
className: 'jp-AboutNotebook-about-button jp-mod-reject jp-mod-styled'
|
|
139
|
-
})
|
|
140
|
-
]
|
|
138
|
+
className: 'jp-AboutNotebook-about-button jp-mod-reject jp-mod-styled',
|
|
139
|
+
}),
|
|
140
|
+
],
|
|
141
141
|
});
|
|
142
|
-
}
|
|
142
|
+
},
|
|
143
143
|
});
|
|
144
144
|
if (palette) {
|
|
145
145
|
palette.addItem({ command: CommandIDs.shortcuts, category });
|
|
146
146
|
}
|
|
147
|
-
}
|
|
147
|
+
},
|
|
148
148
|
};
|
|
149
149
|
const plugins = [open, shortcuts, about];
|
|
150
150
|
export default plugins;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter-notebook/help-extension",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.17",
|
|
4
4
|
"description": "Jupyter Notebook - Help Extension",
|
|
5
5
|
"homepage": "https://github.com/jupyter/notebook",
|
|
6
6
|
"bugs": {
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
"watch": "tsc -b --watch"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@jupyter-notebook/ui-components": "^7.0.0-alpha.
|
|
42
|
-
"@jupyterlab/application": "^4.0.0-alpha.
|
|
43
|
-
"@jupyterlab/apputils": "^4.0.0-alpha.
|
|
44
|
-
"@jupyterlab/mainmenu": "^4.0.0-alpha.
|
|
45
|
-
"@jupyterlab/translation": "^4.0.0-alpha.
|
|
41
|
+
"@jupyter-notebook/ui-components": "^7.0.0-alpha.17",
|
|
42
|
+
"@jupyterlab/application": "^4.0.0-alpha.22",
|
|
43
|
+
"@jupyterlab/apputils": "^4.0.0-alpha.22",
|
|
44
|
+
"@jupyterlab/mainmenu": "^4.0.0-alpha.22",
|
|
45
|
+
"@jupyterlab/translation": "^4.0.0-alpha.22",
|
|
46
46
|
"react": "^18.2.0",
|
|
47
47
|
"react-dom": "^18.2.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"rimraf": "^3.0.2",
|
|
51
|
-
"typescript": "5.0.
|
|
51
|
+
"typescript": "~5.0.2"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|