{"name":"@theme-ui/mdx","version":"0.11.1","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.11.1","@theme-ui/css":"0.11.1"},"devDependencies":{"react":"^17.0.1"},"peerDependencies":{"react":"^16 || ^17"},"author":{"name":"Brent Jackson"},"repository":{"type":"git","url":"git+https://github.com/system-ui/theme-ui.git"},"license":"MIT","publishConfig":{"access":"public"},"gitHead":"6c2ba37136afe2a386a04ab51ea00b222e219587","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.11.1","_nodeVersion":"14.17.5","_npmVersion":"lerna/4.0.0/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-PiYXA3swuRI55pdt+vgVVOQzoosaph5+baqOWdrfKiX3UodoER0H+FkHllnTEv5IdBPKryCKy6ZTjdAZ6OR5zQ==","shasum":"a6418ec4b90821c15ff63ee13930070dbda5fdc1","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.11.1.tgz","fileCount":12,"unpackedSize":26453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJl4ACRA9TVsSAnZWagAA4vsP/3B0PqRasE1ZAZLKwnQQ\n6aAOX4u+eTEmTZhbXczzJkJAUXdo9EgGVn3XAKcQuLhv+hIJraOF4dC1qHsm\nKvH7fwgeaLOnLdjG5hBI2fJ6oXbhXgcovtn+AWVtBZFGLo+sMysQX3Dnvvsu\ng4TadOQdGGYeE74WK9sRyUCo2wZ1yXvXibAwo4x+eRGTysLTZI15wVozhCS0\nbC4stjgtGxTajl0Jh8Vc1NQj+LCTK63YrpZKAaTYf5pSf9mhp9ir+CV7au3c\nVlzvhSFSezQbZN0qFxQCtV/0norl6Bb4EgwAbyhnmkeF/ACXgxIhJLES+mLf\nw2hOl9S//8HJrqaIiuvX6Ji+kfPPrE24YPZxXtkZDpfzJu7fFT1YQySfcwV8\npL2lN7V0ltpsTorzACO7JTOIK1zbYvIN35GS+we63ifNOzWb0LZwjv5bx2GK\nv0RRSurKHOY4EI5EBTiPGrt3cWzaiWFHwYSx6dr0r4fV6FHw/LC/JhfX8+Q1\nQWtwUgBiWzCMnH+7bY32C/UD/Tyf1C26K+gyGh/e6pZCxgOIZa8aR0T9MJao\nlsUaa3nLcMdf83XYQRVyxC7xq/dQ77nhLbJQmiS2stAZvpUOefTul8pJWug4\nUJ1VcIkTCf5Xw9yyVAuKG7yQ120N13s1QWozaVQ96DK9xb75/ZByjEzEdWaD\na8Ao\r\n=gifp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGrSKrqq9tsZNVMkj6EA6rMyIJpnlYlTOtPE+fryWNYSAiB83Rf8X6jsq/JbWIyHTHBfrI5SY1JNwCwKd/a1AgIVNg=="}],"size":6466,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.11.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.11.1_1629904384261_0.25673760637065124"},"_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":1629904384398,"_cnpm_publish_time":1629904384398,"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"}}