Library Patches
Several third-party libraries carry in-tree modifications. docs/lib/paged.browser.js is a patched copy of paged.js v0.4.3 (MIT); the thirteen fast-*.mjs files there are side-effecting shims applied to pdf-lib’s live exports before each PDF process phase; and builder/scripts/patch-dagre.mjs is a postinstall hook that rewrites mermaid’s bundled dagre adapter to fix per-cluster layout. This section documents every change: what the upstream behaviour was, why it was unsuitable for the build pipeline, and what was changed.
Sub-pages
- Paged.js Patches — changes to
docs/lib/paged.browser.js: the synchronous execution chain, hook dispatch fast-paths, DOM lookup optimizations, layout correctness fixes, and miscellaneous headless-specific changes. - pdf-lib Patches — the thirteen
fast-*.mjsshims andparallel-deflate.mjsthat retune pdf-lib’s parser, object model, and serializer for the process phase. - Mermaid Dagre Patches — five patches to
node_modules/mermaid/dist/chunks/mermaid.esm/dagre-ZXKKJJHT.mjsthat makedirection LRsubgraphs work correctly when they have cross-cluster edges or no internal edges at all.