{"name":"@theme-ui/mdx","version":"0.15.7","source":"src/index.ts","main":"dist/theme-ui-mdx.cjs.js","module":"dist/theme-ui-mdx.esm.js","sideEffects":false,"dependencies":{"@theme-ui/core":"^0.15.7","@theme-ui/css":"^0.15.7"},"peerDependencies":{"@emotion/react":"^11","react":">=18","@types/mdx":"^2.0.2"},"devDependencies":{"@mdx-js/mdx-v2":"npm:@mdx-js/mdx@^2.1.2","@mdx-js/react-v2":"npm:@mdx-js/react@^2.1.2","@types/mdx":"^2.0.2","react":"^18.1.0","remark-gfm":"^3.0.1","@babel/core":"^7","@types/react":"^18","@theme-ui/test-utils":"^0.15.7"},"author":{"name":"Brent Jackson"},"repository":{"type":"git","url":"git+https://github.com/system-ui/theme-ui.git"},"license":"MIT","publishConfig":{"access":"public"},"gitHead":"621199460fa3bdb0100748441e62517b7529b8c8","scripts":{},"types":"./dist/theme-ui-mdx.cjs.d.ts","description":"[MDX](https://mdxjs.com) utilities for [Theme UI](https://theme-ui.com)","bugs":{"url":"https://github.com/system-ui/theme-ui/issues"},"homepage":"https://github.com/system-ui/theme-ui#readme","_id":"@theme-ui/mdx@0.15.7","_integrity":"sha512-VAJMWvAmfR7bSLi/Z7Ncf8P5DaPGbY0x2RnUsiH18HctOKUX7FqiHnqrKO0+3a1ZHhhXJ6YjXbFGAYK8/lF/lw==","_resolved":"/private/var/folders/78/vkx7my5x2zj3jk033zslz_c00000gp/T/e657f7a3ee5d73d40e97a18450dd8e89/theme-ui-mdx-0.15.7.tgz","_from":"file:theme-ui-mdx-0.15.7.tgz","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-VAJMWvAmfR7bSLi/Z7Ncf8P5DaPGbY0x2RnUsiH18HctOKUX7FqiHnqrKO0+3a1ZHhhXJ6YjXbFGAYK8/lF/lw==","shasum":"518ba9c422f92d6325619b83a6908a068d48ab80","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.15.7.tgz","fileCount":23,"unpackedSize":36376,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDTpmlrSTb6/+cCb6+RxkNiwMlCD+OAkkmddv5y9zbGCAiAY2EhzgwrNtZzza9Z6VOClSo5j3Uepd//O5lvqa4xgyQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJdxFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpqzg//SJiwrc2+FQA02PtiK9aBaQz/X8KjJE6Y7tHfdR09qwwThLI8\r\nUf4Z90r2hBH13HPJ5Tt+EErhksaO6lECMKkEhRL7hXUHvIh0dYFo2TxB4fIl\r\nesYieYg0TS5iH/qdhX35f1moKTbi2Hg3fdbUXlInpduWKu/5p4cHzREdMnQu\r\nwcpz/1+2xBsRWz28fewjYe4HH7ZoceYIT/rp3irknifqPsr4hvYzWt1xt9Ds\r\n2b8Y6hD02VnZ16W4AbMKaDwpAZRQpgHTMuhV7Z091/bc7j2EHxrR2E6f37vF\r\nQf/k9Cs/nSavD10O7VCcHoYKM2yXQvvF1VO4e38+FUlNBcw7fQxYYZHnciqO\r\nn+iJGfUFRhJZXucuixOMAW+bbZ5rPcEMFCnaZC5uD9Qmzrg5MdJkFnxg2Zx1\r\nROi1h11UdrHSYcUlVFnWuqFav9JovVXZefJD2OS/goS3d5iurXBZ7S/CDGT9\r\n/avpnJuzdxvPMK+WbtalyYYtLjPgw2ha7J9TBOSp8UQuD2w4nXoK8RorRP9A\r\nhbQGI4I7UkEpKJyE+M+bGu4Gg3o9w4KlMcfDtoj+ucqrNsXsh5Qgvxt18wqp\r\nE7HbRrNaHTH3TdvncHZydxDG/Gr8gypxATH8mGocGBLKHvYkOw02lLolrjQr\r\ny8BJCSg6Hf03vkKc9DK65SkyEChec0JwPd8=\r\n=u/HH\r\n-----END PGP SIGNATURE-----\r\n","size":9080,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.15.7.tgz"},"_npmUser":{"name":"hasparus","email":"hasparus@gmail.com"},"directories":{},"maintainers":[{"name":"jxnblk","email":"jxnblk@gmail.com"},{"name":"johno","email":"johnotander@gmail.com"},{"name":"hasparus","email":"hasparus@gmail.com"},{"name":"lachlanjc","email":"lachlanjc@hey.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdx_0.15.7_1680202821332_0.3215346167240518"},"_hasShrinkwrap":false,"readme":"# @theme-ui/mdx\n\n[MDX](https://mdxjs.com) utilities for [Theme UI](https://theme-ui.com)\n\n```sh\nnpm i @theme-ui/mdx\n```\n\n## API\n\n### `useThemedStylesWithMdx`\n\nWraps an object of components provided to `MDXProvider` with styles from\n`theme.styles`.\n\n**Example usage:**\n\n```tsx\nimport {\n  MDXProvider,\n  useMDXComponents,\n  Components as MDXComponents,\n  MergeComponents as MergeMDXComponents,\n} from '@mdx-js/react'\nimport { useThemedStylesWithMdx } from '@theme-ui/mdx'\nimport { ThemeUIProvider, Theme } from 'theme-ui'\n\ninterface MyProviderProps {\n  theme: Theme\n  components?: MDXComponents | MergeMDXComponents\n  children: React.ReactNode\n}\nfunction MyProvider({ theme, components, children }: MyProviderProps) {\n  const componentsWithStyles = useThemedStylesWithMdx(\n    useMDXComponents(components)\n  )\n\n  return (\n    <ThemeUIProvider theme={theme}>\n      <MDXProvider components={componentsWithStyles}>{children}</MDXProvider>\n    </ThemeUIProvider>\n  )\n}\n```\n\n### `Themed`\n\nUse the [`Themed` components dictionary](https://theme-ui.com/mdx/themed) to\nrender UI with styles from [`theme.styles`](https://theme-ui.com/theming#styles)\n_outside_ of MDX. These are primarily meant as a mechanism to use styles defined\nin a `theme` object outside of MDX, which can then be embedded in JSX>\n\n```jsx\n// picks up styles from `theme.styles.h1`\n<Themed.h1 />\n```\n\nIf you’re looking to automatically hyperlink headings in MDX, check out the\n[linked headings guide](https://theme-ui.com/mdx/linked-headings).)\n\n---\n\n**Other exports**\n\n- `themed`\n- `defaultMdxComponents`\n","publish_time":1680202821578,"_cnpm_publish_time":1680202821578,"dist-tags":{"canary":"0.16.2-scale-tuples.0","develop":"0.17.2-develop.1","highlight":"0.4.0-highlight.0","latest":"0.17.4","next":"0.6.0-alpha.8"}}