myst-to-react 0.9.4 → 0.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/basic.js +1 -1
- package/dist/crossReference.d.ts.map +1 -1
- package/dist/crossReference.js +4 -19
- package/dist/exercise.js +1 -1
- package/dist/footnotes.d.ts.map +1 -1
- package/dist/footnotes.js +3 -2
- package/dist/hashLink.d.ts +23 -0
- package/dist/hashLink.d.ts.map +1 -0
- package/dist/hashLink.js +46 -0
- package/dist/heading.d.ts +0 -10
- package/dist/heading.d.ts.map +1 -1
- package/dist/heading.js +1 -20
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/math.js +1 -1
- package/dist/proof.js +1 -1
- package/package.json +4 -4
package/dist/basic.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { HashLink } from './
|
|
3
|
+
import { HashLink } from './hashLink.js';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import { Tooltip } from './components/index.js';
|
|
6
6
|
import { MyST } from './MyST.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crossReference.d.ts","sourceRoot":"","sources":["../src/crossReference.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAOL,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"crossReference.d.ts","sourceRoot":"","sources":["../src/crossReference.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAOL,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AA2E/B,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,GAAG,EACH,aAAa,EACb,OAAO,GACR,EAAE;IACD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,sDAIA;AAYD,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EAAE,KAAK,EACV,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,QAAQ,EAChB,aAAa,EAAE,eAAe,EAC9B,QAAQ,EACR,UAAU,EACV,MAAW,GACZ,EAAE;IACD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,2CAkEA;AAED,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,cAAc,CAwB3D,CAAC;AAEF,QAAA,MAAM,yBAAyB;;CAE9B,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
package/dist/crossReference.js
CHANGED
|
@@ -5,6 +5,7 @@ import { default as useSWR } from 'swr';
|
|
|
5
5
|
import { HoverPopover } from './components/index.js';
|
|
6
6
|
import { MyST } from './MyST.js';
|
|
7
7
|
import { selectMdastNodes } from 'myst-common';
|
|
8
|
+
import { scrollToElement } from './hashLink.js';
|
|
8
9
|
const fetcher = (...args) => fetch(...args).then((res) => {
|
|
9
10
|
if (res.status === 200)
|
|
10
11
|
return res.json();
|
|
@@ -26,14 +27,6 @@ function XrefChildren({ load, identifier }) {
|
|
|
26
27
|
}
|
|
27
28
|
return _jsx(MyST, { ast: data === null || data === void 0 ? void 0 : data.nodes });
|
|
28
29
|
}
|
|
29
|
-
function openDetails(el) {
|
|
30
|
-
if (!el)
|
|
31
|
-
return;
|
|
32
|
-
if (el.nodeName === 'DETAILS') {
|
|
33
|
-
el.open = true;
|
|
34
|
-
}
|
|
35
|
-
openDetails(el.parentElement);
|
|
36
|
-
}
|
|
37
30
|
function createRemoteBaseUrl(url, remoteBaseUrl) {
|
|
38
31
|
if (remoteBaseUrl && (url === null || url === void 0 ? void 0 : url.startsWith(remoteBaseUrl))) {
|
|
39
32
|
// The remoteBaseUrl is included in the url
|
|
@@ -83,8 +76,8 @@ export function CrossReferenceHover({ url: urlIn, dataUrl: dataUrlIn, remote: re
|
|
|
83
76
|
const Link = useLinkProvider();
|
|
84
77
|
const baseurl = useBaseurl();
|
|
85
78
|
const parent = useXRefState();
|
|
86
|
-
const
|
|
87
|
-
const
|
|
79
|
+
const remoteBaseUrl = remoteBaseUrlIn !== null && remoteBaseUrlIn !== void 0 ? remoteBaseUrlIn : parent.remoteBaseUrl;
|
|
80
|
+
const remote = !!remoteBaseUrl || parent.remote || remoteIn;
|
|
88
81
|
const url = parent.remote ? urlIn !== null && urlIn !== void 0 ? urlIn : parent.url : urlIn;
|
|
89
82
|
const dataUrl = parent.remote ? dataUrlIn !== null && dataUrlIn !== void 0 ? dataUrlIn : parent.dataUrl : dataUrlIn;
|
|
90
83
|
const external = !!remoteBaseUrl || ((_a = url === null || url === void 0 ? void 0 : url.startsWith('http')) !== null && _a !== void 0 ? _a : false);
|
|
@@ -93,15 +86,7 @@ export function CrossReferenceHover({ url: urlIn, dataUrl: dataUrlIn, remote: re
|
|
|
93
86
|
if (!htmlId)
|
|
94
87
|
return;
|
|
95
88
|
const el = document.getElementById(htmlId);
|
|
96
|
-
|
|
97
|
-
el === null || el === void 0 ? void 0 : el.scrollIntoView({ behavior: 'smooth' });
|
|
98
|
-
history.replaceState(undefined, '', `#${htmlId}`);
|
|
99
|
-
if (el) {
|
|
100
|
-
// Changes keyboard tab-index location
|
|
101
|
-
if (el.tabIndex === -1)
|
|
102
|
-
el.tabIndex = -1;
|
|
103
|
-
el.focus({ preventScroll: true });
|
|
104
|
-
}
|
|
89
|
+
scrollToElement(el, { htmlId });
|
|
105
90
|
};
|
|
106
91
|
return (_jsx(HoverPopover, { card: ({ load }) => (_jsx(XRefProvider, { remote: remote, remoteBaseUrl: remoteBaseUrl, url: url, dataUrl: dataUrl, children: _jsxs("div", { className: "hover-document article w-[500px] sm:max-w-[500px] overflow-auto", children: [remoteBaseUrl && (_jsxs("div", { className: "w-full px-3 py-1 text-xs border-b bg-gray-50", children: [_jsx("strong", { className: "text-gray-700", children: "Source: " }), _jsx("a", { className: "text-gray-700", href: `${createRemoteBaseUrl(url, remoteBaseUrl)}${htmlId ? `#${htmlId}` : ''}`, target: "_blank", children: remoteBaseUrl })] })), _jsx("div", { className: "px-3", children: _jsx(XrefChildren, { load: load, identifier: identifier }) })] }) })), children: _jsxs("span", { children: [remote && external && (_jsx("a", { href: `${createRemoteBaseUrl(url, remoteBaseUrl)}${htmlId ? `#${htmlId}` : ''}`, target: "_blank", className: "hover-link", children: children })), remote && !external && (_jsx(Link, { to: `${withBaseurl(url, baseurl)}${htmlId ? `#${htmlId}` : ''}`, prefetch: "intent", className: "hover-link", children: children })), !remote && (_jsx("a", { href: `#${htmlId}`, onClick: scroll, className: "hover-link", children: children }))] }) }));
|
|
107
92
|
}
|
package/dist/exercise.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { ChevronRightIcon } from '@heroicons/react/24/solid';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import { HashLink } from './
|
|
4
|
+
import { HashLink } from './hashLink.js';
|
|
5
5
|
import { MyST } from './MyST.js';
|
|
6
6
|
function getClasses(className) {
|
|
7
7
|
var _a;
|
package/dist/footnotes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footnotes.d.ts","sourceRoot":"","sources":["../src/footnotes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"footnotes.d.ts","sourceRoot":"","sources":["../src/footnotes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAqB1D,eAAO,MAAM,iBAAiB,EAAE,YAe/B,CAAC;AAEF,QAAA,MAAM,kBAAkB;;;CAIvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
package/dist/footnotes.js
CHANGED
|
@@ -3,6 +3,7 @@ import { XRefProvider, useReferences } from '@myst-theme/providers';
|
|
|
3
3
|
import { select } from 'unist-util-select';
|
|
4
4
|
import { HoverPopover } from './components/index.js';
|
|
5
5
|
import { MyST } from './MyST.js';
|
|
6
|
+
import { HashLink } from './hashLink.js';
|
|
6
7
|
function FootnoteDefinition({ identifier }) {
|
|
7
8
|
var _a, _b;
|
|
8
9
|
const references = useReferences();
|
|
@@ -10,8 +11,8 @@ function FootnoteDefinition({ identifier }) {
|
|
|
10
11
|
return (_jsx(XRefProvider, { children: _jsx("div", { className: "hover-document article w-[500px] sm:max-w-[500px] px-3", children: _jsx(MyST, { ast: node.children }) }) }));
|
|
11
12
|
}
|
|
12
13
|
export const FootnoteReference = ({ node }) => {
|
|
13
|
-
var _a;
|
|
14
|
-
return (_jsx(HoverPopover, { openDelay: 0, card: _jsx(FootnoteDefinition, { identifier: node.identifier }), children: _jsx("span", { children:
|
|
14
|
+
var _a, _b;
|
|
15
|
+
return (_jsx(HoverPopover, { openDelay: 0, card: _jsx(FootnoteDefinition, { identifier: node.identifier }), children: _jsx("span", { id: `fnref-${node.key}`, children: _jsx("sup", { className: "hover-link", children: _jsxs(HashLink, { id: `fn-${node.identifier}`, title: "Link to Footnote", scrollBehavior: "instant", children: ["[", (_b = (_a = node.enumerator) !== null && _a !== void 0 ? _a : node.number) !== null && _b !== void 0 ? _b : node.identifier, "]"] }) }) }) }));
|
|
15
16
|
};
|
|
16
17
|
const FOOTNOTE_RENDERERS = {
|
|
17
18
|
footnoteReference: FootnoteReference,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type HashLinkBehavior = {
|
|
3
|
+
/** When scrolling, is this `instant`, `auto` or `scroll`? */
|
|
4
|
+
scrollBehavior?: ScrollBehavior;
|
|
5
|
+
/** When updating the URL, do you push state or replace it? */
|
|
6
|
+
historyState?: 'replace' | 'push' | null;
|
|
7
|
+
/** Change the keyboard tab-index location to the new element */
|
|
8
|
+
focusTarget?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function scrollToElement(el: HTMLElement | null, { htmlId, scrollBehavior, historyState, focusTarget, }?: {
|
|
11
|
+
/** Update the URL fragment to this ID */
|
|
12
|
+
htmlId?: string;
|
|
13
|
+
} & HashLinkBehavior): void;
|
|
14
|
+
export declare function HashLink({ id, kind, title, children, hover, className, hideInPopup, scrollBehavior, historyState, focusTarget, }: {
|
|
15
|
+
id?: string;
|
|
16
|
+
kind?: string;
|
|
17
|
+
title?: string;
|
|
18
|
+
hover?: boolean;
|
|
19
|
+
children?: '#' | '¶' | React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
hideInPopup?: boolean;
|
|
22
|
+
} & HashLinkBehavior): import("react/jsx-runtime").JSX.Element | null;
|
|
23
|
+
//# sourceMappingURL=hashLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashLink.d.ts","sourceRoot":"","sources":["../src/hashLink.tsx"],"names":[],"mappings":";AAGA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,6DAA6D;IAC7D,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,8DAA8D;IAC9D,YAAY,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC;IACzC,gEAAgE;IAChE,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAUF,wBAAgB,eAAe,CAC7B,EAAE,EAAE,WAAW,GAAG,IAAI,EACtB,EACE,MAAe,EACf,cAAyB,EACzB,YAAwB,EACxB,WAAkB,GACnB,GAAE;IACD,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,gBAAqB,QAe1B;AAED,wBAAgB,QAAQ,CAAC,EACvB,EAAE,EACF,IAAI,EACJ,KAA8B,EAC9B,QAAc,EACd,KAAK,EACL,SAAyB,EACzB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,GACZ,EAAE;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,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,GAAG,gBAAgB,kDA4BnB"}
|
package/dist/hashLink.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useXRefState } from '@myst-theme/providers';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
function openDetails(el) {
|
|
5
|
+
if (!el)
|
|
6
|
+
return;
|
|
7
|
+
if (el.nodeName === 'DETAILS') {
|
|
8
|
+
el.open = true;
|
|
9
|
+
}
|
|
10
|
+
openDetails(el.parentElement);
|
|
11
|
+
}
|
|
12
|
+
export function scrollToElement(el, { htmlId = el === null || el === void 0 ? void 0 : el.id, scrollBehavior = 'smooth', historyState = 'replace', focusTarget = true, } = {}) {
|
|
13
|
+
if (!el)
|
|
14
|
+
return;
|
|
15
|
+
openDetails(el);
|
|
16
|
+
el.scrollIntoView({ behavior: scrollBehavior });
|
|
17
|
+
if (historyState === 'push') {
|
|
18
|
+
history.pushState(undefined, '', `#${htmlId}`);
|
|
19
|
+
}
|
|
20
|
+
else if (historyState === 'replace') {
|
|
21
|
+
history.replaceState(undefined, '', `#${htmlId}`);
|
|
22
|
+
}
|
|
23
|
+
if (focusTarget) {
|
|
24
|
+
// Changes keyboard tab-index location
|
|
25
|
+
if (el.tabIndex === -1)
|
|
26
|
+
el.tabIndex = -1;
|
|
27
|
+
el.focus({ preventScroll: true });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export function HashLink({ id, kind, title = `Link to this ${kind}`, children = '¶', hover, className = 'font-normal', hideInPopup, scrollBehavior, historyState, focusTarget, }) {
|
|
31
|
+
const { inCrossRef } = useXRefState();
|
|
32
|
+
if (inCrossRef || !id) {
|
|
33
|
+
// If we are in a cross-reference pop-out, either hide hash link
|
|
34
|
+
// or return something that is **not** a link
|
|
35
|
+
return hideInPopup ? null : (_jsx("span", { className: classNames('select-none', className), children: children }));
|
|
36
|
+
}
|
|
37
|
+
const scroll = (evt) => {
|
|
38
|
+
evt.preventDefault();
|
|
39
|
+
const el = document.getElementById(id);
|
|
40
|
+
scrollToElement(el, { scrollBehavior, historyState, focusTarget });
|
|
41
|
+
};
|
|
42
|
+
return (_jsx("a", { className: classNames('select-none no-underline text-inherit hover:text-inherit', className, {
|
|
43
|
+
'transition-opacity opacity-0 focus:opacity-100 group-hover:opacity-70': hover,
|
|
44
|
+
'hover:underline': !hover,
|
|
45
|
+
}), onClick: scroll, href: `#${id}`, title: title, "aria-label": title, children: children }));
|
|
46
|
+
}
|
package/dist/heading.d.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Heading } from 'myst-spec';
|
|
3
2
|
import type { NodeRenderer } from '@myst-theme/providers';
|
|
4
|
-
export declare function HashLink({ id, kind, title, children, hover, className, hideInPopup, }: {
|
|
5
|
-
id?: string;
|
|
6
|
-
kind?: string;
|
|
7
|
-
title?: string;
|
|
8
|
-
hover?: boolean;
|
|
9
|
-
children?: '#' | '¶' | React.ReactNode;
|
|
10
|
-
className?: string;
|
|
11
|
-
hideInPopup?: boolean;
|
|
12
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
13
3
|
declare const Heading: NodeRenderer<Heading>;
|
|
14
4
|
declare const HEADING_RENDERERS: {
|
|
15
5
|
heading: NodeRenderer<Heading>;
|
package/dist/heading.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../src/heading.tsx"],"names":[],"mappings":"
|
|
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,QAAA,MAAM,OAAO,EAAE,YAAY,CAAC,OAAO,CAqBlC,CAAC;AAEF,QAAA,MAAM,iBAAiB;;CAEtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
package/dist/heading.js
CHANGED
|
@@ -1,26 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useXRefState } from '@myst-theme/providers';
|
|
3
2
|
import { createElement as e } from 'react';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
3
|
import { MyST } from './MyST.js';
|
|
6
|
-
|
|
7
|
-
const { inCrossRef } = useXRefState();
|
|
8
|
-
if (inCrossRef || !id) {
|
|
9
|
-
// If we are in a cross-reference pop-out, either hide hash link
|
|
10
|
-
// or return something that is **not** a link
|
|
11
|
-
return hideInPopup ? null : (_jsx("span", { className: classNames('select-none', className), children: children }));
|
|
12
|
-
}
|
|
13
|
-
const scroll = (evt) => {
|
|
14
|
-
evt.preventDefault();
|
|
15
|
-
const el = document.getElementById(id);
|
|
16
|
-
el === null || el === void 0 ? void 0 : el.scrollIntoView({ behavior: 'smooth' });
|
|
17
|
-
history.replaceState(undefined, '', `#${id}`);
|
|
18
|
-
};
|
|
19
|
-
return (_jsx("a", { className: classNames('select-none no-underline text-inherit hover:text-inherit', className, {
|
|
20
|
-
'transition-opacity opacity-0 focus:opacity-100 group-hover:opacity-70': hover,
|
|
21
|
-
'hover:underline': !hover,
|
|
22
|
-
}), onClick: scroll, href: `#${id}`, title: title, "aria-label": title, children: children }));
|
|
23
|
-
}
|
|
4
|
+
import { HashLink } from './hashLink.js';
|
|
24
5
|
const Heading = ({ node }) => {
|
|
25
6
|
const { enumerator, depth, key, identifier, html_id } = node;
|
|
26
7
|
const id = html_id || identifier || key;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NodeRenderer } from '@myst-theme/providers';
|
|
2
2
|
export { CopyIcon, HoverPopover, Tooltip, LinkCard } from './components/index.js';
|
|
3
3
|
export { CodeBlock } from './code.js';
|
|
4
|
-
export { HashLink } from './
|
|
4
|
+
export { HashLink, scrollToElement } from './hashLink.js';
|
|
5
5
|
export { Admonition, AdmonitionKind } from './admonitions.js';
|
|
6
6
|
export { Details } from './dropdown.js';
|
|
7
7
|
export { TabSet, TabItem } from './tabs.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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;AAwB1D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAwB1D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAuB1D,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import ASIDE_RENDERERS from './aside.js';
|
|
|
22
22
|
import UNKNOWN_MYST_RENDERERS from './unknown.js';
|
|
23
23
|
export { CopyIcon, HoverPopover, Tooltip, LinkCard } from './components/index.js';
|
|
24
24
|
export { CodeBlock } from './code.js';
|
|
25
|
-
export { HashLink } from './
|
|
25
|
+
export { HashLink, scrollToElement } from './hashLink.js';
|
|
26
26
|
export { Admonition, AdmonitionKind } from './admonitions.js';
|
|
27
27
|
export { Details } from './dropdown.js';
|
|
28
28
|
export { TabSet, TabItem } from './tabs.js';
|
package/dist/math.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ExclamationCircleIcon } from '@heroicons/react/24/outline';
|
|
3
3
|
import { InlineError } from './inlineError.js';
|
|
4
|
-
import { HashLink } from './
|
|
4
|
+
import { HashLink } from './hashLink.js';
|
|
5
5
|
const mathRenderer = ({ node }) => {
|
|
6
6
|
if (node.type === 'math') {
|
|
7
7
|
if (node.error || !node.html) {
|
package/dist/proof.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { ChevronRightIcon } from '@heroicons/react/24/solid';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import { HashLink } from './
|
|
4
|
+
import { HashLink } from './hashLink.js';
|
|
5
5
|
import { MyST } from './MyST.js';
|
|
6
6
|
export var ProofKind;
|
|
7
7
|
(function (ProofKind) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myst-to-react",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@heroicons/react": "^2.0.18",
|
|
24
|
-
"@myst-theme/providers": "^0.9.
|
|
24
|
+
"@myst-theme/providers": "^0.9.5",
|
|
25
25
|
"@scienceicons/react": "^0.0.6",
|
|
26
26
|
"@radix-ui/react-hover-card": "^1.0.6",
|
|
27
27
|
"buffer": "^6.0.3",
|
|
28
28
|
"classnames": "^2.3.2",
|
|
29
|
-
"myst-common": "^1.4.
|
|
30
|
-
"myst-config": "^1.4.
|
|
29
|
+
"myst-common": "^1.4.4",
|
|
30
|
+
"myst-config": "^1.4.4",
|
|
31
31
|
"myst-spec": "^0.0.5",
|
|
32
32
|
"nanoid": "^4.0.2",
|
|
33
33
|
"react-syntax-highlighter": "^15.5.0",
|