UNPKG

@md2docx/react-markdown

Version:

A modern, SSR-friendly React Markdown renderer that preserves the MDAST tree for reuse (e.g., mdast2docx), supports full JSX children, unified plugins, and component overrides.

186 lines (185 loc) 5.29 kB
{ "name": "@md2docx/react-markdown", "author": "Mayank Kumar Chaudhari (https://mayank-chaudhari.vercel.app)", "private": false, "version": "1.0.0", "description": "A modern, SSR-friendly React Markdown renderer that preserves the MDAST tree for reuse (e.g., mdast2docx), supports full JSX children, unified plugins, and component overrides.", "license": "MPL-2.0", "main": "./dist/index.js", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "repository": "github:md2docx/react-markdown", "bugs": "https://github.com/md2docx/react-markdown/issues", "homepage": "https://github.com/md2docx/react-markdown/#readme", "sideEffects": false, "files": [ "dist/**" ], "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.mjs", "require": "./dist/index.js" }, "./client": { "types": "./dist/client/index.d.ts", "import": "./dist/client/index.mjs", "require": "./dist/client/index.js" }, "./dist/client": { "types": "./dist/client/index.d.ts", "import": "./dist/client/index.mjs", "require": "./dist/client/index.js" }, "./server": { "types": "./dist/server/index.d.ts", "import": "./dist/server/index.mjs", "require": "./dist/server/index.js" }, "./dist/server": { "types": "./dist/server/index.d.ts", "import": "./dist/server/index.mjs", "require": "./dist/server/index.js" }, "./unwrap": { "types": "./dist/server/unwrap/index.d.ts", "import": "./dist/server/unwrap/index.mjs", "require": "./dist/server/unwrap/index.js" }, "./dist/server/unwrap": { "types": "./dist/server/unwrap/index.d.ts", "import": "./dist/server/unwrap/index.mjs", "require": "./dist/server/unwrap/index.js" }, "./omit": { "types": "./dist/server/omit/index.d.ts", "import": "./dist/server/omit/index.mjs", "require": "./dist/server/omit/index.js" }, "./dist/server/omit": { "types": "./dist/server/omit/index.d.ts", "import": "./dist/server/omit/index.mjs", "require": "./dist/server/omit/index.js" }, "./test-utils": { "types": "./dist/test-utils.d.ts", "import": "./dist/test-utils.mjs", "require": "./dist/test-utils.js" }, "./dist/test-utils": { "types": "./dist/test-utils.d.ts", "import": "./dist/test-utils.mjs", "require": "./dist/test-utils.js" }, "./utils": { "types": "./dist/utils.d.ts", "import": "./dist/utils.mjs", "require": "./dist/utils.js" }, "./dist/utils": { "types": "./dist/utils.d.ts", "import": "./dist/utils.mjs", "require": "./dist/utils.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", "benchmark": "tsx benchmarks/perf.bench.tsx", "bench:w": "tsx benchmarks/index.ts" }, "devDependencies": { "@repo/eslint-config": "workspace:*", "@repo/typescript-config": "workspace:*", "@testing-library/react": "^16.3.0", "@types/benchmark": "^2.1.5", "@types/hast": "^3.0.4", "@types/mdast": "^4.0.4", "@types/node": "^22.15.19", "@types/react": "^19.1.4", "@types/react-dom": "^19.1.5", "@vitejs/plugin-react": "^4.4.1", "@vitest/coverage-v8": "^3.1.4", "benchmark": "^2.1.4", "chalk": "^5.4.1", "cli-table3": "^0.6.5", "esbuild-plugin-rdi": "^0.0.0", "esbuild-plugin-react18": "0.2.6", "esbuild-plugin-react18-css": "^0.0.4", "fast-deep-equal": "^3.1.3", "jsdom": "^26.1.0", "react": "^19.1.0", "react-dom": "^19.1.0", "react-markdown": "^10.1.0", "rehype-raw": "^7.0.0", "remark-frontmatter": "^5.0.0", "remark-gfm": "^4.0.1", "remark-math": "^6.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.1.2", "tsup": "^8.5.0", "tsx": "^4.20.3", "typescript": "^5.8.3", "vite-tsconfig-paths": "^5.1.4", "vitest": "^3.1.4" }, "dependencies": { "hast-util-to-jsx-runtime": "^2.3.6", "remark-parse": "^11.0.0", "remark-rehype": "^11.1.2", "unified": "^11.0.5", "unist-util-visit": "^5.0.0" }, "peerDependencies": { "@types/react": ">=16.8", "react": ">=16.8" }, "funding": [ { "type": "github", "url": "https://github.com/sponsors/md2docx" }, { "type": "github", "url": "https://github.com/sponsors/mayank1513" } ], "keywords": [ "react", "react-markdown", "mdx-renderer", "markdown", "jsx", "ssr", "mdast", "mdast2docx", "hast", "remark", "rehype", "unified", "docx", "custom-components", "lightweight", "renderer", "react 18", "react 19", "next.js", "next.js 14", "next.js 15", "react server components", "frontend development", "web development", "ui components", "customizable", "modern", "progressive", "cutting-edge", "compatibility", "seamless integration" ] }