{"name":"@theme-ui/mdx","version":"0.15.4-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.4-develop.0","@theme-ui/css":"^0.15.4-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.4-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.4-develop.0","_integrity":"sha512-EplYa2x7gROkMEDFkHZ3BIUc1RX5S+8hbi1Fib+AdskmY1DpaJePhxom4NrJenW6Zzr2jim/07/QGVgoTl/YAw==","_resolved":"/tmp/509138f903b13f651b34dbea2bafc262/theme-ui-mdx-0.15.4-develop.0.tgz","_from":"file:theme-ui-mdx-0.15.4-develop.0.tgz","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-EplYa2x7gROkMEDFkHZ3BIUc1RX5S+8hbi1Fib+AdskmY1DpaJePhxom4NrJenW6Zzr2jim/07/QGVgoTl/YAw==","shasum":"90e95a177905b6c9395339f7f8d922adbf6c7888","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.15.4-develop.0.tgz","fileCount":23,"unpackedSize":36416,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLyKcOJTWz09eKpwt6hDK1UQjxVlmgWJg3V/3puMa5fwIgdElTZspwi1Yb+9DWkADMn2L6A97HHzJefjAPSitu2bo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjaf/bACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqRug/8CMhL27lCkY+LUUhVyNhDV4L0KA/39Y5ducXlh69nbTHCJZEj\r\n7rSisIigS0JAzyHJVgu17a3KlLGTyABPhyzuUweZD1XlWXKo9jAIm4jX+QL3\r\nbtKiaTVPey+iqGigcJKKUonI5uCHcsGxNqH6YOxGoNXPyp54YUIFtwvRlmln\r\nMV7T28u4w6XtdrnXs+A0YKujwN9zy/p8lYWmbSxKXFvnyoF8B7iQvFTafi0f\r\njmPuursOLoCcLGT2+Aq/ZeQrhPzVwjTZucx6CFEtHWtdZxmn6rRmZi1FN9y1\r\n2o6OuSkmA01jj+GqbSlvQ7qXJ+xU01Wpm0CQlLu1p3JLDecMI0kT0ReD3JxC\r\ns2KzFlpL/+UaKWKikcY+wIT7NbkvWyqt4EsWbyRm4qY1R0bods4T+ZLTebzk\r\nUz4JTyXBfBAcPbUWCq6cScFw0Aj0f7hfbMs+RKGHe8/4NX21kod7OhM8u+So\r\n9MCgWyMi1jyAgF4/iagkBbOaDNmLo0z+dxpfsuFowIpWVMm4bhVwUIJuDnt+\r\n3rmcb+NfZ+Rg5TSpQpcyM1C8YnnSWUT1b/d9xdeH8X1/l22MLtgZElTDjmVP\r\nhwJGKgQ0F/aD8I8A1QHbtl+RzApe8ufeYMgAjwYJBc3faCJvTkqHORMAVg2b\r\n48AS1XpLLmia4x/xHlxcv7gjQQweMOwDhnc=\r\n=mf4O\r\n-----END PGP SIGNATURE-----\r\n","size":9090,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.15.4-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.4-develop.0_1667891163425_0.2890317066398831"},"_hasShrinkwrap":false,"publish_time":1667891163578,"_cnpm_publish_time":1667891163578,"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"}}