@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.
- package/.flowconfig +1 -1
- package/CHANGELOG.json +43 -1
- package/CHANGELOG.md +22 -4
- package/Libraries/Alert/RCTAlertManager.js +17 -0
- package/Libraries/Animated/AnimatedEvent.js +4 -3
- package/Libraries/Animated/AnimatedExports.js.flow +2 -0
- package/Libraries/Animated/AnimatedImplementation.js +2 -2
- package/Libraries/Animated/components/AnimatedScrollView.js +48 -43
- package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
- package/Libraries/BatchedBridge/MessageQueue.js +2 -2
- package/Libraries/Blob/FileReader.js +219 -8
- package/Libraries/Blob/URL.js +13 -1
- package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js +17 -0
- package/Libraries/Components/Button.js +1 -1
- package/Libraries/Components/Button.win32.js +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -3
- package/Libraries/{Utilities/__mocks__/GlobalPerformanceLogger.js → Components/DrawerAndroid/DrawerLayoutAndroid.ios.js} +3 -4
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +6 -66
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js.flow +18 -0
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.js +71 -0
- package/Libraries/Components/Keyboard/Keyboard.js +4 -2
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +6 -3
- package/Libraries/Components/Pressable/Pressable.js +6 -1
- package/Libraries/Components/Pressable/Pressable.win32.js +6 -1
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +12 -2
- package/Libraries/Components/RefreshControl/RefreshControl.js +1 -1
- package/Libraries/Components/ScrollView/ScrollView.d.ts +1 -1
- package/Libraries/Components/ScrollView/ScrollView.js +128 -116
- package/Libraries/Components/StaticRenderer.js +1 -1
- package/Libraries/Components/Switch/Switch.js +7 -3
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +2 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -4
- package/Libraries/Components/TextInput/TextInput.flow.js +59 -42
- package/Libraries/Components/TextInput/TextInput.flow.win32.js +1208 -0
- package/Libraries/Components/TextInput/TextInput.js +67 -1005
- package/Libraries/Components/TextInput/TextInput.win32.js +69 -1037
- package/Libraries/{Blob/__mocks__/BlobModule.js → Components/ToastAndroid/ToastAndroid.ios.js} +3 -6
- package/Libraries/Components/ToastAndroid/ToastAndroid.js +4 -32
- package/Libraries/Components/ToastAndroid/ToastAndroid.js.flow +109 -0
- package/Libraries/Components/ToastAndroid/ToastAndroid.win32.js +4 -32
- package/Libraries/Components/ToastAndroid/ToastAndroidFallback.js +45 -0
- package/Libraries/Components/Touchable/Touchable.js +5 -5
- package/Libraries/Components/Touchable/Touchable.win32.js +5 -5
- package/Libraries/Components/Touchable/TouchableBounce.js +12 -6
- package/Libraries/Components/Touchable/TouchableHighlight.js +9 -6
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +4 -4
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +4 -4
- package/Libraries/Components/Touchable/TouchableOpacity.js +11 -5
- package/Libraries/Components/View/View.js +18 -21
- package/Libraries/Components/View/View.win32.js +21 -24
- package/Libraries/Components/View/ViewAccessibility.js +7 -0
- package/Libraries/Components/View/ViewAccessibility.win32.js +7 -0
- package/Libraries/Components/View/ViewPropTypes.js +1 -1
- package/Libraries/Components/View/ViewPropTypes.win32.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpReactDevTools.js +5 -5
- package/Libraries/EventEmitter/NativeEventEmitter.js +4 -1
- package/Libraries/Image/Image.js +17 -0
- package/Libraries/Image/Image.js.flow +2 -2
- package/Libraries/Image/ImageInjection.js +1 -1
- package/Libraries/Image/ImageProps.js +5 -5
- package/Libraries/Image/ImageSource.js +3 -1
- package/Libraries/Image/ImageSourceUtils.js +4 -2
- package/Libraries/Image/ImageTypes.flow.js +1 -1
- package/Libraries/Lists/FlatList.d.ts +2 -2
- package/Libraries/Lists/FlatList.js +1 -1
- package/Libraries/Lists/SectionList.js +1 -1
- package/Libraries/Lists/SectionListModern.js +3 -3
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
- package/Libraries/Modal/Modal.js +3 -3
- package/Libraries/NativeComponent/BaseViewConfig.js +17 -0
- package/Libraries/NativeComponent/PlatformBaseViewConfig.js +2 -2
- package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
- package/Libraries/Network/RCTNetworking.js +17 -0
- package/Libraries/Network/XMLHttpRequest.js +781 -10
- package/Libraries/NewAppScreen/components/DebugInstructions.js +1 -1
- package/Libraries/NewAppScreen/components/Header.js +1 -1
- package/Libraries/NewAppScreen/components/HermesBadge.js +1 -1
- package/Libraries/NewAppScreen/components/LearnMoreLinks.js +3 -3
- package/Libraries/NewAppScreen/components/ReloadInstructions.js +1 -1
- package/Libraries/Performance/Systrace.js +7 -7
- package/Libraries/ReactNative/AppContainer-dev.js +3 -2
- package/Libraries/ReactNative/RendererImplementation.js +6 -5
- package/Libraries/ReactNative/renderApplication.js +9 -0
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +2 -2
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +4840 -4748
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +4947 -4829
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3998 -3888
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5005 -4948
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +2744 -2652
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5020 -4933
- package/Libraries/Renderer/shims/ReactFabric.js +3 -1
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +3 -1
- package/Libraries/Renderer/shims/ReactNative.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +3 -1
- package/Libraries/Settings/Settings.js +13 -19
- package/Libraries/Settings/Settings.win32.js +19 -20
- package/Libraries/Settings/SettingsFallback.js +33 -0
- package/Libraries/StyleSheet/PlatformColorValueTypes.js +15 -0
- package/Libraries/StyleSheet/Rect.js +1 -0
- package/Libraries/StyleSheet/StyleSheet.js.flow +3 -3
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +75 -33
- package/Libraries/StyleSheet/flattenStyle.js +7 -1
- package/Libraries/StyleSheet/processBackgroundImage.js +670 -214
- package/Libraries/Text/Text.js +3 -3
- package/Libraries/Text/Text.win32.js +3 -3
- package/Libraries/Text/TextNativeComponent.js +0 -4
- package/Libraries/Text/TextNativeComponent.win32.js +0 -4
- package/Libraries/Text/TextProps.js +1 -1
- package/Libraries/Text/TextProps.win32.js +1 -1
- package/Libraries/Utilities/Appearance.js +2 -0
- package/Libraries/Utilities/BackHandler.js +17 -0
- package/Libraries/Utilities/Platform.js +17 -0
- package/Libraries/Utilities/PlatformTypes.js +2 -0
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/Libraries/WebSocket/WebSocket.js +313 -8
- package/flow/global.js +0 -2
- package/index.js +1 -288
- package/index.win32.js +8 -297
- package/overrides.json +29 -23
- package/package.json +16 -16
- package/src/private/animated/NativeAnimatedHelper.js +1 -1
- package/src/private/animated/NativeAnimatedHelper.win32.js +1 -1
- package/src/private/animated/createAnimatedPropsHook.js +2 -27
- package/src/private/components/{SafeAreaView_INTERNAL_DO_NOT_USE.js → safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE.js} +6 -6
- package/src/private/components/{HScrollViewNativeComponents.js → scrollview/HScrollViewNativeComponents.js} +8 -8
- package/src/private/components/scrollview/VScrollViewNativeComponents.js +25 -0
- package/src/private/{devmenu → devsupport/devmenu}/DevMenu.js +1 -1
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/BorderBox.js +3 -3
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/BoxInspector.js +6 -5
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementBox.js +8 -6
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementProperties.js +11 -10
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/Inspector.js +14 -12
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorOverlay.js +5 -4
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorPanel.js +9 -8
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/NetworkOverlay.js +10 -9
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/ReactDevToolsOverlay.js +7 -7
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/StyleInspector.js +7 -6
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/XHRInterceptor.js +2 -2
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/getInspectorDataForViewAtPoint.js +2 -2
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/resolveBoxStyle.js +1 -1
- package/src/private/{inspector → devsupport/devmenu/perfmonitor}/PerformanceOverlay.js +6 -5
- package/src/private/{specs_DEPRECATED/modules → devsupport/devmenu/specs}/NativeDevMenu.js +2 -2
- package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.android.js +1 -1
- package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.ios.js +1 -1
- package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.win32.js +1 -1
- package/src/private/{debugging → devsupport/rndevtools}/setUpFuseboxReactDevToolsDispatcher.js +1 -1
- package/src/private/{fusebox → devsupport/rndevtools}/specs/NativeReactDevToolsRuntimeSettingsModule.js +2 -2
- package/src/private/{specs_DEPRECATED/modules → devsupport/rndevtools/specs}/NativeReactDevToolsSettingsManager.js +2 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +37 -43
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +8 -8
- package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +3 -0
- package/src/private/types/HostComponent.js +1 -1
- package/src/private/types/HostInstance.js +12 -4
- package/src/private/webapis/performance/Performance.js +1 -3
- package/types/index.d.ts +1 -1
- package/types/public/ReactNativeTypes.d.ts +2 -2
- package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +0 -38
- package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +0 -22
- package/Libraries/Blob/FileReader_new.js +0 -231
- package/Libraries/Blob/FileReader_old.js +0 -186
- package/Libraries/Blob/__mocks__/FileReaderModule.js +0 -20
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +0 -32
- package/Libraries/Core/__mocks__/ErrorUtils.js +0 -33
- package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -19
- package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +0 -49
- package/Libraries/Events/CustomEvent.js +0 -32
- package/Libraries/Events/EventPolyfill.js +0 -239
- package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +0 -118
- package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +0 -134
- package/Libraries/Network/XMLHttpRequest_new.js +0 -794
- package/Libraries/Network/XMLHttpRequest_old.js +0 -701
- package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +0 -58
- package/Libraries/Utilities/__mocks__/BackHandler.js +0 -45
- package/Libraries/Utilities/__mocks__/PixelRatio.js +0 -25
- package/Libraries/WebSocket/WebSocketEvent.js +0 -30
- package/Libraries/WebSocket/WebSocket_new.js +0 -325
- package/Libraries/WebSocket/WebSocket_old.js +0 -297
- package/Libraries/WebSocket/__mocks__/event-target-shim.js +0 -27
- package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +0 -30
- package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +0 -81
- package/jest/__tests__/setup-test.js +0 -18
- package/src/private/components/VScrollViewNativeComponents.js +0 -25
- package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +0 -267
- package/src/types/third_party/event-target-shim.d.ts +0 -392
- /package/src/private/{devmenu → devsupport/devmenu}/DevMenu.d.ts +0 -0
- /package/src/private/{debugging → devsupport/rndevtools}/FuseboxSessionObserver.js +0 -0
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict-local
|
|
10
|
-
* @generated SignedSource<<
|
|
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 strict-local
|
|
10
|
-
* @generated SignedSource<<
|
|
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<<
|
|
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
|
-
|
|
11
|
+
import Platform from '../Utilities/Platform';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
get(key: string): any
|
|
15
|
-
|
|
16
|
-
|
|
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)
|
|
3
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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';
|
|
@@ -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
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
import type {
|
|
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' |
|
|
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?:
|
|
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
|
-
|
|
730
|
-
type: '
|
|
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?:
|
|
781
|
-
borderBottomEndRadius?:
|
|
782
|
-
borderBottomLeftRadius?:
|
|
783
|
-
borderBottomRightRadius?:
|
|
784
|
-
borderBottomStartRadius?:
|
|
785
|
-
borderEndEndRadius?:
|
|
786
|
-
borderEndStartRadius?:
|
|
787
|
-
borderStartEndRadius?:
|
|
788
|
-
borderStartStartRadius?:
|
|
789
|
-
borderTopEndRadius?:
|
|
790
|
-
borderTopLeftRadius?:
|
|
791
|
-
borderTopRightRadius?:
|
|
792
|
-
borderTopStartRadius?:
|
|
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?:
|
|
795
|
-
borderBottomWidth?:
|
|
796
|
-
borderEndWidth?:
|
|
797
|
-
borderLeftWidth?:
|
|
798
|
-
borderRightWidth?:
|
|
799
|
-
borderStartWidth?:
|
|
800
|
-
borderTopWidth?:
|
|
801
|
-
opacity?:
|
|
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?:
|
|
846
|
+
outlineOffset?: number,
|
|
804
847
|
outlineStyle?: 'solid' | 'dotted' | 'dashed',
|
|
805
|
-
outlineWidth?:
|
|
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<
|
|
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 =
|
|
996
|
-
Partial<
|
|
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
|
}
|