@pagenflow/email 1.3.5 → 1.3.7

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.
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from "react";
2
+ import { BorderConfig } from "../types";
2
3
  export interface ButtonConfig {
3
4
  /** The destination URL for the button. Required. */
4
5
  href: string;
@@ -12,8 +13,12 @@ export interface ButtonConfig {
12
13
  padding?: string;
13
14
  /** Border radius (e.g., "3px"). */
14
15
  borderRadius?: string;
16
+ /** Border configuration for outline buttons. */
17
+ border?: BorderConfig;
15
18
  /** Width of the button (e.g., "200px" or "100%"). */
16
19
  width?: string;
20
+ /** Maximum width of the button (e.g., "300px"). Text will wrap if content exceeds this. */
21
+ maxWidth?: string;
17
22
  /** Horizontal alignment within the container. */
18
23
  justifyContent?: "start" | "center" | "end";
19
24
  /** Horizontal text alignment within the button (e.g., 'left', 'center'). */
@@ -10,6 +10,7 @@ export interface DividerConfig {
10
10
  margin?: string;
11
11
  /** Horizontal alignment of the divider. */
12
12
  align?: "left" | "center" | "right";
13
+ hideOnMobile?: boolean;
13
14
  }
14
15
  export type DividerProps = {
15
16
  config: DividerConfig;
@@ -6,5 +6,7 @@ export interface HeadProps {
6
6
  backgroundColor?: string;
7
7
  /** Subject line for the email title. */
8
8
  title?: string;
9
+ /** Array of gap values (e.g. ["8px", "12px", "48px"]) to generate mobile wrap margin-bottom rules */
10
+ rowGaps?: string[];
9
11
  }
10
- export default function Head({ children, backgroundColor, title, }: HeadProps): import("react/jsx-runtime").JSX.Element;
12
+ export default function Head({ children, backgroundColor, title, rowGaps, }: HeadProps): import("react/jsx-runtime").JSX.Element;
@@ -6,9 +6,11 @@ export interface HeadDevProps {
6
6
  backgroundColor?: string;
7
7
  /** Subject line for the email title. */
8
8
  title?: string;
9
+ /** Array of gap values (e.g. ["8px", "12px", "48px"]) to generate mobile wrap margin-bottom rules */
10
+ rowGaps?: string[];
9
11
  }
10
12
  /**
11
13
  * Dev variant of Head component for use in builder canvas.
12
14
  * Injects styles directly into document head to maintain email behavior during development.
13
15
  */
14
- export default function HeadDev({ children, backgroundColor, title, }: HeadDevProps): null;
16
+ export default function HeadDev({ children, backgroundColor, title, rowGaps, }: HeadDevProps): null;
@@ -31,6 +31,10 @@ export interface HeadingConfig {
31
31
  verticalAlign?: string;
32
32
  /** Background color of the heading block. */
33
33
  backgroundColor?: string;
34
+ /** Word break behavior (e.g., 'break-all', 'break-word', 'keep-all', 'normal'). */
35
+ wordBreak?: string;
36
+ /** White space handling (e.g., 'nowrap', 'pre', 'pre-wrap', 'pre-line', 'normal'). */
37
+ whiteSpace?: string;
34
38
  }
35
39
  export type HeadingProps = {
36
40
  config: HeadingConfig;
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from "react";
2
2
  import IInnerLink from "../types/IInnerLink";
3
+ import { BorderConfig } from "../types";
3
4
  export interface IconConfig {
4
5
  /** Icon identifier for the Iconify API */
5
6
  iconIdentifier?: string;
@@ -21,6 +22,8 @@ export interface IconConfig {
21
22
  padding?: string;
22
23
  /** Border radius for the icon container */
23
24
  borderRadius?: string;
25
+ /** Border configuration for the icon container */
26
+ border?: BorderConfig;
24
27
  /** Horizontal alignment within the container */
25
28
  justifyContent?: "start" | "center" | "end";
26
29
  }
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from "react";
2
+ import { BorderConfig } from "../types";
2
3
  export interface ImageConfig {
3
4
  /** The source URL of the image. Required. */
4
5
  src: string;
@@ -16,6 +17,8 @@ export interface ImageConfig {
16
17
  padding?: string;
17
18
  /** Border radius for the image (CSS only, limited compatibility). */
18
19
  borderRadius?: string;
20
+ /** Border configuration for the image. */
21
+ border?: BorderConfig;
19
22
  /** Optional URL to make the image clickable */
20
23
  href?: string;
21
24
  /** Link target attribute (e.g., "_blank" for new window) */
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from "react";
2
2
  import { AlignItems, BorderConfig, JustifyContent } from "../types";
3
+ import IInnerLink from "../types/IInnerLink";
3
4
  export interface BackgroundImageType {
4
5
  src: string;
5
6
  repeat?: "no-repeat" | "repeat" | "repeat-x" | "repeat-y";
@@ -17,6 +18,7 @@ export interface RowConfig {
17
18
  backgroundImage?: BackgroundImageType;
18
19
  borderRadius?: string;
19
20
  border?: BorderConfig;
21
+ innerLink?: IInnerLink;
20
22
  mobile?: {
21
23
  justifyContent?: JustifyContent;
22
24
  alignItems?: AlignItems;
@@ -27,7 +29,8 @@ export type RowProps = {
27
29
  children: ReactNode;
28
30
  config: RowConfig;
29
31
  devNode?: ReactNode;
32
+ devMode?: boolean;
30
33
  };
31
- declare function Row({ children, config, devNode }: RowProps): import("react/jsx-runtime").JSX.Element;
34
+ declare function Row({ children, config, devNode, devMode }: RowProps): import("react/jsx-runtime").JSX.Element;
32
35
  declare const _default: import("react").MemoExoticComponent<typeof Row>;
33
36
  export default _default;
@@ -2,6 +2,7 @@ import { ReactNode } from "react";
2
2
  export interface SpacerConfig {
3
3
  /** The height of the vertical space (e.g., "20px"). Required. */
4
4
  height: string;
5
+ hideOnMobile?: boolean;
5
6
  }
6
7
  export type SpacerProps = {
7
8
  config: SpacerConfig;
@@ -32,6 +32,8 @@ export interface TextConfig {
32
32
  opacity?: string | number;
33
33
  /** White space handling (e.g., 'normal', 'nowrap', 'pre', 'pre-wrap'). */
34
34
  whiteSpace?: string;
35
+ /** Word break behavior (e.g., 'break-all', 'break-word', 'keep-all', 'normal'). */
36
+ wordBreak?: string;
35
37
  }
36
38
  export type TextProps = {
37
39
  config: TextConfig;