@office-iss/react-native-win32 0.81.2 → 0.82.0-preview.2
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.
- package/.flowconfig +3 -11
- package/CHANGELOG.json +118 -43
- package/CHANGELOG.md +45 -27
- package/IntegrationTests/IntegrationTestsApp.js +2 -2
- package/IntegrationTests/LayoutEventsTest.js +3 -3
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +7 -3
- package/Libraries/Alert/RCTAlertManager.android.js +4 -2
- package/Libraries/Animated/Animated.d.ts +2 -0
- package/Libraries/Animated/AnimatedEvent.js +1 -1
- package/Libraries/Animated/AnimatedExports.js.flow +1 -0
- package/Libraries/Animated/AnimatedImplementation.js +4 -2
- package/Libraries/Animated/AnimatedMock.js +1 -1
- package/Libraries/Animated/Easing.js +2 -0
- package/Libraries/Animated/NativeAnimatedAllowlist.js +1 -0
- package/Libraries/Animated/animations/Animation.js +19 -20
- package/Libraries/Animated/animations/TimingAnimation.js +2 -0
- package/Libraries/Animated/components/AnimatedScrollView.js +3 -2
- package/Libraries/Animated/components/AnimatedSectionList.js +1 -1
- package/Libraries/Animated/nodes/AnimatedColor.js +9 -9
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +4 -4
- package/Libraries/Animated/nodes/AnimatedNode.js +14 -7
- package/Libraries/Animated/nodes/AnimatedObject.js +7 -7
- package/Libraries/Animated/nodes/AnimatedProps.js +32 -32
- package/Libraries/Animated/nodes/AnimatedStyle.js +23 -21
- package/Libraries/Animated/nodes/AnimatedTransform.js +6 -6
- package/Libraries/Animated/nodes/AnimatedValue.js +18 -26
- package/Libraries/AppState/AppState.js +8 -4
- package/Libraries/BatchedBridge/BatchedBridge.js +1 -0
- package/Libraries/BatchedBridge/MessageQueue.js +5 -0
- package/Libraries/BatchedBridge/NativeModules.js +1 -1
- package/Libraries/Blob/BlobManager.js +1 -1
- package/Libraries/Blob/URLSearchParams.js +2 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +2 -2
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +2 -2
- package/Libraries/Components/Button.js +1 -1
- package/Libraries/Components/Button.win32.js +1 -1
- package/Libraries/Components/Pressable/Pressable.js +10 -1
- package/Libraries/Components/Pressable/Pressable.win32.js +9 -0
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +2 -2
- package/Libraries/Components/ScrollView/ScrollView.js +13 -4
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +2 -2
- package/Libraries/Components/Switch/Switch.js +1 -1
- package/Libraries/Components/TextInput/TextInput.flow.js +12 -5
- package/Libraries/Components/TextInput/TextInput.flow.win32.js +12 -5
- package/Libraries/Components/TextInput/TextInput.js +14 -5
- package/Libraries/Components/TextInput/TextInput.win32.js +15 -7
- package/Libraries/Components/TextInput/TextInputState.js +1 -1
- package/Libraries/Components/TextInput/TextInputState.win32.js +1 -1
- package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +2 -3
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -1
- package/Libraries/Components/Touchable/TouchableHighlight.js +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +3 -3
- package/Libraries/Components/View/View.js +81 -167
- package/Libraries/Components/View/View.win32.js +3 -1
- package/Libraries/Core/Devtools/loadBundleFromServer.js +1 -1
- package/Libraries/Core/Devtools/loadBundleFromServer.win32.js +1 -1
- package/Libraries/Core/ExceptionsManager.js +4 -2
- package/Libraries/Core/ReactFiberErrorDialog.js +3 -3
- package/Libraries/Core/ReactNativeVersion.js +37 -10
- package/Libraries/Core/Timers/JSTimers.js +4 -1
- package/Libraries/Core/Timers/NativeTiming.js +1 -0
- package/Libraries/Core/Timers/immediateShim.js +2 -1
- package/Libraries/Core/Timers/queueMicrotask.js +1 -0
- package/Libraries/Core/setUpPerformance.js +3 -4
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +5 -3
- package/Libraries/Image/Image.android.js +327 -111
- package/Libraries/Image/Image.ios.js +6 -1
- package/Libraries/Image/Image.win32.js +6 -1
- package/Libraries/Image/ImageSourceUtils.js +8 -2
- package/Libraries/Image/assetPaths.js +1 -1
- package/Libraries/Image/resolveAssetSource.js +1 -1
- package/Libraries/Image/resolveAssetSource.win32.js +6 -7
- package/Libraries/Interaction/InteractionManager.js +118 -167
- package/Libraries/Interaction/PanResponder.js +7 -52
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -0
- package/Libraries/Lists/FlatList.js +5 -6
- package/Libraries/LogBox/Data/LogBoxData.js +5 -2
- package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +2 -2
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.win32.js +1 -1
- package/Libraries/Modal/Modal.js +3 -3
- package/Libraries/NativeComponent/NativeComponentRegistry.js +1 -1
- package/Libraries/NativeComponent/ViewConfig.js +2 -2
- package/Libraries/Network/RCTNetworking.android.js +1 -1
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.win32.js +1 -1
- package/Libraries/Network/XMLHttpRequest.js +20 -5
- package/Libraries/Network/convertRequestBody.js +1 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +10 -9
- package/Libraries/Pressability/HoverState.js +2 -0
- package/Libraries/Pressability/HoverState.win32.js +2 -0
- package/Libraries/Pressability/Pressability.js +1 -1
- package/Libraries/Pressability/Pressability.win32.js +1 -1
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +2 -2
- package/Libraries/ReactNative/AppRegistryImpl.js +4 -2
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +2 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +3 -3
- package/Libraries/ReactNative/RendererImplementation.js +116 -116
- package/Libraries/ReactNative/UIManager.js +3 -3
- package/Libraries/ReactNative/renderApplication.js +1 -0
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +38 -35
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +51 -22
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +54 -24
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +36 -33
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +5 -5
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5 -5
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
- package/Libraries/Share/Share.js +4 -0
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +2 -2
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +2 -2
- package/Libraries/StyleSheet/PlatformColorValueTypes.win32.js +4 -0
- package/Libraries/StyleSheet/StyleSheet.d.ts +7 -22
- package/Libraries/StyleSheet/StyleSheetExports.js +2 -8
- package/Libraries/StyleSheet/StyleSheetExports.js.flow +11 -18
- package/Libraries/StyleSheet/flattenStyle.js +2 -2
- package/Libraries/StyleSheet/processAspectRatio.js +2 -0
- package/Libraries/StyleSheet/processFilter.js +5 -5
- package/Libraries/StyleSheet/splitLayoutProps.js +2 -2
- package/Libraries/Text/Text.js +534 -234
- package/Libraries/Text/Text.win32.js +647 -274
- package/Libraries/Text/TextNativeComponent.js +2 -2
- package/Libraries/Text/TextNativeComponent.win32.js +2 -2
- package/Libraries/Utilities/Appearance.d.ts +3 -5
- package/Libraries/Utilities/Appearance.js +5 -17
- package/Libraries/Utilities/HMRClient.js +2 -1
- package/Libraries/Utilities/Platform.android.js +3 -3
- package/Libraries/Utilities/Platform.d.ts +1 -0
- package/Libraries/Utilities/Platform.ios.js +1 -1
- package/Libraries/Utilities/Platform.win32.js +3 -3
- package/Libraries/Utilities/PlatformTypes.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +12 -0
- package/Libraries/Utilities/SceneTracker.js +1 -1
- package/Libraries/Utilities/codegenNativeCommands.js +1 -1
- package/Libraries/Utilities/codegenNativeComponent.js +1 -1
- package/Libraries/Utilities/createPerformanceLogger.js +32 -0
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
- package/Libraries/Utilities/differ/pointsDiffer.js +1 -1
- package/Libraries/Utilities/useMergeRefs.js +1 -1
- package/Libraries/WebSocket/WebSocketInterceptor.js +2 -0
- package/Libraries/promiseRejectionTrackingOptions.js +17 -31
- package/Libraries/vendor/emitter/EventEmitter.js +1 -1
- package/flow/bom.js.flow +223 -1
- package/flow/prettier.js.flow +14 -0
- package/index.js +14 -2
- package/index.win32.js +16 -2
- package/jest/local-setup.js +2 -2
- package/jest/mock.js +1 -1
- package/jest/mockComponent.js +9 -9
- package/jest/mockNativeComponent.js +3 -2
- package/jest/mocks/Modal.js +1 -1
- package/jest/mocks/ScrollView.js +1 -1
- package/jest/mocks/ViewNativeComponent.js +1 -1
- package/jest/setup.js +23 -12
- package/overrides.json +23 -23
- package/package.json +28 -27
- package/saveAssetPlugin.js +2 -2
- package/src/private/animated/NativeAnimatedHelper.js +16 -5
- package/src/private/animated/NativeAnimatedHelper.win32.js +16 -5
- package/src/private/animated/createAnimatedPropsHook.js +11 -60
- package/src/private/animated/createAnimatedPropsMemoHook.js +8 -54
- package/src/private/components/virtualview/VirtualView.js +43 -12
- package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +93 -0
- package/src/private/components/virtualview/VirtualViewNativeComponent.js +6 -0
- package/src/private/devsupport/devmenu/elementinspector/Inspector.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay.js +2 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +85 -52
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +23 -4
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +15 -6
- package/src/private/renderer/errorhandling/ErrorHandlers.js +3 -3
- package/src/private/setup/{setUpPerformanceObserver.js → setUpPerformanceModern.js} +43 -18
- package/src/private/specs_DEPRECATED/modules/NativeTiming.js +1 -0
- package/src/private/types/HostInstance.js +4 -1
- package/src/private/webapis/dom/nodes/ReactNativeDocument.js +22 -2
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +1 -1
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +5 -3
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +16 -13
- package/src/private/webapis/dom/nodes/internals/NodeInternals.js +45 -22
- package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js +1 -1
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +26 -192
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +15 -12
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +14 -11
- package/src/private/webapis/geometry/DOMRectList.js +2 -2
- package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +19 -74
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +0 -4
- package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +1 -1
- package/src/private/webapis/performance/EventTiming.js +40 -25
- package/src/private/webapis/performance/LongTasks.js +35 -2
- package/src/private/webapis/performance/Performance.js +347 -166
- package/src/private/webapis/performance/PerformanceEntry.js +40 -23
- package/src/private/webapis/performance/PerformanceObserver.js +37 -29
- package/src/private/webapis/performance/ReactNativeStartupTiming.js +3 -24
- package/src/private/webapis/performance/ResourceTiming.js +29 -18
- package/src/private/webapis/performance/UserTiming.js +92 -34
- package/src/private/webapis/performance/UserTimingExtensibility.js.flow +38 -0
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +3 -4
- package/src/private/webapis/performance/internals/Utilities.js +9 -0
- package/src/private/webapis/performance/specs/NativePerformance.js +23 -23
- package/src/private/webapis/structuredClone/structuredClone.js +10 -10
- package/src-win/Libraries/Components/Touchable/TouchableWin32.tsx +1 -1
- package/Libraries/Interaction/InteractionManagerStub.js +0 -184
- package/Libraries/Interaction/TaskQueue.js +0 -183
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +0 -31
package/overrides.json
CHANGED
|
@@ -7,19 +7,19 @@
|
|
|
7
7
|
"**/__snapshots__/**",
|
|
8
8
|
"src-win/rntypes/**"
|
|
9
9
|
],
|
|
10
|
-
"baseVersion": "0.
|
|
10
|
+
"baseVersion": "0.82.1",
|
|
11
11
|
"overrides": [
|
|
12
12
|
{
|
|
13
13
|
"type": "derived",
|
|
14
14
|
"file": ".flowconfig",
|
|
15
15
|
"baseFile": ".flowconfig",
|
|
16
|
-
"baseHash": "
|
|
16
|
+
"baseHash": "c8bd25d4aa75328a2484c5c7b0b768c188a50b52"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"type": "derived",
|
|
20
20
|
"file": "src-win/index.win32.js",
|
|
21
21
|
"baseFile": "packages/react-native/index.js",
|
|
22
|
-
"baseHash": "
|
|
22
|
+
"baseHash": "85e7ef1b905f25616471b5e1c61a191fe5879176"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"type": "platform",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"type": "derived",
|
|
42
42
|
"file": "src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js",
|
|
43
43
|
"baseFile": "packages/react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js",
|
|
44
|
-
"baseHash": "
|
|
44
|
+
"baseHash": "b77b87e32a86265a3c8c29ebbbee46558596aec8"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"type": "copy",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"type": "derived",
|
|
61
61
|
"file": "src-win/Libraries/Components/Button.win32.js",
|
|
62
62
|
"baseFile": "packages/react-native/Libraries/Components/Button.js",
|
|
63
|
-
"baseHash": "
|
|
63
|
+
"baseHash": "26d3afc77f82939021f848eb8185b3b441fb3c7d"
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
"type": "platform",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"type": "patch",
|
|
86
86
|
"file": "src-win/Libraries/Components/Pressable/Pressable.win32.js",
|
|
87
87
|
"baseFile": "packages/react-native/Libraries/Components/Pressable/Pressable.js",
|
|
88
|
-
"baseHash": "
|
|
88
|
+
"baseHash": "08a6e1c0dd895af70ea1c8448a3be028d9cd2587",
|
|
89
89
|
"issue": 6240
|
|
90
90
|
},
|
|
91
91
|
{
|
|
@@ -108,19 +108,19 @@
|
|
|
108
108
|
"type": "derived",
|
|
109
109
|
"file": "src-win/Libraries/Components/TextInput/TextInput.flow.win32.js",
|
|
110
110
|
"baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.flow.js",
|
|
111
|
-
"baseHash": "
|
|
111
|
+
"baseHash": "c3e71a2dbba8e4dd45a34c0c21327aa36d79a1b1"
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
"type": "derived",
|
|
115
115
|
"file": "src-win/Libraries/Components/TextInput/TextInput.win32.js",
|
|
116
116
|
"baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js",
|
|
117
|
-
"baseHash": "
|
|
117
|
+
"baseHash": "547fa57cd844cece1f4401b93be75b2edd2a757f"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
120
|
"type": "patch",
|
|
121
121
|
"file": "src-win/Libraries/Components/TextInput/TextInputState.win32.js",
|
|
122
122
|
"baseFile": "packages/react-native/Libraries/Components/TextInput/TextInputState.js",
|
|
123
|
-
"baseHash": "
|
|
123
|
+
"baseHash": "e310687c98b6de40bfe9d939639de566a91fca85"
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
126
|
"type": "platform",
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"type": "derived",
|
|
154
154
|
"file": "src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js",
|
|
155
155
|
"baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js",
|
|
156
|
-
"baseHash": "
|
|
156
|
+
"baseHash": "2ded2efb727d7544aa8a0b249dd3f2502bb57129"
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
159
|
"type": "platform",
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
"type": "patch",
|
|
178
178
|
"file": "src-win/Libraries/Components/View/View.win32.js",
|
|
179
179
|
"baseFile": "packages/react-native/Libraries/Components/View/View.js",
|
|
180
|
-
"baseHash": "
|
|
180
|
+
"baseHash": "60eab5df574b43200494005fc3f00d11576d515b"
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
183
|
"type": "derived",
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
"type": "patch",
|
|
219
219
|
"file": "src-win/Libraries/Core/Devtools/loadBundleFromServer.win32.js",
|
|
220
220
|
"baseFile": "packages/react-native/Libraries/Core/Devtools/loadBundleFromServer.js",
|
|
221
|
-
"baseHash": "
|
|
221
|
+
"baseHash": "5177ecc736e9bebd4e798dcc2c6dd19c38b0a937",
|
|
222
222
|
"issue": 12704
|
|
223
223
|
},
|
|
224
224
|
{
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
"type": "derived",
|
|
237
237
|
"file": "src-win/Libraries/Image/Image.win32.js",
|
|
238
238
|
"baseFile": "packages/react-native/Libraries/Image/Image.ios.js",
|
|
239
|
-
"baseHash": "
|
|
239
|
+
"baseHash": "be81d302b8f2d64ddf7a52bd30fbcb47d18741b5",
|
|
240
240
|
"issue": 4320
|
|
241
241
|
},
|
|
242
242
|
{
|
|
@@ -309,7 +309,7 @@
|
|
|
309
309
|
"type": "derived",
|
|
310
310
|
"file": "src-win/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.win32.js",
|
|
311
311
|
"baseFile": "packages/react-native/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js",
|
|
312
|
-
"baseHash": "
|
|
312
|
+
"baseHash": "ccbfc8413dc7bd26eb7bc9726b273f1cf23b1c70"
|
|
313
313
|
},
|
|
314
314
|
{
|
|
315
315
|
"type": "derived",
|
|
@@ -335,7 +335,7 @@
|
|
|
335
335
|
"type": "copy",
|
|
336
336
|
"file": "src-win/Libraries/Network/RCTNetworking.win32.js",
|
|
337
337
|
"baseFile": "packages/react-native/Libraries/Network/RCTNetworking.ios.js",
|
|
338
|
-
"baseHash": "
|
|
338
|
+
"baseHash": "1c7dcc3e3cf7339c3450e7722b7b0a355266a001",
|
|
339
339
|
"issue": 4318
|
|
340
340
|
},
|
|
341
341
|
{
|
|
@@ -358,14 +358,14 @@
|
|
|
358
358
|
"type": "patch",
|
|
359
359
|
"file": "src-win/Libraries/Pressability/HoverState.win32.js",
|
|
360
360
|
"baseFile": "packages/react-native/Libraries/Pressability/HoverState.js",
|
|
361
|
-
"baseHash": "
|
|
361
|
+
"baseHash": "ac3381594462358f75de1182b26a162dff691f0e",
|
|
362
362
|
"issue": 6240
|
|
363
363
|
},
|
|
364
364
|
{
|
|
365
365
|
"type": "patch",
|
|
366
366
|
"file": "src-win/Libraries/Pressability/Pressability.win32.js",
|
|
367
367
|
"baseFile": "packages/react-native/Libraries/Pressability/Pressability.js",
|
|
368
|
-
"baseHash": "
|
|
368
|
+
"baseHash": "a4205b3bea276e65da3ce0aeb6753bc8e7c5ead0",
|
|
369
369
|
"issue": 6240
|
|
370
370
|
},
|
|
371
371
|
{
|
|
@@ -425,13 +425,13 @@
|
|
|
425
425
|
"type": "derived",
|
|
426
426
|
"file": "src-win/Libraries/Text/Text.win32.js",
|
|
427
427
|
"baseFile": "packages/react-native/Libraries/Text/Text.js",
|
|
428
|
-
"baseHash": "
|
|
428
|
+
"baseHash": "59bf5757acc083a749a38173b3610529b27ef4fb"
|
|
429
429
|
},
|
|
430
430
|
{
|
|
431
431
|
"type": "derived",
|
|
432
432
|
"file": "src-win/Libraries/Text/TextNativeComponent.win32.js",
|
|
433
433
|
"baseFile": "packages/react-native/Libraries/Text/TextNativeComponent.js",
|
|
434
|
-
"baseHash": "
|
|
434
|
+
"baseHash": "259a625b5f7cf3a70ecd4af6388d82d47f446e50",
|
|
435
435
|
"issue": 7074
|
|
436
436
|
},
|
|
437
437
|
{
|
|
@@ -478,26 +478,26 @@
|
|
|
478
478
|
"type": "derived",
|
|
479
479
|
"file": "src-win/Libraries/Utilities/Platform.win32.js",
|
|
480
480
|
"baseFile": "packages/react-native/Libraries/Utilities/Platform.android.js",
|
|
481
|
-
"baseHash": "
|
|
481
|
+
"baseHash": "6497ec623691b34885e226e4d05bc55ba582a135"
|
|
482
482
|
},
|
|
483
483
|
{
|
|
484
484
|
"type": "patch",
|
|
485
485
|
"file": "src-win/Libraries/Utilities/PlatformTypes.js",
|
|
486
486
|
"baseFile": "packages/react-native/Libraries/Utilities/PlatformTypes.js",
|
|
487
|
-
"baseHash": "
|
|
487
|
+
"baseHash": "f4859039e2bf991ff60d38308c25456ec752191f",
|
|
488
488
|
"issue": 14686
|
|
489
489
|
},
|
|
490
490
|
{
|
|
491
491
|
"type": "copy",
|
|
492
492
|
"file": "src-win/Libraries/Utilities/useMergeRefs.js",
|
|
493
493
|
"baseFile": "packages/react-native/Libraries/Utilities/useMergeRefs.js",
|
|
494
|
-
"baseHash": "
|
|
494
|
+
"baseHash": "4ab145e150c82f4f82547122896e02f45103d1a1"
|
|
495
495
|
},
|
|
496
496
|
{
|
|
497
497
|
"type": "patch",
|
|
498
498
|
"file": "src-win/src/private/animated/NativeAnimatedHelper.win32.js",
|
|
499
499
|
"baseFile": "packages/react-native/src/private/animated/NativeAnimatedHelper.js",
|
|
500
|
-
"baseHash": "
|
|
500
|
+
"baseHash": "14407780e54e66515159aed1a51cee154b1d5339",
|
|
501
501
|
"issue": 11041
|
|
502
502
|
},
|
|
503
503
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.82.0-preview.2",
|
|
4
4
|
"description": "Implementation of react native on top of Office's Win32 platform.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,40 +26,41 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.0.0",
|
|
28
28
|
"@jest/create-cache-key-function": "^29.7.0",
|
|
29
|
-
"@react-native-community/cli": "
|
|
30
|
-
"@react-native-community/cli-platform-android": "
|
|
31
|
-
"@react-native-community/cli-platform-ios": "
|
|
29
|
+
"@react-native-community/cli": "20.0.0",
|
|
30
|
+
"@react-native-community/cli-platform-android": "20.0.0",
|
|
31
|
+
"@react-native-community/cli-platform-ios": "20.0.0",
|
|
32
32
|
"@react-native/assets": "1.0.0",
|
|
33
|
-
"@react-native/assets-registry": "0.
|
|
34
|
-
"@react-native/codegen": "0.
|
|
35
|
-
"@react-native/community-cli-plugin": "0.
|
|
36
|
-
"@react-native/gradle-plugin": "0.
|
|
37
|
-
"@react-native/js-polyfills": "0.
|
|
38
|
-
"@react-native/normalize-colors": "0.
|
|
39
|
-
"@react-native/virtualized-lists": "0.
|
|
33
|
+
"@react-native/assets-registry": "0.82.1",
|
|
34
|
+
"@react-native/codegen": "0.82.1",
|
|
35
|
+
"@react-native/community-cli-plugin": "0.82.1",
|
|
36
|
+
"@react-native/gradle-plugin": "0.82.1",
|
|
37
|
+
"@react-native/js-polyfills": "0.82.1",
|
|
38
|
+
"@react-native/normalize-colors": "0.82.1",
|
|
39
|
+
"@react-native/virtualized-lists": "0.82.1",
|
|
40
40
|
"abort-controller": "^3.0.0",
|
|
41
41
|
"anser": "^1.4.9",
|
|
42
42
|
"ansi-regex": "^5.0.0",
|
|
43
43
|
"art": "^0.10.0",
|
|
44
44
|
"babel-jest": "^29.7.0",
|
|
45
|
-
"babel-plugin-syntax-hermes-parser": "0.
|
|
45
|
+
"babel-plugin-syntax-hermes-parser": "0.32.0",
|
|
46
46
|
"base64-js": "^1.5.1",
|
|
47
47
|
"chalk": "^4.0.0",
|
|
48
48
|
"commander": "^12.0.0",
|
|
49
49
|
"event-target-shim": "^5.0.1",
|
|
50
50
|
"flow-enums-runtime": "^0.0.6",
|
|
51
51
|
"glob": "^7.1.1",
|
|
52
|
+
"hermes-compiler": "0.0.0",
|
|
52
53
|
"invariant": "^2.2.4",
|
|
53
54
|
"jest-environment-node": "^29.7.0",
|
|
54
55
|
"memoize-one": "^5.0.0",
|
|
55
56
|
"metro-runtime": "^0.83.1",
|
|
56
|
-
"metro-source-map": "^0.
|
|
57
|
+
"metro-source-map": "^0.83.1",
|
|
57
58
|
"mkdirp": "^0.5.1",
|
|
58
59
|
"nullthrows": "^1.1.1",
|
|
59
60
|
"pretty-format": "^29.7.0",
|
|
60
61
|
"promise": "^8.3.0",
|
|
61
62
|
"react-clone-referenced-element": "^1.0.1",
|
|
62
|
-
"react-devtools-core": "^6.1.
|
|
63
|
+
"react-devtools-core": "^6.1.5",
|
|
63
64
|
"react-refresh": "^0.14.0",
|
|
64
65
|
"regenerator-runtime": "^0.13.2",
|
|
65
66
|
"scheduler": "0.26.0",
|
|
@@ -72,37 +73,37 @@
|
|
|
72
73
|
"devDependencies": {
|
|
73
74
|
"@babel/core": "^7.25.2",
|
|
74
75
|
"@babel/eslint-parser": "^7.25.1",
|
|
75
|
-
"@react-native/metro-config": "0.
|
|
76
|
+
"@react-native/metro-config": "0.82.1",
|
|
76
77
|
"@rnw-scripts/babel-react-native-config": "0.0.0",
|
|
77
|
-
"@rnw-scripts/eslint-config": "1.2.
|
|
78
|
-
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.
|
|
79
|
-
"@rnw-scripts/just-task": "2.3.
|
|
78
|
+
"@rnw-scripts/eslint-config": "1.2.38",
|
|
79
|
+
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.42",
|
|
80
|
+
"@rnw-scripts/just-task": "2.3.58",
|
|
80
81
|
"@rnw-scripts/metro-dev-config": "0.0.0",
|
|
81
82
|
"@rnx-kit/jest-preset": "^0.1.17",
|
|
82
83
|
"@types/node": "^22.0.0",
|
|
83
84
|
"@types/prop-types": "15.7.1",
|
|
84
85
|
"@types/react": "^19.0.0",
|
|
85
86
|
"eslint": "^8.19.0",
|
|
86
|
-
"flow-bin": "^0.
|
|
87
|
+
"flow-bin": "^0.280.0",
|
|
87
88
|
"jscodeshift": "^0.14.0",
|
|
88
89
|
"just-scripts": "^1.3.3",
|
|
89
90
|
"prettier": "2.8.8",
|
|
90
|
-
"react": "19.1.
|
|
91
|
-
"react-native": "0.
|
|
92
|
-
"react-native-platform-override": "0.
|
|
91
|
+
"react": "19.1.1",
|
|
92
|
+
"react-native": "0.82.1",
|
|
93
|
+
"react-native-platform-override": "0.82.0-preview.1",
|
|
93
94
|
"typescript": "5.0.4"
|
|
94
95
|
},
|
|
95
96
|
"peerDependencies": {
|
|
96
|
-
"@types/react": "^19.1.
|
|
97
|
-
"react": "^19.1.
|
|
98
|
-
"react-native": "0.
|
|
97
|
+
"@types/react": "^19.1.1",
|
|
98
|
+
"react": "^19.1.1",
|
|
99
|
+
"react-native": "^0.82.0"
|
|
99
100
|
},
|
|
100
101
|
"beachball": {
|
|
101
|
-
"defaultNpmTag": "
|
|
102
|
+
"defaultNpmTag": "preview",
|
|
102
103
|
"disallowedChangeTypes": [
|
|
103
104
|
"major",
|
|
104
105
|
"minor",
|
|
105
|
-
"
|
|
106
|
+
"patch",
|
|
106
107
|
"premajor",
|
|
107
108
|
"preminor",
|
|
108
109
|
"prepatch"
|
package/saveAssetPlugin.js
CHANGED
|
@@ -58,7 +58,6 @@ let globalEventEmitterGetValueListener: ?EventSubscription = null;
|
|
|
58
58
|
let globalEventEmitterAnimationFinishedListener: ?EventSubscription = null;
|
|
59
59
|
|
|
60
60
|
const shouldSignalBatch: boolean =
|
|
61
|
-
ReactNativeFeatureFlags.animatedShouldSignalBatch() ||
|
|
62
61
|
ReactNativeFeatureFlags.cxxNativeAnimatedEnabled();
|
|
63
62
|
|
|
64
63
|
function createNativeOperations(): $NonMaybeType<typeof NativeAnimatedModule> {
|
|
@@ -128,7 +127,7 @@ function createNativeOperations(): $NonMaybeType<typeof NativeAnimatedModule> {
|
|
|
128
127
|
};
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
|
-
// $FlowExpectedError[incompatible-
|
|
130
|
+
// $FlowExpectedError[incompatible-type] - Dynamism.
|
|
132
131
|
return nativeOperations;
|
|
133
132
|
}
|
|
134
133
|
|
|
@@ -141,10 +140,12 @@ const NativeOperations = createNativeOperations();
|
|
|
141
140
|
const API = {
|
|
142
141
|
getValue: (isSingleOpBatching
|
|
143
142
|
? (tag, saveValueCallback) => {
|
|
143
|
+
/* $FlowFixMe[constant-condition] Error discovered during Constant
|
|
144
|
+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
|
|
144
145
|
if (saveValueCallback) {
|
|
145
146
|
eventListenerGetValueCallbacks[tag] = saveValueCallback;
|
|
146
147
|
}
|
|
147
|
-
/* $FlowExpectedError[incompatible-
|
|
148
|
+
/* $FlowExpectedError[incompatible-type] - `saveValueCallback` is handled
|
|
148
149
|
differently when `isSingleOpBatching` is enabled. */
|
|
149
150
|
NativeOperations.getValue(tag);
|
|
150
151
|
}
|
|
@@ -240,7 +241,11 @@ const API = {
|
|
|
240
241
|
}) as () => void,
|
|
241
242
|
|
|
242
243
|
createAnimatedNode(tag: number, config: AnimatedNodeConfig): void {
|
|
243
|
-
|
|
244
|
+
if (config.disableBatchingForNativeCreate) {
|
|
245
|
+
NativeAnimatedModule?.createAnimatedNode(tag, config);
|
|
246
|
+
} else {
|
|
247
|
+
NativeOperations.createAnimatedNode(tag, config);
|
|
248
|
+
}
|
|
244
249
|
},
|
|
245
250
|
|
|
246
251
|
updateAnimatedNodeConfig(tag: number, config: AnimatedNodeConfig): void {
|
|
@@ -265,10 +270,12 @@ const API = {
|
|
|
265
270
|
|
|
266
271
|
startAnimatingNode: (isSingleOpBatching
|
|
267
272
|
? (animationId, nodeTag, config, endCallback) => {
|
|
273
|
+
/* $FlowFixMe[constant-condition] Error discovered during Constant
|
|
274
|
+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
|
|
268
275
|
if (endCallback) {
|
|
269
276
|
eventListenerAnimationFinishedCallbacks[animationId] = endCallback;
|
|
270
277
|
}
|
|
271
|
-
/* $FlowExpectedError[incompatible-
|
|
278
|
+
/* $FlowExpectedError[incompatible-type] - `endCallback` is handled
|
|
272
279
|
differently when `isSingleOpBatching` is enabled. */
|
|
273
280
|
NativeOperations.startAnimatingNode(animationId, nodeTag, config);
|
|
274
281
|
}
|
|
@@ -350,6 +357,8 @@ function ensureGlobalEventEmitterListeners() {
|
|
|
350
357
|
params => {
|
|
351
358
|
const {tag} = params;
|
|
352
359
|
const callback = eventListenerGetValueCallbacks[tag];
|
|
360
|
+
/* $FlowFixMe[constant-condition] Error discovered during Constant
|
|
361
|
+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
|
|
353
362
|
if (!callback) {
|
|
354
363
|
return;
|
|
355
364
|
}
|
|
@@ -366,6 +375,8 @@ function ensureGlobalEventEmitterListeners() {
|
|
|
366
375
|
for (const animation of animations) {
|
|
367
376
|
const {animationId} = animation;
|
|
368
377
|
const callback = eventListenerAnimationFinishedCallbacks[animationId];
|
|
378
|
+
/* $FlowFixMe[constant-condition] Error discovered during Constant
|
|
379
|
+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
|
|
369
380
|
if (callback) {
|
|
370
381
|
callback(animation);
|
|
371
382
|
delete eventListenerAnimationFinishedCallbacks[animationId];
|
|
@@ -58,7 +58,6 @@ let globalEventEmitterGetValueListener: ?EventSubscription = null;
|
|
|
58
58
|
let globalEventEmitterAnimationFinishedListener: ?EventSubscription = null;
|
|
59
59
|
|
|
60
60
|
const shouldSignalBatch: boolean =
|
|
61
|
-
ReactNativeFeatureFlags.animatedShouldSignalBatch() ||
|
|
62
61
|
ReactNativeFeatureFlags.cxxNativeAnimatedEnabled();
|
|
63
62
|
|
|
64
63
|
function createNativeOperations(): $NonMaybeType<typeof NativeAnimatedModule> {
|
|
@@ -128,7 +127,7 @@ function createNativeOperations(): $NonMaybeType<typeof NativeAnimatedModule> {
|
|
|
128
127
|
};
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
|
-
// $FlowExpectedError[incompatible-
|
|
130
|
+
// $FlowExpectedError[incompatible-type] - Dynamism.
|
|
132
131
|
return nativeOperations;
|
|
133
132
|
}
|
|
134
133
|
|
|
@@ -141,10 +140,12 @@ const NativeOperations = createNativeOperations();
|
|
|
141
140
|
const API = {
|
|
142
141
|
getValue: (isSingleOpBatching
|
|
143
142
|
? (tag, saveValueCallback) => {
|
|
143
|
+
/* $FlowFixMe[constant-condition] Error discovered during Constant
|
|
144
|
+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
|
|
144
145
|
if (saveValueCallback) {
|
|
145
146
|
eventListenerGetValueCallbacks[tag] = saveValueCallback;
|
|
146
147
|
}
|
|
147
|
-
/* $FlowExpectedError[incompatible-
|
|
148
|
+
/* $FlowExpectedError[incompatible-type] - `saveValueCallback` is handled
|
|
148
149
|
differently when `isSingleOpBatching` is enabled. */
|
|
149
150
|
NativeOperations.getValue(tag);
|
|
150
151
|
}
|
|
@@ -243,7 +244,11 @@ const API = {
|
|
|
243
244
|
}) as () => void,
|
|
244
245
|
|
|
245
246
|
createAnimatedNode(tag: number, config: AnimatedNodeConfig): void {
|
|
246
|
-
|
|
247
|
+
if (config.disableBatchingForNativeCreate) {
|
|
248
|
+
NativeAnimatedModule?.createAnimatedNode(tag, config);
|
|
249
|
+
} else {
|
|
250
|
+
NativeOperations.createAnimatedNode(tag, config);
|
|
251
|
+
}
|
|
247
252
|
},
|
|
248
253
|
|
|
249
254
|
updateAnimatedNodeConfig(tag: number, config: AnimatedNodeConfig): void {
|
|
@@ -268,10 +273,12 @@ const API = {
|
|
|
268
273
|
|
|
269
274
|
startAnimatingNode: (isSingleOpBatching
|
|
270
275
|
? (animationId, nodeTag, config, endCallback) => {
|
|
276
|
+
/* $FlowFixMe[constant-condition] Error discovered during Constant
|
|
277
|
+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
|
|
271
278
|
if (endCallback) {
|
|
272
279
|
eventListenerAnimationFinishedCallbacks[animationId] = endCallback;
|
|
273
280
|
}
|
|
274
|
-
/* $FlowExpectedError[incompatible-
|
|
281
|
+
/* $FlowExpectedError[incompatible-type] - `endCallback` is handled
|
|
275
282
|
differently when `isSingleOpBatching` is enabled. */
|
|
276
283
|
NativeOperations.startAnimatingNode(animationId, nodeTag, config);
|
|
277
284
|
}
|
|
@@ -353,6 +360,8 @@ function ensureGlobalEventEmitterListeners() {
|
|
|
353
360
|
params => {
|
|
354
361
|
const {tag} = params;
|
|
355
362
|
const callback = eventListenerGetValueCallbacks[tag];
|
|
363
|
+
/* $FlowFixMe[constant-condition] Error discovered during Constant
|
|
364
|
+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
|
|
356
365
|
if (!callback) {
|
|
357
366
|
return;
|
|
358
367
|
}
|
|
@@ -369,6 +378,8 @@ function ensureGlobalEventEmitterListeners() {
|
|
|
369
378
|
for (const animation of animations) {
|
|
370
379
|
const {animationId} = animation;
|
|
371
380
|
const callback = eventListenerAnimationFinishedCallbacks[animationId];
|
|
381
|
+
/* $FlowFixMe[constant-condition] Error discovered during Constant
|
|
382
|
+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
|
|
372
383
|
if (callback) {
|
|
373
384
|
callback(animation);
|
|
374
385
|
delete eventListenerAnimationFinishedCallbacks[animationId];
|
|
@@ -67,7 +67,7 @@ export default function createAnimatedPropsHook(
|
|
|
67
67
|
|
|
68
68
|
useEffect(() => {
|
|
69
69
|
// Animated queue flush is handled deterministically in setImmediate for the following feature flags:
|
|
70
|
-
//
|
|
70
|
+
// cxxNativeAnimatedEnabled
|
|
71
71
|
if (!NativeAnimatedHelper.shouldSignalBatch) {
|
|
72
72
|
// If multiple components call `flushQueue`, the first one will flush the
|
|
73
73
|
// queue and subsequent ones will do nothing.
|
|
@@ -89,13 +89,6 @@ export default function createAnimatedPropsHook(
|
|
|
89
89
|
};
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
-
// NOTE: This feature flag must be evaluated inside the hook because this
|
|
93
|
-
// module factory can be evaluated much sooner, before overrides are set.
|
|
94
|
-
const useAnimatedPropsLifecycle =
|
|
95
|
-
ReactNativeFeatureFlags.scheduleAnimatedCleanupInMicrotask()
|
|
96
|
-
? useAnimatedPropsLifecycleWithCleanupInMicrotask
|
|
97
|
-
: useAnimatedPropsLifecycleWithPrevNodeRef;
|
|
98
|
-
|
|
99
92
|
useAnimatedPropsLifecycle(node);
|
|
100
93
|
|
|
101
94
|
// TODO: This "effect" does three things:
|
|
@@ -115,7 +108,7 @@ export default function createAnimatedPropsHook(
|
|
|
115
108
|
(instance: TInstance) => {
|
|
116
109
|
// NOTE: This may be called more often than necessary (e.g. when `props`
|
|
117
110
|
// changes), but `setNativeView` already optimizes for that.
|
|
118
|
-
// $FlowFixMe[incompatible-
|
|
111
|
+
// $FlowFixMe[incompatible-type]
|
|
119
112
|
node.setNativeView(instance);
|
|
120
113
|
|
|
121
114
|
// NOTE: When using the JS animation driver, this callback is called on
|
|
@@ -132,13 +125,11 @@ export default function createAnimatedPropsHook(
|
|
|
132
125
|
if (node.__isNative) {
|
|
133
126
|
// Check 2: this is an animation driven by native.
|
|
134
127
|
// In native driven animations, this callback is only called once the animation completes.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
!(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
)
|
|
141
|
-
) {
|
|
128
|
+
const shouldRemoveJsSync =
|
|
129
|
+
ReactNativeFeatureFlags.cxxNativeAnimatedEnabled() &&
|
|
130
|
+
!ReactNativeFeatureFlags.disableFabricCommitInCXXAnimated() &&
|
|
131
|
+
ReactNativeFeatureFlags.cxxNativeAnimatedRemoveJsSync();
|
|
132
|
+
if (isFabricNode && !shouldRemoveJsSync) {
|
|
142
133
|
// Call `scheduleUpdate` to synchronise Fiber and Shadow tree.
|
|
143
134
|
// Must not be called in Paper.
|
|
144
135
|
scheduleUpdate();
|
|
@@ -156,7 +147,7 @@ export default function createAnimatedPropsHook(
|
|
|
156
147
|
|
|
157
148
|
if (!isFabricNode) {
|
|
158
149
|
// Check 4: this is a paper instance, call setNativeProps.
|
|
159
|
-
// $
|
|
150
|
+
// $FlowFixMe[not-a-function] - Assume it's still a function.
|
|
160
151
|
// $FlowFixMe[incompatible-use]
|
|
161
152
|
return instance.setNativeProps(node.__getAnimatedValue());
|
|
162
153
|
}
|
|
@@ -168,7 +159,7 @@ export default function createAnimatedPropsHook(
|
|
|
168
159
|
|
|
169
160
|
// This is a Fabric instance and setNativeProps is supported.
|
|
170
161
|
|
|
171
|
-
// $
|
|
162
|
+
// $FlowFixMe[not-a-function] - Assume it's still a function.
|
|
172
163
|
// $FlowFixMe[incompatible-use]
|
|
173
164
|
instance.setNativeProps(node.__getAnimatedValue());
|
|
174
165
|
|
|
@@ -197,7 +188,7 @@ export default function createAnimatedPropsHook(
|
|
|
197
188
|
|
|
198
189
|
for (const [propName, propValue] of eventTuples) {
|
|
199
190
|
propValue.__attach(target, propName);
|
|
200
|
-
// $FlowFixMe[incompatible-
|
|
191
|
+
// $FlowFixMe[incompatible-type] - the `addListenersToPropsValue` drills down the propValue.
|
|
201
192
|
addListenersToPropsValue(propValue, animatedValueListeners);
|
|
202
193
|
}
|
|
203
194
|
|
|
@@ -262,44 +253,6 @@ function addAnimatedValuesListenersToProps(
|
|
|
262
253
|
}
|
|
263
254
|
}
|
|
264
255
|
|
|
265
|
-
/**
|
|
266
|
-
* Manages the lifecycle of the supplied `AnimatedProps` by invoking `__attach`
|
|
267
|
-
* and `__detach`. However, this is more complicated because `AnimatedProps`
|
|
268
|
-
* uses reference counting to determine when to recursively detach its children
|
|
269
|
-
* nodes. So in order to optimize this, we avoid detaching until the next attach
|
|
270
|
-
* unless we are unmounting.
|
|
271
|
-
*/
|
|
272
|
-
function useAnimatedPropsLifecycleWithPrevNodeRef(node: AnimatedProps): void {
|
|
273
|
-
const prevNodeRef = useRef<?AnimatedProps>(null);
|
|
274
|
-
const isUnmountingRef = useRef<boolean>(false);
|
|
275
|
-
|
|
276
|
-
useInsertionEffect(() => {
|
|
277
|
-
isUnmountingRef.current = false;
|
|
278
|
-
return () => {
|
|
279
|
-
isUnmountingRef.current = true;
|
|
280
|
-
};
|
|
281
|
-
}, []);
|
|
282
|
-
|
|
283
|
-
useInsertionEffect(() => {
|
|
284
|
-
node.__attach();
|
|
285
|
-
if (prevNodeRef.current != null) {
|
|
286
|
-
const prevNode = prevNodeRef.current;
|
|
287
|
-
// TODO: Stop restoring default values (unless `reset` is called).
|
|
288
|
-
prevNode.__restoreDefaultValues();
|
|
289
|
-
prevNode.__detach();
|
|
290
|
-
prevNodeRef.current = null;
|
|
291
|
-
}
|
|
292
|
-
return () => {
|
|
293
|
-
if (isUnmountingRef.current) {
|
|
294
|
-
// NOTE: Do not restore default values on unmount, see D18197735.
|
|
295
|
-
node.__detach();
|
|
296
|
-
} else {
|
|
297
|
-
prevNodeRef.current = node;
|
|
298
|
-
}
|
|
299
|
-
};
|
|
300
|
-
}, [node]);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
256
|
/**
|
|
304
257
|
* Manages the lifecycle of the supplied `AnimatedProps` by invoking `__attach`
|
|
305
258
|
* and `__detach`. However, `__detach` occurs in a microtask for these reasons:
|
|
@@ -314,9 +267,7 @@ function useAnimatedPropsLifecycleWithPrevNodeRef(node: AnimatedProps): void {
|
|
|
314
267
|
* callbacks may update state, which is unsupported and will force synchronous
|
|
315
268
|
* updates.
|
|
316
269
|
*/
|
|
317
|
-
function
|
|
318
|
-
node: AnimatedProps,
|
|
319
|
-
): void {
|
|
270
|
+
function useAnimatedPropsLifecycle(node: AnimatedProps): void {
|
|
320
271
|
const isMounted = useRef<boolean>(false);
|
|
321
272
|
|
|
322
273
|
useInsertionEffect(() => {
|