youfoundjk_TeXcore/tikzjax-assets
JK bea33c7cac feat(tikz): decouple TikZJax loader and assets for fully offline, worker-based rendering
- Extracted 214 TeX libraries, packages, core formats, and WebAssembly binaries from monolithic `tikzjax.js` into local `tikzjax-assets/` folder.
- Replaced monolithic 7MB runtime JS asset download from GitHub with a lightweight loader and Web Worker compilation engine.
- Implemented `tikzjax.worker.ts` to execute the TeX engine in a background Web Worker thread using modern Web standard APIs, preventing main-thread UI locks.
- Implemented `TikzJaxLoader` to parse code block preambles, lazily load/decompress assets synchronously via native `zlib`, cache core buffers in memory, and compile diagrams via the worker.
- Refactored `renderer.ts` and `live-preview-overlay.ts` to utilize the async loader, removing DOM-polluting `<script>` tags, global mutation observers, and custom window hooks.
- Swapped unsafe `.innerHTML` DOM writes with secure browser `DOMParser` APIs for SVG parsing.
- Configured `esbuild` and `package.json` to recursively copy `tikzjax-assets/` to both development and production release locations.
- Removed temporary extraction scripts to keep runtime codebase clean.
- Added asset origin citations to module README, project root README, and MkDocs features documentation.
- Fixed all 111 ESLint type check and style errors, ensuring clean linter execution.
2026-06-05 15:19:32 +02:00
..
tex_files feat(tikz): decouple TikZJax loader and assets for fully offline, worker-based rendering 2026-06-05 15:19:32 +02:00
core.dump.gz feat(tikz): decouple TikZJax loader and assets for fully offline, worker-based rendering 2026-06-05 15:19:32 +02:00
README.md feat(tikz): decouple TikZJax loader and assets for fully offline, worker-based rendering 2026-06-05 15:19:32 +02:00
tex.wasm.gz feat(tikz): decouple TikZJax loader and assets for fully offline, worker-based rendering 2026-06-05 15:19:32 +02:00
tikzjax.css feat(tikz): decouple TikZJax loader and assets for fully offline, worker-based rendering 2026-06-05 15:19:32 +02:00

TikZJax Assets Sourcing

The assets in this directory are the compiled format dumps, WebAssembly binaries, font stylesheets, and LaTeX package dependency files used by the TikZJax rendering engine in the TeXcore plugin.

Asset Origins

  • Core TeX Engine (tex.wasm.gz & core.dump.gz): Extracted from the pre-compiled, offline-capable tikzjax.js bundle of artisticat1/obsidian-tikzjax.
  • TeX Files & LaTeX Packages (tex_files/*.gz): The LaTeX package files (such as chemfig, circuitikz, and TikZ library code blocks) were also extracted from the monolithic bundle of artisticat1/obsidian-tikzjax to serve as lazy-loaded dependencies.
  • Font Stylesheet (tikzjax.css): Downloaded from the official styling asset styles.css in artisticat1/obsidian-tikzjax. It contains @font-face declarations with embedded base64 font data for math and glyph symbols.

Lineage of TikZJax

  1. kisonecat/tikzjax: The original browser-based TeX-in-WASM compiler created by Jim Fowler, which compiles TeX's Pascal source to WebAssembly via web2js.
  2. drgrice1/tikzjax: Glenn Rice's fork which added Web Worker support and support for additional LaTeX packages and libraries.
  3. artisticat1/obsidian-tikzjax: The Obsidian plugin wrapper created by artisticat1 which packaged these components for offline usage in Obsidian notes.