@office-iss/react-native-win32 0.82.0 → 0.83.0-preview.0

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 (109) hide show
  1. package/.flowconfig +2 -2
  2. package/CHANGELOG.json +43 -40
  3. package/CHANGELOG.md +15 -20
  4. package/IntegrationTests/ImageCachePolicyTest.js +1 -1
  5. package/Libraries/Animated/components/AnimatedFlatList.js +5 -3
  6. package/Libraries/Animated/components/AnimatedImage.js +4 -3
  7. package/Libraries/Animated/components/AnimatedSectionList.js +2 -2
  8. package/Libraries/Animated/components/AnimatedText.js +7 -3
  9. package/Libraries/Animated/components/AnimatedView.js +3 -2
  10. package/Libraries/Animated/createAnimatedComponent.js +24 -12
  11. package/Libraries/Animated/nodes/AnimatedColor.js +26 -10
  12. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +43 -15
  13. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +43 -15
  14. package/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +2 -2
  15. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +2 -2
  16. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +2 -2
  17. package/Libraries/Components/RefreshControl/RefreshControl.d.ts +3 -3
  18. package/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +2 -2
  19. package/Libraries/Components/ScrollView/ScrollView.js +1 -0
  20. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +6 -6
  21. package/Libraries/Components/Switch/Switch.d.ts +2 -2
  22. package/Libraries/Components/TextInput/TextInput.d.ts +2 -5
  23. package/Libraries/Components/TextInput/TextInput.js +6 -0
  24. package/Libraries/Components/TextInput/TextInput.win32.js +18 -12
  25. package/Libraries/Components/TextInput/TextInputState.win32.js +2 -2
  26. package/Libraries/Components/Touchable/TouchableBounce.js +7 -7
  27. package/Libraries/Components/Touchable/TouchableWin32.js +9 -6
  28. package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
  29. package/Libraries/Components/View/ReactNativeStyleAttributes.js +19 -1
  30. package/Libraries/Components/View/View.d.ts +2 -2
  31. package/Libraries/Components/View/View.win32.js +17 -15
  32. package/Libraries/Components/View/ViewNativeComponent.js +13 -1
  33. package/Libraries/Components/View/ViewWin32.d.ts +2 -2
  34. package/Libraries/Components/View/ViewWin32.js +1 -1
  35. package/Libraries/Core/ReactNativeVersion.js +3 -3
  36. package/Libraries/Core/setUpPerformance.js +2 -0
  37. package/Libraries/Debugging/DebuggingOverlay.js +14 -14
  38. package/Libraries/Debugging/DebuggingOverlayRegistry.js +8 -2
  39. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +5 -2
  40. package/Libraries/Image/Image.d.ts +3 -3
  41. package/Libraries/Image/ImageInjection.js +3 -6
  42. package/Libraries/Image/ImageTypes.flow.js +3 -7
  43. package/Libraries/Lists/FlatList.js +8 -8
  44. package/Libraries/Lists/SectionList.d.ts +5 -1
  45. package/Libraries/Lists/ViewabilityHelper.js +1 -1
  46. package/Libraries/Lists/VirtualizedList.js +1 -0
  47. package/Libraries/LogBox/UI/AnsiHighlight.js +4 -1
  48. package/Libraries/NativeComponent/BaseViewConfig.android.js +11 -2
  49. package/Libraries/NativeComponent/NativeComponentRegistry.d.ts +98 -0
  50. package/Libraries/NativeComponent/NativeComponentRegistry.js +2 -0
  51. package/Libraries/NativeComponent/NativeComponentRegistryUnstable.js +3 -1
  52. package/Libraries/Network/RCTNetworking.android.js +3 -1
  53. package/Libraries/Network/RCTNetworking.ios.js +3 -0
  54. package/Libraries/Network/RCTNetworking.win32.js +3 -0
  55. package/Libraries/Network/XMLHttpRequest.js +1 -41
  56. package/Libraries/Pressability/Pressability.win32.js +5 -5
  57. package/Libraries/Pressability/usePressability.js +14 -3
  58. package/Libraries/ReactNative/PaperUIManager.win32.js +7 -7
  59. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +20 -82
  60. package/Libraries/ReactNative/getNativeComponentAttributes.js +12 -0
  61. package/Libraries/Renderer/implementations/ReactFabric-dev.js +6759 -4478
  62. package/Libraries/Renderer/implementations/ReactFabric-prod.js +3169 -3119
  63. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4732 -3535
  64. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +6646 -4070
  65. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3136 -2825
  66. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4761 -3312
  67. package/Libraries/Renderer/shims/ReactNative.js +3 -1
  68. package/Libraries/Renderer/shims/ReactNativeTypes.js +2 -1
  69. package/Libraries/Renderer/shims/ReactNativeTypes.win32.js +2 -1
  70. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
  71. package/Libraries/StyleSheet/StyleSheetTypes.js +44 -0
  72. package/Libraries/StyleSheet/processBackgroundPosition.js +284 -0
  73. package/Libraries/StyleSheet/processBackgroundRepeat.js +105 -0
  74. package/Libraries/StyleSheet/processBackgroundSize.js +104 -0
  75. package/Libraries/Text/Text.d.ts +2 -2
  76. package/Libraries/Text/TextNativeComponent.js +10 -0
  77. package/Libraries/Text/TextNativeComponent.win32.js +10 -0
  78. package/Libraries/TurboModule/TurboModuleRegistry.js +3 -9
  79. package/Libraries/Utilities/DevLoadingView.js +14 -6
  80. package/Libraries/Utilities/FocusManager.win32.js +2 -2
  81. package/Libraries/Utilities/HMRClient.js +13 -5
  82. package/flow/bom.js.flow +1 -0
  83. package/index.js +6 -0
  84. package/index.win32.js +130 -207
  85. package/index.win32.js.flow +488 -0
  86. package/jest/mockComponent.js +6 -6
  87. package/jest/setup.js +15 -10
  88. package/overrides.json +16 -10
  89. package/package.json +39 -26
  90. package/src/private/components/virtualview/VirtualView.js +22 -27
  91. package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +6 -0
  92. package/src/private/featureflags/ReactNativeFeatureFlags.js +100 -19
  93. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +18 -3
  94. package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
  95. package/src/private/specs_DEPRECATED/modules/NativeNetworkingIOS.js +1 -0
  96. package/src/private/webapis/dom/nodes/ReactNativeElement.js +12 -2
  97. package/src/private/webapis/intersectionobserver/IntersectionObserver.js +76 -15
  98. package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +1 -0
  99. package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
  100. package/src/private/webapis/performance/ResourceTiming.js +31 -4
  101. package/src/private/webapis/performance/internals/RawPerformanceEntry.js +4 -1
  102. package/src/private/webapis/performance/specs/NativePerformance.js +3 -0
  103. package/src-win/Libraries/Components/Touchable/TouchableWin32.tsx +6 -3
  104. package/src-win/Libraries/Components/View/ViewWin32.d.ts +2 -2
  105. package/src-win/Libraries/Text/Text.d.ts +2 -2
  106. package/src-win/index.win32.js.flow +488 -0
  107. package/types/index.d.ts +1 -0
  108. package/types/public/ReactNativeTypes.d.ts +115 -2
  109. 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.280.0
178
+ ^0.289.0
package/CHANGELOG.json CHANGED
@@ -2,73 +2,76 @@
2
2
  "name": "@office-iss/react-native-win32",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 12 Mar 2026 14:15:44 GMT",
6
- "version": "0.82.0",
7
- "tag": "@office-iss/react-native-win32_v0.82.0",
5
+ "date": "Wed, 11 Mar 2026 03:08:37 GMT",
6
+ "version": "0.0.0-canary.308",
7
+ "tag": "@office-iss/react-native-win32_v0.0.0-canary.308",
8
8
  "comments": {
9
- "patch": [
10
- {
11
- "author": "74712637+iamAbhi-916@users.noreply.github.com",
12
- "package": "@office-iss/react-native-win32",
13
- "commit": "b550ed8512916d3f58fc43e314f25aef5118605e",
14
- "comment": "Promote 0.82 to latest"
15
- },
9
+ "prerelease": [
16
10
  {
17
- "author": "beachball",
11
+ "author": "30809111+acoates-ms@users.noreply.github.com",
18
12
  "package": "@office-iss/react-native-win32",
19
- "comment": "Bump react-native-platform-override to v0.82.0",
20
- "commit": "not available"
13
+ "commit": "8fb1889b612c06cab43d39c9c05950524655750c",
14
+ "comment": "Update require's from TouchableWin32 to be imports"
21
15
  }
22
16
  ]
23
17
  }
24
18
  },
25
19
  {
26
- "date": "Tue, 27 Jan 2026 19:51:45 GMT",
27
- "version": "0.82.0-preview.3",
28
- "tag": "@office-iss/react-native-win32_v0.82.0-preview.3",
20
+ "date": "Sat, 07 Mar 2026 04:06:59 GMT",
21
+ "version": "0.0.0-canary.307",
22
+ "tag": "@office-iss/react-native-win32_v0.0.0-canary.307",
29
23
  "comments": {
30
24
  "prerelease": [
31
25
  {
32
26
  "author": "30809111+acoates-ms@users.noreply.github.com",
33
27
  "package": "@office-iss/react-native-win32",
34
- "commit": "457a9edc7fc189514b7ac1129911b3deceb0fce8",
35
- "comment": "Fix TouchableWin32 and LogBox"
36
- }
37
- ]
38
- }
39
- },
40
- {
41
- "date": "Sat, 24 Jan 2026 16:43:28 GMT",
42
- "version": "0.82.0-preview.2",
43
- "tag": "@office-iss/react-native-win32_v0.82.0-preview.2",
44
- "comments": {
45
- "prerelease": [
28
+ "commit": "a0e5dd17f852aca8dd005cb75b6cc2294d411bbd",
29
+ "comment": "Fix images not showing in test app"
30
+ },
46
31
  {
47
- "author": "74712637+iamAbhi-916@users.noreply.github.com",
32
+ "author": "66076509+vineethkuttan@users.noreply.github.com",
48
33
  "package": "@office-iss/react-native-win32",
49
- "commit": "9486be369921a08663e2b5227dda13cbc7ad5388",
50
- "comment": "integrate 0.82.1"
34
+ "commit": "a0e5dd17f852aca8dd005cb75b6cc2294d411bbd",
35
+ "comment": "Integrate 0.83.0-nightly-20251104-502efe1cc"
36
+ },
37
+ {
38
+ "author": "beachball",
39
+ "package": "@office-iss/react-native-win32",
40
+ "comment": "Bump react-native-platform-override to v0.0.0-canary.1020",
41
+ "commit": "not available"
51
42
  }
52
43
  ]
53
44
  }
54
45
  },
55
46
  {
56
- "date": "Wed, 14 Jan 2026 13:07:17 GMT",
57
- "version": "0.82.0-preview.1",
58
- "tag": "@office-iss/react-native-win32_v0.82.0-preview.1",
47
+ "date": "Wed, 04 Mar 2026 22:34:24 GMT",
48
+ "version": "0.0.0-canary.306",
49
+ "tag": "@office-iss/react-native-win32_v0.0.0-canary.306",
59
50
  "comments": {
60
51
  "prerelease": [
61
52
  {
62
- "author": "74712637+iamAbhi-916@users.noreply.github.com",
53
+ "author": "30809111+acoates-ms@users.noreply.github.com",
63
54
  "package": "@office-iss/react-native-win32",
64
- "commit": "4ade8ccd99bb577a15a1ce46e1fdc7dd43d66dd5",
65
- "comment": "Promote 0.82 to preview"
55
+ "commit": "25db080987460d9b4b5f145aeffc5b4b0a669a72",
56
+ "comment": "Fix TextWin32 export"
66
57
  },
67
58
  {
68
- "author": "beachball",
59
+ "author": "66076509+vineethkuttan@users.noreply.github.com",
69
60
  "package": "@office-iss/react-native-win32",
70
- "comment": "Bump react-native-platform-override to v0.82.0-preview.1",
71
- "commit": "not available"
61
+ "commit": "9a59a5e833886b5d9bdccb1bf20f99a35d7500bc",
62
+ "comment": "Integrate 0.83.0-nightly-20250917-18cb4edfa"
63
+ },
64
+ {
65
+ "author": "30809111+acoates-ms@users.noreply.github.com",
66
+ "package": "@office-iss/react-native-win32",
67
+ "commit": "e2dc99a36053b8bbc04be9f613e33f3f7efb4cc4",
68
+ "comment": "Fix TouchableWin32 and LogBox"
69
+ },
70
+ {
71
+ "author": "66076509+vineethkuttan@users.noreply.github.com",
72
+ "package": "@office-iss/react-native-win32",
73
+ "commit": "9cc99209e10b79a9b5223465538f81c3954bec4e",
74
+ "comment": "Integrate 0.83.0-nightly-20251012-6f482708b"
72
75
  }
73
76
  ]
74
77
  }
package/CHANGELOG.md CHANGED
@@ -1,42 +1,37 @@
1
1
  # Change Log - @office-iss/react-native-win32
2
2
 
3
- <!-- This log was last generated on Thu, 12 Mar 2026 14:15:44 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Wed, 11 Mar 2026 03:08:37 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## 0.82.0
7
+ ## 0.0.0-canary.308
8
8
 
9
- Thu, 12 Mar 2026 14:15:44 GMT
10
-
11
- ### Patches
12
-
13
- - Promote 0.82 to latest (74712637+iamAbhi-916@users.noreply.github.com)
14
- - Bump react-native-platform-override to v0.82.0
15
-
16
- ## 0.82.0-preview.3
17
-
18
- Tue, 27 Jan 2026 19:51:45 GMT
9
+ Wed, 11 Mar 2026 03:08:37 GMT
19
10
 
20
11
  ### Changes
21
12
 
22
- - Fix TouchableWin32 and LogBox (30809111+acoates-ms@users.noreply.github.com)
13
+ - Update require's from TouchableWin32 to be imports (30809111+acoates-ms@users.noreply.github.com)
23
14
 
24
- ## 0.82.0-preview.2
15
+ ## 0.0.0-canary.307
25
16
 
26
- Sat, 24 Jan 2026 16:43:28 GMT
17
+ Sat, 07 Mar 2026 04:06:59 GMT
27
18
 
28
19
  ### Changes
29
20
 
30
- - integrate 0.82.1 (74712637+iamAbhi-916@users.noreply.github.com)
21
+ - Fix images not showing in test app (30809111+acoates-ms@users.noreply.github.com)
22
+ - Integrate 0.83.0-nightly-20251104-502efe1cc (66076509+vineethkuttan@users.noreply.github.com)
23
+ - Bump react-native-platform-override to v0.0.0-canary.1020
31
24
 
32
- ## 0.82.0-preview.1
25
+ ## 0.0.0-canary.306
33
26
 
34
- Wed, 14 Jan 2026 13:07:17 GMT
27
+ Wed, 04 Mar 2026 22:34:24 GMT
35
28
 
36
29
  ### Changes
37
30
 
38
- - Promote 0.82 to preview (74712637+iamAbhi-916@users.noreply.github.com)
39
- - Bump react-native-platform-override to v0.82.0-preview.1
31
+ - Fix TextWin32 export (30809111+acoates-ms@users.noreply.github.com)
32
+ - Integrate 0.83.0-nightly-20250917-18cb4edfa (66076509+vineethkuttan@users.noreply.github.com)
33
+ - Fix TouchableWin32 and LogBox (30809111+acoates-ms@users.noreply.github.com)
34
+ - Integrate 0.83.0-nightly-20251012-6f482708b (66076509+vineethkuttan@users.noreply.github.com)
40
35
 
41
36
  ## 0.0.0-canary.305
42
37
 
@@ -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
- // $FlowExpectedError[unclear-type]
18
- export default (createAnimatedComponent(FlatList): component<ItemT = any>(
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
- (Image: $FlowFixMe),
19
- ): AnimatedComponentType<
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 (createAnimatedComponent(SectionList): component<
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
- (Text: $FlowFixMe),
19
- ): AnimatedComponentType<TextProps, React.ElementRef<typeof Text>>);
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
- export default (createAnimatedComponent(View): AnimatedComponentType<
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
- export type AnimatedProps<Props: {...}> = {
67
- [K in keyof Props]: K extends NonAnimatedProps
68
- ? Props[K]
69
- : WithAnimatedValue<Props[K]>,
70
- } & PassThroughProps;
71
-
72
- export type AnimatedBaseProps<Props: {...}> = {
73
- [K in keyof Props]: K extends NonAnimatedProps
74
- ? Props[K]
75
- : WithAnimatedValue<Props[K]>,
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.ElementProps<TInstance>>,
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 processedColor: RgbaValue | NativeColorValue =
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
- initColor = (processedColor: RgbaValue);
142
- } else {
143
- // $FlowFixMe[incompatible-type] - Type is verified above
144
- this.nativeColor = (processedColor: NativeColorValue);
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(null);
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(null);
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(null);
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(null);
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(null);
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(null);
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(null);
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(null);
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(null);
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(null);
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(null);
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(null);
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(null);
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(null);
366
+ reject(
367
+ new Error(
368
+ 'NativeAccessibilityInfoAndroid.isAccessibilityServiceEnabled is not available',
369
+ ),
370
+ );
347
371
  }
348
372
  } else {
349
- reject(null);
373
+ reject(
374
+ new Error(
375
+ 'isAccessibilityServiceEnabled is only available on Android',
376
+ ),
377
+ );
350
378
  }
351
379
  });
352
380
  },