What's Changed
π Bug Fix: MDX Plugin Invalid Hook Call
- Root cause:
registry.tscalledMdxEditorSlot()as a regular function to detect null mock components, triggering React hooks outside render context βInvalid hook callerror. - Fix: Replaced
isNullMockinvocation with simple!componentfalsy check.
π§ Vite Config Cleanup
- Removed
ssr.noExternal(crashed CJS React in ESM SSR context) - Removed
resolve.aliasforreact/react-dom(caused dual React instances) - Added
@mdxeditor/editor > reacttooptimizeDeps.includefor proper deduplication
β¨ UX Improvements
- Renamed
Native EditorβSource Editoracross all UI surfaces - Renamed
Markdown Editortab βSourcefor consistent naming - Simplified
MdxSlot.tsx: replaced customCustomImageButtonwith nativeInsertImage - 2-Tab mode (no plugin):
Source+Preview - 3-Tab mode (with plugin):
Edit+Source+Preview
π¦ Also Includes (from v2.5.7)
- Zero-Plugin Native Fallback (
NativePlainEditor) - Safe Props Protection (React Error #306 fix)
PostListsort key deduplication- Monorepo version sync scripts
Verification
- β Vitest: 14/14 files, 113/113 tests passed
- β TypeScript: 0 errors
- β Version sync: 4/4 targets aligned
- β Spec updated to v1.4.0
Full Changelog: v2.5.6...v2.5.8