@office-iss/react-native-win32 0.0.0-canary.272 → 0.0.0-canary.273

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 (51) hide show
  1. package/.flowconfig +1 -1
  2. package/CHANGELOG.json +16 -1
  3. package/CHANGELOG.md +12 -4
  4. package/Libraries/Animated/AnimatedEvent.js +1 -1
  5. package/Libraries/Animated/animations/Animation.js +1 -1
  6. package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
  7. package/Libraries/Animated/nodes/AnimatedInterpolation.js +1 -1
  8. package/Libraries/Animated/nodes/AnimatedProps.js +1 -1
  9. package/Libraries/Animated/nodes/AnimatedTransform.js +1 -1
  10. package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
  11. package/Libraries/Animated/useAnimatedProps.js +3 -3
  12. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +5 -0
  13. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +2 -2
  14. package/Libraries/Components/TextInput/TextInput.d.ts +4 -0
  15. package/Libraries/Components/TextInput/TextInput.flow.js +2 -0
  16. package/Libraries/Components/TextInput/TextInput.js +2 -0
  17. package/Libraries/Components/TextInput/TextInput.win32.js +2 -0
  18. package/Libraries/Components/View/ViewNativeComponent.js +3 -88
  19. package/Libraries/Core/ReactNativeVersion.js +1 -1
  20. package/Libraries/Core/setUpReactDevTools.js +74 -1
  21. package/Libraries/Core/setUpTimers.js +21 -10
  22. package/Libraries/Image/Image.android.js +1 -3
  23. package/Libraries/Image/Image.ios.js +0 -2
  24. package/Libraries/Image/Image.win32.js +0 -2
  25. package/Libraries/Inspector/Inspector.js +1 -0
  26. package/Libraries/Inspector/Inspector.win32.js +1 -0
  27. package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
  28. package/Libraries/Modal/Modal.js +3 -0
  29. package/Libraries/NativeComponent/BaseViewConfig.android.js +65 -0
  30. package/Libraries/ReactNative/AppRegistry.js +1 -1
  31. package/Libraries/Renderer/shims/ReactNativeTypes.js +1 -9
  32. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
  33. package/Libraries/StyleSheet/StyleSheetTypes.js +1 -1
  34. package/Libraries/Utilities/FocusManager.win32.js +1 -1
  35. package/Libraries/Utilities/useMergeRefs.js +26 -7
  36. package/index.js +1 -1
  37. package/index.win32.js +1 -1
  38. package/jest/setup.js +1 -0
  39. package/overrides.json +8 -8
  40. package/package.json +12 -12
  41. package/src/private/animated/NativeAnimatedHelper.js +4 -4
  42. package/src/private/animated/NativeAnimatedHelper.win32.js +4 -4
  43. package/src/private/animated/useAnimatedPropsMemo.js +0 -1
  44. package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +2 -1
  45. package/src/private/featureflags/ReactNativeFeatureFlags.js +11 -11
  46. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +3 -3
  47. package/src/private/webapis/performance/EventTiming.js +1 -1
  48. package/src/private/webapis/performance/Performance.js +36 -15
  49. package/src/private/webapis/performance/PerformanceObserver.js +2 -2
  50. package/src/private/webapis/performance/specs/NativePerformance.js +18 -2
  51. package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +32 -12
package/.flowconfig CHANGED
@@ -160,4 +160,4 @@ untyped-import
160
160
  untyped-type-import
161
161
 
162
162
  [version]
163
- ^0.248.1
163
+ ^0.250.0
package/CHANGELOG.json CHANGED
@@ -2,7 +2,22 @@
2
2
  "name": "@office-iss/react-native-win32",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 15 Nov 2024 06:21:36 GMT",
5
+ "date": "Sat, 23 Nov 2024 06:22:13 GMT",
6
+ "version": "0.0.0-canary.273",
7
+ "tag": "@office-iss/react-native-win32_v0.0.0-canary.273",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "yajurgrover24@gmail.com",
12
+ "package": "@office-iss/react-native-win32",
13
+ "commit": "8be39042bf044cb756904b4750f10cb0725bb36b",
14
+ "comment": "Integrate 10/20"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Fri, 15 Nov 2024 06:22:29 GMT",
6
21
  "version": "0.0.0-canary.272",
7
22
  "tag": "@office-iss/react-native-win32_v0.0.0-canary.272",
8
23
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,17 +1,25 @@
1
1
  # Change Log - @office-iss/react-native-win32
2
2
 
3
- <!-- This log was last generated on Fri, 15 Nov 2024 06:21:36 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Sat, 23 Nov 2024 06:22:13 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## 0.0.0-canary.272
7
+ ## 0.0.0-canary.273
8
8
 
9
- Fri, 15 Nov 2024 06:21:36 GMT
9
+ Sat, 23 Nov 2024 06:22:13 GMT
10
10
 
11
11
  ### Changes
12
12
 
13
- - test integrate 10/15 (yajurgrover24@gmail.com)
13
+ - Integrate 10/20 (yajurgrover24@gmail.com)
14
14
 
15
+ ## 0.0.0-canary.272
16
+
17
+ Fri, 15 Nov 2024 06:22:29 GMT
18
+
19
+ ### Changes
20
+
21
+ - test integrate 10/15 (yajurgrover24@gmail.com)
22
+
15
23
  ## 0.0.0-canary.271
16
24
 
17
25
  Thu, 07 Nov 2024 06:24:18 GMT
@@ -12,8 +12,8 @@
12
12
 
13
13
  import type {PlatformConfig} from './AnimatedPlatformConfig';
14
14
 
15
- import {findNodeHandle} from '../ReactNative/RendererProxy';
16
15
  import NativeAnimatedHelper from '../../src/private/animated/NativeAnimatedHelper';
16
+ import {findNodeHandle} from '../ReactNative/RendererProxy';
17
17
  import AnimatedValue from './nodes/AnimatedValue';
18
18
  import AnimatedValueXY from './nodes/AnimatedValueXY';
19
19
  import invariant from 'invariant';
@@ -12,8 +12,8 @@ import type {PlatformConfig} from '../AnimatedPlatformConfig';
12
12
  import type AnimatedNode from '../nodes/AnimatedNode';
13
13
  import type AnimatedValue from '../nodes/AnimatedValue';
14
14
 
15
- import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
16
15
  import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
16
+ import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
17
17
  import AnimatedProps from '../nodes/AnimatedProps';
18
18
 
19
19
  export type EndResult = {finished: boolean, value?: number, ...};
@@ -15,9 +15,9 @@ import type {ColorValue} from '../../StyleSheet/StyleSheet';
15
15
  import type {NativeColorValue} from '../../StyleSheet/StyleSheetTypes';
16
16
  import type {PlatformConfig} from '../AnimatedPlatformConfig';
17
17
 
18
+ import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
18
19
  import normalizeColor from '../../StyleSheet/normalizeColor';
19
20
  import {processColorObject} from '../../StyleSheet/PlatformColorValueTypes';
20
- import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
21
21
  import AnimatedValue, {flushValue} from './AnimatedValue';
22
22
  import AnimatedWithChildren from './AnimatedWithChildren';
23
23
 
@@ -15,11 +15,11 @@
15
15
  import type {PlatformConfig} from '../AnimatedPlatformConfig';
16
16
  import type AnimatedNode from './AnimatedNode';
17
17
 
18
+ import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
18
19
  import {validateInterpolation} from '../../../src/private/animated/NativeAnimatedValidation';
19
20
  import normalizeColor from '../../StyleSheet/normalizeColor';
20
21
  import processColor from '../../StyleSheet/processColor';
21
22
  import Easing from '../Easing';
22
- import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
23
23
  import AnimatedWithChildren from './AnimatedWithChildren';
24
24
  import invariant from 'invariant';
25
25
 
@@ -11,9 +11,9 @@
11
11
  import type {PlatformConfig} from '../AnimatedPlatformConfig';
12
12
  import type {AnimatedStyleAllowlist} from './AnimatedStyle';
13
13
 
14
+ import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
14
15
  import {findNodeHandle} from '../../ReactNative/RendererProxy';
15
16
  import {AnimatedEvent} from '../AnimatedEvent';
16
- import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
17
17
  import AnimatedNode from './AnimatedNode';
18
18
  import AnimatedObject from './AnimatedObject';
19
19
  import AnimatedStyle from './AnimatedStyle';
@@ -12,8 +12,8 @@
12
12
 
13
13
  import type {PlatformConfig} from '../AnimatedPlatformConfig';
14
14
 
15
- import {validateTransform} from '../../../src/private/animated/NativeAnimatedValidation';
16
15
  import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
16
+ import {validateTransform} from '../../../src/private/animated/NativeAnimatedValidation';
17
17
  import AnimatedNode from './AnimatedNode';
18
18
  import AnimatedWithChildren from './AnimatedWithChildren';
19
19
 
@@ -15,8 +15,8 @@ import type {InterpolationConfigType} from './AnimatedInterpolation';
15
15
  import type AnimatedNode from './AnimatedNode';
16
16
  import type AnimatedTracking from './AnimatedTracking';
17
17
 
18
- import InteractionManager from '../../Interaction/InteractionManager';
19
18
  import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
19
+ import InteractionManager from '../../Interaction/InteractionManager';
20
20
  import AnimatedInterpolation from './AnimatedInterpolation';
21
21
  import AnimatedWithChildren from './AnimatedWithChildren';
22
22
 
@@ -8,14 +8,15 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import type {AnimatedPropsAllowlist} from './nodes/AnimatedProps';
12
11
  import type {EventSubscription} from '../EventEmitter/NativeEventEmitter';
12
+ import type {AnimatedPropsAllowlist} from './nodes/AnimatedProps';
13
13
 
14
+ import NativeAnimatedHelper from '../../src/private/animated/NativeAnimatedHelper';
15
+ import {useAnimatedPropsMemo} from '../../src/private/animated/useAnimatedPropsMemo';
14
16
  import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';
15
17
  import {isPublicInstance as isFabricPublicInstance} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils';
16
18
  import useRefEffect from '../Utilities/useRefEffect';
17
19
  import {AnimatedEvent} from './AnimatedEvent';
18
- import NativeAnimatedHelper from '../../src/private/animated/NativeAnimatedHelper';
19
20
  import AnimatedNode from './nodes/AnimatedNode';
20
21
  import AnimatedProps from './nodes/AnimatedProps';
21
22
  import AnimatedValue from './nodes/AnimatedValue';
@@ -28,7 +29,6 @@ import {
28
29
  useReducer,
29
30
  useRef,
30
31
  } from 'react';
31
- import {useAnimatedPropsMemo} from '../../src/private/animated/useAnimatedPropsMemo';
32
32
 
33
33
  type ReducedProps<TProps> = {
34
34
  ...TProps,
@@ -191,6 +191,11 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
191
191
  }
192
192
 
193
193
  componentDidMount(): void {
194
+ if (!Keyboard.isVisible()) {
195
+ this._keyboardEvent = null;
196
+ this._setBottom(0);
197
+ }
198
+
194
199
  if (Platform.OS === 'ios') {
195
200
  this._subscriptions = [
196
201
  Keyboard.addListener('keyboardWillChangeFrame', this._onKeyboardChange),
@@ -65,8 +65,8 @@ const ScrollViewStickyHeaderWithForwardedRef: component(
65
65
  ref.setNextHeaderY = setNextHeaderLayoutY;
66
66
  setIsFabric(isFabricPublicInstance(ref));
67
67
  }, []);
68
- const ref: (React.ElementRef<typeof Animated.View> | null) => void =
69
- // $FlowFixMe[incompatible-type] - Ref is mutated by `callbackRef`.
68
+ const ref: React.RefSetter<React.ElementRef<typeof Animated.View>> =
69
+ // $FlowFixMe[prop-missing] - Instance is mutated to have `setNextHeaderY`.
70
70
  useMergeRefs<Instance>(callbackRef, forwardedRef);
71
71
 
72
72
  const offset = useMemo(
@@ -255,6 +255,8 @@ export interface TextInputIOSProps {
255
255
  * - `'birthdateDay'` (iOS 17+)
256
256
  * - `'birthdateMonth'` (iOS 17+)
257
257
  * - `'birthdateYear'` (iOS 17+)
258
+ * - `'cellularEID'` (iOS 17.4+)
259
+ * - `'cellularIMEI'` (iOS 17.4+)
258
260
  * - `'dateTime'` (iOS 15+)
259
261
  * - `'flightNumber'` (iOS 15+)
260
262
  * - `'shipmentTrackingNumber'` (iOS 15+)
@@ -302,6 +304,8 @@ export interface TextInputIOSProps {
302
304
  | 'birthdateDay'
303
305
  | 'birthdateMonth'
304
306
  | 'birthdateYear'
307
+ | 'cellularEID'
308
+ | 'cellularIMEI'
305
309
  | 'dateTime'
306
310
  | 'flightNumber'
307
311
  | 'shipmentTrackingNumber'
@@ -198,6 +198,8 @@ export type TextContentType =
198
198
  | 'birthdateDay'
199
199
  | 'birthdateMonth'
200
200
  | 'birthdateYear'
201
+ | 'cellularEID'
202
+ | 'cellularIMEI'
201
203
  | 'dateTime'
202
204
  | 'flightNumber'
203
205
  | 'shipmentTrackingNumber';
@@ -239,6 +239,8 @@ export type TextContentType =
239
239
  | 'birthdateDay'
240
240
  | 'birthdateMonth'
241
241
  | 'birthdateYear'
242
+ | 'cellularEID'
243
+ | 'cellularIMEI'
242
244
  | 'dateTime'
243
245
  | 'flightNumber'
244
246
  | 'shipmentTrackingNumber';
@@ -250,6 +250,8 @@ export type TextContentType =
250
250
  | 'birthdateDay'
251
251
  | 'birthdateMonth'
252
252
  | 'birthdateYear'
253
+ | 'cellularEID'
254
+ | 'cellularIMEI'
253
255
  | 'dateTime'
254
256
  | 'flightNumber'
255
257
  | 'shipmentTrackingNumber';
@@ -11,101 +11,16 @@
11
11
  import type {
12
12
  HostComponent,
13
13
  HostInstance,
14
- PartialViewConfig,
15
14
  } from '../../Renderer/shims/ReactNativeTypes';
16
15
 
17
16
  import * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry';
18
17
  import codegenNativeCommands from '../../Utilities/codegenNativeCommands';
19
- import Platform from '../../Utilities/Platform';
20
18
  import {type ViewProps as Props} from './ViewPropTypes';
21
19
 
22
- export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
23
- Platform.OS === 'android'
24
- ? {
25
- uiViewClassName: 'RCTView',
26
- validAttributes: {
27
- // ReactClippingViewManager @ReactProps
28
- removeClippedSubviews: true,
29
-
30
- // ReactViewManager @ReactProps
31
- accessible: true,
32
- hasTVPreferredFocus: true,
33
- nextFocusDown: true,
34
- nextFocusForward: true,
35
- nextFocusLeft: true,
36
- nextFocusRight: true,
37
- nextFocusUp: true,
38
-
39
- borderRadius: true,
40
- borderTopLeftRadius: true,
41
- borderTopRightRadius: true,
42
- borderBottomRightRadius: true,
43
- borderBottomLeftRadius: true,
44
- borderTopStartRadius: true,
45
- borderTopEndRadius: true,
46
- borderBottomStartRadius: true,
47
- borderBottomEndRadius: true,
48
- borderEndEndRadius: true,
49
- borderEndStartRadius: true,
50
- borderStartEndRadius: true,
51
- borderStartStartRadius: true,
52
- borderStyle: true,
53
- hitSlop: true,
54
- pointerEvents: true,
55
- nativeBackgroundAndroid: true,
56
- nativeForegroundAndroid: true,
57
- needsOffscreenAlphaCompositing: true,
58
-
59
- borderWidth: true,
60
- borderLeftWidth: true,
61
- borderRightWidth: true,
62
- borderTopWidth: true,
63
- borderBottomWidth: true,
64
- borderStartWidth: true,
65
- borderEndWidth: true,
66
-
67
- borderColor: {
68
- process: require('../../StyleSheet/processColor').default,
69
- },
70
- borderLeftColor: {
71
- process: require('../../StyleSheet/processColor').default,
72
- },
73
- borderRightColor: {
74
- process: require('../../StyleSheet/processColor').default,
75
- },
76
- borderTopColor: {
77
- process: require('../../StyleSheet/processColor').default,
78
- },
79
- borderBottomColor: {
80
- process: require('../../StyleSheet/processColor').default,
81
- },
82
- borderStartColor: {
83
- process: require('../../StyleSheet/processColor').default,
84
- },
85
- borderEndColor: {
86
- process: require('../../StyleSheet/processColor').default,
87
- },
88
- borderBlockColor: {
89
- process: require('../../StyleSheet/processColor').default,
90
- },
91
- borderBlockEndColor: {
92
- process: require('../../StyleSheet/processColor').default,
93
- },
94
- borderBlockStartColor: {
95
- process: require('../../StyleSheet/processColor').default,
96
- },
97
- focusable: true,
98
- overflow: true,
99
- backfaceVisibility: true,
100
- experimental_layoutConformance: true,
101
- },
102
- }
103
- : {
104
- uiViewClassName: 'RCTView',
105
- };
106
-
107
20
  const ViewNativeComponent: HostComponent<Props> =
108
- NativeComponentRegistry.get<Props>('RCTView', () => __INTERNAL_VIEW_CONFIG);
21
+ NativeComponentRegistry.get<Props>('RCTView', () => ({
22
+ uiViewClassName: 'RCTView',
23
+ }));
109
24
 
110
25
  interface NativeCommands {
111
26
  +hotspotUpdate: (viewRef: HostInstance, x: number, y: number) => void;
@@ -17,7 +17,7 @@ const version: $ReadOnly<{
17
17
  major: 0,
18
18
  minor: 77,
19
19
  patch: 0,
20
- prerelease: 'nightly-20241015-3485e9ed8',
20
+ prerelease: 'nightly-20241020-e7a3f479f',
21
21
  };
22
22
 
23
23
  module.exports = {version};
@@ -11,6 +11,7 @@
11
11
  'use strict';
12
12
 
13
13
  import type {Domain} from '../../src/private/debugging/setUpFuseboxReactDevToolsDispatcher';
14
+ import type {Spec as NativeReactDevToolsRuntimeSettingsModuleSpec} from '../../src/private/fusebox/specs/NativeReactDevToolsRuntimeSettingsModule';
14
15
 
15
16
  if (__DEV__) {
16
17
  // Register dispatcher on global, which can be used later by Chrome DevTools frontend
@@ -24,6 +25,8 @@ if (__DEV__) {
24
25
  const reactDevToolsSettingsManager = require('../../src/private/debugging/ReactDevToolsSettingsManager');
25
26
  const serializedHookSettings =
26
27
  reactDevToolsSettingsManager.getGlobalHookSettings();
28
+ const maybeReactDevToolsRuntimeSettingsModuleModule =
29
+ require('../../src/private/fusebox/specs/NativeReactDevToolsRuntimeSettingsModule').default;
27
30
 
28
31
  let hookSettings = null;
29
32
  if (serializedHookSettings != null) {
@@ -36,8 +39,14 @@ if (__DEV__) {
36
39
  );
37
40
  }
38
41
  }
42
+
43
+ const {
44
+ isProfiling: shouldStartProfilingNow,
45
+ profilingSettings: initialProfilingSettings,
46
+ } = readReloadAndProfileConfig(maybeReactDevToolsRuntimeSettingsModuleModule);
47
+
39
48
  // Install hook before React is loaded.
40
- initialize(hookSettings);
49
+ initialize(hookSettings, shouldStartProfilingNow, initialProfilingSettings);
41
50
 
42
51
  // This should be defined in DEV, otherwise error is expected.
43
52
  const fuseboxReactDevToolsDispatcher =
@@ -63,6 +72,14 @@ if (__DEV__) {
63
72
  }
64
73
 
65
74
  function connectToReactDevToolsInFusebox(domain: Domain) {
75
+ const {
76
+ isReloadAndProfileSupported,
77
+ isProfiling,
78
+ onReloadAndProfile,
79
+ onReloadAndProfileFlagsReset,
80
+ } = readReloadAndProfileConfig(
81
+ maybeReactDevToolsRuntimeSettingsModuleModule,
82
+ );
66
83
  disconnect = connectWithCustomMessagingProtocol({
67
84
  onSubscribe: listener => {
68
85
  domain.onMessage.addEventListener(listener);
@@ -76,6 +93,10 @@ if (__DEV__) {
76
93
  nativeStyleEditorValidAttributes: Object.keys(ReactNativeStyleAttributes),
77
94
  resolveRNStyle,
78
95
  onSettingsUpdated: handleReactDevToolsSettingsUpdate,
96
+ isReloadAndProfileSupported,
97
+ isProfiling,
98
+ onReloadAndProfile,
99
+ onReloadAndProfileFlagsReset,
79
100
  });
80
101
  }
81
102
 
@@ -127,6 +148,14 @@ if (__DEV__) {
127
148
  isWebSocketOpen = true;
128
149
  });
129
150
 
151
+ const {
152
+ isReloadAndProfileSupported,
153
+ isProfiling,
154
+ onReloadAndProfile,
155
+ onReloadAndProfileFlagsReset,
156
+ } = readReloadAndProfileConfig(
157
+ maybeReactDevToolsRuntimeSettingsModuleModule,
158
+ );
130
159
  connectToDevTools({
131
160
  isAppActive,
132
161
  resolveRNStyle,
@@ -135,6 +164,10 @@ if (__DEV__) {
135
164
  ),
136
165
  websocket: ws,
137
166
  onSettingsUpdated: handleReactDevToolsSettingsUpdate,
167
+ isReloadAndProfileSupported,
168
+ isProfiling,
169
+ onReloadAndProfile,
170
+ onReloadAndProfileFlagsReset,
138
171
  });
139
172
  }
140
173
  }
@@ -166,3 +199,43 @@ if (__DEV__) {
166
199
  );
167
200
  connectToWSBasedReactDevToolsFrontend(); // Try connecting once on load
168
201
  }
202
+
203
+ function readReloadAndProfileConfig(
204
+ maybeModule: ?NativeReactDevToolsRuntimeSettingsModuleSpec,
205
+ ) {
206
+ const isReloadAndProfileSupported = maybeModule != null;
207
+ const config = maybeModule?.getReloadAndProfileConfig();
208
+ const isProfiling = config?.shouldReloadAndProfile === true;
209
+ const profilingSettings = {
210
+ recordChangeDescriptions: config?.recordChangeDescriptions === true,
211
+ recordTimeline: false,
212
+ };
213
+ const onReloadAndProfile = (recordChangeDescriptions: boolean) => {
214
+ if (maybeModule == null) {
215
+ return;
216
+ }
217
+
218
+ maybeModule.setReloadAndProfileConfig({
219
+ shouldReloadAndProfile: true,
220
+ recordChangeDescriptions,
221
+ });
222
+ };
223
+ const onReloadAndProfileFlagsReset = () => {
224
+ if (maybeModule == null) {
225
+ return;
226
+ }
227
+
228
+ maybeModule.setReloadAndProfileConfig({
229
+ shouldReloadAndProfile: false,
230
+ recordChangeDescriptions: false,
231
+ });
232
+ };
233
+
234
+ return {
235
+ isReloadAndProfileSupported,
236
+ isProfiling,
237
+ profilingSettings,
238
+ onReloadAndProfile,
239
+ onReloadAndProfileFlagsReset,
240
+ };
241
+ }
@@ -21,6 +21,25 @@ if (__DEV__) {
21
21
  }
22
22
  }
23
23
 
24
+ const isEventLoopEnabled = (() => {
25
+ if (NativeReactNativeFeatureFlags == null) {
26
+ return false;
27
+ }
28
+
29
+ if (NativeReactNativeFeatureFlags.disableEventLoopOnBridgeless == null) {
30
+ // Flags not unified yet
31
+ return (
32
+ ReactNativeFeatureFlags.useModernRuntimeScheduler() &&
33
+ ReactNativeFeatureFlags.enableMicrotasks()
34
+ );
35
+ } else {
36
+ return (
37
+ ReactNativeFeatureFlags.enableBridgelessArchitecture() &&
38
+ !ReactNativeFeatureFlags.disableEventLoopOnBridgeless()
39
+ );
40
+ }
41
+ })();
42
+
24
43
  // In bridgeless mode, timers are host functions installed from cpp.
25
44
  if (global.RN$Bridgeless !== true) {
26
45
  /**
@@ -48,12 +67,7 @@ if (global.RN$Bridgeless !== true) {
48
67
  defineLazyTimer('cancelAnimationFrame');
49
68
  defineLazyTimer('requestIdleCallback');
50
69
  defineLazyTimer('cancelIdleCallback');
51
- } else if (
52
- // TODO remove this condition when bridgeless == modern scheduler everywhere.
53
- NativeReactNativeFeatureFlags != null &&
54
- // eslint-disable-next-line react-hooks/rules-of-hooks -- false positive due to `use` prefix
55
- ReactNativeFeatureFlags.useModernRuntimeScheduler()
56
- ) {
70
+ } else if (isEventLoopEnabled) {
57
71
  polyfillGlobal(
58
72
  'requestIdleCallback',
59
73
  () =>
@@ -72,10 +86,7 @@ if (global.RN$Bridgeless !== true) {
72
86
  // We need to check if the native module is available before accessing the
73
87
  // feature flag, because otherwise the API would throw an error in the legacy
74
88
  // architecture in OSS, where the native module isn't available.
75
- if (
76
- NativeReactNativeFeatureFlags != null &&
77
- ReactNativeFeatureFlags.enableMicrotasks()
78
- ) {
89
+ if (isEventLoopEnabled) {
79
90
  // This is the flag that tells React to use `queueMicrotask` to batch state
80
91
  // updates, instead of using the scheduler to schedule a regular task.
81
92
  // We use a global variable because we don't currently have any other
@@ -166,11 +166,9 @@ let BaseImage: AbstractImageAndroid = React.forwardRef(
166
166
  sources = [source];
167
167
  }
168
168
 
169
- const {height, width, ...restProps} = props;
170
-
171
169
  const {onLoadStart, onLoad, onLoadEnd, onError} = props;
172
170
  const nativeProps = {
173
- ...restProps,
171
+ ...props,
174
172
  style,
175
173
  shouldNotifyLoadEvents: !!(onLoadStart || onLoad || onLoadEnd || onError),
176
174
  // Both iOS and C++ sides expect to have "source" prop, whereas on Android it's "src"
@@ -145,9 +145,7 @@ let BaseImage: AbstractImageIOS = React.forwardRef((props, forwardedRef) => {
145
145
  'aria-disabled': ariaDisabled,
146
146
  'aria-expanded': ariaExpanded,
147
147
  'aria-selected': ariaSelected,
148
- height,
149
148
  src,
150
- width,
151
149
  ...restProps
152
150
  } = props;
153
151
 
@@ -164,9 +164,7 @@ let BaseImage: AbstractImageIOS = React.forwardRef((props, forwardedRef) => {
164
164
  'aria-multiselectable': ariaMultiselectable, // Win32
165
165
  'aria-required': ariaRequired, // Win32
166
166
  'aria-selected': ariaSelected,
167
- height,
168
167
  src,
169
- width,
170
168
  ...restProps
171
169
  } = props;
172
170
 
@@ -17,6 +17,7 @@ import type {
17
17
  } from '../Renderer/shims/ReactNativeTypes';
18
18
  import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
19
19
  import type {ReactDevToolsAgent} from '../Types/ReactDevToolsTypes';
20
+
20
21
  import SafeAreaView from '../../src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE';
21
22
 
22
23
  const View = require('../Components/View/View');
@@ -17,6 +17,7 @@ import type {
17
17
  } from '../Renderer/shims/ReactNativeTypes';
18
18
  import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
19
19
  import type {ReactDevToolsAgent} from '../Types/ReactDevToolsTypes';
20
+
20
21
  import SafeAreaView from '../../src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE';
21
22
 
22
23
  const PressabilityDebug = require('../Pressability/PressabilityDebug');
@@ -8,13 +8,13 @@
8
8
  * @format
9
9
  */
10
10
 
11
+ import SafeAreaView from '../../src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE';
11
12
  import View from '../Components/View/View';
12
13
  import StyleSheet from '../StyleSheet/StyleSheet';
13
14
  import * as LogBoxData from './Data/LogBoxData';
14
15
  import LogBoxLog from './Data/LogBoxLog';
15
16
  import LogBoxLogNotification from './UI/LogBoxNotification';
16
17
  import * as React from 'react';
17
- import SafeAreaView from '../../src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE';
18
18
 
19
19
  type Props = $ReadOnly<{|
20
20
  logs: $ReadOnlyArray<LogBoxLog>,
@@ -224,6 +224,9 @@ class Modal extends React.Component<Props, State> {
224
224
  }
225
225
 
226
226
  componentWillUnmount() {
227
+ if (Platform.OS === 'ios') {
228
+ this.setState({isRendered: false});
229
+ }
227
230
  if (this._eventSubscription) {
228
231
  this._eventSubscription.remove();
229
232
  }