Repository navigation
⬆️(dependencies) upgrade BlockNote to 0.56.0 and export PDFs with Typst - #2936
Merged
Merged
Conversation
This was
linked to
issues
Oct 28, 2026
Contributor
|
Size Change: -370 kB (-9.05%) ✅ Total Size: 3.72 MB 📦 View Changed
|
BlockNote 0.56.0 brings layout blocks, a rebuilt side menu hover
and many fixes. It also moves the PDF export from @react-pdf/renderer
to the Typst engine: the math and diagram blocks no longer ship a
react-pdf mapping, so the bump cannot build without migrating the PDF
export, which is why both are done in this commit.
The PDF mappings now return Typst markup: the exported PDF is tagged,
and declared PDF/UA-1 when the document conforms. The avatar of a
user mention is exported as an artifact. The react-pdf dependencies,
the emoji copy script and the png assets it needed are removed.
The other breaking changes are handled: blockTypeSelectItems takes the
editor, the menus need a portal element, `null` is no longer a portal
target, the render of a block spec is optional, and a block mapping
can be a `{ withChildren }` mapping. jszip is declared, docx no longer
brings it, and the tiptap and prosemirror-transform resolutions keep a
single copy of each package.
Signed-off-by: Anthony LC <[email protected]>
An image the export cannot fetch, e.g. one the cors-proxy refuses because its URL redirects, was silently left out of the PDF and ODT, and made the whole Docx export fail. The proxy is meant to be removed, so such images are not going to be supported: the export now shows a short message in their place, in the three formats. Signed-off-by: Anthony LC <[email protected]>
AntoLC
force-pushed
the
chore/upgrade-blocknote-0-56
branch
from
October 28, 2026 17:12
e9fb290 to
c2a7052
Compare
BlockNote has Mermaid lay a diagram out with Mermaid's default font (Trebuchet MS, else Verdana, Arial...), then only renames the font of the labels to the one Typst draws them with. The boxes were sized for a font that depends on the OS: the labels could overflow them, and the PDF regression test failed on the Linux CI with a fixture made on Windows. The diagram mapping now gives Mermaid the font of the export through an init directive, and the exporter registers this font in the browser with the very bytes Typst embeds, so that the layout no longer depends on the fonts installed on the OS. The PDF regression fixtures are regenerated accordingly. Signed-off-by: Anthony LC <[email protected]>
14 of 16 tasks
14 of 15 tasks
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Purpose
Upgrade BlockNote to 0.56.0. Its PDF exporter moves from react-pdf to the Typst engine, so the PDF export of Docs has to be migrated in the same step: the exported PDFs are now tagged, and declared PDF/UA-1 when the document conforms.
Proposal
@blocknote/*package to 0.56.0 (impress and y-provider), align tiptap on 3.32.0 and keep a single copy ofprosemirror-transformblockTypeSelectItemstakes the editor, menus need a portal element, block mappings can be{ withChildren }@react-pdf/*,@ag-media/react-pdf-table,emoji-datasource-appleand the emoji prebuild scriptDocsPDFExporteroverrides the BlockNote preamble so that headings and links look like in the editor