KaTeX math rendering, Mermaid diagrams, heading anchors and table of contents.
Migrate the extension to TypeScript with a single esbuild entry point per script, eliminating the IIFE vendor-global pattern.