LearnNewsExamplesServices
Frontmatter
id8377
titleCreate Mermaid Component Wrapper
stateClosed
labels
enhancementfeature
assigneestobiu
createdAtJan 7, 2026, 1:10 PM
updatedAtJan 7, 2026, 1:20 PM
githubUrlhttps://github.com/neomjs/neo/issues/8377
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 7, 2026, 1:20 PM

Create Mermaid Component Wrapper

Closed v11.19.0 enhancementfeature
tobiu
tobiu commented on Jan 7, 2026, 1:10 PM

To facilitate the usage of Mermaid diagrams in Neo.mjs applications, we should create a wrapper component Neo.component.wrapper.Mermaid.

Rationale:

  • Simplified API: Developers can use a declarative component with a value or code config instead of manually interacting with the Main thread addon.
  • Lifecycle Management: The component will automatically handle mounting, updates, and destruction.
  • Consistency: Aligns with existing wrappers like AmChart.

Implementation Details:

  • Class: Neo.component.wrapper.Mermaid
  • Extends: Neo.component.Base
  • Configs: value (reactive) - the mermaid code.
  • Logic:
    • On mount, ensure the Mermaid addon is loaded.
    • Render the diagram using the addon.
    • React to value changes by re-rendering.
    • Handle windowId propagation.
tobiu added the enhancement label on Jan 7, 2026, 1:10 PM
tobiu added the feature label on Jan 7, 2026, 1:10 PM
tobiu assigned to @tobiu on Jan 7, 2026, 1:19 PM
tobiu closed this issue on Jan 7, 2026, 1:20 PM
jonnyamsp referenced in commit 50d1966 - "feat: Create Mermaid wrapper component on Jan 7, 2026, 2:25 PM