{"_id":"@booga/vmdx","_rev":"2-7b2114a5b8eb592ed3441944715167f8","name":"@booga/vmdx","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@booga/vmdx","version":"0.1.0","author":{"name":"bvasilenko"},"license":"MIT","_id":"@booga/vmdx@0.1.0","maintainers":[{"name":"dreaktor","email":"me@dreaktor.com"}],"dist":{"shasum":"a14ed972e666a1223a4b02900fc0bf1093a9a84b","tarball":"https://registry.npmjs.org/@booga/vmdx/-/vmdx-0.1.0.tgz","fileCount":20,"integrity":"sha512-c3NQYQHS3VyDhwuULvBRyw5O5QuG+3l6NZqXYEMF4agQS2NLXduP760nNnT1qnRtf7/45897+FTB1mTfTQlJGA==","signatures":[{"sig":"MEUCIFo6d2btQG9CeiXySj/U5s4rqBgHnprchEmcL2WL5cQmAiEAqm1+ERJJbDplbN65nyhGXgc54jUGAmn5n/9rOtjMzNM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":58270},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./vite/plugin":{"types":"./dist/vite/plugin.d.ts","import":"./dist/vite/plugin.js","require":"./dist/vite/plugin.cjs"}},"gitHead":"cbbd47a79130fdd638e73649126181c910e61ed7","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest run --coverage","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"dreaktor","email":"me@dreaktor.com"},"_npmVersion":"10.9.3","description":"MDX compiler. Build-time and dev-runtime. Frontmatter typed, Vite plugin included, default components wired to vUi primitives.","directories":{},"sideEffects":false,"_nodeVersion":"22.19.0","dependencies":{"zod":"^3.0.0","@booga/vui":"^0.1.0","@iarna/toml":"^2.2.5","@mdx-js/mdx":"^3.1.0","gray-matter":"^4.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vite":"^5.0.0","jsdom":"^25.0.0","react":"^18.0.0","eslint":"^9.0.0","vitest":"^2.1.0","globals":"^15.0.0","react-dom":"^18.0.0","@eslint/js":"^9.0.0","remark-gfm":"^4.0.1","typescript":"^5.0.0","@types/react":"^18.3.0","@types/react-dom":"^18.3.0","typescript-eslint":"^8.0.0","@types/iarna__toml":"^2.0.5","@vitejs/plugin-react":"^4.0.0","@testing-library/react":"^16.0.0","@testing-library/jest-dom":"^6.0.0","@vitest/coverage-istanbul":"^2.1.9"},"peerDependencies":{"vite":"^5.0.0","react":"^18.0.0","react-dom":"^18.0.0"},"peerDependenciesMeta":{"vite":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/vmdx_0.1.0_1778538640677_0.1514813218645663","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@booga/vmdx","version":"0.1.1","description":"MDX compiler. Build-time and dev-runtime. Frontmatter typed, Vite plugin included, default components wired to vUi primitives.","type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./vite/plugin":{"types":"./dist/vite/plugin.d.ts","import":"./dist/vite/plugin.js","require":"./dist/vite/plugin.cjs"}},"scripts":{"dev":"tsup --watch","build":"tsup","typecheck":"tsc --noEmit","lint":"eslint .","test":"vitest run --coverage","test:watch":"vitest"},"dependencies":{"@booga/vui":"^0.3.1","@iarna/toml":"^2.2.5","@mdx-js/mdx":"^3.1.0","gray-matter":"^4.0.3","zod":"^3.0.0"},"peerDependencies":{"react":"^18.0.0","react-dom":"^18.0.0","vite":"^5.0.0"},"peerDependenciesMeta":{"vite":{"optional":true}},"devDependencies":{"@eslint/js":"^9.0.0","@testing-library/jest-dom":"^6.0.0","@testing-library/react":"^16.0.0","@types/iarna__toml":"^2.0.5","@types/react":"^18.3.0","@types/react-dom":"^18.3.0","@vitejs/plugin-react":"^4.0.0","@vitest/coverage-istanbul":"^2.1.9","eslint":"^9.0.0","globals":"^15.0.0","jsdom":"^25.0.0","react":"^18.0.0","react-dom":"^18.0.0","remark-gfm":"^4.0.1","tsup":"^8.0.0","typescript":"^5.0.0","typescript-eslint":"^8.0.0","vite":"^5.0.0","vitest":"^2.1.0"},"publishConfig":{"access":"public"},"license":"MIT","author":{"name":"bvasilenko"},"_id":"@booga/vmdx@0.1.1","gitHead":"a21d52d501691534392a6ab70c7b1bd1f920c3af","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-GUjH4QoanDj531I6SR0HxaoqE8ddjtpARJxGudBSPD2HBIfC7n/O/QA46y8Ko4ryAxie4qNuyHx+Xf/DM7oFNA==","shasum":"6dbbd5ea5ff82af711a3fffe461af14f1140986e","tarball":"https://registry.npmjs.org/@booga/vmdx/-/vmdx-0.1.1.tgz","fileCount":20,"unpackedSize":58548,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDvr920SxzPGVi3T/egoUx7dIjwKT4XqUH8N4bKF4lJ0gIgEJb0y1cDMIb77aWHyuQ8Wr1TvZvIHFBnXStffxp94Xc="}]},"_npmUser":{"name":"dreaktor","email":"me@dreaktor.com"},"directories":{},"maintainers":[{"name":"dreaktor","email":"me@dreaktor.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vmdx_0.1.1_1779126442102_0.8773921260442086"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-11T22:30:40.569Z","modified":"2026-05-18T17:47:22.403Z","0.1.0":"2026-05-11T22:30:40.895Z","0.1.1":"2026-05-18T17:47:22.253Z"},"author":{"name":"bvasilenko"},"license":"MIT","description":"MDX compiler. Build-time and dev-runtime. Frontmatter typed, Vite plugin included, default components wired to vUi primitives.","maintainers":[{"name":"dreaktor","email":"me@dreaktor.com"}],"readme":"# vMdx\n\nMDX compiler — build-time and dev-runtime. Frontmatter typed. Vite plugin included. Default components wired to vUi primitives.\n\n## Install\n\n```bash\nnpm install @booga/vmdx react react-dom\n```\n\nVite plugin requires `vite` (peer, optional):\n\n```bash\nnpm install -D vite\n```\n\n## Core API\n\n```ts\nimport { compile, compileFile } from \"@booga/vmdx\";\n\nconst { code, frontmatter } = await compile(\"# Hello\");\nconst { code, frontmatter } = await compileFile(\"./docs/intro.mdx\");\n```\n\n`compile()` defaults to `function-body` output (eval-safe). Override with `outputFormat: \"program\"` for static import() use.\n\n## Frontmatter\n\nYAML and TOML supported. Missing frontmatter → `{}`.\n\n```mdx\n---\ntitle: My Post\npublished: true\n---\n\n# Body\n```\n\n```ts\nconst { frontmatter } = await compile(source);\n// frontmatter: { title: \"My Post\", published: true }\n```\n\nTOML via `---toml` delimiter:\n\n```mdx\n---toml\ntitle = \"TOML Post\"\n---\n```\n\n## Vite plugin\n\n```ts\nimport { vitePlugin } from \"@booga/vmdx/vite/plugin\";\n\nexport default defineConfig({\n  plugins: [vitePlugin()],\n});\n```\n\nTransforms `.mdx` → React component module. Caches by content hash + mtime.\n\n## Config\n\n```ts\nimport { MdxConfigSchema } from \"@booga/vmdx\";\n\nconst config = MdxConfigSchema.parse({\n  remarkPlugins: [remarkGfm],\n  rehypePlugins: [],\n  components: {},\n  cacheDir: \".vmdx-cache\",\n});\n```\n\nNo GFM by default. Opt in via `remarkPlugins`.\n\n## Default components\n\n```ts\nimport { defaultComponents } from \"@booga/vmdx\";\n```\n\nMaps `h1..h6`, `p`, `ul`, `ol`, `li`, `code`, `pre`, `blockquote`, `a` to `@booga/vui` `Box` primitives.\n\n## Types\n\n```ts\nimport type { Frontmatter, MdxConfig, CompileResult } from \"@booga/vmdx\";\n\ntype PostFrontmatter = Frontmatter<{ title: string; published: boolean }>;\n```\n\n## Code of conduct\n\n[Contributor Covenant 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)\n\n## License\n\nMIT © 2026 bvasilenko\n","readmeFilename":"README.md"}