react-native-reanimated 3.9.0-rc.0 → 3.9.0-rc.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.
@@ -59,6 +59,7 @@ typedef void (^AnimatedOperation)(REANodesManager *nodesManager);
59
59
  SingleInstanceChecker<REAModule> singleInstanceChecker_;
60
60
  #endif // NDEBUG
61
61
  bool hasListeners;
62
+ bool _isBridgeless;
62
63
  }
63
64
 
64
65
  @synthesize moduleRegistry = _moduleRegistry;
@@ -158,47 +159,33 @@ RCT_EXPORT_MODULE(ReanimatedModule);
158
159
 
159
160
  /*
160
161
  * Taken from RCTNativeAnimatedTurboModule:
161
- * In bridgeless mode, `setBridge` is never called during initialization. Instead this selector is invoked via
162
- * BridgelessTurboModuleSetup.
162
+ * This selector is invoked via BridgelessTurboModuleSetup.
163
163
  */
164
164
  - (void)setSurfacePresenter:(id<RCTSurfacePresenterStub>)surfacePresenter
165
165
  {
166
166
  _surfacePresenter = surfacePresenter;
167
+ _isBridgeless = true;
167
168
  }
168
169
 
169
170
  - (void)setBridge:(RCTBridge *)bridge
170
171
  {
171
- // This method isn't called on Bridgeless mode.
172
172
  [super setBridge:bridge];
173
-
174
- [bridge.uiManager.observerCoordinator addObserver:self];
175
-
176
173
  // only within the first loading `self.bridge.surfacePresenter` exists
177
174
  // during the reload `self.bridge.surfacePresenter` is null
178
- _surfacePresenter = self.bridge.surfacePresenter;
175
+ if (self.bridge.surfacePresenter) {
176
+ _surfacePresenter = self.bridge.surfacePresenter;
177
+ }
179
178
 
180
- #ifndef NDEBUG
181
179
  [self setReaSurfacePresenter];
182
- #endif // NDEBUG
183
180
 
184
- [self setNodesManager:self.bridge];
185
- }
181
+ _nodesManager = [[REANodesManager alloc] initWithModule:self bridge:bridge surfacePresenter:_surfacePresenter];
186
182
 
187
- - (void)initialize
188
- {
189
183
  [[NSNotificationCenter defaultCenter] addObserver:self
190
184
  selector:@selector(handleJavaScriptDidLoadNotification:)
191
185
  name:RCTJavaScriptDidLoadNotification
192
186
  object:nil];
193
187
 
194
188
  [[self.moduleRegistry moduleForName:"EventDispatcher"] addDispatchObserver:self];
195
-
196
- // [bridge.uiManager.observerCoordinator addObserver:self]; // TODO: Check if it's needed on new arch.
197
- #ifndef NDEBUG
198
- [self setReaSurfacePresenter];
199
- #endif // NDEBUG
200
-
201
- [self setNodesManager:nil];
202
189
  }
203
190
 
204
191
  #ifndef NDEBUG
@@ -213,11 +200,6 @@ RCT_EXPORT_MODULE(ReanimatedModule);
213
200
  }
214
201
  #endif // NDEBUG
215
202
 
216
- - (void)setNodesManager:(RCTBridge *)bridge
217
- {
218
- _nodesManager = [[REANodesManager alloc] initWithModule:self bridge:bridge surfacePresenter:_surfacePresenter];
219
- }
220
-
221
203
  #else // RCT_NEW_ARCH_ENABLED
222
204
 
223
205
  - (void)setBridge:(RCTBridge *)bridge
@@ -295,7 +277,7 @@ RCT_EXPORT_MODULE(ReanimatedModule);
295
277
 
296
278
  RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(installTurboModule : (nonnull NSString *)valueUnpackerCode)
297
279
  {
298
- if (!self.bridge) {
280
+ if (_isBridgeless) {
299
281
  #if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED)
300
282
  RCTCxxBridge *cxxBridge = (RCTCxxBridge *)[RCTBridge currentBridge];
301
283
  auto &rnRuntime = *(jsi::Runtime *)cxxBridge.runtime;
@@ -5,5 +5,5 @@
5
5
  * with the version used to build the native part of the library in runtime.
6
6
  * Remember to keep this in sync with the version declared in `package.json`
7
7
  */
8
- export const jsVersion = '3.9.0-rc.0';
8
+ export const jsVersion = '3.9.0-rc.1';
9
9
  //# sourceMappingURL=jsVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["jsVersion"],"sources":["jsVersion.ts"],"sourcesContent":["'use strict';\n/**\n * We hardcode the version of Reanimated here in order to compare it\n * with the version used to build the native part of the library in runtime.\n * Remember to keep this in sync with the version declared in `package.json`\n */\nexport const jsVersion = '3.9.0-rc.0';\n"],"mappings":"AAAA,YAAY;;AACZ;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,SAAS,GAAG,YAAY"}
1
+ {"version":3,"names":["jsVersion"],"sources":["jsVersion.ts"],"sourcesContent":["'use strict';\n/**\n * We hardcode the version of Reanimated here in order to compare it\n * with the version used to build the native part of the library in runtime.\n * Remember to keep this in sync with the version declared in `package.json`\n */\nexport const jsVersion = '3.9.0-rc.1';\n"],"mappings":"AAAA,YAAY;;AACZ;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,SAAS,GAAG,YAAY"}
@@ -3,4 +3,4 @@
3
3
  * with the version used to build the native part of the library in runtime.
4
4
  * Remember to keep this in sync with the version declared in `package.json`
5
5
  */
6
- export declare const jsVersion = "3.9.0-rc.0";
6
+ export declare const jsVersion = "3.9.0-rc.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-reanimated",
3
- "version": "3.9.0-rc.0",
3
+ "version": "3.9.0-rc.1",
4
4
  "description": "More powerful alternative to Animated library for React Native.",
5
5
  "scripts": {
6
6
  "test": "yarn run format:js && yarn run lint:js && yarn run test:unit",
@@ -101,7 +101,10 @@
101
101
  "@babel/core": "^7.20.0",
102
102
  "@babel/preset-env": "^7.20.0",
103
103
  "@babel/types": "^7.20.0",
104
- "@react-native/eslint-config": "^0.72.2",
104
+ "@react-native/babel-preset": "0.74.80",
105
+ "@react-native/eslint-config": "0.74.80",
106
+ "@react-native/metro-config": "0.74.80",
107
+ "@react-native/typescript-config": "0.74.80",
105
108
  "@testing-library/jest-native": "^4.0.4",
106
109
  "@testing-library/react-hooks": "^8.0.0",
107
110
  "@testing-library/react-native": "^7.1.0",
@@ -137,13 +140,13 @@
137
140
  "eslint-plugin-tsdoc": "^0.2.17",
138
141
  "husky": "^7.0.4",
139
142
  "jest": "^29.0.0",
140
- "lint-staged": "^11.2.0",
143
+ "lint-staged": "^15.2.2",
141
144
  "madge": "^5.0.1",
142
145
  "prettier": "^2.5.1",
143
146
  "react": "18.2.0",
144
- "react-native": "0.74.0-rc.4",
147
+ "react-native": "0.74.0-rc.9",
145
148
  "react-native-builder-bob": "^0.18.3",
146
- "react-native-gesture-handler": "git+https://github.com/software-mansion/react-native-gesture-handler.git#6808ca355af71ca2f1f6653b50e389c8b564c8ba",
149
+ "react-native-gesture-handler": "^2.16.0",
147
150
  "react-native-web": "~0.18.12",
148
151
  "react-test-renderer": "18.2.0",
149
152
  "shelljs": "^0.8.5",
@@ -4,4 +4,4 @@
4
4
  * with the version used to build the native part of the library in runtime.
5
5
  * Remember to keep this in sync with the version declared in `package.json`
6
6
  */
7
- export const jsVersion = '3.9.0-rc.0';
7
+ export const jsVersion = '3.9.0-rc.1';