{"name":"@theme-ui/mdx","version":"0.14.6","source":"src/index.ts","main":"dist/theme-ui-mdx.cjs.js","module":"dist/theme-ui-mdx.esm.js","sideEffects":false,"scripts":{},"dependencies":{"@theme-ui/core":"0.14.6","@theme-ui/css":"0.14.6"},"devDependencies":{"react":"^17.0.1"},"peerDependencies":{"@emotion/react":"^11","@mdx-js/react":"^1 || ^2","react":">16"},"author":{"name":"Brent Jackson"},"repository":{"type":"git","url":"git+https://github.com/system-ui/theme-ui.git"},"license":"MIT","publishConfig":{"access":"public"},"gitHead":"225c54ce83d576441d0fe8cd5ff9af5e4cca5294","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.14.6","_nodeVersion":"14.19.3","_npmVersion":"lerna/4.0.0/node@v14.19.3+x64 (linux)","dist":{"integrity":"sha512-vaZWzxOFziI1hptl8BFz7SiSG2TkiUr7LvdIkPf9Tdnt1pp/YFrCS880o1rPTrjW9UmAiRfgJTx7tSpXAWbJyg==","shasum":"aa7b3a75963698a241583cd3ed58f7c13c2626b8","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.14.6.tgz","fileCount":12,"unpackedSize":24842,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBEKnWuddt2f1KH9eqTn6CG9Ee0FfQEN6TSxrD2NLJARAiBfc3svmF/BDdUc8C9gZx/FVZiNO9o5r38pnbZ/BtYUBA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqcfdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmruMA/5AfHBATA4XLJQgi2iFZJz2rByzSNEw4f2/bBhLojvOJkYfzzH\r\n05kerkEc2VmN4+nt+PbWE04J2Z9TS2rn27TpPZ/uFBMN3CqDQ3s7ZkDjJ9Aj\r\n5A2bJx2O4xmHfgE/kWB1b5SdDfq1X9GGMJi6Bx8xYWsL2p2lkjMPb2rxVxXj\r\n+Ke/1oHzP1DwOA4G444quRkqm2CKy5x7fvSLSIj2tp3eKk5z3+d/w5VfHjgg\r\nIrxVvPwKlW3DZz2OIv4Tj4ERAM7vv7aARrChHIpNhBkm39ScYq1924RknYAK\r\nA+OewUgzMqdtm9w6IkQIGnRI+jkXjBds+a0jC4gpFqjik40N+JTwi5gfwKuT\r\nW/Vle3R1FjRyC5rtWTNakMZtb7NcmZb7m0uum59hLbU1lQ8ZNe8LTy2c9wTi\r\naXhgMfWp+Y/HRRHQumqTPKSEPuiFzX07KRvIxBDzxMi6NOX4EQg8LPH2DTlA\r\n81dzFT3T3h4gKV2ZU2LDLagPxDUF+0PxlQUqg4X37TxynkDaiHbx63lEniIH\r\nZcwruXCt6NdVJRnjNcrtaPzj9ldXamAe5QD3LESIjjpInBHCqqBT698+od8E\r\nLvwh36jJcZ8dfkPEGS6JrK1hpZrLLBQcgUKIzZc796imipp92PfdqRN1YYB2\r\noA3gRDAA2YJTOeCsFerSiQjkrETG3g1LQ90=\r\n=OJ4b\r\n-----END PGP SIGNATURE-----\r\n","size":6213,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.14.6.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.14.6_1655293917563_0.5622168250896078"},"_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":1655293917798,"_cnpm_publish_time":1655293917798,"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"}}