myst-to-react 0.2.7 → 0.2.9
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.d.ts +7 -1
- package/dist/cjs/cite.d.ts.map +1 -1
- package/dist/cjs/cite.js +14 -7
- package/dist/cjs/exercise.d.ts +4 -1
- package/dist/cjs/exercise.d.ts.map +1 -1
- package/dist/cjs/exercise.js +10 -2
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/unknown.d.ts +8 -0
- package/dist/cjs/unknown.d.ts.map +1 -0
- package/dist/cjs/unknown.js +18 -0
- package/dist/types/cite.d.ts +7 -1
- package/dist/types/cite.d.ts.map +1 -1
- package/dist/types/exercise.d.ts +4 -1
- package/dist/types/exercise.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/unknown.d.ts +8 -0
- package/dist/types/unknown.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/cjs/cite.d.ts
CHANGED
|
@@ -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:
|
|
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
|
package/dist/cjs/cite.d.ts.map
CHANGED
|
@@ -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,
|
|
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 = (
|
|
23
|
+
const Cite = ({ label, error, children, }) => {
|
|
24
24
|
var _a, _b;
|
|
25
25
|
const references = (0, providers_1.useReferences)();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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] })) })
|
|
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.
|
|
43
|
+
cite: exports.CiteRenderer,
|
|
37
44
|
};
|
|
38
45
|
exports.default = CITE_RENDERERS;
|
package/dist/cjs/exercise.d.ts
CHANGED
|
@@ -2,12 +2,15 @@ import type { Admonition as AdmonitionSpec } from 'myst-spec';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { NodeRenderer } from '@myst-theme/providers';
|
|
4
4
|
type Color = 'gray' | 'blue' | 'green' | 'yellow' | 'orange' | 'red' | 'purple';
|
|
5
|
-
export declare function Callout({ title, color, dropdown, children, identifier, }: {
|
|
5
|
+
export declare function Callout({ title, color, dropdown, children, identifier, Icon, }: {
|
|
6
6
|
title?: React.ReactNode;
|
|
7
7
|
color?: Color;
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
dropdown?: boolean;
|
|
10
10
|
identifier?: string;
|
|
11
|
+
Icon?: (props: {
|
|
12
|
+
className?: string;
|
|
13
|
+
}) => JSX.Element;
|
|
11
14
|
}): JSX.Element;
|
|
12
15
|
export declare const ExerciseRenderer: NodeRenderer<AdmonitionSpec>;
|
|
13
16
|
export declare const SolutionRenderer: NodeRenderer<AdmonitionSpec>;
|
|
@@ -1 +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,
|
|
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"}
|
package/dist/cjs/exercise.js
CHANGED
|
@@ -41,7 +41,7 @@ const HeaderElement = ({ dropdown, className, children, }) => {
|
|
|
41
41
|
return (0, jsx_runtime_1.jsx)("div", Object.assign({ className: className }, { children: children }));
|
|
42
42
|
};
|
|
43
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, }) {
|
|
44
|
+
function Callout({ title, color, dropdown, children, identifier, Icon, }) {
|
|
45
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
46
|
'dark:border-gray-500/60': !color || color === 'gray',
|
|
47
47
|
'dark:border-blue-500/60': color === 'blue',
|
|
@@ -59,7 +59,15 @@ function Callout({ title, color, dropdown, children, identifier, }) {
|
|
|
59
59
|
'bg-red-50/80 dark:bg-slate-900': color === 'red',
|
|
60
60
|
'bg-purple-50/80 dark:bg-slate-900': color === 'purple',
|
|
61
61
|
'cursor-pointer hover:shadow-[inset_0_0_0px_30px_#00000003] dark:hover:shadow-[inset_0_0_0px_30px_#FFFFFF03]': dropdown,
|
|
62
|
-
}) }, { children: [(0, jsx_runtime_1.jsx)(
|
|
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!
|
|
63
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 }))] })));
|
|
64
72
|
}
|
|
65
73
|
exports.Callout = Callout;
|
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;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
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
|
@@ -25,6 +25,7 @@ const extensions_1 = __importDefault(require("./extensions"));
|
|
|
25
25
|
const inlineExpression_1 = __importDefault(require("./inlineExpression"));
|
|
26
26
|
const proof_1 = __importDefault(require("./proof"));
|
|
27
27
|
const exercise_1 = __importDefault(require("./exercise"));
|
|
28
|
+
const unknown_1 = __importDefault(require("./unknown"));
|
|
28
29
|
var CopyIcon_1 = require("./components/CopyIcon");
|
|
29
30
|
Object.defineProperty(exports, "CopyIcon", { enumerable: true, get: function () { return CopyIcon_1.CopyIcon; } });
|
|
30
31
|
var code_2 = require("./code");
|
|
@@ -37,7 +38,7 @@ Object.defineProperty(exports, "Details", { enumerable: true, get: function () {
|
|
|
37
38
|
var tabs_2 = require("./tabs");
|
|
38
39
|
Object.defineProperty(exports, "TabSet", { enumerable: true, get: function () { return tabs_2.TabSet; } });
|
|
39
40
|
Object.defineProperty(exports, "TabItem", { enumerable: true, get: function () { return tabs_2.TabItem; } });
|
|
40
|
-
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({}, 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), exercise_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);
|
|
41
42
|
function useParse(node, renderers = exports.DEFAULT_RENDERERS) {
|
|
42
43
|
if (!node)
|
|
43
44
|
return null;
|
|
@@ -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;
|
package/dist/types/cite.d.ts
CHANGED
|
@@ -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:
|
|
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
|
package/dist/types/cite.d.ts.map
CHANGED
|
@@ -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,
|
|
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/types/exercise.d.ts
CHANGED
|
@@ -2,12 +2,15 @@ import type { Admonition as AdmonitionSpec } from 'myst-spec';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { NodeRenderer } from '@myst-theme/providers';
|
|
4
4
|
type Color = 'gray' | 'blue' | 'green' | 'yellow' | 'orange' | 'red' | 'purple';
|
|
5
|
-
export declare function Callout({ title, color, dropdown, children, identifier, }: {
|
|
5
|
+
export declare function Callout({ title, color, dropdown, children, identifier, Icon, }: {
|
|
6
6
|
title?: React.ReactNode;
|
|
7
7
|
color?: Color;
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
dropdown?: boolean;
|
|
10
10
|
identifier?: string;
|
|
11
|
+
Icon?: (props: {
|
|
12
|
+
className?: string;
|
|
13
|
+
}) => JSX.Element;
|
|
11
14
|
}): JSX.Element;
|
|
12
15
|
export declare const ExerciseRenderer: NodeRenderer<AdmonitionSpec>;
|
|
13
16
|
export declare const SolutionRenderer: NodeRenderer<AdmonitionSpec>;
|
|
@@ -1 +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,
|
|
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":"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;
|
|
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"}
|
|
@@ -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.
|
|
3
|
+
"version": "0.2.9",
|
|
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.
|
|
21
|
+
"@myst-theme/providers": "^0.2.9",
|
|
22
22
|
"@radix-ui/react-hover-card": "^1.0.5",
|
|
23
23
|
"buffer": "^6.0.3",
|
|
24
24
|
"classnames": "^2.3.2",
|