@myst-theme/jupyter 0.14.1 → 0.14.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/README.md +4 -4
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +4 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# @myst-theme/
|
|
1
|
+
# @myst-theme/jupyter
|
|
2
2
|
|
|
3
|
-
[](https://github.com/
|
|
3
|
+
[](https://www.npmjs.com/package/@myst-theme/jupyter)
|
|
4
|
+
[](https://github.com/jupyter-book/myst-theme/blob/main/LICENSE)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
React components for integrating Jupyter with MyST.
|
package/dist/hooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAIV,cAAc,EAEf,MAAM,MAAM,CAAC;AAKd,UAAU,WAAW;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AA0BD,wBAAgB,cAAc,CAC5B,OAAO,CAAC,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,GACX;IAAE,IAAI,CAAC,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAQvC;AAuBD,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG;IACtE,IAAI,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;IACnC,KAAK,EAAE,GAAG,GAAG,SAAS,CAAC;CACxB,
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAIV,cAAc,EAEf,MAAM,MAAM,CAAC;AAKd,UAAU,WAAW;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AA0BD,wBAAgB,cAAc,CAC5B,OAAO,CAAC,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,GACX;IAAE,IAAI,CAAC,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAQvC;AAuBD,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG;IACtE,IAAI,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;IACnC,KAAK,EAAE,GAAG,GAAG,SAAS,CAAC;CACxB,CAoCA;AAUD,MAAM,CAAC,OAAO,UAAU,aAAa;;;EAapC;AAED,wBAAgB,eAAe;;;;yBAOpB,iBAAiB;;kCAkBZ,MAAM;EAqBrB"}
|
package/dist/hooks.js
CHANGED
|
@@ -47,8 +47,8 @@ export function useLongContent(content, url) {
|
|
|
47
47
|
return { data: { content: content !== null && content !== void 0 ? content : '' } };
|
|
48
48
|
return { data, error };
|
|
49
49
|
}
|
|
50
|
-
const arrayFetcher = (
|
|
51
|
-
return Promise.all(urls.map((url) => fetcher(url
|
|
50
|
+
const arrayFetcher = (urls) => {
|
|
51
|
+
return Promise.all(urls.map((url) => fetcher(url)));
|
|
52
52
|
};
|
|
53
53
|
function shallowCloneOutputs(outputs) {
|
|
54
54
|
return outputs.map((output) => {
|
|
@@ -72,7 +72,8 @@ export function useFetchAnyTruncatedContent(outputs) {
|
|
|
72
72
|
itemsWithPaths.push(obj);
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
-
const
|
|
75
|
+
const paths = itemsWithPaths.map(({ path }) => path);
|
|
76
|
+
const { data, error } = useSWRImmutable(paths, arrayFetcher);
|
|
76
77
|
data === null || data === void 0 ? void 0 : data.forEach(({ content }, idx) => {
|
|
77
78
|
const obj = itemsWithPaths[idx];
|
|
78
79
|
if ('text' in obj) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myst-theme/jupyter",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
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.14.
|
|
28
|
+
"@myst-theme/providers": "^0.14.2",
|
|
29
29
|
"@scienceicons/react": "^0.0.11",
|
|
30
30
|
"buffer": "^6.0.3",
|
|
31
31
|
"classnames": "^2.5.1",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"myst-frontmatter": "^1.7.9",
|
|
36
36
|
"myst-spec": "^0.0.5",
|
|
37
37
|
"myst-spec-ext": "^1.7.9",
|
|
38
|
-
"myst-to-react": "^0.14.
|
|
38
|
+
"myst-to-react": "^0.14.2",
|
|
39
39
|
"nanoid": "^4.0.2",
|
|
40
40
|
"nbtx": "^0.2.3",
|
|
41
41
|
"react-syntax-highlighter": "^15.5.0",
|