{"_id":"@acdh-oeaw/mdx-lib","_rev":"9-aa302284af1ab3a833d8eb447442acf0","name":"@acdh-oeaw/mdx-lib","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.0":{"name":"@acdh-oeaw/mdx-lib","version":"0.0.0","license":"MIT","_id":"@acdh-oeaw/mdx-lib@0.0.0","maintainers":[{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"},{"name":"stefanprobst","email":"stefanprobst@posteo.de"}],"dist":{"shasum":"448dcc598981100fb141b76cb5bf9c1b61ec86ec","tarball":"https://registry.npmjs.org/@acdh-oeaw/mdx-lib/-/mdx-lib-0.0.0.tgz","fileCount":41,"integrity":"sha512-gX00NoVN4c96X8CiesLmX/Ijd0kyXUSe7UhTiUQDZz0+ohiFzvU1QvW3Xr6jY1k5zI7Up61bb1BUv7SOY+CUQA==","signatures":[{"sig":"MEUCIQD+EJ3bD51AustyayhFuQ5MNpSll8YBPqM68lpYyvXbsQIgDn5mCNKYev5RCvVpLVsH0zjX1fDpO8rO7rxQ5gW2F0Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52034},"type":"module","_from":"file:acdh-oeaw-mdx-lib-0.0.0.tgz","engines":{"node":">=22","pnpm":"9.x"},"exports":{".":"./dist/index.js"},"scripts":{"test":"tsx --test --test-reporter spec","build":"tsup","setup":"is-ci || simple-git-hooks","lint:fix":"pnpm run lint:check --fix","validate":"run-p format:check lint:check types:check test","ci:release":"changeset publish","ci:version":"changeset version && prettier \"**/CHANGELOG.md\" --write","format:fix":"pnpm run format:check --write","lint:check":"eslint . --cache","types:check":"tsc --noEmit","format:check":"prettier . --cache --cache-location ./.prettiercache --check --ignore-path ./.gitignore","changeset:add":"changeset add","changeset:status":"changeset status --verbose"},"_npmUser":{"name":"stefanprobst","email":"stefanprobst@posteo.de"},"prettier":"@acdh-oeaw/prettier-config","_resolved":"/tmp/795f7afdac84f472dcacc5703390c74a/acdh-oeaw-mdx-lib-0.0.0.tgz","_integrity":"sha512-gX00NoVN4c96X8CiesLmX/Ijd0kyXUSe7UhTiUQDZz0+ohiFzvU1QvW3Xr6jY1k5zI7Up61bb1BUv7SOY+CUQA==","commitlint":{"extends":"@acdh-oeaw/commitlint-config"},"_npmVersion":"10.8.2","description":"utilities and plugins for [`mdx`](https://mdxjs.com).","directories":{},"lint-staged":{"*.ts":["eslint --cache --fix","prettier --cache --cache-location ./.prettiercache --write"],"*.!(ts)":"prettier --cache --cache-location ./.prettiercache --ignore-unknown --write"},"sideEffects":false,"_nodeVersion":"22.8.0","dependencies":{"vfile":"^6.0.3","@types/mdx":"^2.0.13","@mdx-js/mdx":"^3.0.1","@types/hast":"^3.0.4","@types/mdast":"^4.0.4","@types/estree":"^1.0.5","@acdh-oeaw/lib":"^0.1.12","unist-util-visit":"^5.0.0","hast-util-heading":"^3.0.0","mdast-util-mdx-jsx":"^3.1.3","hast-util-to-string":"^3.0.0","hast-util-heading-rank":"^3.0.0","estree-util-value-to-estree":"^3.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.1","tsup":"^8.2.4","is-ci":"^3.0.1","eslint":"^9.10.0","globals":"^15.9.0","prettier":"^3.3.3","typescript":"^5.6.2","@types/node":"^22.5.4","lint-staged":"^15.2.10","npm-run-all2":"^6.2.2","@changesets/cli":"^2.27.8","@commitlint/cli":"^19.5.0","@keystatic/core":"^0.5.35","simple-git-hooks":"^2.11.1","@acdh-oeaw/tsconfig-lib":"^1.1.1","@acdh-oeaw/eslint-config":"^2.0.1","@acdh-oeaw/prettier-config":"^2.0.0","@acdh-oeaw/commitlint-config":"^2.0.0","@changesets/changelog-github":"^0.5.0","eslint-config-flat-gitignore":"^0.3.0","@acdh-oeaw/eslint-config-node":"^2.0.1"},"simple-git-hooks":{"pre-push":"pnpm run validate","commit-msg":"pnpm exec commitlint --edit","pre-commit":"pnpm exec lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/mdx-lib_0.0.0_1726303033605_0.9198864012803398","host":"s3://npm-registry-packages"}},"0.0.1":{"name":"@acdh-oeaw/mdx-lib","version":"0.0.1","license":"MIT","_id":"@acdh-oeaw/mdx-lib@0.0.1","maintainers":[{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"},{"name":"stefanprobst","email":"stefanprobst@posteo.de"}],"dist":{"shasum":"673e68aba19fdb8a7585393920b59b38662966c3","tarball":"https://registry.npmjs.org/@acdh-oeaw/mdx-lib/-/mdx-lib-0.0.1.tgz","fileCount":41,"integrity":"sha512-HIbOSAra2IQ7caSITmrXXOXhI6qYvedASIMm2L+ZsiZWLq7R3/2RKWXF+vDVA9fq+nCOE/J7Qa3yWNO1xdp6vg==","signatures":[{"sig":"MEYCIQCRJNQENHgxEMuvVyNaO3ZtxWrS/GqcqyWNevf64OSaLwIhAPeNLZedpYczemiu3kwkmT14LVFFvXZF+M1jGIYNba4I","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53045},"type":"module","_from":"file:acdh-oeaw-mdx-lib-0.0.1.tgz","engines":{"node":">=22","pnpm":"9.x"},"exports":{".":"./dist/index.js"},"scripts":{"test":"tsx --test --test-reporter spec","build":"tsup","setup":"is-ci || simple-git-hooks","lint:fix":"pnpm run lint:check --fix","validate":"run-p format:check lint:check types:check test","ci:release":"changeset publish","ci:version":"changeset version && prettier \"**/CHANGELOG.md\" --write","format:fix":"pnpm run format:check --write","lint:check":"eslint . --cache","types:check":"tsc --noEmit","format:check":"prettier . --cache --cache-location ./.prettiercache --check --ignore-path ./.gitignore","changeset:add":"changeset add","changeset:status":"changeset status --verbose"},"_npmUser":{"name":"stefanprobst","email":"stefanprobst@posteo.de"},"prettier":"@acdh-oeaw/prettier-config","_resolved":"/tmp/5a426301b590740ad7ea8b5a3bd9a57a/acdh-oeaw-mdx-lib-0.0.1.tgz","_integrity":"sha512-HIbOSAra2IQ7caSITmrXXOXhI6qYvedASIMm2L+ZsiZWLq7R3/2RKWXF+vDVA9fq+nCOE/J7Qa3yWNO1xdp6vg==","commitlint":{"extends":"@acdh-oeaw/commitlint-config"},"_npmVersion":"10.8.2","description":"utilities and plugins for [`mdx`](https://mdxjs.com).","directories":{},"lint-staged":{"*.ts":["eslint --cache --fix","prettier --cache --cache-location ./.prettiercache --write"],"*.!(ts)":"prettier --cache --cache-location ./.prettiercache --ignore-unknown --write"},"sideEffects":false,"_nodeVersion":"22.8.0","dependencies":{"vfile":"^6.0.3","unified":"^11.0.5","@types/mdx":"^2.0.13","@mdx-js/mdx":"^3.0.1","@types/hast":"^3.0.4","@types/mdast":"^4.0.4","@types/estree":"^1.0.5","@acdh-oeaw/lib":"^0.1.12","unist-util-visit":"^5.0.0","hast-util-heading":"^3.0.0","mdast-util-mdx-jsx":"^3.1.3","hast-util-to-string":"^3.0.0","hast-util-heading-rank":"^3.0.0","estree-util-value-to-estree":"^3.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.1","tsup":"^8.2.4","is-ci":"^3.0.1","eslint":"^9.10.0","globals":"^15.9.0","prettier":"^3.3.3","typescript":"^5.6.2","@types/node":"^22.5.4","lint-staged":"^15.2.10","npm-run-all2":"^6.2.2","@changesets/cli":"^2.27.8","@commitlint/cli":"^19.5.0","@keystatic/core":"^0.5.35","simple-git-hooks":"^2.11.1","@acdh-oeaw/tsconfig-lib":"^1.1.1","@acdh-oeaw/eslint-config":"^2.0.1","@acdh-oeaw/prettier-config":"^2.0.0","@acdh-oeaw/commitlint-config":"^2.0.0","@changesets/changelog-github":"^0.5.0","eslint-config-flat-gitignore":"^0.3.0","@acdh-oeaw/eslint-config-node":"^2.0.1"},"simple-git-hooks":{"pre-push":"pnpm run validate","commit-msg":"pnpm exec commitlint --edit","pre-commit":"pnpm exec lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/mdx-lib_0.0.1_1726348392680_0.9656807202832691","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@acdh-oeaw/mdx-lib","version":"0.0.2","license":"MIT","_id":"@acdh-oeaw/mdx-lib@0.0.2","maintainers":[{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"},{"name":"stefanprobst","email":"stefanprobst@posteo.de"}],"dist":{"shasum":"0d5fa561cfca95db0986e599f2bc2e1e9a96e12f","tarball":"https://registry.npmjs.org/@acdh-oeaw/mdx-lib/-/mdx-lib-0.0.2.tgz","fileCount":41,"integrity":"sha512-PxwiI9rUSX5EVvWI53tA8HLcT8S2LnYc8d9fiQRe5QTClVmADQR2xQsZTw3m5C03ikbtSK7AMtwsZogTlr8+cQ==","signatures":[{"sig":"MEQCIGXVj+DR65kPYKe/PAt//3VYZno6Goxb7Q5/W/LHvS8XAiBaHlB6gAISnkbeCOmlMpfyonfzCqFRaRPW6csPDv/9bQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53630},"type":"module","_from":"file:acdh-oeaw-mdx-lib-0.0.2.tgz","engines":{"node":">=22","pnpm":"9.x"},"exports":{".":"./dist/index.js"},"scripts":{"test":"tsx --test --test-reporter spec","build":"tsup","setup":"is-ci || simple-git-hooks","lint:fix":"pnpm run lint:check --fix","validate":"run-p format:check lint:check types:check test","ci:release":"changeset publish","ci:version":"changeset version && prettier \"**/CHANGELOG.md\" --write","format:fix":"pnpm run format:check --write","lint:check":"eslint . --cache","types:check":"tsc --noEmit","format:check":"prettier . --cache --cache-location ./.prettiercache --check --ignore-path ./.gitignore","changeset:add":"changeset add","changeset:status":"changeset status --verbose"},"_npmUser":{"name":"stefanprobst","email":"stefanprobst@posteo.de"},"prettier":"@acdh-oeaw/prettier-config","_resolved":"/tmp/4c5dacc1218e60c7612416f507a72a5d/acdh-oeaw-mdx-lib-0.0.2.tgz","_integrity":"sha512-PxwiI9rUSX5EVvWI53tA8HLcT8S2LnYc8d9fiQRe5QTClVmADQR2xQsZTw3m5C03ikbtSK7AMtwsZogTlr8+cQ==","commitlint":{"extends":"@acdh-oeaw/commitlint-config"},"_npmVersion":"10.8.2","description":"utilities and plugins for [`mdx`](https://mdxjs.com).","directories":{},"lint-staged":{"*.ts":["eslint --cache --fix","prettier --cache --cache-location ./.prettiercache --write"],"*.!(ts)":"prettier --cache --cache-location ./.prettiercache --ignore-unknown --write"},"sideEffects":false,"_nodeVersion":"22.8.0","dependencies":{"vfile":"^6.0.3","unified":"^11.0.5","@types/mdx":"^2.0.13","@mdx-js/mdx":"^3.0.1","@types/hast":"^3.0.4","@types/mdast":"^4.0.4","@types/estree":"^1.0.5","@acdh-oeaw/lib":"^0.1.12","unist-util-visit":"^5.0.0","hast-util-heading":"^3.0.0","mdast-util-mdx-jsx":"^3.1.3","hast-util-to-string":"^3.0.0","hast-util-heading-rank":"^3.0.0","estree-util-value-to-estree":"^3.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.1","tsup":"^8.2.4","is-ci":"^3.0.1","eslint":"^9.10.0","globals":"^15.9.0","prettier":"^3.3.3","typescript":"^5.6.2","@types/node":"^22.5.4","lint-staged":"^15.2.10","npm-run-all2":"^6.2.2","@changesets/cli":"^2.27.8","@commitlint/cli":"^19.5.0","@keystatic/core":"^0.5.35","simple-git-hooks":"^2.11.1","@acdh-oeaw/tsconfig-lib":"^1.1.1","@acdh-oeaw/eslint-config":"^2.0.1","@acdh-oeaw/prettier-config":"^2.0.0","@acdh-oeaw/commitlint-config":"^2.0.0","@changesets/changelog-github":"^0.5.0","eslint-config-flat-gitignore":"^0.3.0","@acdh-oeaw/eslint-config-node":"^2.0.1"},"simple-git-hooks":{"pre-push":"pnpm run validate","commit-msg":"pnpm exec commitlint --edit","pre-commit":"pnpm exec lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/mdx-lib_0.0.2_1726432163025_0.4205340078203905","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@acdh-oeaw/mdx-lib","version":"0.1.0","license":"MIT","_id":"@acdh-oeaw/mdx-lib@0.1.0","maintainers":[{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"},{"name":"stefanprobst","email":"stefanprobst@posteo.de"}],"dist":{"shasum":"013d48c731feb625c15b51795d200a7cb2e67398","tarball":"https://registry.npmjs.org/@acdh-oeaw/mdx-lib/-/mdx-lib-0.1.0.tgz","fileCount":51,"integrity":"sha512-nxuCYq76eHdmJeAKfn7H4kIBGvqweJzDN1us/DBdJUSV1e3rkbT4rLABgVL/t2lILJzEZfzAcpkDln3AbjfzMA==","signatures":[{"sig":"MEUCIQCSJtW7WYrm9Hyu6sekAKnbu0RP9XGSypxX0wxhas7wWAIgFzEmvJW9sVf+iqRw+hEUC6BfHlWqE/XWuAjg+S5bAks=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68122},"type":"module","_from":"file:acdh-oeaw-mdx-lib-0.1.0.tgz","engines":{"node":">=22","pnpm":"9.x"},"exports":{".":"./dist/index.js"},"scripts":{"test":"tsx --test --test-reporter spec","build":"tsup","setup":"is-ci || simple-git-hooks","lint:fix":"pnpm run lint:check --fix","validate":"run-p format:check lint:check types:check test","ci:release":"changeset publish","ci:version":"changeset version && prettier \"**/CHANGELOG.md\" --write","format:fix":"pnpm run format:check --write","lint:check":"eslint . --cache","types:check":"tsc --noEmit","format:check":"prettier . --cache --cache-location ./.prettiercache --check --ignore-path ./.gitignore","changeset:add":"changeset add","changeset:status":"changeset status --verbose"},"_npmUser":{"name":"stefanprobst","email":"stefanprobst@posteo.de"},"prettier":"@acdh-oeaw/prettier-config","_resolved":"/tmp/577d35a0016807b9079e850f6cc80561/acdh-oeaw-mdx-lib-0.1.0.tgz","_integrity":"sha512-nxuCYq76eHdmJeAKfn7H4kIBGvqweJzDN1us/DBdJUSV1e3rkbT4rLABgVL/t2lILJzEZfzAcpkDln3AbjfzMA==","commitlint":{"extends":"@acdh-oeaw/commitlint-config"},"_npmVersion":"10.8.2","description":"utilities and plugins for [`mdx`](https://mdxjs.com).","directories":{},"lint-staged":{"*.ts":["eslint --cache --fix","prettier --cache --cache-location ./.prettiercache --write"],"*.!(ts)":"prettier --cache --cache-location ./.prettiercache --ignore-unknown --write"},"sideEffects":false,"_nodeVersion":"22.8.0","dependencies":{"vfile":"^6.0.3","unified":"^11.0.5","@types/mdx":"^2.0.13","image-size":"^1.1.1","@mdx-js/mdx":"^3.0.1","@types/hast":"^3.0.4","@types/mdast":"^4.0.4","@types/estree":"^1.0.5","@acdh-oeaw/lib":"^0.1.12","unist-util-visit":"^5.0.0","hast-util-heading":"^3.0.0","mdast-util-mdx-jsx":"^3.1.3","hast-util-to-string":"^3.0.0","hast-util-heading-rank":"^3.0.0","estree-util-value-to-estree":"^3.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.1","tsup":"^8.2.4","is-ci":"^3.0.1","eslint":"^9.10.0","globals":"^15.9.0","prettier":"^3.3.3","typescript":"^5.6.2","@types/node":"^22.5.4","lint-staged":"^15.2.10","npm-run-all2":"^6.2.2","@changesets/cli":"^2.27.8","@commitlint/cli":"^19.5.0","@keystatic/core":"^0.5.35","simple-git-hooks":"^2.11.1","@acdh-oeaw/tsconfig-lib":"^1.1.1","@acdh-oeaw/eslint-config":"^2.0.1","@acdh-oeaw/prettier-config":"^2.0.0","@acdh-oeaw/commitlint-config":"^2.0.0","@changesets/changelog-github":"^0.5.0","eslint-config-flat-gitignore":"^0.3.0","@acdh-oeaw/eslint-config-node":"^2.0.1"},"simple-git-hooks":{"pre-push":"pnpm run validate","commit-msg":"pnpm exec commitlint --edit","pre-commit":"pnpm exec lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/mdx-lib_0.1.0_1726496590460_0.2726475022108623","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@acdh-oeaw/mdx-lib","version":"0.1.1","license":"MIT","_id":"@acdh-oeaw/mdx-lib@0.1.1","maintainers":[{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"},{"name":"stefanprobst","email":"stefanprobst@posteo.de"}],"dist":{"shasum":"b919f4f1c1c1737a8647c7e32df0f7856563f23a","tarball":"https://registry.npmjs.org/@acdh-oeaw/mdx-lib/-/mdx-lib-0.1.1.tgz","fileCount":51,"integrity":"sha512-g72S22f9fe6xjY5RTZNjg+QJ4pjpPwV/0VmRBX1VBiQ+CbWdAKoQ8LwaHDfL1v90GU4gdumxNXx25uSoCGgHGw==","signatures":[{"sig":"MEYCIQCIvXL+T0eJq2KHBm5eC9X//GGfH7pyk1ilKc7Sd4MEXQIhAO0rKZtpubEsphgsrMD6241SEkc+Vr/Z79ALsEPblwK4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":69953},"type":"module","_from":"file:acdh-oeaw-mdx-lib-0.1.1.tgz","engines":{"node":">=22","pnpm":"9.x"},"exports":{".":"./dist/index.js"},"scripts":{"test":"tsx --test --test-reporter spec","build":"tsup","setup":"is-ci || simple-git-hooks","lint:fix":"pnpm run lint:check --fix","validate":"run-p format:check lint:check types:check test","ci:release":"changeset publish","ci:version":"changeset version && prettier \"**/CHANGELOG.md\" --write","format:fix":"pnpm run format:check --write","lint:check":"eslint . --cache","types:check":"tsc --noEmit","format:check":"prettier . --cache --cache-location ./.prettiercache --check --ignore-path ./.gitignore","changeset:add":"changeset add","changeset:status":"changeset status --verbose"},"_npmUser":{"name":"stefanprobst","email":"stefanprobst@posteo.de"},"prettier":"@acdh-oeaw/prettier-config","_resolved":"/tmp/a7cfeb05e2ac23bf354410f873aebeb2/acdh-oeaw-mdx-lib-0.1.1.tgz","_integrity":"sha512-g72S22f9fe6xjY5RTZNjg+QJ4pjpPwV/0VmRBX1VBiQ+CbWdAKoQ8LwaHDfL1v90GU4gdumxNXx25uSoCGgHGw==","commitlint":{"extends":"@acdh-oeaw/commitlint-config"},"_npmVersion":"10.8.3","description":"utilities and plugins for [`mdx`](https://mdxjs.com).","directories":{},"lint-staged":{"*.ts":["eslint --cache --fix","prettier --cache --cache-location ./.prettiercache --write"],"*.!(ts)":"prettier --cache --cache-location ./.prettiercache --ignore-unknown --write"},"sideEffects":false,"_nodeVersion":"22.8.0","dependencies":{"vfile":"^6.0.3","unified":"^11.0.5","@types/mdx":"^2.0.13","image-size":"^1.1.1","@mdx-js/mdx":"^3.0.1","@types/hast":"^3.0.4","@types/mdast":"^4.0.4","@types/estree":"^1.0.5","@acdh-oeaw/lib":"^0.1.12","unist-util-visit":"^5.0.0","hast-util-heading":"^3.0.0","mdast-util-mdx-jsx":"^3.1.3","hast-util-to-string":"^3.0.0","hast-util-heading-rank":"^3.0.0","estree-util-value-to-estree":"^3.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.1","tsup":"^8.2.4","is-ci":"^3.0.1","eslint":"^9.10.0","globals":"^15.9.0","prettier":"^3.3.3","typescript":"^5.6.2","@types/node":"^22.5.4","lint-staged":"^15.2.10","npm-run-all2":"^6.2.2","@changesets/cli":"^2.27.8","@commitlint/cli":"^19.5.0","@keystatic/core":"^0.5.35","simple-git-hooks":"^2.11.1","@acdh-oeaw/tsconfig-lib":"^1.1.1","@acdh-oeaw/eslint-config":"^2.0.1","@acdh-oeaw/prettier-config":"^2.0.0","@acdh-oeaw/commitlint-config":"^2.0.0","@changesets/changelog-github":"^0.5.0","eslint-config-flat-gitignore":"^0.3.0","@acdh-oeaw/eslint-config-node":"^2.0.1"},"simple-git-hooks":{"pre-push":"pnpm run validate","commit-msg":"pnpm exec commitlint --edit","pre-commit":"pnpm exec lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/mdx-lib_0.1.1_1727272513110_0.19265014330015973","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"@acdh-oeaw/mdx-lib","version":"0.1.2","license":"MIT","_id":"@acdh-oeaw/mdx-lib@0.1.2","maintainers":[{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"},{"name":"stefanprobst","email":"stefanprobst@posteo.de"}],"dist":{"shasum":"1cbf96dfd910169df96faa18e9e750b06b7aea3d","tarball":"https://registry.npmjs.org/@acdh-oeaw/mdx-lib/-/mdx-lib-0.1.2.tgz","fileCount":51,"integrity":"sha512-weW1lU4vdAfA7ggYGHADhwTNOSA60jpY+AGlycp0JwzEO/dPNJ6oAJ3mFoi5x5F2yif54bowrH4yDVk0rOxX3w==","signatures":[{"sig":"MEYCIQCQCH9nKBds1GIQ0C66yNDpEtbuDyLwXyEnjJmRpubwjwIhAOooR4sqmDVfNO4PJjCHCG6DsaTqT4+6FbdZzf+Ve0MG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70014},"type":"module","_from":"file:acdh-oeaw-mdx-lib-0.1.2.tgz","engines":{"node":">=22","pnpm":"9.x"},"exports":{".":"./dist/index.js"},"scripts":{"test":"tsx --test --test-reporter spec","build":"tsup","setup":"is-ci || simple-git-hooks","lint:fix":"pnpm run lint:check --fix","validate":"run-p format:check lint:check types:check test","ci:release":"changeset publish","ci:version":"changeset version && prettier \"**/CHANGELOG.md\" --write","format:fix":"pnpm run format:check --write","lint:check":"eslint . --cache","types:check":"tsc --noEmit","format:check":"prettier . --cache --cache-location ./.prettiercache --check --ignore-path ./.gitignore","changeset:add":"changeset add","changeset:status":"changeset status --verbose"},"_npmUser":{"name":"stefanprobst","email":"stefanprobst@posteo.de"},"prettier":"@acdh-oeaw/prettier-config","_resolved":"/tmp/2670392565f5fb4f14f9028e2c01f950/acdh-oeaw-mdx-lib-0.1.2.tgz","_integrity":"sha512-weW1lU4vdAfA7ggYGHADhwTNOSA60jpY+AGlycp0JwzEO/dPNJ6oAJ3mFoi5x5F2yif54bowrH4yDVk0rOxX3w==","commitlint":{"extends":"@acdh-oeaw/commitlint-config"},"_npmVersion":"10.9.0","description":"utilities and plugins for [`mdx`](https://mdxjs.com).","directories":{},"lint-staged":{"*.ts":["eslint --cache --fix","prettier --cache --cache-location ./.prettiercache --write"],"*.!(ts)":"prettier --cache --cache-location ./.prettiercache --ignore-unknown --write"},"sideEffects":false,"_nodeVersion":"22.8.0","dependencies":{"vfile":"^6.0.3","unified":"^11.0.5","@types/mdx":"^2.0.13","image-size":"^1.1.1","@mdx-js/mdx":"^3.1.0","@types/hast":"^3.0.4","@types/mdast":"^4.0.4","@types/estree":"^1.0.6","@acdh-oeaw/lib":"^0.1.12","unist-util-visit":"^5.0.0","hast-util-heading":"^3.0.0","mdast-util-mdx-jsx":"^3.1.3","hast-util-to-string":"^3.0.1","hast-util-heading-rank":"^3.0.0","estree-util-value-to-estree":"^3.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.1","tsup":"^8.3.0","is-ci":"^3.0.1","eslint":"^9.13.0","globals":"^15.11.0","prettier":"^3.3.3","typescript":"^5.6.3","@types/node":"^22.7.8","lint-staged":"^15.2.10","npm-run-all2":"^7.0.0","@changesets/cli":"^2.27.9","@commitlint/cli":"^19.5.0","@keystatic/core":"^0.5.38","simple-git-hooks":"^2.11.1","@acdh-oeaw/tsconfig-lib":"^1.1.1","@acdh-oeaw/eslint-config":"^2.0.3","@acdh-oeaw/prettier-config":"^2.0.0","@acdh-oeaw/commitlint-config":"^2.0.0","@changesets/changelog-github":"^0.5.0","eslint-config-flat-gitignore":"^0.3.0","@acdh-oeaw/eslint-config-node":"^2.0.3"},"simple-git-hooks":{"pre-push":"pnpm run validate","commit-msg":"pnpm exec commitlint --edit","pre-commit":"pnpm exec lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/mdx-lib_0.1.2_1729621363611_0.5941048899500523","host":"s3://npm-registry-packages"}},"0.1.3":{"name":"@acdh-oeaw/mdx-lib","version":"0.1.3","license":"MIT","_id":"@acdh-oeaw/mdx-lib@0.1.3","maintainers":[{"name":"stefanprobst","email":"stefanprobst@posteo.de"},{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"}],"dist":{"shasum":"4290e3483e40d21a89920fe9ece86b8b535eb76f","tarball":"https://registry.npmjs.org/@acdh-oeaw/mdx-lib/-/mdx-lib-0.1.3.tgz","fileCount":56,"integrity":"sha512-82j8sAHybD97gUFmxv1XMdpTkW1UpuT+xxxNXBVXFxl33VakgB619Epj3TXHL4pf7z1as5kYumYMIy+7bFBygA==","signatures":[{"sig":"MEUCIBJWy8hHA4OCSikSvCFe8Vl8lrasjdampWcogy8KIRxhAiEAxvqlTyUay/XySJKOGjDjy3Ee+5FBVjOghHFlyiC3dpk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73618},"type":"module","_from":"file:acdh-oeaw-mdx-lib-0.1.3.tgz","engines":{"node":">=22","pnpm":"9.x"},"exports":{".":"./dist/index.js"},"scripts":{"test":"tsx --test --test-reporter spec","build":"tsup","setup":"is-ci || simple-git-hooks","lint:fix":"pnpm run lint:check --fix","validate":"run-p format:check lint:check types:check test","ci:release":"changeset publish","ci:version":"changeset version && prettier \"**/CHANGELOG.md\" --write","format:fix":"pnpm run format:check --write","lint:check":"eslint . --cache","types:check":"tsc --noEmit","format:check":"prettier . --cache --cache-location ./.prettiercache --check --ignore-path ./.gitignore","changeset:add":"changeset add","changeset:status":"changeset status --verbose"},"_npmUser":{"name":"stefanprobst","email":"stefanprobst@posteo.de"},"prettier":"@acdh-oeaw/prettier-config","_resolved":"/tmp/a205979fdb7f4fc10860ec042171c8a8/acdh-oeaw-mdx-lib-0.1.3.tgz","_integrity":"sha512-82j8sAHybD97gUFmxv1XMdpTkW1UpuT+xxxNXBVXFxl33VakgB619Epj3TXHL4pf7z1as5kYumYMIy+7bFBygA==","commitlint":{"extends":"@acdh-oeaw/commitlint-config"},"_npmVersion":"10.9.0","description":"utilities and plugins for [`mdx`](https://mdxjs.com).","directories":{},"lint-staged":{"*.ts":["eslint --cache --fix","prettier --cache --cache-location ./.prettiercache --write"],"*.!(ts)":"prettier --cache --cache-location ./.prettiercache --ignore-unknown --write"},"sideEffects":false,"_nodeVersion":"22.8.0","dependencies":{"vfile":"^6.0.3","unified":"^11.0.5","@types/mdx":"^2.0.13","image-size":"^1.1.1","@mdx-js/mdx":"^3.1.0","@types/hast":"^3.0.4","@types/mdast":"^4.0.4","@types/estree":"^1.0.6","@acdh-oeaw/lib":"^0.1.12","unist-util-visit":"^5.0.0","hast-util-heading":"^3.0.0","mdast-util-mdx-jsx":"^3.1.3","hast-util-to-string":"^3.0.1","hast-util-heading-rank":"^3.0.0","estree-util-value-to-estree":"^3.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.1","tsup":"^8.3.0","is-ci":"^3.0.1","eslint":"^9.13.0","globals":"^15.11.0","prettier":"^3.3.3","typescript":"^5.6.3","@types/node":"^22.7.8","lint-staged":"^15.2.10","npm-run-all2":"^7.0.0","@changesets/cli":"^2.27.9","@commitlint/cli":"^19.5.0","@keystatic/core":"^0.5.38","simple-git-hooks":"^2.11.1","@acdh-oeaw/tsconfig-lib":"^1.1.1","@acdh-oeaw/eslint-config":"^2.0.3","@acdh-oeaw/prettier-config":"^2.0.0","@acdh-oeaw/commitlint-config":"^2.0.0","@changesets/changelog-github":"^0.5.0","eslint-config-flat-gitignore":"^0.3.0","@acdh-oeaw/eslint-config-node":"^2.0.3"},"simple-git-hooks":{"pre-push":"pnpm run validate","commit-msg":"pnpm exec commitlint --edit","pre-commit":"pnpm exec lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/mdx-lib_0.1.3_1733837731795_0.7459810792205444","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@acdh-oeaw/mdx-lib","version":"0.1.4","license":"MIT","_id":"@acdh-oeaw/mdx-lib@0.1.4","maintainers":[{"name":"stefanprobst","email":"stefanprobst@posteo.de"},{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"}],"dist":{"shasum":"db47b3204569fe7d5aa8699bb34b5d8879218c5f","tarball":"https://registry.npmjs.org/@acdh-oeaw/mdx-lib/-/mdx-lib-0.1.4.tgz","fileCount":56,"integrity":"sha512-pEkDuErxA0/dk3eKO+pUTnCSoybxDiru53YtHs3Y/isksOAc4F2WRcZ9uo2oqeNzmvKxoD6hcYo4S6R+PJProg==","signatures":[{"sig":"MEQCIHjc6370x91X5qtPkSDqd7i+/dUt2XenKBNQu8qZQF3DAiBiGfN8BF6ttZhTEtI4AoYy6tTKJdhwWIsxfPr6s3PgiQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73607},"type":"module","_from":"file:acdh-oeaw-mdx-lib-0.1.4.tgz","engines":{"node":">=22","pnpm":"9.x"},"exports":{".":"./dist/index.js"},"scripts":{"test":"tsx --test --test-reporter spec","build":"tsup","setup":"is-ci || simple-git-hooks","lint:fix":"pnpm run lint:check --fix","validate":"run-p format:check lint:check types:check test","ci:release":"changeset publish","ci:version":"changeset version && prettier \"**/CHANGELOG.md\" --write","format:fix":"pnpm run format:check --write","lint:check":"eslint . --cache","types:check":"tsc --noEmit","format:check":"prettier . --cache --cache-location ./.prettiercache --check --ignore-path ./.gitignore","changeset:add":"changeset add","changeset:status":"changeset status --verbose"},"_npmUser":{"name":"stefanprobst","email":"stefanprobst@posteo.de"},"prettier":"@acdh-oeaw/prettier-config","_resolved":"/tmp/715362a624b07c1ec5d37ec4f187219e/acdh-oeaw-mdx-lib-0.1.4.tgz","_integrity":"sha512-pEkDuErxA0/dk3eKO+pUTnCSoybxDiru53YtHs3Y/isksOAc4F2WRcZ9uo2oqeNzmvKxoD6hcYo4S6R+PJProg==","commitlint":{"extends":"@acdh-oeaw/commitlint-config"},"_npmVersion":"10.9.3","description":"utilities and plugins for [`mdx`](https://mdxjs.com).","directories":{},"lint-staged":{"*.ts":["eslint --cache --fix","prettier --cache --cache-location ./.prettiercache --write"],"*.!(ts)":"prettier --cache --cache-location ./.prettiercache --ignore-unknown --write"},"sideEffects":false,"_nodeVersion":"22.8.0","dependencies":{"vfile":"^6.0.3","unified":"^11.0.5","@types/mdx":"^2.0.13","image-size":"^1.1.1","@mdx-js/mdx":"^3.1.0","@types/hast":"^3.0.4","@types/mdast":"^4.0.4","@types/estree":"^1.0.6","@acdh-oeaw/lib":"^0.1.12","unist-util-visit":"^5.0.0","hast-util-heading":"^3.0.0","mdast-util-mdx-jsx":"^3.1.3","hast-util-to-string":"^3.0.1","hast-util-heading-rank":"^3.0.0","estree-util-value-to-estree":"^3.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.1","tsup":"^8.3.0","is-ci":"^3.0.1","eslint":"^9.13.0","globals":"^15.11.0","prettier":"^3.3.3","typescript":"^5.6.3","@types/node":"^22.7.8","lint-staged":"^15.2.10","npm-run-all2":"^7.0.0","@changesets/cli":"^2.27.9","@commitlint/cli":"^19.5.0","@keystatic/core":"^0.5.38","simple-git-hooks":"^2.11.1","@acdh-oeaw/tsconfig-lib":"^1.1.1","@acdh-oeaw/eslint-config":"^2.0.3","@acdh-oeaw/prettier-config":"^2.0.0","@acdh-oeaw/commitlint-config":"^2.0.0","@changesets/changelog-github":"^0.5.0","eslint-config-flat-gitignore":"^0.3.0","@acdh-oeaw/eslint-config-node":"^2.0.3"},"simple-git-hooks":{"pre-push":"pnpm run validate","commit-msg":"pnpm exec commitlint --edit","pre-commit":"pnpm exec lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/mdx-lib_0.1.4_1756372108372_0.7395647409472459","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@acdh-oeaw/mdx-lib","version":"0.2.0","license":"MIT","repository":{"url":"git+https://github.com/acdh-oeaw/mdx-lib.git"},"type":"module","engines":{"node":">=22"},"devEngines":{"runtime":{"name":"node","version":"^24","onFail":"download"}},"sideEffects":false,"exports":{".":"./dist/index.js"},"dependencies":{"@acdh-oeaw/lib":"^0.3.7","@mdx-js/mdx":"^3.1.1","@types/estree":"^1.0.8","@types/hast":"^3.0.4","@types/mdast":"^4.0.4","@types/mdx":"^2.0.13","estree-util-value-to-estree":"^3.5.0","hast-util-heading":"^3.0.0","hast-util-heading-rank":"^3.0.0","hast-util-to-string":"^3.0.1","image-size":"^1.1.1","mdast-util-gfm-footnote":"^2.1.0","mdast-util-gfm-strikethrough":"^2.0.0","mdast-util-gfm-table":"^2.0.0","mdast-util-gfm-task-list-item":"^2.0.0","mdast-util-mdx-jsx":"^3.2.0","micromark-extension-gfm-footnote":"^2.1.0","micromark-extension-gfm-strikethrough":"^2.1.0","micromark-extension-gfm-table":"^2.1.1","micromark-extension-gfm-task-list-item":"^2.1.0","remark-gfm":"^4.0.1","unified":"^11.0.5","unist-util-visit":"^5.0.0","vfile":"^6.0.3"},"devDependencies":{"@acdh-oeaw/commitlint-config":"^3.0.0","@acdh-oeaw/eslint-config":"^2.0.11","@acdh-oeaw/eslint-config-node":"^2.0.11","@acdh-oeaw/prettier-config":"^2.0.1","@acdh-oeaw/tsconfig-lib":"^1.3.0","@arethetypeswrong/core":"^0.18.2","@changesets/changelog-github":"^0.5.2","@changesets/cli":"^2.29.8","@commitlint/cli":"^20.2.0","@keystatic/core":"^0.5.48","@types/node":"^24.10.3","eslint":"^9.39.1","eslint-config-flat-gitignore":"^2.1.0","globals":"^16.5.0","is-in-ci":"^2.0.0","lint-staged":"^16.2.7","npm-run-all2":"^8.0.4","prettier":"^3.7.4","simple-git-hooks":"^2.13.1","tsup":"^8.5.1","tsx":"^4.21.0","typescript":"^5.9.3","node":"runtime:^24"},"commitlint":{"extends":"@acdh-oeaw/commitlint-config"},"lint-staged":{"*.ts":["eslint --cache --fix","prettier --cache --cache-location ./.prettiercache --write"],"*.!(ts)":"prettier --cache --cache-location ./.prettiercache --ignore-unknown --write"},"prettier":"@acdh-oeaw/prettier-config","simple-git-hooks":{"commit-msg":"pnpm exec commitlint --edit","pre-commit":"pnpm exec lint-staged","pre-push":"pnpm run validate"},"scripts":{"build":"tsup","changeset:add":"changeset add","changeset:status":"changeset status --verbose","ci:release":"changeset publish","ci:version":"changeset version && prettier \"**/CHANGELOG.md\" --write","format:check":"prettier . --cache --cache-location ./.prettiercache --check","format:fix":"pnpm run format:check --write","lint:check":"eslint . --cache","lint:fix":"pnpm run lint:check --fix","setup":"is-in-ci || simple-git-hooks","test":"tsx --test --test-reporter spec","types:check":"tsc --noEmit","validate":"run-p format:check lint:check types:check test"},"_id":"@acdh-oeaw/mdx-lib@0.2.0","description":"utilities and plugins for [`mdx`](https://mdxjs.com).","bugs":{"url":"https://github.com/acdh-oeaw/mdx-lib/issues"},"homepage":"https://github.com/acdh-oeaw/mdx-lib#readme","_integrity":"sha512-fg45dZsghDsFLNdHMT/gNGakYHi56v4Kk6Uj+xLuEut55Mzuk0LayJy6xZa+EHvR4FhayFBMCOqos3mcjWNfPw==","_resolved":"/tmp/0db6bacaf6882726f07d5b218842e7f2/acdh-oeaw-mdx-lib-0.2.0.tgz","_from":"file:acdh-oeaw-mdx-lib-0.2.0.tgz","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-fg45dZsghDsFLNdHMT/gNGakYHi56v4Kk6Uj+xLuEut55Mzuk0LayJy6xZa+EHvR4FhayFBMCOqos3mcjWNfPw==","shasum":"8db8e8572ce3598d06c44e855015ae4bc8282d8b","tarball":"https://registry.npmjs.org/@acdh-oeaw/mdx-lib/-/mdx-lib-0.2.0.tgz","fileCount":61,"unpackedSize":80110,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@acdh-oeaw%2fmdx-lib@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGFNlWQgeyX8enzaCsGZWlFQ/hmRPKoaGnlQqcUS+akgAiBh+9qMez1VRrkMko0Y79F4WNv2FZRtoZ2eN00/C0+cng=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8cbb753b-91a4-4df0-b4db-477e57263987"}},"directories":{},"maintainers":[{"name":"stefanprobst","email":"stefanprobst@posteo.de"},{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mdx-lib_0.2.0_1765522721791_0.4851271281347176"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-14T08:37:13.510Z","modified":"2025-12-12T06:58:42.359Z","0.0.0":"2024-09-14T08:37:13.772Z","0.0.1":"2024-09-14T21:13:12.891Z","0.0.2":"2024-09-15T20:29:23.234Z","0.1.0":"2024-09-16T14:23:10.667Z","0.1.1":"2024-09-25T13:55:13.359Z","0.1.2":"2024-10-22T18:22:43.891Z","0.1.3":"2024-12-10T13:35:31.992Z","0.1.4":"2025-08-28T09:08:28.560Z","0.2.0":"2025-12-12T06:58:41.942Z"},"license":"MIT","description":"utilities and plugins for [`mdx`](https://mdxjs.com).","maintainers":[{"name":"stefanprobst","email":"stefanprobst@posteo.de"},{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"}],"readme":"# mdx lib\n\nutilities and plugins for [`mdx`](https://mdxjs.com).\n\n## how to install\n\n```bash\nnpm i @acdh-oeaw/mdx-lib\n```\n\n## how to use\n\nconfigure types for supported locales and jsx:\n\n```ts\n// ./types/mdx.d.ts\n\n// import type * as runtime from \"astro/jsx-runtime\";\nimport type * as runtime from \"react/jsx-runtime\";\n\ndeclare module \"mdx/types\" {\n\tnamespace JSX {\n\t\ttype Element = runtime.JSX.Element;\n\t\ttype ElementClass = runtime.JSX.ElementClass;\n\t\ttype IntrinsicElements = runtime.JSX.IntrinsicElements;\n\t}\n}\n\ndeclare module \"@acdh-ch/mdx-lib\" {\n\texport interface MdxConfig {\n\t\tlocales: \"de\" | \"en\";\n\t}\n}\n```\n\nprovide component mappings (in next.js the file location has to be `mdx-components.tsx` at the\nproject root):\n\n```ts\n// ./mdx-components.ts\n\nimport { Link } from \"@/components/link\";\n\nconst components = {\n\ta: Link,\n\t/** ... */\n};\n\ndeclare global {\n\ttype MDXProvidedComponents = typeof components;\n}\n\nexport function useMDXComponents(): MDXProvidedComponents {\n\treturn components;\n}\n```\n\ncreate locale aware mdx compilers:\n\n```ts\n// ./lib/mdx/compile-mdx.ts\n\nimport { createMdxProcessors, run } from \"@acdh-ch/mdx-lib\";\n// import * as runtime from \"astro/jsx-runtime\";\nimport * as runtime from \"react/jsx-runtime\";\n\nconst createProcessor = createMdxProcessors((locale) => {\n\treturn {\n\t\t/** When using `astro` instead of `react`. */\n\t\t// elementAttributeNameCase: \"html\",\n\t\t// jsxImportSource: \"astro\",\n\n\t\tremarkPlugins: [],\n\t\tremarkRehypeOptions: {},\n\t\trehypePlugins: [],\n\t};\n});\n\nexport async function compileMdx(content: string, baseUrl: URL, locale: string) {\n\tconst processor = await createProcessor(locale);\n\tconst compiled = await processor.process(content);\n\treturn run(compiled, { ...runtime, baseUrl, useMDXComponents });\n}\n```\n\nnote that in `astro` projects, you need to use the astro jsx runtime (`astro/jsx-runtime`), and set\n`elementAttributeNameCase` to \"html\".\n\n## plugins\n\n### `with-custom-heading-ids`\n\n`rehype` plugin which finds `<HeadingId id=\"abc\" />` mdx components, and applies the `id` attribute\nto a parent heading element.\n\nexample:\n\n```mdx\n## This is a heading <HeadingId id=\"my-custom-heading\" />\n```\n\nwhen not using any other plugins, this would be transformed to a regular `<h2>` element. when using\nthe `rehype-slug` plugin, this would add an auto-generated id attribute:\n`<h2 id=\"this-is-a-heading\">`. when using this plugin, you can add custom ids to the heading:\n`<h2 id=\"my-custom-heading\">`. the `<HeadingId>` component will be removed from the generated\noutput.\n\n### `with-footnotes`\n\n`remark` plugin which finds inline `<Footnote>` mdx components, and transforms them to markdown\nfootnotes, i.e. `footnoteReference` and `footnoteDefinition` mdast nodes (requires `remark-gfm`).\n\nexample:\n\n```mdx\nThis is an important sentence.<Footnote>Found it on the internet.</Footnote>\n```\n\nwill be transformed to:\n\n```html\n<p>\n\tThis is an important sentence.<sup\n\t\t><a\n\t\t\thref=\"#user-content-fn-1\"\n\t\t\tid=\"user-content-fnref-1\"\n\t\t\tdata-footnote-ref\n\t\t\taria-describedby=\"footnote-label\"\n\t\t\t>1</a\n\t\t></sup\n\t>.\n</p>\n<section data-footnotes class=\"footnotes\">\n\t<h2 class=\"sr-only\" id=\"footnote-label\">Footnotes</h2>\n\t<ol>\n\t\t<li id=\"user-content-fn-1\">\n\t\t\t<p>\n\t\t\t\tFound it on the internet.\n\t\t\t\t<a\n\t\t\t\t\thref=\"#user-content-fnref-1\"\n\t\t\t\t\tdata-footnote-backref=\"\"\n\t\t\t\t\taria-label=\"Back to reference 1\"\n\t\t\t\t\tclass=\"data-footnote-backref\"\n\t\t\t\t\t>↩</a\n\t\t\t\t>\n\t\t\t</p>\n\t\t</li>\n\t</ol>\n</section>\n```\n\nThe `h2` text content and `aria-label`s for generated elements can be controlled by setting\n`remarkRehypeOptions`.\n\n### `with-iframe-titles`\n\n`rehype` plugin which applies the text content of a component to its `title` attribute. this is\nmeant to be used with components which render an `<iframe>`. accepts a `components` option listing\nthe names of components to handle.\n\nexample:\n\n```mdx\n<Embed src=\"https://example.com/iframe\">This is **the** title.</Embed>\n```\n\nwill be transformed to:\n\n```html\n<iframe src=\"https://example.com/iframe\" title=\"This is the title.\" />\n```\n\n### `with-image-imports`\n\n`rehype` plugin which transforms the `src` attribute of `<img>` elements and configured mdx\ncomponents into esm imports, because most javascript frameworks provide image optimisation features\nwhich integrate with a bundler and work via import statements.\n\nexample:\n\n```mdx\n<img src=\"./first-image.png\" />\n\n<Figure src=\"/second-image.png\">This is the image caption.</Figure>\n```\n\nwill be transformed to:\n\n```mdx\nimport __image1__ from \"./first-image.png\";\nimport __image2__ from \"/home/stefan/my-project/public/second-image.png\";\n\n<img src={__image1__} />\n\n<Figure src={__image2__}>This is the image caption.</Figure>\n```\n\nnote that paths starting with \"/\" will be expanded to absolute paths using the `publicPath` config\noption (defaults to \"/public/\"). for relative paths starting with \"./\" or \"../\", you need to provide\na `baseUrl` to the mdx compiler.\n\nalso note that you need a bundler to handle the image imports, so this requires\n`outputFormat: \"program\"`.\n\ndon't forget to map `img` elements to a custom component which can handle objects as `src` prop,\ne.g.:\n\n```ts\n// ./mdx-components.ts\n\nimport Image from \"next/image\";\n\nconst components = {\n\timg: Image,\n};\n\nexport function useMDXComponents() {\n\treturn components;\n}\n```\n\n### `with-table-of-contents`\n\n`rehype` plugin which generates a table of contents, and provides it via\n`vfile.data.tableOfContents`, as well as a `tableOfContents` named export. additionally, it provides\nthe table of contents data to any `TableOfContents` mdx component.\n\n```ts\nconst vfile = await processor.process(content);\nconsole.log(vfile.data.tableOfContents);\nconst { default: Content, tableOfContents } = await run(vfile, { ...runtime });\n```\n\n### example using all provided plugins\n\n```ts\n// ./lib/mdx/compile-mdx.ts\n\nimport {\n\tcreateMdxCompiler,\n\tcreateMdxProcessors,\n\ttypographyConfig,\n\twithCustomHeadingIds,\n\twithFootnotes,\n\twithIframeTitles,\n\t// withImageImports,\n\twithImageSizes,\n\twithTableOfContents,\n} from \"@acdh-ch/mdx-lib\";\nimport withHeadingIds from \"rehype-slug\";\nimport withGfm from \"remark-gfm\";\nimport withTypographicQuotes from \"remark-smartypants\";\nimport * as runtime from \"react/jsx-runtime\";\n\nimport { useMDXComponents } from \"../../mdx-components\";\n\nconst createProcessor = createMdxProcessors((locale) => {\n\treturn {\n\t\tremarkPlugins: [withGfm, [withTypographicQuotes, typographyConfig[locale]], withFootnotes],\n\t\tremarkRehypeOptions: {\n\t\t\tfootnoteBackLabel(referenceIndex, rereferenceIndex) {\n\t\t\t\treturn t(\"footnoteBackLabel\", {\n\t\t\t\t\treference: referenceIndex + 1 + (rereferenceIndex > 1 ? \"-\" + rereferenceIndex : \"\"),\n\t\t\t\t});\n\t\t\t},\n\t\t\tfootnoteLabel: t(\"footnoteLabel\"),\n\t\t},\n\t\trehypePlugins: [\n\t\t\twithCustomHeadingIds,\n\t\t\twithHeadingIds,\n\t\t\t[withIframeTitles, { components: [\"Embed\", \"Iframe\", \"Video\"] }],\n\t\t\t// [withImageImports, { components: [\"Figure\"] }],\n\t\t\t[withImageSizes, { components: [\"Figure\"] }],\n\t\t\twithTableOfContents,\n\t\t],\n\t};\n});\n\nexport const compileMdx = createMdxCompiler(createProcessor, runtime, useMDXComponents);\n```\n","readmeFilename":"readme.md","homepage":"https://github.com/acdh-oeaw/mdx-lib#readme","repository":{"url":"git+https://github.com/acdh-oeaw/mdx-lib.git"},"bugs":{"url":"https://github.com/acdh-oeaw/mdx-lib/issues"}}