{"name":"@theme-ui/mdx","version":"0.3.0-alpha.0","main":"dist/index.js","module":"dist/index.esm.js","scripts":{"prepare":"microbundle --no-compress","watch":"microbundle watch --no-compress"},"dependencies":{"@emotion/core":"^10.0.0","@emotion/styled":"^10.0.0","@mdx-js/react":"^1.5.1"},"peerDependencies":{"@theme-ui/core":"*","@theme-ui/css":"*","react":"^16.11.0"},"author":{"name":"Brent Jackson"},"repository":{"type":"git","url":"git+https://github.com/system-ui/theme-ui.git"},"license":"MIT","publishConfig":{"access":"public"},"gitHead":"1b72612681a1cbac1bd1610d118cd209ceba9b88","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.3.0-alpha.0","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.20.1/node@v12.13.1+x64 (linux)","dist":{"integrity":"sha512-lATBdVUNsR1KEgaDAjUTEVJriMH4ThH9AcC/X2U2Cj2+3ucpqrYI5ZI1lTpqvG3a3U46KMxRVRNAa4CSDVpkFA==","shasum":"fc657b09c732407817dd6860f82c3782423a0926","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.3.0-alpha.0.tgz","fileCount":11,"unpackedSize":20461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeC2qnCRA9TVsSAnZWagAAhtwP/1SvU1sCCWolcVUabZVq\n1nAgw4h6JJzPtbwcVpSbB8F9A4tVtPIOd3vU6MN+qPhIzxPRV3zPL543cswX\nZbv/6mstvGsz52o8W9kC/v2clkM5b5DbX6xKxFsJ0v/gv7WJYFaXSeERabbq\nWclyTI5Pm/pk5IrvDb5nxwPz+FF2unhrHdX48GJClBfUReIFet1Ecm/axgw0\n5Aqpll4i7ajUPml7OsaSkViYgxmdqFx4CJihmFx8FAJZZ62PQjnThrwtj5fk\nfc5Ok+HOb/XM13UCwjkVsxWPo42t3QwA/WrF3qQ+zWPwnTEX8PzTeEBsEOZh\nIu/fnXj+AcuwNCZ2QmPhFgo14JAZb5jWzId+A1FWOXSP8f9N41NlwQPHlQOx\n4lqR+05f1+kQ9+OuwIHpg0sIv8EOKh6ZNxoTWsGOb3PU86nys1mrNeJ/O5Ht\nxHgk5A0uuLCZUQXpg6PWd3HfCSc+YWhSwHnZmCtPrupIyHpMtGi1i/V7g42I\nJdltLWNCpJ5wCatjCkC9xxE3SI/JDm3ODf2vNRPDAVNcuFdlt2I3lCZO2zLx\n69CbsQgHnnOhVNH0ZOfH/vFHfzwXc4Gm8jzKpzZgvRBTN10MHt393hwXXY5c\nI3J9lwfI8JkoiFytsEMArnIPRqUsmN7oByb2L3tqb1GaV6NnSoibMWEBKrXH\ngM+v\r\n=bd8n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2ycpC9LYZlfQgO7+MFAXZ182SOarIhBLsjuBR5eFIVAIgY2zyiKsq2gcgYxks/8xaBsAbz7p3KRJsEiBLCvUvc+Y="}],"size":4817,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.3.0-alpha.0.tgz"},"maintainers":[{"name":"johno","email":"johnotander@gmail.com"},{"name":"jxnblk","email":"jxnblk@gmail.com"}],"_npmUser":{"name":"jxnblk","email":"jxnblk@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdx_0.3.0-alpha.0_1577806503221_0.7021059158525631"},"_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":1577806503379,"_cnpm_publish_time":1577806503379,"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"}}