@office-iss/react-native-win32 0.0.0-canary.257 → 0.0.0-canary.259
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 +3 -3
- package/CHANGELOG.json +55 -1
- package/CHANGELOG.md +28 -8
- package/Libraries/Alert/Alert.js +3 -0
- package/Libraries/Animated/nodes/AnimatedValue.js +1 -0
- package/Libraries/Animated/useAnimatedProps.js +68 -3
- package/Libraries/BatchedBridge/NativeModules.js +2 -0
- package/Libraries/Components/ScrollView/ScrollView.js +124 -165
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +3 -0
- package/Libraries/Components/TextInput/TextInput.js +204 -73
- package/Libraries/Components/TextInput/TextInput.win32.js +204 -79
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +11 -0
- package/Libraries/Core/ErrorHandlers.js +9 -0
- package/Libraries/Core/ExceptionsManager.js +2 -0
- package/Libraries/Core/InitializeCore.js +2 -0
- package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
- package/Libraries/Core/ReactNativeVersion.js +3 -3
- package/Libraries/Core/ReactNativeVersionCheck.win32.js +1 -1
- package/Libraries/Core/setUpGlobals.js +1 -0
- package/Libraries/Core/setUpReactRefresh.js +0 -4
- package/Libraries/Image/ImageViewNativeComponent.js +1 -0
- package/Libraries/Interaction/TaskQueue.js +1 -0
- package/Libraries/Lists/SectionList.js +1 -1
- package/Libraries/LogBox/Data/LogBoxData.js +1 -0
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +20 -8
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +20 -8
- package/Libraries/NativeComponent/BaseViewConfig.android.js +1 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +3 -0
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +3 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +9 -2
- package/Libraries/ReactNative/AppContainer-dev.js +1 -5
- package/Libraries/ReactNative/AppContainer-prod.js +1 -5
- package/Libraries/ReactNative/AppContainer.js +0 -1
- package/Libraries/ReactNative/AppRegistry.js +0 -6
- package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
- package/Libraries/ReactNative/renderApplication.js +0 -2
- package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +46 -0
- package/Libraries/StyleSheet/StyleSheetTypes.js +48 -5
- package/Libraries/StyleSheet/processBoxShadow.js +211 -0
- package/Libraries/StyleSheet/processFilter.js +226 -41
- package/Libraries/Text/Text.js +393 -196
- package/Libraries/Text/Text.win32.js +440 -228
- package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
- package/Libraries/Types/CodegenTypes.js +3 -1
- package/Libraries/Utilities/HMRClient.js +1 -0
- package/Libraries/Utilities/Platform.android.js +1 -1
- package/Libraries/Utilities/Platform.d.ts +1 -1
- package/Libraries/Utilities/Platform.flow.js +2 -2
- package/Libraries/Utilities/Platform.flow.win32.js +3 -3
- package/Libraries/Utilities/Platform.ios.js +1 -1
- package/Libraries/Utilities/Platform.win32.js +1 -1
- package/Libraries/vendor/emitter/EventEmitter.js +1 -0
- package/index.js +1 -0
- package/index.win32.js +1 -0
- package/jest/mockComponent.js +4 -1
- package/jest/setup.js +8 -1
- package/overrides.json +11 -11
- package/package.json +23 -23
- package/src/private/core/components/HScrollViewNativeComponents.js +55 -0
- package/src/private/core/components/VScrollViewNativeComponents.js +47 -0
- package/src/private/core/components/useSyncOnScroll.js +48 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +70 -12
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +12 -4
- package/src/private/specs/modules/NativeLinkingManager.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsAndroid.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsIOS.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsWin.js +8 -1
- package/src/private/specs/modules/NativeSampleTurboModule.js +14 -1
- package/src/private/webapis/performance/PerformanceEntry.js +1 -1
- package/src/private/webapis/performance/RawPerformanceEntry.js +5 -0
- package/types/experimental.d.ts +12 -1
- package/Libraries/Text/TextOptimized.js +0 -538
|
@@ -28,14 +28,17 @@ export function onUncaughtError(errorValue: mixed, errorInfo: ErrorInfo): void {
|
|
|
28
28
|
if (errorValue instanceof Error) {
|
|
29
29
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
30
30
|
* this parameters */
|
|
31
|
+
// $FlowFixMe[incompatible-cast]
|
|
31
32
|
error = (errorValue: ExtendedError);
|
|
32
33
|
} else if (typeof errorValue === 'string') {
|
|
33
34
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
34
35
|
* this parameters */
|
|
36
|
+
// $FlowFixMe[incompatible-cast]
|
|
35
37
|
error = (new SyntheticError(errorValue): ExtendedError);
|
|
36
38
|
} else {
|
|
37
39
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
38
40
|
* this parameters */
|
|
41
|
+
// $FlowFixMe[incompatible-cast]
|
|
39
42
|
error = (new SyntheticError('Unspecified error'): ExtendedError);
|
|
40
43
|
}
|
|
41
44
|
try {
|
|
@@ -58,14 +61,17 @@ export function onCaughtError(errorValue: mixed, errorInfo: ErrorInfo): void {
|
|
|
58
61
|
if (errorValue instanceof Error) {
|
|
59
62
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
60
63
|
* this parameters */
|
|
64
|
+
// $FlowFixMe[incompatible-cast]
|
|
61
65
|
error = (errorValue: ExtendedError);
|
|
62
66
|
} else if (typeof errorValue === 'string') {
|
|
63
67
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
64
68
|
* this parameters */
|
|
69
|
+
// $FlowFixMe[incompatible-cast]
|
|
65
70
|
error = (new SyntheticError(errorValue): ExtendedError);
|
|
66
71
|
} else {
|
|
67
72
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
68
73
|
* this parameters */
|
|
74
|
+
// $FlowFixMe[incompatible-cast]
|
|
69
75
|
error = (new SyntheticError('Unspecified error'): ExtendedError);
|
|
70
76
|
}
|
|
71
77
|
try {
|
|
@@ -91,14 +97,17 @@ export function onRecoverableError(
|
|
|
91
97
|
if (errorValue instanceof Error) {
|
|
92
98
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
93
99
|
* this parameters */
|
|
100
|
+
// $FlowFixMe[incompatible-cast]
|
|
94
101
|
error = (errorValue: ExtendedError);
|
|
95
102
|
} else if (typeof errorValue === 'string') {
|
|
96
103
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
97
104
|
* this parameters */
|
|
105
|
+
// $FlowFixMe[incompatible-cast]
|
|
98
106
|
error = (new SyntheticError(errorValue): ExtendedError);
|
|
99
107
|
} else {
|
|
100
108
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
101
109
|
* this parameters */
|
|
110
|
+
// $FlowFixMe[incompatible-cast]
|
|
102
111
|
error = (new SyntheticError('Unspecified error'): ExtendedError);
|
|
103
112
|
}
|
|
104
113
|
try {
|
|
@@ -154,6 +154,7 @@ function handleException(e: mixed, isFatal: boolean) {
|
|
|
154
154
|
inExceptionHandler = true;
|
|
155
155
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for this
|
|
156
156
|
* parameters */
|
|
157
|
+
// $FlowFixMe[incompatible-call]
|
|
157
158
|
reportException(error, isFatal, /*reportToConsole*/ true);
|
|
158
159
|
} finally {
|
|
159
160
|
inExceptionHandler = false;
|
|
@@ -225,6 +226,7 @@ function reactConsoleErrorHandler(...args) {
|
|
|
225
226
|
reportException(
|
|
226
227
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for this
|
|
227
228
|
* parameters */
|
|
229
|
+
// $FlowFixMe[incompatible-call]
|
|
228
230
|
error,
|
|
229
231
|
false, // isFatal
|
|
230
232
|
false, // reportToConsole
|
|
@@ -32,14 +32,17 @@ const ReactFiberErrorDialog = {
|
|
|
32
32
|
if (errorValue instanceof Error) {
|
|
33
33
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
34
34
|
* this parameters */
|
|
35
|
+
// $FlowFixMe[incompatible-cast]
|
|
35
36
|
error = (errorValue: ExtendedError);
|
|
36
37
|
} else if (typeof errorValue === 'string') {
|
|
37
38
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
38
39
|
* this parameters */
|
|
40
|
+
// $FlowFixMe[incompatible-cast]
|
|
39
41
|
error = (new SyntheticError(errorValue): ExtendedError);
|
|
40
42
|
} else {
|
|
41
43
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
42
44
|
* this parameters */
|
|
45
|
+
// $FlowFixMe[incompatible-cast]
|
|
43
46
|
error = (new SyntheticError('Unspecified error'): ExtendedError);
|
|
44
47
|
}
|
|
45
48
|
try {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
* @flow strict
|
|
8
|
-
* @generated by scripts/releases/set-
|
|
8
|
+
* @generated by scripts/releases/set-version.js
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
const version: $ReadOnly<{
|
|
@@ -15,9 +15,9 @@ const version: $ReadOnly<{
|
|
|
15
15
|
prerelease: string | null,
|
|
16
16
|
}> = {
|
|
17
17
|
major: 0,
|
|
18
|
-
minor:
|
|
18
|
+
minor: 76,
|
|
19
19
|
patch: 0,
|
|
20
|
-
prerelease: 'nightly-
|
|
20
|
+
prerelease: 'nightly-20240719-6d56cea28',
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
module.exports = {version};
|
|
@@ -36,7 +36,7 @@ const checkVersions = function checkVersions(): void {
|
|
|
36
36
|
`Native version: ${_formatVersion(nativeVersion)}\n\n` +
|
|
37
37
|
'Make sure that you have rebuilt the native code. If the problem ' +
|
|
38
38
|
'persists try clearing the Watchman and packager caches with ' +
|
|
39
|
-
'`watchman watch-del-all && npx react-native start --reset-cache`.',
|
|
39
|
+
'`watchman watch-del-all && npx @react-native-community/cli start --reset-cache`.',
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
@@ -36,10 +36,6 @@ if (__DEV__) {
|
|
|
36
36
|
register: ReactRefreshRuntime.register,
|
|
37
37
|
|
|
38
38
|
performReactRefresh() {
|
|
39
|
-
if (ReactRefreshRuntime.hasUnrecoverableErrors()) {
|
|
40
|
-
DevSettings.reload('Fast Refresh - Unrecoverable');
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
39
|
ReactRefreshRuntime.performReactRefresh();
|
|
44
40
|
DevSettings.onFastRefresh();
|
|
45
41
|
},
|
|
@@ -55,7 +55,7 @@ type OptionalProps<SectionT: SectionBase<any>> = {|
|
|
|
55
55
|
...
|
|
56
56
|
},
|
|
57
57
|
...
|
|
58
|
-
}) => null | React.
|
|
58
|
+
}) => null | React.Node,
|
|
59
59
|
/**
|
|
60
60
|
* A marker property for telling the list to re-render (since it implements `PureComponent`). If
|
|
61
61
|
* any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the
|
|
@@ -419,6 +419,7 @@ export function withSubscription(
|
|
|
419
419
|
componentDidCatch(err: Error, errorInfo: {componentStack: string, ...}) {
|
|
420
420
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
421
421
|
* this parameters */
|
|
422
|
+
// $FlowFixMe[incompatible-call]
|
|
422
423
|
reportLogBoxError(err, errorInfo.componentStack);
|
|
423
424
|
}
|
|
424
425
|
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import type {ViewProps} from '../../Components/View/ViewPropTypes';
|
|
11
12
|
import type {LogLevel} from '../Data/LogBoxLog';
|
|
12
13
|
|
|
13
|
-
import
|
|
14
|
+
import SafeAreaView from '../../Components/SafeAreaView/SafeAreaView';
|
|
14
15
|
import View from '../../Components/View/View';
|
|
15
16
|
import StyleSheet from '../../StyleSheet/StyleSheet';
|
|
16
17
|
import Text from '../../Text/Text';
|
|
@@ -26,16 +27,30 @@ type Props = $ReadOnly<{
|
|
|
26
27
|
level: LogLevel,
|
|
27
28
|
}>;
|
|
28
29
|
|
|
30
|
+
const LogBoxInspectorHeaderSafeArea: React.AbstractComponent<ViewProps> =
|
|
31
|
+
Platform.OS === 'android'
|
|
32
|
+
? function LogBoxInspectorHeaderSafeArea(props) {
|
|
33
|
+
// NOTE: Inline the import of `StatusBar` so that initializing this module
|
|
34
|
+
// does not require initializing a TurboModule (and main thread one, too).
|
|
35
|
+
const {currentHeight} = require('../../Components/StatusBar/StatusBar');
|
|
36
|
+
const style = StyleSheet.compose(
|
|
37
|
+
{paddingTop: currentHeight},
|
|
38
|
+
props.style,
|
|
39
|
+
);
|
|
40
|
+
return <View {...props} style={style} />;
|
|
41
|
+
}
|
|
42
|
+
: SafeAreaView;
|
|
43
|
+
|
|
29
44
|
export default function LogBoxInspectorHeader(props: Props): React.Node {
|
|
30
45
|
if (props.level === 'syntax') {
|
|
31
46
|
return (
|
|
32
|
-
<
|
|
47
|
+
<LogBoxInspectorHeaderSafeArea style={styles[props.level]}>
|
|
33
48
|
<View style={styles.header}>
|
|
34
49
|
<View style={styles.title}>
|
|
35
50
|
<Text style={styles.titleText}>Failed to compile</Text>
|
|
36
51
|
</View>
|
|
37
52
|
</View>
|
|
38
|
-
</
|
|
53
|
+
</LogBoxInspectorHeaderSafeArea>
|
|
39
54
|
);
|
|
40
55
|
}
|
|
41
56
|
|
|
@@ -47,7 +62,7 @@ export default function LogBoxInspectorHeader(props: Props): React.Node {
|
|
|
47
62
|
const titleText = `Log ${props.selectedIndex + 1} of ${props.total}`;
|
|
48
63
|
|
|
49
64
|
return (
|
|
50
|
-
<
|
|
65
|
+
<LogBoxInspectorHeaderSafeArea style={styles[props.level]}>
|
|
51
66
|
<View style={styles.header}>
|
|
52
67
|
<LogBoxInspectorHeaderButton
|
|
53
68
|
disabled={props.total <= 1}
|
|
@@ -65,7 +80,7 @@ export default function LogBoxInspectorHeader(props: Props): React.Node {
|
|
|
65
80
|
onPress={() => props.onSelectIndex(nextIndex)}
|
|
66
81
|
/>
|
|
67
82
|
</View>
|
|
68
|
-
</
|
|
83
|
+
</LogBoxInspectorHeaderSafeArea>
|
|
69
84
|
);
|
|
70
85
|
}
|
|
71
86
|
|
|
@@ -101,7 +116,4 @@ const styles = StyleSheet.create({
|
|
|
101
116
|
includeFontPadding: false,
|
|
102
117
|
lineHeight: 20,
|
|
103
118
|
},
|
|
104
|
-
safeArea: {
|
|
105
|
-
paddingTop: Platform.OS === 'android' ? StatusBar.currentHeight : 40,
|
|
106
|
-
},
|
|
107
119
|
});
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
+
import type {ViewProps} from '../../Components/View/ViewPropTypes';
|
|
13
14
|
import type {LogLevel} from '../Data/LogBoxLog';
|
|
14
15
|
|
|
15
|
-
import
|
|
16
|
+
import SafeAreaView from '../../Components/SafeAreaView/SafeAreaView';
|
|
16
17
|
import View from '../../Components/View/View';
|
|
17
18
|
import StyleSheet from '../../StyleSheet/StyleSheet';
|
|
18
19
|
import Text from '../../Text/Text';
|
|
@@ -28,16 +29,30 @@ type Props = $ReadOnly<{
|
|
|
28
29
|
level: LogLevel,
|
|
29
30
|
}>;
|
|
30
31
|
|
|
32
|
+
const LogBoxInspectorHeaderSafeArea: React.AbstractComponent<ViewProps> =
|
|
33
|
+
Platform.OS === 'android'
|
|
34
|
+
? function LogBoxInspectorHeaderSafeArea(props) {
|
|
35
|
+
// NOTE: Inline the import of `StatusBar` so that initializing this module
|
|
36
|
+
// does not require initializing a TurboModule (and main thread one, too).
|
|
37
|
+
const {currentHeight} = require('../../Components/StatusBar/StatusBar');
|
|
38
|
+
const style = StyleSheet.compose(
|
|
39
|
+
{paddingTop: currentHeight},
|
|
40
|
+
props.style,
|
|
41
|
+
);
|
|
42
|
+
return <View {...props} style={style} />;
|
|
43
|
+
}
|
|
44
|
+
: SafeAreaView;
|
|
45
|
+
|
|
31
46
|
export default function LogBoxInspectorHeader(props: Props): React.Node {
|
|
32
47
|
if (props.level === 'syntax') {
|
|
33
48
|
return (
|
|
34
|
-
<
|
|
49
|
+
<LogBoxInspectorHeaderSafeArea style={styles[props.level]}>
|
|
35
50
|
<View style={styles.header}>
|
|
36
51
|
<View style={styles.title}>
|
|
37
52
|
<Text style={styles.titleText}>Failed to compile</Text>
|
|
38
53
|
</View>
|
|
39
54
|
</View>
|
|
40
|
-
</
|
|
55
|
+
</LogBoxInspectorHeaderSafeArea>
|
|
41
56
|
);
|
|
42
57
|
}
|
|
43
58
|
|
|
@@ -49,7 +64,7 @@ export default function LogBoxInspectorHeader(props: Props): React.Node {
|
|
|
49
64
|
const titleText = `Log ${props.selectedIndex + 1} of ${props.total}`;
|
|
50
65
|
|
|
51
66
|
return (
|
|
52
|
-
<
|
|
67
|
+
<LogBoxInspectorHeaderSafeArea style={styles[props.level]}>
|
|
53
68
|
<View style={styles.header}>
|
|
54
69
|
<LogBoxInspectorHeaderButton
|
|
55
70
|
disabled={props.total <= 1}
|
|
@@ -67,7 +82,7 @@ export default function LogBoxInspectorHeader(props: Props): React.Node {
|
|
|
67
82
|
onPress={() => props.onSelectIndex(nextIndex)}
|
|
68
83
|
/>
|
|
69
84
|
</View>
|
|
70
|
-
</
|
|
85
|
+
</LogBoxInspectorHeaderSafeArea>
|
|
71
86
|
);
|
|
72
87
|
}
|
|
73
88
|
|
|
@@ -106,7 +121,4 @@ const styles = StyleSheet.create({
|
|
|
106
121
|
includeFontPadding: false,
|
|
107
122
|
lineHeight: 20,
|
|
108
123
|
},
|
|
109
|
-
safeArea: {
|
|
110
|
-
paddingTop: Platform.OS === 'android' ? StatusBar.currentHeight : 40,
|
|
111
|
-
},
|
|
112
124
|
});
|
|
@@ -169,6 +169,7 @@ const validAttributesForNonEventProps = {
|
|
|
169
169
|
experimental_filter: {
|
|
170
170
|
process: require('../StyleSheet/processFilter').default,
|
|
171
171
|
},
|
|
172
|
+
experimental_mixBlendMode: true,
|
|
172
173
|
opacity: true,
|
|
173
174
|
elevation: true,
|
|
174
175
|
shadowColor: {process: require('../StyleSheet/processColor').default},
|
|
@@ -223,6 +223,9 @@ const validAttributesForNonEventProps = {
|
|
|
223
223
|
experimental_filter: {
|
|
224
224
|
process: require('../StyleSheet/processFilter').default,
|
|
225
225
|
},
|
|
226
|
+
experimental_boxShadow: {
|
|
227
|
+
process: require('../StyleSheet/processBoxShadow').default,
|
|
228
|
+
},
|
|
226
229
|
|
|
227
230
|
borderTopWidth: true,
|
|
228
231
|
borderTopColor: {process: require('../StyleSheet/processColor').default},
|
|
@@ -223,6 +223,9 @@ const validAttributesForNonEventProps = {
|
|
|
223
223
|
experimental_filter: {
|
|
224
224
|
process: require('../StyleSheet/processFilter').default,
|
|
225
225
|
},
|
|
226
|
+
experimental_boxShadow: {
|
|
227
|
+
process: require('../StyleSheet/processBoxShadow').default,
|
|
228
|
+
},
|
|
226
229
|
|
|
227
230
|
borderTopWidth: true,
|
|
228
231
|
borderTopColor: {process: require('../StyleSheet/processColor').default},
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import type {
|
|
12
12
|
HostComponent,
|
|
13
13
|
PartialViewConfig,
|
|
14
|
+
ViewConfig,
|
|
14
15
|
} from '../Renderer/shims/ReactNativeTypes';
|
|
15
16
|
|
|
16
17
|
import getNativeComponentAttributes from '../ReactNative/getNativeComponentAttributes';
|
|
@@ -60,7 +61,7 @@ export function get<Config>(
|
|
|
60
61
|
verify: false,
|
|
61
62
|
};
|
|
62
63
|
|
|
63
|
-
let viewConfig;
|
|
64
|
+
let viewConfig: ViewConfig;
|
|
64
65
|
if (native) {
|
|
65
66
|
viewConfig =
|
|
66
67
|
getNativeComponentAttributes(name) ??
|
|
@@ -81,7 +82,13 @@ export function get<Config>(
|
|
|
81
82
|
const nativeViewConfig = native
|
|
82
83
|
? viewConfig
|
|
83
84
|
: getNativeComponentAttributes(name);
|
|
84
|
-
|
|
85
|
+
|
|
86
|
+
if (nativeViewConfig == null) {
|
|
87
|
+
// Defer to static view config if native view config is missing.
|
|
88
|
+
return viewConfig;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const staticViewConfig: ViewConfig = native
|
|
85
92
|
? createViewConfig(viewConfigProvider())
|
|
86
93
|
: viewConfig;
|
|
87
94
|
|
|
@@ -90,7 +90,6 @@ const AppContainer = ({
|
|
|
90
90
|
internal_excludeInspector = false,
|
|
91
91
|
internal_excludeLogBox = false,
|
|
92
92
|
rootTag,
|
|
93
|
-
showArchitectureIndicator,
|
|
94
93
|
WrapperComponent,
|
|
95
94
|
rootViewStyle,
|
|
96
95
|
}: Props): React.Node => {
|
|
@@ -150,10 +149,7 @@ const AppContainer = ({
|
|
|
150
149
|
|
|
151
150
|
if (WrapperComponent != null) {
|
|
152
151
|
innerView = (
|
|
153
|
-
<WrapperComponent
|
|
154
|
-
initialProps={initialProps}
|
|
155
|
-
fabric={fabric === true}
|
|
156
|
-
showArchitectureIndicator={showArchitectureIndicator === true}>
|
|
152
|
+
<WrapperComponent initialProps={initialProps} fabric={fabric === true}>
|
|
157
153
|
{innerView}
|
|
158
154
|
</WrapperComponent>
|
|
159
155
|
);
|
|
@@ -21,7 +21,6 @@ const AppContainer = ({
|
|
|
21
21
|
fabric,
|
|
22
22
|
initialProps,
|
|
23
23
|
rootTag,
|
|
24
|
-
showArchitectureIndicator,
|
|
25
24
|
WrapperComponent,
|
|
26
25
|
rootViewStyle,
|
|
27
26
|
}: Props): React.Node => {
|
|
@@ -29,10 +28,7 @@ const AppContainer = ({
|
|
|
29
28
|
|
|
30
29
|
if (WrapperComponent != null) {
|
|
31
30
|
innerView = (
|
|
32
|
-
<WrapperComponent
|
|
33
|
-
initialProps={initialProps}
|
|
34
|
-
fabric={fabric === true}
|
|
35
|
-
showArchitectureIndicator={showArchitectureIndicator === true}>
|
|
31
|
+
<WrapperComponent initialProps={initialProps} fabric={fabric === true}>
|
|
36
32
|
{innerView}
|
|
37
33
|
</WrapperComponent>
|
|
38
34
|
);
|
|
@@ -18,7 +18,6 @@ export type Props = $ReadOnly<{|
|
|
|
18
18
|
fabric?: boolean,
|
|
19
19
|
rootTag: number | RootTag,
|
|
20
20
|
initialProps?: {...},
|
|
21
|
-
showArchitectureIndicator?: boolean,
|
|
22
21
|
WrapperComponent?: ?React.ComponentType<any>,
|
|
23
22
|
rootViewStyle?: ?ViewStyleProp,
|
|
24
23
|
internal_excludeLogBox?: boolean,
|
|
@@ -73,7 +73,6 @@ let componentProviderInstrumentationHook: ComponentProviderInstrumentationHook =
|
|
|
73
73
|
|
|
74
74
|
let wrapperComponentProvider: ?WrapperComponentProvider;
|
|
75
75
|
let rootViewStyleProvider: ?RootViewStyleProvider;
|
|
76
|
-
let showArchitectureIndicator = false;
|
|
77
76
|
|
|
78
77
|
/**
|
|
79
78
|
* `AppRegistry` is the JavaScript entry point to running all React Native apps.
|
|
@@ -89,10 +88,6 @@ const AppRegistry = {
|
|
|
89
88
|
rootViewStyleProvider = provider;
|
|
90
89
|
},
|
|
91
90
|
|
|
92
|
-
enableArchitectureIndicator(enabled: boolean): void {
|
|
93
|
-
showArchitectureIndicator = enabled;
|
|
94
|
-
},
|
|
95
|
-
|
|
96
91
|
registerConfig(config: Array<AppConfig>): void {
|
|
97
92
|
config.forEach(appConfig => {
|
|
98
93
|
if (appConfig.run) {
|
|
@@ -139,7 +134,6 @@ const AppRegistry = {
|
|
|
139
134
|
wrapperComponentProvider && wrapperComponentProvider(appParameters),
|
|
140
135
|
rootViewStyleProvider && rootViewStyleProvider(appParameters),
|
|
141
136
|
appParameters.fabric,
|
|
142
|
-
showArchitectureIndicator,
|
|
143
137
|
scopedPerformanceLogger,
|
|
144
138
|
appKey === 'LogBox', // is logbox
|
|
145
139
|
appKey,
|
|
@@ -35,7 +35,6 @@ export default function renderApplication<Props: Object>(
|
|
|
35
35
|
WrapperComponent?: ?React.ComponentType<any>,
|
|
36
36
|
rootViewStyle?: ?ViewStyleProp,
|
|
37
37
|
fabric?: boolean,
|
|
38
|
-
showArchitectureIndicator?: boolean,
|
|
39
38
|
scopedPerformanceLogger?: IPerformanceLogger,
|
|
40
39
|
isLogBox?: boolean,
|
|
41
40
|
debugName?: string,
|
|
@@ -52,7 +51,6 @@ export default function renderApplication<Props: Object>(
|
|
|
52
51
|
<AppContainer
|
|
53
52
|
rootTag={rootTag}
|
|
54
53
|
fabric={fabric}
|
|
55
|
-
showArchitectureIndicator={showArchitectureIndicator}
|
|
56
54
|
WrapperComponent={WrapperComponent}
|
|
57
55
|
rootViewStyle={rootViewStyle}
|
|
58
56
|
initialProps={initialProps ?? Object.freeze({})}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<4405023a5d82ddc01db31d8eb46a7aa0>>
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import type {ElementRef, ElementType, Element, AbstractComponent} from 'react';
|
|
@@ -86,6 +86,7 @@ export type ViewConfig = $ReadOnly<{
|
|
|
86
86
|
}>,
|
|
87
87
|
...
|
|
88
88
|
}>,
|
|
89
|
+
supportsRawText?: boolean,
|
|
89
90
|
uiViewClassName: string,
|
|
90
91
|
validAttributes: AttributeConfiguration,
|
|
91
92
|
}>;
|
|
@@ -93,6 +94,7 @@ export type ViewConfig = $ReadOnly<{
|
|
|
93
94
|
export type PartialViewConfig = $ReadOnly<{
|
|
94
95
|
bubblingEventTypes?: $PropertyType<ViewConfig, 'bubblingEventTypes'>,
|
|
95
96
|
directEventTypes?: $PropertyType<ViewConfig, 'directEventTypes'>,
|
|
97
|
+
supportsRawText?: boolean,
|
|
96
98
|
uiViewClassName: string,
|
|
97
99
|
validAttributes?: PartialAttributeConfiguration,
|
|
98
100
|
}>;
|
|
@@ -227,6 +227,52 @@ export interface TransformsStyle {
|
|
|
227
227
|
translateY?: AnimatableNumericValue | undefined;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
+
export type FilterFunction =
|
|
231
|
+
| {brightness: number | string}
|
|
232
|
+
| {blur: number | string}
|
|
233
|
+
| {contrast: number | string}
|
|
234
|
+
| {grayscale: number | string}
|
|
235
|
+
| {hueRotate: number | string}
|
|
236
|
+
| {invert: number | string}
|
|
237
|
+
| {opacity: number | string}
|
|
238
|
+
| {saturate: number | string}
|
|
239
|
+
| {sepia: number | string}
|
|
240
|
+
| {dropShadow: DropShadowPrimitive | string};
|
|
241
|
+
|
|
242
|
+
export type DropShadowPrimitive = {
|
|
243
|
+
offsetX: number | string;
|
|
244
|
+
offsetY: number | string;
|
|
245
|
+
standardDeviation?: number | string | undefined;
|
|
246
|
+
color?: ColorValue | number | undefined;
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
export type BoxShadowPrimitive = {
|
|
250
|
+
offsetX: number | string;
|
|
251
|
+
offsetY: number | string;
|
|
252
|
+
color?: string | undefined;
|
|
253
|
+
blurRadius?: ColorValue | number | undefined;
|
|
254
|
+
spreadDistance?: number | string | undefined;
|
|
255
|
+
inset?: boolean | undefined;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
export type BlendMode =
|
|
259
|
+
| 'normal'
|
|
260
|
+
| 'multiply'
|
|
261
|
+
| 'screen'
|
|
262
|
+
| 'overlay'
|
|
263
|
+
| 'darken'
|
|
264
|
+
| 'lighten'
|
|
265
|
+
| 'color-dodge'
|
|
266
|
+
| 'color-burn'
|
|
267
|
+
| 'hard-light'
|
|
268
|
+
| 'soft-light'
|
|
269
|
+
| 'difference'
|
|
270
|
+
| 'exclusion'
|
|
271
|
+
| 'hue'
|
|
272
|
+
| 'saturation'
|
|
273
|
+
| 'color'
|
|
274
|
+
| 'luminosity';
|
|
275
|
+
|
|
230
276
|
/**
|
|
231
277
|
* @see https://reactnative.dev/docs/view#style
|
|
232
278
|
*/
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
13
|
import type AnimatedNode from '../Animated/nodes/AnimatedNode';
|
|
14
|
-
import type {FilterPrimitive} from '../StyleSheet/processFilter';
|
|
15
14
|
import type {
|
|
16
15
|
____DangerouslyImpreciseStyle_InternalOverrides,
|
|
17
16
|
____ImageStyle_InternalOverrides,
|
|
@@ -691,15 +690,56 @@ export type ____ShadowStyle_Internal = $ReadOnly<{
|
|
|
691
690
|
...____ShadowStyle_InternalOverrides,
|
|
692
691
|
}>;
|
|
693
692
|
|
|
694
|
-
type
|
|
695
|
-
|
|
696
|
-
}
|
|
693
|
+
export type FilterFunction =
|
|
694
|
+
| {brightness: number | string}
|
|
695
|
+
| {blur: number | string}
|
|
696
|
+
| {contrast: number | string}
|
|
697
|
+
| {grayscale: number | string}
|
|
698
|
+
| {hueRotate: number | string}
|
|
699
|
+
| {invert: number | string}
|
|
700
|
+
| {opacity: number | string}
|
|
701
|
+
| {saturate: number | string}
|
|
702
|
+
| {sepia: number | string}
|
|
703
|
+
| {dropShadow: DropShadowPrimitive | string};
|
|
704
|
+
|
|
705
|
+
export type DropShadowPrimitive = {
|
|
706
|
+
offsetX: number | string,
|
|
707
|
+
offsetY: number | string,
|
|
708
|
+
standardDeviation?: number | string,
|
|
709
|
+
color?: ____ColorValue_Internal,
|
|
710
|
+
};
|
|
711
|
+
|
|
712
|
+
export type BoxShadowPrimitive = {
|
|
713
|
+
offsetX: number | string,
|
|
714
|
+
offsetY: number | string,
|
|
715
|
+
color?: ____ColorValue_Internal,
|
|
716
|
+
blurRadius?: number | string,
|
|
717
|
+
spreadDistance?: number | string,
|
|
718
|
+
inset?: boolean,
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
type ____BlendMode_Internal =
|
|
722
|
+
| 'normal'
|
|
723
|
+
| 'multiply'
|
|
724
|
+
| 'screen'
|
|
725
|
+
| 'overlay'
|
|
726
|
+
| 'darken'
|
|
727
|
+
| 'lighten'
|
|
728
|
+
| 'color-dodge'
|
|
729
|
+
| 'color-burn'
|
|
730
|
+
| 'hard-light'
|
|
731
|
+
| 'soft-light'
|
|
732
|
+
| 'difference'
|
|
733
|
+
| 'exclusion'
|
|
734
|
+
| 'hue'
|
|
735
|
+
| 'saturation'
|
|
736
|
+
| 'color'
|
|
737
|
+
| 'luminosity';
|
|
697
738
|
|
|
698
739
|
export type ____ViewStyle_InternalCore = $ReadOnly<{
|
|
699
740
|
...$Exact<____LayoutStyle_Internal>,
|
|
700
741
|
...$Exact<____ShadowStyle_Internal>,
|
|
701
742
|
...$Exact<____TransformStyle_Internal>,
|
|
702
|
-
...____FilterStyle_Internal,
|
|
703
743
|
backfaceVisibility?: 'visible' | 'hidden',
|
|
704
744
|
backgroundColor?: ____ColorValue_Internal,
|
|
705
745
|
borderColor?: ____ColorValue_Internal,
|
|
@@ -738,6 +778,9 @@ export type ____ViewStyle_InternalCore = $ReadOnly<{
|
|
|
738
778
|
elevation?: number,
|
|
739
779
|
pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only',
|
|
740
780
|
cursor?: CursorValue,
|
|
781
|
+
experimental_boxShadow?: $ReadOnlyArray<BoxShadowPrimitive>,
|
|
782
|
+
experimental_filter?: $ReadOnlyArray<FilterFunction>,
|
|
783
|
+
experimental_mixBlendMode?: ____BlendMode_Internal,
|
|
741
784
|
}>;
|
|
742
785
|
|
|
743
786
|
export type ____ViewStyle_Internal = $ReadOnly<{
|