feat(engine): 实现 DOCX 原生 OMML 数学公式、Mermaid 高清渲染与出版级公文排版

- 集成 mathml2omml 与 KaTeX,实现展示级公式 (<m:oMathPara>) 与行内公式 (<m:oMath>) 的微软原生矢量公式渲染
- 实现 svgToPngData 将 Mermaid 矢量图光栅化为 2.5x 视网膜清晰度的 PNG 图片嵌入 Word
- 重构公文抬头、4列受控签署栏、出版级三线表、keepNext 防孤行与带分割线的受控页眉页脚

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
WeiCHEN
2026-09-08 20:17:01 +08:00
co-authored by Cursor
parent 3d6df3feb7
commit dd67aacf49
3 changed files with 742 additions and 214 deletions
+7
View File
@@ -11,6 +11,7 @@
"docx": "^9.7.1",
"katex": "^0.18.7",
"lucide-react": "^1.16.0",
"mathml2omml": "^0.5.0",
"mermaid": "^11.17.2",
"react": "^19.2.0",
"react-dom": "^19.2.0",
@@ -2832,6 +2833,12 @@
"node": ">= 20"
}
},
"node_modules/mathml2omml": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/mathml2omml/-/mathml2omml-0.5.0.tgz",
"integrity": "sha512-4eLs37a+TH+CL/M5XZZrlc75SNRJNPiZzIaeSSvH0UFCRaCdSYRHWvrlA7MUbeQks/z4sVhfg+GlcZhVVUHzqg==",
"license": "LGPL-3.0-or-later"
},
"node_modules/mermaid": {
"version": "11.17.2",
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.17.2.tgz",
+1
View File
@@ -13,6 +13,7 @@
"docx": "^9.7.1",
"katex": "^0.18.7",
"lucide-react": "^1.16.0",
"mathml2omml": "^0.5.0",
"mermaid": "^11.17.2",
"react": "^19.2.0",
"react-dom": "^19.2.0",
File diff suppressed because it is too large Load Diff