feat(diagram-render): offline mermaid+excalidraw render bundle for browse

Single self-contained page (dist/diagram-render.html, 9.2MB, committed per
eng-review D2) exposing __renderMermaid / __mermaidToExcalidraw /
__excalidrawToSvg / __rasterize / __probeImage through browse load-html +
js --out. Render contract per D3: securityLevel strict, per-fence ids,
print-css font lock, htmlLabels off (canvas-taint-safe). Deterministic
build (same sha twice); drift test pins dist == BUILD_INFO == package.json
pins and rebuild-reproducibility when toolchain matches. Spike-proven
offline: flowchart + sequence SVG, editable .excalidraw scene, 300dpi PNG.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-06-11 23:26:28 -07:00
parent c07e1ffcfb
commit a311cb1ec5
11 changed files with 6192 additions and 0 deletions
+3
View File
@@ -4,6 +4,9 @@ dist/
browse/dist/
design/dist/
make-pdf/dist/
# diagram-render ships its built bundle (offline-at-install premise, eng-review D2)
!lib/diagram-render/dist/
!lib/diagram-render/dist/**
bin/gstack-global-discover*
.gstack/
.claude/skills/