@react-email/render 0.0.11 → 0.0.12-canary.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/index.js CHANGED
@@ -81,7 +81,7 @@ var ReactDomServer = __toESM(require("react-dom/server"));
81
81
  var import_html_to_text = require("html-to-text");
82
82
 
83
83
  // src/utils/pretty.ts
84
- var import_js_beautify = require("js-beautify");
84
+ var import_js_beautify = __toESM(require("js-beautify"));
85
85
  var defaults = {
86
86
  unformatted: ["code", "pre", "em", "strong", "span"],
87
87
  indent_inner_html: true,
@@ -90,7 +90,7 @@ var defaults = {
90
90
  sep: "\n"
91
91
  };
92
92
  var pretty = (str, options = {}) => {
93
- return (0, import_js_beautify.html)(str, __spreadValues(__spreadValues({}, defaults), options));
93
+ return import_js_beautify.default.html(str, __spreadValues(__spreadValues({}, defaults), options));
94
94
  };
95
95
 
96
96
  // src/plain-text-selectors.ts
@@ -161,13 +161,13 @@ var renderAsync = (component, options) => __async(void 0, null, function* () {
161
161
  const renderToStream = (_a = reactDOMServer.renderToReadableStream) != null ? _a : reactDOMServer.renderToStaticNodeStream;
162
162
  const doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
163
163
  const htmlOrReadableStream = yield renderToStream(component);
164
- const html2 = typeof htmlOrReadableStream === "string" ? htmlOrReadableStream : yield readStream(htmlOrReadableStream);
164
+ const html = typeof htmlOrReadableStream === "string" ? htmlOrReadableStream : yield readStream(htmlOrReadableStream);
165
165
  if (options == null ? void 0 : options.plainText) {
166
- return (0, import_html_to_text2.convert)(html2, __spreadValues({
166
+ return (0, import_html_to_text2.convert)(html, __spreadValues({
167
167
  selectors: plainTextSelectors
168
168
  }, options.htmlToTextOptions));
169
169
  }
170
- const document = `${doctype}${html2}`;
170
+ const document = `${doctype}${html}`;
171
171
  if (options == null ? void 0 : options.pretty) {
172
172
  return pretty(document);
173
173
  }
package/dist/index.mjs CHANGED
@@ -46,7 +46,7 @@ import * as ReactDomServer from "react-dom/server";
46
46
  import { convert } from "html-to-text";
47
47
 
48
48
  // src/utils/pretty.ts
49
- import { html } from "js-beautify";
49
+ import jsBeautify from "js-beautify";
50
50
  var defaults = {
51
51
  unformatted: ["code", "pre", "em", "strong", "span"],
52
52
  indent_inner_html: true,
@@ -55,7 +55,7 @@ var defaults = {
55
55
  sep: "\n"
56
56
  };
57
57
  var pretty = (str, options = {}) => {
58
- return html(str, __spreadValues(__spreadValues({}, defaults), options));
58
+ return jsBeautify.html(str, __spreadValues(__spreadValues({}, defaults), options));
59
59
  };
60
60
 
61
61
  // src/plain-text-selectors.ts
@@ -126,13 +126,13 @@ var renderAsync = (component, options) => __async(void 0, null, function* () {
126
126
  const renderToStream = (_a = reactDOMServer.renderToReadableStream) != null ? _a : reactDOMServer.renderToStaticNodeStream;
127
127
  const doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
128
128
  const htmlOrReadableStream = yield renderToStream(component);
129
- const html2 = typeof htmlOrReadableStream === "string" ? htmlOrReadableStream : yield readStream(htmlOrReadableStream);
129
+ const html = typeof htmlOrReadableStream === "string" ? htmlOrReadableStream : yield readStream(htmlOrReadableStream);
130
130
  if (options == null ? void 0 : options.plainText) {
131
- return convert2(html2, __spreadValues({
131
+ return convert2(html, __spreadValues({
132
132
  selectors: plainTextSelectors
133
133
  }, options.htmlToTextOptions));
134
134
  }
135
- const document = `${doctype}${html2}`;
135
+ const document = `${doctype}${html}`;
136
136
  if (options == null ? void 0 : options.pretty) {
137
137
  return pretty(document);
138
138
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-email/render",
3
- "version": "0.0.11",
3
+ "version": "0.0.12-canary.0",
4
4
  "description": "Transform React components into HTML email templates",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -24,7 +24,7 @@
24
24
  "license": "MIT",
25
25
  "repository": {
26
26
  "type": "git",
27
- "url": "https://github.com/resend/react-email.git",
27
+ "url": "https://github.com/resendlabs/react-email.git",
28
28
  "directory": "packages/render"
29
29
  },
30
30
  "keywords": [
package/readme.md CHANGED
@@ -6,7 +6,7 @@
6
6
  <div align="center">
7
7
  <a href="https://react.email">Website</a>
8
8
  <span> · </span>
9
- <a href="https://github.com/resend/react-email">GitHub</a>
9
+ <a href="https://github.com/resendlabs/react-email">GitHub</a>
10
10
  <span> · </span>
11
11
  <a href="https://react.email/discord">Discord</a>
12
12
  </div>