{"name":"@theme-ui/mdx","version":"0.8.2","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.2","@theme-ui/css":"0.8.2"},"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":"55e5ba89d2bb975063ffc0e964d243dfe39af78c","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.2","_nodeVersion":"14.16.1","_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-bd4UXlIHea2UC5PlRwA9qEJJyGP7s0iayoJsfHqpj2hk7yi/Z1cVveLDLk7ZnnHDxa2fQpHIWsBLTNRBdzzMWg==","shasum":"28d326737f52840529398ae58fa688536dbd99f0","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.8.2.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\nwsFcBAEBCAAQBQJgkttbCRA9TVsSAnZWagAAtQwP/iXVFQbNot2LI7xtyBd8\nT6u17CSYlaLcVUSlE7J3Od6rXv4n83hJTcASwbcG9TYeHI5aFzTaXW/4ook+\n3jq4AJyP5W+PIC7oIVTVDAOumGakSR6j77UDIWDsRDTW2s6y/cSqoNyrU86H\njz9Bf5mCLmhYZwBX32cL/5CTZF3lH1N40PYynTd+Cb15f3OfNg7KLfsW28R4\n6nyCz1kUIWV77bW9GDXpljJ693Rds6ZioxM4avp8PWr+IdqIKdTNN1NE0Oiu\nC1ifzCuW5tj6VGSNxZdxZlvyx2uF4/dw17JGg7y0bRTlXmuo6rer4y5OLF3I\n0BUTx4KtC1X5/vk01eNjLKmdF9RogXEuk7GeBNvtEobD+pbCU1IOvNxDtBXD\nRjjh6tvmNjSroXDl255/hERmzSTftfmfS9l8LvB9oHzQsjC6R/No/Qrjx+Pg\nVC4jjSynAuyJ5NbfTbtLh9p0HGeNt2ypgZF7edESN+Fo/0AajH6pA3P8qbr7\nmli0mUFbtEMxvzlhOLpl13ZbQ3ArNW7MoyCD1lkLoCqM6tYscJuJFFbFytmL\nNQYliSwbBM3Jy+uYuExg4/J46hU7/bOZzLWWBV5lrxHBumBn8tP2SIzxYbbP\nMI4M7hrz/A9XJJGC2yEZX7j1UBAxXj2CgsOEV3KtBwjG1tqdSuWpHtjKLk+v\nI3sO\r\n=Ci56\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2IjQu6EqzKm1ccyH+RVh0TxUTpHseqVr5rpJoqy7ExgIhALfo5SmKlJ4IEcTOOd0wvqm1AG+fYtPvlSRaEwoOIDwA"}],"size":7069,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.8.2.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.2_1620237147521_0.4751765646054549"},"_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":1620237147667,"_cnpm_publish_time":1620237147667,"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"}}