myst-demo 0.5.2 → 0.5.3
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/index.d.ts.map +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +11 -11
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA6J1D,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":";AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA6J1D,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,2CAoMA;AAED,eAAO,MAAM,gBAAgB,EAAE,YAE9B,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -257,11 +257,11 @@ function MySTRenderer({ value, column, fullscreen, numbering, TitleBlock, captur
|
|
|
257
257
|
'm-0': fullscreen,
|
|
258
258
|
}, className), children: [column && ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-row items-stretch h-full col-span-2 px-2 border dark:border-slate-600", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex-grow" }), demoMenu] })), (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)('myst relative', { 'overflow-auto': column }), children: [(0, jsx_runtime_1.jsx)(myst_to_react_1.CopyIcon, { text: text, className: "absolute right-0 p-1" }), (0, jsx_runtime_1.jsxs)("label", { children: [(0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Edit the MyST Markdown text" }), (0, jsx_runtime_1.jsx)("textarea", { ref: area, value: text, className: (0, classnames_1.default)('block p-6 shadow-inner resize-none w-full font-mono bg-slate-50/50 dark:bg-slate-800/50 outline-none', { 'text-sm': !column }, { 'h-full': column }), onChange: (e) => setText(e.target.value) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)('exclude-from-outline relative min-h-1 dark:bg-slate-900', {
|
|
259
259
|
'overflow-auto': column,
|
|
260
|
-
}), children: [!column && (0, jsx_runtime_1.jsx)("div", { className: "absolute top-0 left-0", children: demoMenu }), (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)('px-6 pb-6', { 'pt-[40px]': !column, 'pt-4': column }), children: [previewType === 'DEMO' && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(providers_1.ReferencesProvider, { references: references, frontmatter: frontmatter, children: [TitleBlock && (0, jsx_runtime_1.jsx)(TitleBlock, { frontmatter: frontmatter }), (0, jsx_runtime_1.jsx)(myst_to_react_1.MyST, { ast: (_a = references.article) === null || _a === void 0 ? void 0 : _a.children })] }) })), previewType === 'AST' && (0, jsx_runtime_1.jsx)(myst_to_react_1.CodeBlock, { lang: "yaml", value: mdastYaml, showCopy: false }), previewType === 'HTML' && (0, jsx_runtime_1.jsx)(myst_to_react_1.CodeBlock, { lang: "xml", value: html, showCopy: false }), previewType === 'LaTeX' && (0, jsx_runtime_1.jsx)(myst_to_react_1.CodeBlock, { lang: "latex", value: tex, showCopy: false }), previewType === 'Typst' && (0, jsx_runtime_1.jsx)(myst_to_react_1.CodeBlock, { lang: "typst", value: typst, showCopy: false }), previewType === 'JATS' && (0, jsx_runtime_1.jsx)(myst_to_react_1.CodeBlock, { lang: "xml", value: jats, showCopy: false }), previewType === 'DOCX' && ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("button", { className: "p-3 border rounded", onClick: () => saveDocxFile('demo.docx', references.article), title: `Download Micorsoft Word`, "aria-label": `Download Micorsoft Word`, children: [(0, jsx_runtime_1.jsx)(ArrowDownTrayIcon_1.default, {
|
|
260
|
+
}), children: [!column && (0, jsx_runtime_1.jsx)("div", { className: "absolute top-0 left-0", children: demoMenu }), (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)('px-6 pb-6', { 'pt-[40px]': !column, 'pt-4': column }), children: [previewType === 'DEMO' && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(providers_1.ReferencesProvider, { references: references, frontmatter: frontmatter, children: [TitleBlock && (0, jsx_runtime_1.jsx)(TitleBlock, { frontmatter: frontmatter }), (0, jsx_runtime_1.jsx)(myst_to_react_1.MyST, { ast: (_a = references.article) === null || _a === void 0 ? void 0 : _a.children })] }) })), previewType === 'AST' && (0, jsx_runtime_1.jsx)(myst_to_react_1.CodeBlock, { lang: "yaml", value: mdastYaml, showCopy: false }), previewType === 'HTML' && (0, jsx_runtime_1.jsx)(myst_to_react_1.CodeBlock, { lang: "xml", value: html, showCopy: false }), previewType === 'LaTeX' && (0, jsx_runtime_1.jsx)(myst_to_react_1.CodeBlock, { lang: "latex", value: tex, showCopy: false }), previewType === 'Typst' && (0, jsx_runtime_1.jsx)(myst_to_react_1.CodeBlock, { lang: "typst", value: typst, showCopy: false }), previewType === 'JATS' && (0, jsx_runtime_1.jsx)(myst_to_react_1.CodeBlock, { lang: "xml", value: jats, showCopy: false }), previewType === 'DOCX' && ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("button", { className: "p-3 border rounded", onClick: () => saveDocxFile('demo.docx', references.article), title: `Download Micorsoft Word`, "aria-label": `Download Micorsoft Word`, children: [(0, jsx_runtime_1.jsx)(ArrowDownTrayIcon_1.default, { width: "1.3rem", height: "1.3rem", className: "inline mr-1" }), ' ', "Download as Microsoft Word"] }) }))] }), currentWarnings.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)('w-full', { 'absolute bottom-0': column }), children: currentWarnings.map((m, i) => ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)('p-1 shadow-inner text-white not-prose', {
|
|
261
261
|
'bg-red-500 dark:bg-red-800': m.fatal === true,
|
|
262
262
|
'bg-orange-500 dark:bg-orange-700': m.fatal === false,
|
|
263
263
|
'bg-slate-500 dark:bg-slate-800': m.fatal === null,
|
|
264
|
-
}), children: [m.fatal === true && (0, jsx_runtime_1.jsx)(ExclamationCircleIcon_1.default, {
|
|
264
|
+
}), children: [m.fatal === true && ((0, jsx_runtime_1.jsx)(ExclamationCircleIcon_1.default, { width: "1.3rem", height: "1.3rem", className: "inline mr-1" })), m.fatal === false && ((0, jsx_runtime_1.jsx)(ExclamationTriangleIcon_1.default, { width: "1.3rem", height: "1.3rem", className: "inline mr-1" })), m.fatal === null && ((0, jsx_runtime_1.jsx)(InformationCircleIcon_1.default, { width: "1.3rem", height: "1.3rem", className: "inline mr-1" })), (0, jsx_runtime_1.jsx)("code", { children: m.ruleId || m.source }), ": ", m.message] }, i))) }))] })] }));
|
|
265
265
|
}
|
|
266
266
|
exports.MySTRenderer = MySTRenderer;
|
|
267
267
|
const MystDemoRenderer = ({ node }) => {
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA6J1D,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":";AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA6J1D,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,2CAoMA;AAED,eAAO,MAAM,gBAAgB,EAAE,YAE9B,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -228,11 +228,11 @@ export function MySTRenderer({ value, column, fullscreen, numbering, TitleBlock,
|
|
|
228
228
|
'm-0': fullscreen,
|
|
229
229
|
}, className), children: [column && (_jsxs("div", { className: "flex flex-row items-stretch h-full col-span-2 px-2 border dark:border-slate-600", children: [_jsx("div", { className: "flex-grow" }), demoMenu] })), _jsxs("div", { className: classnames('myst relative', { 'overflow-auto': column }), children: [_jsx(CopyIcon, { text: text, className: "absolute right-0 p-1" }), _jsxs("label", { children: [_jsx("span", { className: "sr-only", children: "Edit the MyST Markdown text" }), _jsx("textarea", { ref: area, value: text, className: classnames('block p-6 shadow-inner resize-none w-full font-mono bg-slate-50/50 dark:bg-slate-800/50 outline-none', { 'text-sm': !column }, { 'h-full': column }), onChange: (e) => setText(e.target.value) })] })] }), _jsxs("div", { className: classnames('exclude-from-outline relative min-h-1 dark:bg-slate-900', {
|
|
230
230
|
'overflow-auto': column,
|
|
231
|
-
}), children: [!column && _jsx("div", { className: "absolute top-0 left-0", children: demoMenu }), _jsxs("div", { className: classnames('px-6 pb-6', { 'pt-[40px]': !column, 'pt-4': column }), children: [previewType === 'DEMO' && (_jsx(_Fragment, { children: _jsxs(ReferencesProvider, { references: references, frontmatter: frontmatter, children: [TitleBlock && _jsx(TitleBlock, { frontmatter: frontmatter }), _jsx(MyST, { ast: (_a = references.article) === null || _a === void 0 ? void 0 : _a.children })] }) })), previewType === 'AST' && _jsx(CodeBlock, { lang: "yaml", value: mdastYaml, showCopy: false }), previewType === 'HTML' && _jsx(CodeBlock, { lang: "xml", value: html, showCopy: false }), previewType === 'LaTeX' && _jsx(CodeBlock, { lang: "latex", value: tex, showCopy: false }), previewType === 'Typst' && _jsx(CodeBlock, { lang: "typst", value: typst, showCopy: false }), previewType === 'JATS' && _jsx(CodeBlock, { lang: "xml", value: jats, showCopy: false }), previewType === 'DOCX' && (_jsx("div", { children: _jsxs("button", { className: "p-3 border rounded", onClick: () => saveDocxFile('demo.docx', references.article), title: `Download Micorsoft Word`, "aria-label": `Download Micorsoft Word`, children: [_jsx(ArrowDownTrayIcon, {
|
|
231
|
+
}), children: [!column && _jsx("div", { className: "absolute top-0 left-0", children: demoMenu }), _jsxs("div", { className: classnames('px-6 pb-6', { 'pt-[40px]': !column, 'pt-4': column }), children: [previewType === 'DEMO' && (_jsx(_Fragment, { children: _jsxs(ReferencesProvider, { references: references, frontmatter: frontmatter, children: [TitleBlock && _jsx(TitleBlock, { frontmatter: frontmatter }), _jsx(MyST, { ast: (_a = references.article) === null || _a === void 0 ? void 0 : _a.children })] }) })), previewType === 'AST' && _jsx(CodeBlock, { lang: "yaml", value: mdastYaml, showCopy: false }), previewType === 'HTML' && _jsx(CodeBlock, { lang: "xml", value: html, showCopy: false }), previewType === 'LaTeX' && _jsx(CodeBlock, { lang: "latex", value: tex, showCopy: false }), previewType === 'Typst' && _jsx(CodeBlock, { lang: "typst", value: typst, showCopy: false }), previewType === 'JATS' && _jsx(CodeBlock, { lang: "xml", value: jats, showCopy: false }), previewType === 'DOCX' && (_jsx("div", { children: _jsxs("button", { className: "p-3 border rounded", onClick: () => saveDocxFile('demo.docx', references.article), title: `Download Micorsoft Word`, "aria-label": `Download Micorsoft Word`, children: [_jsx(ArrowDownTrayIcon, { width: "1.3rem", height: "1.3rem", className: "inline mr-1" }), ' ', "Download as Microsoft Word"] }) }))] }), currentWarnings.length > 0 && (_jsx("div", { className: classnames('w-full', { 'absolute bottom-0': column }), children: currentWarnings.map((m, i) => (_jsxs("div", { className: classnames('p-1 shadow-inner text-white not-prose', {
|
|
232
232
|
'bg-red-500 dark:bg-red-800': m.fatal === true,
|
|
233
233
|
'bg-orange-500 dark:bg-orange-700': m.fatal === false,
|
|
234
234
|
'bg-slate-500 dark:bg-slate-800': m.fatal === null,
|
|
235
|
-
}), children: [m.fatal === true && _jsx(ExclamationCircleIcon, {
|
|
235
|
+
}), 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))) }))] })] }));
|
|
236
236
|
}
|
|
237
237
|
export const MystDemoRenderer = ({ node }) => {
|
|
238
238
|
return _jsx(MySTRenderer, { value: node.value, numbering: node.numbering });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA6J1D,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":";AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA6J1D,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,2CAoMA;AAED,eAAO,MAAM,gBAAgB,EAAE,YAE9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myst-demo",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -22,24 +22,24 @@
|
|
|
22
22
|
"@heroicons/react": "^2.0.18",
|
|
23
23
|
"classnames": "^2.3.2",
|
|
24
24
|
"js-yaml": "^4.1.0",
|
|
25
|
-
"myst-common": "^1.1.
|
|
26
|
-
"myst-config": "^1.1.
|
|
27
|
-
"myst-directives": "^1.0.
|
|
25
|
+
"myst-common": "^1.1.3",
|
|
26
|
+
"myst-config": "^1.1.3",
|
|
27
|
+
"myst-directives": "^1.0.6",
|
|
28
28
|
"myst-ext-card": "^1.0.2",
|
|
29
29
|
"myst-ext-exercise": "^1.0.2",
|
|
30
30
|
"myst-ext-grid": "^1.0.2",
|
|
31
31
|
"myst-ext-proof": "^1.0.2",
|
|
32
32
|
"myst-ext-tabs": "^1.0.2",
|
|
33
|
-
"myst-frontmatter": "^1.1.
|
|
34
|
-
"myst-parser": "^1.0.
|
|
33
|
+
"myst-frontmatter": "^1.1.3",
|
|
34
|
+
"myst-parser": "^1.0.6",
|
|
35
35
|
"myst-spec": "^0.0.4",
|
|
36
|
-
"myst-to-docx": "^1.0.
|
|
37
|
-
"myst-to-html": "^1.0.
|
|
38
|
-
"myst-to-jats": "^1.0.
|
|
39
|
-
"myst-to-react": "^0.5.
|
|
36
|
+
"myst-to-docx": "^1.0.3",
|
|
37
|
+
"myst-to-html": "^1.0.6",
|
|
38
|
+
"myst-to-jats": "^1.0.9",
|
|
39
|
+
"myst-to-react": "^0.5.3",
|
|
40
40
|
"myst-to-tex": "^1.0.4",
|
|
41
41
|
"myst-to-typst": "^0.0.3",
|
|
42
|
-
"myst-transforms": "^1.0
|
|
42
|
+
"myst-transforms": "^1.1.0",
|
|
43
43
|
"unified": "^10.1.2",
|
|
44
44
|
"unist-util-visit": "^4.1.2",
|
|
45
45
|
"vfile": "^5.3.7",
|