PDF first-page thumbnail rendered client-side via pdfjs-dist
Each tile fetches a generated PDF and renders page 1 to a canvas client-side
(import('pdfjs-dist') → worker → getDocument → page.render). No backend, no binary fixture — the documents are built
in the browser as data URLs.
Data that isn't a PDF makes getDocument throw; the component swaps the
canvas for an error icon instead of rendering a blank tile.
pdfjs-dist is a runtime dependency pinned to the
GHSA-hq66-cqwq-w95j fix floor (≥ 6.2.108; currently ^6.3.289) —
consumers inherit the fixed major, so no scoped npm override is needed. tests/unit/pdfjsDistFloor.test.ts fails CI if the declaration or
lockfile ever regresses below the fix.
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | - | URL or data URL of the PDF; page 1 is fetched and painted to the canvas |
class | string | '' | Extra CSS classes on the canvas (and the failure icon wrapper) |