Commit 4a1c7a0
authored
chore:codeBlock mermaid (#16)
* feat: add SyntaxMermaid and SyntaxCodeBlock components with enhanced props and methods
- Introduced SyntaxMermaid component for rendering Mermaid charts with zoom, fullscreen, and download functionalities.
- Added SyntaxCodeBlock component for syntax highlighting using Shiki, supporting light and dark themes.
- Enhanced Mermaid types with detailed props and expose methods for better integration.
- Removed unused codeXSlots from useComponents hook.
- Updated SVG selection logic in useMermaidZoom for improved accuracy.
* feat: enhance Markdown rendering with customizable code block and mermaid actions
- Refactored MarkdownRender component to include new props for code block actions and mermaid actions.
- Updated CodeBlock component to support custom action buttons with dynamic rendering.
- Introduced Mermaid component enhancements to allow custom action buttons and improved slot handling.
- Simplified toolbar configuration by removing unnecessary properties and integrating action button logic.
- Added TypeScript definitions for new action configurations in CodeBlock and Mermaid components.
- Improved overall structure and readability of the codebase.1 parent 10f7fcc commit 4a1c7a0
File tree
16 files changed
+2465
-1204
lines changed- packages
- playground
- src
- x-markdown/src
- MarkdownRender
- components
- CodeBlock
- CodeX
- Mermaid
- hooks
16 files changed
+2465
-1204
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
0 commit comments