react-email 4.0.15 → 4.0.16
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/CHANGELOG.md +6 -0
- package/dist/cli/index.d.mts +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +2785 -0
- package/dist/cli/index.mjs +1 -1
- package/dist/index.d.mts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +1407 -0
- package/dist/index.mjs +21 -0
- package/dist/package/index.d.mts +33 -0
- package/dist/package/index.d.ts +33 -0
- package/dist/package/index.js +62 -0
- package/dist/package/index.mjs +7 -0
- package/dist/preview/.next/BUILD_ID +1 -1
- package/dist/preview/.next/app-build-manifest.json +10 -10
- package/dist/preview/.next/app-path-routes-manifest.json +1 -1
- package/dist/preview/.next/build-manifest.json +3 -3
- package/dist/preview/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/preview/.next/next-server.js.nft.json +1 -1
- package/dist/preview/.next/prerender-manifest.json +3 -3
- package/dist/preview/.next/required-server-files.json +4 -4
- package/dist/preview/.next/server/app/_not-found/page.js +1 -1
- package/dist/preview/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/preview/.next/server/app/favicon.ico/route.js +1 -1
- package/dist/preview/.next/server/app/page.js +1 -1
- package/dist/preview/.next/server/app/page.js.nft.json +1 -1
- package/dist/preview/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/preview/.next/server/app/preview/[...slug]/page.js +15 -15
- package/dist/preview/.next/server/app/preview/[...slug]/page.js.nft.json +1 -1
- package/dist/preview/.next/server/app/preview/[...slug]/page_client-reference-manifest.js +1 -1
- package/dist/preview/.next/server/app-paths-manifest.json +1 -1
- package/dist/preview/.next/server/chunks/235.js +4 -4
- package/dist/preview/.next/server/chunks/275.js +1 -0
- package/dist/preview/.next/server/middleware-build-manifest.js +1 -1
- package/dist/preview/.next/server/next-font-manifest.js +1 -1
- package/dist/preview/.next/server/next-font-manifest.json +1 -1
- package/dist/preview/.next/server/pages/500.html +1 -1
- package/dist/preview/.next/server/server-reference-manifest.js +1 -1
- package/dist/preview/.next/server/server-reference-manifest.json +1 -1
- package/dist/preview/.next/static/chunks/484-e38a627386aae911.js +1 -0
- package/dist/preview/.next/static/chunks/app/layout-269b5cbd8f4cd2e3.js +1 -0
- package/dist/preview/.next/static/chunks/app/page-2dbfb5b2dc4b1191.js +1 -0
- package/dist/preview/.next/static/chunks/app/preview/[...slug]/page-79e0c9b528a62f8b.js +1 -0
- package/dist/preview/.next/static/chunks/main-app-976577a424e11c75.js +1 -0
- package/dist/preview/.next/static/css/{35e8811589f0962b.css → ac3decd5d6736fbe.css} +1 -1
- package/dist/preview/.next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
- package/dist/preview/.next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
- package/dist/preview/.next/trace +27 -27
- package/dist/preview/.next/types/app/layout.ts +1 -1
- package/dist/preview/.next/types/app/page.ts +1 -1
- package/dist/preview/.next/types/app/preview/[...slug]/page.ts +1 -1
- package/package.json +1 -1
- package/src/app/layout.tsx +2 -2
- package/src/commands/testing/out/notifications/yelp-recent-login.html +1 -1
- package/src/commands/testing/out/reset-password/twitch-reset-password.html +1 -1
- package/src/components/shell.tsx +4 -1
- package/src/package/body/dist/index.d.mts +6 -0
- package/src/package/body/dist/index.d.ts +6 -0
- package/src/package/body/dist/index.js +79 -0
- package/src/package/body/dist/index.mjs +45 -0
- package/src/package/button/dist/index.d.mts +6 -0
- package/src/package/button/dist/index.d.ts +6 -0
- package/src/package/button/dist/index.js +252 -0
- package/src/package/button/dist/index.mjs +218 -0
- package/src/package/code-block/dist/index.d.mts +4906 -0
- package/src/package/code-block/dist/index.d.ts +4906 -0
- package/src/package/code-block/dist/index.js +18205 -0
- package/src/package/code-block/dist/index.mjs +18133 -0
- package/src/package/code-inline/dist/index.d.mts +11 -0
- package/src/package/code-inline/dist/index.d.ts +11 -0
- package/src/package/code-inline/dist/index.js +106 -0
- package/src/package/code-inline/dist/index.mjs +72 -0
- package/src/package/column/dist/index.d.mts +6 -0
- package/src/package/column/dist/index.d.ts +6 -0
- package/src/package/column/dist/index.js +79 -0
- package/src/package/column/dist/index.mjs +45 -0
- package/src/package/components/dist/index.d.mts +20 -0
- package/src/package/components/dist/index.d.ts +20 -0
- package/src/package/components/dist/index.js +62 -0
- package/src/package/components/dist/index.mjs +21 -0
- package/src/package/container/dist/index.d.mts +6 -0
- package/src/package/container/dist/index.d.ts +6 -0
- package/src/package/container/dist/index.js +93 -0
- package/src/package/container/dist/index.mjs +59 -0
- package/src/package/font/dist/index.d.mts +25 -0
- package/src/package/font/dist/index.d.ts +25 -0
- package/src/package/font/dist/index.js +55 -0
- package/src/package/font/dist/index.mjs +28 -0
- package/src/package/head/dist/index.d.mts +6 -0
- package/src/package/head/dist/index.d.ts +6 -0
- package/src/package/head/dist/index.js +83 -0
- package/src/package/head/dist/index.mjs +49 -0
- package/src/package/heading/dist/index.d.mts +43 -0
- package/src/package/heading/dist/index.d.ts +43 -0
- package/src/package/heading/dist/index.js +113 -0
- package/src/package/heading/dist/index.mjs +79 -0
- package/src/package/hr/dist/index.d.mts +6 -0
- package/src/package/hr/dist/index.d.ts +6 -0
- package/src/package/hr/dist/index.js +89 -0
- package/src/package/hr/dist/index.mjs +55 -0
- package/src/package/html/dist/index.d.mts +6 -0
- package/src/package/html/dist/index.d.ts +6 -0
- package/src/package/html/dist/index.js +79 -0
- package/src/package/html/dist/index.mjs +45 -0
- package/src/package/img/dist/index.d.mts +6 -0
- package/src/package/img/dist/index.d.ts +6 -0
- package/src/package/img/dist/index.js +94 -0
- package/src/package/img/dist/index.mjs +60 -0
- package/src/package/link/dist/index.d.mts +6 -0
- package/src/package/link/dist/index.d.ts +6 -0
- package/src/package/link/dist/index.js +90 -0
- package/src/package/link/dist/index.mjs +56 -0
- package/src/package/markdown/dist/index.d.mts +15 -0
- package/src/package/markdown/dist/index.d.ts +15 -0
- package/src/package/markdown/dist/index.js +92 -0
- package/src/package/markdown/dist/index.mjs +58 -0
- package/src/package/preview/dist/index.d.mts +12 -0
- package/src/package/preview/dist/index.d.ts +12 -0
- package/src/package/preview/dist/index.js +108 -0
- package/src/package/preview/dist/index.mjs +73 -0
- package/src/package/render/dist/browser/index.d.mts +24 -0
- package/src/package/render/dist/browser/index.d.ts +24 -0
- package/src/package/render/dist/browser/index.js +250 -0
- package/src/package/render/dist/browser/index.mjs +214 -0
- package/src/package/render/dist/index.d.mts +23 -0
- package/src/package/render/dist/index.d.ts +23 -0
- package/src/package/render/dist/index.js +768 -0
- package/src/package/render/dist/index.mjs +733 -0
- package/src/package/render/dist/node/index.d.mts +27 -0
- package/src/package/render/dist/node/index.d.ts +27 -0
- package/src/package/render/dist/node/index.js +212 -0
- package/src/package/render/dist/node/index.mjs +176 -0
- package/src/package/row/dist/index.d.mts +10 -0
- package/src/package/row/dist/index.d.ts +10 -0
- package/src/package/row/dist/index.js +93 -0
- package/src/package/row/dist/index.mjs +59 -0
- package/src/package/section/dist/index.d.mts +6 -0
- package/src/package/section/dist/index.d.ts +6 -0
- package/src/package/section/dist/index.js +93 -0
- package/src/package/section/dist/index.mjs +59 -0
- package/src/package/tailwind/dist/index.d.ts +19 -0
- package/src/package/tailwind/dist/index.js +48 -0
- package/src/package/tailwind/dist/index.mjs +17167 -0
- package/src/package/tailwind/dist/tailwindcss/config.d.ts +376 -0
- package/src/package/tailwind/dist/tailwindcss/generated/.gitkeep +0 -0
- package/src/package/tailwind/dist/tailwindcss/generated/colors.d.ts +298 -0
- package/src/package/tailwind/dist/tailwindcss/generated/corePluginList.d.ts +1 -0
- package/src/package/tailwind/dist/tailwindcss/generated/default-theme.d.ts +397 -0
- package/src/package/tailwind/dist/tailwindcss/index.d.ts +11 -0
- package/src/package/text/dist/index.d.mts +6 -0
- package/src/package/text/dist/index.d.ts +6 -0
- package/src/package/text/dist/index.js +89 -0
- package/src/package/text/dist/index.mjs +55 -0
- package/dist/preview/.next/server/chunks/488.js +0 -1
- package/dist/preview/.next/static/chunks/484-21e30f98c67e8d58.js +0 -1
- package/dist/preview/.next/static/chunks/app/layout-3044a159bf29302b.js +0 -1
- package/dist/preview/.next/static/chunks/app/page-ed77f0af99f8ff62.js +0 -1
- package/dist/preview/.next/static/chunks/app/preview/[...slug]/page-994a4d501e46f3f8.js +0 -1
- package/dist/preview/.next/static/chunks/main-app-5bc2d814f500db60.js +0 -1
- package/dist/preview/.next/static/media/6d93bde91c0c2823-s.woff2 +0 -0
- package/dist/preview/.next/static/media/a34f9d1faa5f3315-s.p.woff2 +0 -0
- /package/dist/preview/.next/static/{0LFN6rP55keVoTJYuP-4s → yxjkw7Y7HRLmRWkl3S43z}/_buildManifest.js +0 -0
- /package/dist/preview/.next/static/{0LFN6rP55keVoTJYuP-4s → yxjkw7Y7HRLmRWkl3S43z}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,733 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __async = (__this, __arguments, generator) => {
|
|
18
|
+
return new Promise((resolve, reject) => {
|
|
19
|
+
var fulfilled = (value) => {
|
|
20
|
+
try {
|
|
21
|
+
step(generator.next(value));
|
|
22
|
+
} catch (e) {
|
|
23
|
+
reject(e);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var rejected = (value) => {
|
|
27
|
+
try {
|
|
28
|
+
step(generator.throw(value));
|
|
29
|
+
} catch (e) {
|
|
30
|
+
reject(e);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
34
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// src/render.tsx
|
|
39
|
+
import { convert } from "html-to-text";
|
|
40
|
+
|
|
41
|
+
// src/utils/pretty.ts
|
|
42
|
+
import { format } from "prettier/standalone";
|
|
43
|
+
import html from "prettier/plugins/html";
|
|
44
|
+
var defaults = {
|
|
45
|
+
endOfLine: "lf",
|
|
46
|
+
tabWidth: 2,
|
|
47
|
+
plugins: [html],
|
|
48
|
+
parser: "html"
|
|
49
|
+
};
|
|
50
|
+
var pretty = (str, options = {}) => {
|
|
51
|
+
return format(str, __spreadValues(__spreadValues({}, defaults), options));
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// src/plain-text-selectors.ts
|
|
55
|
+
var plainTextSelectors = [
|
|
56
|
+
{ selector: "img", format: "skip" },
|
|
57
|
+
{ selector: "#__react-email-preview", format: "skip" },
|
|
58
|
+
{
|
|
59
|
+
selector: "a",
|
|
60
|
+
options: { linkBrackets: false }
|
|
61
|
+
}
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
// src/renderer/renderer.tsx
|
|
65
|
+
import ReactServer from "react-server";
|
|
66
|
+
|
|
67
|
+
// src/renderer/escape-html.ts
|
|
68
|
+
var matchHtmlRegExp = /["'&<>]/;
|
|
69
|
+
function escapeHtml(string) {
|
|
70
|
+
const str = "" + string;
|
|
71
|
+
const match = matchHtmlRegExp.exec(str);
|
|
72
|
+
if (!match) {
|
|
73
|
+
return str;
|
|
74
|
+
}
|
|
75
|
+
let escape;
|
|
76
|
+
let html2 = "";
|
|
77
|
+
let index;
|
|
78
|
+
let lastIndex = 0;
|
|
79
|
+
for (index = match.index; index < str.length; index++) {
|
|
80
|
+
switch (str.charCodeAt(index)) {
|
|
81
|
+
case 34:
|
|
82
|
+
escape = """;
|
|
83
|
+
break;
|
|
84
|
+
case 38:
|
|
85
|
+
escape = "&";
|
|
86
|
+
break;
|
|
87
|
+
case 39:
|
|
88
|
+
escape = "'";
|
|
89
|
+
break;
|
|
90
|
+
case 60:
|
|
91
|
+
escape = "<";
|
|
92
|
+
break;
|
|
93
|
+
case 62:
|
|
94
|
+
escape = ">";
|
|
95
|
+
break;
|
|
96
|
+
default:
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
if (lastIndex !== index) {
|
|
100
|
+
html2 += str.slice(lastIndex, index);
|
|
101
|
+
}
|
|
102
|
+
lastIndex = index + 1;
|
|
103
|
+
html2 += escape;
|
|
104
|
+
}
|
|
105
|
+
return lastIndex !== index ? html2 + str.slice(lastIndex, index) : html2;
|
|
106
|
+
}
|
|
107
|
+
function escapeTextForBrowser(text) {
|
|
108
|
+
if (typeof text === "object")
|
|
109
|
+
return JSON.stringify(text);
|
|
110
|
+
if (typeof text === "boolean" || typeof text === "number" || typeof text === "bigint") {
|
|
111
|
+
return "" + text;
|
|
112
|
+
}
|
|
113
|
+
return escapeHtml(text);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// src/renderer/attribute-processing/boolean-prop-to-html-attribute.ts
|
|
117
|
+
function booleanPropToHtmlAttribute(name, value) {
|
|
118
|
+
if (value === true) {
|
|
119
|
+
return ` ${name}=""`;
|
|
120
|
+
}
|
|
121
|
+
return "";
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// src/renderer/attribute-processing/get-attribute-alias.ts
|
|
125
|
+
var aliases = /* @__PURE__ */ new Map([
|
|
126
|
+
["acceptCharset", "accept-charset"],
|
|
127
|
+
["htmlFor", "for"],
|
|
128
|
+
["httpEquiv", "http-equiv"],
|
|
129
|
+
// HTML and SVG attributes, but the SVG attribute is case sensitive.],
|
|
130
|
+
["crossOrigin", "crossorigin"],
|
|
131
|
+
// This is a list of all SVG attributes that need special casing.
|
|
132
|
+
// Regular attributes that just accept strings.],
|
|
133
|
+
["accentHeight", "accent-height"],
|
|
134
|
+
["alignmentBaseline", "alignment-baseline"],
|
|
135
|
+
["arabicForm", "arabic-form"],
|
|
136
|
+
["baselineShift", "baseline-shift"],
|
|
137
|
+
["capHeight", "cap-height"],
|
|
138
|
+
["clipPath", "clip-path"],
|
|
139
|
+
["clipRule", "clip-rule"],
|
|
140
|
+
["colorInterpolation", "color-interpolation"],
|
|
141
|
+
["colorInterpolationFilters", "color-interpolation-filters"],
|
|
142
|
+
["colorProfile", "color-profile"],
|
|
143
|
+
["colorRendering", "color-rendering"],
|
|
144
|
+
["dominantBaseline", "dominant-baseline"],
|
|
145
|
+
["enableBackground", "enable-background"],
|
|
146
|
+
["fillOpacity", "fill-opacity"],
|
|
147
|
+
["fillRule", "fill-rule"],
|
|
148
|
+
["floodColor", "flood-color"],
|
|
149
|
+
["floodOpacity", "flood-opacity"],
|
|
150
|
+
["fontFamily", "font-family"],
|
|
151
|
+
["fontSize", "font-size"],
|
|
152
|
+
["fontSizeAdjust", "font-size-adjust"],
|
|
153
|
+
["fontStretch", "font-stretch"],
|
|
154
|
+
["fontStyle", "font-style"],
|
|
155
|
+
["fontVariant", "font-variant"],
|
|
156
|
+
["fontWeight", "font-weight"],
|
|
157
|
+
["glyphName", "glyph-name"],
|
|
158
|
+
["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
|
|
159
|
+
["glyphOrientationVertical", "glyph-orientation-vertical"],
|
|
160
|
+
["horizAdvX", "horiz-adv-x"],
|
|
161
|
+
["horizOriginX", "horiz-origin-x"],
|
|
162
|
+
["imageRendering", "image-rendering"],
|
|
163
|
+
["letterSpacing", "letter-spacing"],
|
|
164
|
+
["lightingColor", "lighting-color"],
|
|
165
|
+
["markerEnd", "marker-end"],
|
|
166
|
+
["markerMid", "marker-mid"],
|
|
167
|
+
["markerStart", "marker-start"],
|
|
168
|
+
["overlinePosition", "overline-position"],
|
|
169
|
+
["overlineThickness", "overline-thickness"],
|
|
170
|
+
["paintOrder", "paint-order"],
|
|
171
|
+
["panose-1", "panose-1"],
|
|
172
|
+
["pointerEvents", "pointer-events"],
|
|
173
|
+
["renderingIntent", "rendering-intent"],
|
|
174
|
+
["shapeRendering", "shape-rendering"],
|
|
175
|
+
["stopColor", "stop-color"],
|
|
176
|
+
["stopOpacity", "stop-opacity"],
|
|
177
|
+
["strikethroughPosition", "strikethrough-position"],
|
|
178
|
+
["strikethroughThickness", "strikethrough-thickness"],
|
|
179
|
+
["strokeDasharray", "stroke-dasharray"],
|
|
180
|
+
["strokeDashoffset", "stroke-dashoffset"],
|
|
181
|
+
["strokeLinecap", "stroke-linecap"],
|
|
182
|
+
["strokeLinejoin", "stroke-linejoin"],
|
|
183
|
+
["strokeMiterlimit", "stroke-miterlimit"],
|
|
184
|
+
["strokeOpacity", "stroke-opacity"],
|
|
185
|
+
["strokeWidth", "stroke-width"],
|
|
186
|
+
["textAnchor", "text-anchor"],
|
|
187
|
+
["textDecoration", "text-decoration"],
|
|
188
|
+
["textRendering", "text-rendering"],
|
|
189
|
+
["transformOrigin", "transform-origin"],
|
|
190
|
+
["underlinePosition", "underline-position"],
|
|
191
|
+
["underlineThickness", "underline-thickness"],
|
|
192
|
+
["unicodeBidi", "unicode-bidi"],
|
|
193
|
+
["unicodeRange", "unicode-range"],
|
|
194
|
+
["unitsPerEm", "units-per-em"],
|
|
195
|
+
["vAlphabetic", "v-alphabetic"],
|
|
196
|
+
["vHanging", "v-hanging"],
|
|
197
|
+
["vIdeographic", "v-ideographic"],
|
|
198
|
+
["vMathematical", "v-mathematical"],
|
|
199
|
+
["vectorEffect", "vector-effect"],
|
|
200
|
+
["vertAdvY", "vert-adv-y"],
|
|
201
|
+
["vertOriginX", "vert-origin-x"],
|
|
202
|
+
["vertOriginY", "vert-origin-y"],
|
|
203
|
+
["wordSpacing", "word-spacing"],
|
|
204
|
+
["writingMode", "writing-mode"],
|
|
205
|
+
["xmlnsXlink", "xmlns:xlink"],
|
|
206
|
+
["xHeight", "x-height"]
|
|
207
|
+
]);
|
|
208
|
+
function getAttributeAlias(name) {
|
|
209
|
+
return aliases.get(name) || name;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// src/renderer/attribute-processing/is-attribute-name-safe.ts
|
|
213
|
+
var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
|
|
214
|
+
var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
|
|
215
|
+
var VALID_ATTRIBUTE_NAME_REGEX = new RegExp(
|
|
216
|
+
"^[" + ATTRIBUTE_NAME_START_CHAR + "][" + ATTRIBUTE_NAME_CHAR + "]*$"
|
|
217
|
+
);
|
|
218
|
+
var illegalAttributeNameCache = {};
|
|
219
|
+
var validatedAttributeNameCache = {};
|
|
220
|
+
function isAttributeNameSafe(attributeName) {
|
|
221
|
+
if (Object.hasOwn(validatedAttributeNameCache, attributeName)) {
|
|
222
|
+
return true;
|
|
223
|
+
}
|
|
224
|
+
if (Object.hasOwn(illegalAttributeNameCache, attributeName)) {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
|
|
228
|
+
validatedAttributeNameCache[attributeName] = true;
|
|
229
|
+
return true;
|
|
230
|
+
}
|
|
231
|
+
illegalAttributeNameCache[attributeName] = true;
|
|
232
|
+
console.error("Invalid attribute name: `%s`", attributeName);
|
|
233
|
+
return false;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// src/renderer/attribute-processing/string-prop-to-html-attribute.ts
|
|
237
|
+
function stringPropToHtmlAttribute(name, value) {
|
|
238
|
+
if (typeof value !== "function" && typeof value !== "symbol" && typeof value !== "boolean") {
|
|
239
|
+
return ` ${name}="${escapeTextForBrowser(value)}"`;
|
|
240
|
+
}
|
|
241
|
+
return "";
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// src/renderer/attribute-processing/style/is-unitless-number.ts
|
|
245
|
+
var unitlessNumbers = /* @__PURE__ */ new Set([
|
|
246
|
+
"animationIterationCount",
|
|
247
|
+
"aspectRatio",
|
|
248
|
+
"borderImageOutset",
|
|
249
|
+
"borderImageSlice",
|
|
250
|
+
"borderImageWidth",
|
|
251
|
+
"boxFlex",
|
|
252
|
+
"boxFlexGroup",
|
|
253
|
+
"boxOrdinalGroup",
|
|
254
|
+
"columnCount",
|
|
255
|
+
"columns",
|
|
256
|
+
"flex",
|
|
257
|
+
"flexGrow",
|
|
258
|
+
"flexPositive",
|
|
259
|
+
"flexShrink",
|
|
260
|
+
"flexNegative",
|
|
261
|
+
"flexOrder",
|
|
262
|
+
"gridArea",
|
|
263
|
+
"gridRow",
|
|
264
|
+
"gridRowEnd",
|
|
265
|
+
"gridRowSpan",
|
|
266
|
+
"gridRowStart",
|
|
267
|
+
"gridColumn",
|
|
268
|
+
"gridColumnEnd",
|
|
269
|
+
"gridColumnSpan",
|
|
270
|
+
"gridColumnStart",
|
|
271
|
+
"fontWeight",
|
|
272
|
+
"lineClamp",
|
|
273
|
+
"lineHeight",
|
|
274
|
+
"opacity",
|
|
275
|
+
"order",
|
|
276
|
+
"orphans",
|
|
277
|
+
"scale",
|
|
278
|
+
"tabSize",
|
|
279
|
+
"widows",
|
|
280
|
+
"zIndex",
|
|
281
|
+
"zoom",
|
|
282
|
+
"fillOpacity",
|
|
283
|
+
// SVG-related properties
|
|
284
|
+
"floodOpacity",
|
|
285
|
+
"stopOpacity",
|
|
286
|
+
"strokeDasharray",
|
|
287
|
+
"strokeDashoffset",
|
|
288
|
+
"strokeMiterlimit",
|
|
289
|
+
"strokeOpacity",
|
|
290
|
+
"strokeWidth",
|
|
291
|
+
"MozAnimationIterationCount",
|
|
292
|
+
// Known Prefixed Properties
|
|
293
|
+
"MozBoxFlex",
|
|
294
|
+
// TODO: Remove these since they shouldn't be used in modern code
|
|
295
|
+
"MozBoxFlexGroup",
|
|
296
|
+
"MozLineClamp",
|
|
297
|
+
"msAnimationIterationCount",
|
|
298
|
+
"msFlex",
|
|
299
|
+
"msZoom",
|
|
300
|
+
"msFlexGrow",
|
|
301
|
+
"msFlexNegative",
|
|
302
|
+
"msFlexOrder",
|
|
303
|
+
"msFlexPositive",
|
|
304
|
+
"msFlexShrink",
|
|
305
|
+
"msGridColumn",
|
|
306
|
+
"msGridColumnSpan",
|
|
307
|
+
"msGridRow",
|
|
308
|
+
"msGridRowSpan",
|
|
309
|
+
"WebkitAnimationIterationCount",
|
|
310
|
+
"WebkitBoxFlex",
|
|
311
|
+
"WebKitBoxFlexGroup",
|
|
312
|
+
"WebkitBoxOrdinalGroup",
|
|
313
|
+
"WebkitColumnCount",
|
|
314
|
+
"WebkitColumns",
|
|
315
|
+
"WebkitFlex",
|
|
316
|
+
"WebkitFlexGrow",
|
|
317
|
+
"WebkitFlexPositive",
|
|
318
|
+
"WebkitFlexShrink",
|
|
319
|
+
"WebkitLineClamp"
|
|
320
|
+
]);
|
|
321
|
+
function isUnitlessNumber(name) {
|
|
322
|
+
return unitlessNumbers.has(name);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// src/renderer/attribute-processing/style/hyphenate-style-name.ts
|
|
326
|
+
var uppercasePattern = /([A-Z])/g;
|
|
327
|
+
var msPattern = /^ms-/;
|
|
328
|
+
function hyphenateStyleName(name) {
|
|
329
|
+
return name.replace(uppercasePattern, "-$1").toLowerCase().replace(msPattern, "-ms-");
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// src/renderer/attribute-processing/style/process-style-name.ts
|
|
333
|
+
var styleNameCache = /* @__PURE__ */ new Map();
|
|
334
|
+
function processStyleName(styleName) {
|
|
335
|
+
if (!styleNameCache.has(styleName)) {
|
|
336
|
+
styleNameCache.set(styleName, hyphenateStyleName(styleName));
|
|
337
|
+
}
|
|
338
|
+
return styleNameCache.get(styleName);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// src/renderer/attribute-processing/style-prop-to-html-attribute.ts
|
|
342
|
+
function stylePropToHtmlAttribute(style) {
|
|
343
|
+
if (typeof style !== "object") {
|
|
344
|
+
throw new Error(
|
|
345
|
+
"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
|
|
346
|
+
);
|
|
347
|
+
}
|
|
348
|
+
let styles = [];
|
|
349
|
+
for (const [styleName, styleValue] of Object.entries(style)) {
|
|
350
|
+
if (styleValue == null || typeof styleValue === "boolean" || styleValue === "") {
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
let nameChunk;
|
|
354
|
+
let valueChunk;
|
|
355
|
+
const isCustomProperty = styleName.indexOf("--") === 0;
|
|
356
|
+
if (isCustomProperty) {
|
|
357
|
+
nameChunk = styleName;
|
|
358
|
+
valueChunk = ("" + styleValue).trim();
|
|
359
|
+
} else {
|
|
360
|
+
nameChunk = processStyleName(styleName);
|
|
361
|
+
if (typeof styleValue === "number") {
|
|
362
|
+
if (styleValue !== 0 && !isUnitlessNumber(styleName)) {
|
|
363
|
+
valueChunk = styleValue + "px";
|
|
364
|
+
} else {
|
|
365
|
+
valueChunk = "" + styleValue;
|
|
366
|
+
}
|
|
367
|
+
} else {
|
|
368
|
+
valueChunk = ("" + styleValue).trim();
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
styles.push(`${nameChunk}:${valueChunk}`);
|
|
372
|
+
}
|
|
373
|
+
return ` style="${styles.join(";").replaceAll('"', "'")}"`;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// src/renderer/attribute-processing/prop-to-html-attribute.ts
|
|
377
|
+
function propToHtmlAttribute(name, value) {
|
|
378
|
+
if (value === void 0)
|
|
379
|
+
return "";
|
|
380
|
+
switch (name) {
|
|
381
|
+
case "className": {
|
|
382
|
+
return stringPropToHtmlAttribute("class", value);
|
|
383
|
+
}
|
|
384
|
+
case "tabIndex": {
|
|
385
|
+
return stringPropToHtmlAttribute("tabindex", value);
|
|
386
|
+
}
|
|
387
|
+
case "dir":
|
|
388
|
+
case "role":
|
|
389
|
+
case "viewBox":
|
|
390
|
+
case "width":
|
|
391
|
+
case "height": {
|
|
392
|
+
return stringPropToHtmlAttribute(name, value);
|
|
393
|
+
}
|
|
394
|
+
case "style": {
|
|
395
|
+
return stylePropToHtmlAttribute(value);
|
|
396
|
+
}
|
|
397
|
+
case "defaultValue":
|
|
398
|
+
case "defaultChecked":
|
|
399
|
+
case "innerHTML":
|
|
400
|
+
case "suppressContentEditableWarning":
|
|
401
|
+
case "suppressHydrationWarning":
|
|
402
|
+
case "ref":
|
|
403
|
+
return "";
|
|
404
|
+
case "autoFocus":
|
|
405
|
+
case "multiple":
|
|
406
|
+
case "muted": {
|
|
407
|
+
return booleanPropToHtmlAttribute(name, value);
|
|
408
|
+
}
|
|
409
|
+
case "xlinkHref": {
|
|
410
|
+
if (typeof value === "function" || typeof value === "symbol" || typeof value === "boolean") {
|
|
411
|
+
return "";
|
|
412
|
+
}
|
|
413
|
+
return ` xlink:href="${escapeTextForBrowser(value)}"`;
|
|
414
|
+
}
|
|
415
|
+
case "contentEditable":
|
|
416
|
+
case "spellCheck":
|
|
417
|
+
case "draggable":
|
|
418
|
+
case "value":
|
|
419
|
+
case "autoReverse":
|
|
420
|
+
case "externalResourcesRequired":
|
|
421
|
+
case "focusable":
|
|
422
|
+
case "preserveAlpha": {
|
|
423
|
+
if (typeof value !== "function" && typeof value !== "symbol") {
|
|
424
|
+
return ` ${name}="${escapeTextForBrowser(value)}"`;
|
|
425
|
+
}
|
|
426
|
+
return "";
|
|
427
|
+
}
|
|
428
|
+
case "allowFullScreen":
|
|
429
|
+
case "async":
|
|
430
|
+
case "autoPlay":
|
|
431
|
+
case "controls":
|
|
432
|
+
case "default":
|
|
433
|
+
case "defer":
|
|
434
|
+
case "disabled":
|
|
435
|
+
case "disablePictureInPicture":
|
|
436
|
+
case "disableRemotePlayback":
|
|
437
|
+
case "formNoValidate":
|
|
438
|
+
case "hidden":
|
|
439
|
+
case "loop":
|
|
440
|
+
case "noModule":
|
|
441
|
+
case "noValidate":
|
|
442
|
+
case "open":
|
|
443
|
+
case "playsInline":
|
|
444
|
+
case "readOnly":
|
|
445
|
+
case "required":
|
|
446
|
+
case "reversed":
|
|
447
|
+
case "scoped":
|
|
448
|
+
case "seamless":
|
|
449
|
+
case "itemScope": {
|
|
450
|
+
if (value && typeof value !== "function" && typeof value !== "symbol") {
|
|
451
|
+
return ` ${name}=""`;
|
|
452
|
+
}
|
|
453
|
+
return "";
|
|
454
|
+
}
|
|
455
|
+
case "capture":
|
|
456
|
+
case "download": {
|
|
457
|
+
if (value === true) {
|
|
458
|
+
return ` ${name}=""`;
|
|
459
|
+
} else if (value === false) {
|
|
460
|
+
} else if (typeof value !== "function" && typeof value !== "symbol") {
|
|
461
|
+
return ` ${name}="${escapeTextForBrowser(value)}"`;
|
|
462
|
+
}
|
|
463
|
+
return "";
|
|
464
|
+
}
|
|
465
|
+
case "cols":
|
|
466
|
+
case "rows":
|
|
467
|
+
case "size":
|
|
468
|
+
case "span": {
|
|
469
|
+
if (typeof value !== "function" && typeof value !== "symbol" && !isNaN(value) && value >= 1) {
|
|
470
|
+
return ` ${name}="${escapeTextForBrowser(value)}"`;
|
|
471
|
+
}
|
|
472
|
+
return "";
|
|
473
|
+
}
|
|
474
|
+
case "rowSpan":
|
|
475
|
+
case "start": {
|
|
476
|
+
if (typeof value !== "function" && typeof value !== "symbol" && !isNaN(value)) {
|
|
477
|
+
return ` ${name}="${escapeTextForBrowser(value)}"`;
|
|
478
|
+
}
|
|
479
|
+
return "";
|
|
480
|
+
}
|
|
481
|
+
case "xlinkActuate":
|
|
482
|
+
return stringPropToHtmlAttribute("xlink:actuate", escapeTextForBrowser(value));
|
|
483
|
+
case "xlinkArcrole":
|
|
484
|
+
return stringPropToHtmlAttribute("xlink:arcrole", escapeTextForBrowser(value));
|
|
485
|
+
case "xlinkRole":
|
|
486
|
+
return stringPropToHtmlAttribute("xlink:role", escapeTextForBrowser(value));
|
|
487
|
+
case "xlinkShow":
|
|
488
|
+
return stringPropToHtmlAttribute("xlink:show", escapeTextForBrowser(value));
|
|
489
|
+
case "xlinkTitle":
|
|
490
|
+
return stringPropToHtmlAttribute("xlink:title", escapeTextForBrowser(value));
|
|
491
|
+
case "xlinkType":
|
|
492
|
+
return stringPropToHtmlAttribute("xlink:type", escapeTextForBrowser(value));
|
|
493
|
+
case "xmlBase":
|
|
494
|
+
return stringPropToHtmlAttribute("xml:base", escapeTextForBrowser(value));
|
|
495
|
+
case "xmlLang":
|
|
496
|
+
return stringPropToHtmlAttribute("xml:lang", escapeTextForBrowser(value));
|
|
497
|
+
case "xmlSpace":
|
|
498
|
+
return stringPropToHtmlAttribute("xml:space", escapeTextForBrowser(value));
|
|
499
|
+
default:
|
|
500
|
+
if (
|
|
501
|
+
// shouldIgnoreAttribute
|
|
502
|
+
// We have already filtered out null/undefined and reserved words.
|
|
503
|
+
name.length > 2 && (name[0] === "o" || name[0] === "O") && (name[1] === "n" || name[1] === "N")
|
|
504
|
+
) {
|
|
505
|
+
return "";
|
|
506
|
+
}
|
|
507
|
+
const attributeName = getAttributeAlias(name);
|
|
508
|
+
if (isAttributeNameSafe(attributeName)) {
|
|
509
|
+
switch (typeof value) {
|
|
510
|
+
case "function":
|
|
511
|
+
case "symbol":
|
|
512
|
+
return "";
|
|
513
|
+
case "boolean": {
|
|
514
|
+
const prefix = attributeName.toLowerCase().slice(0, 5);
|
|
515
|
+
if (prefix !== "data-" && prefix !== "aria-") {
|
|
516
|
+
return "";
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
return ` ${name}="${escapeTextForBrowser(value)}"`;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
return "";
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
// src/renderer/renderer.tsx
|
|
527
|
+
var Destination = class {
|
|
528
|
+
constructor() {
|
|
529
|
+
this.html = "";
|
|
530
|
+
this.decoder = new TextDecoder("utf8", {
|
|
531
|
+
fatal: true
|
|
532
|
+
});
|
|
533
|
+
this.listeners = [];
|
|
534
|
+
}
|
|
535
|
+
write(content) {
|
|
536
|
+
this.html += content;
|
|
537
|
+
}
|
|
538
|
+
writeEncoded(buffer) {
|
|
539
|
+
this.html += this.decoder.decode(buffer, { stream: true });
|
|
540
|
+
}
|
|
541
|
+
promise() {
|
|
542
|
+
return new Promise((resolve, reject) => {
|
|
543
|
+
this.listeners.push([resolve, reject]);
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
completeWithError(error) {
|
|
547
|
+
this.listeners.forEach(([_, reject]) => reject(error));
|
|
548
|
+
}
|
|
549
|
+
complete() {
|
|
550
|
+
this.listeners.forEach(([resolve]) => resolve(this.html));
|
|
551
|
+
}
|
|
552
|
+
};
|
|
553
|
+
var encoder = new TextEncoder();
|
|
554
|
+
var Renderer = ReactServer({
|
|
555
|
+
scheduleMicrotask(callback) {
|
|
556
|
+
queueMicrotask(() => callback());
|
|
557
|
+
},
|
|
558
|
+
scheduleWork(callback) {
|
|
559
|
+
setTimeout(() => {
|
|
560
|
+
callback();
|
|
561
|
+
});
|
|
562
|
+
},
|
|
563
|
+
beginWriting(destination) {
|
|
564
|
+
},
|
|
565
|
+
writeChunk(destination, buffer) {
|
|
566
|
+
destination.writeEncoded(buffer);
|
|
567
|
+
},
|
|
568
|
+
writeChunkAndReturn(destination, buffer) {
|
|
569
|
+
destination.writeEncoded(buffer);
|
|
570
|
+
return true;
|
|
571
|
+
},
|
|
572
|
+
completeWriting(destination) {
|
|
573
|
+
},
|
|
574
|
+
close(destination) {
|
|
575
|
+
destination.complete();
|
|
576
|
+
},
|
|
577
|
+
closeWithError(destination, error) {
|
|
578
|
+
destination.completeWithError(error);
|
|
579
|
+
},
|
|
580
|
+
flushBuffered(destination) {
|
|
581
|
+
},
|
|
582
|
+
getChildFormatContext() {
|
|
583
|
+
return null;
|
|
584
|
+
},
|
|
585
|
+
resetResumableState() {
|
|
586
|
+
},
|
|
587
|
+
completeResumableState() {
|
|
588
|
+
},
|
|
589
|
+
pushTextInstance(target, text, renderState, textEmbedded) {
|
|
590
|
+
target.push(encoder.encode(escapeTextForBrowser(text)));
|
|
591
|
+
return true;
|
|
592
|
+
},
|
|
593
|
+
pushStartInstance(target, type, props) {
|
|
594
|
+
target.push(encoder.encode(`<${type}`));
|
|
595
|
+
let dangerouslySetInnerHTML = void 0;
|
|
596
|
+
let children = void 0;
|
|
597
|
+
for (const [name, value] of Object.entries(props)) {
|
|
598
|
+
if (name === "children") {
|
|
599
|
+
children = value;
|
|
600
|
+
continue;
|
|
601
|
+
} else if (name === "dangerouslySetInnerHTML") {
|
|
602
|
+
dangerouslySetInnerHTML = value;
|
|
603
|
+
continue;
|
|
604
|
+
}
|
|
605
|
+
target.push(encoder.encode(propToHtmlAttribute(name, value)));
|
|
606
|
+
}
|
|
607
|
+
target.push(encoder.encode(">"));
|
|
608
|
+
if (dangerouslySetInnerHTML !== void 0) {
|
|
609
|
+
if (children !== void 0) {
|
|
610
|
+
throw new Error(
|
|
611
|
+
"Can only set one of `children` or `props.dangerouslySetInnerHTML`."
|
|
612
|
+
);
|
|
613
|
+
}
|
|
614
|
+
if (typeof dangerouslySetInnerHTML !== "object" || !("__html" in dangerouslySetInnerHTML)) {
|
|
615
|
+
throw new Error(
|
|
616
|
+
"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
|
|
617
|
+
);
|
|
618
|
+
}
|
|
619
|
+
const html2 = dangerouslySetInnerHTML.__html;
|
|
620
|
+
if (html2 !== null && html2 !== void 0) {
|
|
621
|
+
target.push(encoder.encode("" + html2));
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
if (typeof children === "string" || typeof children === "number" || typeof children === "boolean" || typeof children === "bigint") {
|
|
625
|
+
target.push(encoder.encode(escapeTextForBrowser("" + children)));
|
|
626
|
+
return null;
|
|
627
|
+
}
|
|
628
|
+
return children;
|
|
629
|
+
},
|
|
630
|
+
pushEndInstance(target, type) {
|
|
631
|
+
switch (type) {
|
|
632
|
+
case "area":
|
|
633
|
+
case "base":
|
|
634
|
+
case "br":
|
|
635
|
+
case "col":
|
|
636
|
+
case "embed":
|
|
637
|
+
case "hr":
|
|
638
|
+
case "img":
|
|
639
|
+
case "input":
|
|
640
|
+
case "keygen":
|
|
641
|
+
case "link":
|
|
642
|
+
case "meta":
|
|
643
|
+
case "param":
|
|
644
|
+
case "source":
|
|
645
|
+
case "track":
|
|
646
|
+
case "wbr": {
|
|
647
|
+
return;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
target.push(encoder.encode(`</${type}>`));
|
|
651
|
+
},
|
|
652
|
+
pushSegmentFinale(target, _, lastPushedText, textEmbedded) {
|
|
653
|
+
},
|
|
654
|
+
writeCompletedRoot() {
|
|
655
|
+
return true;
|
|
656
|
+
},
|
|
657
|
+
writePlaceholder() {
|
|
658
|
+
return true;
|
|
659
|
+
},
|
|
660
|
+
writeStartCompletedSuspenseBoundary() {
|
|
661
|
+
return true;
|
|
662
|
+
},
|
|
663
|
+
writeStartPendingSuspenseBoundary() {
|
|
664
|
+
return true;
|
|
665
|
+
},
|
|
666
|
+
writeStartClientRenderedSuspenseBoundary() {
|
|
667
|
+
return true;
|
|
668
|
+
},
|
|
669
|
+
writeEndCompletedSuspenseBoundary(destination) {
|
|
670
|
+
return true;
|
|
671
|
+
},
|
|
672
|
+
writeEndPendingSuspenseBoundary(destination) {
|
|
673
|
+
return true;
|
|
674
|
+
},
|
|
675
|
+
writeEndClientRenderedSuspenseBoundary(destination) {
|
|
676
|
+
return true;
|
|
677
|
+
},
|
|
678
|
+
writeStartSegment(destination, renderState, formatContext, id) {
|
|
679
|
+
return true;
|
|
680
|
+
},
|
|
681
|
+
writeEndSegment(destination, formatContext) {
|
|
682
|
+
return true;
|
|
683
|
+
},
|
|
684
|
+
writeCompletedSegmentInstruction(destination, renderState, contentSegmentID) {
|
|
685
|
+
return true;
|
|
686
|
+
},
|
|
687
|
+
writeCompletedBoundaryInstruction() {
|
|
688
|
+
return true;
|
|
689
|
+
},
|
|
690
|
+
writeClientRenderBoundaryInstruction() {
|
|
691
|
+
return true;
|
|
692
|
+
},
|
|
693
|
+
writePreamble(destination) {
|
|
694
|
+
destination.write(
|
|
695
|
+
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
|
|
696
|
+
);
|
|
697
|
+
},
|
|
698
|
+
writeHoistables() {
|
|
699
|
+
},
|
|
700
|
+
writeHoistablesForBoundary() {
|
|
701
|
+
},
|
|
702
|
+
writePostamble() {
|
|
703
|
+
},
|
|
704
|
+
hoistHoistables(parent, child) {
|
|
705
|
+
},
|
|
706
|
+
createHoistableState() {
|
|
707
|
+
return null;
|
|
708
|
+
},
|
|
709
|
+
emitEarlyPreloads() {
|
|
710
|
+
}
|
|
711
|
+
});
|
|
712
|
+
|
|
713
|
+
// src/render.tsx
|
|
714
|
+
var render = (element, options) => __async(void 0, null, function* () {
|
|
715
|
+
const destination = new Destination();
|
|
716
|
+
const request = Renderer.createRequest(element, null, null, null, void 0);
|
|
717
|
+
Renderer.startWork(request);
|
|
718
|
+
Renderer.startFlowing(request, destination);
|
|
719
|
+
const html2 = yield destination.promise();
|
|
720
|
+
if (options == null ? void 0 : options.plainText) {
|
|
721
|
+
return convert(html2, __spreadValues({
|
|
722
|
+
selectors: plainTextSelectors
|
|
723
|
+
}, options.htmlToTextOptions));
|
|
724
|
+
}
|
|
725
|
+
if (options == null ? void 0 : options.pretty) {
|
|
726
|
+
return pretty(html2);
|
|
727
|
+
}
|
|
728
|
+
return html2;
|
|
729
|
+
});
|
|
730
|
+
export {
|
|
731
|
+
pretty,
|
|
732
|
+
render
|
|
733
|
+
};
|