feat(collab-web): rendered LaTeX in transcripts
Transcript Markdown now typesets `$…$` and `\(…\)` inline, `$$…$$` and `\[…\]`
in display mode, and own-line `$$`/`\[` blocks. Delimiters come from the shared
grammar, so the browser client and the TUI agree on what counts as math;
everything renderer-specific stays in `transcript/math.ts`.
KaTeX renders to MathML rather than its HTML output: `katex.min.css` bundles to
~940 KB gzipped here because Bun inlines its 60 @font-face sources, and native
MathML costs no style bytes, stays selectable, and matches KaTeX's layout at the
transcript's 13px scale. A KaTeX failure falls back to the escaped source so one
bad span cannot blank a message, and a dollar run containing a backtick is left
as prose because KaTeX cannot express a code span.
Display equations scroll inside a `.tr-math` wrapper whose padding absorbs
MathML ink; scrolling the `math` element itself trapped a few pixels of vertical
scroll on fractions and matrices.
Two limits are inherited from the shared behavior and match the TUI: a rejected
opener hides later spans on its line ("it costs $5, and the growth is $x^2$"
typesets nothing), and a display block whose body contains a blank line needs a
blank line before it. S
Sean Murphy committed
e507a2dc54b9b2125b031052d0e94b03667adbd3
Parent: 03ba093