{"name":"@theme-ui/mdx","version":"0.6.2","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.2","@theme-ui/css":"^0.6.2"},"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":"f25b73f7e9aa919b02fb5d23231cf7d7d739fd88","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.2","_nodeVersion":"14.15.3","_npmVersion":"lerna/3.22.1/node@v14.15.3+x64 (linux)","dist":{"integrity":"sha512-4SqyN73AVef+GzdDaGhnl2eKCtEJewP+K5SbeIY0guIzH97upIEw7Ov3kwOdZ5tvnr72EP7LjX13UaGkcMEAmg==","shasum":"0249b19fa4865c60eb4a3d9e5108a9d6b68a6251","tarball":"http://registry-npm.ywwl.com/@theme-ui/mdx/download/@theme-ui/mdx-0.6.2.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\nwsFcBAEBCAAQBQJga29RCRA9TVsSAnZWagAAdM0P/10WF/z5QPc6tFILvXyQ\njw5tb6C2GC3sWQiaVNzHv2bqHXBADeru7iAsDh+Izvy4ZHDr45NU9fuiI+eD\nQAdz2Dib+RzFxfFWdod7cI8gTb0NzBuYwFurItbTg5mXA0whbyYjHaDVKJP7\nHtgg9yKj1iMKcqNrbRJcEjmoTI3c6lOQcoJoq6epJr6igh0TIxxU4LligsZO\n1FBWLfVMd4mOI969tTiocAJYbJNe1saRRAaR7jlw8UGkNhBWGkyrSwA8Lsd7\nSIwncjpdlk5TBSkcITPVx1AzPdqYGsFeLWSCic93Gl4NG/azLYVzQcxgxT4Z\njN2nU4O0Lj0IerUJR61AsTao1V8rJv522fD+/IilF42zkHPCvhXwuQ4PU9qr\n22UhMjWA8WMvnsPXb5SrHzS2bp1vuLpVLWW9dBM1nUG7hS38xJgg2rEzLbM+\nHirYGGv7rLbn23h4n6lGy8q3PRslxcXEM62Bo4Q/OZy0GQwnA4cRb9QFzU5x\npdxCAIlVtTRhgz3+8Z8p+gvtH6APKURSDFhNV8Adt1/E68Lgh6z2HVw0gSFG\nqZSVKebU2bTCLpeU8AlufkRFMqNab8IFcrBXj8S1DXDKO23yPUopIyFk5Blf\n5wZCzh1OqZlXqSeM6E4jX7h84XRPiB4iwatLYWt0zkDa/OPXw9i5ahvv38/i\nILGv\r\n=lTiJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIClt4H976awF+xQllaDbizqqzMtoZhXRFCh7b0HwCDNdAiEAgNTX0/k3/Q1Dcnag53cSTcHGhwma0svsir1M7jEO+T0="}],"size":10118,"noattachment":false,"key":"/@theme-ui/mdx/-/@theme-ui/mdx-0.6.2.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.2_1617653583987_0.16972781508714685"},"_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":1617653584765,"_cnpm_publish_time":1617653584765,"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"}}