@unlayer/react-elements 0.1.18 → 0.1.19
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/README.md +6 -1
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -902,7 +902,11 @@ declare function renderToPlainText(element: React__default.ReactElement, config?
|
|
|
902
902
|
* Result of renderToHtmlParts — head and body as separate strings.
|
|
903
903
|
*/
|
|
904
904
|
interface HtmlParts {
|
|
905
|
-
/**
|
|
905
|
+
/**
|
|
906
|
+
* Pre-assembled `<head>` content: the css in a `<style>` tag, the js in a
|
|
907
|
+
* `<script>` tag, and the tags — joined and ready to drop into a document.
|
|
908
|
+
* Equivalent to composing the granular fields below yourself.
|
|
909
|
+
*/
|
|
906
910
|
head: string;
|
|
907
911
|
/**
|
|
908
912
|
* The rendered body markup, wrapped in the renderer's host `<div>`. In
|
|
@@ -911,6 +915,21 @@ interface HtmlParts {
|
|
|
911
915
|
* `<body>` tag when composing a full document.
|
|
912
916
|
*/
|
|
913
917
|
body: string;
|
|
918
|
+
/** Raw component CSS (no `<style>` wrapper) — e.g. for inlining pipelines */
|
|
919
|
+
css: string;
|
|
920
|
+
/** Raw component JS (no `<script>` wrapper); empty for most email designs */
|
|
921
|
+
js: string;
|
|
922
|
+
/**
|
|
923
|
+
* Individual head tags (`<meta>`, `<link>`, ...) contributed by components.
|
|
924
|
+
* Not part of the editor's documented chunk parameters, but exposed here
|
|
925
|
+
* because `head` can contain them — without this field, reassembling the
|
|
926
|
+
* head from `css` + `js` would silently drop them. Usually empty.
|
|
927
|
+
*
|
|
928
|
+
* There is deliberately no `fonts` chunk: Elements has no font registry to
|
|
929
|
+
* resolve font URLs from — pass stylesheet URLs via renderToHtml's `fonts`
|
|
930
|
+
* option instead.
|
|
931
|
+
*/
|
|
932
|
+
tags: string[];
|
|
914
933
|
}
|
|
915
934
|
/**
|
|
916
935
|
* Renders an Unlayer element tree to separate head and body HTML strings.
|
package/dist/index.d.ts
CHANGED
|
@@ -902,7 +902,11 @@ declare function renderToPlainText(element: React__default.ReactElement, config?
|
|
|
902
902
|
* Result of renderToHtmlParts — head and body as separate strings.
|
|
903
903
|
*/
|
|
904
904
|
interface HtmlParts {
|
|
905
|
-
/**
|
|
905
|
+
/**
|
|
906
|
+
* Pre-assembled `<head>` content: the css in a `<style>` tag, the js in a
|
|
907
|
+
* `<script>` tag, and the tags — joined and ready to drop into a document.
|
|
908
|
+
* Equivalent to composing the granular fields below yourself.
|
|
909
|
+
*/
|
|
906
910
|
head: string;
|
|
907
911
|
/**
|
|
908
912
|
* The rendered body markup, wrapped in the renderer's host `<div>`. In
|
|
@@ -911,6 +915,21 @@ interface HtmlParts {
|
|
|
911
915
|
* `<body>` tag when composing a full document.
|
|
912
916
|
*/
|
|
913
917
|
body: string;
|
|
918
|
+
/** Raw component CSS (no `<style>` wrapper) — e.g. for inlining pipelines */
|
|
919
|
+
css: string;
|
|
920
|
+
/** Raw component JS (no `<script>` wrapper); empty for most email designs */
|
|
921
|
+
js: string;
|
|
922
|
+
/**
|
|
923
|
+
* Individual head tags (`<meta>`, `<link>`, ...) contributed by components.
|
|
924
|
+
* Not part of the editor's documented chunk parameters, but exposed here
|
|
925
|
+
* because `head` can contain them — without this field, reassembling the
|
|
926
|
+
* head from `css` + `js` would silently drop them. Usually empty.
|
|
927
|
+
*
|
|
928
|
+
* There is deliberately no `fonts` chunk: Elements has no font registry to
|
|
929
|
+
* resolve font URLs from — pass stylesheet URLs via renderToHtml's `fonts`
|
|
930
|
+
* option instead.
|
|
931
|
+
*/
|
|
932
|
+
tags: string[];
|
|
914
933
|
}
|
|
915
934
|
/**
|
|
916
935
|
* Renders an Unlayer element tree to separate head and body HTML strings.
|
package/dist/index.js
CHANGED