myst-to-react 0.3.0 → 0.3.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.
Files changed (73) hide show
  1. package/dist/cjs/admonitions.js +10 -10
  2. package/dist/cjs/basic.js +14 -14
  3. package/dist/cjs/card.js +8 -8
  4. package/dist/cjs/cite.js +4 -4
  5. package/dist/cjs/code.js +4 -4
  6. package/dist/cjs/components/CopyIcon.js +2 -2
  7. package/dist/cjs/components/HoverPopover.js +1 -1
  8. package/dist/cjs/components/LinkCard.js +2 -2
  9. package/dist/cjs/crossReference.js +2 -2
  10. package/dist/cjs/dropdown.js +2 -2
  11. package/dist/cjs/exercise.js +13 -13
  12. package/dist/cjs/extensions/chemicalFormula.d.ts +1 -1
  13. package/dist/cjs/extensions/chemicalFormula.js +2 -2
  14. package/dist/cjs/extensions/siunits.d.ts +1 -1
  15. package/dist/cjs/extensions/siunits.js +1 -1
  16. package/dist/cjs/footnotes.d.ts +1 -1
  17. package/dist/cjs/footnotes.js +2 -2
  18. package/dist/cjs/grid.js +2 -2
  19. package/dist/cjs/heading.js +4 -4
  20. package/dist/cjs/iframe.d.ts +1 -1
  21. package/dist/cjs/iframe.js +3 -3
  22. package/dist/cjs/inlineError.js +1 -1
  23. package/dist/cjs/inlineExpression.d.ts +1 -1
  24. package/dist/cjs/inlineExpression.js +1 -1
  25. package/dist/cjs/links/github.js +7 -7
  26. package/dist/cjs/links/index.js +9 -9
  27. package/dist/cjs/links/rrid.js +4 -4
  28. package/dist/cjs/links/wiki.js +3 -3
  29. package/dist/cjs/math.js +2 -2
  30. package/dist/cjs/proof.js +9 -9
  31. package/dist/cjs/tabs.js +8 -8
  32. package/dist/cjs/unknown.d.ts +1 -1
  33. package/dist/cjs/unknown.js +1 -1
  34. package/dist/esm/admonitions.js +9 -9
  35. package/dist/esm/basic.js +14 -14
  36. package/dist/esm/card.js +8 -8
  37. package/dist/esm/cite.js +4 -4
  38. package/dist/esm/code.js +4 -4
  39. package/dist/esm/components/CopyIcon.js +2 -2
  40. package/dist/esm/components/HoverPopover.js +1 -1
  41. package/dist/esm/components/LinkCard.js +2 -2
  42. package/dist/esm/crossReference.js +2 -2
  43. package/dist/esm/dropdown.js +2 -2
  44. package/dist/esm/exercise.js +13 -13
  45. package/dist/esm/extensions/chemicalFormula.d.ts +1 -1
  46. package/dist/esm/extensions/chemicalFormula.js +2 -2
  47. package/dist/esm/extensions/siunits.d.ts +1 -1
  48. package/dist/esm/extensions/siunits.js +1 -1
  49. package/dist/esm/footnotes.d.ts +1 -1
  50. package/dist/esm/footnotes.js +2 -2
  51. package/dist/esm/grid.js +2 -2
  52. package/dist/esm/heading.js +4 -4
  53. package/dist/esm/iframe.d.ts +1 -1
  54. package/dist/esm/iframe.js +3 -3
  55. package/dist/esm/inlineError.js +1 -1
  56. package/dist/esm/inlineExpression.d.ts +1 -1
  57. package/dist/esm/inlineExpression.js +1 -1
  58. package/dist/esm/links/github.js +7 -7
  59. package/dist/esm/links/index.js +9 -9
  60. package/dist/esm/links/rrid.js +4 -4
  61. package/dist/esm/links/wiki.js +3 -3
  62. package/dist/esm/math.js +2 -2
  63. package/dist/esm/proof.js +8 -8
  64. package/dist/esm/tabs.js +8 -8
  65. package/dist/esm/unknown.d.ts +1 -1
  66. package/dist/esm/unknown.js +1 -1
  67. package/dist/types/extensions/chemicalFormula.d.ts +1 -1
  68. package/dist/types/extensions/siunits.d.ts +1 -1
  69. package/dist/types/footnotes.d.ts +1 -1
  70. package/dist/types/iframe.d.ts +1 -1
  71. package/dist/types/inlineExpression.d.ts +1 -1
  72. package/dist/types/unknown.d.ts +1 -1
  73. package/package.json +8 -20
@@ -1,7 +1,7 @@
1
1
  import type { NodeRenderer } from '@myst-theme/providers';
2
2
  export declare const InlineExpression: NodeRenderer;
3
3
  declare const INLINE_EXPRESSION_RENDERERS: {
4
- inlineExpression: NodeRenderer<any>;
4
+ inlineExpression: NodeRenderer;
5
5
  };
6
6
  export default INLINE_EXPRESSION_RENDERERS;
7
7
  //# sourceMappingURL=inlineExpression.d.ts.map
@@ -12,7 +12,7 @@ const InlineExpression = (node, children) => {
12
12
  return (0, jsx_runtime_1.jsx)(inlineError_1.InlineError, { value: `${(_b = node.result) === null || _b === void 0 ? void 0 : _b.ename}: ${(_c = node.result) === null || _c === void 0 ? void 0 : _c.evalue}` });
13
13
  }
14
14
  // TODO: something with Thebe in the future!
15
- return ((0, jsx_runtime_1.jsx)("span", Object.assign({ title: `Evaluated from: "${node.value}"` }, { children: children }), node.key));
15
+ return ((0, jsx_runtime_1.jsx)("span", { title: `Evaluated from: "${node.value}"`, children: children }, node.key));
16
16
  };
17
17
  exports.InlineExpression = InlineExpression;
18
18
  const INLINE_EXPRESSION_RENDERERS = {
@@ -46,7 +46,7 @@ function GithubFilePreview({ url, raw, org, repo, file, from, to, open, }) {
46
46
  const { data, error } = useLoadWhenOpen(open, raw, fetcher);
47
47
  let code = data;
48
48
  if (error) {
49
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "hover-document w-[500px] sm:max-w-[500px]" }, { children: [(0, jsx_runtime_1.jsx)("a", Object.assign({ href: url, className: "block text-inherit hover:text-inherit", target: "_blank", rel: "noreferrer" }, { children: (0, jsx_runtime_1.jsx)(ArrowTopRightOnSquareIcon_1.default, { className: "w-4 h-4 float-right" }) })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "mt-2" }, { children: ["Error loading \"", file, "\" from GitHub."] }))] })));
49
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "hover-document w-[500px] sm:max-w-[500px]", children: [(0, jsx_runtime_1.jsx)("a", { href: url, className: "block text-inherit hover:text-inherit", target: "_blank", rel: "noreferrer", children: (0, jsx_runtime_1.jsx)(ArrowTopRightOnSquareIcon_1.default, { className: "w-4 h-4 float-right" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-2", children: ["Error loading \"", file, "\" from GitHub."] })] }));
50
50
  }
51
51
  const lang = extToLanguage(file === null || file === void 0 ? void 0 : file.split('.').pop());
52
52
  let startingLineNumber = 1;
@@ -79,29 +79,29 @@ function GithubIssuePreview({ url, org, repo, issue_number, open, }) {
79
79
  var _a, _b;
80
80
  const { data, error } = useLoadWhenOpen(open, `https://api.github.com/repos/${org}/${repo}/issues/${issue_number}`, jsonFetcher);
81
81
  if (!data && !error) {
82
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "hover-document w-[500px] sm:max-w-[500px] animate-pulse" }, { children: "Loading..." })));
82
+ return ((0, jsx_runtime_1.jsx)("div", { className: "hover-document w-[500px] sm:max-w-[500px] animate-pulse", children: "Loading..." }));
83
83
  }
84
84
  const resp = data;
85
85
  if (error) {
86
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "hover-document" }, { children: [(0, jsx_runtime_1.jsx)("a", Object.assign({ href: url, className: "block text-inherit hover:text-inherit", target: "_blank", rel: "noreferrer" }, { children: (0, jsx_runtime_1.jsx)(ArrowTopRightOnSquareIcon_1.default, { className: "w-4 h-4 float-right" }) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "mt-2" }, { children: "Error loading from GitHub." }))] })));
86
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "hover-document", children: [(0, jsx_runtime_1.jsx)("a", { href: url, className: "block text-inherit hover:text-inherit", target: "_blank", rel: "noreferrer", children: (0, jsx_runtime_1.jsx)(ArrowTopRightOnSquareIcon_1.default, { className: "w-4 h-4 float-right" }) }), (0, jsx_runtime_1.jsx)("div", { className: "mt-2", children: "Error loading from GitHub." })] }));
87
87
  }
88
88
  const dateString = new Date(resp.created_at).toLocaleDateString('en-US', {
89
89
  year: 'numeric',
90
90
  month: 'long',
91
91
  day: 'numeric',
92
92
  });
93
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "hover-document w-[400px] sm:max-w-[400px] p-3" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "text-xs font-light" }, { children: [org, "/", repo] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "text-lg font-bold my-2 dark:text-white" }, { children: [resp.state === 'open' && ((0, jsx_runtime_1.jsx)(PlusCircleIcon_1.default, { className: "w-6 h-6 inline-block text-green-700 dark:text-green-500 mr-2 -translate-y-px" })), resp.state === 'closed' && ((0, jsx_runtime_1.jsx)(CheckCircleIcon_1.default, { className: "w-6 h-6 inline-block text-purple-700 dark:text-purple-500 mr-2 -translate-y-px" })), resp.title] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "text-xs font-light" }, { children: ["#", issue_number, " opened on ", dateString, " by", ' ', (0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "font-normal" }, { children: ["@", resp.user.login] }))] })), (0, jsx_runtime_1.jsx)("p", Object.assign({ className: "text-md max-h-[4rem] overflow-hidden" }, { children: resp.body })), ((_a = resp.labels) === null || _a === void 0 ? void 0 : _a.length) > 0 && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex flex-wrap" }, { children: (_b = resp.labels) === null || _b === void 0 ? void 0 : _b.map((label) => ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: (0, classnames_1.default)('mr-1 text-xs inline-flex items-center px-2 py-0.5 rounded-full', {
93
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "hover-document w-[400px] sm:max-w-[400px] p-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-xs font-light", children: [org, "/", repo] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg font-bold my-2 dark:text-white", children: [resp.state === 'open' && ((0, jsx_runtime_1.jsx)(PlusCircleIcon_1.default, { className: "w-6 h-6 inline-block text-green-700 dark:text-green-500 mr-2 -translate-y-px" })), resp.state === 'closed' && ((0, jsx_runtime_1.jsx)(CheckCircleIcon_1.default, { className: "w-6 h-6 inline-block text-purple-700 dark:text-purple-500 mr-2 -translate-y-px" })), resp.title] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-xs font-light", children: ["#", issue_number, " opened on ", dateString, " by", ' ', (0, jsx_runtime_1.jsxs)("span", { className: "font-normal", children: ["@", resp.user.login] })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-md max-h-[4rem] overflow-hidden", children: resp.body }), ((_a = resp.labels) === null || _a === void 0 ? void 0 : _a.length) > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "flex flex-wrap", children: (_b = resp.labels) === null || _b === void 0 ? void 0 : _b.map((label) => ((0, jsx_runtime_1.jsx)("span", { className: (0, classnames_1.default)('mr-1 text-xs inline-flex items-center px-2 py-0.5 rounded-full', {
94
94
  'text-white': useWhiteTextColor(label.color),
95
- }), style: { backgroundColor: `#${label.color}` } }, { children: label.name }), label.id))) })))] })));
95
+ }), style: { backgroundColor: `#${label.color}` }, children: label.name }, label.id))) }))] }));
96
96
  }
97
97
  function GithubLink({ kind, children, url, org, repo, raw, file, from, to, issue_number, }) {
98
- return ((0, jsx_runtime_1.jsx)(HoverPopover_1.HoverPopover, Object.assign({ card: ({ load }) => {
98
+ return ((0, jsx_runtime_1.jsx)(HoverPopover_1.HoverPopover, { card: ({ load }) => {
99
99
  if (kind === 'file') {
100
100
  return ((0, jsx_runtime_1.jsx)(GithubFilePreview, { url: url, raw: raw, file: file, from: from, to: to, open: load, org: org, repo: repo }));
101
101
  }
102
102
  if (kind === 'issue') {
103
103
  return ((0, jsx_runtime_1.jsx)(GithubIssuePreview, { url: url, open: load, org: org, issue_number: issue_number, repo: repo }));
104
104
  }
105
- } }, { children: (0, jsx_runtime_1.jsx)("a", Object.assign({ href: url, className: "italic", target: "_blank", rel: "noreferrer" }, { children: children })) })));
105
+ }, children: (0, jsx_runtime_1.jsx)("a", { href: url, className: "italic", target: "_blank", rel: "noreferrer", children: children }) }));
106
106
  }
107
107
  exports.GithubLink = GithubLink;
@@ -30,9 +30,9 @@ function InternalLink({ url, children }) {
30
30
  const baseurl = (0, providers_1.useBaseurl)();
31
31
  const skipPreview = !page || (!page.description && !page.thumbnail);
32
32
  if (!page || skipPreview) {
33
- return ((0, jsx_runtime_1.jsx)(Link, Object.assign({ to: (0, providers_1.withBaseurl)(url, baseurl), prefetch: "intent" }, { children: children })));
33
+ return ((0, jsx_runtime_1.jsx)(Link, { to: (0, providers_1.withBaseurl)(url, baseurl), prefetch: "intent", children: children }));
34
34
  }
35
- return ((0, jsx_runtime_1.jsx)(HoverPopover_1.HoverPopover, Object.assign({ card: (0, jsx_runtime_1.jsx)(LinkCard_1.LinkCard, { internal: true, url: url, title: page.title, description: page.description, thumbnail: page.thumbnailOptimized || page.thumbnail }) }, { children: (0, jsx_runtime_1.jsx)(Link, Object.assign({ to: (0, providers_1.withBaseurl)(url, baseurl), prefetch: "intent" }, { children: children })) })));
35
+ return ((0, jsx_runtime_1.jsx)(HoverPopover_1.HoverPopover, { card: (0, jsx_runtime_1.jsx)(LinkCard_1.LinkCard, { internal: true, url: url, title: page.title, description: page.description, thumbnail: page.thumbnailOptimized || page.thumbnail }), children: (0, jsx_runtime_1.jsx)(Link, { to: (0, providers_1.withBaseurl)(url, baseurl), prefetch: "intent", children: children }) }));
36
36
  }
37
37
  const link = (node, children) => {
38
38
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
@@ -40,16 +40,16 @@ const link = (node, children) => {
40
40
  const protocol = node.protocol;
41
41
  switch (protocol) {
42
42
  case 'wiki':
43
- return ((0, jsx_runtime_1.jsx)(wiki_1.WikiLink, Object.assign({ url: node.url, page: (_b = node.data) === null || _b === void 0 ? void 0 : _b.page, wiki: (_c = node.data) === null || _c === void 0 ? void 0 : _c.wiki }, { children: children }), node.key));
43
+ return ((0, jsx_runtime_1.jsx)(wiki_1.WikiLink, { url: node.url, page: (_b = node.data) === null || _b === void 0 ? void 0 : _b.page, wiki: (_c = node.data) === null || _c === void 0 ? void 0 : _c.wiki, children: children }, node.key));
44
44
  case 'github':
45
- return ((0, jsx_runtime_1.jsx)(github_1.GithubLink, Object.assign({ kind: (_d = node.data) === null || _d === void 0 ? void 0 : _d.kind, url: node.url, org: (_e = node.data) === null || _e === void 0 ? void 0 : _e.org, repo: (_f = node.data) === null || _f === void 0 ? void 0 : _f.repo, raw: (_g = node.data) === null || _g === void 0 ? void 0 : _g.raw, file: (_h = node.data) === null || _h === void 0 ? void 0 : _h.file, from: (_j = node.data) === null || _j === void 0 ? void 0 : _j.from, to: (_k = node.data) === null || _k === void 0 ? void 0 : _k.to, issue_number: (_l = node.data) === null || _l === void 0 ? void 0 : _l.issue_number }, { children: children }), node.key));
45
+ return ((0, jsx_runtime_1.jsx)(github_1.GithubLink, { kind: (_d = node.data) === null || _d === void 0 ? void 0 : _d.kind, url: node.url, org: (_e = node.data) === null || _e === void 0 ? void 0 : _e.org, repo: (_f = node.data) === null || _f === void 0 ? void 0 : _f.repo, raw: (_g = node.data) === null || _g === void 0 ? void 0 : _g.raw, file: (_h = node.data) === null || _h === void 0 ? void 0 : _h.file, from: (_j = node.data) === null || _j === void 0 ? void 0 : _j.from, to: (_k = node.data) === null || _k === void 0 ? void 0 : _k.to, issue_number: (_l = node.data) === null || _l === void 0 ? void 0 : _l.issue_number, children: children }, node.key));
46
46
  case 'rrid':
47
47
  return (0, jsx_runtime_1.jsx)(rrid_1.RRIDLink, { rrid: (_m = node.data) === null || _m === void 0 ? void 0 : _m.rrid }, node.key);
48
48
  default:
49
49
  if (internal) {
50
- return ((0, jsx_runtime_1.jsx)(InternalLink, Object.assign({ url: node.url }, { children: children }), node.key));
50
+ return ((0, jsx_runtime_1.jsx)(InternalLink, { url: node.url, children: children }, node.key));
51
51
  }
52
- return ((0, jsx_runtime_1.jsx)("a", Object.assign({ target: "_blank", href: node.url, rel: "noreferrer" }, { children: children }), node.key));
52
+ return ((0, jsx_runtime_1.jsx)("a", { target: "_blank", href: node.url, rel: "noreferrer", children: children }, node.key));
53
53
  }
54
54
  };
55
55
  exports.link = link;
@@ -58,11 +58,11 @@ const linkBlock = (node, children) => {
58
58
  const iconClass = 'w-6 h-6 self-center transition-transform flex-none ml-3';
59
59
  const containerClass = 'flex-1 p-4 my-5 block border font-normal hover:border-blue-500 dark:hover:border-blue-400 no-underline hover:text-blue-600 dark:hover:text-blue-400 text-gray-600 dark:text-gray-100 border-gray-200 dark:border-gray-500 rounded shadow-sm hover:shadow-lg dark:shadow-neutral-700';
60
60
  const internal = (_a = node.internal) !== null && _a !== void 0 ? _a : false;
61
- const nested = ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-middle h-full" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex-grow" }, { children: [node.title, (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-xs text-gray-500 dark:text-gray-400" }, { children: children }))] })), internal && (0, jsx_runtime_1.jsx)(LinkIcon_1.default, { className: iconClass }), !internal && (0, jsx_runtime_1.jsx)(ArrowTopRightOnSquareIcon_1.default, { className: iconClass })] })));
61
+ const nested = ((0, jsx_runtime_1.jsxs)("div", { className: "flex align-middle h-full", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex-grow", children: [node.title, (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-gray-500 dark:text-gray-400", children: children })] }), internal && (0, jsx_runtime_1.jsx)(LinkIcon_1.default, { className: iconClass }), !internal && (0, jsx_runtime_1.jsx)(ArrowTopRightOnSquareIcon_1.default, { className: iconClass })] }));
62
62
  if (internal) {
63
- return ((0, jsx_runtime_1.jsx)("a", Object.assign({ href: node.url, className: containerClass }, { children: nested }), node.key));
63
+ return ((0, jsx_runtime_1.jsx)("a", { href: node.url, className: containerClass, children: nested }, node.key));
64
64
  }
65
- return ((0, jsx_runtime_1.jsx)("a", Object.assign({ className: containerClass, target: "_blank", rel: "noopener noreferrer", href: node.url }, { children: nested }), node.key));
65
+ return ((0, jsx_runtime_1.jsx)("a", { className: containerClass, target: "_blank", rel: "noopener noreferrer", href: node.url, children: nested }, node.key));
66
66
  };
67
67
  exports.linkBlock = linkBlock;
68
68
  const LINK_RENDERERS = {
@@ -16,19 +16,19 @@ function RRIDChild({ rrid }) {
16
16
  var _a, _b, _c, _d, _e, _f, _g;
17
17
  const { data, error } = (0, swr_1.default)(`https://scicrunch.org/resolver/${rrid}.json`, fetcher);
18
18
  if (!data && !error) {
19
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "hover-document w-[500px] sm:max-w-[500px] animate-pulse" }, { children: "Loading..." })));
19
+ return ((0, jsx_runtime_1.jsx)("div", { className: "hover-document w-[500px] sm:max-w-[500px] animate-pulse", children: "Loading..." }));
20
20
  }
21
21
  const hit = (_b = (_a = data === null || data === void 0 ? void 0 : data.hits) === null || _a === void 0 ? void 0 : _a.hits) === null || _b === void 0 ? void 0 : _b[0];
22
22
  if (error || !hit) {
23
- return (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "hover-document w-[500px] sm:max-w-[500px]" }, { children: ["Error loading ", rrid, "."] }));
23
+ return (0, jsx_runtime_1.jsxs)("div", { className: "hover-document w-[500px] sm:max-w-[500px]", children: ["Error loading ", rrid, "."] });
24
24
  }
25
25
  const { name: title, curie, description, supercategory, keywords, types: categories, } = (_d = (_c = hit === null || hit === void 0 ? void 0 : hit._source) === null || _c === void 0 ? void 0 : _c.item) !== null && _d !== void 0 ? _d : {};
26
26
  const category = (_e = supercategory === null || supercategory === void 0 ? void 0 : supercategory[0]) === null || _e === void 0 ? void 0 : _e.name;
27
27
  const types = (_f = categories === null || categories === void 0 ? void 0 : categories.map(({ name }) => name)) !== null && _f !== void 0 ? _f : [];
28
28
  const tags = (_g = keywords === null || keywords === void 0 ? void 0 : keywords.map(({ keyword }) => keyword)) !== null && _g !== void 0 ? _g : [];
29
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "hover-document w-[500px] sm:max-w-[500px] p-3" }, { children: [(0, jsx_runtime_1.jsxs)("p", Object.assign({ className: "text-sm font-light" }, { children: ["RRID: ", category] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "text-xl font-bold mb-4" }, { children: [title, " ", (0, jsx_runtime_1.jsx)("code", { children: curie })] })), (0, jsx_runtime_1.jsx)("p", Object.assign({ className: "text-md" }, { children: description })), types.length > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-xs font-thin my-2" }, { children: "Categories" })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex flex-wrap ml-1" }, { children: types === null || types === void 0 ? void 0 : types.map((tag) => ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "ml-1 text-xs inline-flex items-center uppercase px-3 py-1 rounded-full border" }, { children: tag })))) }))] })), tags.length > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-xs font-thin my-2" }, { children: "Tags" })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex flex-wrap ml-1" }, { children: tags === null || tags === void 0 ? void 0 : tags.map((tag) => ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "ml-1 text-xs inline-flex items-center uppercase px-3 py-1 rounded-full border" }, { children: tag })))) }))] }))] })));
29
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "hover-document w-[500px] sm:max-w-[500px] p-3", children: [(0, jsx_runtime_1.jsxs)("p", { className: "text-sm font-light", children: ["RRID: ", category] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-xl font-bold mb-4", children: [title, " ", (0, jsx_runtime_1.jsx)("code", { children: curie })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-md", children: description }), types.length > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs font-thin my-2", children: "Categories" }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-wrap ml-1", children: types === null || types === void 0 ? void 0 : types.map((tag) => ((0, jsx_runtime_1.jsx)("span", { className: "ml-1 text-xs inline-flex items-center uppercase px-3 py-1 rounded-full border", children: tag }))) })] })), tags.length > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs font-thin my-2", children: "Tags" }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-wrap ml-1", children: tags === null || tags === void 0 ? void 0 : tags.map((tag) => ((0, jsx_runtime_1.jsx)("span", { className: "ml-1 text-xs inline-flex items-center uppercase px-3 py-1 rounded-full border", children: tag }))) })] }))] }));
30
30
  }
31
31
  function RRIDLink({ rrid }) {
32
- return ((0, jsx_runtime_1.jsx)(HoverPopover_1.HoverPopover, Object.assign({ card: (0, jsx_runtime_1.jsx)(RRIDChild, { rrid: rrid }) }, { children: (0, jsx_runtime_1.jsxs)("a", Object.assign({ href: `https://scicrunch.org/resolver/${rrid}`, target: "_blank", rel: "noopener noreferrer" }, { children: ["RRID: ", (0, jsx_runtime_1.jsx)("cite", Object.assign({ className: "italic" }, { children: rrid }))] })) })));
32
+ return ((0, jsx_runtime_1.jsx)(HoverPopover_1.HoverPopover, { card: (0, jsx_runtime_1.jsx)(RRIDChild, { rrid: rrid }), children: (0, jsx_runtime_1.jsxs)("a", { href: `https://scicrunch.org/resolver/${rrid}`, target: "_blank", rel: "noopener noreferrer", children: ["RRID: ", (0, jsx_runtime_1.jsx)("cite", { className: "italic", children: rrid })] }) }));
33
33
  }
34
34
  exports.RRIDLink = RRIDLink;
@@ -9,7 +9,7 @@ const swr_1 = __importDefault(require("swr"));
9
9
  const ArrowTopRightOnSquareIcon_1 = __importDefault(require("@heroicons/react/24/outline/ArrowTopRightOnSquareIcon"));
10
10
  const HoverPopover_1 = require("../components/HoverPopover");
11
11
  const LinkCard_1 = require("../components/LinkCard");
12
- const WikiTextMark = () => ((0, jsx_runtime_1.jsx)("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", version: "1.1", id: "svg3400", viewBox: "0 0 500 85", className: "h-4" }, { children: (0, jsx_runtime_1.jsxs)("g", Object.assign({ transform: "translate(-357.71336,-784.65111)" }, { children: [(0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 412.98736,806.72288 c 0,0 -1.468,-2.984 -1.968,-3.976 -3.336,-6.612 -3.264,-6.964 -6.636,-7.408 -0.944,-0.124 -1.432,-0.244 -1.432,-0.712 v -2.092 l 0.284,-0.204 c 6.092,-0.008 19.648,-0.008 19.648,-0.008 l 0.52,0.172 v 2.084 c 0,0.476 -0.34,0.72 -1.032,0.72 l -1.424,0.204 c -3.6,0.28 -3.012,1.752 -0.62,6.516 l 22.708,46.46 0.776,0.212 20.16,-47.844 c 0.7,-1.928 0.592,-3.296 -0.308,-4.1 -0.904,-0.784 -1.54,-1.248 -3.876,-1.344 l -1.892,-0.096 c -0.232,0 -0.452,-0.084 -0.664,-0.24 -0.208,-0.148 -0.316,-0.344 -0.316,-0.58 v -1.992 l 0.288,-0.204 c 5.68,0 22.776,0 22.776,0 l 0.232,0.204 v 1.992 c 0,0.54 -0.308,0.812 -0.916,0.812 -2.984,0.132 -5.196,0.78 -6.628,1.936 -1.436,1.164 -2.556,2.768 -3.36,4.852 0,0 -18.54,42.436 -24.884,56.54 -2.428,4.624 -4.816,4.2 -6.916,-0.132 -4.436,-9.136 -16.928,-36.852 -16.928,-36.852 l -7.592,-14.92 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 449.37136,792.29888 c 0,0 -12.812,-0.04 -18.516,0 l -0.284,0.204 v 1.984 c 0,0.244 0.104,0.436 0.312,0.584 0.212,0.156 0.428,0.236 0.66,0.236 l 0.916,0.1 c 2.332,0.096 3.404,0.708 3.724,1.092 0.556,0.68 0.832,1.416 -0.516,4.356 l -23.92,47.708 -0.628,-0.164 c 0,0 -17.132,-36.124 -22.092,-48.208 -0.516,-1.252 -0.748,-2.18 -0.748,-2.752 0,-1.228 1.108,-1.892 3.324,-1.984 l 2.584,-0.108 c 0.684,0 1.032,-0.264 1.032,-0.812 v -1.984 l -0.232,-0.204 c 0,0 -20.52,-0.024 -24.76,0 l -0.232,0.204 v 2.084 c 0,0.376 0.476,0.608 1.432,0.712 2.604,0.14 4.316,0.556 5.14,1.248 0.82,0.7 1.688,2.468 2.84,5.224 6.228,14.96 19.46,41.656 25.904,56.86 1.856,4.152 4.188,4.796 7.02,-0.128 4.904,-9.096 18.2,-36.872 18.2,-36.872 l 10.472,-19.584 c 1.22,-2.068 2.396,-3.912 2.992,-4.772 1.092,-1.572 1.704,-1.868 4.688,-2.008 0.608,0 0.916,-0.272 0.916,-0.82 v -1.984 l -0.228,-0.212 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 488.32736,854.23088 c 0,2.288 1.04,3.64 4.368,3.952 l 2.184,0.212 c 0.312,0 0.624,0.204 0.624,0.62 v 2.184 l -0.104,0.212 c 0,0 -7.904,-0.212 -11.128,-0.212 -2.912,0 -11.024,0.212 -11.024,0.212 l -0.208,-0.212 v -2.184 c 0,-0.416 0.312,-0.62 0.728,-0.62 l 2.08,-0.212 c 3.432,-0.312 4.472,-1.976 4.472,-3.952 v -34.632 c 0,-2.284 -1.252,-2.916 -4.472,-3.22 l -2.08,-0.216 c -0.416,0 -0.728,-0.096 -0.728,-0.416 v -2.396 l 0.104,-0.208 c 0,0 8.216,0.208 11.44,0.208 2.808,0 10.816,-0.208 10.816,-0.208 l 0.104,0.208 v 2.288 c 0,0.312 -0.208,0.52 -0.624,0.52 l -2.184,0.212 c -3.224,0.308 -4.368,1.144 -4.368,3.228 v 34.632 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 519.01936,854.23088 c 0,2.288 1.352,3.432 4.368,3.952 l 1.144,0.212 c 0.312,0.1 0.624,0.204 0.624,0.62 v 2.184 l -0.104,0.212 c 0,0 -6.552,-0.212 -9.672,-0.212 -2.912,0 -11.44,0.212 -11.44,0.212 l -0.208,-0.212 v -2.184 c 0,-0.416 0.312,-0.62 0.728,-0.62 l 2.08,-0.212 c 3.12,-0.312 4.472,-1.976 4.472,-3.952 v -34.632 c 0,-2.284 -1.144,-2.916 -4.472,-3.22 l -2.08,-0.216 c -0.416,0 -0.728,-0.096 -0.728,-0.416 v -2.396 l 0.104,-0.208 c 0,0 8.528,0.208 11.752,0.208 2.916,0 9.464,-0.208 9.464,-0.208 l 0.104,0.208 v 2.288 c 0,0.312 -0.208,0.416 -0.624,0.52 l -1.144,0.212 c -3.224,0.62 -4.368,1.144 -4.368,3.228 v 15.704 c 3.432,0 5.408,-1.764 9.984,-6.656 4.16,-4.58 7.384,-8.42 7.384,-10.4 0,-0.836 -0.936,-1.768 -3.016,-2.084 -0.416,-0.1 -0.624,-0.208 -0.624,-0.52 v -2.396 l 0.104,-0.1 c 0,0 8.424,0.208 11.44,0.208 2.704,0 7.28,-0.208 7.28,-0.208 l 0.312,0.1 v 2.396 c 0,0.312 -0.312,0.52 -0.832,0.52 -4.056,0.312 -6.864,0.52 -10.608,4.784 l -8.944,10.292 c -1.768,1.876 -2.392,3.016 -2.392,3.852 0,0.624 0.416,1.14 0.936,1.764 l 15.704,18.928 c 1.248,1.452 3.744,2.08 5.824,2.492 l 0.52,0.1 c 0.312,0.104 0.728,0.312 0.728,0.624 v 2.184 l -0.312,0.104 c 0,0 -5.512,-0.104 -8.424,-0.104 -2.6,0 -6.344,0.104 -6.344,0.104 l -0.104,-0.104 v -1.248 c 0,-1.356 -0.104,-2.492 -1.56,-4.156 l -11.544,-14.356 c -1.56,-2.084 -3.224,-2.596 -5.512,-2.596 v 15.404 l 0,0 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 575.08736,854.23088 c 0,2.288 1.04,3.64 4.368,3.952 l 2.184,0.212 c 0.312,0 0.624,0.204 0.624,0.62 v 2.184 l -0.104,0.212 c 0,0 -7.904,-0.212 -11.128,-0.212 -2.912,0 -11.024,0.212 -11.024,0.212 l -0.208,-0.212 v -2.184 c 0,-0.416 0.312,-0.62 0.728,-0.62 l 2.08,-0.212 c 3.432,-0.312 4.472,-1.976 4.472,-3.952 v -34.632 c 0,-2.284 -1.248,-2.916 -4.472,-3.22 l -2.08,-0.216 c -0.416,0 -0.728,-0.096 -0.728,-0.416 v -2.396 l 0.104,-0.208 c 0,0 8.216,0.208 11.44,0.208 2.808,0 10.816,-0.208 10.816,-0.208 l 0.104,0.208 v 2.288 c 0,0.312 -0.208,0.52 -0.624,0.52 l -2.184,0.212 c -3.224,0.308 -4.368,1.144 -4.368,3.228 v 34.632 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 597.55936,819.80288 c 0,-3.224 -1.352,-3.328 -6.24,-3.64 -0.624,0 -0.728,-0.308 -0.728,-0.52 v -2.392 l 0.208,-0.104 c 1.56,0 7.696,0.208 10.712,0.208 2.912,0 7.072,-0.208 10.92,-0.208 14.76,0 17.464,7.276 17.464,12.692 0,6.244 -3.016,16.016 -17.776,16.016 -2.6,0 -4.68,-0.212 -6.556,-1.04 v 13.928 c 0,2.288 1.248,2.812 4.58,3.328 l 2.084,0.312 c 0.416,0.104 0.728,0.212 0.728,0.624 v 2.184 l -0.1,0.208 c 0,0 -8.32,-0.208 -11.544,-0.208 -2.912,0 -10.712,0.208 -10.712,0.208 l -0.104,-0.208 v -2.184 c 0,-0.416 0.208,-0.52 0.624,-0.624 l 2.184,-0.312 c 3.224,-0.416 4.264,-1.352 4.264,-3.328 l -0.008,-34.94 0,0 z m 8.008,18.1 c 2.08,0.836 4.68,0.936 6.76,0.936 6.244,0 9.248,-3.752 9.248,-11.752 0,-8.944 -4.056,-10.92 -9.768,-10.92 -4.996,0 -6.244,0.936 -6.244,3.64 l 0.004,18.096 0,0 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 647.80736,861.19888 c -3.12,0 -10.292,0.212 -10.292,0.212 l -0.108,-0.212 v -2.288 c 0,-0.204 0.108,-0.516 0.624,-0.516 l 2.396,-0.212 c 3.228,-0.312 4.164,-2.392 4.164,-4.468 v -34.32 c 0,-2.4 -1.252,-2.812 -4.164,-3.016 l -2.396,-0.216 c -0.624,-0.096 -0.624,-0.308 -0.624,-0.416 v -2.396 l 0.108,-0.208 c 0,0 8.108,0.208 11.228,0.208 h 15.288 c 3.12,0 10.508,-0.208 10.508,-0.208 l 0.212,0.208 c 0.1,4.472 0.828,8.536 1.56,12.484 l -2.596,0.416 c -1.14,-3.852 -3.116,-9.36 -9.772,-9.36 h -8.32 c -1.976,0 -3.016,0.728 -3.016,2.492 v 15.084 h 7.796 c 2.916,0 3.64,-1.248 4.06,-3.328 l 0.62,-2.184 c 0,-0.312 0.212,-0.524 0.624,-0.524 h 1.764 c 0.212,0 0.212,0.108 0.212,0.312 -0.212,2.288 -0.624,5.204 -0.624,7.7 0,2.596 0.416,4.784 0.624,7.176 l -0.212,0.212 h -1.764 c -0.516,0 -0.732,-0.212 -0.732,-0.524 l -0.52,-2.284 c -0.416,-2.084 -1.352,-3.228 -4.064,-3.228 h -7.792 v 15.916 c 0,1.972 1.136,3.948 3.016,3.948 h 9.88 c 5.304,0 8.22,-3.328 9.464,-8.74 l 2.596,0.312 -2.084,11.956 -0.208,0.208 c 0,0 -6.136,-0.208 -9.256,-0.208 l -18.2,0.012 0,0 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 686.91936,858.39488 2.392,-0.212 c 3.124,-0.312 4.164,-1.248 4.164,-4.468 v -34.32 c 0,-2.712 -0.736,-2.712 -4.164,-3.016 l -2.28,-0.216 c -0.416,0 -0.736,-0.208 -0.736,-0.52 v -2.288 l 0.1,-0.208 c 0,0 9.156,0.208 11.032,0.208 1.968,0 11.024,-0.208 13.728,-0.208 17.368,0 25.9,10.816 25.9,24.648 0,18.204 -12.9,23.604 -24.44,23.604 -8.32,0 -11.956,-0.208 -15.18,-0.208 -3.124,0 -11.028,0.208 -11.028,0.208 l -0.104,-0.208 v -2.184 c -0.008,-0.3 0.204,-0.612 0.616,-0.612 z m 23.196,0 c 11.436,0 17.892,-4.26 17.892,-18.828 0,-10.812 -2.396,-23.404 -19.868,-23.404 -4.056,0 -6.656,0.624 -6.656,3.232 v 34.32 c 0,2.904 0.724,4.68 8.632,4.68 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 761.60736,854.23088 c 0,2.288 1.04,3.64 4.368,3.952 l 2.184,0.212 c 0.312,0 0.624,0.204 0.624,0.62 v 2.184 l -0.104,0.212 c 0,0 -7.904,-0.212 -11.124,-0.212 -2.916,0 -11.024,0.212 -11.024,0.212 l -0.212,-0.212 v -2.184 c 0,-0.416 0.312,-0.62 0.728,-0.62 l 2.084,-0.212 c 3.428,-0.312 4.472,-1.976 4.472,-3.952 v -34.632 c 0,-2.284 -1.252,-2.916 -4.472,-3.22 l -2.084,-0.216 c -0.416,0 -0.728,-0.096 -0.728,-0.416 v -2.396 l 0.104,-0.208 c 0,0 8.216,0.208 11.432,0.208 2.808,0 10.82,-0.208 10.82,-0.208 l 0.1,0.208 v 2.288 c 0,0.312 -0.212,0.52 -0.624,0.52 l -2.184,0.212 c -3.224,0.308 -4.368,1.144 -4.368,3.228 l 0.008,34.632 0,0 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 793.64736,858.18288 3.016,0.212 c 0.416,0 0.832,0.312 0.832,0.828 v 1.976 l -0.208,0.212 c 0,0 -11.336,-0.212 -13.832,-0.212 -2.708,0 -9.364,0.212 -9.364,0.212 l -0.212,-0.212 v -1.976 c 0,-0.516 0.312,-0.828 0.836,-0.828 4.58,-0.312 7.172,-1.148 10.084,-7.804 l 23.084,-54.084 c 1.14,-2.704 1.976,-3.748 3.54,-3.748 1.452,0 1.976,1.044 2.804,3.124 l 21.32,56.368 c 1.46,4.06 3.54,5.616 7.7,6.032 l 1.144,0.1 c 0.52,0 1.04,0.312 1.04,0.836 v 1.972 l -0.312,0.208 c 0,0 -8.008,-0.208 -12.064,-0.208 -3.64,0 -13.836,0.208 -13.836,0.208 l -0.1,-0.208 v -1.972 c 0,-0.524 0.208,-0.836 0.736,-0.836 l 2.912,-0.208 c 3.948,-0.308 5.412,-1.564 4.368,-4.472 l -6.344,-17.58 h -21.632 c -2.496,0 -3.12,0.416 -3.636,1.764 l -6.036,15.084 c -1.04,2.608 0.312,4.9 4.16,5.212 z m 25.48,-26.424 -10.088,-27.764 h -0.208 l -10.4,26.416 c -0.416,1.044 0.308,1.352 2.596,1.352 h 18.1 z" })] })) })));
12
+ const WikiTextMark = () => ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", version: "1.1", id: "svg3400", viewBox: "0 0 500 85", className: "h-4", children: (0, jsx_runtime_1.jsxs)("g", { transform: "translate(-357.71336,-784.65111)", children: [(0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 412.98736,806.72288 c 0,0 -1.468,-2.984 -1.968,-3.976 -3.336,-6.612 -3.264,-6.964 -6.636,-7.408 -0.944,-0.124 -1.432,-0.244 -1.432,-0.712 v -2.092 l 0.284,-0.204 c 6.092,-0.008 19.648,-0.008 19.648,-0.008 l 0.52,0.172 v 2.084 c 0,0.476 -0.34,0.72 -1.032,0.72 l -1.424,0.204 c -3.6,0.28 -3.012,1.752 -0.62,6.516 l 22.708,46.46 0.776,0.212 20.16,-47.844 c 0.7,-1.928 0.592,-3.296 -0.308,-4.1 -0.904,-0.784 -1.54,-1.248 -3.876,-1.344 l -1.892,-0.096 c -0.232,0 -0.452,-0.084 -0.664,-0.24 -0.208,-0.148 -0.316,-0.344 -0.316,-0.58 v -1.992 l 0.288,-0.204 c 5.68,0 22.776,0 22.776,0 l 0.232,0.204 v 1.992 c 0,0.54 -0.308,0.812 -0.916,0.812 -2.984,0.132 -5.196,0.78 -6.628,1.936 -1.436,1.164 -2.556,2.768 -3.36,4.852 0,0 -18.54,42.436 -24.884,56.54 -2.428,4.624 -4.816,4.2 -6.916,-0.132 -4.436,-9.136 -16.928,-36.852 -16.928,-36.852 l -7.592,-14.92 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 449.37136,792.29888 c 0,0 -12.812,-0.04 -18.516,0 l -0.284,0.204 v 1.984 c 0,0.244 0.104,0.436 0.312,0.584 0.212,0.156 0.428,0.236 0.66,0.236 l 0.916,0.1 c 2.332,0.096 3.404,0.708 3.724,1.092 0.556,0.68 0.832,1.416 -0.516,4.356 l -23.92,47.708 -0.628,-0.164 c 0,0 -17.132,-36.124 -22.092,-48.208 -0.516,-1.252 -0.748,-2.18 -0.748,-2.752 0,-1.228 1.108,-1.892 3.324,-1.984 l 2.584,-0.108 c 0.684,0 1.032,-0.264 1.032,-0.812 v -1.984 l -0.232,-0.204 c 0,0 -20.52,-0.024 -24.76,0 l -0.232,0.204 v 2.084 c 0,0.376 0.476,0.608 1.432,0.712 2.604,0.14 4.316,0.556 5.14,1.248 0.82,0.7 1.688,2.468 2.84,5.224 6.228,14.96 19.46,41.656 25.904,56.86 1.856,4.152 4.188,4.796 7.02,-0.128 4.904,-9.096 18.2,-36.872 18.2,-36.872 l 10.472,-19.584 c 1.22,-2.068 2.396,-3.912 2.992,-4.772 1.092,-1.572 1.704,-1.868 4.688,-2.008 0.608,0 0.916,-0.272 0.916,-0.82 v -1.984 l -0.228,-0.212 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 488.32736,854.23088 c 0,2.288 1.04,3.64 4.368,3.952 l 2.184,0.212 c 0.312,0 0.624,0.204 0.624,0.62 v 2.184 l -0.104,0.212 c 0,0 -7.904,-0.212 -11.128,-0.212 -2.912,0 -11.024,0.212 -11.024,0.212 l -0.208,-0.212 v -2.184 c 0,-0.416 0.312,-0.62 0.728,-0.62 l 2.08,-0.212 c 3.432,-0.312 4.472,-1.976 4.472,-3.952 v -34.632 c 0,-2.284 -1.252,-2.916 -4.472,-3.22 l -2.08,-0.216 c -0.416,0 -0.728,-0.096 -0.728,-0.416 v -2.396 l 0.104,-0.208 c 0,0 8.216,0.208 11.44,0.208 2.808,0 10.816,-0.208 10.816,-0.208 l 0.104,0.208 v 2.288 c 0,0.312 -0.208,0.52 -0.624,0.52 l -2.184,0.212 c -3.224,0.308 -4.368,1.144 -4.368,3.228 v 34.632 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 519.01936,854.23088 c 0,2.288 1.352,3.432 4.368,3.952 l 1.144,0.212 c 0.312,0.1 0.624,0.204 0.624,0.62 v 2.184 l -0.104,0.212 c 0,0 -6.552,-0.212 -9.672,-0.212 -2.912,0 -11.44,0.212 -11.44,0.212 l -0.208,-0.212 v -2.184 c 0,-0.416 0.312,-0.62 0.728,-0.62 l 2.08,-0.212 c 3.12,-0.312 4.472,-1.976 4.472,-3.952 v -34.632 c 0,-2.284 -1.144,-2.916 -4.472,-3.22 l -2.08,-0.216 c -0.416,0 -0.728,-0.096 -0.728,-0.416 v -2.396 l 0.104,-0.208 c 0,0 8.528,0.208 11.752,0.208 2.916,0 9.464,-0.208 9.464,-0.208 l 0.104,0.208 v 2.288 c 0,0.312 -0.208,0.416 -0.624,0.52 l -1.144,0.212 c -3.224,0.62 -4.368,1.144 -4.368,3.228 v 15.704 c 3.432,0 5.408,-1.764 9.984,-6.656 4.16,-4.58 7.384,-8.42 7.384,-10.4 0,-0.836 -0.936,-1.768 -3.016,-2.084 -0.416,-0.1 -0.624,-0.208 -0.624,-0.52 v -2.396 l 0.104,-0.1 c 0,0 8.424,0.208 11.44,0.208 2.704,0 7.28,-0.208 7.28,-0.208 l 0.312,0.1 v 2.396 c 0,0.312 -0.312,0.52 -0.832,0.52 -4.056,0.312 -6.864,0.52 -10.608,4.784 l -8.944,10.292 c -1.768,1.876 -2.392,3.016 -2.392,3.852 0,0.624 0.416,1.14 0.936,1.764 l 15.704,18.928 c 1.248,1.452 3.744,2.08 5.824,2.492 l 0.52,0.1 c 0.312,0.104 0.728,0.312 0.728,0.624 v 2.184 l -0.312,0.104 c 0,0 -5.512,-0.104 -8.424,-0.104 -2.6,0 -6.344,0.104 -6.344,0.104 l -0.104,-0.104 v -1.248 c 0,-1.356 -0.104,-2.492 -1.56,-4.156 l -11.544,-14.356 c -1.56,-2.084 -3.224,-2.596 -5.512,-2.596 v 15.404 l 0,0 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 575.08736,854.23088 c 0,2.288 1.04,3.64 4.368,3.952 l 2.184,0.212 c 0.312,0 0.624,0.204 0.624,0.62 v 2.184 l -0.104,0.212 c 0,0 -7.904,-0.212 -11.128,-0.212 -2.912,0 -11.024,0.212 -11.024,0.212 l -0.208,-0.212 v -2.184 c 0,-0.416 0.312,-0.62 0.728,-0.62 l 2.08,-0.212 c 3.432,-0.312 4.472,-1.976 4.472,-3.952 v -34.632 c 0,-2.284 -1.248,-2.916 -4.472,-3.22 l -2.08,-0.216 c -0.416,0 -0.728,-0.096 -0.728,-0.416 v -2.396 l 0.104,-0.208 c 0,0 8.216,0.208 11.44,0.208 2.808,0 10.816,-0.208 10.816,-0.208 l 0.104,0.208 v 2.288 c 0,0.312 -0.208,0.52 -0.624,0.52 l -2.184,0.212 c -3.224,0.308 -4.368,1.144 -4.368,3.228 v 34.632 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 597.55936,819.80288 c 0,-3.224 -1.352,-3.328 -6.24,-3.64 -0.624,0 -0.728,-0.308 -0.728,-0.52 v -2.392 l 0.208,-0.104 c 1.56,0 7.696,0.208 10.712,0.208 2.912,0 7.072,-0.208 10.92,-0.208 14.76,0 17.464,7.276 17.464,12.692 0,6.244 -3.016,16.016 -17.776,16.016 -2.6,0 -4.68,-0.212 -6.556,-1.04 v 13.928 c 0,2.288 1.248,2.812 4.58,3.328 l 2.084,0.312 c 0.416,0.104 0.728,0.212 0.728,0.624 v 2.184 l -0.1,0.208 c 0,0 -8.32,-0.208 -11.544,-0.208 -2.912,0 -10.712,0.208 -10.712,0.208 l -0.104,-0.208 v -2.184 c 0,-0.416 0.208,-0.52 0.624,-0.624 l 2.184,-0.312 c 3.224,-0.416 4.264,-1.352 4.264,-3.328 l -0.008,-34.94 0,0 z m 8.008,18.1 c 2.08,0.836 4.68,0.936 6.76,0.936 6.244,0 9.248,-3.752 9.248,-11.752 0,-8.944 -4.056,-10.92 -9.768,-10.92 -4.996,0 -6.244,0.936 -6.244,3.64 l 0.004,18.096 0,0 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 647.80736,861.19888 c -3.12,0 -10.292,0.212 -10.292,0.212 l -0.108,-0.212 v -2.288 c 0,-0.204 0.108,-0.516 0.624,-0.516 l 2.396,-0.212 c 3.228,-0.312 4.164,-2.392 4.164,-4.468 v -34.32 c 0,-2.4 -1.252,-2.812 -4.164,-3.016 l -2.396,-0.216 c -0.624,-0.096 -0.624,-0.308 -0.624,-0.416 v -2.396 l 0.108,-0.208 c 0,0 8.108,0.208 11.228,0.208 h 15.288 c 3.12,0 10.508,-0.208 10.508,-0.208 l 0.212,0.208 c 0.1,4.472 0.828,8.536 1.56,12.484 l -2.596,0.416 c -1.14,-3.852 -3.116,-9.36 -9.772,-9.36 h -8.32 c -1.976,0 -3.016,0.728 -3.016,2.492 v 15.084 h 7.796 c 2.916,0 3.64,-1.248 4.06,-3.328 l 0.62,-2.184 c 0,-0.312 0.212,-0.524 0.624,-0.524 h 1.764 c 0.212,0 0.212,0.108 0.212,0.312 -0.212,2.288 -0.624,5.204 -0.624,7.7 0,2.596 0.416,4.784 0.624,7.176 l -0.212,0.212 h -1.764 c -0.516,0 -0.732,-0.212 -0.732,-0.524 l -0.52,-2.284 c -0.416,-2.084 -1.352,-3.228 -4.064,-3.228 h -7.792 v 15.916 c 0,1.972 1.136,3.948 3.016,3.948 h 9.88 c 5.304,0 8.22,-3.328 9.464,-8.74 l 2.596,0.312 -2.084,11.956 -0.208,0.208 c 0,0 -6.136,-0.208 -9.256,-0.208 l -18.2,0.012 0,0 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 686.91936,858.39488 2.392,-0.212 c 3.124,-0.312 4.164,-1.248 4.164,-4.468 v -34.32 c 0,-2.712 -0.736,-2.712 -4.164,-3.016 l -2.28,-0.216 c -0.416,0 -0.736,-0.208 -0.736,-0.52 v -2.288 l 0.1,-0.208 c 0,0 9.156,0.208 11.032,0.208 1.968,0 11.024,-0.208 13.728,-0.208 17.368,0 25.9,10.816 25.9,24.648 0,18.204 -12.9,23.604 -24.44,23.604 -8.32,0 -11.956,-0.208 -15.18,-0.208 -3.124,0 -11.028,0.208 -11.028,0.208 l -0.104,-0.208 v -2.184 c -0.008,-0.3 0.204,-0.612 0.616,-0.612 z m 23.196,0 c 11.436,0 17.892,-4.26 17.892,-18.828 0,-10.812 -2.396,-23.404 -19.868,-23.404 -4.056,0 -6.656,0.624 -6.656,3.232 v 34.32 c 0,2.904 0.724,4.68 8.632,4.68 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 761.60736,854.23088 c 0,2.288 1.04,3.64 4.368,3.952 l 2.184,0.212 c 0.312,0 0.624,0.204 0.624,0.62 v 2.184 l -0.104,0.212 c 0,0 -7.904,-0.212 -11.124,-0.212 -2.916,0 -11.024,0.212 -11.024,0.212 l -0.212,-0.212 v -2.184 c 0,-0.416 0.312,-0.62 0.728,-0.62 l 2.084,-0.212 c 3.428,-0.312 4.472,-1.976 4.472,-3.952 v -34.632 c 0,-2.284 -1.252,-2.916 -4.472,-3.22 l -2.084,-0.216 c -0.416,0 -0.728,-0.096 -0.728,-0.416 v -2.396 l 0.104,-0.208 c 0,0 8.216,0.208 11.432,0.208 2.808,0 10.82,-0.208 10.82,-0.208 l 0.1,0.208 v 2.288 c 0,0.312 -0.212,0.52 -0.624,0.52 l -2.184,0.212 c -3.224,0.308 -4.368,1.144 -4.368,3.228 l 0.008,34.632 0,0 z" }), (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "m 793.64736,858.18288 3.016,0.212 c 0.416,0 0.832,0.312 0.832,0.828 v 1.976 l -0.208,0.212 c 0,0 -11.336,-0.212 -13.832,-0.212 -2.708,0 -9.364,0.212 -9.364,0.212 l -0.212,-0.212 v -1.976 c 0,-0.516 0.312,-0.828 0.836,-0.828 4.58,-0.312 7.172,-1.148 10.084,-7.804 l 23.084,-54.084 c 1.14,-2.704 1.976,-3.748 3.54,-3.748 1.452,0 1.976,1.044 2.804,3.124 l 21.32,56.368 c 1.46,4.06 3.54,5.616 7.7,6.032 l 1.144,0.1 c 0.52,0 1.04,0.312 1.04,0.836 v 1.972 l -0.312,0.208 c 0,0 -8.008,-0.208 -12.064,-0.208 -3.64,0 -13.836,0.208 -13.836,0.208 l -0.1,-0.208 v -1.972 c 0,-0.524 0.208,-0.836 0.736,-0.836 l 2.912,-0.208 c 3.948,-0.308 5.412,-1.564 4.368,-4.472 l -6.344,-17.58 h -21.632 c -2.496,0 -3.12,0.416 -3.636,1.764 l -6.036,15.084 c -1.04,2.608 0.312,4.9 4.16,5.212 z m 25.48,-26.424 -10.088,-27.764 h -0.208 l -10.4,26.416 c -0.416,1.044 0.308,1.352 2.596,1.352 h 18.1 z" })] }) }));
13
13
  const fetcher = (...args) => fetch(...args).then((res) => {
14
14
  if (res.status === 200)
15
15
  return res.json();
@@ -29,11 +29,11 @@ function WikiChild({ page, wiki, load }) {
29
29
  const url = (_b = (_a = content_urls === null || content_urls === void 0 ? void 0 : content_urls.desktop) === null || _a === void 0 ? void 0 : _a.page) !== null && _b !== void 0 ? _b : createWikiUrl(page);
30
30
  const image = thumbnail === null || thumbnail === void 0 ? void 0 : thumbnail.source;
31
31
  if (error) {
32
- return ((0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsxs)("a", Object.assign({ href: url, className: "block text-inherit hover:text-inherit", target: "_blank", rel: "noreferrer" }, { children: [(0, jsx_runtime_1.jsx)(ArrowTopRightOnSquareIcon_1.default, { className: "w-4 h-4 float-right" }), (0, jsx_runtime_1.jsx)(WikiTextMark, {})] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "mt-2" }, { children: ["Error loading \"", page, "\" from wikipedia."] }))] }));
32
+ return ((0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsxs)("a", { href: url, className: "block text-inherit hover:text-inherit", target: "_blank", rel: "noreferrer", children: [(0, jsx_runtime_1.jsx)(ArrowTopRightOnSquareIcon_1.default, { className: "w-4 h-4 float-right" }), (0, jsx_runtime_1.jsx)(WikiTextMark, {})] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-2", children: ["Error loading \"", page, "\" from wikipedia."] })] }));
33
33
  }
34
34
  return ((0, jsx_runtime_1.jsx)(LinkCard_1.LinkCard, { loading: !data, url: url, title: (0, jsx_runtime_1.jsx)(WikiTextMark, {}), thumbnail: image, description: extract }));
35
35
  }
36
36
  function WikiLink({ children, page, url, wiki, }) {
37
- return ((0, jsx_runtime_1.jsx)(HoverPopover_1.HoverPopover, Object.assign({ card: ({ load }) => (0, jsx_runtime_1.jsx)(WikiChild, { wiki: wiki, page: page, load: load }) }, { children: (0, jsx_runtime_1.jsx)("a", Object.assign({ href: url, className: "italic", target: "_blank", rel: "noreferrer" }, { children: children })) })));
37
+ return ((0, jsx_runtime_1.jsx)(HoverPopover_1.HoverPopover, { card: ({ load }) => (0, jsx_runtime_1.jsx)(WikiChild, { wiki: wiki, page: page, load: load }), children: (0, jsx_runtime_1.jsx)("a", { href: url, className: "italic", target: "_blank", rel: "noreferrer", children: children }) }));
38
38
  }
39
39
  exports.WikiLink = WikiLink;
package/dist/cjs/math.js CHANGED
@@ -10,10 +10,10 @@ const heading_1 = require("./heading");
10
10
  const mathRenderer = (node) => {
11
11
  if (node.type === 'math') {
12
12
  if (node.error || !node.html) {
13
- return ((0, jsx_runtime_1.jsxs)("pre", Object.assign({ title: node.message }, { children: [(0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "text-red-500" }, { children: [(0, jsx_runtime_1.jsx)(ExclamationCircleIcon_1.default, { className: "inline h-[1em] mr-1" }), node.message, '\n\n'] })), node.value] }), node.key));
13
+ return ((0, jsx_runtime_1.jsxs)("pre", { title: node.message, children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-red-500", children: [(0, jsx_runtime_1.jsx)(ExclamationCircleIcon_1.default, { className: "inline h-[1em] mr-1" }), node.message, '\n\n'] }), node.value] }, node.key));
14
14
  }
15
15
  const id = node.html_id || node.identifier || node.key;
16
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ id: id, className: "flex group my-5" }, { children: [(0, jsx_runtime_1.jsx)("div", { dangerouslySetInnerHTML: { __html: node.html }, className: "overflow-x-auto overflow-y-hidden flex-grow" }), node.enumerator && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex-none text-right m-0 pl-2 self-center relative select-none" }, { children: (0, jsx_runtime_1.jsxs)(heading_1.HashLink, Object.assign({ id: id, kind: "Equation", className: "text-inherit hover:text-inherit" }, { children: ["(", node.enumerator, ")"] })) })))] }), node.key));
16
+ return ((0, jsx_runtime_1.jsxs)("div", { id: id, className: "flex group my-5", children: [(0, jsx_runtime_1.jsx)("div", { dangerouslySetInnerHTML: { __html: node.html }, className: "overflow-x-auto overflow-y-hidden flex-grow" }), node.enumerator && ((0, jsx_runtime_1.jsx)("div", { className: "flex-none text-right m-0 pl-2 self-center relative select-none", children: (0, jsx_runtime_1.jsxs)(heading_1.HashLink, { id: id, kind: "Equation", className: "text-inherit hover:text-inherit", children: ["(", node.enumerator, ")"] }) }))] }, node.key));
17
17
  }
18
18
  if (node.error || !node.html) {
19
19
  return (0, jsx_runtime_1.jsx)(inlineError_1.InlineError, { value: node.value, message: node.message }, node.key);
package/dist/cjs/proof.js CHANGED
@@ -25,7 +25,7 @@ var ProofKind;
25
25
  ProofKind["proposition"] = "proposition";
26
26
  ProofKind["assumption"] = "assumption";
27
27
  ProofKind["theorem"] = "theorem";
28
- })(ProofKind = exports.ProofKind || (exports.ProofKind = {}));
28
+ })(ProofKind || (exports.ProofKind = ProofKind = {}));
29
29
  function getClasses(className) {
30
30
  var _a;
31
31
  const classes = (_a = className === null || className === void 0 ? void 0 : className.split(' ').map((s) => s.trim().toLowerCase()).filter((s) => !!s)) !== null && _a !== void 0 ? _a : [];
@@ -65,17 +65,17 @@ function getColor({ kind }) {
65
65
  }
66
66
  const WrapperElement = ({ id, dropdown, className, children, }) => {
67
67
  if (dropdown)
68
- return ((0, jsx_runtime_1.jsx)("details", Object.assign({ id: id, className: className }, { children: children })));
69
- return ((0, jsx_runtime_1.jsx)("aside", Object.assign({ id: id, className: className }, { children: children })));
68
+ return ((0, jsx_runtime_1.jsx)("details", { id: id, className: className, children: children }));
69
+ return ((0, jsx_runtime_1.jsx)("aside", { id: id, className: className, children: children }));
70
70
  };
71
71
  const HeaderElement = ({ dropdown, className, children, }) => {
72
72
  if (dropdown)
73
- return (0, jsx_runtime_1.jsx)("summary", Object.assign({ className: className }, { children: children }));
74
- return (0, jsx_runtime_1.jsx)("div", Object.assign({ className: className }, { children: children }));
73
+ return (0, jsx_runtime_1.jsx)("summary", { className: className, children: children });
74
+ return (0, jsx_runtime_1.jsx)("div", { className: className, children: children });
75
75
  };
76
76
  const iconClass = 'h-8 w-8 inline-block pl-2 mr-2 self-center flex-none';
77
77
  function Proof({ title, kind, color, dropdown, children, identifier, enumerator, }) {
78
- return ((0, jsx_runtime_1.jsxs)(WrapperElement, Object.assign({ id: identifier, dropdown: dropdown, className: (0, classnames_1.default)('my-5 shadow dark:bg-stone-800 overflow-hidden', 'dark:border-l-4 border-slate-400', {
78
+ return ((0, jsx_runtime_1.jsxs)(WrapperElement, { id: identifier, dropdown: dropdown, className: (0, classnames_1.default)('my-5 shadow dark:bg-stone-800 overflow-hidden', 'dark:border-l-4 border-slate-400', {
79
79
  'dark:border-gray-500/60': !color || color === 'gray',
80
80
  'dark:border-blue-500/60': color === 'blue',
81
81
  'dark:border-green-500/60': color === 'green',
@@ -83,7 +83,7 @@ function Proof({ title, kind, color, dropdown, children, identifier, enumerator,
83
83
  'dark:border-orange-500/60': color === 'orange',
84
84
  'dark:border-red-500/60': color === 'red',
85
85
  'dark:border-purple-500/60': color === 'purple',
86
- }) }, { children: [(0, jsx_runtime_1.jsxs)(HeaderElement, Object.assign({ dropdown: dropdown, className: (0, classnames_1.default)('m-0 font-medium py-2 flex min-w-0', 'text-md', 'border-y dark:border-y-0', {
86
+ }), children: [(0, jsx_runtime_1.jsxs)(HeaderElement, { dropdown: dropdown, className: (0, classnames_1.default)('m-0 font-medium py-2 flex min-w-0', 'text-md', 'border-y dark:border-y-0', {
87
87
  'bg-gray-50/80 dark:bg-slate-900': !color || color === 'gray',
88
88
  'bg-blue-50/80 dark:bg-slate-900': color === 'blue',
89
89
  'bg-green-50/80 dark:bg-slate-900': color === 'green',
@@ -92,7 +92,7 @@ function Proof({ title, kind, color, dropdown, children, identifier, enumerator,
92
92
  'bg-red-50/80 dark:bg-slate-900': color === 'red',
93
93
  'bg-purple-50/80 dark:bg-slate-900': color === 'purple',
94
94
  'cursor-pointer hover:shadow-[inset_0_0_0px_30px_#00000003] dark:hover:shadow-[inset_0_0_0px_30px_#FFFFFF03]': dropdown,
95
- }) }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: (0, classnames_1.default)('text-neutral-900 dark:text-white grow self-center overflow-hidden break-words', 'ml-4') }, { children: [(0, jsx_runtime_1.jsxs)(heading_1.HashLink, Object.assign({ id: identifier, kind: capitalize(kind) }, { children: [capitalize(kind), " ", enumerator] })), ' ', title && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["(", title, ")"] })] })), dropdown && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "font-thin text-sm text-neutral-700 dark:text-neutral-200 self-center flex-none" }, { children: (0, jsx_runtime_1.jsx)(ChevronRightIcon_1.default, { className: (0, classnames_1.default)(iconClass, 'transition-transform details-toggle') }) })))] })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)('px-4', { 'details-body': dropdown }) }, { children: children }))] })));
95
+ }), children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)('text-neutral-900 dark:text-white grow self-center overflow-hidden break-words', 'ml-4'), children: [(0, jsx_runtime_1.jsxs)(heading_1.HashLink, { id: identifier, kind: capitalize(kind), children: [capitalize(kind), " ", enumerator] }), ' ', title && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["(", title, ")"] })] }), dropdown && ((0, jsx_runtime_1.jsx)("div", { className: "font-thin text-sm text-neutral-700 dark:text-neutral-200 self-center flex-none", children: (0, jsx_runtime_1.jsx)(ChevronRightIcon_1.default, { className: (0, classnames_1.default)(iconClass, 'transition-transform details-toggle') }) }))] }), (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)('px-4', { 'details-body': dropdown }), children: children })] }));
96
96
  }
97
97
  exports.Proof = Proof;
98
98
  const ProofRenderer = (node, children) => {
@@ -102,7 +102,7 @@ const ProofRenderer = (node, children) => {
102
102
  const { color } = getColor({ kind: node.kind, classes });
103
103
  const isDropdown = classes.includes('dropdown');
104
104
  const useTitle = ((_a = node.children) === null || _a === void 0 ? void 0 : _a[0].type) === 'admonitionTitle';
105
- return ((0, jsx_runtime_1.jsxs)(Proof, Object.assign({ identifier: node.html_id, title: useTitle ? title : undefined, kind: node.kind, enumerator: node.enumerator, color: color, dropdown: isDropdown }, { children: [!useTitle && title, rest] }), node.key));
105
+ return ((0, jsx_runtime_1.jsxs)(Proof, { identifier: node.html_id, title: useTitle ? title : undefined, kind: node.kind, enumerator: node.enumerator, color: color, dropdown: isDropdown, children: [!useTitle && title, rest] }, node.key));
106
106
  };
107
107
  exports.ProofRenderer = ProofRenderer;
108
108
  const PROOF_RENDERERS = {
package/dist/cjs/tabs.js CHANGED
@@ -12,7 +12,7 @@ const providers_1 = require("@myst-theme/providers");
12
12
  const TabSetContext = (0, react_1.createContext)(undefined);
13
13
  // Create a provider for components to consume and subscribe to changes
14
14
  function TabSetStateProvider({ active, children }) {
15
- return (0, jsx_runtime_1.jsx)(TabSetContext.Provider, Object.assign({ value: active }, { children: children }));
15
+ return (0, jsx_runtime_1.jsx)(TabSetContext.Provider, { value: active, children: children });
16
16
  }
17
17
  function TabSet({ tabs, children }) {
18
18
  var _a, _b, _c, _d;
@@ -35,18 +35,18 @@ function TabSet({ tabs, children }) {
35
35
  return;
36
36
  setActive(tab === null || tab === void 0 ? void 0 : tab.id);
37
37
  }, [tabs, lastClickedTab, setActive]);
38
- return ((0, jsx_runtime_1.jsx)(TabSetStateProvider, Object.assign({ active: active }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "my-5" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex flex-row border-b border-b-gray-100 overflow-x-auto" }, { children: tabs.map((tab) => {
39
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)('flex-none px-3 py-1 font-semibold cursor-pointer', {
38
+ return ((0, jsx_runtime_1.jsx)(TabSetStateProvider, { active: active, children: (0, jsx_runtime_1.jsxs)("div", { className: "my-5", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex flex-row border-b border-b-gray-100 overflow-x-auto", children: tabs.map((tab) => {
39
+ return ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)('flex-none px-3 py-1 font-semibold cursor-pointer', {
40
40
  'text-blue-600 border-b-2 border-b-blue-600 dark:border-b-white dark:text-white': active === tab.id,
41
41
  'text-gray-500 dark:text-gray-300 hover:text-gray-700 dark:hover:text-gray-100': active !== tab.id,
42
- }), onClick: () => onClick(tab) }, { children: tab.title }), tab.id));
43
- }) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "shadow flex" }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "w-full px-6" }, { children: children })) }))] })) })));
42
+ }), onClick: () => onClick(tab), children: tab.title }, tab.id));
43
+ }) }), (0, jsx_runtime_1.jsx)("div", { className: "shadow flex", children: (0, jsx_runtime_1.jsx)("div", { className: "w-full px-6", children: children }) })] }) }));
44
44
  }
45
45
  exports.TabSet = TabSet;
46
46
  function TabItem({ id, children, }) {
47
47
  const active = (0, react_1.useContext)(TabSetContext);
48
48
  const open = active === id;
49
- return (0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)({ hidden: !open }) }, { children: children }));
49
+ return (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)({ hidden: !open }), children: children });
50
50
  }
51
51
  exports.TabItem = TabItem;
52
52
  const TabSetRenderer = (node, children) => {
@@ -56,11 +56,11 @@ const TabSetRenderer = (node, children) => {
56
56
  id: tab.key,
57
57
  sync: tab.sync,
58
58
  }));
59
- return ((0, jsx_runtime_1.jsx)(TabSet, Object.assign({ tabs: tabs }, { children: children }), node.key));
59
+ return ((0, jsx_runtime_1.jsx)(TabSet, { tabs: tabs, children: children }, node.key));
60
60
  };
61
61
  exports.TabSetRenderer = TabSetRenderer;
62
62
  const TabItemRenderer = (node, children) => {
63
- return ((0, jsx_runtime_1.jsx)(TabItem, Object.assign({ id: node.key }, { children: children }), node.key));
63
+ return ((0, jsx_runtime_1.jsx)(TabItem, { id: node.key, children: children }, node.key));
64
64
  };
65
65
  exports.TabItemRenderer = TabItemRenderer;
66
66
  const TAB_RENDERERS = {
@@ -2,7 +2,7 @@ import type { NodeRenderer } from '@myst-theme/providers';
2
2
  import type { GenericNode } from 'myst-common';
3
3
  export declare const UnknownDirective: NodeRenderer<GenericNode>;
4
4
  declare const UNKNOWN_MYST_RENDERERS: {
5
- mystDirective: NodeRenderer<GenericNode<Record<string, any>>>;
5
+ mystDirective: NodeRenderer<GenericNode>;
6
6
  };
7
7
  export default UNKNOWN_MYST_RENDERERS;
8
8
  //# sourceMappingURL=unknown.d.ts.map
@@ -9,7 +9,7 @@ const ExclamationTriangleIcon_1 = __importDefault(require("@heroicons/react/24/o
9
9
  const exercise_1 = require("./exercise");
10
10
  const UnknownDirective = (node) => {
11
11
  const titleNode = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("code", { children: node.name }), " - Unknown Directive"] }));
12
- return ((0, jsx_runtime_1.jsx)(exercise_1.Callout, Object.assign({ title: titleNode, color: 'red', dropdown: true, Icon: ExclamationTriangleIcon_1.default }, { children: (0, jsx_runtime_1.jsx)("pre", { children: node.value }) }), node.key));
12
+ return ((0, jsx_runtime_1.jsx)(exercise_1.Callout, { title: titleNode, color: 'red', dropdown: true, Icon: ExclamationTriangleIcon_1.default, children: (0, jsx_runtime_1.jsx)("pre", { children: node.value }) }, node.key));
13
13
  };
14
14
  exports.UnknownDirective = UnknownDirective;
15
15
  const UNKNOWN_MYST_RENDERERS = {
@@ -95,23 +95,23 @@ export const AdmonitionTitle = (node, children) => {
95
95
  };
96
96
  const WrapperElement = ({ dropdown, className, children, }) => {
97
97
  if (dropdown)
98
- return _jsx("details", Object.assign({ className: className }, { children: children }));
99
- return _jsx("aside", Object.assign({ className: className }, { children: children }));
98
+ return _jsx("details", { className: className, children: children });
99
+ return _jsx("aside", { className: className, children: children });
100
100
  };
101
101
  const HeaderElement = ({ dropdown, className, children, }) => {
102
102
  if (dropdown)
103
- return _jsx("summary", Object.assign({ className: className }, { children: children }));
104
- return _jsx("div", Object.assign({ className: className }, { children: children }));
103
+ return _jsx("summary", { className: className, children: children });
104
+ return _jsx("div", { className: className, children: children });
105
105
  };
106
106
  export function Admonition({ title, kind, color, simple, dropdown, children, hideIcon, }) {
107
- return (_jsxs(WrapperElement, Object.assign({ dropdown: dropdown, className: classNames('my-5 shadow-md dark:shadow-2xl dark:shadow-neutral-900', 'bg-gray-50/10 dark:bg-stone-800', 'overflow-hidden', {
107
+ return (_jsxs(WrapperElement, { dropdown: dropdown, className: classNames('my-5 shadow-md dark:shadow-2xl dark:shadow-neutral-900', 'bg-gray-50/10 dark:bg-stone-800', 'overflow-hidden', {
108
108
  'rounded border-l-4': !simple,
109
109
  'border-l-2': simple,
110
110
  'border-blue-500': !color || color === 'blue',
111
111
  'border-green-600': color === 'green',
112
112
  'border-amber-600': color === 'yellow',
113
113
  'border-red-600': color === 'red',
114
- }) }, { children: [title && (_jsxs(HeaderElement, Object.assign({ dropdown: dropdown, className: classNames('m-0 font-medium py-1 flex min-w-0', {
114
+ }), children: [title && (_jsxs(HeaderElement, { dropdown: dropdown, className: classNames('m-0 font-medium py-1 flex min-w-0', {
115
115
  'text-lg': !simple,
116
116
  'text-md': simple,
117
117
  'bg-gray-100 dark:bg-stone-700': simple,
@@ -120,13 +120,13 @@ export function Admonition({ title, kind, color, simple, dropdown, children, hid
120
120
  'text-amber-600 bg-amber-50 dark:bg-slate-900': !simple && color === 'yellow',
121
121
  'text-red-600 bg-red-50 dark:bg-slate-900': !simple && color === 'red',
122
122
  'cursor-pointer hover:shadow-[inset_0_0_0px_30px_#00000003] dark:hover:shadow-[inset_0_0_0px_30px_#FFFFFF03]': dropdown,
123
- }) }, { children: [!hideIcon && (_jsx(AdmonitionIcon, { kind: kind !== null && kind !== void 0 ? kind : AdmonitionKind.note, className: classNames({
123
+ }), children: [!hideIcon && (_jsx(AdmonitionIcon, { kind: kind !== null && kind !== void 0 ? kind : AdmonitionKind.note, className: classNames({
124
124
  // Needed for simple!
125
125
  'text-blue-600': !color || color === 'blue',
126
126
  'text-green-600': color === 'green',
127
127
  'text-amber-600': color === 'yellow',
128
128
  'text-red-600': color === 'red',
129
- }) })), _jsx("div", Object.assign({ className: classNames('text-neutral-900 dark:text-white grow self-center overflow-hidden break-words', { 'ml-4': hideIcon }) }, { children: title })), dropdown && (_jsx("div", Object.assign({ className: "font-thin text-sm text-neutral-700 dark:text-neutral-200 self-center flex-none" }, { children: _jsx(ChevronRightIcon, { className: classNames(iconClass, 'transition-transform details-toggle') }) })))] }))), _jsx("div", Object.assign({ className: classNames('px-4', { 'py-1': !simple, 'details-body': dropdown }) }, { children: children }))] })));
129
+ }) })), _jsx("div", { className: classNames('text-neutral-900 dark:text-white grow self-center overflow-hidden break-words', { 'ml-4': hideIcon }), children: title }), dropdown && (_jsx("div", { className: "font-thin text-sm text-neutral-700 dark:text-neutral-200 self-center flex-none", children: _jsx(ChevronRightIcon, { className: classNames(iconClass, 'transition-transform details-toggle') }) }))] })), _jsx("div", { className: classNames('px-4', { 'py-1': !simple, 'details-body': dropdown }), children: children })] }));
130
130
  }
131
131
  export const AdmonitionRenderer = (node, children) => {
132
132
  var _a;
@@ -137,7 +137,7 @@ export const AdmonitionRenderer = (node, children) => {
137
137
  const isSimple = classes.includes('simple');
138
138
  const hideIcon = node.icon === false;
139
139
  const useTitle = ((_a = node.children) === null || _a === void 0 ? void 0 : _a[0].type) === 'admonitionTitle';
140
- return (_jsxs(Admonition, Object.assign({ title: useTitle ? title : undefined, kind: kind, color: color, dropdown: isDropdown, simple: isSimple, hideIcon: hideIcon }, { children: [!useTitle && title, rest] }), node.key));
140
+ return (_jsxs(Admonition, { title: useTitle ? title : undefined, kind: kind, color: color, dropdown: isDropdown, simple: isSimple, hideIcon: hideIcon, children: [!useTitle && title, rest] }, node.key));
141
141
  };
142
142
  const ADMONITION_RENDERERS = {
143
143
  admonition: AdmonitionRenderer,
package/dist/esm/basic.js CHANGED
@@ -13,16 +13,16 @@ const BASIC_RENDERERS = {
13
13
  return _jsx("em", { children: children }, node.key);
14
14
  },
15
15
  underline(node, children) {
16
- return (_jsx("span", Object.assign({ style: { textDecoration: 'underline' } }, { children: children }), node.key));
16
+ return (_jsx("span", { style: { textDecoration: 'underline' }, children: children }, node.key));
17
17
  },
18
18
  smallcaps(node, children) {
19
- return (_jsx("span", Object.assign({ style: { fontVariant: 'small-caps' } }, { children: children }), node.key));
19
+ return (_jsx("span", { style: { fontVariant: 'small-caps' }, children: children }, node.key));
20
20
  },
21
21
  link(node, children) {
22
- return (_jsx("a", Object.assign({ target: "_blank", href: node.url, rel: "noreferrer" }, { children: children }), node.key));
22
+ return (_jsx("a", { target: "_blank", href: node.url, rel: "noreferrer", children: children }, node.key));
23
23
  },
24
24
  paragraph(node, children) {
25
- return (_jsx("p", Object.assign({ id: node.html_id }, { children: children }), node.key));
25
+ return (_jsx("p", { id: node.html_id, children: children }, node.key));
26
26
  },
27
27
  break(node) {
28
28
  return _jsx("br", {}, node.key);
@@ -35,24 +35,24 @@ const BASIC_RENDERERS = {
35
35
  },
36
36
  list(node, children) {
37
37
  if (node.ordered) {
38
- return (_jsx("ol", Object.assign({ start: node.start || undefined, id: node.html_id }, { children: children }), node.key));
38
+ return (_jsx("ol", { start: node.start || undefined, id: node.html_id, children: children }, node.key));
39
39
  }
40
- return (_jsx("ul", Object.assign({ id: node.html_id }, { children: children }), node.key));
40
+ return (_jsx("ul", { id: node.html_id, children: children }, node.key));
41
41
  },
42
42
  listItem(node, children) {
43
43
  if (node.checked == null) {
44
44
  return _jsx("li", { children: children }, node.key);
45
45
  }
46
- return (_jsxs("li", Object.assign({ className: "task-list-item" }, { children: [_jsx("input", { type: "checkbox", className: "task-list-item-checkbox", defaultChecked: node.checked }), children] }), node.key));
46
+ return (_jsxs("li", { className: "task-list-item", children: [_jsx("input", { type: "checkbox", className: "task-list-item-checkbox", defaultChecked: node.checked }), children] }, node.key));
47
47
  },
48
48
  container(node, children) {
49
- return (_jsx("figure", Object.assign({ id: node.html_id || node.identifier || node.key, className: classNames(node.kind, node.class) }, { children: children }), node.key));
49
+ return (_jsx("figure", { id: node.html_id || node.identifier || node.key, className: classNames(node.kind, node.class), children: children }, node.key));
50
50
  },
51
51
  caption(node, children) {
52
- return (_jsx("figcaption", Object.assign({ className: "group" }, { children: children }), node.key));
52
+ return (_jsx("figcaption", { className: "group", children: children }, node.key));
53
53
  },
54
54
  blockquote(node, children) {
55
- return (_jsx("blockquote", Object.assign({ id: node.html_id }, { children: children }), node.key));
55
+ return (_jsx("blockquote", { id: node.html_id, children: children }, node.key));
56
56
  },
57
57
  thematicBreak(node) {
58
58
  return _jsx("hr", { className: "py-2 my-5 translate-y-2" }, node.key);
@@ -66,7 +66,7 @@ const BASIC_RENDERERS = {
66
66
  }
67
67
  const label = typeof children === 'string' ? backwardsCompatibleLabel(children, node.kind) : children;
68
68
  const id = node.html_id || node.identifier || node.key;
69
- return (_jsx(HashLink, Object.assign({ id: id, kind: node.kind, className: "mr-1 text-inherit hover:text-inherit font-semibold hover:font-semibold" }, { children: label }), node.key));
69
+ return (_jsx(HashLink, { id: id, kind: node.kind, className: "mr-1 text-inherit hover:text-inherit font-semibold hover:font-semibold", children: label }, node.key));
70
70
  },
71
71
  table(node, children) {
72
72
  // TODO: actually render the tbody on the server if it isn't included here.
@@ -93,7 +93,7 @@ const BASIC_RENDERERS = {
93
93
  return _jsx("sup", { children: children }, node.key);
94
94
  },
95
95
  abbreviation(node, children) {
96
- return (_jsx(HoverPopover, Object.assign({ side: "top", card: _jsx("div", Object.assign({ className: "bg-blue-900 text-white dark:bg-white dark:text-black text-xs p-1" }, { children: node.title })), arrowClass: "fill-blue-900 dark:fill-white" }, { children: _jsx("abbr", Object.assign({ "aria-label": node.title, className: "cursor-help border-b border-dotted" }, { children: children })) }), node.key));
96
+ return (_jsx(HoverPopover, { side: "top", card: _jsx("div", { className: "bg-blue-900 text-white dark:bg-white dark:text-black text-xs p-1", children: node.title }), arrowClass: "fill-blue-900 dark:fill-white", children: _jsx("abbr", { "aria-label": node.title, className: "cursor-help border-b border-dotted", children: children }) }, node.key));
97
97
  },
98
98
  mystComment() {
99
99
  return null;
@@ -102,7 +102,7 @@ const BASIC_RENDERERS = {
102
102
  return null;
103
103
  },
104
104
  definitionList(node, children) {
105
- return (_jsx("dl", Object.assign({ className: "my-5", id: node.html_id }, { children: children }), node.key));
105
+ return (_jsx("dl", { className: "my-5", id: node.html_id, children: children }, node.key));
106
106
  },
107
107
  definitionTerm(node, children) {
108
108
  let strongChildren = children;
@@ -119,7 +119,7 @@ const BASIC_RENDERERS = {
119
119
  else if (typeof children === 'string') {
120
120
  strongChildren = _jsx("strong", { children: children }, node.key + '0');
121
121
  }
122
- return (_jsx("dt", Object.assign({ id: node.html_id }, { children: strongChildren }), node.key));
122
+ return (_jsx("dt", { id: node.html_id, children: strongChildren }, node.key));
123
123
  },
124
124
  definitionDescription(node, children) {
125
125
  return _jsx("dd", { children: children }, node.key);
package/dist/esm/card.js CHANGED
@@ -2,13 +2,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import classNames from 'classnames';
3
3
  import { useLinkProvider, useBaseurl, withBaseurl } from '@myst-theme/providers';
4
4
  export const Header = (node, children) => {
5
- return (_jsx("header", Object.assign({ className: "m-0 py-1 pl-3 bg-gray-50 dark:bg-slate-900 border-b border-gray-100 dark:border-gray-800" }, { children: children }), node.key));
5
+ return (_jsx("header", { className: "m-0 py-1 pl-3 bg-gray-50 dark:bg-slate-900 border-b border-gray-100 dark:border-gray-800", children: children }, node.key));
6
6
  };
7
7
  export const Footer = (node, children) => {
8
- return (_jsx("footer", Object.assign({ className: "m-0 py-1 pl-3 bg-gray-50 dark:bg-slate-900 border-t border-gray-100 dark:border-gray-800" }, { children: children }), node.key));
8
+ return (_jsx("footer", { className: "m-0 py-1 pl-3 bg-gray-50 dark:bg-slate-900 border-t border-gray-100 dark:border-gray-800", children: children }, node.key));
9
9
  };
10
10
  export const CardTitle = (node, children) => {
11
- return (_jsx("div", Object.assign({ className: "pt-3 font-bold group-hover:underline" }, { children: children }), node.key));
11
+ return (_jsx("div", { className: "pt-3 font-bold group-hover:underline", children: children }, node.key));
12
12
  };
13
13
  function getParts(children) {
14
14
  var _a, _b;
@@ -29,21 +29,21 @@ function ExternalOrInternalLink({ to, className, isStatic, prefetch = 'intent',
29
29
  const Link = useLinkProvider();
30
30
  const baseurl = useBaseurl();
31
31
  if (to.startsWith('http') || isStatic) {
32
- return (_jsx("a", Object.assign({ href: to, className: className, target: "_blank", rel: "noopener noreferrer" }, { children: children })));
32
+ return (_jsx("a", { href: to, className: className, target: "_blank", rel: "noopener noreferrer", children: children }));
33
33
  }
34
- return (_jsx(Link, Object.assign({ to: withBaseurl(to, baseurl), className: className, prefetch: prefetch }, { children: children })));
34
+ return (_jsx(Link, { to: withBaseurl(to, baseurl), className: className, prefetch: prefetch, children: children }));
35
35
  }
36
36
  function Card({ children, url, isStatic, }) {
37
37
  const parts = getParts(children);
38
38
  const link = !!url;
39
39
  const sharedStyle = 'my-5 rounded shadow dark:shadow-neutral-800 overflow-hidden border border-gray-100 dark:border-gray-800 flex flex-col';
40
40
  if (link) {
41
- return (_jsxs(ExternalOrInternalLink, Object.assign({ to: url, isStatic: isStatic, className: classNames(sharedStyle, 'text-inherit hover:text-inherit', 'block font-normal no-underline hover:no-underline cursor-pointer group', 'hover:border-blue-500 dark:hover:border-blue-400') }, { children: [parts.header, _jsx("div", Object.assign({ className: "py-2 px-4 flex-grow" }, { children: parts.body })), parts.footer] })));
41
+ return (_jsxs(ExternalOrInternalLink, { to: url, isStatic: isStatic, className: classNames(sharedStyle, 'text-inherit hover:text-inherit', 'block font-normal no-underline hover:no-underline cursor-pointer group', 'hover:border-blue-500 dark:hover:border-blue-400'), children: [parts.header, _jsx("div", { className: "py-2 px-4 flex-grow", children: parts.body }), parts.footer] }));
42
42
  }
43
- return (_jsxs("div", Object.assign({ className: sharedStyle }, { children: [parts.header, _jsx("div", Object.assign({ className: "py-2 px-4 flex-grow" }, { children: parts.body })), parts.footer] })));
43
+ return (_jsxs("div", { className: sharedStyle, children: [parts.header, _jsx("div", { className: "py-2 px-4 flex-grow", children: parts.body }), parts.footer] }));
44
44
  }
45
45
  export const CardRenderer = (node, children) => {
46
- return (_jsx(Card, Object.assign({ url: node.url, isStatic: node.static || false }, { children: children }), node.key));
46
+ return (_jsx(Card, { url: node.url, isStatic: node.static || false, children: children }, node.key));
47
47
  };
48
48
  const CARD_RENDERERS = {
49
49
  card: CardRenderer,