{"name":"@theme-ui/mdx","version":"0.4.0-rc.12","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.12","@theme-ui/css":"^0.4.0-rc.11"},"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":"3ed98e25cb915f0f6d55c64ac8c5026ef81e074f","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.12","_nodeVersion":"14.10.1","_npmVersion":"lerna/3.22.1/node@v14.10.1+x64 (linux)","dist":{"integrity":"sha512-5/rggVxCF5XK/0wIndkw5squaHzXbAlCzrl4jGTdYecGi2zSX0OuLNkYslAYBuYsWkXeLLfnCi2SMypO5RwQ5w==","shasum":"5a555a22023fe6d894368fbc75d633515c24ea55","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.4.0-rc.12.tgz","fileCount":15,"unpackedSize":182795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftS7cCRA9TVsSAnZWagAA8PsP/3lNAO7rWsb59A6NrPv3\nzZm80HX+eLWKi1yWk8E2i1PCn7LGATip26wCgIwDkOf/TVN83IPhF3UgGP5d\nOSMxWJDcqFYNIpSaTFzUZFxFDHXKcHGNBOEacRGMnPNr0cdpk5dE2oFuunO2\niaSUsCGv02+1U87aJmZKmbMrJWW7raOe+eCJaG/eDsoUAj4mLDwjfjNOPG3Z\nCtnuhr8A6Lk9yyhNJiap1wyK2XNSopI02j7T3Mn3Sth8JLXVcTYlC/6d1ktS\nYs/9WT0fp7b+fb8GpekBvL4SX9TeVBmA8+h57SKVT7j1ZZAgidUZ2zi89yWA\n+hRt3ZY+6NRY6m9LZaj3nuhWum7wjEWUTcB0LogbG3GKG/Ve7oHaszn1cJHi\nUfG9bsRqiNmcXdNNQ0tMk3tGZrV6dycux1crMzln/iSS4kKcKdKNjVqmeSRD\nDhQlnX/6y1wcIBCbxuSXFSZYMfsI0/b296PnYP2/H2m3RQ+BycUuC5JJdGcJ\n0CXAbufUmQCcA/ruegZTENXqcL9oMZTJOORw/7GUnhc6W3uz6aUqvHOxGNlj\nGT7phY+R9AJknq/ZBPCJPrGZl/OPfACapeIRLoxs/eUUWv36/YJ3zl9qnf7a\niUrXdJMbCUAnztH4+zdZaVOq60oCgzmjpzNYuUEXZZI7to9IY2QoNBdNKr0/\n/ZaL\r\n=EVIJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEBV8GwV8+kPHTtzAttWxT1Q4OP6UtAfJ20FiZDBWc/iAiBw0cUcP1Uy4QNnnbjy60Hp5XX8LKYzYfDjnyABptdDGg=="}],"size":19088,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.4.0-rc.12.tgz"},"_npmUser":{"name":"hasparus","email":"hasparus@gmail.com"},"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.12_1605709531724_0.5030312215853667"},"_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":1605709531852,"_cnpm_publish_time":1605709531852,"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"}}