{"name":"@theme-ui/mdx","version":"0.6.0","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/react":"^11.1.1","@emotion/styled":"^11.0.0","@mdx-js/react":"^1.6.22","@theme-ui/core":"^0.6.0","@theme-ui/css":"^0.6.0"},"devDependencies":{"react":"^17.0.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0"},"author":{"name":"Brent Jackson"},"repository":{"type":"git","url":"git+https://github.com/system-ui/theme-ui.git"},"license":"MIT","publishConfig":{"access":"public"},"gitHead":"6f37cdd3e911b25aceb091af9ae313825d5a4bc0","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.6.0","_nodeVersion":"14.15.3","_npmVersion":"lerna/3.22.1/node@v14.15.3+x64 (linux)","dist":{"integrity":"sha512-1XJzCLRleu8/Pi0+mM4cPqhV+lYyLWipaYCmiO4vXJxzT20Ux3Hm3PvS8hbHiQEXrB+FkNzNbWQwIoLTs2S8dQ==","shasum":"cce422fb4c13ab45f3b39216726bb0e407e1d82e","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.6.0.tgz","fileCount":15,"unpackedSize":65161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWB+fCRA9TVsSAnZWagAAL90QAJexu2fFvagPYswtqIO4\nfuZE6rcq/FsAtie+Qny/9XS1YJLlLlLRTksJPiklmsG+5dnX37oIvny7JRc/\ndkiKezCkRDPTD/oHa+4ytaU73kpYh0KeJeeMtvVGPk2OPKv46uH25+aI/q1P\nLAqEMSxKaB+3UhvyJcHu4aX70Oxt2jbUeIFCDbxA/34UL2Qg6m9+9fJlmKjD\n67cCkzc3EBvDEqG3sHGfmTM+ELSrRPOWfByNloiSEE75L6m1BcWYki2mRZU1\nAhHQV9EEy2JtQVgBhAiZIguLU7V9x/qAISC+5BicYSGBN4lnt/mDd3AzyH7g\nvJsLfdS2X5Os1H+/B9dy2doSEYNT+0Prg0Kz55O2DTbi/qmF9+nJ71uBEGhC\n3RS9dVgFBlBiqZ6vjeRkIDmxEYPrqh6otcRP49H2RD+B1/FoQN5IaJZhfeCh\nqcKBPBfqacqGUD/En0+yYawa3cqXuIafKCf3DmHc7hVIQYRQ/Qb29CbG+T1M\nFnAqyQYY+f/X6Xs7Rk7lij88qPYFRtO7vUY3C46yK2OkXl/qupWSOOKPke/c\nQP598Y5iM6+sVa1pXvqfT2RxsOS3QkddqKtDva2ZciSY3VUMlNd64fiKwE3/\nVPmQg1B8sbqz+R6ngy4tx8aAKF4PcurIVsVFojFdMJJzFpCtopKtFy3fpgEv\nVy4/\r\n=Nr77\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIve07BZm6uNAX59le4IRx62QDtAehWEB59QmgPebqSgIhAKqU0L2QRPxrfdLp0oGHBLF3zIJxRgjuGDHCqbDvGLkq"}],"size":10118,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.6.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.6.0_1616387999376_0.4777724923922322"},"_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":1616387999584,"_cnpm_publish_time":1616387999584,"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"}}