@pagenflow/email 1.4.4 → 1.4.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.
- package/dist/components/Button.d.ts +4 -0
- package/dist/components/Column.d.ts +1 -1
- package/dist/components/Container.d.ts +1 -1
- package/dist/components/Image.d.ts +8 -0
- package/dist/components/Row.d.ts +1 -1
- package/dist/components/Section.d.ts +1 -1
- package/dist/components/Text.d.ts +2 -1
- package/dist/index.cjs.js +5 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +5 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/types/IInnerLink.d.ts +17 -0
- package/package.json +1 -1
|
@@ -4,6 +4,10 @@ import IInnerLink from "../types/IInnerLink";
|
|
|
4
4
|
export interface ButtonConfig {
|
|
5
5
|
/** Link configuration for the button destination. Required. */
|
|
6
6
|
innerLink?: IInnerLink;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Use innerLink property instead
|
|
9
|
+
*/
|
|
10
|
+
href?: string;
|
|
7
11
|
/** Button text. */
|
|
8
12
|
children: ReactNode;
|
|
9
13
|
/** Background color. Required for VML compatibility. */
|
|
@@ -31,6 +31,14 @@ export interface ImageConfig {
|
|
|
31
31
|
borderRadius?: string;
|
|
32
32
|
border?: BorderConfig;
|
|
33
33
|
innerLink?: IInnerLink;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Use innerLink property instead
|
|
36
|
+
*/
|
|
37
|
+
href?: string;
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Use innerLink property instead
|
|
40
|
+
*/
|
|
41
|
+
target?: string;
|
|
34
42
|
objectFit?: CSSProperties["objectFit"];
|
|
35
43
|
objectPosition?: string;
|
|
36
44
|
mobile?: ImageMobileConfig;
|
package/dist/components/Row.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface TextConfig {
|
|
|
17
17
|
/** Font style (e.g., 'italic'). */
|
|
18
18
|
fontStyle?: string;
|
|
19
19
|
/** Line height (e.g., '1.5' or '24px'). */
|
|
20
|
-
lineHeight?: string;
|
|
20
|
+
lineHeight?: string | number;
|
|
21
21
|
/** Letter spacing (e.g., '0.5px', '1px'). */
|
|
22
22
|
letterSpacing?: string;
|
|
23
23
|
/** Text transform (e.g., 'uppercase', 'lowercase', 'capitalize'). */
|
|
@@ -37,6 +37,7 @@ export interface TextConfig {
|
|
|
37
37
|
/** Word break behavior (e.g., 'break-all', 'break-word', 'keep-all', 'normal'). */
|
|
38
38
|
wordBreak?: string;
|
|
39
39
|
maxWidth?: string;
|
|
40
|
+
listStyle?: string;
|
|
40
41
|
}
|
|
41
42
|
export type TextProps = {
|
|
42
43
|
config: TextConfig;
|
package/dist/index.cjs.js
CHANGED
|
@@ -1623,7 +1623,9 @@ function Button({ config, devMode }) {
|
|
|
1623
1623
|
let vmlButton = "";
|
|
1624
1624
|
if (!useSimpleOutlookApproach) {
|
|
1625
1625
|
// VML needs fixed pixel height. We estimate it based on padding and potential wrapping.
|
|
1626
|
-
const numericPadding = padding
|
|
1626
|
+
const numericPadding = padding
|
|
1627
|
+
? parseInt(padding.split(" ")[0] || "12", 10)
|
|
1628
|
+
: 12;
|
|
1627
1629
|
const numericFontSize = fontSize ? parseInt(fontSize, 10) : 0;
|
|
1628
1630
|
const numericLineHeight = lineHeight
|
|
1629
1631
|
? lineHeight.includes("px")
|
|
@@ -2864,7 +2866,7 @@ function Spacer({ config, devNode }) {
|
|
|
2864
2866
|
var Spacer_default = React.memo(Spacer, arePropsEqual);
|
|
2865
2867
|
|
|
2866
2868
|
function Text({ config, devMode, children }) {
|
|
2867
|
-
const { text, padding, color, textAlign, fontFamily, fontSize, fontWeight, fontStyle, lineHeight, letterSpacing, textTransform, textDecoration, direction, verticalAlign, backgroundColor, opacity, whiteSpace, wordBreak = "break-all", maxWidth } = config;
|
|
2869
|
+
const { text, padding, color, textAlign, fontFamily, fontSize, fontWeight, fontStyle, lineHeight, letterSpacing, textTransform, textDecoration, direction, verticalAlign, backgroundColor, opacity, whiteSpace, wordBreak = "break-all", maxWidth, } = config;
|
|
2868
2870
|
// 1. TD Style: Where padding and background are reliably applied.
|
|
2869
2871
|
const tdStyle = {
|
|
2870
2872
|
padding: padding,
|
|
@@ -2891,7 +2893,7 @@ function Text({ config, devMode, children }) {
|
|
|
2891
2893
|
wordBreak: wordBreak,
|
|
2892
2894
|
margin: "0",
|
|
2893
2895
|
padding: "0",
|
|
2894
|
-
maxWidth
|
|
2896
|
+
maxWidth,
|
|
2895
2897
|
};
|
|
2896
2898
|
// Determine content to render
|
|
2897
2899
|
const content = text !== null && text !== void 0 ? text : children;
|