@blocknote/xl-email-exporter 0.44.1 → 0.45.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/blocknote-xl-email-exporter.js +138 -136
- package/dist/blocknote-xl-email-exporter.js.map +1 -1
- package/dist/blocknote-xl-email-exporter.umd.cjs +1 -1
- package/dist/blocknote-xl-email-exporter.umd.cjs.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +4 -3
- package/src/react-email/reactEmailExporter.tsx +13 -1
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"directory": "packages/xl-email-exporter"
|
|
10
10
|
},
|
|
11
11
|
"license": "GPL-3.0 OR PROPRIETARY",
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.45.0",
|
|
13
13
|
"files": [
|
|
14
14
|
"dist",
|
|
15
15
|
"types",
|
|
@@ -46,8 +46,9 @@
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"
|
|
50
|
-
"@blocknote/
|
|
49
|
+
"web-streams-polyfill": "^4.2.0",
|
|
50
|
+
"@blocknote/core": "0.45.0",
|
|
51
|
+
"@blocknote/react": "0.45.0",
|
|
51
52
|
"@react-email/components": "^0.1.1",
|
|
52
53
|
"@react-email/render": "^1.4.0",
|
|
53
54
|
"buffer": "^6.0.3",
|
|
@@ -310,7 +310,15 @@ export class ReactEmailExporter<
|
|
|
310
310
|
(({ children }: { children: React.ReactNode }) => (
|
|
311
311
|
<React.Fragment>{children}</React.Fragment>
|
|
312
312
|
));
|
|
313
|
-
|
|
313
|
+
const needsPolyfill = !globalThis.ReadableByteStreamController;
|
|
314
|
+
if (needsPolyfill) {
|
|
315
|
+
// needed for safari compatibility;
|
|
316
|
+
// https://github.com/resend/react-email/blob/f02e21e998d507aa3fdfbb7b8639f915b8df6cb5/apps/docs/utilities/render.mdx#3-convert-to-html
|
|
317
|
+
(globalThis as any).ReadableByteStreamController = (
|
|
318
|
+
await import("web-streams-polyfill")
|
|
319
|
+
).default.ReadableByteStreamController;
|
|
320
|
+
}
|
|
321
|
+
const ret = await renderEmail(
|
|
314
322
|
<Html>
|
|
315
323
|
<Head>{options?.head}</Head>
|
|
316
324
|
<Body
|
|
@@ -335,6 +343,10 @@ export class ReactEmailExporter<
|
|
|
335
343
|
</Body>
|
|
336
344
|
</Html>,
|
|
337
345
|
);
|
|
346
|
+
if (needsPolyfill) {
|
|
347
|
+
delete (globalThis as any).ReadableByteStreamController;
|
|
348
|
+
}
|
|
349
|
+
return ret;
|
|
338
350
|
}
|
|
339
351
|
|
|
340
352
|
protected blocknoteDefaultPropsToReactEmailStyle(
|