@office-iss/react-native-win32 0.75.2 → 0.76.0-preview.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.
Files changed (174) hide show
  1. package/.eslintrc.js +11 -0
  2. package/.flowconfig +5 -4
  3. package/CHANGELOG.json +164 -47
  4. package/CHANGELOG.md +53 -28
  5. package/Libraries/Alert/Alert.js +3 -0
  6. package/Libraries/Animated/AnimatedEvent.js +1 -1
  7. package/Libraries/Animated/AnimatedImplementation.js +7 -7
  8. package/Libraries/Animated/NativeAnimatedAllowlist.js +111 -0
  9. package/Libraries/Animated/animations/Animation.js +11 -1
  10. package/Libraries/Animated/animations/DecayAnimation.js +1 -1
  11. package/Libraries/Animated/animations/SpringAnimation.js +1 -1
  12. package/Libraries/Animated/animations/TimingAnimation.js +2 -1
  13. package/Libraries/Animated/components/AnimatedScrollView.js +3 -2
  14. package/Libraries/Animated/createAnimatedComponent.js +10 -9
  15. package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
  16. package/Libraries/Animated/nodes/AnimatedInterpolation.js +3 -2
  17. package/Libraries/Animated/nodes/AnimatedNode.js +42 -33
  18. package/Libraries/Animated/nodes/AnimatedObject.js +56 -50
  19. package/Libraries/Animated/nodes/AnimatedProps.js +77 -40
  20. package/Libraries/Animated/nodes/AnimatedStyle.js +103 -59
  21. package/Libraries/Animated/nodes/AnimatedTracking.js +1 -1
  22. package/Libraries/Animated/nodes/AnimatedTransform.js +102 -67
  23. package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
  24. package/Libraries/Animated/nodes/AnimatedWithChildren.js +21 -22
  25. package/Libraries/Animated/useAnimatedProps.js +142 -7
  26. package/Libraries/BatchedBridge/NativeModules.js +2 -0
  27. package/Libraries/Blob/FileReader.js +1 -1
  28. package/Libraries/Blob/URL.js +2 -62
  29. package/Libraries/Blob/URLSearchParams.js +71 -0
  30. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -1
  31. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +1 -1
  32. package/Libraries/Components/ScrollView/ScrollView.js +131 -169
  33. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
  34. package/Libraries/Components/StatusBar/StatusBar.js +3 -1
  35. package/Libraries/Components/TextInput/TextInput.d.ts +32 -2
  36. package/Libraries/Components/TextInput/TextInput.js +230 -94
  37. package/Libraries/Components/TextInput/TextInput.win32.js +230 -100
  38. package/Libraries/Components/View/ReactNativeStyleAttributes.js +22 -0
  39. package/Libraries/Components/View/ReactNativeViewAttributes.js +2 -0
  40. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +2 -0
  41. package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
  42. package/Libraries/Components/View/ViewNativeComponent.js +0 -1
  43. package/Libraries/Components/View/ViewPropTypes.js +14 -0
  44. package/Libraries/Components/View/ViewPropTypes.win32.js +14 -0
  45. package/Libraries/Core/ExceptionsManager.js +2 -0
  46. package/Libraries/Core/InitializeCore.js +3 -1
  47. package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
  48. package/Libraries/Core/ReactNativeVersion.js +4 -4
  49. package/Libraries/Core/ReactNativeVersionCheck.win32.js +1 -1
  50. package/Libraries/Core/setUpErrorHandling.js +7 -1
  51. package/Libraries/Core/setUpGlobals.js +1 -0
  52. package/Libraries/Core/setUpReactRefresh.js +0 -4
  53. package/Libraries/Image/AssetSourceResolver.js +28 -1
  54. package/Libraries/Image/Image.android.js +9 -14
  55. package/Libraries/Image/Image.ios.js +11 -22
  56. package/Libraries/Image/Image.win32.js +11 -24
  57. package/Libraries/Image/ImageBackground.js +1 -8
  58. package/Libraries/Image/ImageUtils.js +9 -9
  59. package/Libraries/Image/ImageViewNativeComponent.js +1 -0
  60. package/Libraries/Inspector/Inspector.js +3 -2
  61. package/Libraries/Inspector/Inspector.win32.js +3 -2
  62. package/Libraries/Inspector/InspectorPanel.js +16 -10
  63. package/Libraries/Inspector/NetworkOverlay.js +1 -1
  64. package/Libraries/Interaction/TaskQueue.js +1 -0
  65. package/Libraries/Lists/FlatList.js +1 -1
  66. package/Libraries/Lists/SectionList.js +2 -2
  67. package/Libraries/Lists/SectionListModern.js +3 -3
  68. package/Libraries/LogBox/Data/LogBoxData.js +24 -3
  69. package/Libraries/LogBox/LogBoxNotificationContainer.js +3 -2
  70. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +9 -8
  71. package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +9 -29
  72. package/Libraries/Modal/Modal.js +0 -1
  73. package/Libraries/NativeComponent/BaseViewConfig.android.js +8 -0
  74. package/Libraries/NativeComponent/BaseViewConfig.ios.js +7 -0
  75. package/Libraries/NativeComponent/BaseViewConfig.win32.js +7 -0
  76. package/Libraries/NativeComponent/NativeComponentRegistry.js +22 -22
  77. package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -21
  78. package/Libraries/Network/XMLHttpRequest.js +4 -2
  79. package/Libraries/ReactNative/AppContainer-dev.js +1 -5
  80. package/Libraries/ReactNative/AppContainer-prod.js +1 -5
  81. package/Libraries/ReactNative/AppContainer.js +0 -1
  82. package/Libraries/ReactNative/AppRegistry.js +0 -6
  83. package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
  84. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
  85. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +5 -5
  86. package/Libraries/ReactNative/RendererImplementation.js +26 -4
  87. package/Libraries/ReactNative/getNativeComponentAttributes.js +8 -0
  88. package/Libraries/ReactNative/renderApplication.js +0 -2
  89. package/Libraries/Renderer/shims/ReactNativeTypes.js +11 -4
  90. package/Libraries/StyleSheet/StyleSheet.js +1 -1
  91. package/Libraries/StyleSheet/StyleSheet.win32.js +1 -1
  92. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +57 -0
  93. package/Libraries/StyleSheet/StyleSheetTypes.js +60 -5
  94. package/Libraries/StyleSheet/processBackgroundImage.js +384 -0
  95. package/Libraries/StyleSheet/processBoxShadow.js +211 -0
  96. package/Libraries/StyleSheet/processFilter.js +231 -42
  97. package/Libraries/Text/Text.js +394 -196
  98. package/Libraries/Text/Text.win32.js +442 -229
  99. package/Libraries/Text/TextNativeComponent.js +2 -1
  100. package/Libraries/Text/TextNativeComponent.win32.js +1 -1
  101. package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
  102. package/Libraries/Types/CodegenTypes.js +3 -1
  103. package/Libraries/Utilities/Appearance.js +108 -84
  104. package/Libraries/Utilities/DevLoadingView.js +2 -4
  105. package/Libraries/Utilities/HMRClient.js +2 -1
  106. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  107. package/Libraries/Utilities/createPerformanceLogger.js +0 -9
  108. package/Libraries/Utilities/stringifyViewConfig.js +22 -0
  109. package/Libraries/Utilities/useColorScheme.js +3 -3
  110. package/Libraries/WebSocket/WebSocket.js +1 -1
  111. package/Libraries/promiseRejectionTrackingOptions.js +1 -1
  112. package/Libraries/vendor/emitter/EventEmitter.js +6 -5
  113. package/flow/jest.js +2 -2
  114. package/index.js +3 -1
  115. package/index.win32.js +3 -1
  116. package/jest/mockComponent.js +4 -1
  117. package/jest/mockModal.js +1 -3
  118. package/jest/mockScrollView.js +1 -1
  119. package/jest/renderer.js +2 -2
  120. package/jest/setup.js +16 -13
  121. package/jest.config.js +1 -2
  122. package/overrides.json +22 -22
  123. package/package.json +30 -30
  124. package/src/private/animated/NativeAnimatedHelper.js +438 -0
  125. package/src/private/animated/NativeAnimatedHelper.win32.js +440 -0
  126. package/src/private/animated/NativeAnimatedValidation.js +64 -0
  127. package/src/private/components/HScrollViewNativeComponents.js +56 -0
  128. package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +27 -0
  129. package/src/private/components/VScrollViewNativeComponents.js +48 -0
  130. package/src/private/components/useSyncOnScroll.js +48 -0
  131. package/src/private/featureflags/ReactNativeFeatureFlags.js +166 -16
  132. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +29 -5
  133. package/src/private/fusebox/FuseboxSessionObserver.js +42 -0
  134. package/{Libraries/Core → src/private/renderer/errorhandling}/ErrorHandlers.js +14 -4
  135. package/src/private/setup/setUpDOM.js +28 -0
  136. package/src/private/setup/setUpIntersectionObserver.js +27 -0
  137. package/src/private/setup/setUpMutationObserver.js +26 -0
  138. package/src/private/setup/setUpPerformanceObserver.js +64 -0
  139. package/src/private/specs/modules/NativeAppearance.js +3 -3
  140. package/src/private/specs/modules/NativeLinkingManager.js +1 -1
  141. package/src/private/specs/modules/NativePlatformConstantsWin.js +7 -0
  142. package/src/private/specs/modules/NativeSampleTurboModule.js +14 -1
  143. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
  144. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +5 -3
  145. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
  146. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +14 -17
  147. package/src/private/{specs/modules → webapis/intersectionobserver/specs}/NativeIntersectionObserver.js +2 -2
  148. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver/specs}/__mocks__/NativeIntersectionObserver.js +4 -4
  149. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserver.js +5 -3
  150. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +24 -15
  151. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationRecord.js +4 -6
  152. package/src/private/{specs/modules → webapis/mutationobserver/specs}/NativeMutationObserver.js +2 -2
  153. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver/specs}/__mocks__/NativeMutationObserver.js +5 -5
  154. package/src/private/webapis/performance/{EventCounts.js → EventTiming.js} +65 -3
  155. package/src/private/webapis/performance/LongTasks.js +39 -0
  156. package/src/private/webapis/performance/Performance.js +22 -9
  157. package/src/private/webapis/performance/PerformanceEntry.js +36 -18
  158. package/src/private/webapis/performance/PerformanceObserver.js +29 -43
  159. package/src/private/webapis/performance/RawPerformanceEntry.js +24 -1
  160. package/src/private/webapis/performance/UserTiming.js +17 -12
  161. package/src/private/webapis/performance/specs/NativePerformanceObserver.js +1 -1
  162. package/src-win/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
  163. package/types/experimental.d.ts +20 -1
  164. package/Libraries/Animated/NativeAnimatedHelper.js +0 -615
  165. package/Libraries/Animated/NativeAnimatedHelper.win32.js +0 -617
  166. package/Libraries/Core/setUpIntersectionObserver.js +0 -16
  167. package/Libraries/Core/setUpMutationObserver.js +0 -16
  168. package/Libraries/Core/setUpPerformanceObserver.js +0 -18
  169. package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +0 -13
  170. package/Libraries/MutationObserver/NativeMutationObserver.js +0 -13
  171. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +0 -135
  172. package/src/private/core/setUpDOM.js +0 -18
  173. package/src/private/webapis/performance/PerformanceEventTiming.js +0 -55
  174. /package/src/private/{core → styles}/composeStyles.js +0 -0
@@ -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<<870e25c844e692bb04ee49fe20cd3baf>>
7
+ * @generated SignedSource<<0bff47ec5af8ed96d8b2abe351f318f1>>
8
8
  * @flow strict-local
9
9
  */
10
10
 
@@ -30,10 +30,15 @@ export type ReactNativeFeatureFlagsJsOnly = {
30
30
  animatedShouldDebounceQueueFlush: Getter<boolean>,
31
31
  animatedShouldUseSingleOp: Getter<boolean>,
32
32
  enableAccessToHostTreeInFabric: Getter<boolean>,
33
+ enableOptimisedVirtualizedCells: Getter<boolean>,
33
34
  isLayoutAnimationEnabled: Getter<boolean>,
35
+ shouldSkipStateUpdatesForLoopingAnimations: Getter<boolean>,
34
36
  shouldUseAnimatedObjectForTransform: Getter<boolean>,
35
37
  shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean>,
36
38
  shouldUseSetNativePropsInFabric: Getter<boolean>,
39
+ shouldUseSetNativePropsInNativeAnimationsInFabric: Getter<boolean>,
40
+ usePassiveEffectsForAnimations: Getter<boolean>,
41
+ useRefsForTextInputState: Getter<boolean>,
37
42
  };
38
43
 
39
44
  export type ReactNativeFeatureFlagsJsOnlyOverrides = Partial<ReactNativeFeatureFlagsJsOnly>;
@@ -41,29 +46,53 @@ export type ReactNativeFeatureFlagsJsOnlyOverrides = Partial<ReactNativeFeatureF
41
46
  export type ReactNativeFeatureFlags = {
42
47
  ...ReactNativeFeatureFlagsJsOnly,
43
48
  commonTestFlag: Getter<boolean>,
44
- allowCollapsableChildren: Getter<boolean>,
45
49
  allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean>,
46
50
  batchRenderingUpdatesInEventLoop: Getter<boolean>,
51
+ completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean>,
47
52
  destroyFabricSurfacesInReactInstanceManager: Getter<boolean>,
48
- enableBackgroundExecutor: Getter<boolean>,
53
+ enableAlignItemsBaselineOnFabricIOS: Getter<boolean>,
54
+ enableAndroidMixBlendModeProp: Getter<boolean>,
55
+ enableBackgroundStyleApplicator: Getter<boolean>,
49
56
  enableCleanTextInputYogaNode: Getter<boolean>,
57
+ enableEagerRootViewAttachment: Getter<boolean>,
58
+ enableEventEmitterRetentionDuringGesturesOnAndroid: Getter<boolean>,
59
+ enableFabricLogs: Getter<boolean>,
60
+ enableFabricRendererExclusively: Getter<boolean>,
50
61
  enableGranularShadowTreeStateReconciliation: Getter<boolean>,
62
+ enableIOSViewClipToPaddingBox: Getter<boolean>,
63
+ enableLayoutAnimationsOnIOS: Getter<boolean>,
64
+ enableLongTaskAPI: Getter<boolean>,
51
65
  enableMicrotasks: Getter<boolean>,
66
+ enablePropsUpdateReconciliationAndroid: Getter<boolean>,
67
+ enableReportEventPaintTime: Getter<boolean>,
52
68
  enableSynchronousStateUpdates: Getter<boolean>,
53
69
  enableUIConsistency: Getter<boolean>,
54
- fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak: Getter<boolean>,
70
+ enableViewRecycling: Getter<boolean>,
71
+ excludeYogaFromRawProps: Getter<boolean>,
72
+ fetchImagesInViewPreallocation: Getter<boolean>,
73
+ fixIncorrectScrollViewStateUpdateOnAndroid: Getter<boolean>,
74
+ fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
75
+ fixMissedFabricStateUpdatesOnAndroid: Getter<boolean>,
76
+ fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<boolean>,
55
77
  forceBatchingMountItemsOnAndroid: Getter<boolean>,
56
78
  fuseboxEnabledDebug: Getter<boolean>,
57
79
  fuseboxEnabledRelease: Getter<boolean>,
80
+ initEagerTurboModulesOnNativeModulesQueueAndroid: Getter<boolean>,
58
81
  lazyAnimationCallbacks: Getter<boolean>,
59
- preventDoubleTextMeasure: Getter<boolean>,
82
+ loadVectorDrawablesOnImages: Getter<boolean>,
60
83
  setAndroidLayoutDirection: Getter<boolean>,
84
+ traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
85
+ useFabricInterop: Getter<boolean>,
61
86
  useImmediateExecutorInAndroidBridgeless: Getter<boolean>,
62
87
  useModernRuntimeScheduler: Getter<boolean>,
63
88
  useNativeViewConfigsInBridgelessMode: Getter<boolean>,
89
+ useNewReactImageViewBackgroundDrawing: Getter<boolean>,
90
+ useOptimisedViewPreallocationOnAndroid: Getter<boolean>,
91
+ useOptimizedEventBatchingOnAndroid: Getter<boolean>,
64
92
  useRuntimeShadowNodeReferenceUpdate: Getter<boolean>,
65
93
  useRuntimeShadowNodeReferenceUpdateOnLayout: Getter<boolean>,
66
94
  useStateAlignmentMechanism: Getter<boolean>,
95
+ useTurboModuleInterop: Getter<boolean>,
67
96
  }
68
97
 
69
98
  /**
@@ -86,11 +115,21 @@ export const animatedShouldUseSingleOp: Getter<boolean> = createJavaScriptFlagGe
86
115
  */
87
116
  export const enableAccessToHostTreeInFabric: Getter<boolean> = createJavaScriptFlagGetter('enableAccessToHostTreeInFabric', false);
88
117
 
118
+ /**
119
+ * Removing unnecessary rerenders Virtualized cells after any rerenders of Virualized list. Works with strict=true option
120
+ */
121
+ export const enableOptimisedVirtualizedCells: Getter<boolean> = createJavaScriptFlagGetter('enableOptimisedVirtualizedCells', false);
122
+
89
123
  /**
90
124
  * Function used to enable / disabled Layout Animations in React Native.
91
125
  */
92
126
  export const isLayoutAnimationEnabled: Getter<boolean> = createJavaScriptFlagGetter('isLayoutAnimationEnabled', true);
93
127
 
128
+ /**
129
+ * If the animation is within Animated.loop, we do not send state updates to React.
130
+ */
131
+ export const shouldSkipStateUpdatesForLoopingAnimations: Getter<boolean> = createJavaScriptFlagGetter('shouldSkipStateUpdatesForLoopingAnimations', false);
132
+
94
133
  /**
95
134
  * Enables use of AnimatedObject for animating transform values.
96
135
  */
@@ -107,13 +146,24 @@ export const shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean> = cre
107
146
  export const shouldUseSetNativePropsInFabric: Getter<boolean> = createJavaScriptFlagGetter('shouldUseSetNativePropsInFabric', true);
108
147
 
109
148
  /**
110
- * Common flag for testing. Do NOT modify.
149
+ * Enables use of setNativeProps in Native driven animations in Fabric.
111
150
  */
112
- export const commonTestFlag: Getter<boolean> = createNativeFlagGetter('commonTestFlag', false);
151
+ export const shouldUseSetNativePropsInNativeAnimationsInFabric: Getter<boolean> = createJavaScriptFlagGetter('shouldUseSetNativePropsInNativeAnimationsInFabric', false);
152
+
113
153
  /**
114
- * Enables the differentiator to understand the "collapsableChildren" prop
154
+ * Enable a variant of useAnimatedPropsLifecycle hook that constructs the animation graph in passive effect instead of layout effect
115
155
  */
116
- export const allowCollapsableChildren: Getter<boolean> = createNativeFlagGetter('allowCollapsableChildren', true);
156
+ export const usePassiveEffectsForAnimations: Getter<boolean> = createJavaScriptFlagGetter('usePassiveEffectsForAnimations', false);
157
+
158
+ /**
159
+ * Enable a variant of TextInput that moves some state to refs to avoid unnecessary re-renders
160
+ */
161
+ export const useRefsForTextInputState: Getter<boolean> = createJavaScriptFlagGetter('useRefsForTextInputState', false);
162
+
163
+ /**
164
+ * Common flag for testing. Do NOT modify.
165
+ */
166
+ export const commonTestFlag: Getter<boolean> = createNativeFlagGetter('commonTestFlag', false);
117
167
  /**
118
168
  * Adds support for recursively processing commits that mount synchronously (Android only).
119
169
  */
@@ -122,26 +172,74 @@ export const allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean>
122
172
  * 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.
123
173
  */
124
174
  export const batchRenderingUpdatesInEventLoop: Getter<boolean> = createNativeFlagGetter('batchRenderingUpdatesInEventLoop', false);
175
+ /**
176
+ * Do not wait for a main-thread dispatch to complete init to start executing work on the JS thread on Android
177
+ */
178
+ export const completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean> = createNativeFlagGetter('completeReactInstanceCreationOnBgThreadOnAndroid', false);
125
179
  /**
126
180
  * When enabled, ReactInstanceManager will clean up Fabric surfaces on destroy().
127
181
  */
128
182
  export const destroyFabricSurfacesInReactInstanceManager: Getter<boolean> = createNativeFlagGetter('destroyFabricSurfacesInReactInstanceManager', false);
129
183
  /**
130
- * Enables the use of a background executor to compute layout and commit updates on Fabric (this system is deprecated and should not be used).
184
+ * Kill-switch to turn off support for aling-items:baseline on Fabric iOS.
131
185
  */
132
- export const enableBackgroundExecutor: Getter<boolean> = createNativeFlagGetter('enableBackgroundExecutor', false);
186
+ export const enableAlignItemsBaselineOnFabricIOS: Getter<boolean> = createNativeFlagGetter('enableAlignItemsBaselineOnFabricIOS', true);
187
+ /**
188
+ * Enables mix-blend-mode prop on Android.
189
+ */
190
+ export const enableAndroidMixBlendModeProp: Getter<boolean> = createNativeFlagGetter('enableAndroidMixBlendModeProp', false);
191
+ /**
192
+ * Use BackgroundStyleApplicator in place of other background/border drawing code
193
+ */
194
+ export const enableBackgroundStyleApplicator: Getter<boolean> = createNativeFlagGetter('enableBackgroundStyleApplicator', true);
133
195
  /**
134
196
  * Clean yoga node when <TextInput /> does not change.
135
197
  */
136
198
  export const enableCleanTextInputYogaNode: Getter<boolean> = createNativeFlagGetter('enableCleanTextInputYogaNode', false);
199
+ /**
200
+ * Feature flag to configure eager attachment of the root view/initialisation of the JS code.
201
+ */
202
+ export const enableEagerRootViewAttachment: Getter<boolean> = createNativeFlagGetter('enableEagerRootViewAttachment', false);
203
+ /**
204
+ * Enables the retention of EventEmitterWrapper on Android till the touch gesture is over to fix a bug on pressable (#44610)
205
+ */
206
+ export const enableEventEmitterRetentionDuringGesturesOnAndroid: Getter<boolean> = createNativeFlagGetter('enableEventEmitterRetentionDuringGesturesOnAndroid', false);
207
+ /**
208
+ * This feature flag enables logs for Fabric.
209
+ */
210
+ export const enableFabricLogs: Getter<boolean> = createNativeFlagGetter('enableFabricLogs', false);
211
+ /**
212
+ * When the app is completely migrated to Fabric, set this flag to true to disable parts of Paper infrastructure that are not needed anymore but consume memory and CPU. Specifically, UIViewOperationQueue and EventDispatcherImpl will no longer work as they will not subscribe to ReactChoreographer for updates.
213
+ */
214
+ export const enableFabricRendererExclusively: Getter<boolean> = createNativeFlagGetter('enableFabricRendererExclusively', false);
137
215
  /**
138
216
  * When enabled, the renderer would only fail commits when they propagate state and the last commit that updated state changed before committing.
139
217
  */
140
218
  export const enableGranularShadowTreeStateReconciliation: Getter<boolean> = createNativeFlagGetter('enableGranularShadowTreeStateReconciliation', false);
219
+ /**
220
+ * iOS Views will clip to their padding box vs border box
221
+ */
222
+ export const enableIOSViewClipToPaddingBox: Getter<boolean> = createNativeFlagGetter('enableIOSViewClipToPaddingBox', false);
223
+ /**
224
+ * When enabled, LayoutAnimations API will animate state changes on iOS.
225
+ */
226
+ export const enableLayoutAnimationsOnIOS: Getter<boolean> = createNativeFlagGetter('enableLayoutAnimationsOnIOS', true);
227
+ /**
228
+ * Enables the reporting of long tasks through `PerformanceObserver`. Only works if the event loop is enabled.
229
+ */
230
+ export const enableLongTaskAPI: Getter<boolean> = createNativeFlagGetter('enableLongTaskAPI', false);
141
231
  /**
142
232
  * Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution).
143
233
  */
144
234
  export const enableMicrotasks: Getter<boolean> = createNativeFlagGetter('enableMicrotasks', false);
235
+ /**
236
+ * When enabled, Android will receive prop updates based on the differences between the last rendered shadow node and the last committed shadow node.
237
+ */
238
+ export const enablePropsUpdateReconciliationAndroid: Getter<boolean> = createNativeFlagGetter('enablePropsUpdateReconciliationAndroid', false);
239
+ /**
240
+ * Report paint time inside the Event Timing API implementation (PerformanceObserver).
241
+ */
242
+ export const enableReportEventPaintTime: Getter<boolean> = createNativeFlagGetter('enableReportEventPaintTime', false);
145
243
  /**
146
244
  * Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).
147
245
  */
@@ -151,9 +249,33 @@ export const enableSynchronousStateUpdates: Getter<boolean> = createNativeFlagGe
151
249
  */
152
250
  export const enableUIConsistency: Getter<boolean> = createNativeFlagGetter('enableUIConsistency', false);
153
251
  /**
154
- * Fixes a leak in SurfaceMountingManager.mRemoveDeleteTreeUIFrameCallback
252
+ * Enables View Recycling. When enabled, individual ViewManagers must still opt-in.
253
+ */
254
+ export const enableViewRecycling: Getter<boolean> = createNativeFlagGetter('enableViewRecycling', false);
255
+ /**
256
+ * When enabled, rawProps in Props will not include Yoga specific props.
257
+ */
258
+ export const excludeYogaFromRawProps: Getter<boolean> = createNativeFlagGetter('excludeYogaFromRawProps', false);
259
+ /**
260
+ * Start image fetching during view preallocation instead of waiting for layout pass
261
+ */
262
+ export const fetchImagesInViewPreallocation: Getter<boolean> = createNativeFlagGetter('fetchImagesInViewPreallocation', false);
263
+ /**
264
+ * When doing a smooth scroll animation, it stops setting the state with the final scroll position in Fabric before the animation starts.
265
+ */
266
+ export const fixIncorrectScrollViewStateUpdateOnAndroid: Getter<boolean> = createNativeFlagGetter('fixIncorrectScrollViewStateUpdateOnAndroid', false);
267
+ /**
268
+ * Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React.
269
+ */
270
+ export const fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean> = createNativeFlagGetter('fixMappingOfEventPrioritiesBetweenFabricAndReact', false);
271
+ /**
272
+ * Enables a fix to prevent the possibility of state updates in Fabric being missed due to race conditions with previous state updates.
155
273
  */
156
- export const fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak: Getter<boolean> = createNativeFlagGetter('fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak', false);
274
+ export const fixMissedFabricStateUpdatesOnAndroid: Getter<boolean> = createNativeFlagGetter('fixMissedFabricStateUpdatesOnAndroid', false);
275
+ /**
276
+ * Fixes a limitation on Android where the mounting coordinator would report there are no pending transactions but some of them were actually not processed due to the use of the push model.
277
+ */
278
+ export const fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<boolean> = createNativeFlagGetter('fixMountingCoordinatorReportedPendingTransactionsOnAndroid', false);
157
279
  /**
158
280
  * Forces the mounting layer on Android to always batch mount items instead of dispatching them immediately. This might fix some crashes related to synchronous state updates, where some views dispatch state updates during mount.
159
281
  */
@@ -161,23 +283,35 @@ export const forceBatchingMountItemsOnAndroid: Getter<boolean> = createNativeFla
161
283
  /**
162
284
  * Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in debug builds. This flag is global and should not be changed across React Host lifetimes.
163
285
  */
164
- export const fuseboxEnabledDebug: Getter<boolean> = createNativeFlagGetter('fuseboxEnabledDebug', false);
286
+ export const fuseboxEnabledDebug: Getter<boolean> = createNativeFlagGetter('fuseboxEnabledDebug', true);
165
287
  /**
166
288
  * Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in release builds. This flag is global and should not be changed across React Host lifetimes.
167
289
  */
168
290
  export const fuseboxEnabledRelease: Getter<boolean> = createNativeFlagGetter('fuseboxEnabledRelease', false);
291
+ /**
292
+ * Construct modules that requires eager init on the dedicate native modules thread
293
+ */
294
+ export const initEagerTurboModulesOnNativeModulesQueueAndroid: Getter<boolean> = createNativeFlagGetter('initEagerTurboModulesOnNativeModulesQueueAndroid', false);
169
295
  /**
170
296
  * Only enqueue Choreographer calls if there is an ongoing animation, instead of enqueueing every frame.
171
297
  */
172
298
  export const lazyAnimationCallbacks: Getter<boolean> = createNativeFlagGetter('lazyAnimationCallbacks', false);
173
299
  /**
174
- * When enabled, ParagraphShadowNode will no longer call measure twice.
300
+ * Adds support for loading vector drawable assets in the Image component (only on Android)
175
301
  */
176
- export const preventDoubleTextMeasure: Getter<boolean> = createNativeFlagGetter('preventDoubleTextMeasure', true);
302
+ export const loadVectorDrawablesOnImages: Getter<boolean> = createNativeFlagGetter('loadVectorDrawablesOnImages', false);
177
303
  /**
178
304
  * Propagate layout direction to Android views.
179
305
  */
180
306
  export const setAndroidLayoutDirection: Getter<boolean> = createNativeFlagGetter('setAndroidLayoutDirection', false);
307
+ /**
308
+ * Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
309
+ */
310
+ export const traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean> = createNativeFlagGetter('traceTurboModulePromiseRejectionsOnAndroid', false);
311
+ /**
312
+ * Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
313
+ */
314
+ export const useFabricInterop: Getter<boolean> = createNativeFlagGetter('useFabricInterop', false);
181
315
  /**
182
316
  * Invoke callbacks immediately on the ReactInstance rather than going through a background thread for synchronization
183
317
  */
@@ -190,6 +324,18 @@ export const useModernRuntimeScheduler: Getter<boolean> = createNativeFlagGetter
190
324
  * When enabled, the native view configs are used in bridgeless mode.
191
325
  */
192
326
  export const useNativeViewConfigsInBridgelessMode: Getter<boolean> = createNativeFlagGetter('useNativeViewConfigsInBridgelessMode', false);
327
+ /**
328
+ * Use shared background drawing code for ReactImageView instead of using Fresco to manipulate the bitmap
329
+ */
330
+ export const useNewReactImageViewBackgroundDrawing: Getter<boolean> = createNativeFlagGetter('useNewReactImageViewBackgroundDrawing', false);
331
+ /**
332
+ * Moves more of the work in view preallocation to the main thread to free up JS thread.
333
+ */
334
+ export const useOptimisedViewPreallocationOnAndroid: Getter<boolean> = createNativeFlagGetter('useOptimisedViewPreallocationOnAndroid', false);
335
+ /**
336
+ * Uses an optimized mechanism for event batching on Android that does not need to wait for a Choreographer frame callback.
337
+ */
338
+ export const useOptimizedEventBatchingOnAndroid: Getter<boolean> = createNativeFlagGetter('useOptimizedEventBatchingOnAndroid', false);
193
339
  /**
194
340
  * When enabled, cloning shadow nodes within react native will update the reference held by the current JS fiber tree.
195
341
  */
@@ -202,6 +348,10 @@ export const useRuntimeShadowNodeReferenceUpdateOnLayout: Getter<boolean> = crea
202
348
  * When enabled, it uses optimised state reconciliation algorithm.
203
349
  */
204
350
  export const useStateAlignmentMechanism: Getter<boolean> = createNativeFlagGetter('useStateAlignmentMechanism', false);
351
+ /**
352
+ * In Bridgeless mode, should legacy NativeModules use the TurboModule system?
353
+ */
354
+ export const useTurboModuleInterop: Getter<boolean> = createNativeFlagGetter('useTurboModuleInterop', false);
205
355
 
206
356
  /**
207
357
  * Overrides the feature flags with the provided methods.
@@ -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<<6922b452333fc62a263bd77d42afbbbe>>
7
+ * @generated SignedSource<<6d4aa48dfdd3b78ac5f0f8e70eb3895f>>
8
8
  * @flow strict-local
9
9
  */
10
10
 
@@ -24,29 +24,53 @@ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboMod
24
24
 
25
25
  export interface Spec extends TurboModule {
26
26
  +commonTestFlag?: () => boolean;
27
- +allowCollapsableChildren?: () => boolean;
28
27
  +allowRecursiveCommitsWithSynchronousMountOnAndroid?: () => boolean;
29
28
  +batchRenderingUpdatesInEventLoop?: () => boolean;
29
+ +completeReactInstanceCreationOnBgThreadOnAndroid?: () => boolean;
30
30
  +destroyFabricSurfacesInReactInstanceManager?: () => boolean;
31
- +enableBackgroundExecutor?: () => boolean;
31
+ +enableAlignItemsBaselineOnFabricIOS?: () => boolean;
32
+ +enableAndroidMixBlendModeProp?: () => boolean;
33
+ +enableBackgroundStyleApplicator?: () => boolean;
32
34
  +enableCleanTextInputYogaNode?: () => boolean;
35
+ +enableEagerRootViewAttachment?: () => boolean;
36
+ +enableEventEmitterRetentionDuringGesturesOnAndroid?: () => boolean;
37
+ +enableFabricLogs?: () => boolean;
38
+ +enableFabricRendererExclusively?: () => boolean;
33
39
  +enableGranularShadowTreeStateReconciliation?: () => boolean;
40
+ +enableIOSViewClipToPaddingBox?: () => boolean;
41
+ +enableLayoutAnimationsOnIOS?: () => boolean;
42
+ +enableLongTaskAPI?: () => boolean;
34
43
  +enableMicrotasks?: () => boolean;
44
+ +enablePropsUpdateReconciliationAndroid?: () => boolean;
45
+ +enableReportEventPaintTime?: () => boolean;
35
46
  +enableSynchronousStateUpdates?: () => boolean;
36
47
  +enableUIConsistency?: () => boolean;
37
- +fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak?: () => boolean;
48
+ +enableViewRecycling?: () => boolean;
49
+ +excludeYogaFromRawProps?: () => boolean;
50
+ +fetchImagesInViewPreallocation?: () => boolean;
51
+ +fixIncorrectScrollViewStateUpdateOnAndroid?: () => boolean;
52
+ +fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
53
+ +fixMissedFabricStateUpdatesOnAndroid?: () => boolean;
54
+ +fixMountingCoordinatorReportedPendingTransactionsOnAndroid?: () => boolean;
38
55
  +forceBatchingMountItemsOnAndroid?: () => boolean;
39
56
  +fuseboxEnabledDebug?: () => boolean;
40
57
  +fuseboxEnabledRelease?: () => boolean;
58
+ +initEagerTurboModulesOnNativeModulesQueueAndroid?: () => boolean;
41
59
  +lazyAnimationCallbacks?: () => boolean;
42
- +preventDoubleTextMeasure?: () => boolean;
60
+ +loadVectorDrawablesOnImages?: () => boolean;
43
61
  +setAndroidLayoutDirection?: () => boolean;
62
+ +traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
63
+ +useFabricInterop?: () => boolean;
44
64
  +useImmediateExecutorInAndroidBridgeless?: () => boolean;
45
65
  +useModernRuntimeScheduler?: () => boolean;
46
66
  +useNativeViewConfigsInBridgelessMode?: () => boolean;
67
+ +useNewReactImageViewBackgroundDrawing?: () => boolean;
68
+ +useOptimisedViewPreallocationOnAndroid?: () => boolean;
69
+ +useOptimizedEventBatchingOnAndroid?: () => boolean;
47
70
  +useRuntimeShadowNodeReferenceUpdate?: () => boolean;
48
71
  +useRuntimeShadowNodeReferenceUpdateOnLayout?: () => boolean;
49
72
  +useStateAlignmentMechanism?: () => boolean;
73
+ +useTurboModuleInterop?: () => boolean;
50
74
  }
51
75
 
52
76
  const NativeReactNativeFeatureFlags: ?Spec = TurboModuleRegistry.get<Spec>(
@@ -0,0 +1,42 @@
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
8
+ * @format
9
+ * @oncall react_native
10
+ */
11
+
12
+ class FuseboxSessionObserver {
13
+ #hasNativeSupport: boolean;
14
+
15
+ constructor() {
16
+ this.#hasNativeSupport = global.hasOwnProperty(
17
+ '__DEBUGGER_SESSION_OBSERVER__',
18
+ );
19
+ }
20
+
21
+ hasActiveSession(): boolean {
22
+ if (!this.#hasNativeSupport) {
23
+ return false;
24
+ }
25
+
26
+ return global.__DEBUGGER_SESSION_OBSERVER__.hasActiveSession;
27
+ }
28
+
29
+ subscribe(callback: (status: boolean) => void): () => void {
30
+ if (!this.#hasNativeSupport) {
31
+ return () => {};
32
+ }
33
+
34
+ global.__DEBUGGER_SESSION_OBSERVER__.subscribers.add(callback);
35
+ return () => {
36
+ global.__DEBUGGER_SESSION_OBSERVER__.subscribers.delete(callback);
37
+ };
38
+ }
39
+ }
40
+
41
+ const observerInstance: FuseboxSessionObserver = new FuseboxSessionObserver();
42
+ export default observerInstance;
@@ -8,11 +8,12 @@
8
8
  * @flow strict
9
9
  */
10
10
 
11
- 'use strict';
11
+ import type {ExtendedError} from '../../../../Libraries/Core/ExtendedError';
12
12
 
13
- import type {ExtendedError} from './ExtendedError';
14
-
15
- import {SyntheticError, handleException} from './ExceptionsManager';
13
+ import {
14
+ SyntheticError,
15
+ handleException,
16
+ } from '../../../../Libraries/Core/ExceptionsManager';
16
17
 
17
18
  type ErrorInfo = {
18
19
  +componentStack?: ?string,
@@ -28,14 +29,17 @@ export function onUncaughtError(errorValue: mixed, errorInfo: ErrorInfo): void {
28
29
  if (errorValue instanceof Error) {
29
30
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
30
31
  * this parameters */
32
+ // $FlowFixMe[incompatible-cast]
31
33
  error = (errorValue: ExtendedError);
32
34
  } else if (typeof errorValue === 'string') {
33
35
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
34
36
  * this parameters */
37
+ // $FlowFixMe[incompatible-cast]
35
38
  error = (new SyntheticError(errorValue): ExtendedError);
36
39
  } else {
37
40
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
38
41
  * this parameters */
42
+ // $FlowFixMe[incompatible-cast]
39
43
  error = (new SyntheticError('Unspecified error'): ExtendedError);
40
44
  }
41
45
  try {
@@ -58,14 +62,17 @@ export function onCaughtError(errorValue: mixed, errorInfo: ErrorInfo): void {
58
62
  if (errorValue instanceof Error) {
59
63
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
60
64
  * this parameters */
65
+ // $FlowFixMe[incompatible-cast]
61
66
  error = (errorValue: ExtendedError);
62
67
  } else if (typeof errorValue === 'string') {
63
68
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
64
69
  * this parameters */
70
+ // $FlowFixMe[incompatible-cast]
65
71
  error = (new SyntheticError(errorValue): ExtendedError);
66
72
  } else {
67
73
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
68
74
  * this parameters */
75
+ // $FlowFixMe[incompatible-cast]
69
76
  error = (new SyntheticError('Unspecified error'): ExtendedError);
70
77
  }
71
78
  try {
@@ -91,14 +98,17 @@ export function onRecoverableError(
91
98
  if (errorValue instanceof Error) {
92
99
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
93
100
  * this parameters */
101
+ // $FlowFixMe[incompatible-cast]
94
102
  error = (errorValue: ExtendedError);
95
103
  } else if (typeof errorValue === 'string') {
96
104
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
97
105
  * this parameters */
106
+ // $FlowFixMe[incompatible-cast]
98
107
  error = (new SyntheticError(errorValue): ExtendedError);
99
108
  } else {
100
109
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
101
110
  * this parameters */
111
+ // $FlowFixMe[incompatible-cast]
102
112
  error = (new SyntheticError('Unspecified error'): ExtendedError);
103
113
  }
104
114
  try {
@@ -0,0 +1,28 @@
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
8
+ * @format
9
+ */
10
+
11
+ import DOMRect from '../webapis/dom/geometry/DOMRect';
12
+ import DOMRectReadOnly from '../webapis/dom/geometry/DOMRectReadOnly';
13
+
14
+ let initialized = false;
15
+
16
+ export default function setUpDOM() {
17
+ if (initialized) {
18
+ return;
19
+ }
20
+
21
+ initialized = true;
22
+
23
+ // $FlowExpectedError[cannot-write] The global isn't writable anywhere but here, where we define it
24
+ global.DOMRect = DOMRect;
25
+
26
+ // $FlowExpectedError[cannot-write] The global isn't writable anywhere but here, where we define it
27
+ global.DOMRectReadOnly = DOMRectReadOnly;
28
+ }
@@ -0,0 +1,27 @@
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 {polyfillGlobal} from '../../../Libraries/Utilities/PolyfillFunctions';
12
+
13
+ let initialized = false;
14
+
15
+ export default function setUpIntersectionObserver() {
16
+ if (initialized) {
17
+ return;
18
+ }
19
+
20
+ initialized = true;
21
+
22
+ polyfillGlobal(
23
+ 'IntersectionObserver',
24
+ () =>
25
+ require('../webapis/intersectionobserver/IntersectionObserver').default,
26
+ );
27
+ }
@@ -0,0 +1,26 @@
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 {polyfillGlobal} from '../../../Libraries/Utilities/PolyfillFunctions';
12
+
13
+ let initialized = false;
14
+
15
+ export default function setUpMutationObserver() {
16
+ if (initialized) {
17
+ return;
18
+ }
19
+
20
+ initialized = true;
21
+
22
+ polyfillGlobal(
23
+ 'MutationObserver',
24
+ () => require('../webapis/mutationobserver/MutationObserver').default,
25
+ );
26
+ }
@@ -0,0 +1,64 @@
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 {polyfillGlobal} from '../../../Libraries/Utilities/PolyfillFunctions';
12
+
13
+ let initialized = false;
14
+
15
+ export default function setUpPerformanceObserver() {
16
+ if (initialized) {
17
+ return;
18
+ }
19
+
20
+ initialized = true;
21
+
22
+ polyfillGlobal(
23
+ 'PerformanceObserver',
24
+ () =>
25
+ require('../webapis/performance/PerformanceObserver').PerformanceObserver,
26
+ );
27
+
28
+ polyfillGlobal(
29
+ 'PerformanceObserverEntryList',
30
+ () =>
31
+ require('../webapis/performance/PerformanceObserver')
32
+ .PerformanceObserverEntryList,
33
+ );
34
+
35
+ polyfillGlobal(
36
+ 'PerformanceEntry',
37
+ () => require('../webapis/performance/PerformanceEntry').PerformanceEntry,
38
+ );
39
+
40
+ polyfillGlobal(
41
+ 'PerformanceMark',
42
+ () => require('../webapis/performance/UserTiming').PerformanceMark,
43
+ );
44
+
45
+ polyfillGlobal(
46
+ 'PerformanceMeasure',
47
+ () => require('../webapis/performance/UserTiming').PerformanceMeasure,
48
+ );
49
+
50
+ polyfillGlobal(
51
+ 'PerformanceEventTiming',
52
+ () => require('../webapis/performance/EventTiming').PerformanceEventTiming,
53
+ );
54
+
55
+ polyfillGlobal(
56
+ 'TaskAttributionTiming',
57
+ () => require('../webapis/performance/LongTasks').TaskAttributionTiming,
58
+ );
59
+
60
+ polyfillGlobal(
61
+ 'PerformanceLongTaskTiming',
62
+ () => require('../webapis/performance/LongTasks').PerformanceLongTaskTiming,
63
+ );
64
+ }
@@ -14,19 +14,19 @@ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboMod
14
14
 
15
15
  export type ColorSchemeName = 'light' | 'dark';
16
16
 
17
- export type AppearancePreferences = {|
17
+ export type AppearancePreferences = {
18
18
  // TODO: (hramos) T52919652 Use ?ColorSchemeName once codegen supports union
19
19
  // types.
20
20
  /* 'light' | 'dark' */
21
21
  colorScheme?: ?string,
22
- |};
22
+ };
23
23
 
24
24
  export interface Spec extends TurboModule {
25
25
  // TODO: (hramos) T52919652 Use ?ColorSchemeName once codegen supports union
26
26
  // types.
27
27
  /* 'light' | 'dark' */
28
28
  +getColorScheme: () => ?string;
29
- +setColorScheme?: (colorScheme: string) => void;
29
+ +setColorScheme: (colorScheme: string) => void;
30
30
 
31
31
  // RCTEventEmitter
32
32
  +addListener: (eventName: string) => void;