myst-to-react 0.5.6 → 0.5.7
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/cjs/cite.js +1 -1
- package/dist/cjs/code.d.ts.map +1 -1
- package/dist/cjs/code.js +4 -3
- package/dist/cjs/heading.d.ts +1 -1
- package/dist/cjs/heading.d.ts.map +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +3 -1
- package/dist/esm/cite.js +1 -1
- package/dist/esm/code.d.ts.map +1 -1
- package/dist/esm/code.js +4 -3
- package/dist/esm/heading.d.ts +1 -1
- package/dist/esm/heading.d.ts.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/types/code.d.ts.map +1 -1
- package/dist/types/heading.d.ts +1 -1
- package/dist/types/heading.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/cjs/cite.js
CHANGED
|
@@ -32,7 +32,7 @@ const Cite = ({ label, error, children, }) => {
|
|
|
32
32
|
return (0, jsx_runtime_1.jsx)(inlineError_1.InlineError, { value: label, message: 'Citation Not Found' });
|
|
33
33
|
}
|
|
34
34
|
const doiUrl = doiString ? doi_utils_1.doi.buildUrl(doiString) : null;
|
|
35
|
-
return ((0, jsx_runtime_1.jsx)(components_1.HoverPopover, { openDelay: 300, card: (0, jsx_runtime_1.jsx)(CiteChild, { html: html }), children: (0, jsx_runtime_1.jsxs)("cite", {
|
|
35
|
+
return ((0, jsx_runtime_1.jsx)(components_1.HoverPopover, { openDelay: 300, card: (0, jsx_runtime_1.jsx)(CiteChild, { html: html }), children: (0, jsx_runtime_1.jsxs)("cite", { children: [doiUrl && ((0, jsx_runtime_1.jsx)("a", { href: doiUrl, target: "_blank", rel: "noreferrer", className: "hover-link", children: children })), !doiUrl && children] }) }));
|
|
36
36
|
};
|
|
37
37
|
exports.Cite = Cite;
|
|
38
38
|
const CiteRenderer = ({ node }) => {
|
package/dist/cjs/code.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../src/code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,UAAU,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../src/code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,UAAU,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAS1D,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAWF,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,2CA4ErC;AA8CD,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA5C0B,OAAO;;;CA+CpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/dist/cjs/code.js
CHANGED
|
@@ -9,6 +9,7 @@ const providers_1 = require("@myst-theme/providers");
|
|
|
9
9
|
const react_syntax_highlighter_1 = require("react-syntax-highlighter");
|
|
10
10
|
const xcode_1 = __importDefault(require("react-syntax-highlighter/dist/cjs/styles/hljs/xcode"));
|
|
11
11
|
const vs2015_1 = __importDefault(require("react-syntax-highlighter/dist/cjs/styles/hljs/vs2015"));
|
|
12
|
+
const DocumentIcon_1 = __importDefault(require("@heroicons/react/24/outline/DocumentIcon"));
|
|
12
13
|
const classnames_1 = __importDefault(require("classnames"));
|
|
13
14
|
const components_1 = require("./components");
|
|
14
15
|
function normalizeLanguage(lang) {
|
|
@@ -27,7 +28,7 @@ function CodeBlock(props) {
|
|
|
27
28
|
'shadow hover:shadow-md dark:shadow-2xl dark:shadow-neutral-900 my-5 text-sm': shadow,
|
|
28
29
|
'bg-stone-200/10': background,
|
|
29
30
|
'border border-l-4 border-l-blue-400 border-gray-200 dark:border-l-blue-400 dark:border-gray-800': border,
|
|
30
|
-
}), children: [filename && (0, jsx_runtime_1.jsx)("div", { className: "p-
|
|
31
|
+
}), children: [filename && ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-row pl-2 bg-white border-b dark:bg-slate-600 dark:border-slate-300", children: [(0, jsx_runtime_1.jsx)(DocumentIcon_1.default, { width: "16px", height: "16px", className: "self-center flex-none inline-block text-gray-500 dark:text-gray-100" }), (0, jsx_runtime_1.jsx)("div", { className: "self-center p-2 text-sm leading-3 prose text-slate-600 dark:text-white", children: filename })] })), (0, jsx_runtime_1.jsx)(react_syntax_highlighter_1.LightAsync, { language: normalizeLanguage(lang), startingLineNumber: startingLineNumber, showLineNumbers: showLineNumbers, style: isLight ? Object.assign(Object.assign({}, xcode_1.default), { hljs: Object.assign(Object.assign({}, xcode_1.default.hljs), { background: 'transparent' }) }) : vs2015_1.default, wrapLines: true, lineNumberContainerStyle: {
|
|
31
32
|
// This stops page content shifts
|
|
32
33
|
display: 'inline-block',
|
|
33
34
|
float: 'left',
|
|
@@ -45,11 +46,11 @@ function CodeBlock(props) {
|
|
|
45
46
|
'data-highlight': 'true',
|
|
46
47
|
}
|
|
47
48
|
: { 'data-line-number': `${line}` };
|
|
48
|
-
}, customStyle: { padding: '0.8rem' }, children: value }), showCopy && (0, jsx_runtime_1.jsx)(components_1.CopyIcon, { text: value, className:
|
|
49
|
+
}, customStyle: { padding: '0.8rem' }, children: value }), showCopy && ((0, jsx_runtime_1.jsx)(components_1.CopyIcon, { text: value, className: (0, classnames_1.default)('absolute right-1', { 'top-[32px]': filename, 'top-1': !filename }) }))] }));
|
|
49
50
|
}
|
|
50
51
|
exports.CodeBlock = CodeBlock;
|
|
51
52
|
const code = ({ node }) => {
|
|
52
|
-
return ((0, jsx_runtime_1.jsx)(CodeBlock, { identifier: node.html_id, "data-mdast-node-type": node.type, "data-mdast-node-id": node.key, value: node.value || '', lang: node.lang, emphasizeLines: node.emphasizeLines, showLineNumbers: node.showLineNumbers, startingLineNumber: node.startingLineNumber, shadow: true, border: node.executable, background: !node.executable }));
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(CodeBlock, { identifier: node.html_id, "data-mdast-node-type": node.type, "data-mdast-node-id": node.key, value: node.value || '', lang: node.lang, filename: node.filename, emphasizeLines: node.emphasizeLines, showLineNumbers: node.showLineNumbers, startingLineNumber: node.startingLineNumber, shadow: true, border: node.executable, background: !node.executable }));
|
|
53
54
|
};
|
|
54
55
|
function isColor(maybeColorHash) {
|
|
55
56
|
if (!maybeColorHash || maybeColorHash.length > 9)
|
package/dist/cjs/heading.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Heading } from 'myst-spec';
|
|
|
3
3
|
import type { NodeRenderer } from '@myst-theme/providers';
|
|
4
4
|
export declare function HashLink({ id, kind, title, children, hover, className, hideInPopup, }: {
|
|
5
5
|
id?: string;
|
|
6
|
-
kind
|
|
6
|
+
kind?: string;
|
|
7
7
|
title?: string;
|
|
8
8
|
hover?: boolean;
|
|
9
9
|
children?: '#' | '¶' | React.ReactNode;
|
|
@@ -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;AAM1D,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;
|
|
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;AAM1D,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,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,kDA6BA;AAED,QAAA,MAAM,OAAO,EAAE,YAAY,CAAC,OAAO,CAqBlC,CAAC;AAEF,QAAA,MAAM,iBAAiB;;CAEtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { NodeRenderer } from '@myst-theme/providers';
|
|
2
2
|
export { CopyIcon, HoverPopover, Tooltip, LinkCard } from './components';
|
|
3
3
|
export { CodeBlock } from './code';
|
|
4
|
+
export { HashLink } from './heading';
|
|
4
5
|
export { Admonition, AdmonitionKind } from './admonitions';
|
|
5
6
|
export { Details } from './dropdown';
|
|
6
7
|
export { TabSet, TabItem } from './tabs';
|
package/dist/cjs/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;AAuB1D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACzE,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;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAsB1D,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAuB1D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,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;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAsB1D,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
package/dist/cjs/index.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.MyST = exports.DEFAULT_RENDERERS = exports.useFetchMdast = exports.TabItem = exports.TabSet = exports.Details = exports.AdmonitionKind = exports.Admonition = exports.CodeBlock = exports.LinkCard = exports.Tooltip = exports.HoverPopover = exports.CopyIcon = void 0;
|
|
6
|
+
exports.MyST = exports.DEFAULT_RENDERERS = exports.useFetchMdast = exports.TabItem = exports.TabSet = exports.Details = exports.AdmonitionKind = exports.Admonition = exports.HashLink = exports.CodeBlock = exports.LinkCard = exports.Tooltip = exports.HoverPopover = exports.CopyIcon = void 0;
|
|
7
7
|
const basic_1 = __importDefault(require("./basic"));
|
|
8
8
|
const admonitions_1 = __importDefault(require("./admonitions"));
|
|
9
9
|
const dropdown_1 = __importDefault(require("./dropdown"));
|
|
@@ -32,6 +32,8 @@ Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () {
|
|
|
32
32
|
Object.defineProperty(exports, "LinkCard", { enumerable: true, get: function () { return components_1.LinkCard; } });
|
|
33
33
|
var code_2 = require("./code");
|
|
34
34
|
Object.defineProperty(exports, "CodeBlock", { enumerable: true, get: function () { return code_2.CodeBlock; } });
|
|
35
|
+
var heading_2 = require("./heading");
|
|
36
|
+
Object.defineProperty(exports, "HashLink", { enumerable: true, get: function () { return heading_2.HashLink; } });
|
|
35
37
|
var admonitions_2 = require("./admonitions");
|
|
36
38
|
Object.defineProperty(exports, "Admonition", { enumerable: true, get: function () { return admonitions_2.Admonition; } });
|
|
37
39
|
Object.defineProperty(exports, "AdmonitionKind", { enumerable: true, get: function () { return admonitions_2.AdmonitionKind; } });
|
package/dist/esm/cite.js
CHANGED
|
@@ -25,7 +25,7 @@ export const Cite = ({ label, error, children, }) => {
|
|
|
25
25
|
return _jsx(InlineError, { value: label, message: 'Citation Not Found' });
|
|
26
26
|
}
|
|
27
27
|
const doiUrl = doiString ? doi.buildUrl(doiString) : null;
|
|
28
|
-
return (_jsx(HoverPopover, { openDelay: 300, card: _jsx(CiteChild, { html: html }), children: _jsxs("cite", {
|
|
28
|
+
return (_jsx(HoverPopover, { openDelay: 300, card: _jsx(CiteChild, { html: html }), children: _jsxs("cite", { children: [doiUrl && (_jsx("a", { href: doiUrl, target: "_blank", rel: "noreferrer", className: "hover-link", children: children })), !doiUrl && children] }) }));
|
|
29
29
|
};
|
|
30
30
|
export const CiteRenderer = ({ node }) => {
|
|
31
31
|
return (_jsx(Cite, { label: node.label, error: node.error, children: _jsx(MyST, { ast: node.children }) }));
|
package/dist/esm/code.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../src/code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,UAAU,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../src/code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,UAAU,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAS1D,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAWF,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,2CA4ErC;AA8CD,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA5C0B,OAAO;;;CA+CpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/dist/esm/code.js
CHANGED
|
@@ -3,6 +3,7 @@ import { useTheme } from '@myst-theme/providers';
|
|
|
3
3
|
import { LightAsync as SyntaxHighlighter } from 'react-syntax-highlighter';
|
|
4
4
|
import light from 'react-syntax-highlighter/dist/cjs/styles/hljs/xcode';
|
|
5
5
|
import dark from 'react-syntax-highlighter/dist/cjs/styles/hljs/vs2015';
|
|
6
|
+
import DocumentIcon from '@heroicons/react/24/outline/DocumentIcon';
|
|
6
7
|
import classNames from 'classnames';
|
|
7
8
|
import { CopyIcon } from './components';
|
|
8
9
|
function normalizeLanguage(lang) {
|
|
@@ -21,7 +22,7 @@ export function CodeBlock(props) {
|
|
|
21
22
|
'shadow hover:shadow-md dark:shadow-2xl dark:shadow-neutral-900 my-5 text-sm': shadow,
|
|
22
23
|
'bg-stone-200/10': background,
|
|
23
24
|
'border border-l-4 border-l-blue-400 border-gray-200 dark:border-l-blue-400 dark:border-gray-800': border,
|
|
24
|
-
}), children: [filename && _jsx("div", { className: "p-
|
|
25
|
+
}), children: [filename && (_jsxs("div", { className: "flex flex-row pl-2 bg-white border-b dark:bg-slate-600 dark:border-slate-300", children: [_jsx(DocumentIcon, { width: "16px", height: "16px", className: "self-center flex-none inline-block text-gray-500 dark:text-gray-100" }), _jsx("div", { className: "self-center p-2 text-sm leading-3 prose text-slate-600 dark:text-white", children: filename })] })), _jsx(SyntaxHighlighter, { language: normalizeLanguage(lang), startingLineNumber: startingLineNumber, showLineNumbers: showLineNumbers, style: isLight ? Object.assign(Object.assign({}, light), { hljs: Object.assign(Object.assign({}, light.hljs), { background: 'transparent' }) }) : dark, wrapLines: true, lineNumberContainerStyle: {
|
|
25
26
|
// This stops page content shifts
|
|
26
27
|
display: 'inline-block',
|
|
27
28
|
float: 'left',
|
|
@@ -39,10 +40,10 @@ export function CodeBlock(props) {
|
|
|
39
40
|
'data-highlight': 'true',
|
|
40
41
|
}
|
|
41
42
|
: { 'data-line-number': `${line}` };
|
|
42
|
-
}, customStyle: { padding: '0.8rem' }, children: value }), showCopy && _jsx(CopyIcon, { text: value, className:
|
|
43
|
+
}, customStyle: { padding: '0.8rem' }, children: value }), showCopy && (_jsx(CopyIcon, { text: value, className: classNames('absolute right-1', { 'top-[32px]': filename, 'top-1': !filename }) }))] }));
|
|
43
44
|
}
|
|
44
45
|
const code = ({ node }) => {
|
|
45
|
-
return (_jsx(CodeBlock, { identifier: node.html_id, "data-mdast-node-type": node.type, "data-mdast-node-id": node.key, value: node.value || '', lang: node.lang, emphasizeLines: node.emphasizeLines, showLineNumbers: node.showLineNumbers, startingLineNumber: node.startingLineNumber, shadow: true, border: node.executable, background: !node.executable }));
|
|
46
|
+
return (_jsx(CodeBlock, { identifier: node.html_id, "data-mdast-node-type": node.type, "data-mdast-node-id": node.key, value: node.value || '', lang: node.lang, filename: node.filename, emphasizeLines: node.emphasizeLines, showLineNumbers: node.showLineNumbers, startingLineNumber: node.startingLineNumber, shadow: true, border: node.executable, background: !node.executable }));
|
|
46
47
|
};
|
|
47
48
|
function isColor(maybeColorHash) {
|
|
48
49
|
if (!maybeColorHash || maybeColorHash.length > 9)
|
package/dist/esm/heading.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Heading } from 'myst-spec';
|
|
|
3
3
|
import type { NodeRenderer } from '@myst-theme/providers';
|
|
4
4
|
export declare function HashLink({ id, kind, title, children, hover, className, hideInPopup, }: {
|
|
5
5
|
id?: string;
|
|
6
|
-
kind
|
|
6
|
+
kind?: string;
|
|
7
7
|
title?: string;
|
|
8
8
|
hover?: boolean;
|
|
9
9
|
children?: '#' | '¶' | React.ReactNode;
|
|
@@ -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;AAM1D,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;
|
|
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;AAM1D,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,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,kDA6BA;AAED,QAAA,MAAM,OAAO,EAAE,YAAY,CAAC,OAAO,CAqBlC,CAAC;AAEF,QAAA,MAAM,iBAAiB;;CAEtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { NodeRenderer } from '@myst-theme/providers';
|
|
2
2
|
export { CopyIcon, HoverPopover, Tooltip, LinkCard } from './components';
|
|
3
3
|
export { CodeBlock } from './code';
|
|
4
|
+
export { HashLink } from './heading';
|
|
4
5
|
export { Admonition, AdmonitionKind } from './admonitions';
|
|
5
6
|
export { Details } from './dropdown';
|
|
6
7
|
export { TabSet, TabItem } from './tabs';
|
package/dist/esm/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;AAuB1D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACzE,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;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAsB1D,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAuB1D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,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;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAsB1D,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import EXERCISE_RENDERERS from './exercise';
|
|
|
21
21
|
import UNKNOWN_MYST_RENDERERS from './unknown';
|
|
22
22
|
export { CopyIcon, HoverPopover, Tooltip, LinkCard } from './components';
|
|
23
23
|
export { CodeBlock } from './code';
|
|
24
|
+
export { HashLink } from './heading';
|
|
24
25
|
export { Admonition, AdmonitionKind } from './admonitions';
|
|
25
26
|
export { Details } from './dropdown';
|
|
26
27
|
export { TabSet, TabItem } from './tabs';
|
package/dist/types/code.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../src/code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,UAAU,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../src/code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,UAAU,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAS1D,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAWF,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,2CA4ErC;AA8CD,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA5C0B,OAAO;;;CA+CpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/dist/types/heading.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Heading } from 'myst-spec';
|
|
|
3
3
|
import type { NodeRenderer } from '@myst-theme/providers';
|
|
4
4
|
export declare function HashLink({ id, kind, title, children, hover, className, hideInPopup, }: {
|
|
5
5
|
id?: string;
|
|
6
|
-
kind
|
|
6
|
+
kind?: string;
|
|
7
7
|
title?: string;
|
|
8
8
|
hover?: boolean;
|
|
9
9
|
children?: '#' | '¶' | React.ReactNode;
|
|
@@ -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;AAM1D,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;
|
|
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;AAM1D,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,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,kDA6BA;AAED,QAAA,MAAM,OAAO,EAAE,YAAY,CAAC,OAAO,CAqBlC,CAAC;AAEF,QAAA,MAAM,iBAAiB;;CAEtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { NodeRenderer } from '@myst-theme/providers';
|
|
2
2
|
export { CopyIcon, HoverPopover, Tooltip, LinkCard } from './components';
|
|
3
3
|
export { CodeBlock } from './code';
|
|
4
|
+
export { HashLink } from './heading';
|
|
4
5
|
export { Admonition, AdmonitionKind } from './admonitions';
|
|
5
6
|
export { Details } from './dropdown';
|
|
6
7
|
export { TabSet, TabItem } from './tabs';
|
|
@@ -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;AAuB1D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACzE,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;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAsB1D,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAuB1D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,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;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAsB1D,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myst-to-react",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.7",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@heroicons/react": "^2.0.18",
|
|
23
|
-
"@myst-theme/providers": "^0.5.
|
|
23
|
+
"@myst-theme/providers": "^0.5.7",
|
|
24
24
|
"@radix-ui/react-hover-card": "^1.0.6",
|
|
25
25
|
"buffer": "^6.0.3",
|
|
26
26
|
"classnames": "^2.3.2",
|
|
27
|
-
"myst-common": "^1.1.
|
|
28
|
-
"myst-config": "^1.1.
|
|
27
|
+
"myst-common": "^1.1.8",
|
|
28
|
+
"myst-config": "^1.1.8",
|
|
29
29
|
"myst-spec": "^0.0.4",
|
|
30
30
|
"nanoid": "^4.0.2",
|
|
31
31
|
"react-syntax-highlighter": "^15.5.0",
|