{"name":"@theme-ui/mdx","version":"0.14.2","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.2","@theme-ui/css":"0.14.2"},"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":"9ccec1e762ccb5dc72df0732d8b5eecfffea9761","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.2","_nodeVersion":"14.19.1","_npmVersion":"lerna/4.0.0/node@v14.19.1+x64 (linux)","dist":{"integrity":"sha512-vvy4mSIjO+xqSpkAD7/nRobaNPwOU2BsSmMMvf/TuUljFh4yqZZWNGld5O2dr1GmBjibtTSH7Xpl7XYE3HO4Tw==","shasum":"992d73137abfa40939d722b44c37ed3e390f34bc","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.14.2.tgz","fileCount":12,"unpackedSize":24842,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDw8tTZPHVrSGV3IGu+GTTEw0csL04if66p/yrLcLdNVwIhAN+a72Mki6oAZiQIr+SR6DIE7MOg2QrvYcYhPudA7lTO"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRgHxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3TQ/+PSRmamqTfxp2Jwhh5cFgXDiL+1gerxBS8mwZYKw46c3kRkId\r\nOD/3ak3vS78WnQTyssLyN6hnie8Xg71EkCZKUcY9jYaxqkE98zk1gmtGqmld\r\nLchk1hjQFLmAuaVhznUu0062wMF0T4RKIf7Yt3ONgiCqQtqCidBXcEqoGuZl\r\nSeqACkCRDKMMSsKBM0UQzMO99IhsBOOHd00JkMOK5bvVxsCU75S6XMg0Atfz\r\ndYEnTo0KTt1d5reHZs4rEOVU31qGN0YGMKa9aXmHTxVsC4A+3RGOs4pzEZcH\r\nFfjQwm35tkNVSCrC3IykAQpESWFrZqReJTIY5j40XuYI42ovaHLNok7uwmcr\r\nR6kg/FLJv4r6yfwBVkOi3858KXiAOS2XSKNUJN9xAGGrZqw59gJ5qqDbfnOs\r\nlC2sEj4StZ8lABUub3kbX2SsdXXl8KmeOVML7gTTAKLuSlSnGlZvUab/muxS\r\nIrnr6V+4vqOZxhYqads7DYOoS/zMOEHl5QijV2d74eGi/oU739PQA8PQV6Fu\r\nf4Va7nNNH6lLJ0PeXYn18orS6TM8F9+YcDTvTXo+1TxzPzxLsFePlp28OMLa\r\nvljpP8tnk5erojVaxiXkOl5+yfM8fwHjKksnvBwo7jc+ZlE5M22r0rTqmXpq\r\nVu+0OuO/qgl/R/OGxhRtEfDWaKcD4Z13KBQ=\r\n=hlR8\r\n-----END PGP SIGNATURE-----\r\n","size":6210,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.14.2.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.2_1648755184826_0.49170318679099134"},"_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":1648755185065,"_cnpm_publish_time":1648755185065,"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"}}