feat(webui): render Mermaid diagrams with Pele (#6302)

* feat(webui): render Mermaid diagrams with Pele

* fix(webui): reserve diagram replacement capacity

* fix(webui): prebundle lazy diagram worker dependencies

* fix(webui): account diagram capacity by encoded size

* fix(webui): use shared hover hints for diagram actions

* docs(webui): focus diagram guide on usage
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-19 17:16:20 +08:00
1 parent 0f3b47bc3a
commit f57018aa7f
40 files changed
+2335 -1458

No files matched your search

+19
View File
@@ -2410,6 +2410,25 @@
"dismiss": "Dismiss",
"continue": "Continue"
},
"diagram": {
"graph": "Diagram",
"source": "Source",
"copy": "Copy source",
"enlarge": "Enlarge diagram",
"title": "Mermaid diagram",
"preparing": "Preparing diagram…",
"errors": {
"syntax": "Check the diagram syntax in the source.",
"unsupported": "This diagram type is not supported. View the source.",
"policy": "This diagram uses unsupported styling or resources. View the source.",
"limit": "This diagram exceeds the rendering limit. View the source.",
"load": "Couldn't load the diagram renderer. Try again.",
"deadline": "The diagram took too long to render. Simplify the source or try again.",
"worker": "Couldn't render the diagram. Try again.",
"image": "Couldn't display the diagram. Try again.",
"capability": "Diagram rendering is unavailable in this browser. View the source."
}
},
"lightbox": {
"viewAll": "View all {{count}} images",
"zoomIn": "Zoom in",
+19
View File
@@ -2211,6 +2211,25 @@
"dismiss": "Descartar",
"continue": "Continuar"
},
"diagram": {
"graph": "Diagrama",
"source": "Código fuente",
"copy": "Copiar código fuente",
"enlarge": "Ampliar diagrama",
"title": "Diagrama Mermaid",
"preparing": "Preparando diagrama…",
"errors": {
"syntax": "Comprueba la sintaxis del diagrama en el código fuente.",
"unsupported": "Este tipo de diagrama no es compatible. Consulta el código fuente.",
"policy": "El diagrama usa estilos o recursos no compatibles. Consulta el código fuente.",
"limit": "El diagrama supera el límite de renderizado. Consulta el código fuente.",
"load": "No se pudo cargar el motor de diagramas. Inténtalo de nuevo.",
"deadline": "El renderizado tardó demasiado. Simplifica el código fuente o inténtalo de nuevo.",
"worker": "No se pudo generar el diagrama. Inténtalo de nuevo.",
"image": "No se pudo mostrar el diagrama. Inténtalo de nuevo.",
"capability": "Este navegador no puede generar diagramas. Consulta el código fuente."
}
},
"lightbox": {
"viewAll": "Ver las {{count}} imágenes",
"zoomIn": "Acercar",
+19
View File
@@ -2210,6 +2210,25 @@
"dismiss": "Ignorer",
"continue": "Continuer"
},
"diagram": {
"graph": "Diagramme",
"source": "Source",
"copy": "Copier la source",
"enlarge": "Agrandir le diagramme",
"title": "Diagramme Mermaid",
"preparing": "Préparation du diagramme…",
"errors": {
"syntax": "Vérifiez la syntaxe du diagramme dans la source.",
"unsupported": "Ce type de diagramme n'est pas pris en charge. Consultez la source.",
"policy": "Ce diagramme utilise des styles ou ressources non pris en charge. Consultez la source.",
"limit": "Ce diagramme dépasse la limite de rendu. Consultez la source.",
"load": "Impossible de charger le moteur de diagrammes. Réessayez.",
"deadline": "Le rendu a pris trop de temps. Simplifiez la source ou réessayez.",
"worker": "Impossible de générer le diagramme. Réessayez.",
"image": "Impossible d'afficher le diagramme. Réessayez.",
"capability": "Ce navigateur ne peut pas générer le diagramme. Consultez la source."
}
},
"lightbox": {
"viewAll": "Voir les {{count}} images",
"zoomIn": "Agrandir",
+19
View File
@@ -2210,6 +2210,25 @@
"dismiss": "Abaikan",
"continue": "Lanjutkan"
},
"diagram": {
"graph": "Diagram",
"source": "Sumber",
"copy": "Salin sumber",
"enlarge": "Perbesar diagram",
"title": "Diagram Mermaid",
"preparing": "Menyiapkan diagram…",
"errors": {
"syntax": "Periksa sintaks diagram pada sumber.",
"unsupported": "Jenis diagram ini belum didukung. Lihat sumber.",
"policy": "Diagram memakai gaya atau sumber daya yang tidak didukung. Lihat sumber.",
"limit": "Diagram melampaui batas perenderan. Lihat sumber.",
"load": "Tidak dapat memuat perender diagram. Coba lagi.",
"deadline": "Perenderan diagram terlalu lama. Sederhanakan sumber atau coba lagi.",
"worker": "Tidak dapat merender diagram. Coba lagi.",
"image": "Tidak dapat menampilkan diagram. Coba lagi.",
"capability": "Browser ini tidak dapat merender diagram. Lihat sumber."
}
},
"lightbox": {
"viewAll": "Lihat semua {{count}} gambar",
"zoomIn": "Perbesar",
+19
View File
@@ -2210,6 +2210,25 @@
"dismiss": "閉じる",
"continue": "続行"
},
"diagram": {
"graph": "図",
"source": "ソース",
"copy": "ソースをコピー",
"enlarge": "図を拡大",
"title": "Mermaid 図",
"preparing": "図を準備中…",
"errors": {
"syntax": "ソースの図の構文を確認してください。",
"unsupported": "この図の種類には対応していません。ソースを確認してください。",
"policy": "未対応のスタイルやリソースが含まれています。ソースを確認してください。",
"limit": "図が描画の上限を超えています。ソースを確認してください。",
"load": "図の描画機能を読み込めませんでした。再試行してください。",
"deadline": "図の描画がタイムアウトしました。ソースを簡略化するか再試行してください。",
"worker": "図を描画できませんでした。再試行してください。",
"image": "図を表示できませんでした。再試行してください。",
"capability": "このブラウザーでは図を描画できません。ソースを確認してください。"
}
},
"lightbox": {
"viewAll": "すべての画像({{count}} 枚)を表示",
"zoomIn": "拡大",
+19
View File
@@ -2210,6 +2210,25 @@
"dismiss": "닫기",
"continue": "계속"
},
"diagram": {
"graph": "다이어그램",
"source": "소스",
"copy": "소스 복사",
"enlarge": "다이어그램 확대",
"title": "Mermaid 다이어그램",
"preparing": "다이어그램 준비 중…",
"errors": {
"syntax": "소스의 다이어그램 문법을 확인하세요.",
"unsupported": "지원하지 않는 다이어그램 유형입니다. 소스를 확인하세요.",
"policy": "지원하지 않는 스타일이나 리소스가 있습니다. 소스를 확인하세요.",
"limit": "다이어그램이 렌더링 제한을 초과했습니다. 소스를 확인하세요.",
"load": "다이어그램 렌더러를 불러오지 못했습니다. 다시 시도하세요.",
"deadline": "다이어그램 렌더링 시간이 초과되었습니다. 소스를 단순화하거나 다시 시도하세요.",
"worker": "다이어그램을 렌더링하지 못했습니다. 다시 시도하세요.",
"image": "다이어그램을 표시하지 못했습니다. 다시 시도하세요.",
"capability": "이 브라우저에서는 다이어그램을 렌더링할 수 없습니다. 소스를 확인하세요."
}
},
"lightbox": {
"viewAll": "이미지 {{count}}개 모두 보기",
"zoomIn": "확대",
+19
View File
@@ -2224,6 +2224,25 @@
"dismiss": "Descartar",
"continue": "Continuar"
},
"diagram": {
"graph": "Diagrama",
"source": "Código-fonte",
"copy": "Copiar código-fonte",
"enlarge": "Ampliar diagrama",
"title": "Diagrama Mermaid",
"preparing": "Preparando diagrama…",
"errors": {
"syntax": "Confira a sintaxe do diagrama no código-fonte.",
"unsupported": "Este tipo de diagrama não é compatível. Consulte o código-fonte.",
"policy": "O diagrama usa estilos ou recursos incompatíveis. Consulte o código-fonte.",
"limit": "O diagrama excede o limite de renderização. Consulte o código-fonte.",
"load": "Não foi possível carregar o renderizador. Tente novamente.",
"deadline": "A renderização demorou demais. Simplifique o código-fonte ou tente novamente.",
"worker": "Não foi possível gerar o diagrama. Tente novamente.",
"image": "Não foi possível exibir o diagrama. Tente novamente.",
"capability": "Este navegador não pode gerar diagramas. Consulte o código-fonte."
}
},
"lightbox": {
"viewAll": "Ver todas as {{count}} imagens",
"zoomIn": "Ampliar",
+19
View File
@@ -2210,6 +2210,25 @@
"dismiss": "Bỏ qua",
"continue": "Tiếp tục"
},
"diagram": {
"graph": "Sơ đồ",
"source": "Mã nguồn",
"copy": "Sao chép mã nguồn",
"enlarge": "Phóng to sơ đồ",
"title": "Sơ đồ Mermaid",
"preparing": "Đang chuẩn bị sơ đồ…",
"errors": {
"syntax": "Hãy kiểm tra cú pháp sơ đồ trong mã nguồn.",
"unsupported": "Chưa hỗ trợ loại sơ đồ này. Hãy xem mã nguồn.",
"policy": "Sơ đồ dùng kiểu hoặc tài nguyên không được hỗ trợ. Hãy xem mã nguồn.",
"limit": "Sơ đồ vượt quá giới hạn kết xuất. Hãy xem mã nguồn.",
"load": "Không thể tải bộ kết xuất sơ đồ. Hãy thử lại.",
"deadline": "Kết xuất sơ đồ quá thời gian. Hãy đơn giản hóa mã nguồn hoặc thử lại.",
"worker": "Không thể kết xuất sơ đồ. Hãy thử lại.",
"image": "Không thể hiển thị sơ đồ. Hãy thử lại.",
"capability": "Trình duyệt này không thể kết xuất sơ đồ. Hãy xem mã nguồn."
}
},
"lightbox": {
"viewAll": "Xem tất cả {{count}} ảnh",
"zoomIn": "Phóng to",
+19
View File
@@ -2410,6 +2410,25 @@
"dismiss": "忽略",
"continue": "继续"
},
"diagram": {
"graph": "图形",
"source": "源码",
"copy": "复制源码",
"enlarge": "放大查看",
"title": "Mermaid 图表",
"preparing": "正在准备图表…",
"errors": {
"syntax": "图表语法有误,请检查源码。",
"unsupported": "暂不支持此类图表,可查看源码。",
"policy": "图表含不支持的样式或资源,可查看源码。",
"limit": "图表超出渲染限制,可查看源码。",
"load": "图表渲染器加载失败,请重试。",
"deadline": "图表渲染超时,请简化源码或重试。",
"worker": "图表渲染失败,请重试。",
"image": "图表显示失败,请重试。",
"capability": "此浏览器无法渲染图表,可查看源码。"
}
},
"lightbox": {
"viewAll": "查看全部 {{count}} 张图片",
"zoomIn": "放大",
+19
View File
@@ -2210,6 +2210,25 @@
"dismiss": "略過",
"continue": "繼續"
},
"diagram": {
"graph": "圖形",
"source": "原始碼",
"copy": "複製原始碼",
"enlarge": "放大檢視",
"title": "Mermaid 圖表",
"preparing": "正在準備圖表…",
"errors": {
"syntax": "圖表語法有誤,請檢查原始碼。",
"unsupported": "尚不支援此類圖表,可檢視原始碼。",
"policy": "圖表含不支援的樣式或資源,可檢視原始碼。",
"limit": "圖表超出繪製限制,可檢視原始碼。",
"load": "圖表繪製器載入失敗,請重試。",
"deadline": "圖表繪製逾時,請簡化原始碼或重試。",
"worker": "圖表繪製失敗,請重試。",
"image": "圖表顯示失敗,請重試。",
"capability": "此瀏覽器無法繪製圖表,可檢視原始碼。"
}
},
"lightbox": {
"viewAll": "查看全部 {{count}} 張圖片",
"zoomIn": "放大",