@myst-theme/jupyter 0.5.11 → 0.5.13
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/dist/execute/provider.d.ts +0 -4
- package/dist/execute/provider.d.ts.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -25
- package/package.json +7 -7
|
@@ -3,7 +3,6 @@ import { SourceFileKind } from 'myst-spec-ext';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import type { ExecuteScopeAction } from './actions.js';
|
|
5
5
|
import type { ExecuteScopeState, IdKeyMap } from './types.js';
|
|
6
|
-
import type { Thebe } from 'myst-frontmatter';
|
|
7
6
|
import type { GenericParent } from 'myst-common';
|
|
8
7
|
export interface ExecuteScopeType {
|
|
9
8
|
canCompute: boolean;
|
|
@@ -19,9 +18,6 @@ type ArticleContents = {
|
|
|
19
18
|
mdast: GenericParent;
|
|
20
19
|
location?: string;
|
|
21
20
|
dependencies?: Dependency[];
|
|
22
|
-
frontmatter: {
|
|
23
|
-
thebe?: boolean | Thebe;
|
|
24
|
-
};
|
|
25
21
|
};
|
|
26
22
|
/**
|
|
27
23
|
* The ExecuteScopeProvider is responsible for maintaining the state of the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/execute/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAc,iBAAiB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/execute/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAc,iBAAiB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAU1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,iBAAiB,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAC7C,MAAM,EAAE,QAAQ,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,6CAA+D,CAAC;AAEhG,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,UAAU,EAAE,CAAC;CAC7B,CAAC;AAmEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,QAAQ,GACT,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAAE,QAAQ,EAAE,eAAe,CAAA;CAAE,CAAC,2CAmGxD"}
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAA0C,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EAAE,WAAW,EAAyB,MAAM,YAAY,CAAC;AAErE,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG;IAC9C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAyDF,wBAAgB,yBAAyB,CACvC,EAAE,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,EAC/B,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,mBAAmB,GAAG,SAAS,CAgHjC"}
|
package/dist/utils.js
CHANGED
|
@@ -42,35 +42,11 @@ export function thebeFrontmatterToOptions(fm, githubBadgeUrl, binderBadgeUrl) {
|
|
|
42
42
|
var _a;
|
|
43
43
|
if (fm === undefined || fm === false)
|
|
44
44
|
return undefined;
|
|
45
|
-
const { binder, server, lite,
|
|
45
|
+
const { binder, server, lite, kernelName, disableSessionSaving, mathjaxConfig, mathjaxUrl } = (_a = fm) !== null && _a !== void 0 ? _a : {};
|
|
46
46
|
const thebeOptions = { mathjaxConfig, mathjaxUrl };
|
|
47
47
|
if (disableSessionSaving) {
|
|
48
48
|
thebeOptions.savedSessionOptions = { enabled: false };
|
|
49
49
|
}
|
|
50
|
-
// handle thebe.local.*
|
|
51
|
-
// as local OVERRIDES other binder and server settings, handle these first
|
|
52
|
-
// TODO need to expose NODE_ENV somehow via a loader
|
|
53
|
-
let NODE_ENV = 'development';
|
|
54
|
-
if (typeof window !== 'undefined') {
|
|
55
|
-
NODE_ENV = window.NODE_ENV;
|
|
56
|
-
}
|
|
57
|
-
if (NODE_ENV !== 'production' && local) {
|
|
58
|
-
if (isObject(local)) {
|
|
59
|
-
const { url, token, kernelName: localKernelName } = local;
|
|
60
|
-
if (url || token) {
|
|
61
|
-
thebeOptions.serverSettings = {};
|
|
62
|
-
if (url)
|
|
63
|
-
thebeOptions.serverSettings.baseUrl = url;
|
|
64
|
-
if (token)
|
|
65
|
-
thebeOptions.serverSettings.token = token;
|
|
66
|
-
}
|
|
67
|
-
if (localKernelName) {
|
|
68
|
-
thebeOptions.kernelOptions = { kernelName: localKernelName };
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return thebeOptions;
|
|
72
|
-
// else just fall through & return - TODO return early?
|
|
73
|
-
}
|
|
74
50
|
// handle additional options
|
|
75
51
|
if (kernelName) {
|
|
76
52
|
thebeOptions.kernelOptions = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myst-theme/jupyter",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"@curvenote/ansi-to-react": "^7.0.0",
|
|
26
26
|
"@headlessui/react": "^1.7.15",
|
|
27
27
|
"@heroicons/react": "^2.0.18",
|
|
28
|
-
"@myst-theme/providers": "^0.5.
|
|
28
|
+
"@myst-theme/providers": "^0.5.13",
|
|
29
29
|
"@scienceicons/react": "^0.0.6",
|
|
30
30
|
"buffer": "^6.0.3",
|
|
31
31
|
"classnames": "^2.3.2",
|
|
32
|
-
"myst-common": "^1.1.
|
|
33
|
-
"myst-config": "^1.1.
|
|
34
|
-
"myst-frontmatter": "^1.1.
|
|
32
|
+
"myst-common": "^1.1.13",
|
|
33
|
+
"myst-config": "^1.1.13",
|
|
34
|
+
"myst-frontmatter": "^1.1.13",
|
|
35
35
|
"myst-spec": "^0.0.4",
|
|
36
|
-
"myst-spec-ext": "^1.1.
|
|
37
|
-
"myst-to-react": "^0.5.
|
|
36
|
+
"myst-spec-ext": "^1.1.13",
|
|
37
|
+
"myst-to-react": "^0.5.13",
|
|
38
38
|
"nanoid": "^4.0.2",
|
|
39
39
|
"nbtx": "^0.2.3",
|
|
40
40
|
"react-syntax-highlighter": "^15.5.0",
|