@office-iss/react-native-win32 0.0.0-canary.247 → 0.0.0-canary.248
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 -2
- package/CHANGELOG.json +46 -1
- package/CHANGELOG.md +21 -8
- package/Libraries/Animated/NativeAnimatedHelper.js +4 -0
- package/Libraries/Animated/NativeAnimatedHelper.win32.js +4 -0
- package/Libraries/Animated/createAnimatedComponent.js +10 -4
- package/Libraries/Animated/useAnimatedProps.js +1 -0
- package/Libraries/BatchedBridge/MessageQueue.js +1 -0
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +2 -0
- package/Libraries/Components/ScrollView/ScrollView.js +9 -1
- package/Libraries/Components/TextInput/TextInput.js +6 -0
- package/Libraries/Components/TextInput/TextInput.win32.js +6 -0
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
- package/Libraries/Components/View/View.js +0 -11
- package/Libraries/Components/View/View.win32.js +0 -11
- package/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
- package/Libraries/Components/View/ViewPropTypes.js +7 -0
- package/Libraries/Components/View/ViewPropTypes.win32.js +7 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/ImageUtils.js +1 -0
- package/Libraries/Inspector/ElementBox.js +4 -0
- package/Libraries/NativeComponent/BaseViewConfig.android.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +2 -0
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +3 -0
- package/Libraries/Network/XMLHttpRequest.js +1 -0
- package/Libraries/ReactNative/AppRegistry.js +2 -4
- package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +1 -0
- package/Libraries/Renderer/shims/ReactFabric.js +0 -3
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +0 -3
- package/Libraries/Renderer/shims/ReactNative.js +0 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.js +0 -3
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +0 -3
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +0 -3
- package/Libraries/StyleSheet/StyleSheet.js +3 -10
- package/Libraries/StyleSheet/StyleSheet.win32.js +3 -10
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +18 -18
- package/Libraries/StyleSheet/StyleSheetTypes.js +13 -13
- package/Libraries/StyleSheet/flattenStyle.js +1 -0
- package/Libraries/TurboModule/TurboModuleRegistry.js +2 -1
- package/Libraries/Utilities/Dimensions.js +1 -0
- package/Libraries/Utilities/Dimensions.win32.js +1 -0
- package/Libraries/Utilities/RCTLog.js +1 -0
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +11 -6
- package/overrides.json +11 -11
- package/package.json +15 -15
- package/src/private/core/composeStyles.js +27 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +29 -14
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +7 -4
- package/src/private/webapis/dom/geometry/DOMRectReadOnly.js +24 -24
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +4 -4
- package/src/private/webapis/dom/oldstylecollections/DOMRectList.js +4 -4
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +4 -4
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +5 -5
- package/src/private/webapis/performance/MemoryInfo.js +9 -9
- package/src/private/webapis/performance/PerformanceObserver.js +16 -16
- package/src/private/webapis/performance/ReactNativeStartupTiming.js +18 -18
- package/src-win/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
package/.flowconfig
CHANGED
|
@@ -55,7 +55,8 @@
|
|
|
55
55
|
.*/node_modules/playground/.*
|
|
56
56
|
|
|
57
57
|
; Ignore templates for 'react-native init'
|
|
58
|
-
<PROJECT_ROOT>/template/.*
|
|
58
|
+
<PROJECT_ROOT>/packages/react-native/template/.*
|
|
59
|
+
<PROJECT_ROOT>/packages/react-native/sdks/.*
|
|
59
60
|
|
|
60
61
|
; Ignore the Dangerfile
|
|
61
62
|
<PROJECT_ROOT>/packages/react-native-bots/dangerfile.js
|
|
@@ -153,4 +154,4 @@ untyped-import
|
|
|
153
154
|
untyped-type-import
|
|
154
155
|
|
|
155
156
|
[version]
|
|
156
|
-
^0.
|
|
157
|
+
^0.235.1
|
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,52 @@
|
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 23 May 2024 05:15:43 GMT",
|
|
6
|
+
"version": "0.0.0-canary.248",
|
|
7
|
+
"tag": "@office-iss/react-native-win32_v0.0.0-canary.248",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "1422161+marlenecota@users.noreply.github.com",
|
|
12
|
+
"package": "@office-iss/react-native-win32",
|
|
13
|
+
"commit": "3d221a9e154753fce6c1d22bdf6f2e17d6bc41b5",
|
|
14
|
+
"comment": "RN Integration 04/27"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "1422161+marlenecota@users.noreply.github.com",
|
|
18
|
+
"package": "@office-iss/react-native-win32",
|
|
19
|
+
"commit": "9a5ddf602612fcbe088fafbaa80993d7b9f9aace",
|
|
20
|
+
"comment": "RN Integration 05/02"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@office-iss/react-native-win32",
|
|
25
|
+
"comment": "Bump @rnw-scripts/eslint-config to v1.2.18",
|
|
26
|
+
"commit": "not available"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@office-iss/react-native-win32",
|
|
31
|
+
"comment": "Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.22",
|
|
32
|
+
"commit": "not available"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@office-iss/react-native-win32",
|
|
37
|
+
"comment": "Bump @rnw-scripts/just-task to v2.3.34",
|
|
38
|
+
"commit": "not available"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@office-iss/react-native-win32",
|
|
43
|
+
"comment": "Bump react-native-platform-override to v1.9.35",
|
|
44
|
+
"commit": "not available"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"date": "Wed, 22 May 2024 05:18:16 GMT",
|
|
6
51
|
"version": "0.0.0-canary.247",
|
|
7
52
|
"tag": "@office-iss/react-native-win32_v0.0.0-canary.247",
|
|
8
53
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
# Change Log - @office-iss/react-native-win32
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 23 May 2024 05:15:43 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.0.0-canary.
|
|
7
|
+
## 0.0.0-canary.248
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Thu, 23 May 2024 05:15:43 GMT
|
|
10
10
|
|
|
11
11
|
### Changes
|
|
12
12
|
|
|
13
|
-
- RN Integration 04/
|
|
14
|
-
-
|
|
15
|
-
- Bump @rnw-scripts/
|
|
16
|
-
- Bump @rnw-scripts/
|
|
17
|
-
- Bump
|
|
13
|
+
- RN Integration 04/27 (1422161+marlenecota@users.noreply.github.com)
|
|
14
|
+
- RN Integration 05/02 (1422161+marlenecota@users.noreply.github.com)
|
|
15
|
+
- Bump @rnw-scripts/eslint-config to v1.2.18
|
|
16
|
+
- Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.22
|
|
17
|
+
- Bump @rnw-scripts/just-task to v2.3.34
|
|
18
|
+
- Bump react-native-platform-override to v1.9.35
|
|
18
19
|
|
|
20
|
+
## 0.0.0-canary.247
|
|
21
|
+
|
|
22
|
+
Wed, 22 May 2024 05:18:16 GMT
|
|
23
|
+
|
|
24
|
+
### Changes
|
|
25
|
+
|
|
26
|
+
- RN Integration 04/20 (1422161+marlenecota@users.noreply.github.com)
|
|
27
|
+
- Bump @rnw-scripts/eslint-config to v1.2.17
|
|
28
|
+
- Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.21
|
|
29
|
+
- Bump @rnw-scripts/just-task to v2.3.33
|
|
30
|
+
- Bump react-native-platform-override to v1.9.34
|
|
31
|
+
|
|
19
32
|
## 0.0.0-canary.246
|
|
20
33
|
|
|
21
34
|
Wed, 15 May 2024 05:14:52 GMT
|
|
@@ -455,18 +455,22 @@ function addWhitelistedInterpolationParam(param: string): void {
|
|
|
455
455
|
}
|
|
456
456
|
|
|
457
457
|
function isSupportedColorStyleProp(prop: string): boolean {
|
|
458
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
458
459
|
return SUPPORTED_COLOR_STYLES[prop] === true;
|
|
459
460
|
}
|
|
460
461
|
|
|
461
462
|
function isSupportedStyleProp(prop: string): boolean {
|
|
463
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
462
464
|
return SUPPORTED_STYLES[prop] === true;
|
|
463
465
|
}
|
|
464
466
|
|
|
465
467
|
function isSupportedTransformProp(prop: string): boolean {
|
|
468
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
466
469
|
return SUPPORTED_TRANSFORMS[prop] === true;
|
|
467
470
|
}
|
|
468
471
|
|
|
469
472
|
function isSupportedInterpolationParam(param: string): boolean {
|
|
473
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
470
474
|
return SUPPORTED_INTERPOLATION_PARAMS[param] === true;
|
|
471
475
|
}
|
|
472
476
|
|
|
@@ -457,18 +457,22 @@ function addWhitelistedInterpolationParam(param: string): void {
|
|
|
457
457
|
}
|
|
458
458
|
|
|
459
459
|
function isSupportedColorStyleProp(prop: string): boolean {
|
|
460
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
460
461
|
return SUPPORTED_COLOR_STYLES[prop] === true;
|
|
461
462
|
}
|
|
462
463
|
|
|
463
464
|
function isSupportedStyleProp(prop: string): boolean {
|
|
465
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
464
466
|
return SUPPORTED_STYLES[prop] === true;
|
|
465
467
|
}
|
|
466
468
|
|
|
467
469
|
function isSupportedTransformProp(prop: string): boolean {
|
|
470
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
468
471
|
return SUPPORTED_TRANSFORMS[prop] === true;
|
|
469
472
|
}
|
|
470
473
|
|
|
471
474
|
function isSupportedInterpolationParam(param: string): boolean {
|
|
475
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
472
476
|
return SUPPORTED_INTERPOLATION_PARAMS[param] === true;
|
|
473
477
|
}
|
|
474
478
|
|
|
@@ -8,10 +8,12 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import composeStyles from '../../src/private/core/composeStyles';
|
|
11
12
|
import View from '../Components/View/View';
|
|
12
13
|
import useMergeRefs from '../Utilities/useMergeRefs';
|
|
13
14
|
import useAnimatedProps from './useAnimatedProps';
|
|
14
15
|
import * as React from 'react';
|
|
16
|
+
import {useMemo} from 'react';
|
|
15
17
|
|
|
16
18
|
// $FlowFixMe[deprecated-type]
|
|
17
19
|
export type AnimatedProps<Props: {...}> = $ObjMap<
|
|
@@ -44,14 +46,18 @@ export default function createAnimatedComponent<TProps: {...}, TInstance>(
|
|
|
44
46
|
// without these passthrough values.
|
|
45
47
|
// $FlowFixMe[prop-missing]
|
|
46
48
|
const {passthroughAnimatedPropExplicitValues, style} = reducedProps;
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
const passthroughStyle = passthroughAnimatedPropExplicitValues?.style;
|
|
50
|
+
const mergedStyle = useMemo(
|
|
51
|
+
() => composeStyles(style, passthroughStyle),
|
|
52
|
+
[passthroughStyle, style],
|
|
53
|
+
);
|
|
50
54
|
|
|
55
|
+
// NOTE: It is important that `passthroughAnimatedPropExplicitValues` is
|
|
56
|
+
// spread after `reducedProps` but before `style`.
|
|
51
57
|
return (
|
|
52
58
|
<Component
|
|
53
59
|
{...reducedProps}
|
|
54
|
-
{...
|
|
60
|
+
{...passthroughAnimatedPropExplicitValues}
|
|
55
61
|
style={mergedStyle}
|
|
56
62
|
ref={ref}
|
|
57
63
|
/>
|
|
@@ -141,6 +141,7 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
|
|
|
141
141
|
const events = [];
|
|
142
142
|
|
|
143
143
|
for (const propName in props) {
|
|
144
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
144
145
|
const propValue = props[propName];
|
|
145
146
|
if (propValue instanceof AnimatedEvent && propValue.__isNative) {
|
|
146
147
|
propValue.__attach(target, propName);
|
|
@@ -424,6 +424,7 @@ class MessageQueue {
|
|
|
424
424
|
A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.`,
|
|
425
425
|
);
|
|
426
426
|
}
|
|
427
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
427
428
|
if (!moduleMethods[method]) {
|
|
428
429
|
invariant(
|
|
429
430
|
false,
|
|
@@ -23,6 +23,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
|
|
|
23
23
|
validAttributes: {
|
|
24
24
|
decelerationRate: true,
|
|
25
25
|
disableIntervalMomentum: true,
|
|
26
|
+
maintainVisibleContentPosition: true,
|
|
26
27
|
endFillColor: {process: require('../../StyleSheet/processColor').default},
|
|
27
28
|
fadingEdgeLength: true,
|
|
28
29
|
nestedScrollEnabled: true,
|
|
@@ -31,6 +32,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
|
|
|
31
32
|
persistentScrollbar: true,
|
|
32
33
|
horizontal: true,
|
|
33
34
|
scrollEnabled: true,
|
|
35
|
+
scrollEventThrottle: true,
|
|
34
36
|
scrollPerfTag: true,
|
|
35
37
|
sendMomentumEvents: true,
|
|
36
38
|
showsHorizontalScrollIndicator: true,
|
|
@@ -1764,6 +1764,13 @@ class ScrollView extends React.Component<Props, State> {
|
|
|
1764
1764
|
const hasStickyHeaders =
|
|
1765
1765
|
Array.isArray(stickyHeaderIndices) && stickyHeaderIndices.length > 0;
|
|
1766
1766
|
|
|
1767
|
+
// Some ScrollView native component behaviors rely on using the metrics
|
|
1768
|
+
// of mounted views for anchoring. Make sure not to flatten children if
|
|
1769
|
+
// this is the case.
|
|
1770
|
+
const preserveChildren =
|
|
1771
|
+
this.props.maintainVisibleContentPosition != null ||
|
|
1772
|
+
(Platform.OS === 'android' && this.props.snapToAlignment != null);
|
|
1773
|
+
|
|
1767
1774
|
const contentContainer = (
|
|
1768
1775
|
<NativeDirectionalScrollContentView
|
|
1769
1776
|
{...contentSizeChangeProps}
|
|
@@ -1776,7 +1783,8 @@ class ScrollView extends React.Component<Props, State> {
|
|
|
1776
1783
|
? false
|
|
1777
1784
|
: this.props.removeClippedSubviews
|
|
1778
1785
|
}
|
|
1779
|
-
collapsable={false}
|
|
1786
|
+
collapsable={false}
|
|
1787
|
+
collapsableChildren={!preserveChildren}>
|
|
1780
1788
|
{children}
|
|
1781
1789
|
</NativeDirectionalScrollContentView>
|
|
1782
1790
|
);
|
|
@@ -1401,6 +1401,12 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1401
1401
|
|
|
1402
1402
|
const style = flattenStyle<TextStyleProp>(props.style);
|
|
1403
1403
|
|
|
1404
|
+
if (typeof style?.fontWeight === 'number') {
|
|
1405
|
+
// $FlowFixMe[prop-missing]
|
|
1406
|
+
// $FlowFixMe[cannot-write]
|
|
1407
|
+
style.fontWeight = style?.fontWeight.toString();
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1404
1410
|
if (Platform.OS === 'ios') {
|
|
1405
1411
|
const RCTTextInputView =
|
|
1406
1412
|
props.multiline === true
|
|
@@ -1514,6 +1514,12 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1514
1514
|
|
|
1515
1515
|
const style = flattenStyle<TextStyleProp>(props.style);
|
|
1516
1516
|
|
|
1517
|
+
if (typeof style?.fontWeight === 'number') {
|
|
1518
|
+
// $FlowFixMe[prop-missing]
|
|
1519
|
+
// $FlowFixMe[cannot-write]
|
|
1520
|
+
style.fontWeight = style?.fontWeight.toString();
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1517
1523
|
if (Platform.OS === 'ios') {
|
|
1518
1524
|
const RCTTextInputView =
|
|
1519
1525
|
props.multiline === true
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from './ViewPropTypes';
|
|
12
12
|
|
|
13
|
-
import flattenStyle from '../../StyleSheet/flattenStyle';
|
|
14
13
|
import TextAncestor from '../../Text/TextAncestor';
|
|
15
14
|
import ViewNativeComponent from './ViewNativeComponent';
|
|
16
15
|
import * as React from 'react';
|
|
@@ -53,7 +52,6 @@ const View: React.AbstractComponent<
|
|
|
53
52
|
id,
|
|
54
53
|
importantForAccessibility,
|
|
55
54
|
nativeID,
|
|
56
|
-
pointerEvents,
|
|
57
55
|
tabIndex,
|
|
58
56
|
...otherProps
|
|
59
57
|
}: ViewProps,
|
|
@@ -96,12 +94,6 @@ const View: React.AbstractComponent<
|
|
|
96
94
|
};
|
|
97
95
|
}
|
|
98
96
|
|
|
99
|
-
// $FlowFixMe[underconstrained-implicit-instantiation]
|
|
100
|
-
let style = flattenStyle(otherProps.style);
|
|
101
|
-
|
|
102
|
-
// $FlowFixMe[sketchy-null-mixed]
|
|
103
|
-
const newPointerEvents = style?.pointerEvents || pointerEvents;
|
|
104
|
-
|
|
105
97
|
const actualView = (
|
|
106
98
|
<ViewNativeComponent
|
|
107
99
|
{...otherProps}
|
|
@@ -120,9 +112,6 @@ const View: React.AbstractComponent<
|
|
|
120
112
|
: importantForAccessibility
|
|
121
113
|
}
|
|
122
114
|
nativeID={id ?? nativeID}
|
|
123
|
-
style={style}
|
|
124
|
-
// $FlowFixMe[incompatible-type]
|
|
125
|
-
pointerEvents={newPointerEvents}
|
|
126
115
|
ref={forwardedRef}
|
|
127
116
|
/>
|
|
128
117
|
);
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from './ViewPropTypes';
|
|
12
12
|
|
|
13
|
-
import flattenStyle from '../../StyleSheet/flattenStyle';
|
|
14
13
|
import TextAncestor from '../../Text/TextAncestor';
|
|
15
14
|
import ViewNativeComponent from './ViewNativeComponent';
|
|
16
15
|
import * as React from 'react';
|
|
@@ -71,7 +70,6 @@ const View: React.AbstractComponent<
|
|
|
71
70
|
id,
|
|
72
71
|
importantForAccessibility,
|
|
73
72
|
nativeID,
|
|
74
|
-
pointerEvents,
|
|
75
73
|
tabIndex,
|
|
76
74
|
...otherProps
|
|
77
75
|
}: ViewProps,
|
|
@@ -118,12 +116,6 @@ const View: React.AbstractComponent<
|
|
|
118
116
|
};
|
|
119
117
|
}
|
|
120
118
|
|
|
121
|
-
// $FlowFixMe[underconstrained-implicit-instantiation]
|
|
122
|
-
let style = flattenStyle(otherProps.style);
|
|
123
|
-
|
|
124
|
-
// $FlowFixMe[sketchy-null-mixed]
|
|
125
|
-
const newPointerEvents = style?.pointerEvents || pointerEvents;
|
|
126
|
-
|
|
127
119
|
const _keyDown = (event: KeyEvent) => {
|
|
128
120
|
if (otherProps.keyDownEvents && event.isPropagationStopped() !== true) {
|
|
129
121
|
// $FlowFixMe - keyDownEvents was already checked to not be undefined
|
|
@@ -253,9 +245,6 @@ const View: React.AbstractComponent<
|
|
|
253
245
|
: importantForAccessibility
|
|
254
246
|
}
|
|
255
247
|
nativeID={id ?? nativeID}
|
|
256
|
-
style={style}
|
|
257
|
-
// $FlowFixMe[incompatible-type]
|
|
258
|
-
pointerEvents={newPointerEvents}
|
|
259
248
|
ref={forwardedRef}
|
|
260
249
|
onKeyDown={_keyDown}
|
|
261
250
|
onKeyDownCapture={_keyDownCapture}
|
|
@@ -88,6 +88,13 @@ export interface ViewPropsAndroid {
|
|
|
88
88
|
*/
|
|
89
89
|
collapsable?: boolean | undefined;
|
|
90
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Setting to false prevents direct children of the view from being removed
|
|
93
|
+
* from the native view hierarchy, similar to the effect of setting
|
|
94
|
+
* `collapsable={false}` on each child.
|
|
95
|
+
*/
|
|
96
|
+
collapsableChildren?: boolean | undefined;
|
|
97
|
+
|
|
91
98
|
/**
|
|
92
99
|
* Whether this view should render itself (and all of its children) into a single hardware texture on the GPU.
|
|
93
100
|
*
|
|
@@ -560,6 +560,13 @@ export type ViewProps = $ReadOnly<{|
|
|
|
560
560
|
*/
|
|
561
561
|
collapsable?: ?boolean,
|
|
562
562
|
|
|
563
|
+
/**
|
|
564
|
+
* Setting to false prevents direct children of the view from being removed
|
|
565
|
+
* from the native view hierarchy, similar to the effect of setting
|
|
566
|
+
* `collapsable={false}` on each child.
|
|
567
|
+
*/
|
|
568
|
+
collapsableChildren?: ?boolean,
|
|
569
|
+
|
|
563
570
|
/**
|
|
564
571
|
* Contols whether this view, and its transitive children, are laid in a way
|
|
565
572
|
* consistent with web browsers ('strict'), or consistent with existing
|
|
@@ -621,6 +621,13 @@ export type ViewProps = $ReadOnly<{|
|
|
|
621
621
|
*/
|
|
622
622
|
collapsable?: ?boolean,
|
|
623
623
|
|
|
624
|
+
/**
|
|
625
|
+
* Setting to false prevents direct children of the view from being removed
|
|
626
|
+
* from the native view hierarchy, similar to the effect of setting
|
|
627
|
+
* `collapsable={false}` on each child.
|
|
628
|
+
*/
|
|
629
|
+
collapsableChildren?: ?boolean,
|
|
630
|
+
|
|
624
631
|
/**
|
|
625
632
|
* Contols whether this view, and its transitive children, are laid in a way
|
|
626
633
|
* consistent with web browsers ('strict'), or consistent with existing
|
|
@@ -121,13 +121,17 @@ function resolveSizeInPlace(
|
|
|
121
121
|
direction: string,
|
|
122
122
|
dimension: string,
|
|
123
123
|
) {
|
|
124
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
124
125
|
if (style[direction] !== null && typeof style[direction] === 'string') {
|
|
125
126
|
if (style[direction].indexOf('%') !== -1) {
|
|
126
127
|
// $FlowFixMe[prop-missing]
|
|
127
128
|
style[direction] =
|
|
129
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
128
130
|
(parseFloat(style[direction]) / 100.0) *
|
|
131
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
129
132
|
Dimensions.get('window')[dimension];
|
|
130
133
|
}
|
|
134
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
131
135
|
if (style[direction] === 'auto') {
|
|
132
136
|
// Ignore auto sizing in frame drawing due to complexity of correctly rendering this
|
|
133
137
|
// $FlowFixMe[prop-missing]
|
|
@@ -195,6 +195,7 @@ const validAttributesForNonEventProps = {
|
|
|
195
195
|
width: true,
|
|
196
196
|
minWidth: true,
|
|
197
197
|
collapsable: true,
|
|
198
|
+
collapsableChildren: true,
|
|
198
199
|
maxWidth: true,
|
|
199
200
|
height: true,
|
|
200
201
|
minHeight: true,
|
|
@@ -305,6 +306,7 @@ const validAttributesForEventProps = {
|
|
|
305
306
|
|
|
306
307
|
// Pointer events
|
|
307
308
|
onClick: true,
|
|
309
|
+
onClickCapture: true,
|
|
308
310
|
onPointerEnter: true,
|
|
309
311
|
onPointerEnterCapture: true,
|
|
310
312
|
onPointerLeave: true,
|
|
@@ -219,6 +219,7 @@ const validAttributesForNonEventProps = {
|
|
|
219
219
|
borderStyle: true,
|
|
220
220
|
hitSlop: {diff: require('../Utilities/differ/insetsDiffer')},
|
|
221
221
|
collapsable: true,
|
|
222
|
+
collapsableChildren: true,
|
|
222
223
|
|
|
223
224
|
borderTopWidth: true,
|
|
224
225
|
borderTopColor: {process: require('../StyleSheet/processColor').default},
|
|
@@ -373,6 +374,7 @@ const validAttributesForEventProps = ConditionallyIgnoredEventHandlers({
|
|
|
373
374
|
|
|
374
375
|
// Pointer events
|
|
375
376
|
onClick: true,
|
|
377
|
+
onClickCapture: true,
|
|
376
378
|
onPointerUp: true,
|
|
377
379
|
onPointerDown: true,
|
|
378
380
|
onPointerCancel: true,
|
|
@@ -219,6 +219,7 @@ const validAttributesForNonEventProps = {
|
|
|
219
219
|
borderStyle: true,
|
|
220
220
|
hitSlop: {diff: require('../Utilities/differ/insetsDiffer')},
|
|
221
221
|
collapsable: true,
|
|
222
|
+
collapsableChildren: true,
|
|
222
223
|
|
|
223
224
|
borderTopWidth: true,
|
|
224
225
|
borderTopColor: {process: require('../StyleSheet/processColor').default},
|
|
@@ -373,6 +374,7 @@ const validAttributesForEventProps = ConditionallyIgnoredEventHandlers({
|
|
|
373
374
|
|
|
374
375
|
// Pointer events
|
|
375
376
|
onClick: true,
|
|
377
|
+
onClickCapture: true,
|
|
376
378
|
onPointerUp: true,
|
|
377
379
|
onPointerDown: true,
|
|
378
380
|
onPointerCancel: true,
|
|
@@ -105,6 +105,7 @@ function accumulateDifferences(
|
|
|
105
105
|
staticObject: {...},
|
|
106
106
|
): void {
|
|
107
107
|
for (const nativeKey in nativeObject) {
|
|
108
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
108
109
|
const nativeValue = nativeObject[nativeKey];
|
|
109
110
|
|
|
110
111
|
if (!staticObject.hasOwnProperty(nativeKey)) {
|
|
@@ -116,6 +117,7 @@ function accumulateDifferences(
|
|
|
116
117
|
continue;
|
|
117
118
|
}
|
|
118
119
|
|
|
120
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
119
121
|
const staticValue = staticObject[nativeKey];
|
|
120
122
|
|
|
121
123
|
const nativeValueIfObject = ifObject(nativeValue);
|
|
@@ -147,6 +149,7 @@ function accumulateDifferences(
|
|
|
147
149
|
for (const staticKey in staticObject) {
|
|
148
150
|
if (
|
|
149
151
|
!nativeObject.hasOwnProperty(staticKey) &&
|
|
152
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
150
153
|
!isIgnored(staticObject[staticKey])
|
|
151
154
|
) {
|
|
152
155
|
differences.push({
|
|
@@ -630,6 +630,7 @@ class XMLHttpRequest extends (EventTarget(...XHR_EVENTS): any) {
|
|
|
630
630
|
this._lowerCaseResponseHeaders = Object.keys(headers).reduce<{
|
|
631
631
|
[string]: any,
|
|
632
632
|
}>((lcaseHeaders, headerName) => {
|
|
633
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
633
634
|
lcaseHeaders[headerName.toLowerCase()] = headers[headerName];
|
|
634
635
|
return lcaseHeaders;
|
|
635
636
|
}, {});
|
|
@@ -196,10 +196,8 @@ const AppRegistry = {
|
|
|
196
196
|
displayMode?: number,
|
|
197
197
|
): void {
|
|
198
198
|
if (appKey !== 'LogBox') {
|
|
199
|
-
const logParams = __DEV__
|
|
200
|
-
|
|
201
|
-
: '';
|
|
202
|
-
const msg = 'Running "' + appKey + logParams;
|
|
199
|
+
const logParams = __DEV__ ? ` with ${JSON.stringify(appParameters)}` : '';
|
|
200
|
+
const msg = `Running "${appKey}"${logParams}`;
|
|
203
201
|
infoLog(msg);
|
|
204
202
|
BugReporting.addSource(
|
|
205
203
|
'AppRegistry.runApplication' + runCount++,
|
|
@@ -16,6 +16,7 @@ export default function warnForStyleProps(
|
|
|
16
16
|
): void {
|
|
17
17
|
if (__DEV__) {
|
|
18
18
|
for (const key in validAttributes.style) {
|
|
19
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
19
20
|
if (!(validAttributes[key] || props[key] === undefined)) {
|
|
20
21
|
console.error(
|
|
21
22
|
'You are setting the style `{ %s' +
|
|
@@ -8,9 +8,6 @@
|
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @nolint
|
|
10
10
|
* @generated SignedSource<<c41f61379973354629ee7bf55ba92541>>
|
|
11
|
-
* @generated SignedSource<<39aa3fa373095c6b192fac24f5b6c30c>>
|
|
12
|
-
*
|
|
13
|
-
* This file was sync'd from the facebook/react repository.
|
|
14
11
|
*/
|
|
15
12
|
|
|
16
13
|
import type {ElementRef, ElementType, Element, AbstractComponent} from 'react';
|