diff --git a/tests/test_webui_katex_assets.py b/tests/test_webui_katex_assets.py new file mode 100644 index 000000000..e69808a53 --- /dev/null +++ b/tests/test_webui_katex_assets.py @@ -0,0 +1,14 @@ +from pathlib import Path +import re + + +PROJECT_ROOT = Path(__file__).resolve().parents[1] + + +def test_katex_css_font_assets_are_complete(): + katex = PROJECT_ROOT / "webui" / "vendor" / "katex" + css = (katex / "katex.min.css").read_text(encoding="utf-8") + referenced = set(re.findall(r"fonts/(KaTeX_[^)\"']+\.(?:woff2|woff|ttf))", css)) + available = {path.name for path in (katex / "fonts").iterdir() if path.is_file()} + + assert referenced == available diff --git a/webui/vendor/katex/AGENTS.md b/webui/vendor/katex/AGENTS.md index 983d15276..de950f661 100644 --- a/webui/vendor/katex/AGENTS.md +++ b/webui/vendor/katex/AGENTS.md @@ -9,11 +9,13 @@ - `katex.min.js` owns core rendering behavior. - `katex.auto-render.min.js` owns auto-render support. - `katex.min.css` owns KaTeX styling. +- `fonts/` owns every font asset referenced by `katex.min.css`. ## Local Contracts - Do not hand-edit minified vendor files. - Keep markdown/message rendering imports synchronized with asset paths. +- Keep the CSS font references fully available under `fonts/`. ## Work Guidance diff --git a/webui/vendor/katex/fonts/KaTeX_AMS-Regular.ttf b/webui/vendor/katex/fonts/KaTeX_AMS-Regular.ttf new file mode 100644 index 000000000..c6f9a5e7c Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_AMS-Regular.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_AMS-Regular.woff b/webui/vendor/katex/fonts/KaTeX_AMS-Regular.woff new file mode 100644 index 000000000..b804d7b33 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_AMS-Regular.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_AMS-Regular.woff2 b/webui/vendor/katex/fonts/KaTeX_AMS-Regular.woff2 new file mode 100644 index 000000000..0acaaff03 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_AMS-Regular.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Caligraphic-Bold.ttf b/webui/vendor/katex/fonts/KaTeX_Caligraphic-Bold.ttf new file mode 100644 index 000000000..9ff4a5e04 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Caligraphic-Bold.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff b/webui/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff new file mode 100644 index 000000000..9759710d1 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff2 b/webui/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff2 new file mode 100644 index 000000000..f390922ec Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Caligraphic-Regular.ttf b/webui/vendor/katex/fonts/KaTeX_Caligraphic-Regular.ttf new file mode 100644 index 000000000..f522294ff Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Caligraphic-Regular.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff b/webui/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff new file mode 100644 index 000000000..9bdd534fd Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff2 b/webui/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff2 new file mode 100644 index 000000000..75344a1f9 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Fraktur-Bold.ttf b/webui/vendor/katex/fonts/KaTeX_Fraktur-Bold.ttf new file mode 100644 index 000000000..4e98259c3 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Fraktur-Bold.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff b/webui/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff new file mode 100644 index 000000000..e7730f662 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff2 b/webui/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff2 new file mode 100644 index 000000000..395f28bea Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Fraktur-Regular.ttf b/webui/vendor/katex/fonts/KaTeX_Fraktur-Regular.ttf new file mode 100644 index 000000000..b8461b275 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Fraktur-Regular.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff b/webui/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff new file mode 100644 index 000000000..acab069f9 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff2 b/webui/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff2 new file mode 100644 index 000000000..735f6948d Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Main-Bold.ttf b/webui/vendor/katex/fonts/KaTeX_Main-Bold.ttf new file mode 100644 index 000000000..4060e627d Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Main-Bold.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Main-Bold.woff b/webui/vendor/katex/fonts/KaTeX_Main-Bold.woff new file mode 100644 index 000000000..f38136ac1 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Main-Bold.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Main-Bold.woff2 b/webui/vendor/katex/fonts/KaTeX_Main-Bold.woff2 new file mode 100644 index 000000000..ab2ad21da Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Main-Bold.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Main-BoldItalic.ttf b/webui/vendor/katex/fonts/KaTeX_Main-BoldItalic.ttf new file mode 100644 index 000000000..dc007977e Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Main-BoldItalic.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff b/webui/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff new file mode 100644 index 000000000..67807b0bd Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff2 b/webui/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff2 new file mode 100644 index 000000000..5931794de Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Main-Italic.ttf b/webui/vendor/katex/fonts/KaTeX_Main-Italic.ttf new file mode 100644 index 000000000..0e9b0f354 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Main-Italic.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Main-Italic.woff b/webui/vendor/katex/fonts/KaTeX_Main-Italic.woff new file mode 100644 index 000000000..6f43b594b Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Main-Italic.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Main-Italic.woff2 b/webui/vendor/katex/fonts/KaTeX_Main-Italic.woff2 new file mode 100644 index 000000000..b50920e13 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Main-Italic.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Main-Regular.ttf b/webui/vendor/katex/fonts/KaTeX_Main-Regular.ttf new file mode 100644 index 000000000..dd45e1ed2 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Main-Regular.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Main-Regular.woff b/webui/vendor/katex/fonts/KaTeX_Main-Regular.woff new file mode 100644 index 000000000..21f581296 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Main-Regular.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Main-Regular.woff2 b/webui/vendor/katex/fonts/KaTeX_Main-Regular.woff2 new file mode 100644 index 000000000..eb24a7ba2 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Main-Regular.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Math-BoldItalic.ttf b/webui/vendor/katex/fonts/KaTeX_Math-BoldItalic.ttf new file mode 100644 index 000000000..728ce7a1e Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Math-BoldItalic.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff b/webui/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff new file mode 100644 index 000000000..0ae390d74 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff2 b/webui/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff2 new file mode 100644 index 000000000..29657023a Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Math-Italic.ttf b/webui/vendor/katex/fonts/KaTeX_Math-Italic.ttf new file mode 100644 index 000000000..70d559b4e Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Math-Italic.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Math-Italic.woff b/webui/vendor/katex/fonts/KaTeX_Math-Italic.woff new file mode 100644 index 000000000..eb5159d4c Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Math-Italic.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Math-Italic.woff2 b/webui/vendor/katex/fonts/KaTeX_Math-Italic.woff2 new file mode 100644 index 000000000..215c143fd Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Math-Italic.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_SansSerif-Bold.ttf b/webui/vendor/katex/fonts/KaTeX_SansSerif-Bold.ttf new file mode 100644 index 000000000..2f65a8a3a Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_SansSerif-Bold.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff b/webui/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff new file mode 100644 index 000000000..8d47c02d9 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff2 b/webui/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff2 new file mode 100644 index 000000000..cfaa3bda5 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_SansSerif-Italic.ttf b/webui/vendor/katex/fonts/KaTeX_SansSerif-Italic.ttf new file mode 100644 index 000000000..d5850df98 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_SansSerif-Italic.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff b/webui/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff new file mode 100644 index 000000000..7e02df963 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff2 b/webui/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff2 new file mode 100644 index 000000000..349c06dc6 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_SansSerif-Regular.ttf b/webui/vendor/katex/fonts/KaTeX_SansSerif-Regular.ttf new file mode 100644 index 000000000..537279f6b Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_SansSerif-Regular.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff b/webui/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff new file mode 100644 index 000000000..31b84829b Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff2 b/webui/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff2 new file mode 100644 index 000000000..a90eea85f Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Script-Regular.ttf b/webui/vendor/katex/fonts/KaTeX_Script-Regular.ttf new file mode 100644 index 000000000..fd679bf37 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Script-Regular.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Script-Regular.woff b/webui/vendor/katex/fonts/KaTeX_Script-Regular.woff new file mode 100644 index 000000000..0e7da821e Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Script-Regular.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Script-Regular.woff2 b/webui/vendor/katex/fonts/KaTeX_Script-Regular.woff2 new file mode 100644 index 000000000..b3048fc11 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Script-Regular.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Size1-Regular.ttf b/webui/vendor/katex/fonts/KaTeX_Size1-Regular.ttf new file mode 100644 index 000000000..871fd7d19 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Size1-Regular.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Size1-Regular.woff b/webui/vendor/katex/fonts/KaTeX_Size1-Regular.woff new file mode 100644 index 000000000..7f292d911 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Size1-Regular.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Size1-Regular.woff2 b/webui/vendor/katex/fonts/KaTeX_Size1-Regular.woff2 new file mode 100644 index 000000000..c5a8462fb Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Size1-Regular.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Size2-Regular.ttf b/webui/vendor/katex/fonts/KaTeX_Size2-Regular.ttf new file mode 100644 index 000000000..7a212caf9 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Size2-Regular.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Size2-Regular.woff b/webui/vendor/katex/fonts/KaTeX_Size2-Regular.woff new file mode 100644 index 000000000..d241d9be2 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Size2-Regular.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Size2-Regular.woff2 b/webui/vendor/katex/fonts/KaTeX_Size2-Regular.woff2 new file mode 100644 index 000000000..e1bccfe24 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Size2-Regular.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Size3-Regular.ttf b/webui/vendor/katex/fonts/KaTeX_Size3-Regular.ttf new file mode 100644 index 000000000..00bff3495 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Size3-Regular.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Size3-Regular.woff b/webui/vendor/katex/fonts/KaTeX_Size3-Regular.woff new file mode 100644 index 000000000..e6e9b658d Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Size3-Regular.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Size3-Regular.woff2 b/webui/vendor/katex/fonts/KaTeX_Size3-Regular.woff2 new file mode 100644 index 000000000..249a28662 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Size3-Regular.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Size4-Regular.ttf b/webui/vendor/katex/fonts/KaTeX_Size4-Regular.ttf new file mode 100644 index 000000000..74f08921f Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Size4-Regular.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Size4-Regular.woff b/webui/vendor/katex/fonts/KaTeX_Size4-Regular.woff new file mode 100644 index 000000000..e1ec54576 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Size4-Regular.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Size4-Regular.woff2 b/webui/vendor/katex/fonts/KaTeX_Size4-Regular.woff2 new file mode 100644 index 000000000..680c13085 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Size4-Regular.woff2 differ diff --git a/webui/vendor/katex/fonts/KaTeX_Typewriter-Regular.ttf b/webui/vendor/katex/fonts/KaTeX_Typewriter-Regular.ttf new file mode 100644 index 000000000..c83252c57 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Typewriter-Regular.ttf differ diff --git a/webui/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff b/webui/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff new file mode 100644 index 000000000..2432419f2 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff differ diff --git a/webui/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff2 b/webui/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff2 new file mode 100644 index 000000000..771f1af70 Binary files /dev/null and b/webui/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff2 differ