@jupyter-notebook/application-extension 7.7.0-alpha.2 → 7.7.0-beta.0

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
@@ -17,9 +17,9 @@ import { PromiseDelegate } from '@lumino/coreutils';
17
17
  import { DisposableDelegate, DisposableSet, } from '@lumino/disposable';
18
18
  import { Menu, Widget } from '@lumino/widgets';
19
19
  /**
20
- * A regular expression to match path to notebooks and documents
20
+ * A regular expression to match the notebook and editor routes
21
21
  */
22
- const TREE_PATTERN = new RegExp('/(notebooks|edit)/(.*)');
22
+ const DOCUMENT_PATTERN = new RegExp('^/(notebooks|edit)/(.*)$');
23
23
  /**
24
24
  * A regular expression to suppress the file extension from display for .ipynb files.
25
25
  */
@@ -149,7 +149,7 @@ const opener = {
149
149
  execute: (args) => {
150
150
  var _a;
151
151
  const parsed = args;
152
- const matches = (_a = parsed.path.match(TREE_PATTERN)) !== null && _a !== void 0 ? _a : [];
152
+ const matches = (_a = parsed.path.match(DOCUMENT_PATTERN)) !== null && _a !== void 0 ? _a : [];
153
153
  const [, , path] = matches;
154
154
  if (!path) {
155
155
  return;
@@ -222,7 +222,7 @@ const opener = {
222
222
  },
223
223
  },
224
224
  });
225
- router.register({ command, pattern: TREE_PATTERN });
225
+ router.register({ command, pattern: DOCUMENT_PATTERN });
226
226
  },
227
227
  };
228
228
  /**
@@ -311,8 +311,14 @@ const pages = {
311
311
  },
312
312
  });
313
313
  if (palette) {
314
- palette.addItem({ command: CommandIDs.openLab, category: 'View' });
315
- palette.addItem({ command: CommandIDs.openTree, category: 'View' });
314
+ palette.addItem({
315
+ command: CommandIDs.openLab,
316
+ category: trans.__('View'),
317
+ });
318
+ palette.addItem({
319
+ command: CommandIDs.openTree,
320
+ category: trans.__('View'),
321
+ });
316
322
  }
317
323
  },
318
324
  };
@@ -624,7 +630,7 @@ const title = {
624
630
  if (!router) {
625
631
  return;
626
632
  }
627
- const matches = (_a = router.current.path.match(TREE_PATTERN)) !== null && _a !== void 0 ? _a : [];
633
+ const matches = (_a = router.current.path.match(DOCUMENT_PATTERN)) !== null && _a !== void 0 ? _a : [];
628
634
  const [, route, path] = matches;
629
635
  if (!route || !path) {
630
636
  return;
@@ -702,7 +708,10 @@ const topVisibility = {
702
708
  });
703
709
  }
704
710
  if (palette) {
705
- palette.addItem({ command: CommandIDs.toggleTop, category: 'View' });
711
+ palette.addItem({
712
+ command: CommandIDs.toggleTop,
713
+ category: trans.__('View'),
714
+ });
706
715
  }
707
716
  const onChanged = () => {
708
717
  if (!adjustToScreen) {
@@ -902,6 +911,7 @@ const sidePanelVisibility = {
902
911
  const sidePanelPalette = new SidePanelPalette({
903
912
  commandPalette: palette,
904
913
  command: CommandIDs.togglePanel,
914
+ translator,
905
915
  });
906
916
  notebookShell.leftHandler.widgets.forEach((widget) => {
907
917
  sidePanelPalette.addItem(widget, notebookShell.leftHandler.area);
@@ -1077,7 +1087,10 @@ const zen = {
1077
1087
  }
1078
1088
  });
1079
1089
  if (palette) {
1080
- palette.addItem({ command: CommandIDs.toggleZen, category: 'Mode' });
1090
+ palette.addItem({
1091
+ command: CommandIDs.toggleZen,
1092
+ category: trans.__('Mode'),
1093
+ });
1081
1094
  }
1082
1095
  },
1083
1096
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyter-notebook/application-extension",
3
- "version": "7.7.0-alpha.2",
3
+ "version": "7.7.0-beta.0",
4
4
  "description": "Jupyter Notebook - Application Extension",
5
5
  "homepage": "https://github.com/jupyter/notebook",
6
6
  "bugs": {
@@ -38,19 +38,19 @@
38
38
  "watch": "tsc -b --watch"
39
39
  },
40
40
  "dependencies": {
41
- "@jupyter-notebook/application": "^7.7.0-alpha.2",
42
- "@jupyter-notebook/ui-components": "^7.7.0-alpha.2",
43
- "@jupyterlab/application": "~4.7.0-alpha.2",
44
- "@jupyterlab/apputils": "~4.8.0-alpha.2",
45
- "@jupyterlab/codeeditor": "~4.7.0-alpha.2",
46
- "@jupyterlab/console": "~4.7.0-alpha.2",
47
- "@jupyterlab/coreutils": "~6.7.0-alpha.2",
48
- "@jupyterlab/docmanager": "~4.7.0-alpha.2",
49
- "@jupyterlab/docregistry": "~4.7.0-alpha.2",
50
- "@jupyterlab/mainmenu": "~4.7.0-alpha.2",
51
- "@jupyterlab/rendermime": "~4.7.0-alpha.2",
52
- "@jupyterlab/settingregistry": "~4.7.0-alpha.2",
53
- "@jupyterlab/translation": "~4.7.0-alpha.2",
41
+ "@jupyter-notebook/application": "^7.7.0-beta.0",
42
+ "@jupyter-notebook/ui-components": "^7.7.0-beta.0",
43
+ "@jupyterlab/application": "~4.7.0-beta.0",
44
+ "@jupyterlab/apputils": "~4.8.0-beta.0",
45
+ "@jupyterlab/codeeditor": "~4.7.0-beta.0",
46
+ "@jupyterlab/console": "~4.7.0-beta.0",
47
+ "@jupyterlab/coreutils": "~6.7.0-beta.0",
48
+ "@jupyterlab/docmanager": "~4.7.0-beta.0",
49
+ "@jupyterlab/docregistry": "~4.7.0-beta.0",
50
+ "@jupyterlab/mainmenu": "~4.7.0-beta.0",
51
+ "@jupyterlab/rendermime": "~4.7.0-beta.0",
52
+ "@jupyterlab/settingregistry": "~4.7.0-beta.0",
53
+ "@jupyterlab/translation": "~4.7.0-beta.0",
54
54
  "@lumino/coreutils": "^2.2.2",
55
55
  "@lumino/disposable": "^2.1.5",
56
56
  "@lumino/widgets": "^2.7.2"
package/schema/top.json CHANGED
@@ -21,6 +21,7 @@
21
21
  "title": "Top Bar Visibility",
22
22
  "description": "Whether to show the top bar or not, yes for always showing, no for always not showing, automatic for adjusting to screen size",
23
23
  "default": "automatic",
24
+ "type": "string",
24
25
  "oneOf": [
25
26
  { "const": "yes", "title": "Yes" },
26
27
  { "const": "no", "title": "No" },