@pagenflow/email 1.0.1 → 1.1.1
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/Body.d.ts +19 -0
- package/dist/components/BodyDev.d.ts +8 -0
- package/dist/components/Button.d.ts +26 -0
- package/dist/components/Column.d.ts +52 -0
- package/dist/components/Container.d.ts +69 -0
- package/dist/components/Divider.d.ts +20 -0
- package/dist/components/Head.d.ts +10 -0
- package/dist/components/HeadDev.d.ts +14 -0
- package/dist/components/Heading.d.ts +34 -0
- package/dist/components/Html.d.ts +13 -0
- package/dist/components/Image.d.ts +29 -0
- package/dist/components/Row.d.ts +47 -0
- package/dist/components/Section.d.ts +46 -0
- package/dist/components/Spacer.d.ts +12 -0
- package/dist/components/Text.d.ts +38 -0
- package/dist/index.cjs.js +18244 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +30 -2
- package/dist/index.esm.js +18231 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/utils/memoUtils.d.ts +28 -0
- package/package.json +6 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic deep equality comparison function for React component props.
|
|
3
|
+
* Can be used with React.memo() to prevent unnecessary re-renders.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* export default memo(MyComponent, arePropsEqual);
|
|
7
|
+
*/
|
|
8
|
+
export declare function arePropsEqual<T extends Record<string, any>>(prevProps: T, nextProps: T): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Alternative: More performant version that only compares specific keys
|
|
11
|
+
* Use this if you want to optimize by ignoring certain props like callbacks
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* export default memo(MyComponent, (prev, next) =>
|
|
15
|
+
* arePropsEqualExcept(prev, next, ['onCallback'])
|
|
16
|
+
* );
|
|
17
|
+
*/
|
|
18
|
+
export declare function arePropsEqualExcept<T extends Record<string, any>>(prevProps: T, nextProps: T, excludeKeys: (keyof T)[]): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Alternative: Compare only specific keys for performance
|
|
21
|
+
* Useful when you have large props objects but only care about certain values
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* export default memo(MyComponent, (prev, next) =>
|
|
25
|
+
* arePropsEqualOnly(prev, next, ['config', 'devMode'])
|
|
26
|
+
* );
|
|
27
|
+
*/
|
|
28
|
+
export declare function arePropsEqualOnly<T extends Record<string, any>>(prevProps: T, nextProps: T, includeKeys: (keyof T)[]): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagenflow/email",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Free Email Compatible Components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"build": "rollup -c",
|
|
13
13
|
"watch": "rollup -c -w",
|
|
14
14
|
"prepublishOnly": "npm run build",
|
|
15
|
+
"link:local": "npm link @pagenflow/email",
|
|
15
16
|
"publish:patch": "npm version patch && git push && git push --tags && npm publish --access public",
|
|
16
17
|
"publish:minor": "npm version minor && git push && git push --tags && npm publish --access public",
|
|
17
18
|
"publish:major": "npm version major && git push && git push --tags && npm publish --access public"
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
35
36
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
36
37
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
38
|
+
"@types/lodash": "^4.17.23",
|
|
37
39
|
"@types/react": "^19.2.8",
|
|
38
40
|
"@types/react-dom": "^19.2.3",
|
|
39
41
|
"react": "^19.2.3",
|
|
@@ -42,5 +44,8 @@
|
|
|
42
44
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
43
45
|
"tslib": "^2.8.1",
|
|
44
46
|
"typescript": "^5.9.3"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"lodash": "^4.17.21"
|
|
45
50
|
}
|
|
46
51
|
}
|