react-native 0.74.0-nightly-20240128-cfc0ba04a → 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.
Files changed (148) hide show
  1. package/Libraries/Animated/NativeAnimatedHelper.js +1 -1
  2. package/Libraries/Animated/nodes/AnimatedStyle.js +1 -1
  3. package/Libraries/Animated/useAnimatedProps.js +1 -1
  4. package/Libraries/AppDelegate/RCTAppDelegate.mm +2 -1
  5. package/Libraries/Blob/React-RCTBlob.podspec +1 -0
  6. package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroid.android.js +69 -0
  7. package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroid.d.ts +24 -0
  8. package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroid.js +33 -0
  9. package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroidNativeComponent.js +13 -0
  10. package/Libraries/Core/ReactNativeVersion.js +2 -3
  11. package/Libraries/Core/ReactNativeVersionCheck.js +1 -1
  12. package/Libraries/Core/registerCallableModule.js +42 -0
  13. package/Libraries/Image/RCTImageLoader.mm +4 -11
  14. package/Libraries/LayoutAnimation/LayoutAnimation.js +1 -1
  15. package/Libraries/ReactNative/BridgelessUIManager.js +31 -13
  16. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +1 -1
  17. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +0 -33
  18. package/Libraries/ReactNative/__mocks__/FabricUIManager.js +12 -0
  19. package/Libraries/Renderer/implementations/ReactFabric-dev.js +24543 -21110
  20. package/Libraries/Renderer/implementations/ReactFabric-prod.js +4104 -3058
  21. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4352 -3273
  22. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +25038 -21457
  23. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3721 -2600
  24. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4024 -2869
  25. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +43 -4
  26. package/Libraries/WebPerformance/Performance.js +1 -1
  27. package/React/Base/RCTBridge+Private.h +14 -0
  28. package/React/Base/RCTBridge.mm +6 -0
  29. package/React/Base/RCTKeyCommands.m +12 -1
  30. package/React/Base/RCTVersion.m +3 -3
  31. package/React/CoreModules/RCTAlertController.mm +2 -3
  32. package/React/CoreModules/RCTAppearance.mm +1 -1
  33. package/React/CoreModules/React-CoreModules.podspec +1 -0
  34. package/React/CxxBridge/RCTCxxBridge.mm +21 -3
  35. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +22 -1
  36. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +13 -2
  37. package/React/Fabric/RCTConversions.h +2 -18
  38. package/React/React-RCTFabric.podspec +1 -0
  39. package/React-Core.podspec +1 -3
  40. package/ReactAndroid/api/ReactAndroid.api +53 -1
  41. package/ReactAndroid/gradle.properties +1 -1
  42. package/ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNode.java +3 -1
  43. package/ReactAndroid/src/main/java/com/facebook/react/animated/DecayAnimation.java +2 -0
  44. package/ReactAndroid/src/main/java/com/facebook/react/animated/DiffClampAnimatedNode.java +3 -1
  45. package/ReactAndroid/src/main/java/com/facebook/react/animated/ModulusAnimatedNode.java +3 -1
  46. package/ReactAndroid/src/main/java/com/facebook/react/animated/ObjectAnimatedNode.java +3 -1
  47. package/ReactAndroid/src/main/java/com/facebook/react/animated/SpringAnimation.java +3 -1
  48. package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +1 -3
  49. package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +5 -2
  50. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +11 -1
  51. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +11 -1
  52. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +3 -1
  53. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +3 -1
  54. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +12 -1
  55. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +3 -1
  56. package/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/JSCExecutor.kt +1 -1
  57. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +3 -3
  58. package/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java +3 -0
  59. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +13 -1
  60. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java +7 -0
  61. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +11 -0
  62. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java +9 -1
  63. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.java +24 -0
  64. package/ReactAndroid/src/main/java/com/facebook/react/views/image/ScaleTypeStartInside.java +1 -1
  65. package/ReactAndroid/src/main/java/com/facebook/react/views/popupmenu/PopupMenuSelectionEvent.kt +37 -0
  66. package/ReactAndroid/src/main/java/com/facebook/react/views/popupmenu/ReactPopupMenuContainer.kt +49 -0
  67. package/ReactAndroid/src/main/java/com/facebook/react/views/popupmenu/ReactPopupMenuManager.kt +54 -0
  68. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java +2 -2
  69. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java +2 -2
  70. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManagerMapBuffer.java +2 -2
  71. package/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.cpp +2 -0
  72. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +9 -1
  73. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +4 -1
  74. package/ReactAndroid/src/main/jni/react/featureflags/ReactNativeFeatureFlagsProviderHolder.cpp +7 -1
  75. package/ReactAndroid/src/main/jni/react/featureflags/ReactNativeFeatureFlagsProviderHolder.h +2 -1
  76. package/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp +16 -10
  77. package/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.cpp +0 -3
  78. package/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.h +0 -1
  79. package/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultComponentsRegistry.cpp +7 -6
  80. package/ReactCommon/cxxreact/Instance.cpp +34 -18
  81. package/ReactCommon/cxxreact/Instance.h +13 -2
  82. package/ReactCommon/cxxreact/React-cxxreact.podspec +1 -1
  83. package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
  84. package/ReactCommon/jsinspector-modern/InstanceAgent.cpp +34 -0
  85. package/ReactCommon/jsinspector-modern/InstanceAgent.h +54 -0
  86. package/ReactCommon/jsinspector-modern/InstanceTarget.cpp +25 -0
  87. package/ReactCommon/jsinspector-modern/InstanceTarget.h +58 -0
  88. package/ReactCommon/jsinspector-modern/PageAgent.cpp +65 -0
  89. package/ReactCommon/jsinspector-modern/PageAgent.h +13 -0
  90. package/ReactCommon/jsinspector-modern/PageTarget.cpp +41 -0
  91. package/ReactCommon/jsinspector-modern/PageTarget.h +28 -1
  92. package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +12 -1
  93. package/ReactCommon/jsinspector-modern/ReactCdp.h +1 -0
  94. package/ReactCommon/jsinspector-modern/tests/InspectorMocks.h +2 -0
  95. package/ReactCommon/jsinspector-modern/tests/PageTargetTest.cpp +164 -10
  96. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +5 -1
  97. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +6 -1
  98. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +18 -1
  99. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +3 -1
  100. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +5 -1
  101. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +2 -1
  102. package/ReactCommon/react/featureflags/tests/ReactNativeFeatureFlagsTest.cpp +4 -0
  103. package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +1 -0
  104. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +6 -1
  105. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +3 -1
  106. package/ReactCommon/react/renderer/attributedstring/primitives.h +0 -86
  107. package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp +4 -1
  108. package/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +0 -16
  109. package/ReactCommon/react/renderer/components/view/CSSTokenizer.cpp +187 -0
  110. package/ReactCommon/react/renderer/components/view/CSSTokenizer.h +101 -0
  111. package/ReactCommon/react/renderer/components/view/tests/CSSTokenizerTest.cpp +144 -0
  112. package/ReactCommon/react/renderer/core/ComponentDescriptor.h +0 -1
  113. package/ReactCommon/react/renderer/core/EventEmitter.cpp +14 -6
  114. package/ReactCommon/react/renderer/core/LayoutPrimitives.h +0 -17
  115. package/ReactCommon/react/renderer/core/graphicsConversions.h +2 -23
  116. package/ReactCommon/react/renderer/core/propsConversions.h +0 -1
  117. package/ReactCommon/react/renderer/graphics/Color.h +7 -3
  118. package/ReactCommon/react/renderer/graphics/React-graphics.podspec +6 -1
  119. package/ReactCommon/react/renderer/graphics/fromRawValueShared.h +50 -0
  120. package/ReactCommon/react/renderer/graphics/platform/android/react/renderer/graphics/PlatformColorParser.h +18 -7
  121. package/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/PlatformColorParser.h +16 -4
  122. package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.h +55 -15
  123. package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.mm +132 -0
  124. package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/PlatformColorParser.h +15 -17
  125. package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/PlatformColorParser.mm +73 -0
  126. package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.h +8 -2
  127. package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.mm +14 -3
  128. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextPrimitivesConversions.h +4 -19
  129. package/ReactCommon/react/runtime/ReactInstance.cpp +15 -2
  130. package/ReactCommon/react/runtime/ReactInstance.h +13 -2
  131. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +5 -3
  132. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.h +3 -1
  133. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +10 -2
  134. package/ReactCommon/react/test_utils/ios/Shims/ShimRCTInstance.mm +5 -2
  135. package/ReactCommon/react/utils/hash_combine.h +8 -6
  136. package/gradle/libs.versions.toml +1 -1
  137. package/index.js +9 -0
  138. package/package.json +9 -9
  139. package/sdks/hermesc/osx-bin/hermes +0 -0
  140. package/sdks/hermesc/osx-bin/hermesc +0 -0
  141. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  142. package/src/private/featureflags/NativeReactNativeFeatureFlags.js +2 -1
  143. package/src/private/featureflags/ReactNativeFeatureFlags.js +42 -1
  144. package/src/private/specs/components/PopupMenuAndroidNativeComponent.js +47 -0
  145. package/template/Gemfile +3 -1
  146. package/template/package.json +5 -5
  147. package/Libraries/Performance/QuickPerformanceLogger.js +0 -155
  148. package/ReactAndroid/src/main/jni/react/jni/OnLoad.h +0 -16
@@ -31,6 +31,7 @@
31
31
  #import <ReactCommon/RCTTurboModuleManager.h>
32
32
  #import <ReactCommon/RuntimeExecutor.h>
33
33
  #import <cxxreact/ReactMarker.h>
34
+ #import <jsinspector-modern/ReactCdp.h>
34
35
  #import <jsireact/JSIExecutor.h>
35
36
  #import <react/runtime/BridgelessJSCallInvoker.h>
36
37
  #import <react/utils/ContextContainer.h>
@@ -81,6 +82,8 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
81
82
 
82
83
  // APIs supporting interop with native modules and view managers
83
84
  RCTBridgeModuleDecorator *_bridgeModuleDecorator;
85
+
86
+ jsinspector_modern::PageTarget *_parentInspectorTarget;
84
87
  }
85
88
 
86
89
  #pragma mark - Public
@@ -91,6 +94,7 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
91
94
  turboModuleManagerDelegate:(id<RCTTurboModuleManagerDelegate>)tmmDelegate
92
95
  onInitialBundleLoad:(RCTInstanceInitialBundleLoadCompletionBlock)onInitialBundleLoad
93
96
  moduleRegistry:(RCTModuleRegistry *)moduleRegistry
97
+ parentInspectorTarget:(jsinspector_modern::PageTarget *)parentInspectorTarget
94
98
  {
95
99
  if (self = [super init]) {
96
100
  _performanceLogger = [RCTPerformanceLogger new];
@@ -106,6 +110,7 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
106
110
  moduleRegistry:moduleRegistry
107
111
  bundleManager:bundleManager
108
112
  callableJSModules:[RCTCallableJSModules new]];
113
+ _parentInspectorTarget = parentInspectorTarget;
109
114
  {
110
115
  __weak __typeof(self) weakSelf = self;
111
116
  [_bridgeModuleDecorator.callableJSModules
@@ -138,7 +143,9 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
138
143
  {
139
144
  std::lock_guard<std::mutex> lock(_invalidationMutex);
140
145
  _valid = false;
141
-
146
+ if (self->_reactInstance) {
147
+ self->_reactInstance->unregisterFromInspector();
148
+ }
142
149
  [_surfacePresenter suspend];
143
150
  [_jsThreadManager dispatchToJSThread:^{
144
151
  /**
@@ -221,7 +228,8 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
221
228
  _jsRuntimeFactory->createJSRuntime(_jsThreadManager.jsMessageThread),
222
229
  _jsThreadManager.jsMessageThread,
223
230
  timerManager,
224
- jsErrorHandlingFunc);
231
+ jsErrorHandlingFunc,
232
+ _parentInspectorTarget);
225
233
  _valid = true;
226
234
 
227
235
  RuntimeExecutor bufferedRuntimeExecutor = _reactInstance->getBufferedRuntimeExecutor();
@@ -23,7 +23,8 @@ static __weak ShimRCTInstance *weakShim = nil;
23
23
  [RCTInstance class],
24
24
  [ShimRCTInstance class],
25
25
  @selector(initWithDelegate:
26
- jsRuntimeFactory:bundleManager:turboModuleManagerDelegate:onInitialBundleLoad:moduleRegistry:));
26
+ jsRuntimeFactory:bundleManager:turboModuleManagerDelegate:onInitialBundleLoad:moduleRegistry
27
+ :parentInspectorTarget:));
27
28
  RCTSwizzleInstanceSelector([RCTInstance class], [ShimRCTInstance class], @selector(invalidate));
28
29
  RCTSwizzleInstanceSelector(
29
30
  [RCTInstance class], [ShimRCTInstance class], @selector(callFunctionOnJSModule:method:args:));
@@ -38,7 +39,8 @@ static __weak ShimRCTInstance *weakShim = nil;
38
39
  [RCTInstance class],
39
40
  [ShimRCTInstance class],
40
41
  @selector(initWithDelegate:
41
- jsRuntimeFactory:bundleManager:turboModuleManagerDelegate:onInitialBundleLoad:moduleRegistry:));
42
+ jsRuntimeFactory:bundleManager:turboModuleManagerDelegate:onInitialBundleLoad:moduleRegistry
43
+ :parentInspectorTarget:));
42
44
  RCTSwizzleInstanceSelector([RCTInstance class], [ShimRCTInstance class], @selector(invalidate));
43
45
  RCTSwizzleInstanceSelector(
44
46
  [RCTInstance class], [ShimRCTInstance class], @selector(callFunctionOnJSModule:method:args:));
@@ -52,6 +54,7 @@ static __weak ShimRCTInstance *weakShim = nil;
52
54
  turboModuleManagerDelegate:(id<RCTTurboModuleManagerDelegate>)tmmDelegate
53
55
  onInitialBundleLoad:(RCTInstanceInitialBundleLoadCompletionBlock)onInitialBundleLoad
54
56
  moduleRegistry:(RCTModuleRegistry *)moduleRegistry
57
+ parentInspectorTarget:(facebook::react::jsinspector_modern::PageTarget *)parentInspectorTarget
55
58
  {
56
59
  weakShim.initCount++;
57
60
  return self;
@@ -8,20 +8,22 @@
8
8
  #pragma once
9
9
 
10
10
  #include <functional>
11
+ #include <type_traits>
11
12
 
12
13
  namespace facebook::react {
13
14
 
14
- template <
15
- typename T,
16
- typename... Rest,
17
- bool Enabled = !std::is_same<T, const char*>::value,
18
- typename = typename std::enable_if<Enabled>::type>
15
+ template <typename T>
16
+ concept Hashable = !std::is_same_v<T, const char*> && (requires(T a) {
17
+ { std::hash<T>{}(a) } -> std::convertible_to<std::size_t>;
18
+ });
19
+
20
+ template <Hashable T, Hashable... Rest>
19
21
  void hash_combine(std::size_t& seed, const T& v, const Rest&... rest) {
20
22
  seed ^= std::hash<T>{}(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
21
23
  (hash_combine(seed, rest), ...);
22
24
  }
23
25
 
24
- template <typename T, typename... Args>
26
+ template <Hashable T, Hashable... Args>
25
27
  std::size_t hash_combine(const T& v, const Args&... args) {
26
28
  std::size_t seed = 0;
27
29
  hash_combine<T, Args...>(seed, v, args...);
@@ -16,7 +16,7 @@ androidx-tracing = "1.1.0"
16
16
  assertj = "3.21.0"
17
17
  binary-compatibility-validator = "0.13.2"
18
18
  download = "5.4.0"
19
- fbjni = "0.5.1"
19
+ fbjni = "0.6.0"
20
20
  fresco = "3.1.3"
21
21
  infer-annotation = "0.18.0"
22
22
  javax-annotation-api = "1.3.2"
package/index.js CHANGED
@@ -27,6 +27,7 @@ import typeof Clipboard from './Libraries/Components/Clipboard/Clipboard';
27
27
  import typeof DrawerLayoutAndroid from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid';
28
28
  import typeof Keyboard from './Libraries/Components/Keyboard/Keyboard';
29
29
  import typeof KeyboardAvoidingView from './Libraries/Components/Keyboard/KeyboardAvoidingView';
30
+ import typeof PopupMenuAndroid from './Libraries/Components/PopupMenuAndroid/PopupMenuAndroid';
30
31
  import typeof Pressable from './Libraries/Components/Pressable/Pressable';
31
32
  import typeof ProgressBarAndroid from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid';
32
33
  import typeof RefreshControl from './Libraries/Components/RefreshControl/RefreshControl';
@@ -43,6 +44,7 @@ import typeof TouchableNativeFeedback from './Libraries/Components/Touchable/Tou
43
44
  import typeof TouchableOpacity from './Libraries/Components/Touchable/TouchableOpacity';
44
45
  import typeof TouchableWithoutFeedback from './Libraries/Components/Touchable/TouchableWithoutFeedback';
45
46
  import typeof View from './Libraries/Components/View/View';
47
+ import typeof RegisterCallableModule from './Libraries/Core/registerCallableModule';
46
48
  import typeof NativeEventEmitter from './Libraries/EventEmitter/NativeEventEmitter';
47
49
  import typeof RCTDeviceEventEmitter from './Libraries/EventEmitter/RCTDeviceEventEmitter';
48
50
  import typeof RCTNativeAppEventEmitter from './Libraries/EventEmitter/RCTNativeAppEventEmitter';
@@ -97,6 +99,9 @@ const invariant = require('invariant');
97
99
  export type HostComponent<T> = _HostComponentInternal<T>;
98
100
 
99
101
  module.exports = {
102
+ get registerCallableModule(): RegisterCallableModule {
103
+ return require('./Libraries/Core/registerCallableModule').default;
104
+ },
100
105
  // Components
101
106
  get AccessibilityInfo(): AccessibilityInfo {
102
107
  return require('./Libraries/Components/AccessibilityInfo/AccessibilityInfo')
@@ -129,6 +134,10 @@ module.exports = {
129
134
  return require('./Libraries/Components/Keyboard/KeyboardAvoidingView')
130
135
  .default;
131
136
  },
137
+ get PopupMenuAndroid(): PopupMenuAndroid {
138
+ return require('./Libraries/Components/PopupMenuAndroid/PopupMenuAndroid')
139
+ .default;
140
+ },
132
141
  get Modal(): Modal {
133
142
  return require('./Libraries/Modal/Modal');
134
143
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.74.0-nightly-20240128-cfc0ba04a",
3
+ "version": "1000.0.0",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -101,13 +101,13 @@
101
101
  "@react-native-community/cli": "13.5.1",
102
102
  "@react-native-community/cli-platform-android": "13.5.1",
103
103
  "@react-native-community/cli-platform-ios": "13.5.1",
104
- "@react-native/assets-registry": "0.74.0-nightly-20240128-cfc0ba04a",
105
- "@react-native/codegen": "0.74.0-nightly-20240128-cfc0ba04a",
106
- "@react-native/community-cli-plugin": "0.74.0-nightly-20240128-cfc0ba04a",
107
- "@react-native/gradle-plugin": "0.74.0-nightly-20240128-cfc0ba04a",
108
- "@react-native/js-polyfills": "0.74.0-nightly-20240128-cfc0ba04a",
109
- "@react-native/normalize-colors": "0.74.0-nightly-20240128-cfc0ba04a",
110
- "@react-native/virtualized-lists": "0.74.0-nightly-20240128-cfc0ba04a",
104
+ "@react-native/assets-registry": "0.74.0",
105
+ "@react-native/codegen": "0.74.0",
106
+ "@react-native/community-cli-plugin": "0.74.0",
107
+ "@react-native/gradle-plugin": "0.74.0",
108
+ "@react-native/js-polyfills": "0.74.0",
109
+ "@react-native/normalize-colors": "0.74.1",
110
+ "@react-native/virtualized-lists": "0.74.0",
111
111
  "abort-controller": "^3.0.0",
112
112
  "anser": "^1.4.9",
113
113
  "ansi-regex": "^5.0.0",
@@ -153,4 +153,4 @@
153
153
  }
154
154
  ]
155
155
  }
156
- }
156
+ }
Binary file
Binary file
Binary file
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<564159837241d197ebc3084ff9e72b7c>>
7
+ * @generated SignedSource<<80726297990981a85ae106f8566ec662>>
8
8
  * @flow strict-local
9
9
  */
10
10
 
@@ -27,6 +27,7 @@ export interface Spec extends TurboModule {
27
27
  +useModernRuntimeScheduler?: () => boolean;
28
28
  +enableMicrotasks?: () => boolean;
29
29
  +batchRenderingUpdatesInEventLoop?: () => boolean;
30
+ +enableSpannableBuildingUnification?: () => boolean;
30
31
  }
31
32
 
32
33
  const NativeReactNativeFeatureFlags: ?Spec = TurboModuleRegistry.get<Spec>(
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<4e4ce58c1ce1a95355bba0dfe099e26e>>
7
+ * @generated SignedSource<<d68bc5fec0897ad698014c938e4ab21e>>
8
8
  * @flow strict-local
9
9
  */
10
10
 
@@ -27,6 +27,12 @@ import {
27
27
 
28
28
  export type ReactNativeFeatureFlagsJsOnly = {
29
29
  jsOnlyTestFlag: Getter<boolean>,
30
+ isLayoutAnimationEnabled: Getter<boolean>,
31
+ animatedShouldDebounceQueueFlush: Getter<boolean>,
32
+ animatedShouldUseSingleOp: Getter<boolean>,
33
+ enableAccessToHostTreeInFabric: Getter<boolean>,
34
+ shouldUseAnimatedObjectForTransform: Getter<boolean>,
35
+ shouldUseSetNativePropsInFabric: Getter<boolean>,
30
36
  };
31
37
 
32
38
  export type ReactNativeFeatureFlagsJsOnlyOverrides = Partial<ReactNativeFeatureFlagsJsOnly>;
@@ -37,6 +43,7 @@ export type ReactNativeFeatureFlags = {
37
43
  useModernRuntimeScheduler: Getter<boolean>,
38
44
  enableMicrotasks: Getter<boolean>,
39
45
  batchRenderingUpdatesInEventLoop: Getter<boolean>,
46
+ enableSpannableBuildingUnification: Getter<boolean>,
40
47
  }
41
48
 
42
49
  /**
@@ -44,6 +51,36 @@ export type ReactNativeFeatureFlags = {
44
51
  */
45
52
  export const jsOnlyTestFlag: Getter<boolean> = createJavaScriptFlagGetter('jsOnlyTestFlag', false);
46
53
 
54
+ /**
55
+ * Function used to enable / disabled Layout Animations in React Native.
56
+ */
57
+ export const isLayoutAnimationEnabled: Getter<boolean> = createJavaScriptFlagGetter('isLayoutAnimationEnabled', true);
58
+
59
+ /**
60
+ * Enables an experimental flush-queue debouncing in Animated.js.
61
+ */
62
+ export const animatedShouldDebounceQueueFlush: Getter<boolean> = createJavaScriptFlagGetter('animatedShouldDebounceQueueFlush', false);
63
+
64
+ /**
65
+ * Enables an experimental mega-operation for Animated.js that replaces many calls to native with a single call into native, to reduce JSI/JNI traffic.
66
+ */
67
+ export const animatedShouldUseSingleOp: Getter<boolean> = createJavaScriptFlagGetter('animatedShouldUseSingleOp', false);
68
+
69
+ /**
70
+ * Enables access to the host tree in Fabric using DOM-compatible APIs.
71
+ */
72
+ export const enableAccessToHostTreeInFabric: Getter<boolean> = createJavaScriptFlagGetter('enableAccessToHostTreeInFabric', false);
73
+
74
+ /**
75
+ * Enables use of AnimatedObject for animating transform values.
76
+ */
77
+ export const shouldUseAnimatedObjectForTransform: Getter<boolean> = createJavaScriptFlagGetter('shouldUseAnimatedObjectForTransform', false);
78
+
79
+ /**
80
+ * Enables use of setNativeProps in JS driven animations.
81
+ */
82
+ export const shouldUseSetNativePropsInFabric: Getter<boolean> = createJavaScriptFlagGetter('shouldUseSetNativePropsInFabric', true);
83
+
47
84
  /**
48
85
  * Common flag for testing. Do NOT modify.
49
86
  */
@@ -60,6 +97,10 @@ export const enableMicrotasks: Getter<boolean> = createNativeFlagGetter('enableM
60
97
  * When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.
61
98
  */
62
99
  export const batchRenderingUpdatesInEventLoop: Getter<boolean> = createNativeFlagGetter('batchRenderingUpdatesInEventLoop', false);
100
+ /**
101
+ * Uses new, deduplicated logic for constructing Android Spannables from text fragments
102
+ */
103
+ export const enableSpannableBuildingUnification: Getter<boolean> = createNativeFlagGetter('enableSpannableBuildingUnification', false);
63
104
 
64
105
  /**
65
106
  * Overrides the feature flags with the provided methods.
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict-local
8
+ * @format
9
+ */
10
+
11
+ import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
12
+ import type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';
13
+ import type {
14
+ DirectEventHandler,
15
+ Int32,
16
+ } from '../../../../Libraries/Types/CodegenTypes';
17
+
18
+ import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNativeCommands';
19
+ import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
20
+ import * as React from 'react';
21
+
22
+ type PopupMenuSelectionEvent = $ReadOnly<{
23
+ item: Int32,
24
+ }>;
25
+
26
+ type NativeProps = $ReadOnly<{
27
+ ...ViewProps,
28
+
29
+ //Props
30
+ menuItems?: ?$ReadOnlyArray<string>,
31
+
32
+ onSelectionChange?: DirectEventHandler<PopupMenuSelectionEvent>,
33
+ }>;
34
+
35
+ type ComponentType = HostComponent<NativeProps>;
36
+
37
+ interface NativeCommands {
38
+ +show: (viewRef: React.ElementRef<ComponentType>) => void;
39
+ }
40
+
41
+ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
42
+ supportedCommands: ['show'],
43
+ });
44
+
45
+ export default (codegenNativeComponent<NativeProps>(
46
+ 'AndroidPopupMenu',
47
+ ): HostComponent<NativeProps>);
package/template/Gemfile CHANGED
@@ -3,5 +3,7 @@ source 'https://rubygems.org'
3
3
  # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4
4
  ruby ">= 2.6.10"
5
5
 
6
- gem 'cocoapods', '~> 1.13'
6
+ # Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7
+ # bound in the template on Cocoapods with next React Native release.
8
+ gem 'cocoapods', '>= 1.13', '< 1.15'
7
9
  gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
@@ -11,16 +11,16 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "react": "18.2.0",
14
- "react-native": "0.74.0-nightly-20240128-cfc0ba04a"
14
+ "react-native": "0.74.0-nightly-20240131-82e9a5e4f"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@babel/core": "^7.20.0",
18
18
  "@babel/preset-env": "^7.20.0",
19
19
  "@babel/runtime": "^7.20.0",
20
- "@react-native/babel-preset": "0.74.0-nightly-20240128-cfc0ba04a",
21
- "@react-native/eslint-config": "0.74.0-nightly-20240128-cfc0ba04a",
22
- "@react-native/metro-config": "0.74.0-nightly-20240128-cfc0ba04a",
23
- "@react-native/typescript-config": "0.74.0-nightly-20240128-cfc0ba04a",
20
+ "@react-native/babel-preset": "0.74.0-nightly-20240131-82e9a5e4f",
21
+ "@react-native/eslint-config": "0.74.0-nightly-20240131-82e9a5e4f",
22
+ "@react-native/metro-config": "0.74.0-nightly-20240131-82e9a5e4f",
23
+ "@react-native/typescript-config": "0.74.0-nightly-20240131-82e9a5e4f",
24
24
  "@types/react": "^18.2.6",
25
25
  "@types/react-test-renderer": "^18.0.0",
26
26
  "babel-jest": "^29.6.3",
@@ -1,155 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @format
8
- * @flow strict
9
- */
10
-
11
- 'use strict';
12
-
13
- const AUTO_SET_TIMESTAMP = -1;
14
- const DUMMY_INSTANCE_KEY = 0;
15
-
16
- // Defines map of annotations
17
- // Use as following:
18
- // {string: {key1: value1, key2: value2}}
19
- export type AnnotationsMap = Partial<{
20
- string: ?{[string]: string, ...},
21
- int: ?{[string]: number, ...},
22
- double: ?{[string]: number, ...},
23
- bool: ?{[string]: boolean, ...},
24
- string_array: ?{[string]: $ReadOnlyArray<string>, ...},
25
- int_array: ?{[string]: $ReadOnlyArray<number>, ...},
26
- double_array: ?{[string]: $ReadOnlyArray<number>, ...},
27
- bool_array: ?{[string]: $ReadOnlyArray<boolean>, ...},
28
- }>;
29
-
30
- const QuickPerformanceLogger = {
31
- markerStart(
32
- markerId: number,
33
- instanceKey: number = DUMMY_INSTANCE_KEY,
34
- timestamp: number = AUTO_SET_TIMESTAMP,
35
- ): void {
36
- if (global.nativeQPLMarkerStart) {
37
- global.nativeQPLMarkerStart(markerId, instanceKey, timestamp);
38
- }
39
- },
40
-
41
- markerEnd(
42
- markerId: number,
43
- actionId: number,
44
- instanceKey: number = DUMMY_INSTANCE_KEY,
45
- timestamp: number = AUTO_SET_TIMESTAMP,
46
- ): void {
47
- if (global.nativeQPLMarkerEnd) {
48
- global.nativeQPLMarkerEnd(markerId, instanceKey, actionId, timestamp);
49
- }
50
- },
51
-
52
- markerTag(
53
- markerId: number,
54
- tag: string,
55
- instanceKey: number = DUMMY_INSTANCE_KEY,
56
- ): void {
57
- if (global.nativeQPLMarkerTag) {
58
- global.nativeQPLMarkerTag(markerId, instanceKey, tag);
59
- }
60
- },
61
-
62
- markerAnnotate(
63
- markerId: number,
64
- annotations: AnnotationsMap,
65
- instanceKey: number = DUMMY_INSTANCE_KEY,
66
- ): void {
67
- if (global.nativeQPLMarkerAnnotateWithMap) {
68
- global.nativeQPLMarkerAnnotateWithMap(markerId, annotations, instanceKey);
69
- } else if (global.nativeQPLMarkerAnnotate) {
70
- for (const type of [
71
- 'string',
72
- 'int',
73
- 'double',
74
- 'bool',
75
- 'string_array',
76
- 'int_array',
77
- 'double_array',
78
- 'bool_array',
79
- ]) {
80
- const keyValsOfType = annotations[type];
81
- if (keyValsOfType != null) {
82
- for (const annotationKey of Object.keys(keyValsOfType)) {
83
- global.nativeQPLMarkerAnnotate(
84
- markerId,
85
- instanceKey,
86
- annotationKey,
87
- keyValsOfType[annotationKey].toString(),
88
- );
89
- }
90
- }
91
- }
92
- }
93
- },
94
-
95
- markerCancel(
96
- markerId: number,
97
- instanceKey?: number = DUMMY_INSTANCE_KEY,
98
- ): void {
99
- // $FlowFixMe[object-this-reference]
100
- this.markerDrop(markerId, instanceKey);
101
- },
102
-
103
- markerPoint(
104
- markerId: number,
105
- name: string,
106
- instanceKey: number = DUMMY_INSTANCE_KEY,
107
- timestamp: number = AUTO_SET_TIMESTAMP,
108
- data: ?string = null,
109
- ): void {
110
- if (global.nativeQPLMarkerPoint) {
111
- global.nativeQPLMarkerPoint(markerId, name, instanceKey, timestamp, data);
112
- }
113
- },
114
-
115
- markerDrop(
116
- markerId: number,
117
- instanceKey?: number = DUMMY_INSTANCE_KEY,
118
- ): void {
119
- if (global.nativeQPLMarkerDrop) {
120
- global.nativeQPLMarkerDrop(markerId, instanceKey);
121
- }
122
- },
123
-
124
- // Checks whether the given QPL marker is going to be sent to server or not
125
- // (the latter may be the case due to e.g. downsampling).
126
- // Note that markerStart is expected to have been already called at this point.
127
- isMarkerOn(
128
- markerId: number,
129
- instanceKey?: number = DUMMY_INSTANCE_KEY,
130
- ): boolean {
131
- if (global.nativeQPLIsMarkerOn) {
132
- return global.nativeQPLIsMarkerOn(markerId, instanceKey);
133
- }
134
- return true;
135
- },
136
-
137
- markEvent(
138
- markerId: number,
139
- type: string,
140
- annotations: ?AnnotationsMap = null,
141
- ): void {
142
- if (global.nativeQPLMarkEvent) {
143
- global.nativeQPLMarkEvent(markerId, type, annotations);
144
- }
145
- },
146
-
147
- currentTimestamp(): number {
148
- if (global.nativeQPLTimestamp) {
149
- return global.nativeQPLTimestamp();
150
- }
151
- return 0;
152
- },
153
- };
154
-
155
- module.exports = QuickPerformanceLogger;
@@ -1,16 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #pragma once
9
-
10
- #include <jni.h>
11
-
12
- namespace facebook::react {
13
-
14
- jmethodID getLogMarkerMethod();
15
-
16
- } // namespace facebook::react