@office-iss/react-native-win32 0.0.0-canary.291 → 0.0.0-canary.293

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 (191) hide show
  1. package/.flowconfig +1 -1
  2. package/CHANGELOG.json +43 -1
  3. package/CHANGELOG.md +22 -4
  4. package/Libraries/Alert/RCTAlertManager.js +17 -0
  5. package/Libraries/Animated/AnimatedEvent.js +4 -3
  6. package/Libraries/Animated/AnimatedExports.js.flow +2 -0
  7. package/Libraries/Animated/AnimatedImplementation.js +2 -2
  8. package/Libraries/Animated/components/AnimatedScrollView.js +48 -43
  9. package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
  10. package/Libraries/BatchedBridge/MessageQueue.js +2 -2
  11. package/Libraries/Blob/FileReader.js +219 -8
  12. package/Libraries/Blob/URL.js +13 -1
  13. package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js +17 -0
  14. package/Libraries/Components/Button.js +1 -1
  15. package/Libraries/Components/Button.win32.js +1 -1
  16. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -3
  17. package/Libraries/{Utilities/__mocks__/GlobalPerformanceLogger.js → Components/DrawerAndroid/DrawerLayoutAndroid.ios.js} +3 -4
  18. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +6 -66
  19. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js.flow +18 -0
  20. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.js +71 -0
  21. package/Libraries/Components/Keyboard/Keyboard.js +4 -2
  22. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +6 -3
  23. package/Libraries/Components/Pressable/Pressable.js +6 -1
  24. package/Libraries/Components/Pressable/Pressable.win32.js +6 -1
  25. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +12 -2
  26. package/Libraries/Components/RefreshControl/RefreshControl.js +1 -1
  27. package/Libraries/Components/ScrollView/ScrollView.d.ts +1 -1
  28. package/Libraries/Components/ScrollView/ScrollView.js +128 -116
  29. package/Libraries/Components/StaticRenderer.js +1 -1
  30. package/Libraries/Components/Switch/Switch.js +7 -3
  31. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +2 -1
  32. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -4
  33. package/Libraries/Components/TextInput/TextInput.flow.js +59 -42
  34. package/Libraries/Components/TextInput/TextInput.flow.win32.js +1208 -0
  35. package/Libraries/Components/TextInput/TextInput.js +67 -1005
  36. package/Libraries/Components/TextInput/TextInput.win32.js +69 -1037
  37. package/Libraries/{Blob/__mocks__/BlobModule.js → Components/ToastAndroid/ToastAndroid.ios.js} +3 -6
  38. package/Libraries/Components/ToastAndroid/ToastAndroid.js +4 -32
  39. package/Libraries/Components/ToastAndroid/ToastAndroid.js.flow +109 -0
  40. package/Libraries/Components/ToastAndroid/ToastAndroid.win32.js +4 -32
  41. package/Libraries/Components/ToastAndroid/ToastAndroidFallback.js +45 -0
  42. package/Libraries/Components/Touchable/Touchable.js +5 -5
  43. package/Libraries/Components/Touchable/Touchable.win32.js +5 -5
  44. package/Libraries/Components/Touchable/TouchableBounce.js +12 -6
  45. package/Libraries/Components/Touchable/TouchableHighlight.js +9 -6
  46. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +4 -4
  47. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +4 -4
  48. package/Libraries/Components/Touchable/TouchableOpacity.js +11 -5
  49. package/Libraries/Components/View/View.js +18 -21
  50. package/Libraries/Components/View/View.win32.js +21 -24
  51. package/Libraries/Components/View/ViewAccessibility.js +7 -0
  52. package/Libraries/Components/View/ViewAccessibility.win32.js +7 -0
  53. package/Libraries/Components/View/ViewPropTypes.js +1 -1
  54. package/Libraries/Components/View/ViewPropTypes.win32.js +1 -1
  55. package/Libraries/Core/ReactNativeVersion.js +1 -1
  56. package/Libraries/Core/setUpReactDevTools.js +5 -5
  57. package/Libraries/EventEmitter/NativeEventEmitter.js +4 -1
  58. package/Libraries/Image/Image.js +17 -0
  59. package/Libraries/Image/Image.js.flow +2 -2
  60. package/Libraries/Image/ImageInjection.js +1 -1
  61. package/Libraries/Image/ImageProps.js +5 -5
  62. package/Libraries/Image/ImageSource.js +3 -1
  63. package/Libraries/Image/ImageSourceUtils.js +4 -2
  64. package/Libraries/Image/ImageTypes.flow.js +1 -1
  65. package/Libraries/Lists/FlatList.d.ts +2 -2
  66. package/Libraries/Lists/FlatList.js +1 -1
  67. package/Libraries/Lists/SectionList.js +1 -1
  68. package/Libraries/Lists/SectionListModern.js +3 -3
  69. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  70. package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
  71. package/Libraries/Modal/Modal.js +3 -3
  72. package/Libraries/NativeComponent/BaseViewConfig.js +17 -0
  73. package/Libraries/NativeComponent/PlatformBaseViewConfig.js +2 -2
  74. package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
  75. package/Libraries/Network/RCTNetworking.js +17 -0
  76. package/Libraries/Network/XMLHttpRequest.js +781 -10
  77. package/Libraries/NewAppScreen/components/DebugInstructions.js +1 -1
  78. package/Libraries/NewAppScreen/components/Header.js +1 -1
  79. package/Libraries/NewAppScreen/components/HermesBadge.js +1 -1
  80. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +3 -3
  81. package/Libraries/NewAppScreen/components/ReloadInstructions.js +1 -1
  82. package/Libraries/Performance/Systrace.js +7 -7
  83. package/Libraries/ReactNative/AppContainer-dev.js +3 -2
  84. package/Libraries/ReactNative/RendererImplementation.js +6 -5
  85. package/Libraries/ReactNative/renderApplication.js +9 -0
  86. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +2 -2
  87. package/Libraries/Renderer/implementations/ReactFabric-dev.js +4840 -4748
  88. package/Libraries/Renderer/implementations/ReactFabric-prod.js +4947 -4829
  89. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3998 -3888
  90. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5005 -4948
  91. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +2744 -2652
  92. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5020 -4933
  93. package/Libraries/Renderer/shims/ReactFabric.js +3 -1
  94. package/Libraries/Renderer/shims/ReactFeatureFlags.js +3 -1
  95. package/Libraries/Renderer/shims/ReactNative.js +3 -1
  96. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
  97. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +3 -1
  98. package/Libraries/Settings/Settings.js +13 -19
  99. package/Libraries/Settings/Settings.win32.js +19 -20
  100. package/Libraries/Settings/SettingsFallback.js +33 -0
  101. package/Libraries/StyleSheet/PlatformColorValueTypes.js +15 -0
  102. package/Libraries/StyleSheet/Rect.js +1 -0
  103. package/Libraries/StyleSheet/StyleSheet.js.flow +3 -3
  104. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
  105. package/Libraries/StyleSheet/StyleSheetTypes.js +75 -33
  106. package/Libraries/StyleSheet/flattenStyle.js +7 -1
  107. package/Libraries/StyleSheet/processBackgroundImage.js +670 -214
  108. package/Libraries/Text/Text.js +3 -3
  109. package/Libraries/Text/Text.win32.js +3 -3
  110. package/Libraries/Text/TextNativeComponent.js +0 -4
  111. package/Libraries/Text/TextNativeComponent.win32.js +0 -4
  112. package/Libraries/Text/TextProps.js +1 -1
  113. package/Libraries/Text/TextProps.win32.js +1 -1
  114. package/Libraries/Utilities/Appearance.js +2 -0
  115. package/Libraries/Utilities/BackHandler.js +17 -0
  116. package/Libraries/Utilities/Platform.js +17 -0
  117. package/Libraries/Utilities/PlatformTypes.js +2 -0
  118. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  119. package/Libraries/WebSocket/WebSocket.js +313 -8
  120. package/flow/global.js +0 -2
  121. package/index.js +1 -288
  122. package/index.win32.js +8 -297
  123. package/overrides.json +29 -23
  124. package/package.json +16 -16
  125. package/src/private/animated/NativeAnimatedHelper.js +1 -1
  126. package/src/private/animated/NativeAnimatedHelper.win32.js +1 -1
  127. package/src/private/animated/createAnimatedPropsHook.js +2 -27
  128. package/src/private/components/{SafeAreaView_INTERNAL_DO_NOT_USE.js → safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE.js} +6 -6
  129. package/src/private/components/{HScrollViewNativeComponents.js → scrollview/HScrollViewNativeComponents.js} +8 -8
  130. package/src/private/components/scrollview/VScrollViewNativeComponents.js +25 -0
  131. package/src/private/{devmenu → devsupport/devmenu}/DevMenu.js +1 -1
  132. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BorderBox.js +3 -3
  133. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BoxInspector.js +6 -5
  134. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementBox.js +8 -6
  135. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementProperties.js +11 -10
  136. package/src/private/{inspector → devsupport/devmenu/elementinspector}/Inspector.js +14 -12
  137. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorOverlay.js +5 -4
  138. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorPanel.js +9 -8
  139. package/src/private/{inspector → devsupport/devmenu/elementinspector}/NetworkOverlay.js +10 -9
  140. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ReactDevToolsOverlay.js +7 -7
  141. package/src/private/{inspector → devsupport/devmenu/elementinspector}/StyleInspector.js +7 -6
  142. package/src/private/{inspector → devsupport/devmenu/elementinspector}/XHRInterceptor.js +2 -2
  143. package/src/private/{inspector → devsupport/devmenu/elementinspector}/getInspectorDataForViewAtPoint.js +2 -2
  144. package/src/private/{inspector → devsupport/devmenu/elementinspector}/resolveBoxStyle.js +1 -1
  145. package/src/private/{inspector → devsupport/devmenu/perfmonitor}/PerformanceOverlay.js +6 -5
  146. package/src/private/{specs_DEPRECATED/modules → devsupport/devmenu/specs}/NativeDevMenu.js +2 -2
  147. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.android.js +1 -1
  148. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.ios.js +1 -1
  149. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.win32.js +1 -1
  150. package/src/private/{debugging → devsupport/rndevtools}/setUpFuseboxReactDevToolsDispatcher.js +1 -1
  151. package/src/private/{fusebox → devsupport/rndevtools}/specs/NativeReactDevToolsRuntimeSettingsModule.js +2 -2
  152. package/src/private/{specs_DEPRECATED/modules → devsupport/rndevtools/specs}/NativeReactDevToolsSettingsManager.js +2 -2
  153. package/src/private/featureflags/ReactNativeFeatureFlags.js +37 -43
  154. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +8 -8
  155. package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
  156. package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +3 -0
  157. package/src/private/types/HostComponent.js +1 -1
  158. package/src/private/types/HostInstance.js +12 -4
  159. package/src/private/webapis/performance/Performance.js +1 -3
  160. package/types/index.d.ts +1 -1
  161. package/types/public/ReactNativeTypes.d.ts +2 -2
  162. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +0 -38
  163. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +0 -22
  164. package/Libraries/Blob/FileReader_new.js +0 -231
  165. package/Libraries/Blob/FileReader_old.js +0 -186
  166. package/Libraries/Blob/__mocks__/FileReaderModule.js +0 -20
  167. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +0 -32
  168. package/Libraries/Core/__mocks__/ErrorUtils.js +0 -33
  169. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -19
  170. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +0 -49
  171. package/Libraries/Events/CustomEvent.js +0 -32
  172. package/Libraries/Events/EventPolyfill.js +0 -239
  173. package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +0 -118
  174. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +0 -134
  175. package/Libraries/Network/XMLHttpRequest_new.js +0 -794
  176. package/Libraries/Network/XMLHttpRequest_old.js +0 -701
  177. package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +0 -58
  178. package/Libraries/Utilities/__mocks__/BackHandler.js +0 -45
  179. package/Libraries/Utilities/__mocks__/PixelRatio.js +0 -25
  180. package/Libraries/WebSocket/WebSocketEvent.js +0 -30
  181. package/Libraries/WebSocket/WebSocket_new.js +0 -325
  182. package/Libraries/WebSocket/WebSocket_old.js +0 -297
  183. package/Libraries/WebSocket/__mocks__/event-target-shim.js +0 -27
  184. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +0 -30
  185. package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +0 -81
  186. package/jest/__tests__/setup-test.js +0 -18
  187. package/src/private/components/VScrollViewNativeComponents.js +0 -25
  188. package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +0 -267
  189. package/src/types/third_party/event-target-shim.d.ts +0 -392
  190. /package/src/private/{devmenu → devsupport/devmenu}/DevMenu.d.ts +0 -0
  191. /package/src/private/{debugging → devsupport/rndevtools}/FuseboxSessionObserver.js +0 -0
@@ -7,7 +7,9 @@
7
7
  * @noformat
8
8
  * @nolint
9
9
  * @flow
10
- * @generated SignedSource<<cf323fc5ca893bab5669c7d321660412>>
10
+ * @generated SignedSource<<16b364e89f43b8a47832b0dfb98af11e>>
11
+ *
12
+ * This file was sync'd from the facebook/react repository.
11
13
  */
12
14
 
13
15
  'use strict';
@@ -7,7 +7,9 @@
7
7
  * @noformat
8
8
  * @nolint
9
9
  * @flow strict-local
10
- * @generated SignedSource<<908f5fb85384725318e261f40e49d9a6>>
10
+ * @generated SignedSource<<1dd9e9c3f20e37ae14e485fc6ee3d9e9>>
11
+ *
12
+ * This file was sync'd from the facebook/react repository.
11
13
  */
12
14
 
13
15
  'use strict';
@@ -7,7 +7,9 @@
7
7
  * @noformat
8
8
  * @nolint
9
9
  * @flow
10
- * @generated SignedSource<<8f46fdc9267fcc4fdc9e76842fe24066>>
10
+ * @generated SignedSource<<e2c46705ed927302dbe9332dafba459d>>
11
+ *
12
+ * This file was sync'd from the facebook/react repository.
11
13
  */
12
14
  'use strict';
13
15
 
@@ -7,7 +7,9 @@
7
7
  * @noformat
8
8
  * @nolint
9
9
  * @flow strict-local
10
- * @generated SignedSource<<83073425aa3f71ced2c8c51f25a25938>>
10
+ * @generated SignedSource<<e8dce0e82b831c91465d04b49fb48ab2>>
11
+ *
12
+ * This file was sync'd from the facebook/react repository.
11
13
  */
12
14
 
13
15
  'use strict';
@@ -7,7 +7,9 @@
7
7
  * @noformat
8
8
  * @nolint
9
9
  * @flow strict-local
10
- * @generated SignedSource<<52163887de05f1cff05388145cf85b3b>>
10
+ * @generated SignedSource<<556d1487de0b9e4a09cbc67dd130a884>>
11
+ *
12
+ * This file was sync'd from the facebook/react repository.
11
13
  */
12
14
 
13
15
  'use strict';
@@ -8,26 +8,20 @@
8
8
  * @flow
9
9
  */
10
10
 
11
- 'use strict';
11
+ import Platform from '../Utilities/Platform';
12
12
 
13
- const Settings = {
14
- get(key: string): any {
15
- console.warn('Settings is not yet supported on this platform.');
16
- return null;
17
- },
18
-
19
- set(settings: Object) {
20
- console.warn('Settings is not yet supported on this platform.');
21
- },
22
-
23
- watchKeys(keys: string | Array<string>, callback: () => void): number {
24
- console.warn('Settings is not yet supported on this platform.');
25
- return -1;
26
- },
27
-
28
- clearWatch(watchId: number) {
29
- console.warn('Settings is not yet supported on this platform.');
30
- },
13
+ let Settings: {
14
+ get(key: string): any,
15
+ set(settings: Object): void,
16
+ watchKeys(keys: string | Array<string>, callback: () => void): number,
17
+ clearWatch(watchId: number): void,
18
+ ...
31
19
  };
32
20
 
21
+ if (Platform.OS === 'ios') {
22
+ Settings = require('./Settings').default;
23
+ } else {
24
+ Settings = require('./SettingsFallback').default;
25
+ }
26
+
33
27
  export default Settings;
@@ -1,28 +1,27 @@
1
1
  /**
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow
4
8
  * @format
5
9
  */
6
- 'use strict';
7
10
 
8
- var Settings = {
9
- get(key: string): any {
10
- console.warn('Settings is not yet supported on Win32');
11
- return null;
12
- },
11
+ import Platform from '../Utilities/Platform';
13
12
 
14
- set(settings: Object) {
15
- console.warn('Settings is not yet supported on Win32');
16
- },
17
-
18
- watchKeys(keys: string | Array<string>, callback: () => void): number {
19
- console.warn('Settings is not yet supported on Win32');
20
- return -1;
21
- },
22
-
23
- clearWatch(watchId: number) {
24
- console.warn('Settings is not yet supported on Win32');
25
- },
13
+ let Settings: {
14
+ get(key: string): any,
15
+ set(settings: Object): void,
16
+ watchKeys(keys: string | Array<string>, callback: () => void): number,
17
+ clearWatch(watchId: number): void,
18
+ ...
26
19
  };
27
20
 
21
+ if (Platform.OS === 'ios') {
22
+ Settings = require('./Settings').default;
23
+ } else {
24
+ Settings = require('./SettingsFallback').default;
25
+ }
26
+
28
27
  export default Settings;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @format
8
+ * @flow
9
+ */
10
+
11
+ 'use strict';
12
+
13
+ const Settings = {
14
+ get(key: string): any {
15
+ console.warn('Settings is not yet supported on this platform.');
16
+ return null;
17
+ },
18
+
19
+ set(settings: Object) {
20
+ console.warn('Settings is not yet supported on this platform.');
21
+ },
22
+
23
+ watchKeys(keys: string | Array<string>, callback: () => void): number {
24
+ console.warn('Settings is not yet supported on this platform.');
25
+ return -1;
26
+ },
27
+
28
+ clearWatch(watchId: number) {
29
+ console.warn('Settings is not yet supported on this platform.');
30
+ },
31
+ };
32
+
33
+ export default Settings;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict-local
8
+ * @format
9
+ */
10
+
11
+ // NOTE: This file supports backwards compatibility of subpath (deep) imports
12
+ // from 'react-native' with platform-specific extensions. It can be deleted
13
+ // once we remove the "./*" mapping from package.json "exports".
14
+
15
+ export * from './PlatformColorValueTypes';
@@ -15,6 +15,7 @@ export type Rect = $ReadOnly<{
15
15
  top?: ?number,
16
16
  }>;
17
17
 
18
+ export type Insets = Rect;
18
19
  export type RectOrSize = Rect | number;
19
20
 
20
21
  export function createSquare(size: number): Rect {
@@ -26,9 +26,10 @@ import type {
26
26
  } from './StyleSheetTypes';
27
27
 
28
28
  export type {
29
- StyleProp,
30
29
  BoxShadowValue,
31
30
  FilterFunction,
31
+ NativeColorValue,
32
+ StyleProp,
32
33
  } from './StyleSheetTypes';
33
34
 
34
35
  export type StyleSheetProperties = {
@@ -36,8 +37,6 @@ export type StyleSheetProperties = {
36
37
  flatten<T: string>(style: T): T,
37
38
  };
38
39
 
39
- export type {NativeColorValue} from './StyleSheetTypes';
40
-
41
40
  /**
42
41
  * This type should be used as the type for anything that is a color. It is
43
42
  * most useful when using DynamicColorIOS which can be a string or a dynamic
@@ -49,6 +48,7 @@ export type ColorValue = ____ColorValue_Internal;
49
48
 
50
49
  /**
51
50
  * Expose the opaque type for NativeColorValue.
51
+ * @deprecated Use NativeColorValue instead.
52
52
  */
53
53
  export type OpaqueColorValue = NativeColorValue;
54
54
 
@@ -368,7 +368,7 @@ export type BlendMode =
368
368
  | 'luminosity';
369
369
 
370
370
  export type GradientValue = {
371
- type: 'linearGradient';
371
+ type: 'linear-gradient';
372
372
  // Angle or direction enums
373
373
  direction?: string | undefined;
374
374
  colorStops: ReadonlyArray<{
@@ -10,7 +10,7 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- import type {AnimatedBaseProps} from '../Animated/createAnimatedComponent';
13
+ import type {WithAnimatedValue} from '../Animated/createAnimatedComponent';
14
14
  import type AnimatedNode from '../Animated/nodes/AnimatedNode';
15
15
  import type {ImageResizeMode} from './../Image/ImageResizeMode';
16
16
  import type {
@@ -38,8 +38,7 @@ export type EdgeInsetsValue = {
38
38
  bottom: number,
39
39
  };
40
40
 
41
- export type DimensionValue = number | string | 'auto' | AnimatedNode | null;
42
- export type AnimatableNumericValue = number | AnimatedNode;
41
+ export type DimensionValue = number | string | 'auto' | null;
43
42
 
44
43
  export type CursorValue = 'auto' | 'pointer';
45
44
 
@@ -694,7 +693,7 @@ export type ____ShadowStyle_InternalCore = $ReadOnly<{
694
693
  * Sets the drop shadow opacity (multiplied by the color's alpha component)
695
694
  * @platform ios
696
695
  */
697
- shadowOpacity?: AnimatableNumericValue,
696
+ shadowOpacity?: number,
698
697
  /**
699
698
  * Sets the drop shadow blur radius
700
699
  * @platform ios
@@ -726,8 +725,8 @@ export type DropShadowValue = {
726
725
  color?: ____ColorValue_Internal,
727
726
  };
728
727
 
729
- export type GradientValue = {
730
- type: 'linearGradient',
728
+ type LinearGradientValue = {
729
+ type: 'linear-gradient',
731
730
  // Angle or direction enums
732
731
  direction?: string,
733
732
  colorStops: $ReadOnlyArray<{
@@ -736,6 +735,50 @@ export type GradientValue = {
736
735
  }>,
737
736
  };
738
737
 
738
+ type RadialExtent =
739
+ | 'closest-corner'
740
+ | 'closest-side'
741
+ | 'farthest-corner'
742
+ | 'farthest-side';
743
+ export type RadialGradientPosition =
744
+ | {
745
+ top: number | string,
746
+ left: number | string,
747
+ }
748
+ | {
749
+ top: number | string,
750
+ right: number | string,
751
+ }
752
+ | {
753
+ bottom: number | string,
754
+ left: number | string,
755
+ }
756
+ | {
757
+ bottom: number | string,
758
+ right: number | string,
759
+ };
760
+
761
+ export type RadialGradientShape = 'circle' | 'ellipse';
762
+ export type RadialGradientSize =
763
+ | RadialExtent
764
+ | {
765
+ x: string | number,
766
+ y: string | number,
767
+ };
768
+
769
+ type RadialGradientValue = {
770
+ type: 'radial-gradient',
771
+ shape: RadialGradientShape,
772
+ size: RadialGradientSize,
773
+ position: RadialGradientPosition,
774
+ colorStops: $ReadOnlyArray<{
775
+ color: ____ColorValue_Internal,
776
+ positions?: $ReadOnlyArray<string>,
777
+ }>,
778
+ };
779
+
780
+ export type BackgroundImageValue = LinearGradientValue | RadialGradientValue;
781
+
739
782
  export type BoxShadowValue = {
740
783
  offsetX: number | string,
741
784
  offsetY: number | string,
@@ -777,39 +820,39 @@ export type ____ViewStyle_InternalBase = $ReadOnly<{
777
820
  borderBlockColor?: ____ColorValue_Internal,
778
821
  borderBlockEndColor?: ____ColorValue_Internal,
779
822
  borderBlockStartColor?: ____ColorValue_Internal,
780
- borderRadius?: AnimatableNumericValue | string,
781
- borderBottomEndRadius?: AnimatableNumericValue | string,
782
- borderBottomLeftRadius?: AnimatableNumericValue | string,
783
- borderBottomRightRadius?: AnimatableNumericValue | string,
784
- borderBottomStartRadius?: AnimatableNumericValue | string,
785
- borderEndEndRadius?: AnimatableNumericValue | string,
786
- borderEndStartRadius?: AnimatableNumericValue | string,
787
- borderStartEndRadius?: AnimatableNumericValue | string,
788
- borderStartStartRadius?: AnimatableNumericValue | string,
789
- borderTopEndRadius?: AnimatableNumericValue | string,
790
- borderTopLeftRadius?: AnimatableNumericValue | string,
791
- borderTopRightRadius?: AnimatableNumericValue | string,
792
- borderTopStartRadius?: AnimatableNumericValue | string,
823
+ borderRadius?: number | string,
824
+ borderBottomEndRadius?: number | string,
825
+ borderBottomLeftRadius?: number | string,
826
+ borderBottomRightRadius?: number | string,
827
+ borderBottomStartRadius?: number | string,
828
+ borderEndEndRadius?: number | string,
829
+ borderEndStartRadius?: number | string,
830
+ borderStartEndRadius?: number | string,
831
+ borderStartStartRadius?: number | string,
832
+ borderTopEndRadius?: number | string,
833
+ borderTopLeftRadius?: number | string,
834
+ borderTopRightRadius?: number | string,
835
+ borderTopStartRadius?: number | string,
793
836
  borderStyle?: 'solid' | 'dotted' | 'dashed',
794
- borderWidth?: AnimatableNumericValue,
795
- borderBottomWidth?: AnimatableNumericValue,
796
- borderEndWidth?: AnimatableNumericValue,
797
- borderLeftWidth?: AnimatableNumericValue,
798
- borderRightWidth?: AnimatableNumericValue,
799
- borderStartWidth?: AnimatableNumericValue,
800
- borderTopWidth?: AnimatableNumericValue,
801
- opacity?: AnimatableNumericValue,
837
+ borderWidth?: number,
838
+ borderBottomWidth?: number,
839
+ borderEndWidth?: number,
840
+ borderLeftWidth?: number,
841
+ borderRightWidth?: number,
842
+ borderStartWidth?: number,
843
+ borderTopWidth?: number,
844
+ opacity?: number,
802
845
  outlineColor?: ____ColorValue_Internal,
803
- outlineOffset?: AnimatableNumericValue,
846
+ outlineOffset?: number,
804
847
  outlineStyle?: 'solid' | 'dotted' | 'dashed',
805
- outlineWidth?: AnimatableNumericValue,
848
+ outlineWidth?: number,
806
849
  elevation?: number,
807
850
  pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only',
808
851
  cursor?: CursorValue,
809
852
  boxShadow?: $ReadOnlyArray<BoxShadowValue> | string,
810
853
  filter?: $ReadOnlyArray<FilterFunction> | string,
811
854
  mixBlendMode?: ____BlendMode_Internal,
812
- experimental_backgroundImage?: $ReadOnlyArray<GradientValue> | string,
855
+ experimental_backgroundImage?: $ReadOnlyArray<BackgroundImageValue> | string,
813
856
  isolation?: 'auto' | 'isolate',
814
857
  }>;
815
858
 
@@ -992,9 +1035,8 @@ export type ____DangerouslyImpreciseStyleProp_Internal = StyleProp<
992
1035
  Partial<____DangerouslyImpreciseStyle_Internal>,
993
1036
  >;
994
1037
 
995
- export type ____DangerouslyImpreciseAnimatedStyleProp_Internal = StyleProp<
996
- Partial<AnimatedBaseProps<____DangerouslyImpreciseStyle_Internal>>,
997
- >;
1038
+ export type ____DangerouslyImpreciseAnimatedStyleProp_Internal =
1039
+ WithAnimatedValue<StyleProp<Partial<____DangerouslyImpreciseStyle_Internal>>>;
998
1040
 
999
1041
  export type ____ViewStyleProp_Internal = StyleProp<
1000
1042
  $ReadOnly<Partial<____ViewStyle_Internal>>,
@@ -10,17 +10,22 @@
10
10
 
11
11
  'use strict';
12
12
 
13
+ import type AnimatedNode from '../Animated/nodes/AnimatedNode';
13
14
  import type {
14
15
  ____DangerouslyImpreciseAnimatedStyleProp_Internal,
15
16
  ____FlattenStyleProp_Internal,
16
17
  } from './StyleSheetTypes';
17
18
 
19
+ type NonAnimatedNodeObject<TStyleProp> = TStyleProp extends AnimatedNode
20
+ ? empty
21
+ : TStyleProp;
22
+
18
23
  function flattenStyle<
19
24
  TStyleProp: ____DangerouslyImpreciseAnimatedStyleProp_Internal,
20
25
  >(
21
26
  style: ?TStyleProp,
22
27
  // $FlowFixMe[underconstrained-implicit-instantiation]
23
- ): ?____FlattenStyleProp_Internal<TStyleProp> {
28
+ ): ?NonAnimatedNodeObject<____FlattenStyleProp_Internal<TStyleProp>> {
24
29
  if (style === null || typeof style !== 'object') {
25
30
  return undefined;
26
31
  }
@@ -39,6 +44,7 @@ function flattenStyle<
39
44
  for (const key in computedStyle) {
40
45
  // $FlowFixMe[incompatible-use]
41
46
  // $FlowFixMe[invalid-computed-prop]
47
+ // $FlowFixMe[prop-missing]
42
48
  result[key] = computedStyle[key];
43
49
  }
44
50
  }