A pre-release (v0.0.1-beta.1) Typst MDX compiler that transforms Typst markup into JSX, integrating with rehype and the MDX ecosystem. It allows using Typst syntax alongside JSX components in MDX documents, with a compiler that can be used programmatically. Not yet stable; APIs may change. Differentiated from @mdx-js/mdx by supporting Typst instead of Markdown.
npm install typstxNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compiles a Typst file to JSX using the asynchronous compile function, demonstrating basic usage.
Lock version to 0.0.1-beta.1 and expect future updates to break compatibility.
Use import syntax or switch to Node >=16
Use named imports like import { compile } from 'typstx'Use String(result) or result.toString()
Change import to import { compile } from 'typstx'Convert to ES module (type: module in package.json) or use dynamic import.
Add declare module 'typstx'; in a .d.ts file or use @ts-ignore.