myst-to-react 0.2.6 → 0.2.8

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,6 +1,12 @@
1
+ /// <reference types="react" />
1
2
  import type { NodeRenderer } from '@myst-theme/providers';
2
3
  export declare const CiteGroup: NodeRenderer;
3
- export declare const Cite: NodeRenderer;
4
+ export declare const Cite: ({ label, error, children, }: {
5
+ label?: string | undefined;
6
+ error?: boolean | undefined;
7
+ children: React.ReactNode;
8
+ }) => JSX.Element;
9
+ export declare const CiteRenderer: NodeRenderer;
4
10
  declare const CITE_RENDERERS: Record<string, NodeRenderer>;
5
11
  export default CITE_RENDERERS;
6
12
  //# sourceMappingURL=cite.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cite.d.ts","sourceRoot":"","sources":["../../src/cite.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAc1D,eAAO,MAAM,SAAS,EAAE,YAYvB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,YAmBlB,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAGhD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"cite.d.ts","sourceRoot":"","sources":["../../src/cite.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAc1D,eAAO,MAAM,SAAS,EAAE,YAYvB,CAAC;AAEF,eAAO,MAAM,IAAI;;;cAOL,MAAM,SAAS;iBAuB1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,YAM1B,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAGhD,CAAC;AAEF,eAAe,cAAc,CAAC"}
package/dist/cjs/cite.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Cite = exports.CiteGroup = void 0;
6
+ exports.CiteRenderer = exports.Cite = exports.CiteGroup = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const classnames_1 = __importDefault(require("classnames"));
9
9
  const providers_1 = require("@myst-theme/providers");
@@ -20,19 +20,26 @@ const CiteGroup = (node, children) => {
20
20
  }) }, { children: children }), node.key));
21
21
  };
22
22
  exports.CiteGroup = CiteGroup;
23
- const Cite = (node, children) => {
23
+ const Cite = ({ label, error, children, }) => {
24
24
  var _a, _b;
25
25
  const references = (0, providers_1.useReferences)();
26
- const { html, doi: doiString } = (_b = (_a = references === null || references === void 0 ? void 0 : references.cite) === null || _a === void 0 ? void 0 : _a.data[node.label]) !== null && _b !== void 0 ? _b : {};
27
- if (node.error) {
28
- return (0, jsx_runtime_1.jsx)(inlineError_1.InlineError, { value: node.label, message: 'Citation Not Found' }, node.key);
26
+ if (!label) {
27
+ return (0, jsx_runtime_1.jsx)(inlineError_1.InlineError, { value: "cite (no label)", message: 'Citation Has No Label' });
28
+ }
29
+ const { html, doi: doiString } = (_b = (_a = references === null || references === void 0 ? void 0 : references.cite) === null || _a === void 0 ? void 0 : _a.data[label]) !== null && _b !== void 0 ? _b : {};
30
+ if (error) {
31
+ return (0, jsx_runtime_1.jsx)(inlineError_1.InlineError, { value: label, message: 'Citation Not Found' });
29
32
  }
30
33
  const doiUrl = doiString ? doi_utils_1.default.buildUrl(doiString) : null;
31
- return ((0, jsx_runtime_1.jsx)(HoverPopover_1.HoverPopover, Object.assign({ openDelay: 300, card: (0, jsx_runtime_1.jsx)(CiteChild, { html: html }) }, { children: (0, jsx_runtime_1.jsxs)("cite", Object.assign({ className: "hover-link" }, { children: [doiUrl && ((0, jsx_runtime_1.jsx)("a", Object.assign({ href: doiUrl, target: "_blank", rel: "noreferrer", className: "hover-link" }, { children: children }))), !doiUrl && children] })) }), node.key));
34
+ return ((0, jsx_runtime_1.jsx)(HoverPopover_1.HoverPopover, Object.assign({ openDelay: 300, card: (0, jsx_runtime_1.jsx)(CiteChild, { html: html }) }, { children: (0, jsx_runtime_1.jsxs)("cite", Object.assign({ className: "hover-link" }, { children: [doiUrl && ((0, jsx_runtime_1.jsx)("a", Object.assign({ href: doiUrl, target: "_blank", rel: "noreferrer", className: "hover-link" }, { children: children }))), !doiUrl && children] })) })));
32
35
  };
33
36
  exports.Cite = Cite;
37
+ const CiteRenderer = (node, children) => {
38
+ return ((0, jsx_runtime_1.jsx)(exports.Cite, Object.assign({ label: node.label, error: node.error }, { children: children }), node.key));
39
+ };
40
+ exports.CiteRenderer = CiteRenderer;
34
41
  const CITE_RENDERERS = {
35
42
  citeGroup: exports.CiteGroup,
36
- cite: exports.Cite,
43
+ cite: exports.CiteRenderer,
37
44
  };
38
45
  exports.default = CITE_RENDERERS;
@@ -1 +1 @@
1
- {"version":3,"file":"crossReference.d.ts","sourceRoot":"","sources":["../../src/crossReference.tsx"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAYhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAuE1D,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,OAAO,EACP,MAAM,EACN,QAAQ,EACR,UAAU,GACX,EAAE;IACD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,eA4DA;AAED,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,cAAc,CAsB3D,CAAC;AAEF,QAAA,MAAM,yBAAyB;;CAE9B,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"crossReference.d.ts","sourceRoot":"","sources":["../../src/crossReference.tsx"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAYhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA+E1D,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,OAAO,EACP,MAAM,EACN,QAAQ,EACR,UAAU,GACX,EAAE;IACD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,eA8DA;AAED,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,cAAc,CAsB3D,CAAC;AAEF,QAAA,MAAM,yBAAyB;;CAE9B,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -59,6 +59,14 @@ function XrefChildren({ nodes, loading, error, identifier, }) {
59
59
  }
60
60
  return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
61
61
  }
62
+ function openDetails(el) {
63
+ if (!el)
64
+ return;
65
+ if (el.nodeName === 'DETAILS') {
66
+ el.open = true;
67
+ }
68
+ openDetails(el.parentElement);
69
+ }
62
70
  function CrossReferenceHover({ url, dataUrl, remote, children, identifier, }) {
63
71
  var _a, _b, _c, _d;
64
72
  const Link = (0, providers_1.useLinkProvider)();
@@ -80,7 +88,9 @@ function CrossReferenceHover({ url, dataUrl, remote, children, identifier, }) {
80
88
  const scroll = (e) => {
81
89
  e.preventDefault();
82
90
  const el = document.getElementById(htmlId);
91
+ openDetails(el);
83
92
  el === null || el === void 0 ? void 0 : el.scrollIntoView({ behavior: 'smooth' });
93
+ history.replaceState(undefined, '', `#${htmlId}`);
84
94
  };
85
95
  return ((0, jsx_runtime_1.jsx)(HoverPopover_1.HoverPopover, Object.assign({ card: (0, jsx_runtime_1.jsx)(providers_1.XRefProvider, Object.assign({ remote: remote, url: url, dataUrl: dataUrl }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "hover-document w-[500px] sm:max-w-[500px] px-3" }, { children: (0, jsx_runtime_1.jsx)(XrefChildren, { nodes: nodes, loading: remote && !data, error: remote && error, identifier: identifier }) })) })) }, { children: (0, jsx_runtime_1.jsxs)("span", { children: [remote && external && ((0, jsx_runtime_1.jsx)("a", Object.assign({ href: link, target: "_blank", className: "hover-link" }, { children: children }))), remote && !external && ((0, jsx_runtime_1.jsx)(Link, Object.assign({ to: `${(0, providers_1.withBaseurl)(url, baseurl)}#${htmlId}`, prefetch: "intent", className: "hover-link" }, { children: children }))), !remote && ((0, jsx_runtime_1.jsx)("a", Object.assign({ href: `#${htmlId}`, onClick: scroll, className: "hover-link" }, { children: children })))] }) })));
86
96
  }
@@ -0,0 +1,22 @@
1
+ import type { Admonition as AdmonitionSpec } from 'myst-spec';
2
+ import React from 'react';
3
+ import type { NodeRenderer } from '@myst-theme/providers';
4
+ type Color = 'gray' | 'blue' | 'green' | 'yellow' | 'orange' | 'red' | 'purple';
5
+ export declare function Callout({ title, color, dropdown, children, identifier, Icon, }: {
6
+ title?: React.ReactNode;
7
+ color?: Color;
8
+ children: React.ReactNode;
9
+ dropdown?: boolean;
10
+ identifier?: string;
11
+ Icon?: (props: {
12
+ className?: string;
13
+ }) => JSX.Element;
14
+ }): JSX.Element;
15
+ export declare const ExerciseRenderer: NodeRenderer<AdmonitionSpec>;
16
+ export declare const SolutionRenderer: NodeRenderer<AdmonitionSpec>;
17
+ declare const EXERCISE_RENDERERS: {
18
+ exercise: NodeRenderer<AdmonitionSpec>;
19
+ solution: NodeRenderer<AdmonitionSpec>;
20
+ };
21
+ export default EXERCISE_RENDERERS;
22
+ //# sourceMappingURL=exercise.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercise.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAkEhF,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,IAAI,GACL,EAAE;IACD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;CACvD,eA0EA;AAED,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,cAAc,CAmCzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,cAAc,CAkCzD,CAAC;AAEF,QAAA,MAAM,kBAAkB;;;CAGvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SolutionRenderer = exports.ExerciseRenderer = exports.Callout = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const ChevronRightIcon_1 = __importDefault(require("@heroicons/react/24/solid/ChevronRightIcon"));
9
+ const classnames_1 = __importDefault(require("classnames"));
10
+ const heading_1 = require("./heading");
11
+ function getClasses(className) {
12
+ var _a;
13
+ 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 : [];
14
+ return [...new Set(classes)];
15
+ }
16
+ function getColor({ classes = [] }, defaultColor = 'blue') {
17
+ if (classes.includes('gray'))
18
+ return { color: 'gray' };
19
+ if (classes.includes('purple'))
20
+ return { color: 'purple' };
21
+ if (classes.includes('yellow'))
22
+ return { color: 'yellow' };
23
+ if (classes.includes('orange'))
24
+ return { color: 'orange' };
25
+ if (classes.includes('green'))
26
+ return { color: 'green' };
27
+ if (classes.includes('red'))
28
+ return { color: 'red' };
29
+ if (classes.includes('blue'))
30
+ return { color: 'blue' };
31
+ return { color: defaultColor };
32
+ }
33
+ const WrapperElement = ({ id, dropdown, className, children, }) => {
34
+ if (dropdown)
35
+ return ((0, jsx_runtime_1.jsx)("details", Object.assign({ id: id, className: className }, { children: children })));
36
+ return ((0, jsx_runtime_1.jsx)("aside", Object.assign({ id: id, className: className }, { children: children })));
37
+ };
38
+ const HeaderElement = ({ dropdown, className, children, }) => {
39
+ if (dropdown)
40
+ return (0, jsx_runtime_1.jsx)("summary", Object.assign({ className: className }, { children: children }));
41
+ return (0, jsx_runtime_1.jsx)("div", Object.assign({ className: className }, { children: children }));
42
+ };
43
+ const iconClass = 'h-8 w-8 inline-block pl-2 mr-2 self-center flex-none';
44
+ function Callout({ title, color, dropdown, children, identifier, Icon, }) {
45
+ 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', {
46
+ 'dark:border-gray-500/60': !color || color === 'gray',
47
+ 'dark:border-blue-500/60': color === 'blue',
48
+ 'dark:border-green-500/60': color === 'green',
49
+ 'dark:border-amber-500/70': color === 'yellow',
50
+ 'dark:border-orange-500/60': color === 'orange',
51
+ 'dark:border-red-500/60': color === 'red',
52
+ 'dark:border-purple-500/60': color === 'purple',
53
+ }) }, { 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', {
54
+ 'bg-gray-50/80 dark:bg-slate-900': !color || color === 'gray',
55
+ 'bg-blue-50/80 dark:bg-slate-900': color === 'blue',
56
+ 'bg-green-50/80 dark:bg-slate-900': color === 'green',
57
+ 'bg-amber-50/80 dark:bg-slate-900': color === 'yellow',
58
+ 'bg-orange-50/80 dark:bg-slate-900': color === 'orange',
59
+ 'bg-red-50/80 dark:bg-slate-900': color === 'red',
60
+ 'bg-purple-50/80 dark:bg-slate-900': color === 'purple',
61
+ 'cursor-pointer hover:shadow-[inset_0_0_0px_30px_#00000003] dark:hover:shadow-[inset_0_0_0px_30px_#FFFFFF03]': dropdown,
62
+ }) }, { children: [Icon && ((0, jsx_runtime_1.jsx)(Icon, { className: (0, classnames_1.default)('h-8 w-8 inline-block pl-2 mr-2 self-center flex-none', (0, classnames_1.default)({
63
+ 'text-gray-600': !color || color === 'gray',
64
+ 'text-blue-600': color === 'blue',
65
+ 'text-green-600': color === 'green',
66
+ 'text-amber-600': color === 'yellow',
67
+ 'text-orange-600': color === 'orange',
68
+ 'text-red-600': color === 'red',
69
+ 'text-purple-600': color === 'purple',
70
+ })) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)('text-neutral-900 dark:text-white grow self-center overflow-hidden break-words', { 'ml-4': !Icon }, // No icon!
71
+ 'group') }, { 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 }))] })));
72
+ }
73
+ exports.Callout = Callout;
74
+ const ExerciseRenderer = (node, children) => {
75
+ var _a, _b, _c;
76
+ if (node.hidden)
77
+ return null;
78
+ const [title, ...rest] = (_a = children) !== null && _a !== void 0 ? _a : [];
79
+ const classes = getClasses(node.class);
80
+ const { color } = getColor({ classes });
81
+ const isDropdown = classes.includes('dropdown');
82
+ const useTitle = ((_c = (_b = node.children) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.type) === 'admonitionTitle';
83
+ const identifier = node.html_id;
84
+ const enumerator = node.enumerator;
85
+ const titleNode = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(heading_1.HashLink, Object.assign({ id: identifier, kind: "Exercise" }, { children: [node.gate === 'start' && 'Start of ', node.gate === 'end' && 'End of ', "Exercise", enumerator != null && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [" ", enumerator] })] })), useTitle && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [" (", title, ")"] })] }));
86
+ return ((0, jsx_runtime_1.jsxs)(Callout, Object.assign({ identifier: identifier, title: titleNode, color: color, dropdown: isDropdown }, { children: [!useTitle && title, rest] }), node.key));
87
+ };
88
+ exports.ExerciseRenderer = ExerciseRenderer;
89
+ const SolutionRenderer = (node, children) => {
90
+ var _a, _b, _c;
91
+ if (node.hidden)
92
+ return null;
93
+ const [title, ...rest] = (_a = children) !== null && _a !== void 0 ? _a : [];
94
+ const classes = getClasses(node.class);
95
+ const { color } = getColor({ classes }, 'gray');
96
+ const isDropdown = classes.includes('dropdown');
97
+ const useTitle = ((_c = (_b = node.children) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.type) === 'admonitionTitle';
98
+ const identifier = node.html_id;
99
+ const titleNode = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [node.gate === 'start' && 'Start of ', node.gate === 'end' && 'End of ', title, (0, jsx_runtime_1.jsx)(heading_1.HashLink, Object.assign({ id: identifier, kind: "Solution", hover: true, hideInPopup: true }, { children: ' #' }))] }));
100
+ return ((0, jsx_runtime_1.jsxs)(Callout, Object.assign({ identifier: identifier, title: useTitle ? titleNode : undefined, color: color, dropdown: isDropdown }, { children: [!useTitle && title, rest] }), node.key));
101
+ };
102
+ exports.SolutionRenderer = SolutionRenderer;
103
+ const EXERCISE_RENDERERS = {
104
+ exercise: exports.ExerciseRenderer,
105
+ solution: exports.SolutionRenderer,
106
+ };
107
+ exports.default = EXERCISE_RENDERERS;
@@ -1 +1 @@
1
- {"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../src/heading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,wBAAgB,QAAQ,CAAC,EACvB,EAAE,EACF,IAAI,EACJ,KAA8B,EAC9B,QAAc,EACd,KAAK,EACL,SAAyB,EACzB,WAAW,GACZ,EAAE;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,sBA4BA;AAED,QAAA,MAAM,OAAO,EAAE,YAAY,CAAC,OAAO,CAoBlC,CAAC;AAEF,QAAA,MAAM,iBAAiB;;CAEtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../src/heading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,wBAAgB,QAAQ,CAAC,EACvB,EAAE,EACF,IAAI,EACJ,KAA8B,EAC9B,QAAc,EACd,KAAK,EACL,SAAyB,EACzB,WAAW,GACZ,EAAE;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,sBA6BA;AAED,QAAA,MAAM,OAAO,EAAE,YAAY,CAAC,OAAO,CAoBlC,CAAC;AAEF,QAAA,MAAM,iBAAiB;;CAEtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -19,8 +19,9 @@ function HashLink({ id, kind, title = `Link to this ${kind}`, children = '¶', h
19
19
  evt.preventDefault();
20
20
  const el = document.getElementById(id);
21
21
  el === null || el === void 0 ? void 0 : el.scrollIntoView({ behavior: 'smooth' });
22
+ history.replaceState(undefined, '', `#${id}`);
22
23
  };
23
- return ((0, jsx_runtime_1.jsx)("a", Object.assign({ className: (0, classnames_1.default)('select-none no-underline', className, {
24
+ return ((0, jsx_runtime_1.jsx)("a", Object.assign({ className: (0, classnames_1.default)('select-none no-underline text-inherit hover:text-inherit', className, {
24
25
  'transition-opacity opacity-0 group-hover:opacity-70': hover,
25
26
  'hover:underline': !hover,
26
27
  }), onClick: scroll, href: `#${id}`, title: title, "aria-label": title }, { children: children })));
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAsBjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEzC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAoB1D,CAAC;AAEF,wBAAgB,QAAQ,CACtB,IAAI,EAAE,aAAa,GAAG,IAAI,EAC1B,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAqB,6BAU5D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAwBjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEzC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAsB1D,CAAC;AAEF,wBAAgB,QAAQ,CACtB,IAAI,EAAE,aAAa,GAAG,IAAI,EAC1B,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAqB,6BAU5D"}
package/dist/cjs/index.js CHANGED
@@ -24,6 +24,8 @@ const tabs_1 = __importDefault(require("./tabs"));
24
24
  const extensions_1 = __importDefault(require("./extensions"));
25
25
  const inlineExpression_1 = __importDefault(require("./inlineExpression"));
26
26
  const proof_1 = __importDefault(require("./proof"));
27
+ const exercise_1 = __importDefault(require("./exercise"));
28
+ const unknown_1 = __importDefault(require("./unknown"));
27
29
  var CopyIcon_1 = require("./components/CopyIcon");
28
30
  Object.defineProperty(exports, "CopyIcon", { enumerable: true, get: function () { return CopyIcon_1.CopyIcon; } });
29
31
  var code_2 = require("./code");
@@ -36,7 +38,7 @@ Object.defineProperty(exports, "Details", { enumerable: true, get: function () {
36
38
  var tabs_2 = require("./tabs");
37
39
  Object.defineProperty(exports, "TabSet", { enumerable: true, get: function () { return tabs_2.TabSet; } });
38
40
  Object.defineProperty(exports, "TabItem", { enumerable: true, get: function () { return tabs_2.TabItem; } });
39
- exports.DEFAULT_RENDERERS = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, basic_1.default), image_1.default), links_1.default), code_1.default), math_1.default), cite_1.default), tabs_1.default), iframe_1.default), footnotes_1.default), admonitions_1.default), reactive_1.default), heading_1.default), crossReference_1.default), dropdown_1.default), card_1.default), grid_1.default), inlineExpression_1.default), extensions_1.default), proof_1.default);
41
+ exports.DEFAULT_RENDERERS = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, basic_1.default), unknown_1.default), image_1.default), links_1.default), code_1.default), math_1.default), cite_1.default), tabs_1.default), iframe_1.default), footnotes_1.default), admonitions_1.default), reactive_1.default), heading_1.default), crossReference_1.default), dropdown_1.default), card_1.default), grid_1.default), inlineExpression_1.default), extensions_1.default), proof_1.default), exercise_1.default);
40
42
  function useParse(node, renderers = exports.DEFAULT_RENDERERS) {
41
43
  if (!node)
42
44
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../src/links/github.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAoNnD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,QAAQ,EACR,GAAG,EACH,GAAG,EACH,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,EAAE,EACF,YAAY,GACb,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,eAsCA"}
1
+ {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../src/links/github.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAoNnD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,QAAQ,EACR,GAAG,EACH,GAAG,EACH,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,EAAE,EACF,YAAY,GACb,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,eAoCA"}
@@ -95,9 +95,7 @@ function GithubIssuePreview({ url, org, repo, issue_number, open, }) {
95
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
- console.log(kind);
99
98
  return ((0, jsx_runtime_1.jsx)(HoverPopover_1.HoverPopover, Object.assign({ card: ({ load }) => {
100
- console.log('here', kind);
101
99
  if (kind === 'file') {
102
100
  return ((0, jsx_runtime_1.jsx)(GithubFilePreview, { url: url, raw: raw, file: file, from: from, to: to, open: load, org: org, repo: repo }));
103
101
  }
package/dist/cjs/math.js CHANGED
@@ -13,7 +13,7 @@ const mathRenderer = (node) => {
13
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));
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 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", 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));
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);
@@ -0,0 +1,8 @@
1
+ import type { NodeRenderer } from '@myst-theme/providers';
2
+ import type { GenericNode } from 'myst-common';
3
+ export declare const UnknownDirective: NodeRenderer<GenericNode>;
4
+ declare const UNKNOWN_MYST_RENDERERS: {
5
+ mystDirective: NodeRenderer<GenericNode<Record<string, any>>>;
6
+ };
7
+ export default UNKNOWN_MYST_RENDERERS;
8
+ //# sourceMappingURL=unknown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unknown.d.ts","sourceRoot":"","sources":["../../src/unknown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,WAAW,CAkBtD,CAAC;AAEF,QAAA,MAAM,sBAAsB;;CAE3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.UnknownDirective = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const ExclamationTriangleIcon_1 = __importDefault(require("@heroicons/react/24/outline/ExclamationTriangleIcon"));
9
+ const exercise_1 = require("./exercise");
10
+ const UnknownDirective = (node) => {
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));
13
+ };
14
+ exports.UnknownDirective = UnknownDirective;
15
+ const UNKNOWN_MYST_RENDERERS = {
16
+ mystDirective: exports.UnknownDirective,
17
+ };
18
+ exports.default = UNKNOWN_MYST_RENDERERS;
@@ -1,6 +1,12 @@
1
+ /// <reference types="react" />
1
2
  import type { NodeRenderer } from '@myst-theme/providers';
2
3
  export declare const CiteGroup: NodeRenderer;
3
- export declare const Cite: NodeRenderer;
4
+ export declare const Cite: ({ label, error, children, }: {
5
+ label?: string | undefined;
6
+ error?: boolean | undefined;
7
+ children: React.ReactNode;
8
+ }) => JSX.Element;
9
+ export declare const CiteRenderer: NodeRenderer;
4
10
  declare const CITE_RENDERERS: Record<string, NodeRenderer>;
5
11
  export default CITE_RENDERERS;
6
12
  //# sourceMappingURL=cite.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cite.d.ts","sourceRoot":"","sources":["../../src/cite.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAc1D,eAAO,MAAM,SAAS,EAAE,YAYvB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,YAmBlB,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAGhD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"cite.d.ts","sourceRoot":"","sources":["../../src/cite.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAc1D,eAAO,MAAM,SAAS,EAAE,YAYvB,CAAC;AAEF,eAAO,MAAM,IAAI;;;cAOL,MAAM,SAAS;iBAuB1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,YAM1B,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAGhD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"crossReference.d.ts","sourceRoot":"","sources":["../../src/crossReference.tsx"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAYhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAuE1D,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,OAAO,EACP,MAAM,EACN,QAAQ,EACR,UAAU,GACX,EAAE;IACD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,eA4DA;AAED,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,cAAc,CAsB3D,CAAC;AAEF,QAAA,MAAM,yBAAyB;;CAE9B,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"crossReference.d.ts","sourceRoot":"","sources":["../../src/crossReference.tsx"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAYhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA+E1D,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,OAAO,EACP,MAAM,EACN,QAAQ,EACR,UAAU,GACX,EAAE;IACD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,eA8DA;AAED,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,cAAc,CAsB3D,CAAC;AAEF,QAAA,MAAM,yBAAyB;;CAE9B,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { Admonition as AdmonitionSpec } from 'myst-spec';
2
+ import React from 'react';
3
+ import type { NodeRenderer } from '@myst-theme/providers';
4
+ type Color = 'gray' | 'blue' | 'green' | 'yellow' | 'orange' | 'red' | 'purple';
5
+ export declare function Callout({ title, color, dropdown, children, identifier, Icon, }: {
6
+ title?: React.ReactNode;
7
+ color?: Color;
8
+ children: React.ReactNode;
9
+ dropdown?: boolean;
10
+ identifier?: string;
11
+ Icon?: (props: {
12
+ className?: string;
13
+ }) => JSX.Element;
14
+ }): JSX.Element;
15
+ export declare const ExerciseRenderer: NodeRenderer<AdmonitionSpec>;
16
+ export declare const SolutionRenderer: NodeRenderer<AdmonitionSpec>;
17
+ declare const EXERCISE_RENDERERS: {
18
+ exercise: NodeRenderer<AdmonitionSpec>;
19
+ solution: NodeRenderer<AdmonitionSpec>;
20
+ };
21
+ export default EXERCISE_RENDERERS;
22
+ //# sourceMappingURL=exercise.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercise.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAkEhF,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,IAAI,GACL,EAAE;IACD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;CACvD,eA0EA;AAED,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,cAAc,CAmCzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,cAAc,CAkCzD,CAAC;AAEF,QAAA,MAAM,kBAAkB;;;CAGvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../src/heading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,wBAAgB,QAAQ,CAAC,EACvB,EAAE,EACF,IAAI,EACJ,KAA8B,EAC9B,QAAc,EACd,KAAK,EACL,SAAyB,EACzB,WAAW,GACZ,EAAE;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,sBA4BA;AAED,QAAA,MAAM,OAAO,EAAE,YAAY,CAAC,OAAO,CAoBlC,CAAC;AAEF,QAAA,MAAM,iBAAiB;;CAEtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../src/heading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,wBAAgB,QAAQ,CAAC,EACvB,EAAE,EACF,IAAI,EACJ,KAA8B,EAC9B,QAAc,EACd,KAAK,EACL,SAAyB,EACzB,WAAW,GACZ,EAAE;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,sBA6BA;AAED,QAAA,MAAM,OAAO,EAAE,YAAY,CAAC,OAAO,CAoBlC,CAAC;AAEF,QAAA,MAAM,iBAAiB;;CAEtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAsBjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEzC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAoB1D,CAAC;AAEF,wBAAgB,QAAQ,CACtB,IAAI,EAAE,aAAa,GAAG,IAAI,EAC1B,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAqB,6BAU5D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAwBjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEzC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAsB1D,CAAC;AAEF,wBAAgB,QAAQ,CACtB,IAAI,EAAE,aAAa,GAAG,IAAI,EAC1B,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAqB,6BAU5D"}
@@ -1 +1 @@
1
- {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../src/links/github.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAoNnD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,QAAQ,EACR,GAAG,EACH,GAAG,EACH,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,EAAE,EACF,YAAY,GACb,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,eAsCA"}
1
+ {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../src/links/github.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAoNnD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,QAAQ,EACR,GAAG,EACH,GAAG,EACH,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,EAAE,EACF,YAAY,GACb,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,eAoCA"}
@@ -0,0 +1,8 @@
1
+ import type { NodeRenderer } from '@myst-theme/providers';
2
+ import type { GenericNode } from 'myst-common';
3
+ export declare const UnknownDirective: NodeRenderer<GenericNode>;
4
+ declare const UNKNOWN_MYST_RENDERERS: {
5
+ mystDirective: NodeRenderer<GenericNode<Record<string, any>>>;
6
+ };
7
+ export default UNKNOWN_MYST_RENDERERS;
8
+ //# sourceMappingURL=unknown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unknown.d.ts","sourceRoot":"","sources":["../../src/unknown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,WAAW,CAkBtD,CAAC;AAEF,QAAA,MAAM,sBAAsB;;CAE3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myst-to-react",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "main": "dist/cjs/index.js",
5
5
  "types": "dist/types/index.d.ts",
6
6
  "files": [
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@heroicons/react": "^2.0.13",
21
- "@myst-theme/providers": "^0.2.6",
21
+ "@myst-theme/providers": "^0.2.8",
22
22
  "@radix-ui/react-hover-card": "^1.0.5",
23
23
  "buffer": "^6.0.3",
24
24
  "classnames": "^2.3.2",