{"name":"@theme-ui/mdx","version":"0.9.0","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.9.0","@theme-ui/css":"0.9.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":"7f745d0c06af3dc48682742df9095d264bba41ff","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.9.0","_nodeVersion":"14.17.0","_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-kiK9QDDisXgPjGEnMV+Tf08RJxfvLOlQ4rY+c7HFMbjMJpo0laHTMxFUSXePGtK7GJKf+rq6rt0i/Qjzjivk5g==","shasum":"904c8a0f9bd1c09827a47c83e1e5d0e47e9c9084","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.9.0.tgz","fileCount":12,"unpackedSize":25794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrXPBCRA9TVsSAnZWagAAddsP/iUq+YUv9BcyAabkpf5W\nKwB9AeFWZeqqi121CrOWD3HmRz7zOtmmVmXesYkCv5WLKUkTCD0y6K0eO4yO\nzfbTF4y2GgJH93l6RvwYcSP/w7PrRUl70Bbgce6BpTzAwF6Gqj7nb2f6J+30\nJXC+3HqLZhWtGtrjK5+xhuqW/IEZpWyyYzReehxRIiSIoJh3pbWQ1M4FDFn/\n/pPzvn3Nl/QtgxwXSWeJ3ZwG8tInfC/7CRk64ZWqiedGFJF2M2jAOeU2irtq\nrb8Syly7vAuJeNXWZJg23HRiF01A8CukuocnPD3gWFS/8B0BENeQX5vOq9Kx\n858oLsxk8Qo4vfBebUkm7luwCYk0/dRErWRwoj7yLVFoyw6RKOVKMKOvT/jn\n40JEmnUXxcNlCfcjJBsaKZ4CoZle9YWBqgDwBhnN2q4PEJzUGl+4tP90gR1V\nKpEzNf09TaP+ZTyOa469S9TgaUA5R2ClkyJIasohK6OeOlpbxtskT//AHmPg\n5JPgYKFqdTWeH6mT8kACNqdVibC2pcXYEH3I+MYoULPGDZHSnLDURhg+yClS\nK0KKfT96Gl/Fh4EIMKIx/v4n6tiOpHXOpH1YMalrJp0WbCT2yI1fd7drtSKE\nxL6Xj96Rxr3S0TRwBecTLI9clwPxi++mbu0c0YB2TIl2RMpzroupCtEBbvvs\nF32L\r\n=GZvU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHxY2Dx4nn+Ziw1ZRQjJH6OXa2h2yfUESXz9D+CVBlOoAiEAmq0kMs2YNWH6OwSk6GMoyepdNHQKxG7+7I1RHunRVJ8="}],"size":6317,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.9.0.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.9.0_1621980096644_0.7322523891899315"},"_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":1621980096837,"_cnpm_publish_time":1621980096837,"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"}}