@jupyter-notebook/help-extension 7.7.0-alpha.0 → 7.7.0-alpha.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
@@ -5,23 +5,6 @@ import { IMainMenu } from '@jupyterlab/mainmenu';
5
5
  import { ITranslator } from '@jupyterlab/translation';
6
6
  import { jupyterIcon } from '@jupyter-notebook/ui-components';
7
7
  import * as React from 'react';
8
- /**
9
- * A list of resources to show in the help menu.
10
- */
11
- const RESOURCES = [
12
- {
13
- text: 'About Jupyter',
14
- url: 'https://jupyter.org',
15
- },
16
- {
17
- text: 'Markdown Reference',
18
- url: 'https://commonmark.org/help/',
19
- },
20
- {
21
- text: 'Documentation',
22
- url: 'https://jupyter-notebook.readthedocs.io/en/stable/',
23
- },
24
- ];
25
8
  /**
26
9
  * The command IDs used by the help plugin.
27
10
  */
@@ -29,6 +12,7 @@ var CommandIDs;
29
12
  (function (CommandIDs) {
30
13
  CommandIDs.open = 'help:open';
31
14
  CommandIDs.about = 'help:about';
15
+ CommandIDs.aboutJupyter = 'help:about-jupyter';
32
16
  })(CommandIDs || (CommandIDs = {}));
33
17
  // CVE-2026-40171 / GHSA-rch3-82jr-f9w9
34
18
  function isUrlSafe(url) {
@@ -106,7 +90,7 @@ const about = {
106
90
  React.createElement("a", { href: notebookURL, target: "_blank", rel: "noopener noreferrer", className: "jp-Button-flat jp-AboutNotebook-about-externalLinks" }, aboutJupyter),
107
91
  React.createElement("a", { href: contributorURL, target: "_blank", rel: "noopener noreferrer", className: "jp-Button-flat jp-AboutNotebook-about-externalLinks" }, contributorList)));
108
92
  const version = trans.__('Version: %1', app.version);
109
- const copyright = trans.__('© 2021-2025 Jupyter Notebook Contributors');
93
+ const copyright = trans.__('© 2021-%1 Jupyter Notebook Contributors', '2026');
110
94
  const body = (React.createElement(React.Fragment, null,
111
95
  React.createElement("span", { className: "jp-AboutNotebook-version" }, version),
112
96
  React.createElement("div", null, externalLinks),
@@ -131,13 +115,65 @@ const about = {
131
115
  },
132
116
  },
133
117
  });
118
+ commands.addCommand(CommandIDs.aboutJupyter, {
119
+ label: trans.__('About Jupyter'),
120
+ execute: () => {
121
+ const title = (React.createElement(React.Fragment, null,
122
+ React.createElement("span", { className: "jp-AboutNotebook-header" },
123
+ React.createElement(jupyterIcon.react, { width: "196px", height: "auto" }))));
124
+ const jupyterURL = 'https://jupyter.org/about';
125
+ const contributorURL = 'https://jupyter.org/community';
126
+ const aboutProjectJupyter = trans.__('ABOUT PROJECT JUPYTER');
127
+ const communityJupyter = trans.__('JUPYTER COMMUNITY');
128
+ const externalLinks = (React.createElement("span", null,
129
+ React.createElement("a", { href: jupyterURL, target: "_blank", rel: "noopener noreferrer", className: "jp-Button-flat jp-AboutNotebook-about-externalLinks" }, aboutProjectJupyter),
130
+ React.createElement("a", { href: contributorURL, target: "_blank", rel: "noopener noreferrer", className: "jp-Button-flat jp-AboutNotebook-about-externalLinks" }, communityJupyter)));
131
+ const description = trans.__('Project Jupyter exists to develop open-source software, open standards, and services for interactive computing across dozens of programming languages.');
132
+ const body = (React.createElement(React.Fragment, null,
133
+ React.createElement("span", { className: "jp-AboutNotebook-body" }, description),
134
+ React.createElement("div", null, externalLinks)));
135
+ const dialog = new Dialog({
136
+ title,
137
+ body,
138
+ buttons: [
139
+ Dialog.createButton({
140
+ label: trans.__('Dismiss'),
141
+ className: 'jp-AboutNotebook-about-button jp-mod-reject jp-mod-styled',
142
+ }),
143
+ ],
144
+ });
145
+ dialog.addClass('jp-AboutNotebook');
146
+ dialog.addClass('jp-AboutJupyter');
147
+ void dialog.launch();
148
+ },
149
+ describedBy: {
150
+ args: {
151
+ type: 'object',
152
+ properties: {},
153
+ },
154
+ },
155
+ });
134
156
  if (palette) {
135
157
  palette.addItem({ command: CommandIDs.about, category });
158
+ palette.addItem({ command: CommandIDs.aboutJupyter, category });
136
159
  }
137
- const resourcesGroup = RESOURCES.map((args) => ({
138
- args,
139
- command: CommandIDs.open,
140
- }));
160
+ const resources = [
161
+ {
162
+ text: trans.__('Markdown Reference'),
163
+ url: 'https://commonmark.org/help/',
164
+ },
165
+ {
166
+ text: trans.__('Documentation'),
167
+ url: 'https://jupyter-notebook.readthedocs.io/en/stable/',
168
+ },
169
+ ];
170
+ const resourcesGroup = [
171
+ { command: CommandIDs.aboutJupyter },
172
+ ...resources.map((args) => ({
173
+ args,
174
+ command: CommandIDs.open,
175
+ })),
176
+ ];
141
177
  if (menu) {
142
178
  menu.helpMenu.addGroup(resourcesGroup, 30);
143
179
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyter-notebook/help-extension",
3
- "version": "7.7.0-alpha.0",
3
+ "version": "7.7.0-alpha.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.7.0-alpha.0",
42
- "@jupyterlab/application": "~4.7.0-alpha.0",
43
- "@jupyterlab/apputils": "~4.8.0-alpha.0",
44
- "@jupyterlab/mainmenu": "~4.7.0-alpha.0",
45
- "@jupyterlab/translation": "~4.7.0-alpha.0",
41
+ "@jupyter-notebook/ui-components": "^7.7.0-alpha.2",
42
+ "@jupyterlab/application": "~4.7.0-alpha.2",
43
+ "@jupyterlab/apputils": "~4.8.0-alpha.2",
44
+ "@jupyterlab/mainmenu": "~4.7.0-alpha.2",
45
+ "@jupyterlab/translation": "~4.7.0-alpha.2",
46
46
  "react": "^18.2.0",
47
47
  "react-dom": "^18.2.0"
48
48
  },
package/style/base.css CHANGED
@@ -51,3 +51,7 @@
51
51
  .jp-AboutNotebook-about-copyright {
52
52
  padding-top: 25px;
53
53
  }
54
+
55
+ .jp-AboutJupyter .jp-Dialog-content {
56
+ max-width: 480px;
57
+ }