@office-iss/react-native-win32 0.74.4 → 0.75.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 (206) hide show
  1. package/.flowconfig +9 -4
  2. package/CHANGELOG.json +554 -51
  3. package/CHANGELOG.md +165 -30
  4. package/Libraries/Animated/AnimatedImplementation.js +2 -0
  5. package/Libraries/Animated/NativeAnimatedHelper.js +4 -0
  6. package/Libraries/Animated/NativeAnimatedHelper.win32.js +4 -0
  7. package/Libraries/Animated/createAnimatedComponent.js +10 -4
  8. package/Libraries/Animated/useAnimatedProps.js +56 -28
  9. package/Libraries/BatchedBridge/MessageQueue.js +1 -0
  10. package/Libraries/Components/Button.js +10 -5
  11. package/Libraries/Components/Button.win32.js +1 -0
  12. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +11 -2
  13. package/Libraries/Components/Pressable/Pressable.js +13 -6
  14. package/Libraries/Components/Pressable/Pressable.win32.js +13 -6
  15. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +4 -0
  16. package/Libraries/Components/ScrollView/ScrollView.js +109 -29
  17. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +6 -0
  18. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +13 -1
  19. package/Libraries/Components/StatusBar/StatusBar.js +1 -21
  20. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +0 -15
  21. package/Libraries/Components/TextInput/InputAccessoryView.js +10 -1
  22. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +0 -12
  23. package/Libraries/Components/TextInput/TextInput.d.ts +0 -19
  24. package/Libraries/Components/TextInput/TextInput.js +14 -70
  25. package/Libraries/Components/TextInput/TextInput.win32.js +15 -72
  26. package/Libraries/Components/Touchable/Touchable.js +2 -2
  27. package/Libraries/Components/Touchable/TouchableHighlight.d.ts +4 -10
  28. package/Libraries/Components/Touchable/TouchableHighlight.js +3 -1
  29. package/Libraries/Components/Touchable/TouchableOpacity.d.ts +4 -32
  30. package/Libraries/Components/Touchable/TouchableOpacity.js +3 -1
  31. package/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +8 -0
  32. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +117 -111
  33. package/Libraries/Components/View/ReactNativeStyleAttributes.js +6 -0
  34. package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
  35. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
  36. package/Libraries/Components/View/View.js +0 -11
  37. package/Libraries/Components/View/View.win32.js +0 -11
  38. package/Libraries/Components/View/ViewAccessibility.js +4 -4
  39. package/Libraries/Components/View/ViewAccessibility.win32.js +6 -6
  40. package/Libraries/Components/View/ViewPropTypes.d.ts +7 -49
  41. package/Libraries/Components/View/ViewPropTypes.js +7 -0
  42. package/Libraries/Components/View/ViewPropTypes.win32.js +7 -0
  43. package/Libraries/Core/Devtools/loadBundleFromServer.js +3 -3
  44. package/Libraries/Core/Devtools/loadBundleFromServer.win32.js +153 -0
  45. package/Libraries/Core/Devtools/parseErrorStack.js +5 -5
  46. package/Libraries/Core/Devtools/parseHermesStack.js +22 -16
  47. package/Libraries/Core/ErrorHandlers.js +116 -0
  48. package/Libraries/Core/ExceptionsManager.js +2 -2
  49. package/Libraries/Core/ReactNativeVersion.js +3 -3
  50. package/Libraries/Core/setUpDeveloperTools.js +3 -1
  51. package/Libraries/Core/setUpPerformance.js +6 -4
  52. package/Libraries/Core/setUpReactDevTools.js +70 -10
  53. package/Libraries/Core/setUpTimers.js +50 -31
  54. package/Libraries/Debugging/DebuggingOverlayRegistry.js +1 -1
  55. package/Libraries/Image/Image.android.js +23 -13
  56. package/Libraries/Image/Image.d.ts +14 -15
  57. package/Libraries/Image/Image.ios.js +21 -11
  58. package/Libraries/Image/Image.win32.js +5 -3
  59. package/Libraries/Image/ImageProps.js +16 -5
  60. package/Libraries/Image/ImageTypes.flow.js +7 -2
  61. package/Libraries/Image/ImageUtils.js +1 -0
  62. package/Libraries/Image/ImageViewNativeComponent.js +2 -1
  63. package/Libraries/Inspector/ElementBox.js +6 -3
  64. package/Libraries/Inspector/ElementProperties.js +1 -1
  65. package/Libraries/Interaction/TouchHistoryMath.js +4 -4
  66. package/Libraries/IntersectionObserver/IntersectionObserverManager.js +6 -26
  67. package/Libraries/JSInspector/NetworkAgent.js +1 -1
  68. package/Libraries/LogBox/Data/LogBoxData.js +39 -29
  69. package/Libraries/LogBox/Data/LogBoxLog.js +114 -2
  70. package/Libraries/LogBox/Data/parseLogBoxLog.js +168 -53
  71. package/Libraries/LogBox/LogBox.js +29 -12
  72. package/Libraries/LogBox/LogBoxNotificationContainer.js +4 -0
  73. package/Libraries/LogBox/UI/LogBoxInspector.js +8 -70
  74. package/Libraries/LogBox/UI/LogBoxInspectorBody.js +87 -0
  75. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +6 -42
  76. package/Libraries/LogBox/UI/LogBoxInspectorFooterButton.js +58 -0
  77. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +5 -66
  78. package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +8 -52
  79. package/Libraries/LogBox/UI/LogBoxInspectorHeaderButton.js +76 -0
  80. package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +8 -5
  81. package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.win32.js +8 -5
  82. package/Libraries/LogBox/UI/LogBoxNotification.js +13 -152
  83. package/Libraries/LogBox/UI/LogBoxNotificationCountBadge.js +63 -0
  84. package/Libraries/LogBox/UI/LogBoxNotificationDismissButton.js +67 -0
  85. package/Libraries/LogBox/UI/LogBoxNotificationMessage.js +57 -0
  86. package/Libraries/NativeComponent/BaseViewConfig.android.js +5 -0
  87. package/Libraries/NativeComponent/BaseViewConfig.ios.js +5 -0
  88. package/Libraries/NativeComponent/BaseViewConfig.win32.js +5 -0
  89. package/Libraries/NativeComponent/NativeComponentRegistry.js +12 -5
  90. package/Libraries/NativeComponent/StaticViewConfigValidator.js +3 -0
  91. package/Libraries/Network/XMLHttpRequest.js +5 -1
  92. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +3 -3
  93. package/Libraries/Pressability/Pressability.js +3 -51
  94. package/Libraries/Pressability/Pressability.win32.js +3 -51
  95. package/Libraries/ReactNative/AppContainer-dev.js +3 -2
  96. package/Libraries/ReactNative/AppContainer-prod.js +2 -1
  97. package/Libraries/ReactNative/AppContainer.js +2 -0
  98. package/Libraries/ReactNative/AppRegistry.d.ts +7 -0
  99. package/Libraries/ReactNative/AppRegistry.js +10 -4
  100. package/Libraries/ReactNative/BridgelessUIManager.js +1 -21
  101. package/Libraries/ReactNative/FabricUIManager.js +0 -51
  102. package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +1 -0
  103. package/Libraries/ReactNative/RendererImplementation.js +20 -2
  104. package/Libraries/ReactNative/UIManager.d.ts +0 -21
  105. package/Libraries/ReactNative/UIManagerProperties.js +0 -3
  106. package/Libraries/ReactNative/__mocks__/FabricUIManager.js +5 -341
  107. package/Libraries/ReactNative/getNativeComponentAttributes.js +8 -8
  108. package/Libraries/ReactNative/renderApplication.js +3 -0
  109. package/Libraries/Renderer/implementations/ReactFabric-dev.js +15682 -27088
  110. package/Libraries/Renderer/implementations/ReactFabric-prod.js +5082 -4381
  111. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3480 -2571
  112. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +15943 -27543
  113. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +5303 -4606
  114. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +3450 -2572
  115. package/Libraries/Renderer/shims/ReactFabric.js +2 -2
  116. package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -2
  117. package/Libraries/Renderer/shims/ReactNative.js +2 -3
  118. package/Libraries/Renderer/shims/ReactNativeTypes.js +24 -3
  119. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +2 -2
  120. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -2
  121. package/Libraries/Share/Share.d.ts +16 -10
  122. package/Libraries/Share/Share.js +14 -15
  123. package/Libraries/StyleSheet/StyleSheet.d.ts +1 -1
  124. package/Libraries/StyleSheet/StyleSheet.js +3 -10
  125. package/Libraries/StyleSheet/StyleSheet.win32.js +3 -10
  126. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +21 -21
  127. package/Libraries/StyleSheet/StyleSheetTypes.js +24 -18
  128. package/Libraries/StyleSheet/flattenStyle.js +1 -0
  129. package/Libraries/StyleSheet/processFilter.js +132 -0
  130. package/Libraries/StyleSheet/processTransform.js +18 -3
  131. package/Libraries/Text/Text.js +151 -128
  132. package/Libraries/Text/Text.win32.js +163 -138
  133. package/Libraries/Text/TextNativeComponent.js +5 -4
  134. package/Libraries/Text/TextNativeComponent.win32.js +5 -4
  135. package/Libraries/Text/TextProps.js +6 -6
  136. package/Libraries/Text/TextProps.win32.js +6 -6
  137. package/Libraries/TurboModule/TurboModuleRegistry.js +2 -1
  138. package/Libraries/Types/CodegenTypes.js +3 -0
  139. package/Libraries/Utilities/{LoadingView.android.js → DevLoadingView.js} +33 -11
  140. package/Libraries/Utilities/Dimensions.js +1 -0
  141. package/Libraries/Utilities/Dimensions.win32.js +1 -0
  142. package/Libraries/Utilities/HMRClient.js +36 -8
  143. package/Libraries/Utilities/HMRClientProdShim.js +1 -0
  144. package/Libraries/Utilities/Platform.android.js +4 -4
  145. package/Libraries/Utilities/RCTLog.js +1 -0
  146. package/Libraries/Utilities/ReactNativeTestTools.js +12 -24
  147. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +11 -6
  148. package/Libraries/__tests__/ButtonWin32-test.js +7 -6
  149. package/Libraries/promiseRejectionTrackingOptions.js +1 -0
  150. package/jest/mockComponent.js +7 -0
  151. package/jest/renderer.js +25 -14
  152. package/jest/setup.js +19 -13
  153. package/jest.config.js +2 -1
  154. package/overrides.json +30 -29
  155. package/package.json +27 -25
  156. package/rn-get-polyfills.js +1 -0
  157. package/src/private/core/composeStyles.js +27 -0
  158. package/src/private/featureflags/ReactNativeFeatureFlags.js +93 -33
  159. package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +23 -4
  160. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +56 -0
  161. package/src/private/fusebox/setUpFuseboxReactDevToolsDispatcher.js +108 -0
  162. package/src/private/specs/modules/NativeBlobModule.js +4 -2
  163. package/src/private/specs/modules/NativeDevSettings.js +1 -0
  164. package/src/private/specs/modules/NativePushNotificationManagerIOS.js +0 -4
  165. package/src/private/specs/modules/NativeUIManager.js +0 -7
  166. package/src/private/webapis/dom/geometry/DOMRectReadOnly.js +24 -24
  167. package/src/private/webapis/dom/nodes/ReactNativeElement.js +11 -14
  168. package/src/private/webapis/dom/nodes/ReadOnlyCharacterData.js +2 -3
  169. package/src/private/webapis/dom/nodes/ReadOnlyElement.js +24 -54
  170. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +5 -13
  171. package/src/private/webapis/dom/nodes/specs/NativeDOM.js +468 -0
  172. package/src/private/webapis/dom/nodes/specs/__mocks__/NativeDOMMock.js +413 -0
  173. package/src/private/webapis/dom/oldstylecollections/DOMRectList.js +4 -4
  174. package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +4 -4
  175. package/src/private/webapis/dom/oldstylecollections/NodeList.js +5 -5
  176. package/src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks.js +34 -0
  177. package/src/private/webapis/microtasks/specs/NativeMicrotasks.js +21 -0
  178. package/src/private/webapis/performance/EventCounts.js +1 -1
  179. package/src/private/webapis/performance/MemoryInfo.js +9 -9
  180. package/src/private/webapis/performance/Performance.js +10 -56
  181. package/src/private/webapis/performance/PerformanceObserver.js +30 -22
  182. package/src/private/webapis/performance/RawPerformanceEntry.js +2 -7
  183. package/src/private/webapis/performance/ReactNativeStartupTiming.js +18 -18
  184. package/src/private/webapis/performance/UserTiming.js +63 -0
  185. package/src/private/webapis/performance/{NativePerformance.js → specs/NativePerformance.js} +3 -2
  186. package/src/private/webapis/performance/{NativePerformanceObserver.js → specs/NativePerformanceObserver.js} +2 -2
  187. package/src/private/webapis/performance/{__mocks__ → specs/__mocks__}/NativePerformance.js +1 -1
  188. package/src/private/webapis/performance/{__mocks__ → specs/__mocks__}/NativePerformanceObserver.js +3 -4
  189. package/src-win/Libraries/Components/View/ViewPropTypes.d.ts +7 -49
  190. package/types/modules/globals.d.ts +4 -0
  191. package/Libraries/Components/ScrollView/ScrollView.win32.js +0 -1915
  192. package/Libraries/NativeModules/specs/NativeAnimationsDebugModule.js +0 -13
  193. package/Libraries/Utilities/LoadingView.ios.js +0 -50
  194. package/Libraries/Utilities/LoadingView.js +0 -16
  195. package/jest/ReactNativeInternalFeatureFlagsMock.js +0 -13
  196. package/src/private/featureflags/NativeReactNativeFeatureFlags.js +0 -44
  197. package/src/private/featureflags/__tests__/ReactNativeFeatureFlags-test.js +0 -92
  198. package/src/private/specs/modules/NativeAnimationsDebugModule.js +0 -20
  199. package/src/private/webapis/dom/oldstylecollections/__tests__/DOMRectList-test.js +0 -85
  200. package/src/private/webapis/dom/oldstylecollections/__tests__/HTMLCollection-test.js +0 -80
  201. package/src/private/webapis/dom/oldstylecollections/__tests__/NodeList-test.js +0 -161
  202. package/src/private/webapis/performance/__tests__/EventCounts-test.js +0 -116
  203. package/src/private/webapis/performance/__tests__/NativePerformanceMock-test.js +0 -82
  204. package/src/private/webapis/performance/__tests__/NativePerformanceObserverMock-test.js +0 -108
  205. package/src/private/webapis/performance/__tests__/Performance-test.js +0 -117
  206. package/src/private/webapis/performance/__tests__/PerformanceObserver-test.js +0 -208
package/CHANGELOG.md CHANGED
@@ -1,73 +1,208 @@
1
1
  # Change Log - @office-iss/react-native-win32
2
2
 
3
- This log was last generated on Wed, 10 Jul 2024 21:00:05 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 15 Jul 2024 16:51:28 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## 0.74.4
7
+ ## 0.75.0-preview.1
8
8
 
9
- Wed, 10 Jul 2024 21:00:05 GMT
9
+ Mon, 15 Jul 2024 16:51:28 GMT
10
10
 
11
- ### Patches
11
+ ### Changes
12
12
 
13
- - Integrate 0.74.3 (1422161+marlenecota@users.noreply.github.com)
13
+ - Promote 0.75 to preview (tatianakapos@microsoft.com)
14
14
 
15
- ## 0.74.3
15
+ ## 0.0.0-canary.255
16
16
 
17
- Mon, 20 May 2024 15:16:05 GMT
17
+ Fri, 21 Jun 2024 05:17:50 GMT
18
18
 
19
- ### Patches
19
+ ### Changes
20
20
 
21
- - fix(TextInput/isFocused): correctly handle null focused input (nate@bracy.dev)
21
+ - Bump react-native-platform-override to v1.9.42
22
22
 
23
- ## 0.74.2
23
+ ## 0.0.0-canary.254
24
24
 
25
- Mon, 06 May 2024 15:17:11 GMT
25
+ Wed, 12 Jun 2024 05:16:24 GMT
26
26
 
27
- ### Patches
27
+ ### Changes
28
28
 
29
- - Integrate 0.74.1 (30809111+acoates-ms@users.noreply.github.com)
29
+ - Integrate 6/10 (yajurgrover24@gmail.com)
30
+ - Bump @rnw-scripts/eslint-config to v1.2.23
31
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.27
32
+ - Bump @rnw-scripts/just-task to v2.3.40
33
+ - Bump react-native-platform-override to v1.9.41
30
34
 
31
- ## 0.74.1
35
+ ## 0.0.0-canary.253
32
36
 
33
- Wed, 01 May 2024 20:37:36 GMT
37
+ Sat, 08 Jun 2024 05:17:56 GMT
34
38
 
35
- ### Patches
39
+ ### Changes
36
40
 
37
- - target 0.73 and add carets to versions (tatianakapos@microsoft.com)
41
+ - Integrate 5/31 (34109996+chiaramooney@users.noreply.github.com)
42
+ - Bump @rnw-scripts/eslint-config to v1.2.22
43
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.26
44
+ - Bump @rnw-scripts/just-task to v2.3.39
45
+ - Bump react-native-platform-override to v1.9.40
38
46
 
39
- ## 0.74.0
47
+ ## 0.0.0-canary.252
40
48
 
41
- Sat, 27 Apr 2024 21:16:05 GMT
49
+ Wed, 05 Jun 2024 05:18:09 GMT
42
50
 
43
- ### Patches
51
+ ### Changes
52
+
53
+ - Use prettier-plugin-hermes-parser to match upstream settings (email not defined)
54
+ - Bump @rnw-scripts/just-task to v2.3.38
55
+ - Bump react-native-platform-override to v1.9.39
56
+
57
+ ## 0.0.0-canary.251
58
+
59
+ Tue, 04 Jun 2024 05:18:34 GMT
60
+
61
+ ### Changes
62
+
63
+ - Integrate 5/25 (34109996+chiaramooney@users.noreply.github.com)
64
+ - Bump @rnw-scripts/eslint-config to v1.2.21
65
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.25
66
+ - Bump @rnw-scripts/just-task to v2.3.37
67
+ - Bump react-native-platform-override to v1.9.38
68
+
69
+ ## 0.0.0-canary.250
70
+
71
+ Sat, 01 Jun 2024 05:21:30 GMT
72
+
73
+ ### Changes
74
+
75
+ - Integrate 5/14 (34109996+chiaramooney@users.noreply.github.com)
76
+ - Bump @rnw-scripts/eslint-config to v1.2.20
77
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.24
78
+ - Bump @rnw-scripts/just-task to v2.3.36
79
+ - Bump react-native-platform-override to v1.9.37
80
+
81
+ ## 0.0.0-canary.249
82
+
83
+ Thu, 30 May 2024 05:18:25 GMT
84
+
85
+ ### Changes
86
+
87
+ - RN Integration 05/11 (1422161+marlenecota@users.noreply.github.com)
88
+ - Bump @rnw-scripts/eslint-config to v1.2.19
89
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.23
90
+ - Bump @rnw-scripts/just-task to v2.3.35
91
+ - Bump react-native-platform-override to v1.9.36
92
+
93
+ ## 0.0.0-canary.248
94
+
95
+ Thu, 23 May 2024 05:17:48 GMT
96
+
97
+ ### Changes
98
+
99
+ - RN Integration 04/27 (1422161+marlenecota@users.noreply.github.com)
100
+ - RN Integration 05/02 (1422161+marlenecota@users.noreply.github.com)
101
+ - Bump @rnw-scripts/eslint-config to v1.2.18
102
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.22
103
+ - Bump @rnw-scripts/just-task to v2.3.34
104
+ - Bump react-native-platform-override to v1.9.35
105
+
106
+ ## 0.0.0-canary.247
107
+
108
+ Wed, 22 May 2024 05:18:16 GMT
109
+
110
+ ### Changes
111
+
112
+ - RN Integration 04/20 (1422161+marlenecota@users.noreply.github.com)
113
+ - Bump @rnw-scripts/eslint-config to v1.2.17
114
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.21
115
+ - Bump @rnw-scripts/just-task to v2.3.33
116
+ - Bump react-native-platform-override to v1.9.34
117
+
118
+ ## 0.0.0-canary.246
119
+
120
+ Wed, 15 May 2024 05:14:52 GMT
121
+
122
+ ### Changes
123
+
124
+ - Remove unneeded scrollview.win32.js override (30809111+acoates-ms@users.noreply.github.com)
125
+ - 0413 integration (email not defined)
126
+ - Bump @rnw-scripts/eslint-config to v1.2.16
127
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.20
128
+ - Bump @rnw-scripts/just-task to v2.3.32
129
+ - Bump react-native-platform-override to v1.9.33
130
+
131
+ ## 0.0.0-canary.245
132
+
133
+ Sat, 11 May 2024 05:18:28 GMT
134
+
135
+ ### Changes
136
+
137
+ - integrate rn nightly 4/5/2024 (email not defined)
138
+ - Bump @rnw-scripts/eslint-config to v1.2.15
139
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.19
140
+ - Bump @rnw-scripts/just-task to v2.3.31
141
+ - Bump react-native-platform-override to v1.9.32
142
+
143
+ ## 0.0.0-canary.244
144
+
145
+ Thu, 09 May 2024 05:18:43 GMT
146
+
147
+ ### Changes
148
+
149
+ - integrate react-native-3-21 (tatianakapos@microsoft.com)
150
+ - Bump @rnw-scripts/eslint-config to v1.2.14
151
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.18
152
+ - Bump @rnw-scripts/just-task to v2.3.30
153
+ - Bump react-native-platform-override to v1.9.31
154
+
155
+ ## 0.0.0-canary.243
156
+
157
+ Sat, 27 Apr 2024 05:16:25 GMT
158
+
159
+ ### Changes
44
160
 
45
- - Promote 0.74 to latest (tatianakapos@microsoft.com)
46
161
  - Fix PaperUIManager (port from windows) (30809111+acoates-ms@users.noreply.github.com)
47
162
 
48
- ## 0.74.0-preview.3
163
+ ## 0.0.0-canary.242
164
+
165
+ Fri, 26 Apr 2024 05:16:49 GMT
166
+
167
+ ### Changes
168
+
169
+ - Bump react-native-platform-override to v1.9.30
170
+
171
+ ## 0.0.0-canary.241
49
172
 
50
- Mon, 22 Apr 2024 15:16:53 GMT
173
+ Thu, 25 Apr 2024 20:12:41 GMT
51
174
 
52
175
  ### Changes
53
176
 
54
- - integrate rc9 (tatianakapos@microsoft.com)
177
+ - Integrate 3/7 (yajurgrover24@gmail.com)
178
+ - Bump @rnw-scripts/eslint-config to v1.2.13
179
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.17
180
+ - Bump @rnw-scripts/just-task to v2.3.29
181
+ - Bump react-native-platform-override to v1.9.29
55
182
 
56
- ## 0.74.0-preview.2
183
+ ## 0.0.0-canary.240
57
184
 
58
- Thu, 11 Apr 2024 16:29:48 GMT
185
+ Wed, 10 Apr 2024 05:18:18 GMT
59
186
 
60
187
  ### Changes
61
188
 
62
- - integrate react-native 0.74-rc6 (email not defined)
189
+ - integrate 2/29 (yajurgrover24@gmail.com)
190
+ - Bump @rnw-scripts/eslint-config to v1.2.11
191
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.15
192
+ - Bump @rnw-scripts/just-task to v2.3.27
193
+ - Bump react-native-platform-override to v1.9.27
63
194
 
64
- ## 0.74.0-preview.1
195
+ ## 0.0.0-canary.239
65
196
 
66
- Mon, 08 Apr 2024 15:16:48 GMT
197
+ Sat, 30 Mar 2024 05:18:03 GMT
67
198
 
68
199
  ### Changes
69
200
 
70
- - Promote 0.74 to preview (tatianakapos@microsoft.com)
201
+ - initial 2/21 integrate (yajurgrover24@gmail.com)
202
+ - Bump @rnw-scripts/eslint-config to v1.2.10
203
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.14
204
+ - Bump @rnw-scripts/just-task to v2.3.26
205
+ - Bump react-native-platform-override to v1.9.26
71
206
 
72
207
  ## 0.0.0-canary.238
73
208
 
@@ -315,6 +315,8 @@ const sequence = function (
315
315
  current++;
316
316
 
317
317
  if (current === animations.length) {
318
+ // if the start is called, even without a reset, it should start from the beginning
319
+ current = 0;
318
320
  callback && callback(result);
319
321
  return;
320
322
  }
@@ -455,18 +455,22 @@ function addWhitelistedInterpolationParam(param: string): void {
455
455
  }
456
456
 
457
457
  function isSupportedColorStyleProp(prop: string): boolean {
458
+ // $FlowFixMe[invalid-computed-prop]
458
459
  return SUPPORTED_COLOR_STYLES[prop] === true;
459
460
  }
460
461
 
461
462
  function isSupportedStyleProp(prop: string): boolean {
463
+ // $FlowFixMe[invalid-computed-prop]
462
464
  return SUPPORTED_STYLES[prop] === true;
463
465
  }
464
466
 
465
467
  function isSupportedTransformProp(prop: string): boolean {
468
+ // $FlowFixMe[invalid-computed-prop]
466
469
  return SUPPORTED_TRANSFORMS[prop] === true;
467
470
  }
468
471
 
469
472
  function isSupportedInterpolationParam(param: string): boolean {
473
+ // $FlowFixMe[invalid-computed-prop]
470
474
  return SUPPORTED_INTERPOLATION_PARAMS[param] === true;
471
475
  }
472
476
 
@@ -457,18 +457,22 @@ function addWhitelistedInterpolationParam(param: string): void {
457
457
  }
458
458
 
459
459
  function isSupportedColorStyleProp(prop: string): boolean {
460
+ // $FlowFixMe[invalid-computed-prop]
460
461
  return SUPPORTED_COLOR_STYLES[prop] === true;
461
462
  }
462
463
 
463
464
  function isSupportedStyleProp(prop: string): boolean {
465
+ // $FlowFixMe[invalid-computed-prop]
464
466
  return SUPPORTED_STYLES[prop] === true;
465
467
  }
466
468
 
467
469
  function isSupportedTransformProp(prop: string): boolean {
470
+ // $FlowFixMe[invalid-computed-prop]
468
471
  return SUPPORTED_TRANSFORMS[prop] === true;
469
472
  }
470
473
 
471
474
  function isSupportedInterpolationParam(param: string): boolean {
475
+ // $FlowFixMe[invalid-computed-prop]
472
476
  return SUPPORTED_INTERPOLATION_PARAMS[param] === true;
473
477
  }
474
478
 
@@ -8,10 +8,12 @@
8
8
  * @format
9
9
  */
10
10
 
11
+ import composeStyles from '../../src/private/core/composeStyles';
11
12
  import View from '../Components/View/View';
12
13
  import useMergeRefs from '../Utilities/useMergeRefs';
13
14
  import useAnimatedProps from './useAnimatedProps';
14
15
  import * as React from 'react';
16
+ import {useMemo} from 'react';
15
17
 
16
18
  // $FlowFixMe[deprecated-type]
17
19
  export type AnimatedProps<Props: {...}> = $ObjMap<
@@ -44,14 +46,18 @@ export default function createAnimatedComponent<TProps: {...}, TInstance>(
44
46
  // without these passthrough values.
45
47
  // $FlowFixMe[prop-missing]
46
48
  const {passthroughAnimatedPropExplicitValues, style} = reducedProps;
47
- const {style: passthroughStyle, ...passthroughProps} =
48
- passthroughAnimatedPropExplicitValues ?? {};
49
- const mergedStyle = {...style, ...passthroughStyle};
49
+ const passthroughStyle = passthroughAnimatedPropExplicitValues?.style;
50
+ const mergedStyle = useMemo(
51
+ () => composeStyles(style, passthroughStyle),
52
+ [passthroughStyle, style],
53
+ );
50
54
 
55
+ // NOTE: It is important that `passthroughAnimatedPropExplicitValues` is
56
+ // spread after `reducedProps` but before `style`.
51
57
  return (
52
58
  <Component
53
59
  {...reducedProps}
54
- {...passthroughProps}
60
+ {...passthroughAnimatedPropExplicitValues}
55
61
  style={mergedStyle}
56
62
  ref={ref}
57
63
  />
@@ -74,46 +74,74 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
74
74
  // every animation frame. When using the native driver, this callback is
75
75
  // called when the animation completes.
76
76
  onUpdateRef.current = () => {
77
+ if (process.env.NODE_ENV === 'test') {
78
+ // Check 1: this is a test.
79
+ // call `scheduleUpdate` to bypass use of setNativeProps.
80
+ return scheduleUpdate();
81
+ }
82
+
83
+ const isFabricNode = isFabricInstance(instance);
84
+ if (node.__isNative) {
85
+ // Check 2: this is an animation driven by native.
86
+ // In native driven animations, this callback is only called once the animation completes.
87
+ if (isFabricNode) {
88
+ // Call `scheduleUpdate` to synchronise Fiber and Shadow tree.
89
+ // Must not be called in Paper.
90
+ scheduleUpdate();
91
+ }
92
+ return;
93
+ }
94
+
77
95
  if (
78
- process.env.NODE_ENV === 'test' ||
79
96
  typeof instance !== 'object' ||
80
- typeof instance?.setNativeProps !== 'function' ||
81
- (isFabricInstance(instance) && !useNativePropsInFabric)
97
+ typeof instance?.setNativeProps !== 'function'
82
98
  ) {
83
- // Schedule an update for this component to update `reducedProps`,
84
- // but do not compute it immediately. If a parent also updated, we
85
- // need to merge those new props in before updating.
86
- scheduleUpdate();
87
- } else if (!node.__isNative) {
99
+ // Check 3: the instance does not support setNativeProps. Call `scheduleUpdate`.
100
+ return scheduleUpdate();
101
+ }
102
+
103
+ if (!isFabricNode) {
104
+ // Check 4: this is a paper instance, call setNativeProps.
88
105
  // $FlowIgnore[not-a-function] - Assume it's still a function.
89
106
  // $FlowFixMe[incompatible-use]
90
- instance.setNativeProps(node.__getAnimatedValue());
91
- if (isFabricInstance(instance)) {
92
- // Keeping state of Fiber tree and Shadow tree in sync.
93
- //
94
- // This is done by calling `scheduleUpdate` which will trigger a commit.
95
- // However, React commit is not fast enough to drive animations.
96
- // This is where setNativeProps comes in handy but the state between
97
- // Fiber tree and Shadow tree needs to be kept in sync.
98
- // The goal is to call `scheduleUpdate` as little as possible to maintain
99
- // performance but frequently enough to keep state in sync.
100
- // Debounce is set to 48ms, which is 3 * the duration of a frame.
101
- // 3 frames was the highest value where flickering state was not observed.
102
- if (timerRef.current != null) {
103
- clearTimeout(timerRef.current);
104
- }
105
- timerRef.current = setTimeout(() => {
106
- timerRef.current = null;
107
- scheduleUpdate();
108
- }, 48);
109
- }
107
+ return instance.setNativeProps(node.__getAnimatedValue());
108
+ }
109
+
110
+ if (!useNativePropsInFabric) {
111
+ // Check 5: setNativeProps are disabled.
112
+ return scheduleUpdate();
110
113
  }
114
+
115
+ // This is a Fabric instance and setNativeProps is supported.
116
+
117
+ // $FlowIgnore[not-a-function] - Assume it's still a function.
118
+ // $FlowFixMe[incompatible-use]
119
+ instance.setNativeProps(node.__getAnimatedValue());
120
+
121
+ // Keeping state of Fiber tree and Shadow tree in sync.
122
+ //
123
+ // This is done by calling `scheduleUpdate` which will trigger a commit.
124
+ // However, React commit is not fast enough to drive animations.
125
+ // This is where setNativeProps comes in handy but the state between
126
+ // Fiber tree and Shadow tree needs to be kept in sync.
127
+ // The goal is to call `scheduleUpdate` as little as possible to maintain
128
+ // performance but frequently enough to keep state in sync.
129
+ // Debounce is set to 48ms, which is 3 * the duration of a frame.
130
+ // 3 frames was the highest value where flickering state was not observed.
131
+ if (timerRef.current != null) {
132
+ clearTimeout(timerRef.current);
133
+ }
134
+ timerRef.current = setTimeout(() => {
135
+ timerRef.current = null;
136
+ scheduleUpdate();
137
+ }, 48);
111
138
  };
112
139
 
113
140
  const target = getEventTarget(instance);
114
141
  const events = [];
115
142
 
116
143
  for (const propName in props) {
144
+ // $FlowFixMe[invalid-computed-prop]
117
145
  const propValue = props[propName];
118
146
  if (propValue instanceof AnimatedEvent && propValue.__isNative) {
119
147
  propValue.__attach(target, propName);
@@ -424,6 +424,7 @@ class MessageQueue {
424
424
  A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.`,
425
425
  );
426
426
  }
427
+ // $FlowFixMe[invalid-computed-prop]
427
428
  if (!moduleMethods[method]) {
428
429
  invariant(
429
430
  false,
@@ -280,7 +280,13 @@ type ButtonProps = $ReadOnly<{|
280
280
  ```
281
281
  */
282
282
 
283
- const Button: React.AbstractComponent<ButtonProps> = (props: ButtonProps) => {
283
+ const Touchable: typeof TouchableNativeFeedback | typeof TouchableOpacity =
284
+ Platform.OS === 'android' ? TouchableNativeFeedback : TouchableOpacity;
285
+
286
+ const Button: React.AbstractComponent<
287
+ ButtonProps,
288
+ React.ElementRef<typeof Touchable>,
289
+ > = React.forwardRef((props: ButtonProps, ref) => {
284
290
  const {
285
291
  accessibilityLabel,
286
292
  accessibilityState,
@@ -345,8 +351,6 @@ const Button: React.AbstractComponent<ButtonProps> = (props: ButtonProps) => {
345
351
  );
346
352
  const formattedTitle =
347
353
  Platform.OS === 'android' ? title.toUpperCase() : title;
348
- const Touchable =
349
- Platform.OS === 'android' ? TouchableNativeFeedback : TouchableOpacity;
350
354
 
351
355
  // If `no` is specified for `importantForAccessibility`, it will be changed to `no-hide-descendants` because the text inside should not be focused.
352
356
  const _importantForAccessibility =
@@ -374,7 +378,8 @@ const Button: React.AbstractComponent<ButtonProps> = (props: ButtonProps) => {
374
378
  testID={testID}
375
379
  disabled={disabled}
376
380
  onPress={onPress}
377
- touchSoundDisabled={touchSoundDisabled}>
381
+ touchSoundDisabled={touchSoundDisabled}
382
+ ref={ref}>
378
383
  <View style={buttonStyles}>
379
384
  <Text style={textStyles} disabled={disabled}>
380
385
  {formattedTitle}
@@ -382,7 +387,7 @@ const Button: React.AbstractComponent<ButtonProps> = (props: ButtonProps) => {
382
387
  </View>
383
388
  </Touchable>
384
389
  );
385
- };
390
+ });
386
391
 
387
392
  Button.displayName = 'Button';
388
393
 
@@ -356,6 +356,7 @@ const Button: React.AbstractComponent<
356
356
  );
357
357
  const formattedTitle =
358
358
  Platform.OS === 'android' ? title.toUpperCase() : title;
359
+
359
360
  const Touchable =
360
361
  Platform.OS === 'android' ? TouchableNativeFeedback : TouchableOpacity;
361
362
 
@@ -119,7 +119,7 @@ type Props = $ReadOnly<{|
119
119
  |}>;
120
120
 
121
121
  type State = {|
122
- statusBarBackgroundColor: ColorValue,
122
+ drawerOpened: boolean,
123
123
  |};
124
124
 
125
125
  /**
@@ -168,7 +168,9 @@ class DrawerLayoutAndroid extends React.Component<Props, State> {
168
168
  React.ElementRef<typeof AndroidDrawerLayoutNativeComponent>,
169
169
  >();
170
170
 
171
- state: State = {statusBarBackgroundColor: null};
171
+ state: State = {
172
+ drawerOpened: false,
173
+ };
172
174
 
173
175
  render(): React.Node {
174
176
  const {
@@ -189,6 +191,7 @@ class DrawerLayoutAndroid extends React.Component<Props, State> {
189
191
  backgroundColor: drawerBackgroundColor,
190
192
  },
191
193
  ]}
194
+ pointerEvents={this.state.drawerOpened ? 'auto' : 'none'}
192
195
  collapsable={false}>
193
196
  {renderNavigationView()}
194
197
  {drawStatusBar && <View style={styles.drawerStatusBar} />}
@@ -245,12 +248,18 @@ class DrawerLayoutAndroid extends React.Component<Props, State> {
245
248
  };
246
249
 
247
250
  _onDrawerOpen = () => {
251
+ this.setState({
252
+ drawerOpened: true,
253
+ });
248
254
  if (this.props.onDrawerOpen) {
249
255
  this.props.onDrawerOpen();
250
256
  }
251
257
  };
252
258
 
253
259
  _onDrawerClose = () => {
260
+ this.setState({
261
+ drawerOpened: false,
262
+ });
254
263
  if (this.props.onDrawerClose) {
255
264
  this.props.onDrawerClose();
256
265
  }
@@ -195,13 +195,16 @@ type Props = $ReadOnly<{|
195
195
  'aria-label'?: ?string,
196
196
  |}>;
197
197
 
198
+ type Instance = React.ElementRef<typeof View>;
199
+
198
200
  /**
199
201
  * Component used to build display components that should respond to whether the
200
202
  * component is currently pressed or not.
201
203
  */
202
- /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
203
- * LTI update could not be added via codemod */
204
- function Pressable(props: Props, forwardedRef): React.Node {
204
+ function Pressable(
205
+ props: Props,
206
+ forwardedRef: React.RefSetter<Instance>,
207
+ ): React.Node {
205
208
  const {
206
209
  accessible,
207
210
  accessibilityState,
@@ -235,13 +238,16 @@ function Pressable(props: Props, forwardedRef): React.Node {
235
238
  ...restProps
236
239
  } = props;
237
240
 
238
- const viewRef = useRef<React.ElementRef<typeof View> | null>(null);
241
+ const viewRef = useRef<Instance | null>(null);
239
242
  const mergedRef = useMergeRefs(forwardedRef, viewRef);
240
243
 
241
244
  const android_rippleConfig = useAndroidRippleForView(android_ripple, viewRef);
242
245
 
243
246
  const [pressed, setPressed] = usePressState(testOnly_pressed === true);
244
247
 
248
+ const shouldUpdatePressed =
249
+ typeof children === 'function' || typeof style === 'function';
250
+
245
251
  let _accessibilityState = {
246
252
  busy: ariaBusy ?? accessibilityState?.busy,
247
253
  checked: ariaChecked ?? accessibilityState?.checked,
@@ -297,7 +303,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
297
303
  if (android_rippleConfig != null) {
298
304
  android_rippleConfig.onPressIn(event);
299
305
  }
300
- setPressed(true);
306
+ shouldUpdatePressed && setPressed(true);
301
307
  if (onPressIn != null) {
302
308
  onPressIn(event);
303
309
  }
@@ -307,7 +313,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
307
313
  if (android_rippleConfig != null) {
308
314
  android_rippleConfig.onPressOut(event);
309
315
  }
310
- setPressed(false);
316
+ shouldUpdatePressed && setPressed(false);
311
317
  if (onPressOut != null) {
312
318
  onPressOut(event);
313
319
  }
@@ -330,6 +336,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
330
336
  onPressOut,
331
337
  pressRetentionOffset,
332
338
  setPressed,
339
+ shouldUpdatePressed,
333
340
  unstable_pressDelay,
334
341
  ],
335
342
  );
@@ -242,13 +242,16 @@ type Props = $ReadOnly<{|
242
242
  'aria-label'?: ?string,
243
243
  |}>;
244
244
 
245
+ type Instance = React.ElementRef<typeof View>;
246
+
245
247
  /**
246
248
  * Component used to build display components that should respond to whether the
247
249
  * component is currently pressed or not.
248
250
  */
249
- /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
250
- * LTI update could not be added via codemod */
251
- function Pressable(props: Props, forwardedRef): React.Node {
251
+ function Pressable(
252
+ props: Props,
253
+ forwardedRef: React.RefSetter<Instance>,
254
+ ): React.Node {
252
255
  const {
253
256
  accessible,
254
257
  accessibilityState,
@@ -290,13 +293,16 @@ function Pressable(props: Props, forwardedRef): React.Node {
290
293
  ...restProps
291
294
  } = props;
292
295
 
293
- const viewRef = useRef<React.ElementRef<typeof View> | null>(null);
296
+ const viewRef = useRef<Instance | null>(null);
294
297
  const mergedRef = useMergeRefs(forwardedRef, viewRef);
295
298
 
296
299
  const android_rippleConfig = useAndroidRippleForView(android_ripple, viewRef);
297
300
 
298
301
  const [pressed, setPressed] = usePressState(testOnly_pressed === true);
299
302
 
303
+ const shouldUpdatePressed =
304
+ typeof children === 'function' || typeof style === 'function';
305
+
300
306
  let _accessibilityState = {
301
307
  busy: ariaBusy ?? accessibilityState?.busy,
302
308
  checked: ariaChecked ?? accessibilityState?.checked,
@@ -354,7 +360,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
354
360
  if (android_rippleConfig != null) {
355
361
  android_rippleConfig.onPressIn(event);
356
362
  }
357
- setPressed(true);
363
+ shouldUpdatePressed && setPressed(true);
358
364
  if (onPressIn != null) {
359
365
  onPressIn(event);
360
366
  }
@@ -364,7 +370,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
364
370
  if (android_rippleConfig != null) {
365
371
  android_rippleConfig.onPressOut(event);
366
372
  }
367
- setPressed(false);
373
+ shouldUpdatePressed && setPressed(false);
368
374
  if (onPressOut != null) {
369
375
  onPressOut(event);
370
376
  }
@@ -399,6 +405,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
399
405
  // Windows]
400
406
  pressRetentionOffset,
401
407
  setPressed,
408
+ shouldUpdatePressed,
402
409
  unstable_pressDelay,
403
410
  ],
404
411
  );