nitrogen 0.35.1 → 0.35.3

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.
@@ -43,6 +43,13 @@ ${createFileMetadataString(`${component}.mm`)}
43
43
  #import "${HybridTSpecSwift}.hpp"
44
44
  #import "${getUmbrellaHeaderName()}"
45
45
 
46
+ #if __has_include(<cxxreact/ReactNativeVersion.h>)
47
+ #include <cxxreact/ReactNativeVersion.h>
48
+ #if REACT_NATIVE_VERSION_MINOR >= 82
49
+ #define ENABLE_RCT_COMPONENT_VIEW_INVALIDATE
50
+ #endif
51
+ #endif
52
+
46
53
  using namespace facebook;
47
54
  using namespace ${namespace};
48
55
  using namespace ${namespace}::views;
@@ -126,11 +133,13 @@ using namespace ${namespace}::views;
126
133
  swiftPart.maybePrepareForRecycle();
127
134
  }
128
135
 
136
+ #ifdef ENABLE_RCT_COMPONENT_VIEW_INVALIDATE
129
137
  - (void)invalidate {
130
138
  ${swiftNamespace}::${HybridTSpecCxx}& swiftPart = _hybridView->getSwiftPart();
131
139
  swiftPart.onDropView();
132
140
  [super invalidate];
133
141
  }
142
+ #endif
134
143
 
135
144
  @end
136
145
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitrogen",
3
- "version": "0.35.1",
3
+ "version": "0.35.3",
4
4
  "description": "The code-generator for react-native-nitro-modules.",
5
5
  "main": "lib/index",
6
6
  "types": "lib/index.d.ts",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "chalk": "^5.3.0",
38
- "react-native-nitro-modules": "^0.35.1",
38
+ "react-native-nitro-modules": "^0.35.3",
39
39
  "ts-morph": "^27.0.0",
40
40
  "yargs": "^18.0.0",
41
41
  "zod": "^4.0.5"
@@ -67,6 +67,13 @@ ${createFileMetadataString(`${component}.mm`)}
67
67
  #import "${HybridTSpecSwift}.hpp"
68
68
  #import "${getUmbrellaHeaderName()}"
69
69
 
70
+ #if __has_include(<cxxreact/ReactNativeVersion.h>)
71
+ #include <cxxreact/ReactNativeVersion.h>
72
+ #if REACT_NATIVE_VERSION_MINOR >= 82
73
+ #define ENABLE_RCT_COMPONENT_VIEW_INVALIDATE
74
+ #endif
75
+ #endif
76
+
70
77
  using namespace facebook;
71
78
  using namespace ${namespace};
72
79
  using namespace ${namespace}::views;
@@ -150,11 +157,13 @@ using namespace ${namespace}::views;
150
157
  swiftPart.maybePrepareForRecycle();
151
158
  }
152
159
 
160
+ #ifdef ENABLE_RCT_COMPONENT_VIEW_INVALIDATE
153
161
  - (void)invalidate {
154
162
  ${swiftNamespace}::${HybridTSpecCxx}& swiftPart = _hybridView->getSwiftPart();
155
163
  swiftPart.onDropView();
156
164
  [super invalidate];
157
165
  }
166
+ #endif
158
167
 
159
168
  @end
160
169
  `