Vendored static assets

Both libraries in this directory are vendored to keep the binary self-contained on a Pi with no internet access.

File Source Version
htmx.min.js https://unpkg.com/htmx.org@2.0.4/dist/htmx.min.js 2.0.4
mermaid.esm.min.mjs + chunks/mermaid.esm.min/*.mjs https://cdn.jsdelivr.net/npm/mermaid@11.4.1/dist/mermaid.esm.min.mjs (entry) 11.4.1

Mermaid is split across many ESM chunks

The mermaid 11.x ESM build is code-split: the entry file mermaid.esm.min.mjs is a small loader that statically and dynamically imports per-diagram-type chunks from chunks/mermaid.esm.min/. All chunks reachable from the entry are vendored here so the import graph resolves offline. At v11.4.1 that is 1 entry + 63 chunks (~2.6 MB).

Updating

  1. Re-download the entry with the same curl at a newer pinned version:
    curl -fsSL https://cdn.jsdelivr.net/npm/mermaid@<ver>/dist/mermaid.esm.min.mjs \
      -o internal/server/static/mermaid.esm.min.mjs
    
  2. Recursively fetch every ./chunks/... import (and transitive imports — both static from "..." and dynamic import("...")) under the same base URL into matching local paths. A short Python crawler that follows (?:from|import\(\s*)["']([^"']+\.mjs)["'] against the mermaid file graph works.
  3. Delete the previous chunks/mermaid.esm.min/ directory before the new fetch so stale chunks don't ship.
  4. Verify the content_md.html mermaid invocation still uses the public ESM API (import mermaid from '...'; mermaid.run(...)).
  5. Re-run the iframe-boundary headless test (Task 28) — it's the cheapest way to catch a breaking change.

htmx

Single-file build, no chunks. Re-download with curl -fsSL https://unpkg.com/htmx.org@<ver>/dist/htmx.min.js -o internal/server/static/htmx.min.js.