diff --git a/docs/package.json b/docs/package.json index 75f52c8a8b..2fdeefb332 100644 --- a/docs/package.json +++ b/docs/package.json @@ -81,7 +81,7 @@ "better-auth": "~1.4.15", "better-sqlite3": "^12.6.2", "class-variance-authority": "^0.7.1", - "docx": "^9.6.1", + "docx": "^9.9.0", "framer-motion": "^12.26.2", "fumadocs-core": "16.5.0", "fumadocs-mdx": "^14.2.6", diff --git a/packages/diagram-block/package.json b/packages/diagram-block/package.json index d22f3f3b64..99caca0762 100644 --- a/packages/diagram-block/package.json +++ b/packages/diagram-block/package.json @@ -88,7 +88,7 @@ "@types/react": "^19.2.3", "@zip.js/zip.js": "^2.8.8", "@types/react-dom": "^19.2.3", - "docx": "^9.8.0", + "docx": "^9.9.0", "react": "^19.2.5", "react-dom": "^19.2.5", "rimraf": "^5.0.10", diff --git a/packages/math-block/package.json b/packages/math-block/package.json index 1be51fcf86..29bc5feb2d 100644 --- a/packages/math-block/package.json +++ b/packages/math-block/package.json @@ -93,7 +93,7 @@ "@types/react": "^19.2.3", "@types/react-dom": "^19.2.3", "@zip.js/zip.js": "^2.8.8", - "docx": "^9.8.0", + "docx": "^9.9.0", "mathjax-full": "^3.2.2", "react": "^19.2.5", "react-dom": "^19.2.5", diff --git a/packages/xl-docx-exporter/package.json b/packages/xl-docx-exporter/package.json index 5d84437c72..c6433d61dd 100644 --- a/packages/xl-docx-exporter/package.json +++ b/packages/xl-docx-exporter/package.json @@ -60,7 +60,7 @@ "@blocknote/core": "workspace:^", "@blocknote/xl-multi-column": "workspace:^", "buffer": "^6.0.3", - "docx": "^9.8.0", + "docx": "^9.9.0", "image-meta": "^0.2.2" }, "devDependencies": { diff --git a/packages/xl-docx-exporter/src/docx/__snapshots__/basic/document.xml b/packages/xl-docx-exporter/src/docx/__snapshots__/basic/document.xml index e9c49d1300..b146762b2e 100644 --- a/packages/xl-docx-exporter/src/docx/__snapshots__/basic/document.xml +++ b/packages/xl-docx-exporter/src/docx/__snapshots__/basic/document.xml @@ -414,6 +414,7 @@ + @@ -424,6 +425,7 @@ + @@ -447,6 +449,7 @@ + @@ -457,6 +460,7 @@ + @@ -480,6 +484,7 @@ + @@ -490,6 +495,7 @@ + @@ -520,7 +526,7 @@ - + @@ -573,7 +579,7 @@ - + @@ -725,6 +731,7 @@ + @@ -741,6 +748,7 @@ + @@ -757,6 +765,7 @@ + @@ -775,6 +784,7 @@ + @@ -785,6 +795,7 @@ + @@ -801,6 +812,7 @@ + @@ -813,6 +825,7 @@ + @@ -823,6 +836,7 @@ + @@ -833,6 +847,7 @@ + @@ -867,6 +882,7 @@ + @@ -883,6 +899,7 @@ + @@ -904,6 +921,7 @@ + @@ -920,6 +938,7 @@ + @@ -936,6 +955,7 @@ + @@ -954,6 +974,7 @@ + @@ -965,6 +986,7 @@ + @@ -975,6 +997,7 @@ + @@ -987,6 +1010,7 @@ + @@ -994,6 +1018,7 @@ + @@ -1004,6 +1029,7 @@ + diff --git a/packages/xl-docx-exporter/src/docx/docxExporter.test.ts b/packages/xl-docx-exporter/src/docx/docxExporter.test.ts index 11367c90f2..8cfe741b51 100644 --- a/packages/xl-docx-exporter/src/docx/docxExporter.test.ts +++ b/packages/xl-docx-exporter/src/docx/docxExporter.test.ts @@ -422,6 +422,9 @@ function prettify(sourceXml: string) { // replace random ids like r:id="rIdll8_ocxarmodcwrnsavfb" ret = ret.replace(/r:id="[a-zA-Z0-9_-]*"/g, 'r:id="FAKE-ID"'); + // Image relationship IDs are internal to docx and can change between releases. + ret = ret.replace(/r:embed="[a-zA-Z0-9_-]*"/g, 'r:embed="FAKE-ID"'); + // replace random ids like Id="rIdll8_ocxarmodcwrnsavfb" ret = ret.replace(/ Id="[a-zA-Z0-9_-]*"/g, ' Id="FAKE-ID"'); diff --git a/playground/package.json b/playground/package.json index db41e2f239..7ea2be3a9d 100644 --- a/playground/package.json +++ b/playground/package.json @@ -55,7 +55,7 @@ "@y-sweet/react": "^0.6.4", "ai": "^6.0.5", "autoprefixer": "10.4.21", - "docx": "^9.5.1", + "docx": "^9.9.0", "react": "^19.2.5", "react-dom": "^19.2.5", "react-icons": "^5.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 822bd884f9..05a537504f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -275,8 +275,8 @@ importers: specifier: ^0.7.1 version: 0.7.1 docx: - specifier: ^9.6.1 - version: 9.6.1 + specifier: ^9.9.0 + version: 9.9.0 framer-motion: specifier: ^12.26.2 version: 12.38.0(@emotion/is-prop-valid@1.4.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) @@ -5429,8 +5429,8 @@ importers: specifier: ^2.8.8 version: 2.8.26 docx: - specifier: ^9.8.0 - version: 9.8.0 + specifier: ^9.9.0 + version: 9.9.0 react: specifier: ^19.2.5 version: 19.2.5 @@ -5557,8 +5557,8 @@ importers: specifier: ^2.8.8 version: 2.8.26 docx: - specifier: ^9.8.0 - version: 9.8.0 + specifier: ^9.9.0 + version: 9.9.0 mathjax-full: specifier: ^3.2.2 version: 3.2.2 @@ -5995,8 +5995,8 @@ importers: specifier: ^6.0.3 version: 6.0.3 docx: - specifier: ^9.8.0 - version: 9.8.0 + specifier: ^9.9.0 + version: 9.9.0 image-meta: specifier: ^0.2.2 version: 0.2.2 @@ -6445,8 +6445,8 @@ importers: specifier: 10.4.21 version: 10.4.21(postcss@8.5.14) docx: - specifier: ^9.5.1 - version: 9.6.1 + specifier: ^9.9.0 + version: 9.9.0 katex: specifier: ^0.18.9 version: 0.18.9 @@ -12784,12 +12784,8 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} - docx@9.6.1: - resolution: {integrity: sha512-ZJja9/KBUuFC109sCMzovoq2GR2wCG/AuxivjA+OHj/q0TEgJIm3S7yrlUxIy3B+bV8YDj/BiHfWyrRFmyWpDQ==} - engines: {node: '>=10'} - - docx@9.8.0: - resolution: {integrity: sha512-RunQowTxl5dzUcDmDnUJrXndOI5/V+mA0U4EAVAbgKdKKgJldAdyHfo9UWgPihLLXJtXu4FDlgma6xDQ1bbrhA==} + docx@9.9.0: + resolution: {integrity: sha512-qefptMMO31ZCfVnFANQWSLtnvUrYkqd7cLr+Bi4e+kl4LvYOmdk314iwp8XHHyQs3TPtPcQwqgZgN/MJxT7Ttw==} engines: {node: '>=10'} dom-accessibility-api@0.5.16: @@ -14639,11 +14635,6 @@ packages: engines: {node: ^14 || ^16 || >=18} hasBin: true - nanoid@5.1.7: - resolution: {integrity: sha512-ua3NDgISf6jdwezAheMOk4mbE1LXjm1DfMUDMuJf4AqxLFK3ccGpgWizwa5YV7Yz9EpXwEaWoRXSb/BnV0t5dQ==} - engines: {node: ^18 || >=20} - hasBin: true - nanoid@6.0.1: resolution: {integrity: sha512-3wVS3i51pE2pi1k5FFL/95BGfVS0kSsvDVuGXHOtxox/TywUmtgq+3qiTOTbs9J7KfHaXPiN171k/A6dBnaXFw==} engines: {node: ^22 || ^24 || >=26} @@ -23235,16 +23226,7 @@ snapshots: dependencies: esutils: 2.0.3 - docx@9.6.1: - dependencies: - '@types/node': 25.9.5 - hash.js: 1.1.7 - jszip: 3.10.1 - nanoid: 5.1.7 - xml: 1.0.1 - xml-js: 1.6.11 - - docx@9.8.0: + docx@9.9.0: dependencies: '@types/node': 25.9.5 hash.js: 1.1.7 @@ -25438,8 +25420,6 @@ snapshots: nanoid@4.0.2: {} - nanoid@5.1.7: {} - nanoid@6.0.1: {} nanostores@1.2.0: {}