{"name":"@theme-ui/mdx","version":"0.4.0-rc.13","source":"src/index.ts","main":"dist/index.js","module":"dist/index.esm.js","types":"dist/index.d.ts","sideEffects":false,"scripts":{"prepare":"microbundle --no-compress --tsconfig tsconfig.json","watch":"microbundle watch --no-compress --tsconfig tsconfig.json","typecheck":"tsc --noEmit"},"dependencies":{"@emotion/core":"^10.0.0","@emotion/styled":"^10.0.0","@mdx-js/react":"^1.0.0"},"devDependencies":{"@theme-ui/core":"^0.4.0-rc.13","@theme-ui/css":"^0.4.0-rc.13"},"peerDependencies":{"react":"^16.11.0"},"author":{"name":"Brent Jackson"},"repository":{"type":"git","url":"git+https://github.com/system-ui/theme-ui.git"},"license":"MIT","publishConfig":{"access":"public"},"gitHead":"77155d2d7615ea50bec8e206625ad0b33d618de0","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.4.0-rc.13","_nodeVersion":"14.10.1","_npmVersion":"lerna/3.22.1/node@v14.10.1+x64 (linux)","_npmUser":{"name":"hasparus","email":"hasparus@gmail.com"},"dist":{"integrity":"sha512-ZESUQzOkAF9MXVRX0zQYdqfb0j8+K/KWHv+LJIGFgWXJmfhj+vmKn4CL630jT9jALpkMKXN08QD9mw3/vGlT6A==","shasum":"748eb2958280c4c63ebbf7157f16bbf1ef5a3025","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.4.0-rc.13.tgz","fileCount":15,"unpackedSize":183206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuArFCRA9TVsSAnZWagAA++AP/1iYXW1JUw4IzA9l8UxC\nndhQyZTlhN5DZ+8AGR+9w9U2qKltdeK2DV8NeIxHpqq2s6+XLumGgmg1uXzk\nuesx/z+5JJM7AetIwERi0iDabFCI8Xud+wIazengHWWFP8r5/zhb7T4Flmmf\njyolaKkjuGz/H3wkbZMOnviJvBiewNORJuLmLqGCSLgmReMIWtWjqcmJchlT\nSgwRmhsD9b7pLDK/+P44i8gGYGSG42dTOlT/OUE9Q+mLtL8gA4AzCQAA84ol\n8BcFy6UgGDqVjX2CWS8XSfZ7FbdO9Vyo4Iocwu9QGIu0d6hlGVCPzv93BViy\nBno4+wX27H9qzEj0M9YCMpy5mCqklmAHNHsuj0w5xZyrXYPAM1ZZ1KZB41OS\nHogqNsULmRdLrzNunmqqKcVQKnJtto1thP0YDWmvztZiICrYbjmVNxBo8G1w\n4jLo4Jn0Eg8W6DEskNffyNg6SOxMFCekl2t6l5flLUEonf4YjgcggzTZ8Gb3\nYhJDLtgs6eH0l6bht7arON3xtG1e+OnUjl5Dtkdy7LSUXOnmenXWycWMQz+B\nK+3wer+m1mE+al8vpVkp0O3n26svL7vSAlPTNUPueznCU0M26tm4mHMSPve8\nAQk0nOJhfrLsWTw0x6FkZXUNiEOwQI8EaqePi/2IPzJUw6HtKDiOr/HA7EZj\nbkY9\r\n=DSl9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEyTeZa8ZEkP1HiGX0jzwENLOz1eHRigzzlzhAll1h5sAiB9dplVQ3Tcv/flqBwGsKxaczBu/yjeABUxYxHyAKTMCQ=="}],"size":19176,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.4.0-rc.13.tgz"},"directories":{},"maintainers":[{"name":"hasparus","email":"hasparus@gmail.com"},{"name":"johno","email":"johnotander@gmail.com"},{"name":"jxnblk","email":"jxnblk@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdx_0.4.0-rc.13_1605896901358_0.8197521011110092"},"_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":1605896901471,"_cnpm_publish_time":1605896901471,"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"}}