feat: 完善导出设置与打印预览

This commit is contained in:
SkyJourney
2026-07-26 01:36:51 +08:00
parent ec14f7970a
commit 52cf816683
20 changed files with 1552 additions and 146 deletions
+25
View File
@@ -0,0 +1,25 @@
import type { MermaidConfig } from "mermaid";
export const MERMAID_SECURE_CONFIG_KEYS = [
"secure",
"securityLevel",
"startOnLoad",
"maxTextSize",
"maxEdges",
"suppressErrorRendering",
"themeCSS"
];
export function createMermaidSiteConfig(): MermaidConfig {
return {
startOnLoad: false,
securityLevel: "strict",
theme: "default",
look: "classic",
fontFamily: "Segoe UI, Microsoft YaHei, sans-serif",
maxTextSize: 50_000,
maxEdges: 500,
suppressErrorRendering: true,
secure: [...MERMAID_SECURE_CONFIG_KEYS]
};
}