@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.
@@ -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.0.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
  }