@jupyter-notebook/notebook-extension 7.0.3 → 7.0.4

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/trusted.d.ts CHANGED
@@ -2,7 +2,7 @@ import { ReactWidget } from '@jupyterlab/apputils';
2
2
  import { Notebook } from '@jupyterlab/notebook';
3
3
  import { ITranslator } from '@jupyterlab/translation';
4
4
  /**
5
- * A namespace for TrustedComponent statics.
5
+ * A namespace for TrustedComponent static methods.
6
6
  */
7
7
  export declare namespace TrustedComponent {
8
8
  /**
package/lib/trusted.js CHANGED
@@ -12,15 +12,17 @@ const isTrusted = (notebook) => {
12
12
  return false;
13
13
  }
14
14
  const cells = Array.from(model.cells);
15
- const trusted = cells.reduce((accum, current) => {
16
- if (current.trusted) {
17
- return accum + 1;
15
+ let total = 0;
16
+ let trusted = 0;
17
+ for (const currentCell of cells) {
18
+ if (currentCell.type !== 'code') {
19
+ continue;
18
20
  }
19
- else {
20
- return accum;
21
+ total++;
22
+ if (currentCell.trusted) {
23
+ trusted++;
21
24
  }
22
- }, 0);
23
- const total = cells.length;
25
+ }
24
26
  return trusted === total;
25
27
  };
26
28
  /**
@@ -53,7 +55,7 @@ const TrustedButton = ({ notebook, translator, }) => {
53
55
  : trans.__('JavaScript disabled for notebook display') }, trusted ? trans.__('Trusted') : trans.__('Not Trusted')));
54
56
  };
55
57
  /**
56
- * A namespace for TrustedComponent statics.
58
+ * A namespace for TrustedComponent static methods.
57
59
  */
58
60
  export var TrustedComponent;
59
61
  (function (TrustedComponent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyter-notebook/notebook-extension",
3
- "version": "7.0.3",
3
+ "version": "7.0.4",
4
4
  "description": "Jupyter Notebook - Notebook Extension",
5
5
  "homepage": "https://github.com/jupyter/notebook",
6
6
  "bugs": {
@@ -38,16 +38,18 @@
38
38
  "watch": "tsc -b --watch"
39
39
  },
40
40
  "dependencies": {
41
- "@jupyter-notebook/application": "^7.0.3",
42
- "@jupyterlab/application": "^4.0.5",
43
- "@jupyterlab/apputils": "^4.1.5",
44
- "@jupyterlab/cells": "^4.0.5",
45
- "@jupyterlab/docmanager": "^4.0.5",
46
- "@jupyterlab/notebook": "^4.0.5",
47
- "@jupyterlab/settingregistry": "^4.0.5",
48
- "@jupyterlab/translation": "^4.0.5",
41
+ "@jupyter-notebook/application": "^7.0.4",
42
+ "@jupyterlab/application": "^4.0.6",
43
+ "@jupyterlab/apputils": "^4.1.6",
44
+ "@jupyterlab/cells": "^4.0.6",
45
+ "@jupyterlab/docmanager": "^4.0.6",
46
+ "@jupyterlab/notebook": "^4.0.6",
47
+ "@jupyterlab/settingregistry": "^4.0.6",
48
+ "@jupyterlab/translation": "^4.0.6",
49
49
  "@lumino/polling": "^2.1.2",
50
- "@lumino/widgets": "^2.3.0"
50
+ "@lumino/widgets": "^2.3.0",
51
+ "react": "^18.2.0",
52
+ "react-dom": "^18.2.0"
51
53
  },
52
54
  "devDependencies": {
53
55
  "rimraf": "^3.0.2",
package/style/base.css CHANGED
@@ -83,7 +83,7 @@ body[data-notebook='notebooks']
83
83
  width: 11px;
84
84
  }
85
85
 
86
- /* Cell toolbar adjustements */
86
+ /* Cell toolbar adjustments */
87
87
 
88
88
  body[data-notebook='notebooks'] .jp-cell-toolbar {
89
89
  background: unset;