Repository navigation
feat(slides): add MDX support for JSX-powered slides - #3
Merged
Merged
Conversation
Runtime MDX compilation via @mdx-js/mdx with two-layer caching (processor + output). MDX slides render JSX with inline styles alongside standard markdown. Graceful fallback to plain markdown on compilation errors. Missing components render as nothing via recma-mdx-escape-missing-components. Key changes: - MdxRenderer with compile/run/cache/error-boundary pipeline - ContentRenderer wrapper routes isMdx to MdxRenderer - isMdx flag set during slide loading from .mdx extension - WYSIWYG disabled for MDX slides (TipTap can't handle JSX) - Auto sub-slide splitting disabled for MDX - Format chooser (md/mdx) in slide navigator - MDX-aware PDF and HTML SPA export - Example MDX slide in hello-world deck EXPERIMENTAL: Visual mode editing and stability under active work.
Content file writes (slides, yaml, mdx) during save-on-blur triggered Vite's file watcher, causing a full page navigation back to HomeScreen. Two fixes: - Skip save on editor blur when there are no unsaved changes - Add chokidar function filter to ignore non-source file changes (glob patterns are unreliable per chokidar known issues) Also adds global error/rejection handlers and debug logging for save pipeline and store reset to aid future debugging.
The format chooser dropdown (md/mdx) was clipped by overflow-hidden parents. Switch to fixed positioning using button bounding rect so the menu floats above all content at z-[9999].
- Added support for specifying slide file format (md/mdx) in the create and edit slide functions. - Updated the add_slide tool description to reflect support for both Markdown and MDX formats. - Implemented file renaming logic in editSlide to convert between formats as needed. - Enhanced MdxRenderer to handle inline styles by converting them to JSX style objects during rendering. These changes improve the flexibility and functionality of slide management and rendering, particularly for MDX content.
…orts - Updated MdxRenderer to implement a caching mechanism for the MDX processor and runtime imports, improving performance by reducing redundant imports. - Introduced a new function to handle runtime and cached imports, streamlining the compilation process. - Replaced the previous cache key generation method with a simple string hash for better efficiency. - Removed inline style handling logic, relying on the updated runtime for JSX style conversion. These changes enhance the efficiency and maintainability of the MDX rendering process.
Strip console.log/warn/trace statements added during MDX debugging from SlidePanel and presentation-store. Retains only the existing error-level log in the saveSlideContent catch block.
rikkarth
requested review from
DiogoAntunesOliveira and
ruimachado-orbit
as code owners
March 21, 2026 22:39
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…est cases - Added Vitest as a testing framework to enhance testing capabilities across the project. - Created configuration files for Vitest in both the root and mcp-server packages. - Implemented initial test cases for various utilities and components, ensuring functionality and reliability. - Updated package.json scripts to include test commands for running and watching tests. These changes establish a robust testing foundation, improving code quality and maintainability.
pedro-ferreira-orbit
approved these changes
Mar 21, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@mdx-js/mdxwith two-layer caching (processor + output)..mdxslides render JSX with inline styles alongside standard markdown.recma-mdx-escape-missing-components; React error boundary catches render-time crashes..mdto.mdx. Existing markdown slides work unchanged.hasUnsavedChangesguard + chokidar function filter.New files
MdxRenderer.tsx— compile/run/cache/error-boundary pipelineContentRenderer.tsx— routesisMdxto MdxRenderer or SlideRendererslide-utils.ts— sharedresolveImageSrc()06-mdx.mdx,07-lecta-overview.mdx— example MDX slidesModified (key changes)
LoadedSlide.isMdxflag set from.mdxextension during loadSlideRendererconsumer sites →ContentRendereruseSubSlidesskips splitting for MDXSlidePanelvisual mode shows rendered canvas for MDXformatparam for slide creationTest plan
.mdslides render identically to before<UnknownComponent />in MDX — renders as nothing, no crash.mdslide without edits — no page reload