@office-iss/react-native-win32 0.0.0-canary.289 → 0.0.0-canary.290

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 (112) hide show
  1. package/.flowconfig +1 -2
  2. package/CHANGELOG.json +16 -1
  3. package/CHANGELOG.md +13 -5
  4. package/Libraries/Animated/Animated.js.flow +1 -3
  5. package/Libraries/Animated/AnimatedExports.js.flow +12 -0
  6. package/Libraries/Animated/components/AnimatedScrollView.js +2 -1
  7. package/Libraries/Animated/components/AnimatedSectionList.js +1 -1
  8. package/Libraries/Animated/createAnimatedComponent.js +92 -56
  9. package/Libraries/Animated/nodes/AnimatedProps.js +29 -26
  10. package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -1
  11. package/Libraries/AppState/AppState.js +1 -1
  12. package/Libraries/Blob/URL.js +1 -1
  13. package/Libraries/Blob/URLSearchParams.js +106 -31
  14. package/Libraries/Blob/URLSearchParams.js.flow +12 -7
  15. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +1 -1
  16. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +1 -1
  17. package/Libraries/Components/Keyboard/Keyboard.js +1 -1
  18. package/Libraries/Components/Pressable/Pressable.js +14 -3
  19. package/Libraries/Components/Pressable/Pressable.win32.js +14 -3
  20. package/Libraries/Components/ScrollView/ScrollView.d.ts +1 -1
  21. package/Libraries/Components/ScrollView/ScrollView.js +14 -17
  22. package/Libraries/Components/Switch/Switch.d.ts +3 -0
  23. package/Libraries/Components/Switch/Switch.js +1 -1
  24. package/Libraries/Components/TextInput/TextInput.d.ts +64 -33
  25. package/Libraries/Components/TextInput/TextInput.flow.js +15 -16
  26. package/Libraries/Components/TextInput/TextInput.js +34 -27
  27. package/Libraries/Components/TextInput/TextInput.win32.js +34 -27
  28. package/Libraries/Components/TextInput/TextInputState.js +1 -1
  29. package/Libraries/Components/TextInput/TextInputState.win32.js +1 -1
  30. package/Libraries/Components/Touchable/TouchableBounce.js +2 -1
  31. package/Libraries/Components/Touchable/TouchableHighlight.js +1 -1
  32. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +2 -2
  33. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +2 -2
  34. package/Libraries/Components/Touchable/TouchableOpacity.js +2 -1
  35. package/Libraries/Components/View/ViewAccessibility.js +2 -1
  36. package/Libraries/Components/View/ViewAccessibility.win32.js +2 -1
  37. package/Libraries/Components/View/ViewPropTypes.js +49 -3
  38. package/Libraries/Components/View/ViewPropTypes.win32.js +49 -3
  39. package/Libraries/Core/ReactNativeVersion.js +1 -1
  40. package/Libraries/Debugging/DebuggingOverlayRegistry.js +3 -3
  41. package/Libraries/EventEmitter/NativeEventEmitter.js +4 -2
  42. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +2 -2
  43. package/Libraries/Image/Image.d.ts +26 -10
  44. package/Libraries/Image/Image.js.flow +3 -3
  45. package/Libraries/Image/ImageBackground.js +2 -0
  46. package/Libraries/Image/ImageProps.js +19 -14
  47. package/Libraries/Interaction/InteractionManager.d.ts +13 -0
  48. package/Libraries/Interaction/InteractionManager.js +1 -1
  49. package/Libraries/Interaction/PanResponder.js +3 -3
  50. package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
  51. package/Libraries/Linking/Linking.js +1 -1
  52. package/Libraries/Lists/FlatList.js +7 -10
  53. package/Libraries/Lists/SectionList.js +39 -42
  54. package/Libraries/Lists/SectionListModern.js +22 -31
  55. package/Libraries/Lists/VirtualizedList.js +1 -0
  56. package/Libraries/Lists/VirtualizedSectionList.js +1 -0
  57. package/Libraries/NativeComponent/BaseViewConfig.android.js +1 -0
  58. package/Libraries/NativeComponent/BaseViewConfig.ios.js +1 -0
  59. package/Libraries/NativeComponent/BaseViewConfig.win32.js +1 -0
  60. package/Libraries/Network/RCTNetworking.android.js +1 -1
  61. package/Libraries/Network/RCTNetworking.ios.js +1 -1
  62. package/Libraries/Network/RCTNetworking.js.flow +1 -1
  63. package/Libraries/Network/RCTNetworking.win32.js +1 -1
  64. package/Libraries/NewAppScreen/components/DebugInstructions.js +1 -3
  65. package/Libraries/NewAppScreen/components/Header.js +1 -3
  66. package/Libraries/NewAppScreen/components/HermesBadge.js +1 -3
  67. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +1 -3
  68. package/Libraries/NewAppScreen/components/ReloadInstructions.js +1 -3
  69. package/Libraries/Pressability/Pressability.js +1 -1
  70. package/Libraries/Pressability/Pressability.win32.js +1 -1
  71. package/Libraries/ReactNative/AppContainer-dev.js +2 -2
  72. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +2 -4
  73. package/Libraries/ReactNative/RendererImplementation.js +4 -0
  74. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -1
  75. package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -3
  76. package/Libraries/StyleSheet/StyleSheet.js +25 -2
  77. package/Libraries/StyleSheet/StyleSheet.js.flow +24 -2
  78. package/Libraries/StyleSheet/StyleSheetTypes.js +13 -3
  79. package/Libraries/StyleSheet/flattenStyle.js +7 -3
  80. package/Libraries/StyleSheet/private/_TransformStyle.js +3 -3
  81. package/Libraries/Text/Text.d.ts +2 -5
  82. package/Libraries/Text/TextProps.js +3 -2
  83. package/Libraries/Text/TextProps.win32.js +3 -2
  84. package/Libraries/Types/CoreEventTypes.d.ts +6 -1
  85. package/Libraries/Types/CoreEventTypes.js +1 -1
  86. package/Libraries/Types/CoreEventTypes.win32.js +1 -1
  87. package/Libraries/Utilities/DeviceInfo.js +2 -0
  88. package/Libraries/Utilities/Dimensions.js +1 -1
  89. package/Libraries/Utilities/Dimensions.win32.js +1 -1
  90. package/Libraries/Utilities/PlatformTypes.js +9 -3
  91. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  92. package/Libraries/vendor/core/ErrorUtils.js +2 -0
  93. package/flow/global.js +2 -0
  94. package/index.js +3 -0
  95. package/index.win32.js +3 -0
  96. package/interface.js +0 -4
  97. package/overrides.json +19 -25
  98. package/package.json +13 -13
  99. package/src/private/animated/NativeAnimatedHelper.js +3 -1
  100. package/src/private/animated/NativeAnimatedHelper.win32.js +3 -1
  101. package/src/private/animated/createAnimatedPropsHook.js +1 -0
  102. package/src/private/animated/createAnimatedPropsMemoHook.js +1 -2
  103. package/src/private/featureflags/ReactNativeFeatureFlags.js +18 -18
  104. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +3 -3
  105. package/src/private/inspector/getInspectorDataForViewAtPoint.js +2 -2
  106. package/src/private/types/HostInstance.js +61 -3
  107. package/src/private/webapis/dom/nodes/ReactNativeElement.js +2 -5
  108. package/src-win/Libraries/Text/Text.d.ts +2 -5
  109. package/types/modules/LaunchScreen.d.ts +9 -1
  110. package/Libraries/Utilities/DeviceInfo.win32.js +0 -19
  111. package/flow/jest.js +0 -1289
  112. package/src/private/utilities/ensureInstance.js +0 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@office-iss/react-native-win32",
3
- "version": "0.0.0-canary.289",
3
+ "version": "0.0.0-canary.290",
4
4
  "description": "Implementation of react native on top of Office's Win32 platform.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,13 +30,13 @@
30
30
  "@react-native-community/cli-platform-android": "17.0.0",
31
31
  "@react-native-community/cli-platform-ios": "17.0.0",
32
32
  "@react-native/assets": "1.0.0",
33
- "@react-native/assets-registry": "0.80.0-nightly-20250317-fc7385c1e",
34
- "@react-native/codegen": "0.80.0-nightly-20250317-fc7385c1e",
35
- "@react-native/community-cli-plugin": "0.80.0-nightly-20250317-fc7385c1e",
36
- "@react-native/gradle-plugin": "0.80.0-nightly-20250317-fc7385c1e",
37
- "@react-native/js-polyfills": "0.80.0-nightly-20250317-fc7385c1e",
38
- "@react-native/normalize-colors": "0.80.0-nightly-20250317-fc7385c1e",
39
- "@react-native/virtualized-lists": "0.80.0-nightly-20250317-fc7385c1e",
33
+ "@react-native/assets-registry": "0.80.0-nightly-20250331-398ac1f71",
34
+ "@react-native/codegen": "0.80.0-nightly-20250331-398ac1f71",
35
+ "@react-native/community-cli-plugin": "0.80.0-nightly-20250331-398ac1f71",
36
+ "@react-native/gradle-plugin": "0.80.0-nightly-20250331-398ac1f71",
37
+ "@react-native/js-polyfills": "0.80.0-nightly-20250331-398ac1f71",
38
+ "@react-native/normalize-colors": "0.80.0-nightly-20250331-398ac1f71",
39
+ "@react-native/virtualized-lists": "0.80.0-nightly-20250331-398ac1f71",
40
40
  "abort-controller": "^3.0.0",
41
41
  "anser": "^1.4.9",
42
42
  "ansi-regex": "^5.0.0",
@@ -52,8 +52,8 @@
52
52
  "invariant": "^2.2.4",
53
53
  "jest-environment-node": "^29.7.0",
54
54
  "memoize-one": "^5.0.0",
55
- "metro-runtime": "^0.81.0",
56
- "metro-source-map": "^0.81.0",
55
+ "metro-runtime": "^0.82.0",
56
+ "metro-source-map": "^0.82.0",
57
57
  "mkdirp": "^0.5.1",
58
58
  "nullthrows": "^1.1.1",
59
59
  "pretty-format": "^29.7.0",
@@ -72,7 +72,7 @@
72
72
  "devDependencies": {
73
73
  "@babel/core": "^7.25.2",
74
74
  "@babel/eslint-parser": "^7.25.1",
75
- "@react-native/metro-config": "0.80.0-nightly-20250317-fc7385c1e",
75
+ "@react-native/metro-config": "0.80.0-nightly-20250331-398ac1f71",
76
76
  "@rnw-scripts/babel-react-native-config": "0.0.0",
77
77
  "@rnw-scripts/eslint-config": "1.2.36",
78
78
  "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.40",
@@ -88,14 +88,14 @@
88
88
  "just-scripts": "^1.3.3",
89
89
  "prettier": "2.8.8",
90
90
  "react": "19.0.0",
91
- "react-native": "0.80.0-nightly-20250317-fc7385c1e",
91
+ "react-native": "0.80.0-nightly-20250331-398ac1f71",
92
92
  "react-native-platform-override": "^1.9.55",
93
93
  "typescript": "5.0.4"
94
94
  },
95
95
  "peerDependencies": {
96
96
  "@types/react": "^19.0.0",
97
97
  "react": "^19.0.0",
98
- "react-native": "0.80.0-nightly-20250317-fc7385c1e"
98
+ "react-native": "0.80.0-nightly-20250331-398ac1f71"
99
99
  },
100
100
  "beachball": {
101
101
  "defaultNpmTag": "canary",
@@ -57,7 +57,9 @@ const eventListenerAnimationFinishedCallbacks: {
57
57
  let globalEventEmitterGetValueListener: ?EventSubscription = null;
58
58
  let globalEventEmitterAnimationFinishedListener: ?EventSubscription = null;
59
59
 
60
- const shouldSignalBatch = ReactNativeFeatureFlags.animatedShouldSignalBatch();
60
+ const shouldSignalBatch =
61
+ ReactNativeFeatureFlags.animatedShouldSignalBatch() ||
62
+ ReactNativeFeatureFlags.cxxNativeAnimatedEnabled();
61
63
 
62
64
  function createNativeOperations(): $NonMaybeType<typeof NativeAnimatedModule> {
63
65
  const methodNames = [
@@ -57,7 +57,9 @@ const eventListenerAnimationFinishedCallbacks: {
57
57
  let globalEventEmitterGetValueListener: ?EventSubscription = null;
58
58
  let globalEventEmitterAnimationFinishedListener: ?EventSubscription = null;
59
59
 
60
- const shouldSignalBatch = ReactNativeFeatureFlags.animatedShouldSignalBatch();
60
+ const shouldSignalBatch =
61
+ ReactNativeFeatureFlags.animatedShouldSignalBatch() ||
62
+ ReactNativeFeatureFlags.cxxNativeAnimatedEnabled();
61
63
 
62
64
  function createNativeOperations(): $NonMaybeType<typeof NativeAnimatedModule> {
63
65
  const methodNames = [
@@ -137,6 +137,7 @@ export default function createAnimatedPropsHook(
137
137
  (instance: TInstance) => {
138
138
  // NOTE: This may be called more often than necessary (e.g. when `props`
139
139
  // changes), but `setNativeView` already optimizes for that.
140
+ // $FlowFixMe[incompatible-call]
140
141
  node.setNativeView(instance);
141
142
 
142
143
  // NOTE: When using the JS animation driver, this callback is called on
@@ -91,8 +91,7 @@ export function createAnimatedPropsMemoHook(
91
91
  const prev = prevRef.current;
92
92
 
93
93
  const next =
94
- prev != null &&
95
- areCompositeKeysEqual(prev.compositeKey, compositeKey, allowlist)
94
+ prev != null && areCompositeKeysEqual(prev.compositeKey, compositeKey)
96
95
  ? prev
97
96
  : {
98
97
  compositeKey,
@@ -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<<e76d584cb67e2feae209795beb2009d6>>
7
+ * @generated SignedSource<<b4da778c80a82ff5c93c7d799ff0c580>>
8
8
  * @flow strict
9
9
  */
10
10
 
@@ -49,6 +49,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
49
49
  commonTestFlag: Getter<boolean>,
50
50
  commonTestFlagWithoutNativeImplementation: Getter<boolean>,
51
51
  animatedShouldSignalBatch: Getter<boolean>,
52
+ cxxNativeAnimatedEnabled: Getter<boolean>,
52
53
  disableMountItemReorderingAndroid: Getter<boolean>,
53
54
  enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean>,
54
55
  enableBridgelessArchitecture: Getter<boolean>,
@@ -62,6 +63,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
62
63
  enableLayoutAnimationsOnAndroid: Getter<boolean>,
63
64
  enableLayoutAnimationsOnIOS: Getter<boolean>,
64
65
  enableLongTaskAPI: Getter<boolean>,
66
+ enableMainQueueModulesOnIOS: Getter<boolean>,
65
67
  enableNativeCSSParsing: Getter<boolean>,
66
68
  enableNewBackgroundAndBorderDrawables: Getter<boolean>,
67
69
  enablePropsUpdateReconciliationAndroid: Getter<boolean>,
@@ -72,12 +74,10 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
72
74
  enableViewRecycling: Getter<boolean>,
73
75
  enableViewRecyclingForText: Getter<boolean>,
74
76
  enableViewRecyclingForView: Getter<boolean>,
75
- fixDifferentiatorEmittingUpdatesWithWrongParentTag: Getter<boolean>,
76
77
  fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
77
78
  fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<boolean>,
78
79
  fuseboxEnabledRelease: Getter<boolean>,
79
80
  fuseboxNetworkInspectionEnabled: Getter<boolean>,
80
- lazyAnimationCallbacks: Getter<boolean>,
81
81
  removeTurboModuleManagerDelegateMutex: Getter<boolean>,
82
82
  throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS: Getter<boolean>,
83
83
  traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
@@ -119,7 +119,7 @@ export const avoidStateUpdateInAnimatedPropsMemo: Getter<boolean> = createJavaSc
119
119
  /**
120
120
  * Disables InteractionManager and replaces its scheduler with `setImmediate`.
121
121
  */
122
- export const disableInteractionManager: Getter<boolean> = createJavaScriptFlagGetter('disableInteractionManager', false);
122
+ export const disableInteractionManager: Getter<boolean> = createJavaScriptFlagGetter('disableInteractionManager', true);
123
123
 
124
124
  /**
125
125
  * Enables access to the host tree in Fabric using DOM-compatible APIs.
@@ -137,9 +137,9 @@ export const fixVirtualizeListCollapseWindowSize: Getter<boolean> = createJavaSc
137
137
  export const isLayoutAnimationEnabled: Getter<boolean> = createJavaScriptFlagGetter('isLayoutAnimationEnabled', true);
138
138
 
139
139
  /**
140
- * Changes the cleanup of`AnimatedProps` to occur in a microtask instead of synchronously during effect cleanup (for unmount) or subsequent mounts (for updates).
140
+ * Changes the cleanup of `AnimatedProps` to occur in a microtask instead of synchronously during effect cleanup (for unmount) or subsequent mounts (for updates).
141
141
  */
142
- export const scheduleAnimatedCleanupInMicrotask: Getter<boolean> = createJavaScriptFlagGetter('scheduleAnimatedCleanupInMicrotask', false);
142
+ export const scheduleAnimatedCleanupInMicrotask: Getter<boolean> = createJavaScriptFlagGetter('scheduleAnimatedCleanupInMicrotask', true);
143
143
 
144
144
  /**
145
145
  * Enables use of AnimatedObject for animating transform values.
@@ -169,11 +169,15 @@ export const commonTestFlagWithoutNativeImplementation: Getter<boolean> = create
169
169
  */
170
170
  export const animatedShouldSignalBatch: Getter<boolean> = createNativeFlagGetter('animatedShouldSignalBatch', false);
171
171
  /**
172
- * Prevent FabricMountingManager from reordering mountitems, which may lead to invalid state on the UI thread
172
+ * Use a C++ implementation of Native Animated instead of the platform implementation.
173
+ */
174
+ export const cxxNativeAnimatedEnabled: Getter<boolean> = createNativeFlagGetter('cxxNativeAnimatedEnabled', false);
175
+ /**
176
+ * Prevent FabricMountingManager from reordering mountItems, which may lead to invalid state on the UI thread
173
177
  */
174
178
  export const disableMountItemReorderingAndroid: Getter<boolean> = createNativeFlagGetter('disableMountItemReorderingAndroid', false);
175
179
  /**
176
- * When enabled, Andoid will accumulate updates in rawProps to reduce the number of mounting instructions for cascading rerenders.
180
+ * When enabled, Android will accumulate updates in rawProps to reduce the number of mounting instructions for cascading re-renders.
177
181
  */
178
182
  export const enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean> = createNativeFlagGetter('enableAccumulatedUpdatesInRawPropsAndroid', false);
179
183
  /**
@@ -201,7 +205,7 @@ export const enableFabricRenderer: Getter<boolean> = createNativeFlagGetter('ena
201
205
  */
202
206
  export const enableIOSViewClipToPaddingBox: Getter<boolean> = createNativeFlagGetter('enableIOSViewClipToPaddingBox', false);
203
207
  /**
204
- * When enabled, Andoid will build and initiate image prefetch requests on ImageShadowNode::layout
208
+ * When enabled, Android will build and initiate image prefetch requests on ImageShadowNode::layout
205
209
  */
206
210
  export const enableImagePrefetchingAndroid: Getter<boolean> = createNativeFlagGetter('enableImagePrefetchingAndroid', false);
207
211
  /**
@@ -220,6 +224,10 @@ export const enableLayoutAnimationsOnIOS: Getter<boolean> = createNativeFlagGett
220
224
  * Enables the reporting of long tasks through `PerformanceObserver`. Only works if the event loop is enabled.
221
225
  */
222
226
  export const enableLongTaskAPI: Getter<boolean> = createNativeFlagGetter('enableLongTaskAPI', false);
227
+ /**
228
+ * Makes modules requiring main queue setup initialize on the main thread, during React Native init.
229
+ */
230
+ export const enableMainQueueModulesOnIOS: Getter<boolean> = createNativeFlagGetter('enableMainQueueModulesOnIOS', false);
223
231
  /**
224
232
  * Parse CSS strings using the Fabric CSS parser instead of ViewConfig processing
225
233
  */
@@ -260,10 +268,6 @@ export const enableViewRecyclingForText: Getter<boolean> = createNativeFlagGette
260
268
  * Enables View Recycling for <View> via ReactViewGroup/ReactViewManager.
261
269
  */
262
270
  export const enableViewRecyclingForView: Getter<boolean> = createNativeFlagGetter('enableViewRecyclingForView', true);
263
- /**
264
- * Fixes a bug in Differentiator where parent views may be referenced before they're created
265
- */
266
- export const fixDifferentiatorEmittingUpdatesWithWrongParentTag: Getter<boolean> = createNativeFlagGetter('fixDifferentiatorEmittingUpdatesWithWrongParentTag', true);
267
271
  /**
268
272
  * Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React.
269
273
  */
@@ -280,10 +284,6 @@ export const fuseboxEnabledRelease: Getter<boolean> = createNativeFlagGetter('fu
280
284
  * Enable network inspection support in the React Native DevTools CDP backend. Requires `enableBridgelessArchitecture`. This flag is global and should not be changed across React Host lifetimes.
281
285
  */
282
286
  export const fuseboxNetworkInspectionEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxNetworkInspectionEnabled', false);
283
- /**
284
- * Only enqueue Choreographer calls if there is an ongoing animation, instead of enqueueing every frame.
285
- */
286
- export const lazyAnimationCallbacks: Getter<boolean> = createNativeFlagGetter('lazyAnimationCallbacks', false);
287
287
  /**
288
288
  * When enabled, mutex _turboModuleManagerDelegateMutex in RCTTurboModuleManager will not be used
289
289
  */
@@ -307,7 +307,7 @@ export const useEditTextStockAndroidFocusBehavior: Getter<boolean> = createNativ
307
307
  /**
308
308
  * 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.
309
309
  */
310
- export const useFabricInterop: Getter<boolean> = createNativeFlagGetter('useFabricInterop', false);
310
+ export const useFabricInterop: Getter<boolean> = createNativeFlagGetter('useFabricInterop', true);
311
311
  /**
312
312
  * When enabled, the native view configs are used in bridgeless mode.
313
313
  */
@@ -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<<22d8e7623a2eee5182c786f2ec914401>>
7
+ * @generated SignedSource<<8a9e88c68d78cde54e51477a0f06c643>>
8
8
  * @flow strict
9
9
  */
10
10
 
@@ -26,6 +26,7 @@ export interface Spec extends TurboModule {
26
26
  +commonTestFlag?: () => boolean;
27
27
  +commonTestFlagWithoutNativeImplementation?: () => boolean;
28
28
  +animatedShouldSignalBatch?: () => boolean;
29
+ +cxxNativeAnimatedEnabled?: () => boolean;
29
30
  +disableMountItemReorderingAndroid?: () => boolean;
30
31
  +enableAccumulatedUpdatesInRawPropsAndroid?: () => boolean;
31
32
  +enableBridgelessArchitecture?: () => boolean;
@@ -39,6 +40,7 @@ export interface Spec extends TurboModule {
39
40
  +enableLayoutAnimationsOnAndroid?: () => boolean;
40
41
  +enableLayoutAnimationsOnIOS?: () => boolean;
41
42
  +enableLongTaskAPI?: () => boolean;
43
+ +enableMainQueueModulesOnIOS?: () => boolean;
42
44
  +enableNativeCSSParsing?: () => boolean;
43
45
  +enableNewBackgroundAndBorderDrawables?: () => boolean;
44
46
  +enablePropsUpdateReconciliationAndroid?: () => boolean;
@@ -49,12 +51,10 @@ export interface Spec extends TurboModule {
49
51
  +enableViewRecycling?: () => boolean;
50
52
  +enableViewRecyclingForText?: () => boolean;
51
53
  +enableViewRecyclingForView?: () => boolean;
52
- +fixDifferentiatorEmittingUpdatesWithWrongParentTag?: () => boolean;
53
54
  +fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
54
55
  +fixMountingCoordinatorReportedPendingTransactionsOnAndroid?: () => boolean;
55
56
  +fuseboxEnabledRelease?: () => boolean;
56
57
  +fuseboxNetworkInspectionEnabled?: () => boolean;
57
- +lazyAnimationCallbacks?: () => boolean;
58
58
  +removeTurboModuleManagerDelegateMutex?: () => boolean;
59
59
  +throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS?: () => boolean;
60
60
  +traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
@@ -26,14 +26,14 @@ export type ReactRenderer = {
26
26
  };
27
27
  type AttachedRendererEventPayload = {id: number, renderer: ReactRenderer};
28
28
 
29
- const reactDevToolsHook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
29
+ const reactDevToolsHook = (window: any).__REACT_DEVTOOLS_GLOBAL_HOOK__;
30
30
  invariant(
31
31
  Boolean(reactDevToolsHook),
32
32
  'getInspectorDataForViewAtPoint should not be used if React DevTools hook is not injected',
33
33
  );
34
34
 
35
35
  const renderers: Array<ReactRenderer> = Array.from(
36
- window.__REACT_DEVTOOLS_GLOBAL_HOOK__.renderers.values(),
36
+ (window: any).__REACT_DEVTOOLS_GLOBAL_HOOK__.renderers.values(),
37
37
  );
38
38
 
39
39
  const appendRenderer = ({renderer}: AttachedRendererEventPayload) =>
@@ -32,19 +32,77 @@ export type MeasureLayoutOnSuccessCallback = (
32
32
  ) => void;
33
33
 
34
34
  /**
35
- * Current usages should migrate to this definition
35
+ * NativeMethods provides methods to access the underlying native component directly.
36
+ * This can be useful in cases when you want to focus a view or measure its on-screen dimensions,
37
+ * for example.
38
+ * The methods described here are available on most of the default components provided by React Native.
39
+ * Note, however, that they are not available on composite components that aren't directly backed by a
40
+ * native view. This will generally include most components that you define in your own app.
41
+ * For more information, see [Direct Manipulation](https://reactnative.dev/docs/direct-manipulation).
42
+ * @see https://github.com/facebook/react-native/blob/master/Libraries/Renderer/shims/ReactNativeTypes.js#L87
36
43
  */
37
- export interface LegacyHostInstanceMethods {
44
+ export interface NativeMethods {
45
+ /**
46
+ * Removes focus from an input or view. This is the opposite of `focus()`.
47
+ */
38
48
  blur(): void;
49
+ /**
50
+ * Requests focus for the given input or view. The exact behavior triggered
51
+ * will depend on the platform and type of view.
52
+ */
39
53
  focus(): void;
54
+ /**
55
+ * Determines the location on screen, width, and height of the given view and
56
+ * returns the values via an async callback. If successful, the callback will
57
+ * be called with the following arguments:
58
+ *
59
+ * - x
60
+ * - y
61
+ * - width
62
+ * - height
63
+ * - pageX
64
+ * - pageY
65
+ *
66
+ * Note that these measurements are not available until after the rendering
67
+ * has been completed in native. If you need the measurements as soon as
68
+ * possible, consider using the [`onLayout`
69
+ * prop](docs/view.html#onlayout) instead.
70
+ */
40
71
  measure(callback: MeasureOnSuccessCallback): void;
72
+ /**
73
+ * Determines the location of the given view in the window and returns the
74
+ * values via an async callback. If the React root view is embedded in
75
+ * another native view, this will give you the absolute coordinates. If
76
+ * successful, the callback will be called with the following
77
+ * arguments:
78
+ *
79
+ * - x
80
+ * - y
81
+ * - width
82
+ * - height
83
+ *
84
+ * Note that these measurements are not available until after the rendering
85
+ * has been completed in native.
86
+ */
41
87
  measureInWindow(callback: MeasureInWindowOnSuccessCallback): void;
88
+ /**
89
+ * Like [`measure()`](#measure), but measures the view relative an ancestor,
90
+ * specified as `relativeToNativeComponentRef`. This means that the returned x, y
91
+ * are relative to the origin x, y of the ancestor view.
92
+ * _Can also be called with a relativeNativeNodeHandle but is deprecated._
93
+ */
42
94
  measureLayout(
43
95
  relativeToNativeNode: number | HostInstance,
44
96
  onSuccess: MeasureLayoutOnSuccessCallback,
45
97
  onFail?: () => void,
46
98
  ): void;
99
+ /**
100
+ * This function sends props straight to native. They will not participate in
101
+ * future diff process - this means that if you do not include them in the
102
+ * next render, they will remain active (see [Direct
103
+ * Manipulation](https://reactnative.dev/docs/direct-manipulation)).
104
+ */
47
105
  setNativeProps(nativeProps: {...}): void;
48
106
  }
49
107
 
50
- export type HostInstance = LegacyHostInstanceMethods;
108
+ export type HostInstance = NativeMethods;
@@ -17,10 +17,10 @@ import type {
17
17
  } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes';
18
18
  import type {
19
19
  HostInstance,
20
- LegacyHostInstanceMethods,
21
20
  MeasureInWindowOnSuccessCallback,
22
21
  MeasureLayoutOnSuccessCallback,
23
22
  MeasureOnSuccessCallback,
23
+ NativeMethods,
24
24
  } from '../../../types/HostInstance';
25
25
  import type {InstanceHandle} from './internals/NodeInternals';
26
26
  import type ReactNativeDocument from './ReactNativeDocument';
@@ -60,10 +60,7 @@ const noop = () => {};
60
60
  // was slower than this method because the engine has to create an object than
61
61
  // we then discard to create a new one.
62
62
 
63
- class ReactNativeElement
64
- extends ReadOnlyElement
65
- implements LegacyHostInstanceMethods
66
- {
63
+ class ReactNativeElement extends ReadOnlyElement implements NativeMethods {
67
64
  // These need to be accessible from `ReactFabricPublicInstanceUtils`.
68
65
  __nativeTag: number;
69
66
  __internalInstanceHandle: InstanceHandle;
@@ -16,8 +16,7 @@ import {TextStyle, ViewStyle} from '../StyleSheet/StyleSheetTypes';
16
16
  import {
17
17
  GestureResponderEvent,
18
18
  LayoutChangeEvent,
19
- NativeSyntheticEvent,
20
- TextLayoutEventData,
19
+ TextLayoutEvent,
21
20
  } from '../Types/CoreEventTypes';
22
21
  import type {
23
22
  IKeyboardEvent,
@@ -248,9 +247,7 @@ export interface TextProps
248
247
  /**
249
248
  * Invoked on Text layout
250
249
  */
251
- onTextLayout?:
252
- | ((event: NativeSyntheticEvent<TextLayoutEventData>) => void)
253
- | undefined;
250
+ onTextLayout?: ((event: TextLayoutEvent) => void) | undefined;
254
251
 
255
252
  /**
256
253
  * This function is called on press.
@@ -12,7 +12,15 @@
12
12
  declare module 'react-native/Libraries/NewAppScreen' {
13
13
  export const Header: any;
14
14
  export const LearnMoreLinks: any;
15
- export const Colors: any;
15
+ export const Colors: {
16
+ primary: string;
17
+ white: string;
18
+ lighter: string;
19
+ light: string;
20
+ dark: string;
21
+ darker: string;
22
+ black: string;
23
+ };
16
24
  export const DebugInstructions: any;
17
25
  export const ReloadInstructions: any;
18
26
  }
@@ -1,19 +0,0 @@
1
- /**
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- *
5
- * Device info doesn't can't be a global set of data for win32
6
- * (probably not for android either).
7
- *
8
- * Since the API as designed by facebook can't work, we stub out all we can
9
- * @format
10
- * @flow
11
- */
12
-
13
- import type {Spec} from './NativeDeviceInfo';
14
-
15
- const DeviceInfo: Spec = {
16
- getConstants: () => ({Dimensions: {}}),
17
- };
18
-
19
- export default DeviceInfo;