-
-
Notifications
You must be signed in to change notification settings - Fork 197
Description
First of all, love the package and I think it fills a gap in the ecosystem.
I'm creating this issue to discuss and get alignment on a possible future refactor that would allow this package to be even more useful.
After #697 the package already allows to replace all UI elements and use your own, which is great for uses when the look and feel is meant to come from an external component/design system. The only problem is that right now the bundle still includes some UI components, so they are added to the application's final bundle size even if they're not needed.
What do you think about separating the package like this:
@uiwjs/react-md-editor/core: exports all headless tools and utilities, allowing the user the build a fully custom UI with them
Exports:
- commands
- utils
- types
- components/TextArea/shortcuts
- components/TextArea/handleKeyDown
- Context
@uiwjs/react-md-editor/ui: ready-made React components, allowing the user to quickly integrate an existing editor into their application
Exports:
- Editor
Bundles LESS styles
Uses the core package internally
Alternatively, they could be separate packages, published separately.
I may be forgetting an import here or there, but I hope this describes the idea.
Do you have any questions, concerns, thoughts on this? Maybe we could agree on a final scope and take this into consideration for the next major version?