@office-iss/react-native-win32 0.82.0 → 0.83.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.
- package/.flowconfig +2 -2
- package/CHANGELOG.json +52 -28
- package/CHANGELOG.md +20 -16
- package/IntegrationTests/ImageCachePolicyTest.js +1 -1
- package/Libraries/Animated/components/AnimatedFlatList.js +5 -3
- package/Libraries/Animated/components/AnimatedImage.js +4 -3
- package/Libraries/Animated/components/AnimatedSectionList.js +2 -2
- package/Libraries/Animated/components/AnimatedText.js +7 -3
- package/Libraries/Animated/components/AnimatedView.js +3 -2
- package/Libraries/Animated/createAnimatedComponent.js +24 -12
- package/Libraries/Animated/nodes/AnimatedColor.js +26 -10
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +43 -15
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +43 -15
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +2 -2
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +2 -2
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +2 -2
- package/Libraries/Components/RefreshControl/RefreshControl.d.ts +3 -3
- package/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +2 -2
- package/Libraries/Components/ScrollView/ScrollView.js +1 -0
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +6 -6
- package/Libraries/Components/Switch/Switch.d.ts +2 -2
- package/Libraries/Components/TextInput/TextInput.d.ts +2 -5
- package/Libraries/Components/TextInput/TextInput.js +6 -0
- package/Libraries/Components/TextInput/TextInput.win32.js +18 -12
- package/Libraries/Components/TextInput/TextInputState.win32.js +2 -2
- package/Libraries/Components/Touchable/TouchableBounce.js +7 -7
- package/Libraries/Components/Touchable/TouchableWin32.js +9 -6
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +19 -1
- package/Libraries/Components/View/View.d.ts +2 -2
- package/Libraries/Components/View/View.win32.js +17 -15
- package/Libraries/Components/View/ViewNativeComponent.js +13 -1
- package/Libraries/Components/View/ViewWin32.d.ts +2 -2
- package/Libraries/Components/View/ViewWin32.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +3 -3
- package/Libraries/Core/setUpPerformance.js +2 -0
- package/Libraries/Debugging/DebuggingOverlay.js +14 -14
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +8 -2
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +5 -2
- package/Libraries/Image/Image.d.ts +3 -3
- package/Libraries/Image/ImageInjection.js +3 -6
- package/Libraries/Image/ImageTypes.flow.js +3 -7
- package/Libraries/Lists/FlatList.js +8 -8
- package/Libraries/Lists/SectionList.d.ts +5 -1
- package/Libraries/Lists/ViewabilityHelper.js +1 -1
- package/Libraries/Lists/VirtualizedList.js +1 -0
- package/Libraries/LogBox/UI/AnsiHighlight.js +4 -1
- package/Libraries/NativeComponent/BaseViewConfig.android.js +11 -2
- package/Libraries/NativeComponent/NativeComponentRegistry.d.ts +98 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +2 -0
- package/Libraries/NativeComponent/NativeComponentRegistryUnstable.js +3 -1
- package/Libraries/Network/RCTNetworking.android.js +3 -1
- package/Libraries/Network/RCTNetworking.ios.js +3 -0
- package/Libraries/Network/RCTNetworking.win32.js +3 -0
- package/Libraries/Network/XMLHttpRequest.js +1 -41
- package/Libraries/Pressability/Pressability.win32.js +5 -5
- package/Libraries/Pressability/usePressability.js +14 -3
- package/Libraries/ReactNative/PaperUIManager.win32.js +7 -7
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +20 -82
- package/Libraries/ReactNative/getNativeComponentAttributes.js +12 -0
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +6759 -4478
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3169 -3119
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4732 -3535
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +6646 -4070
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3136 -2825
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4761 -3312
- package/Libraries/Renderer/shims/ReactNative.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeTypes.js +2 -1
- package/Libraries/Renderer/shims/ReactNativeTypes.win32.js +2 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +44 -0
- package/Libraries/StyleSheet/processBackgroundPosition.js +284 -0
- package/Libraries/StyleSheet/processBackgroundRepeat.js +105 -0
- package/Libraries/StyleSheet/processBackgroundSize.js +104 -0
- package/Libraries/Text/Text.d.ts +2 -2
- package/Libraries/Text/TextNativeComponent.js +10 -0
- package/Libraries/Text/TextNativeComponent.win32.js +10 -0
- package/Libraries/TurboModule/TurboModuleRegistry.js +3 -9
- package/Libraries/Utilities/DevLoadingView.js +14 -6
- package/Libraries/Utilities/FocusManager.win32.js +2 -2
- package/Libraries/Utilities/HMRClient.js +13 -5
- package/flow/bom.js.flow +1 -0
- package/index.js +6 -0
- package/index.win32.js +130 -207
- package/index.win32.js.flow +488 -0
- package/jest/mockComponent.js +6 -6
- package/jest/setup.js +15 -10
- package/overrides.json +16 -10
- package/package.json +39 -26
- package/src/private/components/virtualview/VirtualView.js +22 -27
- package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +6 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +100 -19
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +18 -3
- package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
- package/src/private/specs_DEPRECATED/modules/NativeNetworkingIOS.js +1 -0
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +12 -2
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +76 -15
- package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +1 -0
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
- package/src/private/webapis/performance/ResourceTiming.js +31 -4
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +4 -1
- package/src/private/webapis/performance/specs/NativePerformance.js +3 -0
- package/src-win/Libraries/Components/Touchable/TouchableWin32.tsx +6 -3
- package/src-win/Libraries/Components/View/ViewWin32.d.ts +2 -2
- package/src-win/Libraries/Text/Text.d.ts +2 -2
- package/src-win/index.win32.js.flow +488 -0
- package/types/index.d.ts +1 -0
- package/types/public/ReactNativeTypes.d.ts +115 -2
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +0 -152
package/.flowconfig
CHANGED
|
@@ -144,7 +144,7 @@ module.name_mapper='^@office-iss/react-native-win32$' -> '<PROJECT_ROOT>/index.w
|
|
|
144
144
|
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/\1'
|
|
145
145
|
module.name_mapper='^@office-iss/react-native-win32/\(.*\)$' -> '<PROJECT_ROOT>\/1'
|
|
146
146
|
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/\1'
|
|
147
|
-
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\)$' -> '<PROJECT_ROOT>/Libraries/Image/RelativeImageStub'
|
|
147
|
+
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\|ktx\)$' -> '<PROJECT_ROOT>/Libraries/Image/RelativeImageStub'
|
|
148
148
|
|
|
149
149
|
module.system.haste.module_ref_prefix=m#
|
|
150
150
|
|
|
@@ -175,4 +175,4 @@ untyped-import
|
|
|
175
175
|
untyped-type-import
|
|
176
176
|
|
|
177
177
|
[version]
|
|
178
|
-
^0.
|
|
178
|
+
^0.289.0
|
package/CHANGELOG.json
CHANGED
|
@@ -2,73 +2,97 @@
|
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Thu,
|
|
6
|
-
"version": "0.
|
|
7
|
-
"tag": "@office-iss/react-native-win32_v0.
|
|
5
|
+
"date": "Thu, 26 Mar 2026 12:02:27 GMT",
|
|
6
|
+
"version": "0.83.0-preview.1",
|
|
7
|
+
"tag": "@office-iss/react-native-win32_v0.83.0-preview.1",
|
|
8
8
|
"comments": {
|
|
9
|
-
"
|
|
9
|
+
"prerelease": [
|
|
10
10
|
{
|
|
11
|
-
"author": "
|
|
11
|
+
"author": "protikbiswas@microsoft.com",
|
|
12
12
|
"package": "@office-iss/react-native-win32",
|
|
13
|
-
"commit": "
|
|
14
|
-
"comment": "Promote 0.
|
|
13
|
+
"commit": "b3b48d21776b189c66ab6ef77f0a48a9a3781b75",
|
|
14
|
+
"comment": "Promote 0.83 to preview"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"author": "beachball",
|
|
18
18
|
"package": "@office-iss/react-native-win32",
|
|
19
|
-
"comment": "Bump react-native-platform-override to v0.
|
|
19
|
+
"comment": "Bump react-native-platform-override to v0.83.0-preview.1",
|
|
20
20
|
"commit": "not available"
|
|
21
21
|
}
|
|
22
22
|
]
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
"date": "
|
|
27
|
-
"version": "0.
|
|
28
|
-
"tag": "@office-iss/react-native-win32_v0.
|
|
26
|
+
"date": "Wed, 11 Mar 2026 03:08:37 GMT",
|
|
27
|
+
"version": "0.0.0-canary.308",
|
|
28
|
+
"tag": "@office-iss/react-native-win32_v0.0.0-canary.308",
|
|
29
29
|
"comments": {
|
|
30
30
|
"prerelease": [
|
|
31
31
|
{
|
|
32
32
|
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
33
33
|
"package": "@office-iss/react-native-win32",
|
|
34
|
-
"commit": "
|
|
35
|
-
"comment": "
|
|
34
|
+
"commit": "8fb1889b612c06cab43d39c9c05950524655750c",
|
|
35
|
+
"comment": "Update require's from TouchableWin32 to be imports"
|
|
36
36
|
}
|
|
37
37
|
]
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
|
-
"date": "Sat,
|
|
42
|
-
"version": "0.
|
|
43
|
-
"tag": "@office-iss/react-native-win32_v0.
|
|
41
|
+
"date": "Sat, 07 Mar 2026 04:06:59 GMT",
|
|
42
|
+
"version": "0.0.0-canary.307",
|
|
43
|
+
"tag": "@office-iss/react-native-win32_v0.0.0-canary.307",
|
|
44
44
|
"comments": {
|
|
45
45
|
"prerelease": [
|
|
46
46
|
{
|
|
47
|
-
"author": "
|
|
47
|
+
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
48
48
|
"package": "@office-iss/react-native-win32",
|
|
49
|
-
"commit": "
|
|
50
|
-
"comment": "
|
|
49
|
+
"commit": "a0e5dd17f852aca8dd005cb75b6cc2294d411bbd",
|
|
50
|
+
"comment": "Fix images not showing in test app"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"author": "66076509+vineethkuttan@users.noreply.github.com",
|
|
54
|
+
"package": "@office-iss/react-native-win32",
|
|
55
|
+
"commit": "a0e5dd17f852aca8dd005cb75b6cc2294d411bbd",
|
|
56
|
+
"comment": "Integrate 0.83.0-nightly-20251104-502efe1cc"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"author": "beachball",
|
|
60
|
+
"package": "@office-iss/react-native-win32",
|
|
61
|
+
"comment": "Bump react-native-platform-override to v0.0.0-canary.1020",
|
|
62
|
+
"commit": "not available"
|
|
51
63
|
}
|
|
52
64
|
]
|
|
53
65
|
}
|
|
54
66
|
},
|
|
55
67
|
{
|
|
56
|
-
"date": "Wed,
|
|
57
|
-
"version": "0.
|
|
58
|
-
"tag": "@office-iss/react-native-win32_v0.
|
|
68
|
+
"date": "Wed, 04 Mar 2026 22:34:24 GMT",
|
|
69
|
+
"version": "0.0.0-canary.306",
|
|
70
|
+
"tag": "@office-iss/react-native-win32_v0.0.0-canary.306",
|
|
59
71
|
"comments": {
|
|
60
72
|
"prerelease": [
|
|
61
73
|
{
|
|
62
|
-
"author": "
|
|
74
|
+
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
63
75
|
"package": "@office-iss/react-native-win32",
|
|
64
|
-
"commit": "
|
|
65
|
-
"comment": "
|
|
76
|
+
"commit": "25db080987460d9b4b5f145aeffc5b4b0a669a72",
|
|
77
|
+
"comment": "Fix TextWin32 export"
|
|
66
78
|
},
|
|
67
79
|
{
|
|
68
|
-
"author": "
|
|
80
|
+
"author": "66076509+vineethkuttan@users.noreply.github.com",
|
|
69
81
|
"package": "@office-iss/react-native-win32",
|
|
70
|
-
"
|
|
71
|
-
"
|
|
82
|
+
"commit": "9a59a5e833886b5d9bdccb1bf20f99a35d7500bc",
|
|
83
|
+
"comment": "Integrate 0.83.0-nightly-20250917-18cb4edfa"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
87
|
+
"package": "@office-iss/react-native-win32",
|
|
88
|
+
"commit": "e2dc99a36053b8bbc04be9f613e33f3f7efb4cc4",
|
|
89
|
+
"comment": "Fix TouchableWin32 and LogBox"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"author": "66076509+vineethkuttan@users.noreply.github.com",
|
|
93
|
+
"package": "@office-iss/react-native-win32",
|
|
94
|
+
"commit": "9cc99209e10b79a9b5223465538f81c3954bec4e",
|
|
95
|
+
"comment": "Integrate 0.83.0-nightly-20251012-6f482708b"
|
|
72
96
|
}
|
|
73
97
|
]
|
|
74
98
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,42 +1,46 @@
|
|
|
1
1
|
# Change Log - @office-iss/react-native-win32
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on Thu,
|
|
3
|
+
<!-- This log was last generated on Thu, 26 Mar 2026 12:02:27 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.
|
|
7
|
+
## 0.83.0-preview.1
|
|
8
8
|
|
|
9
|
-
Thu,
|
|
9
|
+
Thu, 26 Mar 2026 12:02:27 GMT
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Changes
|
|
12
12
|
|
|
13
|
-
- Promote 0.
|
|
14
|
-
- Bump react-native-platform-override to v0.
|
|
13
|
+
- Promote 0.83 to preview (protikbiswas@microsoft.com)
|
|
14
|
+
- Bump react-native-platform-override to v0.83.0-preview.1
|
|
15
15
|
|
|
16
|
-
## 0.
|
|
16
|
+
## 0.0.0-canary.308
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Wed, 11 Mar 2026 03:08:37 GMT
|
|
19
19
|
|
|
20
20
|
### Changes
|
|
21
21
|
|
|
22
|
-
-
|
|
22
|
+
- Update require's from TouchableWin32 to be imports (30809111+acoates-ms@users.noreply.github.com)
|
|
23
23
|
|
|
24
|
-
## 0.
|
|
24
|
+
## 0.0.0-canary.307
|
|
25
25
|
|
|
26
|
-
Sat,
|
|
26
|
+
Sat, 07 Mar 2026 04:06:59 GMT
|
|
27
27
|
|
|
28
28
|
### Changes
|
|
29
29
|
|
|
30
|
-
-
|
|
30
|
+
- Fix images not showing in test app (30809111+acoates-ms@users.noreply.github.com)
|
|
31
|
+
- Integrate 0.83.0-nightly-20251104-502efe1cc (66076509+vineethkuttan@users.noreply.github.com)
|
|
32
|
+
- Bump react-native-platform-override to v0.0.0-canary.1020
|
|
31
33
|
|
|
32
|
-
## 0.
|
|
34
|
+
## 0.0.0-canary.306
|
|
33
35
|
|
|
34
|
-
Wed,
|
|
36
|
+
Wed, 04 Mar 2026 22:34:24 GMT
|
|
35
37
|
|
|
36
38
|
### Changes
|
|
37
39
|
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
+
- Fix TextWin32 export (30809111+acoates-ms@users.noreply.github.com)
|
|
41
|
+
- Integrate 0.83.0-nightly-20250917-18cb4edfa (66076509+vineethkuttan@users.noreply.github.com)
|
|
42
|
+
- Fix TouchableWin32 and LogBox (30809111+acoates-ms@users.noreply.github.com)
|
|
43
|
+
- Integrate 0.83.0-nightly-20251012-6f482708b (66076509+vineethkuttan@users.noreply.github.com)
|
|
40
44
|
|
|
41
45
|
## 0.0.0-canary.305
|
|
42
46
|
|
|
@@ -31,7 +31,7 @@ const {TestModule} = NativeModules;
|
|
|
31
31
|
const TESTS = ['only-if-cached', 'default', 'reload', 'force-cache'] as const;
|
|
32
32
|
|
|
33
33
|
function ImageCachePolicyTest(): React.Node {
|
|
34
|
-
const [state, setState] = useState({
|
|
34
|
+
const [state, setState] = useState<{[string]: ?boolean}>({
|
|
35
35
|
'only-if-cached': undefined,
|
|
36
36
|
default: undefined,
|
|
37
37
|
reload: undefined,
|
|
@@ -14,8 +14,10 @@ import FlatList, {type FlatListProps} from '../../Lists/FlatList';
|
|
|
14
14
|
import createAnimatedComponent from '../createAnimatedComponent';
|
|
15
15
|
import * as React from 'react';
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
export default createAnimatedComponent(FlatList) as $FlowFixMe as component<
|
|
18
|
+
// $FlowExpectedError[unclear-type]
|
|
19
|
+
ItemT = any,
|
|
20
|
+
>(
|
|
19
21
|
ref?: React.RefSetter<FlatList<ItemT>>,
|
|
20
22
|
...props: AnimatedProps<FlatListProps<ItemT>>
|
|
21
|
-
)
|
|
23
|
+
);
|
|
@@ -14,9 +14,10 @@ import Image from '../../Image/Image';
|
|
|
14
14
|
import createAnimatedComponent from '../createAnimatedComponent';
|
|
15
15
|
import * as React from 'react';
|
|
16
16
|
|
|
17
|
-
export default (createAnimatedComponent
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
export default (createAnimatedComponent<
|
|
18
|
+
$FlowFixMe,
|
|
19
|
+
React.ElementRef<typeof Image>,
|
|
20
|
+
>((Image: $FlowFixMe)): AnimatedComponentType<
|
|
20
21
|
React.ElementConfig<typeof Image>,
|
|
21
22
|
React.ElementRef<typeof Image>,
|
|
22
23
|
>);
|
|
@@ -15,7 +15,7 @@ import createAnimatedComponent from '../createAnimatedComponent';
|
|
|
15
15
|
import * as React from 'react';
|
|
16
16
|
|
|
17
17
|
// $FlowFixMe[incompatible-type]
|
|
18
|
-
export default
|
|
18
|
+
export default createAnimatedComponent(SectionList) as $FlowFixMe as component<
|
|
19
19
|
// $FlowExpectedError[unclear-type]
|
|
20
20
|
ItemT = any,
|
|
21
21
|
// $FlowExpectedError[unclear-type]
|
|
@@ -23,4 +23,4 @@ export default (createAnimatedComponent(SectionList): component<
|
|
|
23
23
|
>(
|
|
24
24
|
ref?: React.RefSetter<SectionList<ItemT, SectionT>>,
|
|
25
25
|
...props: AnimatedProps<SectionListProps<ItemT, SectionT>>
|
|
26
|
-
)
|
|
26
|
+
);
|
|
@@ -14,6 +14,10 @@ import Text, {type TextProps} from '../../Text/Text';
|
|
|
14
14
|
import createAnimatedComponent from '../createAnimatedComponent';
|
|
15
15
|
import * as React from 'react';
|
|
16
16
|
|
|
17
|
-
export default (createAnimatedComponent
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
export default (createAnimatedComponent<
|
|
18
|
+
$FlowFixMe,
|
|
19
|
+
React.ElementRef<typeof Text>,
|
|
20
|
+
>((Text: $FlowFixMe)): AnimatedComponentType<
|
|
21
|
+
TextProps,
|
|
22
|
+
React.ElementRef<typeof Text>,
|
|
23
|
+
>);
|
|
@@ -15,7 +15,8 @@ import View from '../../Components/View/View';
|
|
|
15
15
|
import createAnimatedComponent from '../createAnimatedComponent';
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
// $FlowFixMe[incompatible-type]
|
|
19
|
+
export default createAnimatedComponent(View) as AnimatedComponentType<
|
|
19
20
|
ViewProps,
|
|
20
21
|
React.ElementRef<typeof View>,
|
|
21
|
-
|
|
22
|
+
>;
|
|
@@ -63,17 +63,29 @@ type PassThroughProps = $ReadOnly<{
|
|
|
63
63
|
passthroughAnimatedPropExplicitValues?: ViewProps | null,
|
|
64
64
|
}>;
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
66
|
+
type LooseOmit<O: interface {}, K: $Keys<$FlowFixMe>> = Pick<
|
|
67
|
+
O,
|
|
68
|
+
Exclude<$Keys<O>, K>,
|
|
69
|
+
>;
|
|
70
|
+
|
|
71
|
+
export type AnimatedProps<Props: {...}> = LooseOmit<
|
|
72
|
+
{
|
|
73
|
+
[K in keyof Props]: K extends NonAnimatedProps
|
|
74
|
+
? Props[K]
|
|
75
|
+
: WithAnimatedValue<Props[K]>,
|
|
76
|
+
},
|
|
77
|
+
'ref',
|
|
78
|
+
> &
|
|
79
|
+
PassThroughProps;
|
|
80
|
+
|
|
81
|
+
export type AnimatedBaseProps<Props: {...}> = LooseOmit<
|
|
82
|
+
{
|
|
83
|
+
[K in keyof Props]: K extends NonAnimatedProps
|
|
84
|
+
? Props[K]
|
|
85
|
+
: WithAnimatedValue<Props[K]>,
|
|
86
|
+
},
|
|
87
|
+
'ref',
|
|
88
|
+
>;
|
|
77
89
|
|
|
78
90
|
export type AnimatedComponentType<Props: {...}, +Instance = mixed> = component(
|
|
79
91
|
ref?: React.RefSetter<Instance>,
|
|
@@ -85,7 +97,7 @@ export default function createAnimatedComponent<
|
|
|
85
97
|
>(
|
|
86
98
|
Component: TInstance,
|
|
87
99
|
): AnimatedComponentType<
|
|
88
|
-
$ReadOnly<React.
|
|
100
|
+
$ReadOnly<React.ElementConfig<TInstance>>,
|
|
89
101
|
React.ElementRef<TInstance>,
|
|
90
102
|
> {
|
|
91
103
|
return unstable_createAnimatedComponentWithAllowlist(Component, null);
|
|
@@ -110,6 +110,27 @@ function isRgbaAnimatedValue(value: any): boolean {
|
|
|
110
110
|
);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
export function getRgbaValueAndNativeColor(
|
|
114
|
+
value: RgbaValue | ColorValue,
|
|
115
|
+
): $ReadOnly<{
|
|
116
|
+
rgbaValue: RgbaValue,
|
|
117
|
+
nativeColor?: NativeColorValue,
|
|
118
|
+
}> {
|
|
119
|
+
const processedColor: RgbaValue | NativeColorValue =
|
|
120
|
+
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
121
|
+
processColor((value: ColorValue | RgbaValue)) ?? defaultColor;
|
|
122
|
+
if (isRgbaValue(processedColor)) {
|
|
123
|
+
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
124
|
+
return {rgbaValue: (processedColor: RgbaValue)};
|
|
125
|
+
} else {
|
|
126
|
+
return {
|
|
127
|
+
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
128
|
+
nativeColor: (processedColor: NativeColorValue),
|
|
129
|
+
rgbaValue: defaultColor,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
113
134
|
export default class AnimatedColor extends AnimatedWithChildren {
|
|
114
135
|
r: AnimatedValue;
|
|
115
136
|
g: AnimatedValue;
|
|
@@ -132,18 +153,13 @@ export default class AnimatedColor extends AnimatedWithChildren {
|
|
|
132
153
|
this.b = rgbaAnimatedValue.b;
|
|
133
154
|
this.a = rgbaAnimatedValue.a;
|
|
134
155
|
} else {
|
|
135
|
-
const
|
|
136
|
-
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
137
|
-
processColor((value: ColorValue | RgbaValue)) ?? defaultColor;
|
|
138
|
-
let initColor: RgbaValue = defaultColor;
|
|
139
|
-
if (isRgbaValue(processedColor)) {
|
|
156
|
+
const {rgbaValue: initColor, nativeColor} = getRgbaValueAndNativeColor(
|
|
140
157
|
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
this.nativeColor =
|
|
158
|
+
(value: ColorValue | RgbaValue),
|
|
159
|
+
);
|
|
160
|
+
if (nativeColor) {
|
|
161
|
+
this.nativeColor = nativeColor;
|
|
145
162
|
}
|
|
146
|
-
|
|
147
163
|
this.r = new AnimatedValue(initColor.r);
|
|
148
164
|
this.g = new AnimatedValue(initColor.g);
|
|
149
165
|
this.b = new AnimatedValue(initColor.b);
|
|
@@ -99,7 +99,7 @@ const AccessibilityInfo = {
|
|
|
99
99
|
reject,
|
|
100
100
|
);
|
|
101
101
|
} else {
|
|
102
|
-
reject(
|
|
102
|
+
reject(new Error('NativeAccessibilityManagerIOS is not available'));
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
105
|
}
|
|
@@ -119,7 +119,11 @@ const AccessibilityInfo = {
|
|
|
119
119
|
if (NativeAccessibilityInfoAndroid?.isGrayscaleEnabled != null) {
|
|
120
120
|
NativeAccessibilityInfoAndroid.isGrayscaleEnabled(resolve);
|
|
121
121
|
} else {
|
|
122
|
-
reject(
|
|
122
|
+
reject(
|
|
123
|
+
new Error(
|
|
124
|
+
'NativeAccessibilityInfoAndroid.isGrayscaleEnabled is not available',
|
|
125
|
+
),
|
|
126
|
+
);
|
|
123
127
|
}
|
|
124
128
|
});
|
|
125
129
|
} else {
|
|
@@ -130,7 +134,7 @@ const AccessibilityInfo = {
|
|
|
130
134
|
reject,
|
|
131
135
|
);
|
|
132
136
|
} else {
|
|
133
|
-
reject(
|
|
137
|
+
reject(new Error('AccessibilityInfo native module is not available'));
|
|
134
138
|
}
|
|
135
139
|
});
|
|
136
140
|
}
|
|
@@ -150,7 +154,11 @@ const AccessibilityInfo = {
|
|
|
150
154
|
if (NativeAccessibilityInfoAndroid?.isInvertColorsEnabled != null) {
|
|
151
155
|
NativeAccessibilityInfoAndroid.isInvertColorsEnabled(resolve);
|
|
152
156
|
} else {
|
|
153
|
-
reject(
|
|
157
|
+
reject(
|
|
158
|
+
new Error(
|
|
159
|
+
'NativeAccessibilityInfoAndroid.isInvertColorsEnabled is not available',
|
|
160
|
+
),
|
|
161
|
+
);
|
|
154
162
|
}
|
|
155
163
|
});
|
|
156
164
|
} else {
|
|
@@ -161,7 +169,7 @@ const AccessibilityInfo = {
|
|
|
161
169
|
reject,
|
|
162
170
|
);
|
|
163
171
|
} else {
|
|
164
|
-
reject(
|
|
172
|
+
reject(new Error('AccessibilityInfo native module is not available'));
|
|
165
173
|
}
|
|
166
174
|
});
|
|
167
175
|
}
|
|
@@ -181,7 +189,7 @@ const AccessibilityInfo = {
|
|
|
181
189
|
if (NativeAccessibilityInfoAndroid != null) {
|
|
182
190
|
NativeAccessibilityInfoAndroid.isReduceMotionEnabled(resolve);
|
|
183
191
|
} else {
|
|
184
|
-
reject(
|
|
192
|
+
reject(new Error('AccessibilityInfo native module is not available'));
|
|
185
193
|
}
|
|
186
194
|
} else {
|
|
187
195
|
if (NativeAccessibilityManagerIOS != null) {
|
|
@@ -190,7 +198,7 @@ const AccessibilityInfo = {
|
|
|
190
198
|
reject,
|
|
191
199
|
);
|
|
192
200
|
} else {
|
|
193
|
-
reject(
|
|
201
|
+
reject(new Error('NativeAccessibilityManagerIOS is not available'));
|
|
194
202
|
}
|
|
195
203
|
}
|
|
196
204
|
});
|
|
@@ -208,7 +216,11 @@ const AccessibilityInfo = {
|
|
|
208
216
|
if (NativeAccessibilityInfoAndroid?.isHighTextContrastEnabled != null) {
|
|
209
217
|
NativeAccessibilityInfoAndroid.isHighTextContrastEnabled(resolve);
|
|
210
218
|
} else {
|
|
211
|
-
reject(
|
|
219
|
+
reject(
|
|
220
|
+
new Error(
|
|
221
|
+
'NativeAccessibilityInfoAndroid.isHighTextContrastEnabled is not available',
|
|
222
|
+
),
|
|
223
|
+
);
|
|
212
224
|
}
|
|
213
225
|
} else {
|
|
214
226
|
return Promise.resolve(false);
|
|
@@ -236,7 +248,11 @@ const AccessibilityInfo = {
|
|
|
236
248
|
reject,
|
|
237
249
|
);
|
|
238
250
|
} else {
|
|
239
|
-
reject(
|
|
251
|
+
reject(
|
|
252
|
+
new Error(
|
|
253
|
+
'NativeAccessibilityManagerIOS.getCurrentDarkerSystemColorsState is not available',
|
|
254
|
+
),
|
|
255
|
+
);
|
|
240
256
|
}
|
|
241
257
|
}
|
|
242
258
|
});
|
|
@@ -264,7 +280,11 @@ const AccessibilityInfo = {
|
|
|
264
280
|
reject,
|
|
265
281
|
);
|
|
266
282
|
} else {
|
|
267
|
-
reject(
|
|
283
|
+
reject(
|
|
284
|
+
new Error(
|
|
285
|
+
'NativeAccessibilityManagerIOS.getCurrentPrefersCrossFadeTransitionsState is not available',
|
|
286
|
+
),
|
|
287
|
+
);
|
|
268
288
|
}
|
|
269
289
|
}
|
|
270
290
|
});
|
|
@@ -289,7 +309,7 @@ const AccessibilityInfo = {
|
|
|
289
309
|
reject,
|
|
290
310
|
);
|
|
291
311
|
} else {
|
|
292
|
-
reject(
|
|
312
|
+
reject(new Error('NativeAccessibilityManagerIOS is not available'));
|
|
293
313
|
}
|
|
294
314
|
});
|
|
295
315
|
}
|
|
@@ -309,7 +329,7 @@ const AccessibilityInfo = {
|
|
|
309
329
|
if (NativeAccessibilityInfoAndroid != null) {
|
|
310
330
|
NativeAccessibilityInfoAndroid.isTouchExplorationEnabled(resolve);
|
|
311
331
|
} else {
|
|
312
|
-
reject(
|
|
332
|
+
reject(new Error('NativeAccessibilityInfoAndroid is not available'));
|
|
313
333
|
}
|
|
314
334
|
} else {
|
|
315
335
|
if (NativeAccessibilityManagerIOS != null) {
|
|
@@ -318,7 +338,7 @@ const AccessibilityInfo = {
|
|
|
318
338
|
reject,
|
|
319
339
|
);
|
|
320
340
|
} else {
|
|
321
|
-
reject(
|
|
341
|
+
reject(new Error('NativeAccessibilityManagerIOS is not available'));
|
|
322
342
|
}
|
|
323
343
|
}
|
|
324
344
|
});
|
|
@@ -343,10 +363,18 @@ const AccessibilityInfo = {
|
|
|
343
363
|
) {
|
|
344
364
|
NativeAccessibilityInfoAndroid.isAccessibilityServiceEnabled(resolve);
|
|
345
365
|
} else {
|
|
346
|
-
reject(
|
|
366
|
+
reject(
|
|
367
|
+
new Error(
|
|
368
|
+
'NativeAccessibilityInfoAndroid.isAccessibilityServiceEnabled is not available',
|
|
369
|
+
),
|
|
370
|
+
);
|
|
347
371
|
}
|
|
348
372
|
} else {
|
|
349
|
-
reject(
|
|
373
|
+
reject(
|
|
374
|
+
new Error(
|
|
375
|
+
'isAccessibilityServiceEnabled is only available on Android',
|
|
376
|
+
),
|
|
377
|
+
);
|
|
350
378
|
}
|
|
351
379
|
});
|
|
352
380
|
},
|