{"name":"@theme-ui/mdx","version":"0.15.6-develop.0","source":"src/index.ts","main":"dist/theme-ui-mdx.cjs.js","module":"dist/theme-ui-mdx.esm.js","sideEffects":false,"dependencies":{"@theme-ui/core":"^0.15.6-develop.0","@theme-ui/css":"^0.15.6-develop.0"},"peerDependencies":{"@emotion/react":"^11","react":">=18","@types/mdx":"^2.0.2"},"devDependencies":{"@mdx-js/mdx-v2":"npm:@mdx-js/mdx@^2.1.2","@mdx-js/react-v2":"npm:@mdx-js/react@^2.1.2","@types/mdx":"^2.0.2","react":"^18.1.0","remark-gfm":"^3.0.1","@babel/core":"^7","@types/react":"^18","@theme-ui/test-utils":"^0.15.6-develop.0"},"author":{"name":"Brent Jackson"},"repository":{"type":"git","url":"git+https://github.com/system-ui/theme-ui.git"},"license":"MIT","publishConfig":{"access":"public"},"gitHead":"621199460fa3bdb0100748441e62517b7529b8c8","scripts":{},"types":"./dist/theme-ui-mdx.cjs.d.ts","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 { ThemeProvider, 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    <ThemeProvider theme={theme}>\n      <MDXProvider components={componentsWithStyles}>{children}</MDXProvider>\n    </ThemeProvider>\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","readmeFilename":"README.md","description":"[MDX](https://mdxjs.com) utilities for [Theme UI](https://theme-ui.com)","bugs":{"url":"https://github.com/system-ui/theme-ui/issues"},"homepage":"https://github.com/system-ui/theme-ui#readme","_id":"@theme-ui/mdx@0.15.6-develop.0","_integrity":"sha512-fhzx50kw5HoiUhSZQKl3Z0guijCURB/o8ocwsOo9UsMEoPKqaIBEuj046rXo0jCLWJV3GOToiYcJRPmku/7uUA==","_resolved":"/tmp/fc6f322bf8361cc15c99f4d05e10429d/theme-ui-mdx-0.15.6-develop.0.tgz","_from":"file:theme-ui-mdx-0.15.6-develop.0.tgz","_nodeVersion":"18.14.1","_npmVersion":"9.3.1","dist":{"integrity":"sha512-fhzx50kw5HoiUhSZQKl3Z0guijCURB/o8ocwsOo9UsMEoPKqaIBEuj046rXo0jCLWJV3GOToiYcJRPmku/7uUA==","shasum":"0ebd6e4bc877e526cbcd48ff7a7cf605aee611c4","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.15.6-develop.0.tgz","fileCount":23,"unpackedSize":36416,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHByuIbi7sLTMC4MX/cL/ivJcJ4rboY1wP0c+vgqhkwhAiEA0+06PPuQ6kRDDqNfbfIlDrNsWWqWYDKBaEQq8FfhvRE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/V+cACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpSFA/+PvgVet6e36dkMZ/zfBMM5lVw8mdCxjjJuChIypEjVZ85p2bN\r\ngd5FJeszcqLsPOb/kAX0pEG8/oSEBmSd0bLGIcZ8QYal6CjqFZu+AjNv90A2\r\n5aJH8BCKMGkUCZ2jro65L9E9rus+RqqGyuyIFqCVyo+yJQ0cGlkgS42xioZw\r\na9YFLVnFYETbW7+8uehgrN2p5h4vbY7UgY6QrOjqnnVGy6m+nI8Zc2+73NtV\r\n3p6CPSrby/SmGgWqsdrrVme6eNvSmlh1wZqi+OUpx8ObERffiKQ2Bk+2i5so\r\nSaLJmvMuZx1caUc+GH/U9/XyD6UgCiyybzz1DjhJ0Pcy3tXeUBgG9D34UOCf\r\nW1sOMry+S/DcRR27K9CJXGRkAAvVwH486yLqTOGONo+NZNfSTirf9Q7TwJDB\r\no6jlm+cr19aEcMFKui1KBUWbT4GxvEp9e089KqCkSruJDgQ/G2x48RG5GOle\r\n0bo08zuyalIMq5mNWqDgW+dF1jatRzKAJSI/imXcILuSN6HaZCm+gcVb96NQ\r\niGHfk038lw7ZWZ5cFCW0WmGkwM5wyGazukkprO+J/5sMlA1LV94SvyTbcjVw\r\nj0baS251Na5HPHMSFC6DeoUljUOCPxod4FaQVtbQMOc7tNA393sSu3aLjxke\r\nF51374OohERnr+HaLstb9IrwYGd4VUNMWAQ=\r\n=BDfF\r\n-----END PGP SIGNATURE-----\r\n","size":9090,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.15.6-develop.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.15.6-develop.0_1677549468168_0.684971076393124"},"_hasShrinkwrap":false,"publish_time":1677549468350,"_cnpm_publish_time":1677549468350,"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"}}