The diagramming library Penrose now has an experimental self-contained version: https://penrose.cs.cmu.edu/docs/ref/vanilla-js
https://cdn.jsdelivr.net/npm/@penrose/core@3.2.0/dist/bundle/index.js