{"name":"@theme-ui/mdx","version":"0.6.1","source":"src/index.ts","main":"dist/index.js","module":"dist/index.esm.js","types":"dist/index.d.ts","sideEffects":false,"scripts":{"prepare":"microbundle --no-compress --tsconfig tsconfig.json","watch":"microbundle watch --no-compress --tsconfig tsconfig.json","typecheck":"tsc --noEmit"},"dependencies":{"@emotion/react":"^11.1.1","@emotion/styled":"^11.0.0","@mdx-js/react":"^1.6.22","@theme-ui/core":"^0.6.1","@theme-ui/css":"0.6.0"},"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":"8aa64028a69485be91a8cbf0e2230f7ac7fd3e6c","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.6.1","_nodeVersion":"14.15.3","_npmVersion":"lerna/3.22.1/node@v14.15.3+x64 (linux)","dist":{"integrity":"sha512-FGK+BAWuF2OlnSo4/4PuY4yolWCDZZl3RC9+qyLrGD8wIFrakCD2yL8g4bTatt3vfv1yRZlDlu2mq2PzANu04Q==","shasum":"0c9e22e668c049c5350bd77acb61eaa89d2cf751","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.6.1.tgz","fileCount":15,"unpackedSize":65160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYu2+CRA9TVsSAnZWagAAGNMP/36KQyHBAP6nc/PmQXpE\nVVMbgM21f+N1y+lpBYRHyCdrlEDXR6ozUtqFn8l4cuYNtqCqH9+kurbMPq/2\nj670wCtS5iNJPGs98jA2JO3a7h0oroTZWQRVvJgITh6/CnvrYnIodVFpRkMB\nPIRaKRvusOGbVKwbfWSr8YrGT+mQ3oxWtczIo97L3IIJrj38cYWYW+9stwTq\nWHaSbfEnVc8Lod8YqA4a2TEQes16CnpVdSKLrneK62F5lCix7xHCNKsbZHCW\nspJ9r/SgsUvayI8ObVMJshMb0A4+vEdONxnwEDtBJy7B0mtZGe9qL/SbHENw\nG/3rJ7uVn4bUiq2RAQFsrvoIlKhJ7drzDW6XHXoDwQpMM6xR8kAbL01S1tzO\nx98PAQOGsFHJUgY1xBuQ0MRwfldMScR7IL5vWRPSOcNjdLQvxxKF37GoVCvt\nx3OF5Fjjkc5M/ylotuTSBa/8PdUFdt3/VGYA31VarCZLNs92S96xzTXaeKXg\nYhtoZIxVA/B823d0iv0rYBDnV4W8rCM7u2Eu6AWmaQSAQYwMrHXVTUVOA3C9\nvEP5Lp4iQ7TX9AAnEdx1VCgZ0uSmm7MQH11WzXA7vhefzmhwGA1Qy1d9bTch\nAxGytJmOam/nDpI+6KAq+G67eogRwotQCHGz7O+JHCCsFZmSN5G1WMtcJzRZ\nfQG+\r\n=DBzX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1PPscYMywg60v2jGb8lD4EPYMO/OlN98BCWlKxYQMygIgFDGDRVxPGGldjuUxAH1Sk9Mb5eX0iDjlpGFrwt2S3jE="}],"size":10119,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.6.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.6.1_1617096125769_0.9818973208543962"},"_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":1617096125926,"_cnpm_publish_time":1617096125926,"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"}}