@react-email/render 1.1.3 → 1.1.4
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/browser/index.js +2 -1
- package/dist/browser/index.mjs +2 -1
- package/dist/node/index.js +5 -2
- package/dist/node/index.mjs +5 -2
- package/package.json +2 -2
- package/dist/index.d.mts +0 -23
- package/dist/index.d.ts +0 -23
- package/dist/index.js +0 -768
- package/dist/index.mjs +0 -733
package/dist/browser/index.js
CHANGED
|
@@ -193,7 +193,8 @@ var render = (node, options) => __async(void 0, null, function* () {
|
|
|
193
193
|
reactDOMServer.renderToReadableStream(suspendedElement, {
|
|
194
194
|
onError(error) {
|
|
195
195
|
reject(error);
|
|
196
|
-
}
|
|
196
|
+
},
|
|
197
|
+
progressiveChunkSize: Number.POSITIVE_INFINITY
|
|
197
198
|
}).then(readStream).then(resolve).catch(reject);
|
|
198
199
|
});
|
|
199
200
|
if (options == null ? void 0 : options.plainText) {
|
package/dist/browser/index.mjs
CHANGED
|
@@ -157,7 +157,8 @@ var render = (node, options) => __async(void 0, null, function* () {
|
|
|
157
157
|
reactDOMServer.renderToReadableStream(suspendedElement, {
|
|
158
158
|
onError(error) {
|
|
159
159
|
reject(error);
|
|
160
|
-
}
|
|
160
|
+
},
|
|
161
|
+
progressiveChunkSize: Number.POSITIVE_INFINITY
|
|
161
162
|
}).then(readStream).then(resolve).catch(reject);
|
|
162
163
|
});
|
|
163
164
|
if (options == null ? void 0 : options.plainText) {
|
package/dist/node/index.js
CHANGED
|
@@ -194,7 +194,9 @@ var render = (node, options) => __async(void 0, null, function* () {
|
|
|
194
194
|
let html2;
|
|
195
195
|
if (Object.hasOwn(reactDOMServer, "renderToReadableStream")) {
|
|
196
196
|
html2 = yield readStream(
|
|
197
|
-
yield reactDOMServer.renderToReadableStream(suspendedElement
|
|
197
|
+
yield reactDOMServer.renderToReadableStream(suspendedElement, {
|
|
198
|
+
progressiveChunkSize: Number.POSITIVE_INFINITY
|
|
199
|
+
})
|
|
198
200
|
);
|
|
199
201
|
} else {
|
|
200
202
|
yield new Promise((resolve, reject) => {
|
|
@@ -207,7 +209,8 @@ var render = (node, options) => __async(void 0, null, function* () {
|
|
|
207
209
|
},
|
|
208
210
|
onError(error) {
|
|
209
211
|
reject(error);
|
|
210
|
-
}
|
|
212
|
+
},
|
|
213
|
+
progressiveChunkSize: Number.POSITIVE_INFINITY
|
|
211
214
|
});
|
|
212
215
|
});
|
|
213
216
|
}
|
package/dist/node/index.mjs
CHANGED
|
@@ -158,7 +158,9 @@ var render = (node, options) => __async(void 0, null, function* () {
|
|
|
158
158
|
let html2;
|
|
159
159
|
if (Object.hasOwn(reactDOMServer, "renderToReadableStream")) {
|
|
160
160
|
html2 = yield readStream(
|
|
161
|
-
yield reactDOMServer.renderToReadableStream(suspendedElement
|
|
161
|
+
yield reactDOMServer.renderToReadableStream(suspendedElement, {
|
|
162
|
+
progressiveChunkSize: Number.POSITIVE_INFINITY
|
|
163
|
+
})
|
|
162
164
|
);
|
|
163
165
|
} else {
|
|
164
166
|
yield new Promise((resolve, reject) => {
|
|
@@ -171,7 +173,8 @@ var render = (node, options) => __async(void 0, null, function* () {
|
|
|
171
173
|
},
|
|
172
174
|
onError(error) {
|
|
173
175
|
reject(error);
|
|
174
|
-
}
|
|
176
|
+
},
|
|
177
|
+
progressiveChunkSize: Number.POSITIVE_INFINITY
|
|
175
178
|
});
|
|
176
179
|
});
|
|
177
180
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-email/render",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Transform React components into HTML email templates",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/browser/index.js",
|
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
},
|
|
102
102
|
"scripts": {
|
|
103
103
|
"build": "tsup-node",
|
|
104
|
+
"build:watch": "tsup-node --watch",
|
|
104
105
|
"clean": "rm -rf dist",
|
|
105
|
-
"dev": "tsup-node --watch",
|
|
106
106
|
"test": "vitest run",
|
|
107
107
|
"test:watch": "vitest"
|
|
108
108
|
}
|
package/dist/index.d.mts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { HtmlToTextOptions } from 'html-to-text';
|
|
2
|
-
import { Options as Options$1 } from 'prettier';
|
|
3
|
-
|
|
4
|
-
type Options = {
|
|
5
|
-
pretty?: boolean;
|
|
6
|
-
} & ({
|
|
7
|
-
plainText?: false;
|
|
8
|
-
} | {
|
|
9
|
-
plainText?: true;
|
|
10
|
-
/**
|
|
11
|
-
* These are options you can pass down directly to the library we use for
|
|
12
|
-
* converting the rendered email's HTML into plain text.
|
|
13
|
-
*
|
|
14
|
-
* @see https://github.com/html-to-text/node-html-to-text
|
|
15
|
-
*/
|
|
16
|
-
htmlToTextOptions?: HtmlToTextOptions;
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
declare const render: (element: React.ReactElement, options?: Options) => Promise<string>;
|
|
20
|
-
|
|
21
|
-
declare const pretty: (str: string, options?: Options$1) => Promise<string>;
|
|
22
|
-
|
|
23
|
-
export { Options, pretty, render };
|
package/dist/index.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { HtmlToTextOptions } from 'html-to-text';
|
|
2
|
-
import { Options as Options$1 } from 'prettier';
|
|
3
|
-
|
|
4
|
-
type Options = {
|
|
5
|
-
pretty?: boolean;
|
|
6
|
-
} & ({
|
|
7
|
-
plainText?: false;
|
|
8
|
-
} | {
|
|
9
|
-
plainText?: true;
|
|
10
|
-
/**
|
|
11
|
-
* These are options you can pass down directly to the library we use for
|
|
12
|
-
* converting the rendered email's HTML into plain text.
|
|
13
|
-
*
|
|
14
|
-
* @see https://github.com/html-to-text/node-html-to-text
|
|
15
|
-
*/
|
|
16
|
-
htmlToTextOptions?: HtmlToTextOptions;
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
declare const render: (element: React.ReactElement, options?: Options) => Promise<string>;
|
|
20
|
-
|
|
21
|
-
declare const pretty: (str: string, options?: Options$1) => Promise<string>;
|
|
22
|
-
|
|
23
|
-
export { Options, pretty, render };
|