Skip to content

v2.5.8 β€” MDX Plugin Hotfix & Source Editor Standardization

Latest

Choose a tag to compare

@tienledigital tienledigital released this 30 Jul 11:02
· 8 commits to main since this release
c6a3193

What's Changed

πŸ› Bug Fix: MDX Plugin Invalid Hook Call

  • Root cause: registry.ts called MdxEditorSlot() as a regular function to detect null mock components, triggering React hooks outside render context β†’ Invalid hook call error.
  • Fix: Replaced isNullMock invocation with simple !component falsy check.

πŸ”§ Vite Config Cleanup

  • Removed ssr.noExternal (crashed CJS React in ESM SSR context)
  • Removed resolve.alias for react/react-dom (caused dual React instances)
  • Added @mdxeditor/editor > react to optimizeDeps.include for proper deduplication

✨ UX Improvements

  • Renamed Native Editor β†’ Source Editor across all UI surfaces
  • Renamed Markdown Editor tab β†’ Source for consistent naming
  • Simplified MdxSlot.tsx: replaced custom CustomImageButton with native InsertImage
  • 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)
  • PostList sort 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