myst-demo 0.13.4 → 0.13.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/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PageFrontmatter } from 'myst-frontmatter';
|
|
2
2
|
import type { NodeRenderer } from '@myst-theme/providers';
|
|
3
|
-
export declare function MySTRenderer({ value, column, fullscreen, numbering, TitleBlock, captureTab, className, }: {
|
|
3
|
+
export declare function MySTRenderer({ id, value, column, fullscreen, numbering, TitleBlock, captureTab, className, }: {
|
|
4
|
+
id?: string;
|
|
4
5
|
value: string;
|
|
5
6
|
column?: boolean;
|
|
6
7
|
fullscreen?: boolean;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAsN1D,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,MAAM,EACN,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,GACV,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,eAAe,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IAC7E,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAsN1D,wBAAgB,YAAY,CAAC,EAC3B,EAAE,EACF,KAAK,EACL,MAAM,EACN,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,GACV,EAAE;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,eAAe,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IAC7E,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CA+PA;AAED,eAAO,MAAM,gBAAgB,EAAE,YAS9B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -206,7 +206,7 @@ function parse(text, defaultFrontmatter, options) {
|
|
|
206
206
|
};
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
|
-
export function MySTRenderer({ value, column, fullscreen, numbering, TitleBlock, captureTab, className, }) {
|
|
209
|
+
export function MySTRenderer({ id, value, column, fullscreen, numbering, TitleBlock, captureTab, className, }) {
|
|
210
210
|
var _a;
|
|
211
211
|
const area = useRef(null);
|
|
212
212
|
const [text, setText] = useState(value.trim());
|
|
@@ -297,7 +297,7 @@ export function MySTRenderer({ value, column, fullscreen, numbering, TitleBlock,
|
|
|
297
297
|
}), title: `Show the AST Stage ${show.toUpperCase()}`, "aria-pressed": astStage === show ? 'true' : 'false', onClick: () => setAstStage(show), children: show.toUpperCase() }, show)))] }))] }));
|
|
298
298
|
const mdastStage = astStage === 'pre' ? mdastPre : mdastPost;
|
|
299
299
|
const { downloads, exports, parts } = frontmatter, reducedFrontmatter = __rest(frontmatter, ["downloads", "exports", "parts"]);
|
|
300
|
-
return (_jsxs("figure", { className: classnames('relative', {
|
|
300
|
+
return (_jsxs("figure", { id: id, className: classnames('relative', {
|
|
301
301
|
'grid grid-cols-2 gap-0 grid-rows-[3rem_1fr]': column,
|
|
302
302
|
'shadow-lg rounded': !fullscreen,
|
|
303
303
|
'm-0': fullscreen,
|
|
@@ -314,5 +314,5 @@ export function MySTRenderer({ value, column, fullscreen, numbering, TitleBlock,
|
|
|
314
314
|
}), children: [m.fatal === true && (_jsx(ExclamationCircleIcon, { width: "1.3rem", height: "1.3rem", className: "inline mr-1" })), m.fatal === false && (_jsx(ExclamationTriangleIcon, { width: "1.3rem", height: "1.3rem", className: "inline mr-1" })), m.fatal === null && (_jsx(InformationCircleIcon, { width: "1.3rem", height: "1.3rem", className: "inline mr-1" })), _jsx("code", { children: m.ruleId || m.source }), ": ", m.message] }, i))) }))] })] }));
|
|
315
315
|
}
|
|
316
316
|
export const MystDemoRenderer = ({ node }) => {
|
|
317
|
-
return _jsx(MySTRenderer, { value: node.value, numbering: node.numbering });
|
|
317
|
+
return (_jsx(MySTRenderer, { id: node.html_id || node.identifier, value: node.value, numbering: node.numbering, className: node.class }));
|
|
318
318
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myst-demo",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"myst-to-docx": "^1.0.12",
|
|
38
38
|
"myst-to-html": "^1.5.7",
|
|
39
39
|
"myst-to-jats": "^1.0.30",
|
|
40
|
-
"myst-to-react": "^0.13.
|
|
40
|
+
"myst-to-react": "^0.13.5",
|
|
41
41
|
"myst-to-tex": "^1.0.38",
|
|
42
42
|
"myst-to-typst": "^0.0.25",
|
|
43
43
|
"myst-transforms": "^1.3.26",
|