@myst-theme/jupyter 0.16.0 → 0.17.1

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.
Files changed (2) hide show
  1. package/dist/block.js +4 -4
  2. package/package.json +5 -5
package/dist/block.js CHANGED
@@ -5,12 +5,12 @@ import classNames from 'classnames';
5
5
  import { NotebookClearCell, NotebookRunCell, NotebookRunCellSpinnerOnly, } from './controls/index.js';
6
6
  import { usePageKind } from '@myst-theme/providers';
7
7
  export function NotebookBlock({ node, className }) {
8
- var _a, _b;
8
+ var _a, _b, _c, _d;
9
9
  const pageKind = usePageKind();
10
- const block = (_jsxs("div", { id: node.key, className: classNames('relative group/block', className, node.class, {
11
- [(_a = node.data) === null || _a === void 0 ? void 0 : _a.class]: typeof ((_b = node.data) === null || _b === void 0 ? void 0 : _b.class) === 'string',
10
+ const block = (_jsxs("div", { id: (_b = (_a = node.html_id) !== null && _a !== void 0 ? _a : node.identifier) !== null && _b !== void 0 ? _b : node.key, className: classNames('relative group/block', className, node.class, {
11
+ [(_c = node.data) === null || _c === void 0 ? void 0 : _c.class]: typeof ((_d = node.data) === null || _d === void 0 ? void 0 : _d.class) === 'string',
12
12
  hidden: node.visibility === 'remove',
13
- }), children: [pageKind === SourceFileKind.Notebook && node.kind === 'notebook-code' && (_jsxs(_Fragment, { children: [_jsx("div", { className: "flex sticky top-[115px] z-10 opacity-90 group-hover/block:opacity-100 group-hover/block:hidden", children: _jsx("div", { className: "absolute top-0 right-0 flex", children: _jsx(NotebookRunCellSpinnerOnly, { id: node.key }) }) }), _jsx("div", { className: "sticky top-[115px] z-10 opacity-90 group-hover/block:opacity-100 group-hover/block:flex", children: _jsxs("div", { className: "absolute -top-[12px] right-0 flex flex-row rounded bg-white dark:bg-slate-800", children: [_jsx(NotebookRunCell, { id: node.key }), _jsx(NotebookClearCell, { id: node.key })] }) })] })), _jsx(MyST, { ast: node.children })] }));
13
+ }), children: [pageKind === SourceFileKind.Notebook && node.kind === 'notebook-code' && (_jsxs(_Fragment, { children: [_jsx("div", { className: "flex sticky top-[115px] z-10 opacity-90 group-hover/block:opacity-100 group-hover/block:hidden", children: _jsx("div", { className: "flex absolute top-0 right-0", children: _jsx(NotebookRunCellSpinnerOnly, { id: `spinner-${node.key}` }) }) }), _jsx("div", { className: "hidden sticky top-[80px] z-10 opacity-70 group-hover/block:opacity-100 group-hover/block:flex", children: _jsxs("div", { className: "absolute top-0 -right-[28px] flex md:flex-col", children: [_jsx(NotebookRunCell, { id: `run-${node.key}` }), _jsx(NotebookClearCell, { id: `clear-${node.key}` })] }) })] })), _jsx(MyST, { ast: node.children })] }));
14
14
  if (node.visibility === 'hide') {
15
15
  return _jsx(Details, { title: "Notebook Cell", children: block });
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myst-theme/jupyter",
3
- "version": "0.16.0",
3
+ "version": "0.17.1",
4
4
  "type": "module",
5
5
  "exports": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -25,17 +25,17 @@
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.16.0",
28
+ "@myst-theme/providers": "^0.17.1",
29
29
  "@scienceicons/react": "^0.0.13",
30
30
  "buffer": "^6.0.3",
31
31
  "classnames": "^2.5.1",
32
32
  "jupyterlab-plotly": "^5.24.0",
33
- "myst-common": "^1.7.9",
33
+ "myst-common": "^1.8.1",
34
34
  "myst-config": "^1.7.9",
35
35
  "myst-frontmatter": "^1.7.9",
36
36
  "myst-spec": "^0.0.5",
37
- "myst-spec-ext": "^1.7.9",
38
- "myst-to-react": "^0.16.0",
37
+ "myst-spec-ext": "^1.8.1",
38
+ "myst-to-react": "^0.17.1",
39
39
  "nanoid": "^4.0.2",
40
40
  "nbtx": "^0.2.3",
41
41
  "react-syntax-highlighter": "^15.5.0",