@jupyter-notebook/help-extension 7.0.0-beta.0 → 7.0.0-beta.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
- import { showDialog, Dialog, ICommandPalette } from '@jupyterlab/apputils';
3
+ import { Dialog, ICommandPalette } from '@jupyterlab/apputils';
4
4
  import { IMainMenu } from '@jupyterlab/mainmenu';
5
5
  import { ITranslator } from '@jupyterlab/translation';
6
6
  import { jupyterIcon } from '@jupyter-notebook/ui-components';
@@ -24,7 +24,6 @@ const RESOURCES = [
24
24
  var CommandIDs;
25
25
  (function (CommandIDs) {
26
26
  CommandIDs.open = 'help:open';
27
- CommandIDs.shortcuts = 'help:shortcuts';
28
27
  CommandIDs.about = 'help:about';
29
28
  })(CommandIDs || (CommandIDs = {}));
30
29
  /**
@@ -101,50 +100,5 @@ const about = {
101
100
  }
102
101
  },
103
102
  };
104
- /**
105
- * A plugin to add a command to display Keyboard Shortcuts.
106
- */
107
- const shortcuts = {
108
- id: '@jupyter-notebook/help-extension:shortcuts',
109
- autoStart: true,
110
- requires: [ITranslator],
111
- optional: [ICommandPalette],
112
- activate: (app, translator, palette) => {
113
- const { commands } = app;
114
- const trans = translator.load('notebook');
115
- const category = trans.__('Help');
116
- commands.addCommand(CommandIDs.shortcuts, {
117
- label: trans.__('Keyboard Shortcuts'),
118
- execute: () => {
119
- const title = (React.createElement("span", { className: "jp-AboutNotebook-about-header" },
120
- React.createElement("div", { className: "jp-AboutNotebook-about-header-info" }, trans.__('Keyboard Shortcuts'))));
121
- const body = (React.createElement("table", { className: "jp-AboutNotebook-shortcuts" },
122
- React.createElement("thead", null,
123
- React.createElement("tr", null,
124
- React.createElement("th", null, trans.__('Name')),
125
- React.createElement("th", null, trans.__('Shortcut')))),
126
- React.createElement("tbody", null, commands.keyBindings
127
- .filter((binding) => commands.isEnabled(binding.command))
128
- .map((binding, i) => (React.createElement("tr", { key: i },
129
- React.createElement("td", null, commands.label(binding.command)),
130
- React.createElement("td", null,
131
- React.createElement("pre", null, binding.keys.join(', ')))))))));
132
- return showDialog({
133
- title,
134
- body,
135
- buttons: [
136
- Dialog.createButton({
137
- label: trans.__('Dismiss'),
138
- className: 'jp-AboutNotebook-about-button jp-mod-reject jp-mod-styled',
139
- }),
140
- ],
141
- });
142
- },
143
- });
144
- if (palette) {
145
- palette.addItem({ command: CommandIDs.shortcuts, category });
146
- }
147
- },
148
- };
149
- const plugins = [open, shortcuts, about];
103
+ const plugins = [open, about];
150
104
  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-beta.0",
3
+ "version": "7.0.0-beta.2",
4
4
  "description": "Jupyter Notebook - Help Extension",
5
5
  "homepage": "https://github.com/jupyter/notebook",
6
6
  "bugs": {
@@ -38,11 +38,11 @@
38
38
  "watch": "tsc -b --watch"
39
39
  },
40
40
  "dependencies": {
41
- "@jupyter-notebook/ui-components": "^7.0.0-beta.0",
42
- "@jupyterlab/application": "^4.0.0-beta.0",
43
- "@jupyterlab/apputils": "^4.0.0-beta.0",
44
- "@jupyterlab/mainmenu": "^4.0.0-beta.0",
45
- "@jupyterlab/translation": "^4.0.0-beta.0",
41
+ "@jupyter-notebook/ui-components": "^7.0.0-beta.2",
42
+ "@jupyterlab/application": "^4.0.0-rc.1",
43
+ "@jupyterlab/apputils": "^4.0.0-rc.1",
44
+ "@jupyterlab/mainmenu": "^4.0.0-rc.1",
45
+ "@jupyterlab/translation": "^4.0.0-rc.1",
46
46
  "react": "^18.2.0",
47
47
  "react-dom": "^18.2.0"
48
48
  },
package/schema/open.json CHANGED
@@ -13,10 +13,6 @@
13
13
  {
14
14
  "type": "separator",
15
15
  "rank": 1
16
- },
17
- {
18
- "command": "help:shortcuts",
19
- "rank": 20
20
16
  }
21
17
  ]
22
18
  }
package/style/base.css CHANGED
@@ -52,16 +52,3 @@
52
52
  .jp-AboutNotebook-about-copyright {
53
53
  padding-top: 25px;
54
54
  }
55
-
56
- .jp-AboutNotebook-shortcuts {
57
- padding: 10px;
58
- }
59
-
60
- .jp-AboutNotebook-shortcuts pre {
61
- padding: 5px;
62
- margin: 0 0 10px;
63
- background: var(--jp-layout-color2);
64
- border: 1px solid var(--jp-border-color0);
65
- border-radius: 2px;
66
- word-break: break-all;
67
- }