@office-iss/react-native-win32 0.0.0-canary.291 → 0.0.0-canary.292
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 +16 -1
- package/CHANGELOG.md +12 -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/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/Components/DrawerAndroid/DrawerLayoutAndroid.ios.js +15 -0
- 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 +2 -0
- package/Libraries/Components/Pressable/Pressable.win32.js +2 -0
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +12 -2
- package/Libraries/Components/RefreshControl/RefreshControl.js +1 -1
- package/Libraries/Components/ScrollView/ScrollView.js +128 -116
- package/Libraries/Components/StaticRenderer.js +1 -1
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +1 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -4
- package/Libraries/Components/TextInput/TextInput.flow.js +35 -43
- package/Libraries/Components/TextInput/TextInput.flow.win32.js +1184 -0
- package/Libraries/Components/TextInput/TextInput.js +65 -1005
- package/Libraries/Components/TextInput/TextInput.win32.js +67 -1037
- package/Libraries/Components/ToastAndroid/ToastAndroid.ios.js +13 -0
- 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/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/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 -4
- package/Libraries/Image/ImageTypes.flow.js +1 -1
- package/Libraries/Lists/FlatList.js +1 -1
- package/Libraries/Lists/SectionList.js +1 -1
- package/Libraries/Lists/SectionListModern.js +2 -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/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/ReactPrivate/ReactNativePrivateInterface.js +2 -2
- 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.js +28 -30
- package/Libraries/StyleSheet/flattenStyle.js +7 -1
- package/Libraries/Text/Text.js +3 -3
- package/Libraries/Text/Text.win32.js +3 -3
- 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.win32.js +5 -5
- package/overrides.json +23 -17
- package/package.json +12 -12
- 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/featureflags/ReactNativeFeatureFlags.js +21 -32
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +5 -6
- package/src/private/inspector/BorderBox.js +1 -1
- package/src/private/inspector/BoxInspector.js +1 -1
- package/src/private/inspector/ElementBox.js +1 -1
- package/src/private/inspector/ElementProperties.js +1 -1
- package/src/private/inspector/Inspector.js +2 -2
- package/src/private/inspector/InspectorOverlay.js +1 -1
- package/src/private/inspector/InspectorPanel.js +1 -1
- package/src/private/inspector/NetworkOverlay.js +1 -1
- package/src/private/inspector/PerformanceOverlay.js +1 -1
- package/src/private/inspector/StyleInspector.js +1 -1
- package/src/private/types/HostComponent.js +1 -1
- package/src/private/types/HostInstance.js +10 -2
- package/src/private/webapis/performance/Performance.js +1 -3
- package/Libraries/Blob/FileReader_new.js +0 -231
- package/Libraries/Blob/FileReader_old.js +0 -186
- package/Libraries/Events/CustomEvent.js +0 -32
- package/Libraries/Events/EventPolyfill.js +0 -239
- package/Libraries/Network/XMLHttpRequest_new.js +0 -794
- package/Libraries/Network/XMLHttpRequest_old.js +0 -701
- 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/src/private/components/VScrollViewNativeComponents.js +0 -25
- package/src/types/third_party/event-target-shim.d.ts +0 -392
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import StyleSheet from '../../StyleSheet/StyleSheet';
|
|
12
12
|
import Text from '../../Text/Text';
|
|
13
13
|
import Platform from '../../Utilities/Platform';
|
|
14
|
-
import React from 'react';
|
|
14
|
+
import * as React from 'react';
|
|
15
15
|
|
|
16
16
|
const styles = StyleSheet.create({
|
|
17
17
|
highlight: {
|
|
@@ -14,7 +14,7 @@ import Text from '../../Text/Text';
|
|
|
14
14
|
import useColorScheme from '../../Utilities/useColorScheme';
|
|
15
15
|
import Colors from './Colors';
|
|
16
16
|
import HermesBadge from './HermesBadge';
|
|
17
|
-
import React from 'react';
|
|
17
|
+
import * as React from 'react';
|
|
18
18
|
|
|
19
19
|
const Header = (): React.Node => {
|
|
20
20
|
const isDarkMode = useColorScheme() === 'dark';
|
|
@@ -13,7 +13,7 @@ import StyleSheet from '../../StyleSheet/StyleSheet';
|
|
|
13
13
|
import Text from '../../Text/Text';
|
|
14
14
|
import useColorScheme from '../../Utilities/useColorScheme';
|
|
15
15
|
import Colors from './Colors';
|
|
16
|
-
import React from 'react';
|
|
16
|
+
import * as React from 'react';
|
|
17
17
|
|
|
18
18
|
const HermesBadge = (): React.Node => {
|
|
19
19
|
const isDarkMode = useColorScheme() === 'dark';
|
|
@@ -15,7 +15,7 @@ import StyleSheet from '../../StyleSheet/StyleSheet';
|
|
|
15
15
|
import Text from '../../Text/Text';
|
|
16
16
|
import useColorScheme from '../../Utilities/useColorScheme';
|
|
17
17
|
import Colors from './Colors';
|
|
18
|
-
import React
|
|
18
|
+
import * as React from 'react';
|
|
19
19
|
|
|
20
20
|
const links = [
|
|
21
21
|
{
|
|
@@ -84,7 +84,7 @@ const LinkList = (): React.Node => {
|
|
|
84
84
|
return (
|
|
85
85
|
<View style={styles.container}>
|
|
86
86
|
{links.map(({id, title, link, description}) => (
|
|
87
|
-
<Fragment key={id}>
|
|
87
|
+
<React.Fragment key={id}>
|
|
88
88
|
<View
|
|
89
89
|
style={[
|
|
90
90
|
styles.separator,
|
|
@@ -108,7 +108,7 @@ const LinkList = (): React.Node => {
|
|
|
108
108
|
{description}
|
|
109
109
|
</Text>
|
|
110
110
|
</TouchableOpacity>
|
|
111
|
-
</Fragment>
|
|
111
|
+
</React.Fragment>
|
|
112
112
|
))}
|
|
113
113
|
</View>
|
|
114
114
|
);
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import StyleSheet from '../../StyleSheet/StyleSheet';
|
|
12
12
|
import Text from '../../Text/Text';
|
|
13
13
|
import Platform from '../../Utilities/Platform';
|
|
14
|
-
import React from 'react';
|
|
14
|
+
import * as React from 'react';
|
|
15
15
|
|
|
16
16
|
const styles = StyleSheet.create({
|
|
17
17
|
highlight: {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import typeof * as SystraceModule from './Systrace';
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const TRACE_TAG_REACT = 1 << 13; // eslint-disable-line no-bitwise
|
|
14
14
|
|
|
15
15
|
let _asyncCookie = 0;
|
|
16
16
|
|
|
@@ -32,7 +32,7 @@ type EventArgs = ?{[string]: string};
|
|
|
32
32
|
*/
|
|
33
33
|
export function isEnabled(): boolean {
|
|
34
34
|
return global.nativeTraceIsTracing
|
|
35
|
-
? global.nativeTraceIsTracing(
|
|
35
|
+
? global.nativeTraceIsTracing(TRACE_TAG_REACT)
|
|
36
36
|
: Boolean(global.__RCTProfileIsProfiling);
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -52,7 +52,7 @@ export function beginEvent(eventName: EventName, args?: EventArgs): void {
|
|
|
52
52
|
if (isEnabled()) {
|
|
53
53
|
const eventNameString =
|
|
54
54
|
typeof eventName === 'function' ? eventName() : eventName;
|
|
55
|
-
global.nativeTraceBeginSection(
|
|
55
|
+
global.nativeTraceBeginSection(TRACE_TAG_REACT, eventNameString, args);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -61,7 +61,7 @@ export function beginEvent(eventName: EventName, args?: EventArgs): void {
|
|
|
61
61
|
*/
|
|
62
62
|
export function endEvent(args?: EventArgs): void {
|
|
63
63
|
if (isEnabled()) {
|
|
64
|
-
global.nativeTraceEndSection(
|
|
64
|
+
global.nativeTraceEndSection(TRACE_TAG_REACT, args);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -80,7 +80,7 @@ export function beginAsyncEvent(
|
|
|
80
80
|
const eventNameString =
|
|
81
81
|
typeof eventName === 'function' ? eventName() : eventName;
|
|
82
82
|
global.nativeTraceBeginAsyncSection(
|
|
83
|
-
|
|
83
|
+
TRACE_TAG_REACT,
|
|
84
84
|
eventNameString,
|
|
85
85
|
cookie,
|
|
86
86
|
args,
|
|
@@ -102,7 +102,7 @@ export function endAsyncEvent(
|
|
|
102
102
|
const eventNameString =
|
|
103
103
|
typeof eventName === 'function' ? eventName() : eventName;
|
|
104
104
|
global.nativeTraceEndAsyncSection(
|
|
105
|
-
|
|
105
|
+
TRACE_TAG_REACT,
|
|
106
106
|
eventNameString,
|
|
107
107
|
cookie,
|
|
108
108
|
args,
|
|
@@ -118,7 +118,7 @@ export function counterEvent(eventName: EventName, value: number): void {
|
|
|
118
118
|
const eventNameString =
|
|
119
119
|
typeof eventName === 'function' ? eventName() : eventName;
|
|
120
120
|
global.nativeTraceCounter &&
|
|
121
|
-
global.nativeTraceCounter(
|
|
121
|
+
global.nativeTraceCounter(TRACE_TAG_REACT, eventNameString, value);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* @flow strict-local
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import typeof CustomEvent from '../../src/private/webapis/dom/events/CustomEvent';
|
|
11
12
|
import typeof BatchedBridge from '../BatchedBridge/BatchedBridge';
|
|
12
13
|
import typeof legacySendAccessibilityEvent from '../Components/AccessibilityInfo/legacySendAccessibilityEvent';
|
|
13
14
|
import typeof TextInputState from '../Components/TextInput/TextInputState';
|
|
@@ -15,7 +16,6 @@ import typeof ExceptionsManager from '../Core/ExceptionsManager';
|
|
|
15
16
|
import typeof RawEventEmitter from '../Core/RawEventEmitter';
|
|
16
17
|
import typeof ReactFiberErrorDialog from '../Core/ReactFiberErrorDialog';
|
|
17
18
|
import typeof RCTEventEmitter from '../EventEmitter/RCTEventEmitter';
|
|
18
|
-
import typeof CustomEvent from '../Events/CustomEvent';
|
|
19
19
|
import typeof {
|
|
20
20
|
createPublicInstance,
|
|
21
21
|
createPublicRootInstance,
|
|
@@ -99,7 +99,7 @@ module.exports = {
|
|
|
99
99
|
return require('../Core/RawEventEmitter').default;
|
|
100
100
|
},
|
|
101
101
|
get CustomEvent(): CustomEvent {
|
|
102
|
-
return require('
|
|
102
|
+
return require('../../src/private/webapis/dom/events/CustomEvent').default;
|
|
103
103
|
},
|
|
104
104
|
get createAttributePayload(): createAttributePayload {
|
|
105
105
|
return require('../ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload')
|
|
@@ -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
|
|
@@ -777,32 +776,32 @@ export type ____ViewStyle_InternalBase = $ReadOnly<{
|
|
|
777
776
|
borderBlockColor?: ____ColorValue_Internal,
|
|
778
777
|
borderBlockEndColor?: ____ColorValue_Internal,
|
|
779
778
|
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?:
|
|
779
|
+
borderRadius?: number | string,
|
|
780
|
+
borderBottomEndRadius?: number | string,
|
|
781
|
+
borderBottomLeftRadius?: number | string,
|
|
782
|
+
borderBottomRightRadius?: number | string,
|
|
783
|
+
borderBottomStartRadius?: number | string,
|
|
784
|
+
borderEndEndRadius?: number | string,
|
|
785
|
+
borderEndStartRadius?: number | string,
|
|
786
|
+
borderStartEndRadius?: number | string,
|
|
787
|
+
borderStartStartRadius?: number | string,
|
|
788
|
+
borderTopEndRadius?: number | string,
|
|
789
|
+
borderTopLeftRadius?: number | string,
|
|
790
|
+
borderTopRightRadius?: number | string,
|
|
791
|
+
borderTopStartRadius?: number | string,
|
|
793
792
|
borderStyle?: 'solid' | 'dotted' | 'dashed',
|
|
794
|
-
borderWidth?:
|
|
795
|
-
borderBottomWidth?:
|
|
796
|
-
borderEndWidth?:
|
|
797
|
-
borderLeftWidth?:
|
|
798
|
-
borderRightWidth?:
|
|
799
|
-
borderStartWidth?:
|
|
800
|
-
borderTopWidth?:
|
|
801
|
-
opacity?:
|
|
793
|
+
borderWidth?: number,
|
|
794
|
+
borderBottomWidth?: number,
|
|
795
|
+
borderEndWidth?: number,
|
|
796
|
+
borderLeftWidth?: number,
|
|
797
|
+
borderRightWidth?: number,
|
|
798
|
+
borderStartWidth?: number,
|
|
799
|
+
borderTopWidth?: number,
|
|
800
|
+
opacity?: number,
|
|
802
801
|
outlineColor?: ____ColorValue_Internal,
|
|
803
|
-
outlineOffset?:
|
|
802
|
+
outlineOffset?: number,
|
|
804
803
|
outlineStyle?: 'solid' | 'dotted' | 'dashed',
|
|
805
|
-
outlineWidth?:
|
|
804
|
+
outlineWidth?: number,
|
|
806
805
|
elevation?: number,
|
|
807
806
|
pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only',
|
|
808
807
|
cursor?: CursorValue,
|
|
@@ -992,9 +991,8 @@ export type ____DangerouslyImpreciseStyleProp_Internal = StyleProp<
|
|
|
992
991
|
Partial<____DangerouslyImpreciseStyle_Internal>,
|
|
993
992
|
>;
|
|
994
993
|
|
|
995
|
-
export type ____DangerouslyImpreciseAnimatedStyleProp_Internal =
|
|
996
|
-
Partial<
|
|
997
|
-
>;
|
|
994
|
+
export type ____DangerouslyImpreciseAnimatedStyleProp_Internal =
|
|
995
|
+
WithAnimatedValue<StyleProp<Partial<____DangerouslyImpreciseStyle_Internal>>>;
|
|
998
996
|
|
|
999
997
|
export type ____ViewStyleProp_Internal = StyleProp<
|
|
1000
998
|
$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
|
}
|
package/Libraries/Text/Text.js
CHANGED
|
@@ -35,7 +35,7 @@ type TextForwardRef = React.ElementRef<
|
|
|
35
35
|
*
|
|
36
36
|
* @see https://reactnative.dev/docs/text
|
|
37
37
|
*/
|
|
38
|
-
const
|
|
38
|
+
const TextImpl: component(
|
|
39
39
|
ref?: React.RefSetter<TextForwardRef>,
|
|
40
40
|
...props: TextProps
|
|
41
41
|
) = React.forwardRef(
|
|
@@ -330,7 +330,7 @@ const Text: component(
|
|
|
330
330
|
},
|
|
331
331
|
);
|
|
332
332
|
|
|
333
|
-
|
|
333
|
+
TextImpl.displayName = 'Text';
|
|
334
334
|
|
|
335
335
|
type TextPressabilityProps = $ReadOnly<{
|
|
336
336
|
onLongPress?: ?(event: GestureResponderEvent) => mixed,
|
|
@@ -536,4 +536,4 @@ const verticalAlignToTextAlignVerticalMap = {
|
|
|
536
536
|
middle: 'center',
|
|
537
537
|
};
|
|
538
538
|
|
|
539
|
-
export default
|
|
539
|
+
export default TextImpl;
|
|
@@ -35,7 +35,7 @@ type TextForwardRef = React.ElementRef<
|
|
|
35
35
|
*
|
|
36
36
|
* @see https://reactnative.dev/docs/text
|
|
37
37
|
*/
|
|
38
|
-
const
|
|
38
|
+
const TextImpl: component(
|
|
39
39
|
ref?: React.RefSetter<TextForwardRef>,
|
|
40
40
|
...props: TextProps
|
|
41
41
|
) = React.forwardRef(
|
|
@@ -370,7 +370,7 @@ const Text: component(
|
|
|
370
370
|
},
|
|
371
371
|
);
|
|
372
372
|
|
|
373
|
-
|
|
373
|
+
TextImpl.displayName = 'Text';
|
|
374
374
|
|
|
375
375
|
type TextPressabilityProps = $ReadOnly<{
|
|
376
376
|
onLongPress?: ?(event: GestureResponderEvent) => mixed,
|
|
@@ -576,4 +576,4 @@ const verticalAlignToTextAlignVerticalMap = {
|
|
|
576
576
|
middle: 'center',
|
|
577
577
|
};
|
|
578
578
|
|
|
579
|
-
export default
|
|
579
|
+
export default TextImpl;
|
|
@@ -16,6 +16,8 @@ import NativeEventEmitter from '../EventEmitter/NativeEventEmitter';
|
|
|
16
16
|
import EventEmitter from '../vendor/emitter/EventEmitter';
|
|
17
17
|
import invariant from 'invariant';
|
|
18
18
|
|
|
19
|
+
export type {AppearancePreferences};
|
|
20
|
+
|
|
19
21
|
type Appearance = {
|
|
20
22
|
colorScheme: ?ColorSchemeName,
|
|
21
23
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import BackHandler from './BackHandler';
|
|
16
|
+
|
|
17
|
+
export default BackHandler;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 strict
|
|
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
|
+
import Platform from './Platform';
|
|
16
|
+
|
|
17
|
+
export default Platform;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import type {ReactTestRenderer as ReactTestRendererType} from 'react-test-renderer';
|
|
14
14
|
|
|
15
15
|
import TouchableWithoutFeedback from '../Components/Touchable/TouchableWithoutFeedback';
|
|
16
|
-
import React from 'react';
|
|
16
|
+
import * as React from 'react';
|
|
17
17
|
import ReactTestRenderer from 'react-test-renderer';
|
|
18
18
|
|
|
19
19
|
const Switch = require('../Components/Switch/Switch').default;
|