{"name":"@theme-ui/mdx","version":"0.11.0","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.11.0","@theme-ui/css":"0.11.0"},"devDependencies":{"react":"^17.0.1"},"peerDependencies":{"react":"^16 || ^17"},"author":{"name":"Brent Jackson"},"repository":{"type":"git","url":"git+https://github.com/system-ui/theme-ui.git"},"license":"MIT","publishConfig":{"access":"public"},"gitHead":"51bf7e32f7b539a223e7176857eced6d3e047d28","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.11.0","_nodeVersion":"14.17.5","_npmVersion":"lerna/4.0.0/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-fT3s0pVPBrNHDbpxFqKfpGS40HeefVQaVycMIH9+B94zUVtmy9LTFdYwnn5fLFLk1O6qi35JcrbGrrw6OF9HNw==","shasum":"0c3fb94c8ea60965383acea54766db496f76f078","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.11.0.tgz","fileCount":12,"unpackedSize":26453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJlosCRA9TVsSAnZWagAAG2UQAJMjVYr4Zv69mjnUUvb3\na5rE2fEiVb1sLqFJiO4+0WXlz9EZcpwVi95HB4/I2TXJQQBsyts0/NbUagur\nxEizvyYq7FvjGmThEXheTm4phdp+2/U7VUcru1tF4Yu0Hw9qgFQz7QSl9Gn4\nw/2Zpu+8i2Yw/UVM1EMQJ+f3cclJ/6y3qMlFaosraqpUHiDNYjFpHLlKN/q2\nFIVnaOx161d/T+S9F6zlSAqQe+f28vX6fH5jOiZWiyCQnzszs2YJIdGHK0PT\nZUPHxVulFTMgIxrtDYnYI2To9fMBlNFcJw7sieTb81j7dpXMroKcZBdvCFZ+\nrlyB9eViWzqrLuYhM2/vFwj/zqzSiqThEPs/tGVfqYGyxmzFpBggLyoPnTaf\nxyhq/N0Fx7e8e4hvCKManXmdePpWcL0VEC0+/kv7iSw8RtvQvZWKOlVh2Uih\nfTuTQMgcpr3ENBE4CmVam6z15SoObGIfLUE4jBirbCRv9wG3kv42FgBj+7vG\nkpT+E0WsCltzqP+0iR+TbSwrScWDzoXJFS07Sctv3EwqgVX7Qg3zJ6yfdeZD\nAQSWLN0ZutmVKhG8o5SKsBwqISBQyTWexmyqB3XNmUGRvnHmXWfcHseJBhUJ\nLJtQ55MOn1CV0hlVRvuPZ9KAIZx33/icB1yIrmobRA3S/k2quz01tpfGfLWi\nbCFE\r\n=SJwQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFr49XhWtFHlXEMmJHya+fQLhRAge46GS2LTVhrPTiN9AiAeTpDw4jIZnY5JpYlMK89iMerBImeM60iGH7ulKQ/4Ow=="}],"size":6469,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.11.0.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.11.0_1629903404357_0.8585000547392743"},"_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":1629903404520,"_cnpm_publish_time":1629903404520,"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"}}