@pagenflow/email 1.1.2 → 1.1.5

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.
@@ -2,7 +2,7 @@ import { ReactNode } from "react";
2
2
  export type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
3
3
  export interface HeadingConfig {
4
4
  /** The text content. */
5
- text: ReactNode;
5
+ text?: ReactNode;
6
6
  /** HTML heading level (h1 through h6). */
7
7
  level?: HeadingLevel;
8
8
  /** Padding around the heading (e.g., "10px 0"). */
@@ -28,7 +28,8 @@ export interface HeadingConfig {
28
28
  export type HeadingProps = {
29
29
  config: HeadingConfig;
30
30
  devMode?: ReactNode;
31
+ children?: ReactNode;
31
32
  };
32
- declare function Heading({ config, devMode }: HeadingProps): import("react/jsx-runtime").JSX.Element;
33
+ declare function Heading({ config, devMode, children }: HeadingProps): import("react/jsx-runtime").JSX.Element;
33
34
  declare const _default: import("react").MemoExoticComponent<typeof Heading>;
34
35
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from "react";
2
2
  export interface TextConfig {
3
3
  /** The text content or React nodes to render. */
4
- text: string;
4
+ text?: string;
5
5
  /** Padding around the text (applied to the containing TD). */
6
6
  padding?: string;
7
7
  /** Text color. */
@@ -32,7 +32,8 @@ export interface TextConfig {
32
32
  export type TextProps = {
33
33
  config: TextConfig;
34
34
  devMode?: ReactNode;
35
+ children?: ReactNode;
35
36
  };
36
- declare function Text({ config, devMode }: TextProps): import("react/jsx-runtime").JSX.Element;
37
+ declare function Text({ config, devMode, children }: TextProps): import("react/jsx-runtime").JSX.Element;
37
38
  declare const _default: import("react").MemoExoticComponent<typeof Text>;
38
39
  export default _default;
package/dist/index.cjs.js CHANGED
@@ -17929,7 +17929,8 @@ function HeadDev({ children, backgroundColor = "#ffffff", title = "Email Preview
17929
17929
  return null;
17930
17930
  }
17931
17931
 
17932
- function Heading({ config, devMode }) {
17932
+ function Heading({ config, devMode, children }) {
17933
+ var _a;
17933
17934
  const { text, level = "h1", padding, color, textAlign, fontSize, fontWeight, fontStyle, lineHeight, letterSpacing, textTransform, textDecoration, direction, verticalAlign, backgroundColor, } = config;
17934
17935
  // 1. TD Style: Where padding, background, width, and verticalAlign are applied.
17935
17936
  const tdStyle = {
@@ -17966,7 +17967,7 @@ function Heading({ config, devMode }) {
17966
17967
  jsxRuntime.jsx("table", { "aria-label": "Heading Block Wrapper", role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: {
17967
17968
  width: "100%",
17968
17969
  borderCollapse: "collapse",
17969
- }, children: jsxRuntime.jsx("tbody", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { style: tdStyle, align: textAlign, children: jsxRuntime.jsx(HeadingTag, { style: headingStyle, dangerouslySetInnerHTML: { __html: text !== null && text !== void 0 ? text : "" } }) }) }) }) }));
17970
+ }, children: jsxRuntime.jsx("tbody", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { style: tdStyle, align: textAlign, children: jsxRuntime.jsx(HeadingTag, { style: headingStyle, dangerouslySetInnerHTML: { __html: (_a = text !== null && text !== void 0 ? text : children) !== null && _a !== void 0 ? _a : "" } }) }) }) }) }));
17970
17971
  }
17971
17972
  var Heading_default = React.memo(Heading, arePropsEqual);
17972
17973
 
@@ -18196,7 +18197,8 @@ function Spacer({ config, devNode }) {
18196
18197
  }
18197
18198
  var Spacer_default = React.memo(Spacer, arePropsEqual);
18198
18199
 
18199
- function Text({ config, devMode }) {
18200
+ function Text({ config, devMode, children }) {
18201
+ var _a;
18200
18202
  const { text, padding, color, textAlign, fontSize, fontWeight, fontStyle, lineHeight, letterSpacing, textTransform, textDecoration, direction, verticalAlign, backgroundColor, } = config;
18201
18203
  // 1. TD Style: Where padding and background are reliably applied.
18202
18204
  const tdStyle = {
@@ -18229,7 +18231,7 @@ function Text({ config, devMode }) {
18229
18231
  jsxRuntime.jsx("table", { "aria-label": "Text Block Wrapper", role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: {
18230
18232
  width: "100%",
18231
18233
  borderCollapse: "collapse",
18232
- }, children: jsxRuntime.jsx("tbody", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { style: tdStyle, align: textAlign, children: jsxRuntime.jsx("div", { style: contentStyle, dangerouslySetInnerHTML: { __html: text !== null && text !== void 0 ? text : "" } }) }) }) }) }));
18234
+ }, children: jsxRuntime.jsx("tbody", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { style: tdStyle, align: textAlign, children: jsxRuntime.jsx("div", { style: contentStyle, dangerouslySetInnerHTML: { __html: (_a = text !== null && text !== void 0 ? text : children) !== null && _a !== void 0 ? _a : "" } }) }) }) }) }));
18233
18235
  }
18234
18236
  var Text_default = React.memo(Text, arePropsEqual);
18235
18237