@blocknote/xl-odt-exporter 0.41.1 → 0.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GeistMono-Regular-D4rKXxwr.js.map +1 -1
- package/dist/Inter_18pt-Regular-byxnNS-8.js.map +1 -1
- package/dist/blocknote-xl-odt-exporter.js.map +1 -1
- package/dist/blocknote-xl-odt-exporter.umd.cjs.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +15 -15
- package/src/odt/odtExporter.test.ts +7 -5
- package/src/odt/odtExporter.tsx +2 -2
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1762873671993,"assets":[{"name":"blocknote-xl-odt-exporter.umd.cjs","size":700486},{"name":"blocknote-xl-odt-exporter.umd.cjs.map","size":752450}],"chunks":[{"id":"642be88","entry":true,"initial":true,"files":["blocknote-xl-odt-exporter.umd.cjs"],"names":["index"]}],"modules":[{"name":"./src/odt/defaultSchema/blocks.tsx","size":16712,"chunks":["642be88"]},{"name":"./src/odt/defaultSchema/inlineContent.tsx","size":533,"chunks":["642be88"]},{"name":"./src/odt/defaultSchema/styles.ts","size":963,"chunks":["642be88"]},{"name":"./src/odt/defaultSchema/index.ts","size":199,"chunks":["642be88"]},{"name":"../../shared/util/fileUtil.ts","size":214,"chunks":["642be88"]},{"name":"../../shared/util/imageUtil.ts","size":592,"chunks":["642be88"]},{"name":"./src/odt/template/styles.xml?raw","size":76781,"chunks":["642be88"]},{"name":"./src/odt/odtExporter.tsx","size":10335,"chunks":["642be88"]},{"name":"./src/index.ts","size":0,"chunks":["642be88"]},{"name":"../../shared/assets/fonts/inter/Inter_18pt-Regular.ttf","size":456958,"chunks":["642be88"]},{"name":"../../shared/assets/fonts/GeistMono-Regular.ttf","size":155049,"chunks":["642be88"]}]}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"directory": "packages/xl-odt-exporter"
|
|
10
10
|
},
|
|
11
11
|
"license": "GPL-3.0 OR PROPRIETARY",
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.42.0",
|
|
13
13
|
"files": [
|
|
14
14
|
"dist",
|
|
15
15
|
"types",
|
|
@@ -49,24 +49,24 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@blocknote/core": "0.
|
|
53
|
-
"@blocknote/xl-multi-column": "0.
|
|
54
|
-
"@zip.js/zip.js": "^2.
|
|
52
|
+
"@blocknote/core": "0.42.0",
|
|
53
|
+
"@blocknote/xl-multi-column": "0.42.0",
|
|
54
|
+
"@zip.js/zip.js": "^2.8.8",
|
|
55
55
|
"buffer": "^6.0.3",
|
|
56
|
-
"image-meta": "^0.2.
|
|
56
|
+
"image-meta": "^0.2.2"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@testing-library/react": "^16.0
|
|
60
|
-
"@types/react": "^19.
|
|
61
|
-
"@types/react-dom": "^19.
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
59
|
+
"@testing-library/react": "^16.3.0",
|
|
60
|
+
"@types/react": "^19.2.2",
|
|
61
|
+
"@types/react-dom": "^19.2.2",
|
|
62
|
+
"react": "^19.2.0",
|
|
63
|
+
"react-dom": "^19.2.0",
|
|
64
|
+
"rollup-plugin-webpack-stats": "^0.2.6",
|
|
65
|
+
"typescript": "^5.9.3",
|
|
66
|
+
"vite": "^5.4.20",
|
|
65
67
|
"vite-plugin-eslint": "^1.8.1",
|
|
66
|
-
"vitest": "^2.
|
|
67
|
-
"xml-formatter": "^3.6.
|
|
68
|
-
"react": "^19.1.0",
|
|
69
|
-
"react-dom": "^19.1.0"
|
|
68
|
+
"vitest": "^2.1.9",
|
|
69
|
+
"xml-formatter": "^3.6.7"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"react": "^18.0 || ^19.0 || >= 19.0.0-rc",
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
defaultBlockSpecs,
|
|
5
5
|
} from "@blocknote/core";
|
|
6
6
|
import { testDocument } from "@shared/testDocument.js";
|
|
7
|
-
import { BlobReader, TextWriter, ZipReader } from "@zip.js/zip.js";
|
|
7
|
+
import { BlobReader, FileEntry, TextWriter, ZipReader } from "@zip.js/zip.js";
|
|
8
8
|
import { beforeAll, describe, expect, it } from "vitest";
|
|
9
9
|
import xmlFormat from "xml-formatter";
|
|
10
10
|
import { odtDefaultSchemaMappings } from "./defaultSchema/index.js";
|
|
@@ -154,17 +154,19 @@ async function testODTDocumentAgainstSnapshot(
|
|
|
154
154
|
const entries = await zipReader.getEntries();
|
|
155
155
|
const stylesXMLWriter = new TextWriter();
|
|
156
156
|
const contentXMLWriter = new TextWriter();
|
|
157
|
-
const stylesXML = entries.find(
|
|
157
|
+
const stylesXML = entries.find(
|
|
158
|
+
(entry) => entry.filename === "styles.xml",
|
|
159
|
+
) as FileEntry;
|
|
158
160
|
const contentXML = entries.find((entry) => {
|
|
159
161
|
return entry.filename === "content.xml";
|
|
160
|
-
});
|
|
162
|
+
}) as FileEntry;
|
|
161
163
|
|
|
162
164
|
expect(stylesXML).toBeDefined();
|
|
163
165
|
expect(contentXML).toBeDefined();
|
|
164
166
|
expect(
|
|
165
|
-
xmlFormat(await stylesXML
|
|
167
|
+
xmlFormat(await stylesXML.getData(stylesXMLWriter)),
|
|
166
168
|
).toMatchFileSnapshot(snapshots.styles);
|
|
167
169
|
expect(
|
|
168
|
-
xmlFormat(await contentXML
|
|
170
|
+
xmlFormat(await contentXML.getData(contentXMLWriter)),
|
|
169
171
|
).toMatchFileSnapshot(snapshots.content);
|
|
170
172
|
}
|
package/src/odt/odtExporter.tsx
CHANGED
|
@@ -81,12 +81,12 @@ export class ODTExporter<
|
|
|
81
81
|
{
|
|
82
82
|
name: "Inter 18pt",
|
|
83
83
|
fileName: "Inter_18pt-Regular.ttf",
|
|
84
|
-
data: new Blob([interFont], { type: "font/ttf" }),
|
|
84
|
+
data: new Blob([interFont as ArrayBuffer], { type: "font/ttf" }),
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
name: "Geist Mono",
|
|
88
88
|
fileName: "GeistMono-Regular.ttf",
|
|
89
|
-
data: new Blob([geistMonoFont], { type: "font/ttf" }),
|
|
89
|
+
data: new Blob([geistMonoFont as ArrayBuffer], { type: "font/ttf" }),
|
|
90
90
|
},
|
|
91
91
|
];
|
|
92
92
|
}
|