react-native 0.74.0-nightly-20240129-39cb02f6f → 1000.0.0
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/Libraries/Animated/NativeAnimatedHelper.js +1 -1
- package/Libraries/Animated/nodes/AnimatedStyle.js +1 -1
- package/Libraries/Animated/useAnimatedProps.js +1 -1
- package/Libraries/AppDelegate/RCTAppDelegate.mm +2 -1
- package/Libraries/Blob/React-RCTBlob.podspec +1 -0
- package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroid.android.js +69 -0
- package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroid.d.ts +24 -0
- package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroid.js +33 -0
- package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroidNativeComponent.js +13 -0
- package/Libraries/Core/ReactNativeVersion.js +2 -3
- package/Libraries/Core/registerCallableModule.js +42 -0
- package/Libraries/Image/RCTImageLoader.mm +4 -11
- package/Libraries/LayoutAnimation/LayoutAnimation.js +1 -1
- package/Libraries/ReactNative/BridgelessUIManager.js +31 -13
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +1 -1
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +0 -33
- package/Libraries/ReactNative/__mocks__/FabricUIManager.js +12 -0
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +24543 -21110
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +4104 -3058
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4352 -3273
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +25038 -21457
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3721 -2600
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4024 -2869
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +43 -4
- package/Libraries/WebPerformance/Performance.js +1 -1
- package/React/Base/RCTBridge+Private.h +14 -0
- package/React/Base/RCTBridge.mm +6 -0
- package/React/Base/RCTKeyCommands.m +12 -1
- package/React/Base/RCTVersion.m +3 -3
- package/React/CoreModules/RCTAlertController.mm +2 -3
- package/React/CoreModules/RCTAppearance.mm +1 -1
- package/React/CoreModules/React-CoreModules.podspec +1 -0
- package/React/CxxBridge/RCTCxxBridge.mm +21 -3
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +22 -1
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +13 -2
- package/React/Fabric/RCTConversions.h +2 -18
- package/React/React-RCTFabric.podspec +1 -0
- package/React-Core.podspec +1 -3
- package/ReactAndroid/api/ReactAndroid.api +53 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNode.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/DecayAnimation.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/DiffClampAnimatedNode.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/ModulusAnimatedNode.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/ObjectAnimatedNode.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/SpringAnimation.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +5 -2
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +11 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +11 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +12 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/JSCExecutor.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +13 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java +7 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +11 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.java +24 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ScaleTypeStartInside.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/popupmenu/PopupMenuSelectionEvent.kt +37 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/popupmenu/ReactPopupMenuContainer.kt +49 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/popupmenu/ReactPopupMenuManager.kt +54 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManagerMapBuffer.java +2 -2
- package/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.cpp +2 -0
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +9 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +4 -1
- package/ReactAndroid/src/main/jni/react/featureflags/ReactNativeFeatureFlagsProviderHolder.cpp +7 -1
- package/ReactAndroid/src/main/jni/react/featureflags/ReactNativeFeatureFlagsProviderHolder.h +2 -1
- package/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp +16 -10
- package/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.cpp +0 -3
- package/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.h +0 -1
- package/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultComponentsRegistry.cpp +7 -6
- package/ReactCommon/cxxreact/Instance.cpp +34 -18
- package/ReactCommon/cxxreact/Instance.h +13 -2
- package/ReactCommon/cxxreact/React-cxxreact.podspec +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/jsinspector-modern/InstanceAgent.cpp +34 -0
- package/ReactCommon/jsinspector-modern/InstanceAgent.h +54 -0
- package/ReactCommon/jsinspector-modern/InstanceTarget.cpp +25 -0
- package/ReactCommon/jsinspector-modern/InstanceTarget.h +58 -0
- package/ReactCommon/jsinspector-modern/PageAgent.cpp +65 -0
- package/ReactCommon/jsinspector-modern/PageAgent.h +13 -0
- package/ReactCommon/jsinspector-modern/PageTarget.cpp +41 -0
- package/ReactCommon/jsinspector-modern/PageTarget.h +28 -1
- package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +12 -1
- package/ReactCommon/jsinspector-modern/ReactCdp.h +1 -0
- package/ReactCommon/jsinspector-modern/tests/InspectorMocks.h +2 -0
- package/ReactCommon/jsinspector-modern/tests/PageTargetTest.cpp +164 -10
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +6 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +18 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +3 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +2 -1
- package/ReactCommon/react/featureflags/tests/ReactNativeFeatureFlagsTest.cpp +4 -0
- package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +1 -0
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +6 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +3 -1
- package/ReactCommon/react/renderer/attributedstring/primitives.h +0 -86
- package/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +0 -16
- package/ReactCommon/react/renderer/components/view/CSSTokenizer.cpp +187 -0
- package/ReactCommon/react/renderer/components/view/CSSTokenizer.h +101 -0
- package/ReactCommon/react/renderer/components/view/tests/CSSTokenizerTest.cpp +144 -0
- package/ReactCommon/react/renderer/core/ComponentDescriptor.h +0 -1
- package/ReactCommon/react/renderer/core/LayoutPrimitives.h +0 -17
- package/ReactCommon/react/renderer/core/propsConversions.h +0 -1
- package/ReactCommon/react/renderer/graphics/Color.h +7 -3
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +6 -1
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.h +55 -15
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.mm +132 -0
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/PlatformColorParser.h +4 -18
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/PlatformColorParser.mm +73 -0
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.h +8 -2
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.mm +14 -3
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextPrimitivesConversions.h +4 -19
- package/ReactCommon/react/runtime/ReactInstance.cpp +15 -2
- package/ReactCommon/react/runtime/ReactInstance.h +13 -2
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +5 -3
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.h +3 -1
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +10 -2
- package/ReactCommon/react/test_utils/ios/Shims/ShimRCTInstance.mm +5 -2
- package/ReactCommon/react/utils/hash_combine.h +8 -6
- package/gradle/libs.versions.toml +1 -1
- package/index.js +9 -0
- package/package.json +9 -9
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/src/private/featureflags/NativeReactNativeFeatureFlags.js +2 -1
- package/src/private/featureflags/ReactNativeFeatureFlags.js +42 -1
- package/src/private/specs/components/PopupMenuAndroidNativeComponent.js +47 -0
- package/template/package.json +5 -5
- package/ReactAndroid/src/main/jni/react/jni/OnLoad.h +0 -16
|
@@ -155,11 +155,11 @@ interface ScaleYTransform {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
interface TranslateXTransform {
|
|
158
|
-
translateX: AnimatableNumericValue
|
|
158
|
+
translateX: AnimatableNumericValue | `${number}%`;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
interface TranslateYTransform {
|
|
162
|
-
translateY: AnimatableNumericValue
|
|
162
|
+
translateY: AnimatableNumericValue | `${number}%`;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
interface SkewXTransform {
|
|
@@ -281,7 +281,6 @@ export type FontVariant =
|
|
|
281
281
|
| 'oldstyle-nums'
|
|
282
282
|
| 'lining-nums'
|
|
283
283
|
| 'tabular-nums'
|
|
284
|
-
| 'proportional-nums'
|
|
285
284
|
| 'common-ligatures'
|
|
286
285
|
| 'no-common-ligatures'
|
|
287
286
|
| 'discretionary-ligatures'
|
|
@@ -289,7 +288,28 @@ export type FontVariant =
|
|
|
289
288
|
| 'historical-ligatures'
|
|
290
289
|
| 'no-historical-ligatures'
|
|
291
290
|
| 'contextual'
|
|
292
|
-
| 'no-contextual'
|
|
291
|
+
| 'no-contextual'
|
|
292
|
+
| 'proportional-nums'
|
|
293
|
+
| 'stylistic-one'
|
|
294
|
+
| 'stylistic-two'
|
|
295
|
+
| 'stylistic-three'
|
|
296
|
+
| 'stylistic-four'
|
|
297
|
+
| 'stylistic-five'
|
|
298
|
+
| 'stylistic-six'
|
|
299
|
+
| 'stylistic-seven'
|
|
300
|
+
| 'stylistic-eight'
|
|
301
|
+
| 'stylistic-nine'
|
|
302
|
+
| 'stylistic-ten'
|
|
303
|
+
| 'stylistic-eleven'
|
|
304
|
+
| 'stylistic-twelve'
|
|
305
|
+
| 'stylistic-thirteen'
|
|
306
|
+
| 'stylistic-fourteen'
|
|
307
|
+
| 'stylistic-fifteen'
|
|
308
|
+
| 'stylistic-sixteen'
|
|
309
|
+
| 'stylistic-seventeen'
|
|
310
|
+
| 'stylistic-eighteen'
|
|
311
|
+
| 'stylistic-nineteen'
|
|
312
|
+
| 'stylistic-twenty';
|
|
293
313
|
export interface TextStyleIOS extends ViewStyle {
|
|
294
314
|
fontVariant?: FontVariant[] | undefined;
|
|
295
315
|
textDecorationColor?: ColorValue | undefined;
|
|
@@ -326,6 +346,25 @@ export interface TextStyle extends TextStyleIOS, TextStyleAndroid, ViewStyle {
|
|
|
326
346
|
| '700'
|
|
327
347
|
| '800'
|
|
328
348
|
| '900'
|
|
349
|
+
| 100
|
|
350
|
+
| 200
|
|
351
|
+
| 300
|
|
352
|
+
| 400
|
|
353
|
+
| 500
|
|
354
|
+
| 600
|
|
355
|
+
| 700
|
|
356
|
+
| 800
|
|
357
|
+
| 900
|
|
358
|
+
| 'ultralight'
|
|
359
|
+
| 'thin'
|
|
360
|
+
| 'light'
|
|
361
|
+
| 'medium'
|
|
362
|
+
| 'regular'
|
|
363
|
+
| 'semibold'
|
|
364
|
+
| 'condensedBold'
|
|
365
|
+
| 'condensed'
|
|
366
|
+
| 'heavy'
|
|
367
|
+
| 'black'
|
|
329
368
|
| undefined;
|
|
330
369
|
letterSpacing?: number | undefined;
|
|
331
370
|
lineHeight?: number | undefined;
|
|
@@ -141,7 +141,7 @@ export default class Performance {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
// Startup metrics is not used in web, but only in React Native.
|
|
144
|
-
get
|
|
144
|
+
get rnStartupTiming(): ReactNativeStartupTiming {
|
|
145
145
|
if (NativePerformance?.getReactNativeStartupTiming) {
|
|
146
146
|
const {
|
|
147
147
|
startTime,
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
#import <React/RCTBridge.h>
|
|
9
|
+
#ifdef __cplusplus
|
|
10
|
+
#import <jsinspector-modern/ReactCdp.h>
|
|
11
|
+
#endif
|
|
9
12
|
|
|
10
13
|
@class RCTModuleRegistry;
|
|
11
14
|
@class RCTModuleData;
|
|
@@ -70,6 +73,17 @@ RCT_EXTERN void RCTRegisterModule(Class);
|
|
|
70
73
|
*/
|
|
71
74
|
@property (nonatomic, strong, readonly) RCTModuleRegistry *moduleRegistry;
|
|
72
75
|
|
|
76
|
+
/**
|
|
77
|
+
* The page target for this bridge, if one has been created. Exposed for RCTCxxBridge only.
|
|
78
|
+
*/
|
|
79
|
+
@property (nonatomic, assign, readonly)
|
|
80
|
+
#ifdef __cplusplus
|
|
81
|
+
facebook::react::jsinspector_modern::PageTarget *
|
|
82
|
+
#else
|
|
83
|
+
// The inspector infrastructure cannot be used in C code.
|
|
84
|
+
void *
|
|
85
|
+
#endif
|
|
86
|
+
inspectorTarget;
|
|
73
87
|
@end
|
|
74
88
|
|
|
75
89
|
@interface RCTBridge (RCTCxxBridge)
|
package/React/Base/RCTBridge.mm
CHANGED
|
@@ -274,6 +274,8 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init)
|
|
|
274
274
|
* This runs only on the main thread, but crashes the subclass
|
|
275
275
|
* RCTAssertMainQueue();
|
|
276
276
|
*/
|
|
277
|
+
// NOTE: RCTCxxBridge will use _inspectorTarget during [self invalidate], so we must
|
|
278
|
+
// keep it alive until after the call returns.
|
|
277
279
|
[self invalidate];
|
|
278
280
|
if (_inspectorPageId.has_value()) {
|
|
279
281
|
facebook::react::jsinspector_modern::getInspectorInstance().removePage(*_inspectorPageId);
|
|
@@ -519,4 +521,8 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init)
|
|
|
519
521
|
[self.batchedBridge registerSegmentWithId:segmentId path:path];
|
|
520
522
|
}
|
|
521
523
|
|
|
524
|
+
- (facebook::react::jsinspector_modern::PageTarget *)inspectorTarget
|
|
525
|
+
{
|
|
526
|
+
return _inspectorTarget.get();
|
|
527
|
+
}
|
|
522
528
|
@end
|
|
@@ -173,13 +173,24 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init)
|
|
|
173
173
|
|
|
174
174
|
- (void)RCT_handleKeyCommand:(NSString *)input flags:(UIKeyModifierFlags)modifierFlags
|
|
175
175
|
{
|
|
176
|
+
// In Bridgeless mode we might incur in some concurrency issues
|
|
177
|
+
// where the React Native instance is invalidated while iterating on the
|
|
178
|
+
// list of available commands.
|
|
179
|
+
// That will cleanup the set while iterating, which is a not allowed mutation.
|
|
180
|
+
// To work around that, we store the commands that we need to execute in a separate
|
|
181
|
+
// array, local to this function call, so we don't incur in concurrency issues
|
|
182
|
+
NSMutableArray<RCTKeyCommand *> *commandsToExecute = [NSMutableArray new];
|
|
176
183
|
for (RCTKeyCommand *command in [RCTKeyCommands sharedInstance].commands) {
|
|
177
184
|
if ([command matchesInput:input flags:modifierFlags]) {
|
|
178
185
|
if (command.block) {
|
|
179
|
-
command
|
|
186
|
+
[commandsToExecute addObject:command];
|
|
180
187
|
}
|
|
181
188
|
}
|
|
182
189
|
}
|
|
190
|
+
|
|
191
|
+
for (RCTKeyCommand *command in commandsToExecute) {
|
|
192
|
+
command.block(nil);
|
|
193
|
+
}
|
|
183
194
|
}
|
|
184
195
|
|
|
185
196
|
+ (instancetype)sharedInstance
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @generated by scripts/set-rn-version.js
|
|
3
|
-
*
|
|
4
2
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5
3
|
*
|
|
6
4
|
* This source code is licensed under the MIT license found in the
|
|
7
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @generated by scripts/releases/set-rn-version.js
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
#import "RCTVersion.h"
|
|
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
|
|
24
24
|
RCTVersionMajor: @(0),
|
|
25
25
|
RCTVersionMinor: @(74),
|
|
26
26
|
RCTVersionPatch: @(0),
|
|
27
|
-
RCTVersionPrerelease: @"nightly-
|
|
27
|
+
RCTVersionPrerelease: @"nightly-20240131-82e9a5e4f",
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
30
|
return __rnVersion;
|
|
@@ -35,9 +35,8 @@
|
|
|
35
35
|
{
|
|
36
36
|
UIUserInterfaceStyle style = self.overrideUserInterfaceStyle;
|
|
37
37
|
if (style == UIUserInterfaceStyleUnspecified) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
: UIUserInterfaceStyleUnspecified;
|
|
38
|
+
UIUserInterfaceStyle overriddenStyle = RCTKeyWindow().overrideUserInterfaceStyle;
|
|
39
|
+
style = overriddenStyle ? overriddenStyle : UIUserInterfaceStyleUnspecified;
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
self.overrideUserInterfaceStyle = style;
|
|
@@ -70,7 +70,7 @@ NSString *RCTColorSchemePreference(UITraitCollection *traitCollection)
|
|
|
70
70
|
- (instancetype)init
|
|
71
71
|
{
|
|
72
72
|
if ((self = [super init])) {
|
|
73
|
-
UITraitCollection *traitCollection =
|
|
73
|
+
UITraitCollection *traitCollection = RCTKeyWindow().traitCollection;
|
|
74
74
|
_currentColorScheme = RCTColorSchemePreference(traitCollection);
|
|
75
75
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
76
76
|
selector:@selector(appearanceChanged:)
|
|
@@ -52,6 +52,7 @@ Pod::Spec.new do |s|
|
|
|
52
52
|
s.dependency "React-jsi", version
|
|
53
53
|
s.dependency 'React-RCTBlob'
|
|
54
54
|
s.dependency "SocketRocket", socket_rocket_version
|
|
55
|
+
add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')
|
|
55
56
|
|
|
56
57
|
add_dependency(s, "React-Codegen")
|
|
57
58
|
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
#import <cxxreact/ModuleRegistry.h>
|
|
39
39
|
#import <cxxreact/RAMBundleRegistry.h>
|
|
40
40
|
#import <cxxreact/ReactMarker.h>
|
|
41
|
+
#import <jsinspector-modern/ReactCdp.h>
|
|
41
42
|
#import <jsireact/JSIExecutor.h>
|
|
42
43
|
#import <reactperflogger/BridgeNativeModulePerfLogger.h>
|
|
43
44
|
|
|
@@ -430,11 +431,19 @@ struct RCTInstanceCallback : public InstanceCallback {
|
|
|
430
431
|
}));
|
|
431
432
|
}
|
|
432
433
|
|
|
434
|
+
// Grab the inspector target from the parent bridge here, on the main queue, to avoid inadvertently
|
|
435
|
+
// moving ownership of the parent bridge to the JS thread, which would violate expectations around
|
|
436
|
+
// the timing and thread affinity of RCTBridge's destruction. This could technically be a dangling
|
|
437
|
+
// pointer into a member of RCTBridge! But we only use it while _reactInstance exists, meaning we
|
|
438
|
+
// haven't been invalidated, and therefore RCTBridge hasn't been deallocated yet.
|
|
439
|
+
RCTAssertMainQueue();
|
|
440
|
+
facebook::react::jsinspector_modern::PageTarget *parentInspectorTarget = _parentBridge.inspectorTarget;
|
|
441
|
+
|
|
433
442
|
// Dispatch the instance initialization as soon as the initial module metadata has
|
|
434
443
|
// been collected (see initModules)
|
|
435
444
|
dispatch_group_enter(prepareBridge);
|
|
436
445
|
[self ensureOnJavaScriptThread:^{
|
|
437
|
-
[weakSelf _initializeBridge:executorFactory];
|
|
446
|
+
[weakSelf _initializeBridge:executorFactory parentInspectorTarget:parentInspectorTarget];
|
|
438
447
|
dispatch_group_leave(prepareBridge);
|
|
439
448
|
}];
|
|
440
449
|
|
|
@@ -649,6 +658,7 @@ struct RCTInstanceCallback : public InstanceCallback {
|
|
|
649
658
|
}
|
|
650
659
|
|
|
651
660
|
- (void)_initializeBridge:(std::shared_ptr<JSExecutorFactory>)executorFactory
|
|
661
|
+
parentInspectorTarget:(facebook::react::jsinspector_modern::PageTarget *)parentInspectorTarget
|
|
652
662
|
{
|
|
653
663
|
if (!self.valid) {
|
|
654
664
|
return;
|
|
@@ -668,7 +678,7 @@ struct RCTInstanceCallback : public InstanceCallback {
|
|
|
668
678
|
executorFactory = std::make_shared<GetDescAdapter>(self, executorFactory);
|
|
669
679
|
#endif
|
|
670
680
|
|
|
671
|
-
[self _initializeBridgeLocked:executorFactory];
|
|
681
|
+
[self _initializeBridgeLocked:executorFactory parentInspectorTarget:parentInspectorTarget];
|
|
672
682
|
|
|
673
683
|
#if RCT_PROFILE
|
|
674
684
|
if (RCTProfileIsProfiling()) {
|
|
@@ -681,6 +691,7 @@ struct RCTInstanceCallback : public InstanceCallback {
|
|
|
681
691
|
}
|
|
682
692
|
|
|
683
693
|
- (void)_initializeBridgeLocked:(std::shared_ptr<JSExecutorFactory>)executorFactory
|
|
694
|
+
parentInspectorTarget:(facebook::react::jsinspector_modern::PageTarget *)parentInspectorTarget
|
|
684
695
|
{
|
|
685
696
|
std::lock_guard<std::mutex> guard(_moduleRegistryLock);
|
|
686
697
|
|
|
@@ -689,7 +700,8 @@ struct RCTInstanceCallback : public InstanceCallback {
|
|
|
689
700
|
std::make_unique<RCTInstanceCallback>(self),
|
|
690
701
|
executorFactory,
|
|
691
702
|
_jsMessageThread,
|
|
692
|
-
[self _buildModuleRegistryUnlocked]
|
|
703
|
+
[self _buildModuleRegistryUnlocked],
|
|
704
|
+
parentInspectorTarget);
|
|
693
705
|
_moduleRegistryCreated = YES;
|
|
694
706
|
}
|
|
695
707
|
|
|
@@ -1179,6 +1191,12 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithBundleURL
|
|
|
1179
1191
|
RCTAssertMainQueue();
|
|
1180
1192
|
RCTLogInfo(@"Invalidating %@ (parent: %@, executor: %@)", self, _parentBridge, [self executorClass]);
|
|
1181
1193
|
|
|
1194
|
+
if (self->_reactInstance) {
|
|
1195
|
+
// Do this synchronously on the main thread to fulfil unregisterFromInspector's
|
|
1196
|
+
// requirements.
|
|
1197
|
+
self->_reactInstance->unregisterFromInspector();
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1182
1200
|
_loading = NO;
|
|
1183
1201
|
_valid = NO;
|
|
1184
1202
|
_didInvalidate = YES;
|
|
@@ -210,11 +210,20 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
|
|
210
210
|
- (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask
|
|
211
211
|
{
|
|
212
212
|
[super finalizeUpdates:updateMask];
|
|
213
|
+
__block BOOL propsUpdated = NO;
|
|
214
|
+
|
|
215
|
+
__weak __typeof(self) weakSelf = self;
|
|
216
|
+
void (^updatePropsIfNeeded)(RNComponentViewUpdateMask) = ^void(RNComponentViewUpdateMask mask) {
|
|
217
|
+
__typeof(self) strongSelf = weakSelf;
|
|
218
|
+
if (!propsUpdated) {
|
|
219
|
+
[strongSelf _setPropsWithUpdateMask:mask];
|
|
220
|
+
propsUpdated = YES;
|
|
221
|
+
}
|
|
222
|
+
};
|
|
213
223
|
|
|
214
224
|
if (!_adapter) {
|
|
215
225
|
_adapter = [[RCTLegacyViewManagerInteropCoordinatorAdapter alloc] initWithCoordinator:[self _coordinator]
|
|
216
226
|
reactTag:self.tag];
|
|
217
|
-
__weak __typeof(self) weakSelf = self;
|
|
218
227
|
_adapter.eventInterceptor = ^(std::string eventName, folly::dynamic event) {
|
|
219
228
|
if (weakSelf) {
|
|
220
229
|
__typeof(self) strongSelf = weakSelf;
|
|
@@ -223,6 +232,13 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
|
|
223
232
|
eventEmitter.dispatchEvent(eventName, event);
|
|
224
233
|
}
|
|
225
234
|
};
|
|
235
|
+
// Set props immediately. This is required to set the initial state of the view.
|
|
236
|
+
// In the case where some events are fired in relationship of a change in the frame
|
|
237
|
+
// or layout of the view, they will fire as soon as the contentView is set and if the
|
|
238
|
+
// event block is nil, the app will crash.
|
|
239
|
+
updatePropsIfNeeded(updateMask);
|
|
240
|
+
propsUpdated = YES;
|
|
241
|
+
|
|
226
242
|
self.contentView = _adapter.paperView;
|
|
227
243
|
}
|
|
228
244
|
|
|
@@ -247,6 +263,11 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
|
|
247
263
|
|
|
248
264
|
[_adapter.paperView didUpdateReactSubviews];
|
|
249
265
|
|
|
266
|
+
updatePropsIfNeeded(updateMask);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
- (void)_setPropsWithUpdateMask:(RNComponentViewUpdateMask)updateMask
|
|
270
|
+
{
|
|
250
271
|
if (updateMask & RNComponentViewUpdateMaskProps) {
|
|
251
272
|
const auto &newProps = static_cast<const LegacyViewManagerInteropViewProps &>(*_props);
|
|
252
273
|
[_adapter setProps:newProps.otherProps];
|
|
@@ -91,6 +91,15 @@ using namespace facebook::react;
|
|
|
91
91
|
_backgroundColor = backgroundColor;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection
|
|
95
|
+
{
|
|
96
|
+
[super traitCollectionDidChange:previousTraitCollection];
|
|
97
|
+
|
|
98
|
+
if ([self.traitCollection hasDifferentColorAppearanceComparedToTraitCollection:previousTraitCollection]) {
|
|
99
|
+
[self invalidateLayer];
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
94
103
|
#pragma mark - RCTComponentViewProtocol
|
|
95
104
|
|
|
96
105
|
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
|
@@ -597,6 +606,8 @@ static RCTBorderStyle RCTBorderStyleFromBorderStyle(BorderStyle borderStyle)
|
|
|
597
606
|
borderMetrics.borderWidths.left == 0 ||
|
|
598
607
|
colorComponentsFromColor(borderMetrics.borderColors.left).alpha == 0 || self.clipsToBounds);
|
|
599
608
|
|
|
609
|
+
CGColorRef backgroundColor = [_backgroundColor resolvedColorWithTraitCollection:self.traitCollection].CGColor;
|
|
610
|
+
|
|
600
611
|
if (useCoreAnimationBorderRendering) {
|
|
601
612
|
layer.mask = nil;
|
|
602
613
|
if (_borderLayer) {
|
|
@@ -612,7 +623,7 @@ static RCTBorderStyle RCTBorderStyleFromBorderStyle(BorderStyle borderStyle)
|
|
|
612
623
|
|
|
613
624
|
layer.cornerCurve = CornerCurveFromBorderCurve(borderMetrics.borderCurves.topLeft);
|
|
614
625
|
|
|
615
|
-
layer.backgroundColor =
|
|
626
|
+
layer.backgroundColor = backgroundColor;
|
|
616
627
|
} else {
|
|
617
628
|
if (!_borderLayer) {
|
|
618
629
|
_borderLayer = [CALayer new];
|
|
@@ -635,7 +646,7 @@ static RCTBorderStyle RCTBorderStyleFromBorderStyle(BorderStyle borderStyle)
|
|
|
635
646
|
RCTCornerRadiiFromBorderRadii(borderMetrics.borderRadii),
|
|
636
647
|
RCTUIEdgeInsetsFromEdgeInsets(borderMetrics.borderWidths),
|
|
637
648
|
borderColors,
|
|
638
|
-
|
|
649
|
+
backgroundColor,
|
|
639
650
|
self.clipsToBounds);
|
|
640
651
|
|
|
641
652
|
RCTReleaseRCTBorderColors(borderColors);
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
#import <react/renderer/components/view/primitives.h>
|
|
12
12
|
#import <react/renderer/core/LayoutPrimitives.h>
|
|
13
13
|
#import <react/renderer/graphics/Color.h>
|
|
14
|
+
#import <react/renderer/graphics/RCTPlatformColorUtils.h>
|
|
14
15
|
#import <react/renderer/graphics/Transform.h>
|
|
15
16
|
|
|
16
17
|
NS_ASSUME_NONNULL_BEGIN
|
|
@@ -36,24 +37,7 @@ inline std::string RCTStringFromNSString(NSString *string)
|
|
|
36
37
|
|
|
37
38
|
inline UIColor *_Nullable RCTUIColorFromSharedColor(const facebook::react::SharedColor &sharedColor)
|
|
38
39
|
{
|
|
39
|
-
|
|
40
|
-
return nil;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (*facebook::react::clearColor() == *sharedColor) {
|
|
44
|
-
return [UIColor clearColor];
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
if (*facebook::react::blackColor() == *sharedColor) {
|
|
48
|
-
return [UIColor blackColor];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (*facebook::react::whiteColor() == *sharedColor) {
|
|
52
|
-
return [UIColor whiteColor];
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
auto components = facebook::react::colorComponentsFromColor(sharedColor);
|
|
56
|
-
return [UIColor colorWithRed:components.red green:components.green blue:components.blue alpha:components.alpha];
|
|
40
|
+
return RCTPlatformColorFromColor(*sharedColor);
|
|
57
41
|
}
|
|
58
42
|
|
|
59
43
|
inline CF_RETURNS_RETAINED CGColorRef _Nullable RCTCreateCGColorRefFromSharedColor(
|
|
@@ -87,6 +87,7 @@ Pod::Spec.new do |s|
|
|
|
87
87
|
add_dependency(s, "React-utils")
|
|
88
88
|
add_dependency(s, "React-rendererdebug")
|
|
89
89
|
add_dependency(s, "React-runtimescheduler")
|
|
90
|
+
add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')
|
|
90
91
|
|
|
91
92
|
if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1"
|
|
92
93
|
s.dependency "hermes-engine"
|
package/React-Core.podspec
CHANGED
|
@@ -95,8 +95,6 @@ Pod::Spec.new do |s|
|
|
|
95
95
|
end
|
|
96
96
|
ss.exclude_files = exclude_files
|
|
97
97
|
ss.private_header_files = "React/Cxx*/*.h"
|
|
98
|
-
|
|
99
|
-
ss.dependency "React-jsinspector", version
|
|
100
98
|
end
|
|
101
99
|
|
|
102
100
|
s.subspec "DevSupport" do |ss|
|
|
@@ -105,7 +103,6 @@ Pod::Spec.new do |s|
|
|
|
105
103
|
|
|
106
104
|
ss.dependency "React-Core/Default", version
|
|
107
105
|
ss.dependency "React-Core/RCTWebSocket", version
|
|
108
|
-
ss.dependency "React-jsinspector", version
|
|
109
106
|
ss.private_header_files = "React/Inspector/RCTCxx*.h"
|
|
110
107
|
end
|
|
111
108
|
|
|
@@ -135,6 +132,7 @@ Pod::Spec.new do |s|
|
|
|
135
132
|
s.dependency "Yoga"
|
|
136
133
|
s.dependency "glog"
|
|
137
134
|
|
|
135
|
+
add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')
|
|
138
136
|
add_dependency(s, "RCTDeprecation")
|
|
139
137
|
|
|
140
138
|
if use_hermes
|
|
@@ -1906,7 +1906,6 @@ public class com/facebook/react/config/ReactFeatureFlags {
|
|
|
1906
1906
|
public static field enableMountHooks Z
|
|
1907
1907
|
public static field enableOnDemandReactChoreographer Z
|
|
1908
1908
|
public static field enableRemoveDeleteTreeInstruction Z
|
|
1909
|
-
public static field enableSpannableBuildingUnification Z
|
|
1910
1909
|
public static field enableTextSpannableCache Z
|
|
1911
1910
|
public static field enableViewRecycling Z
|
|
1912
1911
|
public static field excludeYogaFromRawProps Z
|
|
@@ -5694,6 +5693,17 @@ public abstract interface class com/facebook/react/viewmanagers/AndroidHorizonta
|
|
|
5694
5693
|
public abstract fun setRemoveClippedSubviews (Landroid/view/View;Z)V
|
|
5695
5694
|
}
|
|
5696
5695
|
|
|
5696
|
+
public class com/facebook/react/viewmanagers/AndroidPopupMenuManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
|
|
5697
|
+
public fun <init> (Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
|
|
5698
|
+
public fun receiveCommand (Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
|
|
5699
|
+
public fun setProperty (Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
|
5700
|
+
}
|
|
5701
|
+
|
|
5702
|
+
public abstract interface class com/facebook/react/viewmanagers/AndroidPopupMenuManagerInterface {
|
|
5703
|
+
public abstract fun setMenuItems (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
|
|
5704
|
+
public abstract fun show (Landroid/view/View;)V
|
|
5705
|
+
}
|
|
5706
|
+
|
|
5697
5707
|
public class com/facebook/react/viewmanagers/AndroidProgressBarManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
|
|
5698
5708
|
public fun <init> (Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
|
|
5699
5709
|
public fun setProperty (Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
|
@@ -6163,6 +6173,48 @@ public abstract interface class com/facebook/react/views/modal/ReactModalHostVie
|
|
|
6163
6173
|
public abstract fun onRequestClose (Landroid/content/DialogInterface;)V
|
|
6164
6174
|
}
|
|
6165
6175
|
|
|
6176
|
+
public final class com/facebook/react/views/popupmenu/PopupMenuSelectionEvent : com/facebook/react/uimanager/events/Event {
|
|
6177
|
+
public static final field Companion Lcom/facebook/react/views/popupmenu/PopupMenuSelectionEvent$Companion;
|
|
6178
|
+
public static final field EVENT_NAME Ljava/lang/String;
|
|
6179
|
+
public fun <init> (III)V
|
|
6180
|
+
public fun dispatch (Lcom/facebook/react/uimanager/events/RCTEventEmitter;)V
|
|
6181
|
+
public fun getEventName ()Ljava/lang/String;
|
|
6182
|
+
public final fun getItem ()I
|
|
6183
|
+
}
|
|
6184
|
+
|
|
6185
|
+
public final class com/facebook/react/views/popupmenu/PopupMenuSelectionEvent$Companion {
|
|
6186
|
+
}
|
|
6187
|
+
|
|
6188
|
+
public final class com/facebook/react/views/popupmenu/ReactPopupMenuContainer : android/widget/FrameLayout {
|
|
6189
|
+
public fun <init> (Landroid/content/Context;)V
|
|
6190
|
+
public final fun setMenuItems (Lcom/facebook/react/bridge/ReadableArray;)V
|
|
6191
|
+
public final fun showPopupMenu ()V
|
|
6192
|
+
}
|
|
6193
|
+
|
|
6194
|
+
public final class com/facebook/react/views/popupmenu/ReactPopupMenuManager : com/facebook/react/uimanager/ViewGroupManager, com/facebook/react/viewmanagers/AndroidPopupMenuManagerInterface {
|
|
6195
|
+
public static final field Companion Lcom/facebook/react/views/popupmenu/ReactPopupMenuManager$Companion;
|
|
6196
|
+
public static final field REACT_CLASS Ljava/lang/String;
|
|
6197
|
+
public fun <init> ()V
|
|
6198
|
+
public synthetic fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
|
|
6199
|
+
public fun getName ()Ljava/lang/String;
|
|
6200
|
+
public synthetic fun receiveCommand (Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
|
|
6201
|
+
public fun receiveCommand (Lcom/facebook/react/views/popupmenu/ReactPopupMenuContainer;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
|
|
6202
|
+
public synthetic fun setMenuItems (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
|
|
6203
|
+
public fun setMenuItems (Lcom/facebook/react/views/popupmenu/ReactPopupMenuContainer;Lcom/facebook/react/bridge/ReadableArray;)V
|
|
6204
|
+
public synthetic fun show (Landroid/view/View;)V
|
|
6205
|
+
public fun show (Lcom/facebook/react/views/popupmenu/ReactPopupMenuContainer;)V
|
|
6206
|
+
}
|
|
6207
|
+
|
|
6208
|
+
public class com/facebook/react/views/popupmenu/ReactPopupMenuManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
|
6209
|
+
public fun <init> ()V
|
|
6210
|
+
public fun getProperties (Ljava/util/Map;)V
|
|
6211
|
+
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
|
6212
|
+
public fun setProperty (Lcom/facebook/react/views/popupmenu/ReactPopupMenuManager;Lcom/facebook/react/views/popupmenu/ReactPopupMenuContainer;Ljava/lang/String;Ljava/lang/Object;)V
|
|
6213
|
+
}
|
|
6214
|
+
|
|
6215
|
+
public final class com/facebook/react/views/popupmenu/ReactPopupMenuManager$Companion {
|
|
6216
|
+
}
|
|
6217
|
+
|
|
6166
6218
|
public class com/facebook/react/views/progressbar/ProgressBarShadowNode : com/facebook/react/uimanager/LayoutShadowNode, com/facebook/yoga/YogaMeasureFunction {
|
|
6167
6219
|
public fun <init> ()V
|
|
6168
6220
|
public fun getStyle ()Ljava/lang/String;
|
|
@@ -9,11 +9,13 @@ package com.facebook.react.animated;
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Nullable;
|
|
11
11
|
import com.facebook.infer.annotation.Assertions;
|
|
12
|
+
import com.facebook.infer.annotation.Nullsafe;
|
|
12
13
|
import java.util.ArrayList;
|
|
13
14
|
import java.util.List;
|
|
14
15
|
|
|
15
16
|
/** Base class for all Animated.js library node types that can be created on the "native" side. */
|
|
16
|
-
/*package*/
|
|
17
|
+
/*package*/ @Nullsafe(Nullsafe.Mode.LOCAL)
|
|
18
|
+
abstract class AnimatedNode {
|
|
17
19
|
|
|
18
20
|
public static final int INITIAL_BFS_COLOR = 0;
|
|
19
21
|
|
|
@@ -7,12 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
package com.facebook.react.animated;
|
|
9
9
|
|
|
10
|
+
import com.facebook.infer.annotation.Nullsafe;
|
|
10
11
|
import com.facebook.react.bridge.ReadableMap;
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Implementation of {@link AnimationDriver} providing support for decay animations. The
|
|
14
15
|
* implementation is copied from the JS version in {@code AnimatedImplementation.js}.
|
|
15
16
|
*/
|
|
17
|
+
@Nullsafe(Nullsafe.Mode.LOCAL)
|
|
16
18
|
class DecayAnimation extends AnimationDriver {
|
|
17
19
|
|
|
18
20
|
private final double mVelocity;
|
|
@@ -7,10 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
package com.facebook.react.animated;
|
|
9
9
|
|
|
10
|
+
import com.facebook.infer.annotation.Nullsafe;
|
|
10
11
|
import com.facebook.react.bridge.JSApplicationCausedNativeException;
|
|
11
12
|
import com.facebook.react.bridge.ReadableMap;
|
|
12
13
|
|
|
13
|
-
/*package*/
|
|
14
|
+
/*package*/ @Nullsafe(Nullsafe.Mode.LOCAL)
|
|
15
|
+
class DiffClampAnimatedNode extends ValueAnimatedNode {
|
|
14
16
|
private final NativeAnimatedNodesManager mNativeAnimatedNodesManager;
|
|
15
17
|
private final int mInputNodeTag;
|
|
16
18
|
private final double mMin;
|
|
@@ -7,10 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
package com.facebook.react.animated;
|
|
9
9
|
|
|
10
|
+
import com.facebook.infer.annotation.Nullsafe;
|
|
10
11
|
import com.facebook.react.bridge.JSApplicationCausedNativeException;
|
|
11
12
|
import com.facebook.react.bridge.ReadableMap;
|
|
12
13
|
|
|
13
|
-
/*package*/
|
|
14
|
+
/*package*/ @Nullsafe(Nullsafe.Mode.LOCAL)
|
|
15
|
+
class ModulusAnimatedNode extends ValueAnimatedNode {
|
|
14
16
|
|
|
15
17
|
private final NativeAnimatedNodesManager mNativeAnimatedNodesManager;
|
|
16
18
|
private final int mInputNode;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
package com.facebook.react.animated;
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Nullable;
|
|
11
|
+
import com.facebook.infer.annotation.Nullsafe;
|
|
11
12
|
import com.facebook.react.bridge.JavaOnlyArray;
|
|
12
13
|
import com.facebook.react.bridge.JavaOnlyMap;
|
|
13
14
|
import com.facebook.react.bridge.ReadableArray;
|
|
@@ -19,7 +20,8 @@ import com.facebook.react.bridge.ReadableType;
|
|
|
19
20
|
* Native counterpart of object animated node (see AnimatedObject class in
|
|
20
21
|
* AnimatedImplementation.js)
|
|
21
22
|
*/
|
|
22
|
-
/* package */
|
|
23
|
+
/* package */ @Nullsafe(Nullsafe.Mode.LOCAL)
|
|
24
|
+
class ObjectAnimatedNode extends AnimatedNode {
|
|
23
25
|
|
|
24
26
|
private static final String VALUE_KEY = "value";
|
|
25
27
|
private static final String NODE_TAG_KEY = "nodeTag";
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
package com.facebook.react.animated;
|
|
9
9
|
|
|
10
|
+
import com.facebook.infer.annotation.Nullsafe;
|
|
10
11
|
import com.facebook.react.bridge.ReadableMap;
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -14,7 +15,8 @@ import com.facebook.react.bridge.ReadableMap;
|
|
|
14
15
|
* implementation has been copied from android implementation of Rebound library (see <a
|
|
15
16
|
* href="http://facebook.github.io/rebound/">http://facebook.github.io/rebound/</a>)
|
|
16
17
|
*/
|
|
17
|
-
/*package*/
|
|
18
|
+
/*package*/ @Nullsafe(Nullsafe.Mode.LOCAL)
|
|
19
|
+
class SpringAnimation extends AnimationDriver {
|
|
18
20
|
|
|
19
21
|
// maximum amount of time to simulate per physics iteration in seconds (4 frames at 60 FPS)
|
|
20
22
|
private static final double MAX_DELTA_TIME_SEC = 0.064;
|
|
@@ -17,6 +17,7 @@ import com.facebook.react.common.build.ReactBuildConfig;
|
|
|
17
17
|
*
|
|
18
18
|
* <p>These values are safe defaults and should not require manual changes.
|
|
19
19
|
*/
|
|
20
|
+
@Deprecated(since = "Use com.facebook.react.internal.featureflags.ReactNativeFeatureFlags instead.")
|
|
20
21
|
@DoNotStripAny
|
|
21
22
|
public class ReactFeatureFlags {
|
|
22
23
|
/**
|
|
@@ -152,7 +153,4 @@ public class ReactFeatureFlags {
|
|
|
152
153
|
* when there is work to do.
|
|
153
154
|
*/
|
|
154
155
|
public static boolean enableOnDemandReactChoreographer = false;
|
|
155
|
-
|
|
156
|
-
/** Enables the new unified {@link android.text.Spannable} building logic. */
|
|
157
|
-
public static boolean enableSpannableBuildingUnification = false;
|
|
158
156
|
}
|