{"name":"@theme-ui/mdx","version":"0.7.4","source":"src/index.ts","main":"dist/theme-ui-mdx.cjs.js","module":"dist/theme-ui-mdx.esm.js","sideEffects":false,"scripts":{},"dependencies":{"@emotion/react":"^11.1.1","@emotion/styled":"^11.0.0","@mdx-js/react":"^1.6.22","@theme-ui/core":"0.7.4","@theme-ui/css":"0.7.4"},"devDependencies":{"react":"^17.0.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0"},"author":{"name":"Brent Jackson"},"repository":{"type":"git","url":"git+https://github.com/system-ui/theme-ui.git"},"license":"MIT","publishConfig":{"access":"public"},"gitHead":"bb49bc84db1fbd45cbc88ecbec701a6e52658b76","description":"MDX component context for Theme UI","bugs":{"url":"https://github.com/system-ui/theme-ui/issues"},"homepage":"https://github.com/system-ui/theme-ui#readme","_id":"@theme-ui/mdx@0.7.4","_nodeVersion":"14.16.1","_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-oRLzh6i3+SpI6ZOH31BkwmKzro3V+hjIvvOVHOH2vdSeFw2X1h4xATd9qBbsX6cr8wxj3Uab43mW0DknKMFX5Q==","shasum":"9cc751b201450fe769686e67172701d2371d66b3","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.7.4.tgz","fileCount":12,"unpackedSize":32488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiHdaCRA9TVsSAnZWagAAsecQAJDy7BTHZI2v0yGb8OUb\nj9KIBkpphvPecydcROOaMiEEmA8l2aPWITvgdKQJNfDWLgdwq0c8uTXkuTEt\n2jD3s+5Sj6lk2Afbn2e8l/Nt6Oeo4g8BD0u1wNFNMoYaKcsXGePlHa2yl+sp\nywNp0KMMiM9dvPniNiRi5BPWtqAPietOGrUBMsOJ2QWqjPIMS6tfw1X3QBGs\n0ZrZuKuqfsDVTSo6BL54VnbY2EcsAI1vD+1WEiWkUl/LFuCTg47S6bPF5/X8\n48zhlwJpjpABBTx6UZIzKTPdowms8t78b0eoI9TnGsNpkx3AihhO45i5/Ru9\nStwG3rDZeG+NVpiFLKT797emkWoR7jixIpFagdabky+EJ8oOt6N+dEGB7N0Q\nQgT/+xDozqAA5Xj/1EI2CuDtzBKmI4Bg9UvrKYF0+pctS5uyHydVG8OZsVp5\nyE6fIhv06NJ7Z+PZ4RPVf98+ujNXICQFb52tdjOH/V23cS4SZJywF5f4Q7vd\npujt2u5Nwu+yQoTKpK22InUKHZgN6QPGHSYqede6vVrgKcp70rlKdWvMDQ7D\nddf6UyL7IRQ24at7sgLz17FPBML0fri37+YRQwt0kRuP0t5wRsKt31FYsKpw\nh8W56/tuW4i6Csqnb19+ztTptHtWZoLMuPgGzesQUrYqHICYbtFmxbfmiyV8\n/qD/\r\n=QpwJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGXqNS9abyRkiRb1rMqLsQQSRtOXpsPdpVlgwFrYwxE/AiEA9sfpweh5vC5zyYuO6tuxyZnH05QCf0B9GRpim4F3ms4="}],"size":6932,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.7.4.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.7.4_1619556185851_0.7640181819540854"},"_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":1619556186001,"_cnpm_publish_time":1619556186001,"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"}}