Repository navigation
fix(docx): avoid private numbering APIs and simplify layout mappings - #3225
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/diagram-block
@blocknote/mantine
@blocknote/math-block
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
@blocknote/xl-typst-exporter
commit: |
|
Summary
Fix the DOCX exporter failure in Fresh Install Tests run 39560995707 and simplify brittle mapping boundaries.
Rationale
The locked docx 9.9.0 passes, but fresh resolution to 9.13.0 removes the private
Paragraph.properties.numberingReferencesfield. Seven exporter tests then crash while indenting nested content. This fix tracks the indentation behavior we own instead of inspecting docx internals.Changes
createDOCXParagraph, returning a normal docxParagraphwith WeakSet-backed numbering metadata. Built-in list mappings use it; custom child-placement mappings continue receiving real paragraphs, not wrappers.TableCellcasts and options inspection with explicit{ type: "column", width, children }objects, constructing cells only at the column-list boundary. Reject misplaced columns with contextual errors.descr/titleattributes, which newer docx versions omit; update that single snapshot line.Impact
No dependency, lockfile, or CI changes. Custom numbered/bulleted mappings must use
createDOCXParagraphinstead ofnew Paragraphto avoid extra nesting tabs; raw paragraphs remain accepted, but their private numbering settings are no longer inspected. This distinction is documented in the helper and covered by tests.Testing
@blocknote/xl-typst-compiler/pkgWASM artifact; it is not claimed green.Additional Notes
Related prior DOCX upgrade fixes: #3139 and #3170. This avoids another private-API repair while retaining the fresh-dependency CI coverage and full snapshots.
Summary by CodeRabbit