Skip to content

feat: smallest & fastest mermaid → svg converter#4

Open
GuichiZhao wants to merge 1 commit into
webc-site:mainfrom
GuichiZhao:mermaid-to-svg
Open

feat: smallest & fastest mermaid → svg converter#4
GuichiZhao wants to merge 1 commit into
webc-site:mainfrom
GuichiZhao:mermaid-to-svg

Conversation

@GuichiZhao

Copy link
Copy Markdown
  • src/: 最小最快 mermaid→svg 转换器,32 种图类型(pie/xychart/timeline/quadrant/ journey/radar/gantt 专属渲染器 + 通用 graph 渲染器 + strict 校验层),全包 6.7KB gzip
  • extract/: 从 probelabs/maid、lukilabs/beautiful-mermaid、mermaid-js/mermaid 抽取 1176 条测试到 test/*.yml(run.js 脚本)
  • test/: 测试 harness(render.js)+ 按类型分包基准(bench.js),1156/1176 通过
  • web/: Cloudflare Pages 静态站,复用 math.webc.site 设计:编辑器+预览、四方体积/性能 对比图、beautiful-mermaid 主题切换、75 语言国际化
  • loop/: opencode SDK 全自动开发循环驱动脚本
    🔗 在线 Demo:https://webc-mermaid.pages.dev/ (Cloudflare Pages) · https://guichizhao.github.io/math/ (GitHub Pages)
    📊 测试 1156/1176 通过(有效样本全过);全包 6.7KB gzip —— 对比 maid 136KB / beautiful-mermaid 484KB / mermaid 952KB;sequence 渲染 ~370k ops/s(mermaid 仅 56/s)。

- src/: 最小最快 mermaid→svg 转换器,32 种图类型(pie/xychart/timeline/quadrant/
  journey/radar/gantt 专属渲染器 + 通用 graph 渲染器 + strict 校验层),全包 6.7KB gzip
- extract/: 从 probelabs/maid、lukilabs/beautiful-mermaid、mermaid-js/mermaid 抽取
  1176 条测试到 test/*.yml(run.js 脚本)
- test/: 测试 harness(render.js)+ 按类型分包基准(bench.js),1156/1176 通过
- web/: Cloudflare Pages 静态站,复用 math.webc.site 设计:编辑器+预览、四方体积/性能
  对比图、beautiful-mermaid 主题切换、75 语言国际化
- loop/: opencode SDK 全自动开发循环驱动脚本

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant