@jobber/components-native 0.70.1-CLEANUPex-e95f16e.2 → 0.70.1-CLEANUPex-46b7571.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.70.1-CLEANUPex-e95f16e.2+e95f16e9",
3
+ "version": "0.70.1-CLEANUPex-46b7571.4+46b7571a",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -82,5 +82,5 @@
82
82
  "react-native-safe-area-context": "^4.5.2",
83
83
  "react-native-svg": ">=12.0.0"
84
84
  },
85
- "gitHead": "e95f16e9ba785cb1e14de3f3cf39096563784f86"
85
+ "gitHead": "46b7571a2a86011e539117702c9d103d20a179a3"
86
86
  }
@@ -62,6 +62,7 @@
62
62
  "TextList",
63
63
  "ThumbnailList",
64
64
  "Toast",
65
+ "Typography",
65
66
  "TypographyGestureDetector"
66
67
  ]
67
68
  }
@@ -49,6 +49,20 @@ function isForwardedRef(name: string, value: any): boolean {
49
49
  );
50
50
  }
51
51
 
52
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
53
+ function isMemoizedComponent(name: string, value: any): boolean {
54
+ const isFirstLetterUppercase = /^[A-Z]/.test(name);
55
+
56
+ return (
57
+ isFirstLetterUppercase &&
58
+ value &&
59
+ typeof value === "object" &&
60
+ typeof value.$$typeof === "symbol" &&
61
+ value.$$typeof.toString() === "Symbol(react.memo)" &&
62
+ typeof value.type === "function"
63
+ );
64
+ }
65
+
52
66
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
53
67
  function findComponentNamesDeep(objectOrFunction: any, name?: string) {
54
68
  const entries = [...Object.entries(objectOrFunction)];
@@ -56,7 +70,7 @@ function findComponentNamesDeep(objectOrFunction: any, name?: string) {
56
70
  return entries.reduce<string[]>((allNames, [k, v]) => {
57
71
  if (isContext(v)) {
58
72
  allNames.push(`${k}.Provider`, `${k}.Consumer`);
59
- } else if (isForwardedRef(k, v)) {
73
+ } else if (isForwardedRef(k, v) || isMemoizedComponent(k, v)) {
60
74
  allNames.push(k);
61
75
  } else if (isComponent(k, v)) {
62
76
  const thisName = name ? `${name}.${k}` : k;