{"name":"@theme-ui/mdx","version":"0.8.1","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.8.1","@theme-ui/css":"0.8.1"},"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":"fc03dbdda9331e7bfc5de4d1ccf4c3c8569dc1bb","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.8.1","_nodeVersion":"14.16.1","_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-XaDq0poGuWDxVmsB8TQO0hm6cPNuF0VImesqD+tqBEJSwLs24LFd9GnkuQDxUD7cPT/v++aVDcVox8fZ1UAZqw==","shasum":"2da5dd18185b7d5403a6b7a47ee1fb8c65190889","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.8.1.tgz","fileCount":12,"unpackedSize":33375,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgko+6CRA9TVsSAnZWagAAIOsP/3HmVsPx642WkJEBRrs9\n9MTse3F1vhVKMiNTSGzNH3U/v8QUqdER2dPq7Q1pgXG3HgNLGIa9Dwi86e5e\nUf9IInORhYIyk8urHzggL0nthNFBdssbpOmBd51cKegBdV9lOIpQ6HsLkXlt\nS0kFs7oWBZXUZ5aM/3BiVWiM7wWz8T4Jz5cYHK0Si+VQOkkf85alap67t1Bj\nyX41PyLNaWlkACbvgyy4lxhdf3P4cs8dGwR8z4z9S9yDz2INBTBl047Yz/Gf\nlPZ2QPUsCvPM9r4G8E5RMW/FKcJ3aXFhRAWvvyzZs38ooAv1AQmRDhQhtK2M\nxvMZndCCnBkomqtkk8jE96R3rFFlT85KsbTN31hynaWebJFHPX/f/PNypdxI\n4s+yEyrcOOy42WlsSoH4yd3xdiq00EtsVPugsTJgb6TpkR+kNfWTwElJPJyp\nrwCEa3CcWaVKIgx0ITOYh0qZtDsiDEltbJpky/eb+3l630Ii1QVx9Ah4iteR\nR6QwaBhPo6emvLJomkjXXhtS/ie6wFnOOV3X6WF9ngm6B64FQUZk6vWEOhNx\nXZP0xNyjFSKSGfd858hZiidoKNz1+gCgjRznyKKEkt76Ri/zuSnKn3NhdNYF\nW/hnIqxAdG3KS7qEkyt4di0rLahnPrDFBsLcL5Bcq1oACpp7GYEHzfuXiarB\nbWqr\r\n=9Dr0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCikDb7skrsDgGxXw2ce3IGMCdwIyD9FQr2VcQXQ8JViwIhAK0P5cCRax3xkryUJmbpbq8MlhJnYbbp0jRR4OKuVR9c"}],"size":7065,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.8.1.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.8.1_1620217786473_0.6398243547954334"},"_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":1620217786611,"_cnpm_publish_time":1620217786611,"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"}}