@myst-theme/jupyter 0.13.4 → 0.13.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"leaf.d.ts","sourceRoot":"","sources":["../../src/execute/leaf.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAkB,MAAM,YAAY,CAAC;AAY9E,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,GAAG,EACH,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;CAC9C,kDAkBA;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,KAAK,EACL,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,QAAQ,CAAC;IACjB,KAAK,EAAE,iBAAiB,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;CAC9C,QAiDA;AAED,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,KAAK,EAAE,iBAAiB,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;CAC9C,QAmFA;AAED,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EA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Q,EAAE,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;CAC9C,QA4BA"}
@@ -79,9 +79,10 @@ export function SessionStarter({ pageSlug, notebookSlug, location, state, dispat
79
79
  // in order to allow for multiple independent sessions of the same notebook
80
80
  let path = `/${pageSlug}-${notebookSlug}.ipynb`;
81
81
  console.debug('session starter path:', path);
82
- const match = (_a = location === null || location === void 0 ? void 0 : location.match(/(.*)\/.*.ipynb$/)) !== null && _a !== void 0 ? _a : null;
82
+ const match = (_a = location === null || location === void 0 ? void 0 : location.match(/(.*)\/.*/)) !== null && _a !== void 0 ? _a : null;
83
83
  if (match) {
84
84
  console.debug('session starter match:', match);
85
+ // Choose an arbitrary suffix, not important
85
86
  path = `${match[1]}/${pageSlug}-${notebookSlug}.ipynb`;
86
87
  console.debug('session starter path (modified):', path);
87
88
  }
@@ -1 +1 @@
1
- {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,KAAK,EAAsB,cAAc,EAAE,MAAM,MAAM,CAAC;AAS/D,eAAO,MAAM,mBAAmB,aAA+B,CAAC;AAEhE,eAAO,MAAM,iBAAiB,EAMxB,GAAG,CAAC,MAAM,CAAC,CAAC;AAElB,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,cAAc,EAAE,EACzB,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,EAC9B,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,WAa7B;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,KAAK,EACL,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAuCA;AAED,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,2CAUrD"}
1
+ {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,KAAK,EAAsB,cAAc,EAAE,MAAM,MAAM,CAAC;AAS/D,eAAO,MAAM,mBAAmB,aAA+B,CAAC;AAEhE,eAAO,MAAM,iBAAiB,EAMxB,GAAG,CAAC,MAAM,CAAC,CAAC;AAElB,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,cAAc,EAAE,EACzB,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,EAC9B,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,WAa7B;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,KAAK,EACL,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAuCA;AAED,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,2CAcrD"}
package/dist/output.js CHANGED
@@ -6,7 +6,7 @@ import { JupyterOutputs } from './jupyter.js';
6
6
  import { useMemo } from 'react';
7
7
  import { useCellExecution } from './execute/index.js';
8
8
  import { usePlaceholder } from './decoration.js';
9
- import { MyST } from 'myst-to-react';
9
+ import { Details, MyST } from 'myst-to-react';
10
10
  export const DIRECT_OUTPUT_TYPES = new Set(['stream', 'error']);
11
11
  export const DIRECT_MIME_TYPES = new Set([
12
12
  KnownCellOutputMimeTypes.TextPlain,
@@ -54,5 +54,9 @@ export function JupyterOutput({ outputId, identifier, data, align, className, })
54
54
  }, className), children: component }));
55
55
  }
56
56
  export function Output({ node }) {
57
- return (_jsx(JupyterOutput, { className: classNames({ hidden: node.visibility === 'remove' }), outputId: node.id, identifier: node.identifier, align: node.align, data: node.data }));
57
+ const output = (_jsx(JupyterOutput, { className: classNames({ hidden: node.visibility === 'remove' }), outputId: node.id, identifier: node.identifier, align: node.align, data: node.data }));
58
+ if (node.visibility === 'hide') {
59
+ return _jsx(Details, { title: "Output", children: output });
60
+ }
61
+ return output;
58
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myst-theme/jupyter",
3
- "version": "0.13.4",
3
+ "version": "0.13.5",
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.13.4",
28
+ "@myst-theme/providers": "^0.13.5",
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.3",
36
36
  "myst-spec": "^0.0.5",
37
37
  "myst-spec-ext": "^1.7.3",
38
- "myst-to-react": "^0.13.4",
38
+ "myst-to-react": "^0.13.5",
39
39
  "nanoid": "^4.0.2",
40
40
  "nbtx": "^0.2.3",
41
41
  "react-syntax-highlighter": "^15.5.0",