feat(frontend): schema-linking viewer (mermaid+table) + markdown view

TDD: SchemaLinkingViewer with mocked renderMermaid, toggle flowchart↔table,
≤45 element cap with Italian notice. MarkdownView renders mermaid fences.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-28 12:43:11 +02:00
co-authored by Claude Sonnet 4.6
parent f933b544ff
commit 2a23de6825
6 changed files with 2825 additions and 10 deletions
+12
View File
@@ -0,0 +1,12 @@
let _initialized = false;
export async function renderMermaid(def: string): Promise<string> {
const mermaid = (await import("mermaid")).default;
if (!_initialized) {
mermaid.initialize({ startOnLoad: false, theme: "default" });
_initialized = true;
}
const id = `mermaid-${Math.random().toString(36).slice(2)}`;
const { svg } = await mermaid.render(id, def);
return svg;
}