{"_id":"@altmd/runtime","name":"@altmd/runtime","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@altmd/runtime","version":"0.1.0","description":"The zero-build alt-markdown CDN runtime (loads the WASM core, upgrades components).","license":"MIT","author":{"name":"Daniel Iwugo"},"homepage":"https://github.com/elementmerc/alt-markdown#readme","repository":{"type":"git","url":"git+https://github.com/elementmerc/alt-markdown.git","directory":"js/packages/runtime"},"bugs":{"url":"https://github.com/elementmerc/alt-markdown/issues"},"keywords":["markdown","commonmark","web-components","charts","diagrams","katex","mermaid","zero-build","alt-markdown"],"publishConfig":{"access":"public"},"type":"module","main":"./dist/index.js","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js"}},"dependencies":{"dompurify":"^3.4.11"},"peerDependencies":{"katex":"^0.16","mermaid":"^11","uplot":"^1.6"},"peerDependenciesMeta":{"katex":{"optional":true},"mermaid":{"optional":true},"uplot":{"optional":true}},"scripts":{"build":"vite build","typecheck":"tsc --noEmit -p tsconfig.json"},"gitHead":"f965aec4b35128d4c3ba7aefc9dcf5249e88b3f3","_id":"@altmd/runtime@0.1.0","_nodeVersion":"22.22.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-ljVpCBrWxDFqKHgmgWv0hvFBbmD2kfAjxKj936jlgC70c9HoMb6WKya0g9jOz9K2ON7SMxUQqF01cS0Ms4g33w==","shasum":"76ba4d78849222ad395e8f4abc6066d256c21a6c","tarball":"https://registry.npmjs.org/@altmd/runtime/-/runtime-0.1.0.tgz","fileCount":4,"unpackedSize":52334,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDRpcojZ0Ha0edDM2kH+/4KnjPDM1ySX5R96iEntZXLqwIhAIOqGVsVxSVPtF27wfGzG8ruTZMi37xQkYYt8C3tdW0U"}]},"_npmUser":{"name":"elementmerc","email":"daniel@themalwarefiles.com"},"directories":{},"maintainers":[{"name":"elementmerc","email":"daniel@themalwarefiles.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/runtime_0.1.0_1783171298826_0.0063836522441280685"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-04T13:21:38.598Z","0.1.0":"2026-07-04T13:21:38.985Z","modified":"2026-07-04T13:21:39.287Z"},"maintainers":[{"name":"elementmerc","email":"daniel@themalwarefiles.com"}],"description":"The zero-build alt-markdown CDN runtime (loads the WASM core, upgrades components).","homepage":"https://github.com/elementmerc/alt-markdown#readme","keywords":["markdown","commonmark","web-components","charts","diagrams","katex","mermaid","zero-build","alt-markdown"],"repository":{"type":"git","url":"git+https://github.com/elementmerc/alt-markdown.git","directory":"js/packages/runtime"},"author":{"name":"Daniel Iwugo"},"bugs":{"url":"https://github.com/elementmerc/alt-markdown/issues"},"license":"MIT","readme":"# @altmd/runtime\n\nThe zero-build browser runtime for\n[alt-markdown](https://github.com/elementmerc/alt-markdown): a strict CommonMark\nsuperset that renders charts, diagrams, maths, and other components, and still\nreads as plain markdown when the runtime is not there.\n\nThis package is the small (~15 kB gzipped) script that upgrades a rendered\nalt-markdown page in the browser. It registers the `alt-*` custom elements, so\nthe static fallbacks already baked into the HTML turn into live charts, diagrams,\nand maths. No build step, no server.\n\n## Use it from a CDN\n\nRender your document to HTML once with the `altmd` CLI, host the result, then add\none script tag. The easiest way to get a complete page is `altmd render\n--standalone doc.alt`, which emits a self-contained HTML file with the tag\nalready wired. To upgrade a page you assemble yourself:\n\n```html\n<script type=\"module\">\n  import { bootstrap } from \"https://cdn.jsdelivr.net/npm/@altmd/runtime@0.1.0/dist/index.js\";\n  bootstrap();\n</script>\n```\n\nThe graphics libraries (uPlot, KaTeX, Mermaid) load lazily, and only when a\ndocument actually uses them, so a page with no charts pays nothing for the chart\ncode.\n\n## What it does\n\n- Registers the `alt-*` components: callouts, tabs, accordions, columns, charts,\n  maths, diagrams, embeds, and a table of contents.\n- Renders diagrams in a script-disabled, origin-isolated iframe.\n- Leaves plain CommonMark untouched, so the document still reads without the\n  runtime.\n\n## Links\n\n- Repository and full documentation: https://github.com/elementmerc/alt-markdown\n- Live playground: https://elementmerc.github.io/alt-markdown/\n\n## Licence\n\nMIT. See [LICENSE](./LICENSE).\n","readmeFilename":"README.md","_rev":"1-449581b774b680ac6741fa56fe1a1083"}