Frontmatter
| id | 8756 |
| title | Refactor Mermaid Theming to use YAML Frontmatter Injection |
| state | Closed |
| labels | airefactoringarchitectureperformance |
| assignees | tobiu |
| createdAt | Jan 17, 2026, 11:49 AM |
| updatedAt | Jan 17, 2026, 12:03 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8756 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 17, 2026, 12:03 PM |
Refactor Mermaid Theming to use YAML Frontmatter Injection
tobiu assigned to @tobiu on Jan 17, 2026, 11:51 AM

tobiu
Jan 17, 2026, 11:57 AM
Input from Gemini 3 Pro:
✦ I have refined the
Neo.component.wrapper.Mermaidimplementation based on the code review.Refinement:
- Moved the
mermaidThemeproperty from a class field to thestatic configblock.- Why: This allows the
mermaidThemedefault value to be overridden globally viaNeo.overwrites, consistent with the framework's configuration architecture.Status: The implementation is now complete, including dynamic theming, manual overrides, and correct architectural placement of configs.
tobiu closed this issue on Jan 17, 2026, 12:03 PM
Refactor the Mermaid integration to use diagram-specific YAML frontmatter configuration instead of global re-initialization.
Current State: The Main Thread Addon maintains a
currentThemestate and callsmermaid.initialize({ theme })whenever a diagram requests a different theme. This is global and affects all diagrams.New Architecture:
Wrapper Component (
Neo.component.wrapper.Mermaid):themeMap(Neo Theme -> Mermaid Theme).Main Thread Addon (
Neo.main.addon.Mermaid):themeMap,currentTheme,initialize).mermaid.render()with the code provided by the wrapper.Benefits: