{"_id":"lowlight-mermaid","name":"lowlight-mermaid","dist-tags":{"latest":"0.0.0"},"versions":{"0.0.0":{"name":"lowlight-mermaid","author":{"name":"Mayank Kumar Chaudhari","url":"https://mayank-chaudhari.vercel.app"},"private":false,"version":"0.0.0","description":"Highlight.js / lowlight grammar for Mermaid diagrams. Enables syntax highlighting in editors like Tiptap with @tiptap/extension-code-block-lowlight.","license":"MPL-2.0","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/react18-tools/lowlight-mermaid.git"},"bugs":{"url":"https://github.com/react18-tools/lowlight-mermaid/issues"},"homepage":"https://github.com/react18-tools/lowlight-mermaid/#readme","sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"build":"tsup && tsc -p tsconfig-build.json && gzip -c dist/index.js | wc -c","clean":"rm -rf dist","dev":"tsup --watch && tsc -p tsconfig-build.json -w","typecheck":"tsc --noEmit","lint":"eslint src/","lint:fix":"eslint src/ --fix","test":"vitest run --coverage"},"devDependencies":{"@repo/eslint-config":"workspace:*","@repo/typescript-config":"workspace:*","@types/node":"^24.4.0","@vitest/coverage-v8":"^3.2.4","esbuild-plugin-rdi":"^0.0.0","highlight.js":"^11.11.1","tsup":"^8.5.0","typescript":"^5.9.2","vite-tsconfig-paths":"^5.1.4","vitest":"^3.2.4"},"funding":[{"type":"github","url":"https://github.com/sponsors/react18-tools"},{"type":"github","url":"https://github.com/sponsors/mayank1513"}],"keywords":["mermaid","syntax-highlighting","highlight.js","lowlight","tiptap","tiptap-extension","code-block","diagram","markdown","flowchart","sequence-diagram","class-diagram","er-diagram","gantt","journey","pie-chart","state-diagram","react","nextjs","react-server-components","ui-components","frontend","web-development"],"_id":"lowlight-mermaid@0.0.0","gitHead":"4b1a5a70cc3526d51b4e6adf46112d05d3f5ec8e","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-ptK596v+jRyC1p8uCRpTDi0U9Hm2STA47oKMyruY2zdkuBl2FQN4dkyvVTadeUb+KjDK7mI3rPpuiGjTvSozPQ==","shasum":"cbc6d06ad361c6f7f0b1c3883eafcf2f6c326fe1","tarball":"https://registry.npmjs.org/lowlight-mermaid/-/lowlight-mermaid-0.0.0.tgz","fileCount":13,"unpackedSize":667645,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/lowlight-mermaid@0.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD3XQrO9KSL9zgBF5rk/ywkBVA2J9StY5DOITdnjoNU/wIhAI1HwPr7adrViJPjvXpziDblbzwZycyVtdUeiLGKyG96"}]},"_npmUser":{"name":"mayank1513","email":"mayank.srmu@gmail.com"},"directories":{},"maintainers":[{"name":"mayank1513","email":"mayank.srmu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lowlight-mermaid_0.0.0_1757871093764_0.006009311929331185"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-14T17:31:33.547Z","0.0.0":"2025-09-14T17:31:33.982Z","modified":"2025-09-14T17:31:34.555Z"},"maintainers":[{"name":"mayank1513","email":"mayank.srmu@gmail.com"}],"description":"Highlight.js / lowlight grammar for Mermaid diagrams. Enables syntax highlighting in editors like Tiptap with @tiptap/extension-code-block-lowlight.","homepage":"https://github.com/react18-tools/lowlight-mermaid/#readme","keywords":["mermaid","syntax-highlighting","highlight.js","lowlight","tiptap","tiptap-extension","code-block","diagram","markdown","flowchart","sequence-diagram","class-diagram","er-diagram","gantt","journey","pie-chart","state-diagram","react","nextjs","react-server-components","ui-components","frontend","web-development"],"repository":{"type":"git","url":"git+https://github.com/react18-tools/lowlight-mermaid.git"},"author":{"name":"Mayank Kumar Chaudhari","url":"https://mayank-chaudhari.vercel.app"},"bugs":{"url":"https://github.com/react18-tools/lowlight-mermaid/issues"},"license":"MPL-2.0","readme":"# Lowlight Mermaid <img src=\"https://raw.githubusercontent.com/mayank1513/mayank1513/main/popper.png\" style=\"height: 40px\"/>\n\n[![test](https://github.com/react18-tools/lowlight-mermaid/actions/workflows/test.yml/badge.svg)](https://github.com/react18-tools/lowlight-mermaid/actions/workflows/test.yml)\n[![Maintainability](https://qlty.sh/gh/react18-tools/projects/lowlight-mermaid/maintainability.svg)](https://qlty.sh/gh/react18-tools/projects/lowlight-mermaid)\n[![codecov](https://codecov.io/gh/react18-tools/lowlight-mermaid/graph/badge.svg)](https://codecov.io/gh/react18-tools/lowlight-mermaid)\n[![Version](https://img.shields.io/npm/v/lowlight-mermaid.svg?colorB=green)](https://www.npmjs.com/package/lowlight-mermaid)\n[![Downloads](https://img.jsdelivr.com/img.shields.io/npm/d18m/lowlight-mermaid.svg)](https://www.npmjs.com/package/lowlight-mermaid)\n![npm bundle size](https://img.shields.io/bundlephobia/minzip/lowlight-mermaid)\n\n> **TypeScript grammar definitions for Mermaid syntax highlighting**\n> Compatible with **highlight.js** and **lowlight**, designed for editors, markdown renderers, and converters.\n\n---\n\n## ✨ Features\n\n- 📦 **No runtime bloat** — ships only grammar definitions\n- ⚡ Plug-and-play with [`highlight.js`](https://highlightjs.org/) / [`lowlight`](https://github.com/wooorm/lowlight)\n- 🔧 Full **TypeScript types** included\n- 🛠 Reusable across **editors, docs, converters** (e.g. [`@tiptap/extension-code-block-lowlight`](https://tiptap.dev) or [`mdast2docx`](https://github.com/react18-tools/mdast2docx))\n\n---\n\n## 🚀 Install\n\n```bash\npnpm add lowlight-mermaid\n```\n\n**_or_**\n\n```bash\nnpm install lowlight-mermaid\n```\n\n**_or_**\n\n```bash\nyarn add lowlight-mermaid\n```\n\n---\n\n## 📖 Usage\n\n```ts\nimport { mermaidGrammar } from \"lowlight-mermaid\";\nimport hljs from \"highlight.js/lib/core\";\n\nhljs.registerLanguage(\"mermaid\", mermaidGrammar);\n\nconst code = `flowchart TD\n  A[Christmas] -->|Get money| B(Go shopping)\n  B --> C{Let me think}\n  C -->|One| D[Laptop]\n  C -->|Two| E[iPhone]\n  C -->|Three| F[fa:fa-car Car]`;\n\nconst result = hljs.highlight(code, { language: \"mermaid\" });\n\nconsole.log(result.value);\n```\n\n---\n\n## 🙏 Acknowledgments\n\n- [highlight.js](https://highlightjs.org/) — core highlighting engine\n- [lowlight](https://github.com/wooorm/lowlight) — AST-friendly wrapper\n\n---\n\n## 📜 License\n\nLicensed under **MPL-2.0** open-source license.\n\n---\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/mayank1513/mayank1513/main/popper.png\" height=\"20\"/>\n  <br/>\n  Support my work via <a href=\"https://github.com/sponsors/mayank1513\">GitHub Sponsors</a> or explore <a href=\"https://mayank-chaudhari.vercel.app/courses\">courses</a>.\n</p>\n\n<p align=\"center\" style=\"text-align:center\">with 💖 by <a href=\"https://mayank-chaudhari.vercel.app\" target=\"_blank\">Mayank Kumar Chaudhari</a></p>\n","readmeFilename":"README.md","_rev":"1-378a6d2fa5f85b981f3d61ff938974a5"}