-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pull out MDX to be opt-in #2288
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit cd66918:
|
β¦X v2 types conflict
Please use Themed.div instead. Those two were always the same.
d48f566
to
6389148
Compare
@hasparus I want to try this out but it doesn't seem like this was published on npm? The |
Thanks! |
@hasparus I think this was still a bad publish if you look at https://unpkg.com/browse/theme-ui@0.15.0-develop.26/dist/theme-ui.cjs.js My unit tests + trying it out on a live site both fail with:
I can bring this into an issue if you want instead of commenting on this PR π |
@LekoArts I created the issue. I'm gonna go back to it on the weekend and test this version properly in my projects. |
@hasparus Cool! Don't feel rushed, it's not urgent on my end :) |
@LekoArts I just published |
@hasparus Thanks! Also all working fine on my end LekoArts/gatsby-themes#989 |
π PR was released in |
Closes #2133.
This PR removes the peer dependency on @mdx-js/react from the main
theme-ui
package, and changes@theme-ui/mdx
to work with any version of@mdx-js/react
or a compatible library.We have 2 reasons to do this.
@mdx-js
packages are now ESM-only, so Theme UI is locked on a previous major, what leads to multiple annoying problems.Although Theme UI might eventually become ESM-only, this PR seems to me like a good move because of the first reason I mentioned.
All credits to johno for the idea.
What's left to do?
Release Notes
Breaking:
theme-ui
no longer includes@theme-ui/mdx
β MDX is now opt-in.If your project is not using MDX or importing
Themed
, you shouldn't need tochange anything.
MDXProvider
is no longer included in Theme UIThemeProvider
, and has beenremoved in favour of an
useThemedStylesWithMdx
hook.Migration: Use
useThemedStylesWithMdx
together withMDXProvider
anduseMDXComponents
from@mdx-js/react
.Themed
components dict and other exports from@theme-ui/mdx
are no longer reexported fromtheme-ui
.Migration: Import it from
@theme-ui/mdx
instead.Version
Published prerelease version:
v0.15.0-develop.23
Changelog
π This release contains work from new contributors! π
Thanks for all your work!
β€οΈ Luke Watts (@thisislawatts)
β€οΈ Valto Savi (@pointlessrapunzel)
Release Notes
Pull out MDX to be opt-in (#2288)
Breaking:
theme-ui
no longer includes@theme-ui/mdx
β MDX is now opt-in.If your project is not using MDX or importing
Themed
, you shouldn't need tochange anything.
MDXProvider
is no longer included in Theme UIThemeProvider
, and has beenremoved in favour of an
useThemedStylesWithMdx
hook.Migration: Use
useThemedStylesWithMdx
together withMDXProvider
anduseMDXComponents
from@mdx-js/react
.Themed
components dict and other exports from@theme-ui/mdx
are no longer reexported fromtheme-ui
.Migration: Import it from
@theme-ui/mdx
instead.Remove @theme-ui/editor (#2292)
@theme-ui/editor
was removed. Use CSS GUI instead./customize
page in Theme UI docs has been removed. Use Components.ai Theme Builder or an alternative instead.Drop support for React 16 + 17 (#2215)
Theme UI 0.15.0 drops support for React 16 and React 17. Your use case may still work, but we don't guarantee it.
π Enhancement
π Bug Fix
π¨βπ» Minor changes
π Internal
Authors: 6