myst-to-react 0.15.2 → 0.17.0
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/admonitions.d.ts.map +1 -1
- package/dist/admonitions.js +9 -6
- package/dist/aside.d.ts.map +1 -1
- package/dist/aside.js +6 -6
- package/dist/block.d.ts.map +1 -1
- package/dist/block.js +3 -2
- package/dist/card.js +6 -6
- package/dist/code.d.ts.map +1 -1
- package/dist/code.js +7 -4
- package/dist/dropdown.js +2 -2
- package/dist/exercise.d.ts.map +1 -1
- package/dist/exercise.js +5 -5
- package/dist/image.d.ts.map +1 -1
- package/dist/image.js +3 -1
- package/dist/proof.d.ts.map +1 -1
- package/dist/proof.js +3 -3
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.js +5 -5
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admonitions.d.ts","sourceRoot":"","sources":["../src/admonitions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,IAAI,cAAc,EAC5B,eAAe,IAAI,mBAAmB,EACvC,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAsB1D,oBAAY,cAAc;IACxB,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,OAAO,YAAY;CACpB;AAED,KAAK,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAyEjD,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,mBAAmB,CAE7D,CAAC;AAmCF,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,IAAI,EACJ,KAAK,E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AC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,2CA4EA;AAED,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,cAAc,CAyB3D,CAAC;AAEF,QAAA,MAAM,oBAAoB;;;CAGzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
package/dist/admonitions.js
CHANGED
|
@@ -57,7 +57,7 @@ function getFirstKind({ kind, classes = [], }) {
|
|
|
57
57
|
}
|
|
58
58
|
return { kind: AdmonitionKind.note, color: 'blue' };
|
|
59
59
|
}
|
|
60
|
-
const iconClass = 'inline-block pl-2 mr-2 self-center flex-none';
|
|
60
|
+
const iconClass = 'myst-admonition-header-icon inline-block pl-2 mr-2 self-center flex-none';
|
|
61
61
|
function AdmonitionIcon({ kind, className }) {
|
|
62
62
|
const cn = classNames(iconClass, className);
|
|
63
63
|
const opts = { width: '2rem', height: '2rem', className: cn };
|
|
@@ -97,14 +97,14 @@ const HeaderElement = ({ dropdown, className, children, }) => {
|
|
|
97
97
|
return _jsx("div", { className: className, children: children });
|
|
98
98
|
};
|
|
99
99
|
export function Admonition({ title, kind, color, simple, dropdown, children, hideIcon, className, open, }) {
|
|
100
|
-
return (_jsxs(WrapperElement, { dropdown: dropdown, open: open, className: classNames(
|
|
101
|
-
'rounded border-l-4': !simple,
|
|
102
|
-
'border-l-2': simple,
|
|
100
|
+
return (_jsxs(WrapperElement, { dropdown: dropdown, open: open, className: classNames(`myst-admonition myst-admonition-${kind} my-5 shadow-md dark:shadow-2xl dark:shadow-neutral-900`, 'bg-gray-50/10 dark:bg-stone-800', 'overflow-hidden', {
|
|
101
|
+
'myst-admonition-default rounded border-l-4': !simple,
|
|
102
|
+
'myst-admonition-simple border-l-2': simple,
|
|
103
103
|
'border-blue-500': !color || color === 'blue',
|
|
104
104
|
'border-green-600': color === 'green',
|
|
105
105
|
'border-amber-600': color === 'yellow',
|
|
106
106
|
'border-red-600': color === 'red',
|
|
107
|
-
}, className), children: [title && (_jsxs(HeaderElement, { dropdown: dropdown, className: classNames('m-0 font-medium py-1 flex min-w-0', {
|
|
107
|
+
}, className), children: [title && (_jsxs(HeaderElement, { dropdown: dropdown, className: classNames('myst-admonition-header m-0 font-medium py-1 flex min-w-0', {
|
|
108
108
|
'text-lg': !simple,
|
|
109
109
|
'text-md': simple,
|
|
110
110
|
'bg-gray-100 dark:bg-stone-700': simple,
|
|
@@ -119,7 +119,10 @@ export function Admonition({ title, kind, color, simple, dropdown, children, hid
|
|
|
119
119
|
'text-green-600': color === 'green',
|
|
120
120
|
'text-amber-600': color === 'yellow',
|
|
121
121
|
'text-red-600': color === 'red',
|
|
122
|
-
}) })), _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: "self-center flex-none text-sm font-thin text-neutral-700 dark:text-neutral-200", children: _jsx(ChevronRightIcon, { width: "2rem", height: "2rem", className: classNames(iconClass, 'transition-transform details-toggle') }) }))] })), _jsx("div", { className: classNames('px-4', {
|
|
122
|
+
}) })), _jsx("div", { className: classNames('myst-admonition-header-text text-neutral-900 dark:text-white grow self-center overflow-hidden break-words', { 'ml-4': hideIcon }), children: title }), dropdown && (_jsx("div", { className: "self-center flex-none text-sm font-thin text-neutral-700 dark:text-neutral-200", children: _jsx(ChevronRightIcon, { width: "2rem", height: "2rem", className: classNames(iconClass, 'transition-transform details-toggle') }) }))] })), _jsx("div", { className: classNames('myst-admonition-body px-4', {
|
|
123
|
+
'py-1': !simple,
|
|
124
|
+
'details-body': dropdown,
|
|
125
|
+
}), children: children })] }));
|
|
123
126
|
}
|
|
124
127
|
export const AdmonitionRenderer = ({ node, className }) => {
|
|
125
128
|
const [title, ...rest] = node.children;
|
package/dist/aside.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aside.d.ts","sourceRoot":"","sources":["../src/aside.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;
|
|
1
|
+
{"version":3,"file":"aside.d.ts","sourceRoot":"","sources":["../src/aside.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAuBF,eAAO,MAAM,aAAa,EAAE,YAAY,CAAC,KAAK,CAoB7C,CAAC;AAEF,QAAA,MAAM,eAAe;;CAEpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
package/dist/aside.js
CHANGED
|
@@ -5,17 +5,17 @@ function getAsideClass(kind) {
|
|
|
5
5
|
switch (kind) {
|
|
6
6
|
case 'topic':
|
|
7
7
|
return {
|
|
8
|
-
container: 'my-5 shadow dark:bg-stone-800 overflow-hidden dark:border-l-4 border-slate-400',
|
|
9
|
-
title: 'm-0 font-medium py-2 px-4 flex min-w-0 text-md border-y dark:border-y-0 bg-gray-50/80 dark:bg-slate-900',
|
|
10
|
-
body: 'px-4',
|
|
8
|
+
container: 'myst-aside myst-aside-${kind} my-5 shadow dark:bg-stone-800 overflow-hidden dark:border-l-4 border-slate-400',
|
|
9
|
+
title: 'myst-aside-title m-0 font-medium py-2 px-4 flex min-w-0 text-md border-y dark:border-y-0 bg-gray-50/80 dark:bg-slate-900',
|
|
10
|
+
body: 'myst-aside-body px-4',
|
|
11
11
|
};
|
|
12
12
|
case 'margin':
|
|
13
13
|
case 'sidebar':
|
|
14
14
|
default:
|
|
15
15
|
return {
|
|
16
|
-
container: 'text-sm lg:h-0 col-margin-right',
|
|
17
|
-
title: 'text-base font-semibold',
|
|
18
|
-
body: '',
|
|
16
|
+
container: 'myst-aside myst-aside-${kind} text-sm lg:h-0 col-margin-right',
|
|
17
|
+
title: 'myst-aside-title text-base font-semibold',
|
|
18
|
+
body: 'myst-aside-body',
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
}
|
package/dist/block.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../src/block.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,wBAAgB,KAAK,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../src/block.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,wBAAgB,KAAK,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,kDAqBrF;AAED,QAAA,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAEjD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
package/dist/block.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Details } from './dropdown.js';
|
|
|
3
3
|
import { MyST } from './MyST.js';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
export function Block({ node, className }) {
|
|
6
|
-
var _a, _b;
|
|
6
|
+
var _a, _b, _c;
|
|
7
7
|
const cn = classNames(className, node.class, {
|
|
8
8
|
[(_a = node.data) === null || _a === void 0 ? void 0 : _a.class]: typeof ((_b = node.data) === null || _b === void 0 ? void 0 : _b.class) === 'string',
|
|
9
9
|
});
|
|
@@ -12,7 +12,8 @@ export function Block({ node, className }) {
|
|
|
12
12
|
// Only wrap this in a block if the block has a class name or an identifier
|
|
13
13
|
// Otherwise pass through the contents as is.
|
|
14
14
|
// This allows children (e.g. margin) access to the grid-system
|
|
15
|
-
const
|
|
15
|
+
const identifier = (_c = node.html_id) !== null && _c !== void 0 ? _c : node.identifier;
|
|
16
|
+
const block = cn || identifier ? (_jsx("div", { id: identifier, className: cn, children: _jsx(MyST, { ast: node.children }) })) : (_jsx(MyST, { ast: node.children }));
|
|
16
17
|
if (node.visibility === 'hide') {
|
|
17
18
|
return _jsx(Details, { title: "Block", children: block });
|
|
18
19
|
}
|
package/dist/card.js
CHANGED
|
@@ -3,13 +3,13 @@ import classNames from 'classnames';
|
|
|
3
3
|
import { useLinkProvider, useBaseurl, withBaseurl } from '@myst-theme/providers';
|
|
4
4
|
import { MyST } from './MyST.js';
|
|
5
5
|
export const Header = ({ node, className }) => {
|
|
6
|
-
return (_jsx("header", { className: classNames('py-1 pl-3 m-0 border-b border-gray-100 bg-gray-50 dark:bg-slate-900 dark:border-gray-800', className), children: _jsx(MyST, { ast: node.children }) }));
|
|
6
|
+
return (_jsx("header", { className: classNames('myst-card-header py-1 pl-3 m-0 border-b border-gray-100 bg-gray-50 dark:bg-slate-900 dark:border-gray-800', className), children: _jsx(MyST, { ast: node.children }) }));
|
|
7
7
|
};
|
|
8
8
|
export const Footer = ({ node, className }) => {
|
|
9
|
-
return (_jsx("footer", { className: classNames('py-1 pl-3 m-0 border-t border-gray-100 bg-gray-50 dark:bg-slate-900 dark:border-gray-800', className), children: _jsx(MyST, { ast: node.children }) }));
|
|
9
|
+
return (_jsx("footer", { className: classNames('myst-card-footer py-1 pl-3 m-0 border-t border-gray-100 bg-gray-50 dark:bg-slate-900 dark:border-gray-800', className), children: _jsx(MyST, { ast: node.children }) }));
|
|
10
10
|
};
|
|
11
11
|
export const CardTitle = ({ node, className }) => {
|
|
12
|
-
return (_jsx("div", { className: classNames('pt-3 font-bold group-hover:underline', className), children: _jsx(MyST, { ast: node.children }) }));
|
|
12
|
+
return (_jsx("div", { className: classNames('myst-card-title pt-3 font-bold group-hover:underline', className), children: _jsx(MyST, { ast: node.children }) }));
|
|
13
13
|
};
|
|
14
14
|
function getParts(children) {
|
|
15
15
|
var _a, _b;
|
|
@@ -39,11 +39,11 @@ export const CardRenderer = ({ node, className }) => {
|
|
|
39
39
|
const url = node.url;
|
|
40
40
|
const isStatic = node.static || false;
|
|
41
41
|
const link = !!url;
|
|
42
|
-
const sharedStyle = 'my-5 rounded shadow dark:shadow-neutral-800 overflow-hidden border border-gray-100 dark:border-gray-800 flex flex-col';
|
|
42
|
+
const sharedStyle = 'myst-card my-5 rounded shadow dark:shadow-neutral-800 overflow-hidden border border-gray-100 dark:border-gray-800 flex flex-col';
|
|
43
43
|
if (link) {
|
|
44
|
-
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', className), children: [_jsx(MyST, { ast: parts.header }), _jsx("div", { className: "flex-grow px-4 py-2", children: _jsx(MyST, { ast: parts.body }) }), _jsx(MyST, { ast: parts.footer })] }));
|
|
44
|
+
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', className), children: [_jsx(MyST, { ast: parts.header }), _jsx("div", { className: "myst-card-body flex-grow px-4 py-2", children: _jsx(MyST, { ast: parts.body }) }), _jsx(MyST, { ast: parts.footer })] }));
|
|
45
45
|
}
|
|
46
|
-
return (_jsxs("div", { className: classNames(sharedStyle, className), children: [_jsx(MyST, { ast: parts.header }), _jsx("div", { className: "flex-grow px-4 py-2", children: _jsx(MyST, { ast: parts.body }) }), _jsx(MyST, { ast: parts.footer })] }));
|
|
46
|
+
return (_jsxs("div", { className: classNames(sharedStyle, className), children: [_jsx(MyST, { ast: parts.header }), _jsx("div", { className: "myst-card-body flex-grow px-4 py-2", children: _jsx(MyST, { ast: parts.body }) }), _jsx(MyST, { ast: parts.footer })] }));
|
|
47
47
|
};
|
|
48
48
|
const CARD_RENDERERS = {
|
|
49
49
|
card: CardRenderer,
|
package/dist/code.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../src/code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAU1D,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;AAaF,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../src/code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAU1D,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;AAaF,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,2CAuFrC;AAgED,QAAA,MAAM,cAAc;;;CAGnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/dist/code.js
CHANGED
|
@@ -49,11 +49,14 @@ export function CodeBlock(props) {
|
|
|
49
49
|
},
|
|
50
50
|
};
|
|
51
51
|
}, [emphasizeLines]);
|
|
52
|
-
return (_jsxs("div", { id: identifier, className: classNames('relative group not-prose
|
|
53
|
-
'shadow hover:shadow-md dark:shadow-2xl dark:shadow-neutral-900
|
|
52
|
+
return (_jsxs("div", { id: identifier, className: classNames('relative myst-code group not-prose', className, {
|
|
53
|
+
'my-5 text-sm shadow hover:shadow-md dark:shadow-2xl dark:shadow-neutral-900': shadow,
|
|
54
54
|
'bg-stone-200/10': background,
|
|
55
|
-
'border border-l-4 border-l-blue-400
|
|
56
|
-
}), 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: "
|
|
55
|
+
'border border-l-4 border-gray-200 border-l-blue-400 dark:border-l-blue-400 dark:border-gray-800': border,
|
|
56
|
+
}), 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: "inline-block flex-none self-center text-gray-500 myst-code-filename-icon dark:text-gray-100" }), _jsx("div", { className: "self-center p-2 text-sm leading-3 myst-code-filename-title prose text-slate-600 dark:text-white", children: filename })] })), _jsx(SyntaxHighlighter, Object.assign({}, highlighterProps, { className: "block overflow-auto p-3 myst-code-body hljs", children: value })), showCopy && (_jsx(CopyIcon, { text: value, className: classNames('absolute right-1 myst-code-copy-icon', {
|
|
57
|
+
'top-[32px]': filename,
|
|
58
|
+
'top-1': !filename,
|
|
59
|
+
}) }))] }));
|
|
57
60
|
}
|
|
58
61
|
const code = ({ node, className }) => {
|
|
59
62
|
const child = (_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, className: classNames({ hidden: node.visibility === 'remove' }, node.class, className) }));
|
package/dist/dropdown.js
CHANGED
|
@@ -2,12 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { ChevronRightIcon } from '@heroicons/react/24/solid';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { MyST } from './MyST.js';
|
|
5
|
-
const iconClass = 'inline-block pl-2 mr-2 -translate-y-[1px]';
|
|
5
|
+
const iconClass = 'myst-dropdown-header-icon inline-block pl-2 mr-2 -translate-y-[1px]';
|
|
6
6
|
export const SummaryTitle = ({ node, className }) => {
|
|
7
7
|
return _jsx(MyST, { ast: node.children, className: className });
|
|
8
8
|
};
|
|
9
9
|
export function Details({ title, children, open, className, }) {
|
|
10
|
-
return (_jsxs("details", { className: classNames('rounded-md my-5 shadow dark:shadow-2xl dark:shadow-neutral-900 overflow-hidden', 'bg-gray-50 dark:bg-stone-800', className), open: open, children: [_jsx("summary", { className: classNames('m-0 text-lg font-medium py-1 min-h-[2em] pl-3', 'cursor-pointer hover:shadow-[inset_0_0_0px_30px_#00000003] dark:hover:shadow-[inset_0_0_0px_30px_#FFFFFF03]', 'bg-gray-100 dark:bg-slate-900'), children: _jsxs("span", { className: "text-neutral-900 dark:text-white", children: [_jsx("span", { className: "block float-right text-sm font-thin text-neutral-700 dark:text-neutral-200", children: _jsx(ChevronRightIcon, { width: "1.5rem", height: "1.5rem", className: classNames(iconClass, 'details-toggle', 'transition-transform') }) }), title] }) }), _jsx("div", { className: "px-4 py-1 details-body", children: children })] }));
|
|
10
|
+
return (_jsxs("details", { className: classNames('myst-dropdown rounded-md my-5 shadow dark:shadow-2xl dark:shadow-neutral-900 overflow-hidden', 'bg-gray-50 dark:bg-stone-800', className), open: open, children: [_jsx("summary", { className: classNames('myst-dropdown-header m-0 text-lg font-medium py-1 min-h-[2em] pl-3', 'cursor-pointer hover:shadow-[inset_0_0_0px_30px_#00000003] dark:hover:shadow-[inset_0_0_0px_30px_#FFFFFF03]', 'bg-gray-100 dark:bg-slate-900'), children: _jsxs("span", { className: "myst-dropdown-header-title text-neutral-900 dark:text-white", children: [_jsx("span", { className: "block float-right text-sm font-thin text-neutral-700 dark:text-neutral-200", children: _jsx(ChevronRightIcon, { width: "1.5rem", height: "1.5rem", className: classNames(iconClass, 'details-toggle', 'transition-transform') }) }), title] }) }), _jsx("div", { className: "myst-dropdown-body px-4 py-1 details-body", children: children })] }));
|
|
11
11
|
}
|
|
12
12
|
export const DetailsRenderer = ({ node, className }) => {
|
|
13
13
|
const [title, ...rest] = node.children;
|
package/dist/exercise.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../src/exercise.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAA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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,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;CACxF,2CAiFA;AAED,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,cAAc,CAuCzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,cAAc,CAiCzD,CAAC;AAEF,QAAA,MAAM,kBAAkB;;;CAGvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
package/dist/exercise.js
CHANGED
|
@@ -37,7 +37,7 @@ const HeaderElement = ({ dropdown, className, children, }) => {
|
|
|
37
37
|
};
|
|
38
38
|
const iconClass = 'inline-block pl-2 mr-2 self-center flex-none';
|
|
39
39
|
export function Callout({ title, color, dropdown, children, identifier, className, Icon, }) {
|
|
40
|
-
return (_jsxs(WrapperElement, { id: identifier, dropdown: dropdown, className: classNames('my-5 shadow dark:bg-stone-800 overflow-hidden', 'dark:border-l-4 border-slate-400', {
|
|
40
|
+
return (_jsxs(WrapperElement, { id: identifier, dropdown: dropdown, className: classNames('myst-exercise my-5 shadow dark:bg-stone-800 overflow-hidden', 'dark:border-l-4 border-slate-400', {
|
|
41
41
|
'dark:border-gray-500/60': !color || color === 'gray',
|
|
42
42
|
'dark:border-blue-500/60': color === 'blue',
|
|
43
43
|
'dark:border-green-500/60': color === 'green',
|
|
@@ -45,7 +45,7 @@ export function Callout({ title, color, dropdown, children, identifier, classNam
|
|
|
45
45
|
'dark:border-orange-500/60': color === 'orange',
|
|
46
46
|
'dark:border-red-500/60': color === 'red',
|
|
47
47
|
'dark:border-purple-500/60': color === 'purple',
|
|
48
|
-
}, className), children: [_jsxs(HeaderElement, { dropdown: dropdown, className: classNames('m-0 font-medium py-2 flex min-w-0', 'text-md', 'border-y dark:border-y-0', {
|
|
48
|
+
}, className), children: [_jsxs(HeaderElement, { dropdown: dropdown, className: classNames('myst-exercise-header m-0 font-medium py-2 flex min-w-0', 'text-md', 'border-y dark:border-y-0', {
|
|
49
49
|
'bg-gray-50/80 dark:bg-slate-900': !color || color === 'gray',
|
|
50
50
|
'bg-blue-50/80 dark:bg-slate-900': color === 'blue',
|
|
51
51
|
'bg-green-50/80 dark:bg-slate-900': color === 'green',
|
|
@@ -54,7 +54,7 @@ export function Callout({ title, color, dropdown, children, identifier, classNam
|
|
|
54
54
|
'bg-red-50/80 dark:bg-slate-900': color === 'red',
|
|
55
55
|
'bg-purple-50/80 dark:bg-slate-900': color === 'purple',
|
|
56
56
|
'cursor-pointer hover:shadow-[inset_0_0_0px_30px_#00000003] dark:hover:shadow-[inset_0_0_0px_30px_#FFFFFF03]': dropdown,
|
|
57
|
-
}), children: [Icon && (_jsx(Icon, { width: "2rem", height: "2rem", className: classNames('inline-block pl-2 mr-2 self-center flex-none', classNames({
|
|
57
|
+
}), children: [Icon && (_jsx(Icon, { width: "2rem", height: "2rem", className: classNames('myst-exercise-header-icon inline-block pl-2 mr-2 self-center flex-none', classNames({
|
|
58
58
|
'text-gray-600': !color || color === 'gray',
|
|
59
59
|
'text-blue-600': color === 'blue',
|
|
60
60
|
'text-green-600': color === 'green',
|
|
@@ -62,8 +62,8 @@ export function Callout({ title, color, dropdown, children, identifier, classNam
|
|
|
62
62
|
'text-orange-600': color === 'orange',
|
|
63
63
|
'text-red-600': color === 'red',
|
|
64
64
|
'text-purple-600': color === 'purple',
|
|
65
|
-
})) })), _jsx("div", { className: classNames('text-neutral-900 dark:text-white grow self-center overflow-hidden break-words', { 'ml-4': !Icon }, // No icon!
|
|
66
|
-
'group'), children: title }), dropdown && (_jsx("div", { className: "self-center flex-none text-sm font-thin text-neutral-700 dark:text-neutral-200", children: _jsx(ChevronRightIcon, { width: "1.5rem", height: "1.5rem", className: classNames(iconClass, 'transition-transform details-toggle') }) }))] }), _jsx("div", { className: classNames('px-4', { 'details-body': dropdown }), children: children })] }));
|
|
65
|
+
})) })), _jsx("div", { className: classNames('myst-exercise-title text-neutral-900 dark:text-white grow self-center overflow-hidden break-words', { 'ml-4': !Icon }, // No icon!
|
|
66
|
+
'group'), children: title }), dropdown && (_jsx("div", { className: "self-center flex-none text-sm font-thin text-neutral-700 dark:text-neutral-200", children: _jsx(ChevronRightIcon, { width: "1.5rem", height: "1.5rem", className: classNames(iconClass, 'transition-transform details-toggle') }) }))] }), _jsx("div", { className: classNames('myst-exercise-body px-4', { 'details-body': dropdown }), children: children })] }));
|
|
67
67
|
}
|
|
68
68
|
export const ExerciseRenderer = ({ node, className }) => {
|
|
69
69
|
var _a, _b, _c;
|
package/dist/image.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../src/image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,KAAK,SAAS,GAAG,aAAa,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../src/image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,KAAK,SAAS,GAAG,aAAa,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAkIrD,eAAO,MAAM,KAAK,EAAE,YAAY,CAAC,SAAS,CAezC,CAAC;AAEF,QAAA,MAAM,eAAe;;CAEpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
package/dist/image.js
CHANGED
|
@@ -41,7 +41,9 @@ function Picture({ className, id, src, srcOptimized, urlSource, align = 'center'
|
|
|
41
41
|
if (src.endsWith('.mp4') || (urlSource === null || urlSource === void 0 ? void 0 : urlSource.endsWith('.mp4'))) {
|
|
42
42
|
return (_jsx(Video, { className: className, id: id, width: width, height: height, align: align, src: src, urlSource: urlSource }));
|
|
43
43
|
}
|
|
44
|
-
const image = (_jsx("img", { id: id, style: Object.assign({ width: getStyleValue(width), height: getStyleValue(height) }, alignToMargin(align)), src: src, alt: alt, "data-canonical-url": urlSource
|
|
44
|
+
const image = (_jsx("img", { id: id, style: Object.assign({ width: getStyleValue(width), height: getStyleValue(height) }, alignToMargin(align)), src: src, alt: alt, "data-canonical-url": urlSource,
|
|
45
|
+
// Don't set className if nested under picture
|
|
46
|
+
className: srcOptimized ? undefined : className }));
|
|
45
47
|
if (!srcOptimized)
|
|
46
48
|
return image;
|
|
47
49
|
return (_jsxs("picture", { className: className, children: [_jsx("source", { srcSet: srcOptimized, type: "image/webp" }), image] }));
|
package/dist/proof.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proof.d.ts","sourceRoot":"","sources":["../src/proof.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;AAO1D,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,MAAM,WAAW;IAC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B,UAAU,eAAe;IACzB,OAAO,YAAY;CACpB;AAED,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAqFhF,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,UAAU,EACV,SAAS,GACV,EAAE;IACD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAiEA;AAED,eAAO,MAAM,aAAa,EAAE,YAAY,CAAC,cAAc,CAqBtD,CAAC;AAEF,QAAA,MAAM,eAAe;;CAEpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
package/dist/proof.js
CHANGED
|
@@ -70,7 +70,7 @@ const HeaderElement = ({ dropdown, className, children, }) => {
|
|
|
70
70
|
};
|
|
71
71
|
const iconClass = 'inline-block pl-2 mr-2 self-center flex-none';
|
|
72
72
|
export function Proof({ title, kind, color, dropdown, children, identifier, enumerator, className, }) {
|
|
73
|
-
return (_jsxs(WrapperElement, { id: identifier, dropdown: dropdown, className: classNames('my-5 shadow dark:bg-stone-800 overflow-hidden', 'dark:border-l-4 border-slate-400', {
|
|
73
|
+
return (_jsxs(WrapperElement, { id: identifier, dropdown: dropdown, className: classNames('myst-proof my-5 shadow dark:bg-stone-800 overflow-hidden', 'dark:border-l-4 border-slate-400', {
|
|
74
74
|
'dark:border-gray-500/60': !color || color === 'gray',
|
|
75
75
|
'dark:border-blue-500/60': color === 'blue',
|
|
76
76
|
'dark:border-green-500/60': color === 'green',
|
|
@@ -78,7 +78,7 @@ export function Proof({ title, kind, color, dropdown, children, identifier, enum
|
|
|
78
78
|
'dark:border-orange-500/60': color === 'orange',
|
|
79
79
|
'dark:border-red-500/60': color === 'red',
|
|
80
80
|
'dark:border-purple-500/60': color === 'purple',
|
|
81
|
-
}, className), children: [_jsxs(HeaderElement, { dropdown: dropdown, className: classNames('m-0 font-medium py-2 flex min-w-0', 'text-md', 'border-y dark:border-y-0', {
|
|
81
|
+
}, className), children: [_jsxs(HeaderElement, { dropdown: dropdown, className: classNames('myst-proof-header m-0 font-medium py-2 flex min-w-0', 'text-md', 'border-y dark:border-y-0', {
|
|
82
82
|
'bg-gray-50/80 dark:bg-slate-900': !color || color === 'gray',
|
|
83
83
|
'bg-blue-50/80 dark:bg-slate-900': color === 'blue',
|
|
84
84
|
'bg-green-50/80 dark:bg-slate-900': color === 'green',
|
|
@@ -87,7 +87,7 @@ export function Proof({ title, kind, color, dropdown, children, identifier, enum
|
|
|
87
87
|
'bg-red-50/80 dark:bg-slate-900': color === 'red',
|
|
88
88
|
'bg-purple-50/80 dark:bg-slate-900': color === 'purple',
|
|
89
89
|
'cursor-pointer hover:shadow-[inset_0_0_0px_30px_#00000003] dark:hover:shadow-[inset_0_0_0px_30px_#FFFFFF03]': dropdown,
|
|
90
|
-
}), children: [_jsxs("div", { className: classNames('text-neutral-900 dark:text-white grow self-center overflow-hidden break-words', 'ml-4'), children: [_jsxs(HashLink, { id: identifier, kind: capitalize(kind), children: [capitalize(kind), " ", enumerator] }), ' ', title && _jsxs(_Fragment, { children: ["(", title, ")"] })] }), dropdown && (_jsx("div", { className: "self-center flex-none text-sm font-thin text-neutral-700 dark:text-neutral-200", children: _jsx(ChevronRightIcon, { width: "1.5rem", height: "1.5rem", className: classNames(iconClass, 'transition-transform details-toggle') }) }))] }), _jsx("div", { className: classNames('px-4', { 'details-body': dropdown }), children: children })] }));
|
|
90
|
+
}), children: [_jsxs("div", { className: classNames('myst-proof-title text-neutral-900 dark:text-white grow self-center overflow-hidden break-words', 'ml-4'), children: [_jsxs(HashLink, { id: identifier, kind: capitalize(kind), children: [capitalize(kind), " ", enumerator] }), ' ', title && _jsxs(_Fragment, { children: ["(", title, ")"] })] }), dropdown && (_jsx("div", { className: "self-center flex-none text-sm font-thin text-neutral-700 dark:text-neutral-200", children: _jsx(ChevronRightIcon, { width: "1.5rem", height: "1.5rem", className: classNames(iconClass, 'transition-transform details-toggle') }) }))] }), _jsx("div", { className: classNames('myst-proof-body px-4', { 'details-body': dropdown }), children: children })] }));
|
|
91
91
|
}
|
|
92
92
|
export const ProofRenderer = ({ node, className }) => {
|
|
93
93
|
const [title, ...rest] = node.children;
|
package/dist/tabs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../src/tabs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAyD,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGrE,UAAU,OAAQ,SAAQ,WAAW;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AASD,KAAK,GAAG,GAAG;IAAE,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE9F,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,QAAQ,EACR,SAAS,GACV,EAAE;IACD,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,QAAQ,EAAE,KAAK,CAAC,SA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CAG/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/dist/tabs.js
CHANGED
|
@@ -30,12 +30,12 @@ export function TabSet({ tabs, children, className, }) {
|
|
|
30
30
|
return;
|
|
31
31
|
setActive(tab === null || tab === void 0 ? void 0 : tab.id);
|
|
32
32
|
}, [tabs, lastClickedTab, setActive]);
|
|
33
|
-
return (_jsx(TabSetStateProvider, { active: active, children: _jsxs("div", { className: classNames('my-5', className), children: [_jsx("div", { className: "flex flex-row overflow-x-auto border-b border-b-gray-100", children: tabs.map((tab) => {
|
|
34
|
-
return (_jsx("div", { className: classNames('flex-none px-3 py-1 font-semibold cursor-pointer', {
|
|
35
|
-
'text-blue-600 border-b-2 border-b-blue-600 dark:border-b-white dark:text-white': active === tab.id,
|
|
36
|
-
'text-gray-500 dark:text-gray-300 hover:text-gray-700 dark:hover:text-gray-100': active !== tab.id,
|
|
33
|
+
return (_jsx(TabSetStateProvider, { active: active, children: _jsxs("div", { className: classNames('myst-tab-set my-5', className), children: [_jsx("div", { className: "myst-tab-set-row flex flex-row flex-wrap overflow-x-auto border-b border-b-gray-100", children: tabs.map((tab) => {
|
|
34
|
+
return (_jsx("div", { className: classNames('myst-tab-item-header flex-none px-3 py-1 font-semibold cursor-pointer', {
|
|
35
|
+
'myst-tab-item-header-active text-blue-600 border-b-2 border-b-blue-600 dark:border-b-white dark:text-white': active === tab.id,
|
|
36
|
+
'myst-tab-item-header-inactive text-gray-500 dark:text-gray-300 hover:text-gray-700 dark:hover:text-gray-100': active !== tab.id,
|
|
37
37
|
}), onClick: () => onClick(tab), children: tab.title }, tab.id));
|
|
38
|
-
}) }), _jsx("div", { className: "flex shadow", children: _jsx("div", { className: "w-full px-6", children: children }) })] }) }));
|
|
38
|
+
}) }), _jsx("div", { className: "myst-tab-item-body flex shadow", children: _jsx("div", { className: "myst-tab-item-text w-full px-6", children: children }) })] }) }));
|
|
39
39
|
}
|
|
40
40
|
export function TabItem({ id, children, className, }) {
|
|
41
41
|
const active = useContext(TabSetContext);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myst-to-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
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.
|
|
25
|
-
"@scienceicons/react": "^0.0.
|
|
24
|
+
"@myst-theme/providers": "^0.17.0",
|
|
25
|
+
"@scienceicons/react": "^0.0.13",
|
|
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.
|
|
30
|
-
"myst-config": "^1.
|
|
29
|
+
"myst-common": "^1.8.1",
|
|
30
|
+
"myst-config": "^1.8.1",
|
|
31
31
|
"myst-spec": "^0.0.5",
|
|
32
32
|
"nanoid": "^4.0.2",
|
|
33
33
|
"react-syntax-highlighter": "15.5.0",
|