@office-iss/react-native-win32 0.0.0-canary.247 → 0.0.0-canary.249
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 +93 -1
- package/CHANGELOG.md +33 -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 +3 -0
- package/Libraries/Components/ScrollView/ScrollView.js +9 -1
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +2 -1
- package/Libraries/Components/TextInput/TextInput.js +12 -3
- package/Libraries/Components/TextInput/TextInput.win32.js +12 -3
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -0
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +6 -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/Devtools/loadBundleFromServer.win32.js +153 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/ImageUtils.js +1 -0
- package/Libraries/Inspector/ElementBox.js +4 -0
- package/Libraries/IntersectionObserver/IntersectionObserverManager.js +6 -26
- package/Libraries/LogBox/Data/LogBoxData.js +0 -25
- package/Libraries/NativeComponent/BaseViewConfig.android.js +5 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +5 -0
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +5 -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 +19 -13
- package/Libraries/StyleSheet/flattenStyle.js +1 -0
- package/Libraries/StyleSheet/processFilter.js +132 -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/jest/mockComponent.js +7 -0
- package/overrides.json +18 -11
- package/package.json +17 -17
- package/rn-get-polyfills.js +1 -0
- package/src/private/core/composeStyles.js +27 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +24 -14
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +6 -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/jest/ReactNativeInternalFeatureFlagsMock.js +0 -13
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
|
|
@@ -95,7 +96,6 @@ flow/
|
|
|
95
96
|
../../../node_modules/.flow/flow-typed/
|
|
96
97
|
|
|
97
98
|
[options]
|
|
98
|
-
experimental.global_find_ref=true
|
|
99
99
|
enums=true
|
|
100
100
|
casting_syntax=both
|
|
101
101
|
|
|
@@ -153,4 +153,4 @@ untyped-import
|
|
|
153
153
|
untyped-type-import
|
|
154
154
|
|
|
155
155
|
[version]
|
|
156
|
-
^0.
|
|
156
|
+
^0.236.0
|
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,99 @@
|
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 30 May 2024 05:15:53 GMT",
|
|
6
|
+
"version": "0.0.0-canary.249",
|
|
7
|
+
"tag": "@office-iss/react-native-win32_v0.0.0-canary.249",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "1422161+marlenecota@users.noreply.github.com",
|
|
12
|
+
"package": "@office-iss/react-native-win32",
|
|
13
|
+
"commit": "1304e2f0aa0f074550f4a10de439188749590547",
|
|
14
|
+
"comment": "RN Integration 05/11"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@office-iss/react-native-win32",
|
|
19
|
+
"comment": "Bump @rnw-scripts/eslint-config to v1.2.19",
|
|
20
|
+
"commit": "not available"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@office-iss/react-native-win32",
|
|
25
|
+
"comment": "Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.23",
|
|
26
|
+
"commit": "not available"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@office-iss/react-native-win32",
|
|
31
|
+
"comment": "Bump @rnw-scripts/just-task to v2.3.35",
|
|
32
|
+
"commit": "not available"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@office-iss/react-native-win32",
|
|
37
|
+
"comment": "Bump react-native-platform-override to v1.9.36",
|
|
38
|
+
"commit": "not available"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"none": [
|
|
42
|
+
{
|
|
43
|
+
"author": "1422161+marlenecota@users.noreply.github.com",
|
|
44
|
+
"package": "@office-iss/react-native-win32",
|
|
45
|
+
"commit": "b06795ef7c683825358c8150adb2107a816d98ac",
|
|
46
|
+
"comment": "CodeQL patch"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"date": "Thu, 23 May 2024 05:17:48 GMT",
|
|
53
|
+
"version": "0.0.0-canary.248",
|
|
54
|
+
"tag": "@office-iss/react-native-win32_v0.0.0-canary.248",
|
|
55
|
+
"comments": {
|
|
56
|
+
"prerelease": [
|
|
57
|
+
{
|
|
58
|
+
"author": "1422161+marlenecota@users.noreply.github.com",
|
|
59
|
+
"package": "@office-iss/react-native-win32",
|
|
60
|
+
"commit": "3d221a9e154753fce6c1d22bdf6f2e17d6bc41b5",
|
|
61
|
+
"comment": "RN Integration 04/27"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"author": "1422161+marlenecota@users.noreply.github.com",
|
|
65
|
+
"package": "@office-iss/react-native-win32",
|
|
66
|
+
"commit": "9a5ddf602612fcbe088fafbaa80993d7b9f9aace",
|
|
67
|
+
"comment": "RN Integration 05/02"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"author": "beachball",
|
|
71
|
+
"package": "@office-iss/react-native-win32",
|
|
72
|
+
"comment": "Bump @rnw-scripts/eslint-config to v1.2.18",
|
|
73
|
+
"commit": "not available"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"author": "beachball",
|
|
77
|
+
"package": "@office-iss/react-native-win32",
|
|
78
|
+
"comment": "Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.22",
|
|
79
|
+
"commit": "not available"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"author": "beachball",
|
|
83
|
+
"package": "@office-iss/react-native-win32",
|
|
84
|
+
"comment": "Bump @rnw-scripts/just-task to v2.3.34",
|
|
85
|
+
"commit": "not available"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"author": "beachball",
|
|
89
|
+
"package": "@office-iss/react-native-win32",
|
|
90
|
+
"comment": "Bump react-native-platform-override to v1.9.35",
|
|
91
|
+
"commit": "not available"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"date": "Wed, 22 May 2024 05:18:16 GMT",
|
|
6
98
|
"version": "0.0.0-canary.247",
|
|
7
99
|
"tag": "@office-iss/react-native-win32_v0.0.0-canary.247",
|
|
8
100
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,46 @@
|
|
|
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, 30 May 2024 05:15:53 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.249
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Thu, 30 May 2024 05:15:53 GMT
|
|
10
10
|
|
|
11
11
|
### Changes
|
|
12
12
|
|
|
13
|
-
- RN Integration
|
|
14
|
-
- Bump @rnw-scripts/eslint-config to v1.2.
|
|
15
|
-
- Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.
|
|
16
|
-
- Bump @rnw-scripts/just-task to v2.3.
|
|
17
|
-
- Bump react-native-platform-override to v1.9.
|
|
13
|
+
- RN Integration 05/11 (1422161+marlenecota@users.noreply.github.com)
|
|
14
|
+
- Bump @rnw-scripts/eslint-config to v1.2.19
|
|
15
|
+
- Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.23
|
|
16
|
+
- Bump @rnw-scripts/just-task to v2.3.35
|
|
17
|
+
- Bump react-native-platform-override to v1.9.36
|
|
18
18
|
|
|
19
|
+
## 0.0.0-canary.248
|
|
20
|
+
|
|
21
|
+
Thu, 23 May 2024 05:17:48 GMT
|
|
22
|
+
|
|
23
|
+
### Changes
|
|
24
|
+
|
|
25
|
+
- RN Integration 04/27 (1422161+marlenecota@users.noreply.github.com)
|
|
26
|
+
- RN Integration 05/02 (1422161+marlenecota@users.noreply.github.com)
|
|
27
|
+
- Bump @rnw-scripts/eslint-config to v1.2.18
|
|
28
|
+
- Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.22
|
|
29
|
+
- Bump @rnw-scripts/just-task to v2.3.34
|
|
30
|
+
- Bump react-native-platform-override to v1.9.35
|
|
31
|
+
|
|
32
|
+
## 0.0.0-canary.247
|
|
33
|
+
|
|
34
|
+
Wed, 22 May 2024 05:18:16 GMT
|
|
35
|
+
|
|
36
|
+
### Changes
|
|
37
|
+
|
|
38
|
+
- RN Integration 04/20 (1422161+marlenecota@users.noreply.github.com)
|
|
39
|
+
- Bump @rnw-scripts/eslint-config to v1.2.17
|
|
40
|
+
- Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.21
|
|
41
|
+
- Bump @rnw-scripts/just-task to v2.3.33
|
|
42
|
+
- Bump react-native-platform-override to v1.9.34
|
|
43
|
+
|
|
19
44
|
## 0.0.0-canary.246
|
|
20
45
|
|
|
21
46
|
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,
|
|
@@ -30,7 +31,9 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
|
|
|
30
31
|
pagingEnabled: true,
|
|
31
32
|
persistentScrollbar: true,
|
|
32
33
|
horizontal: true,
|
|
34
|
+
enableSyncOnScroll: true,
|
|
33
35
|
scrollEnabled: true,
|
|
36
|
+
scrollEventThrottle: true,
|
|
34
37
|
scrollPerfTag: true,
|
|
35
38
|
sendMomentumEvents: true,
|
|
36
39
|
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
|
);
|
|
@@ -45,6 +45,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
|
|
|
45
45
|
diff: require('../../Utilities/differ/pointsDiffer'),
|
|
46
46
|
},
|
|
47
47
|
decelerationRate: true,
|
|
48
|
+
enableSyncOnScroll: true, // Fabric only.
|
|
48
49
|
disableIntervalMomentum: true,
|
|
49
50
|
maintainVisibleContentPosition: true,
|
|
50
51
|
pagingEnabled: true,
|
|
@@ -134,7 +135,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
|
|
|
134
135
|
contentInsetAdjustmentBehavior: true,
|
|
135
136
|
decelerationRate: true,
|
|
136
137
|
endDraggingSensitivityMultiplier: true,
|
|
137
|
-
enableSyncOnScroll: true, //
|
|
138
|
+
enableSyncOnScroll: true, // Fabric only.
|
|
138
139
|
directionalLockEnabled: true,
|
|
139
140
|
disableIntervalMomentum: true,
|
|
140
141
|
indicatorStyle: true,
|
|
@@ -1099,12 +1099,14 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1099
1099
|
};
|
|
1100
1100
|
|
|
1101
1101
|
const [mostRecentEventCount, setMostRecentEventCount] = useState<number>(0);
|
|
1102
|
-
|
|
1103
1102
|
const [lastNativeText, setLastNativeText] = useState<?Stringish>(props.value);
|
|
1104
1103
|
const [lastNativeSelectionState, setLastNativeSelection] = useState<{|
|
|
1105
|
-
selection:
|
|
1104
|
+
selection: Selection,
|
|
1106
1105
|
mostRecentEventCount: number,
|
|
1107
|
-
|}>({
|
|
1106
|
+
|}>({
|
|
1107
|
+
selection: {start: -1, end: -1},
|
|
1108
|
+
mostRecentEventCount: mostRecentEventCount,
|
|
1109
|
+
});
|
|
1108
1110
|
|
|
1109
1111
|
const lastNativeSelection = lastNativeSelectionState.selection;
|
|
1110
1112
|
|
|
@@ -1401,6 +1403,12 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1401
1403
|
|
|
1402
1404
|
const style = flattenStyle<TextStyleProp>(props.style);
|
|
1403
1405
|
|
|
1406
|
+
if (typeof style?.fontWeight === 'number') {
|
|
1407
|
+
// $FlowFixMe[prop-missing]
|
|
1408
|
+
// $FlowFixMe[cannot-write]
|
|
1409
|
+
style.fontWeight = style?.fontWeight.toString();
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1404
1412
|
if (Platform.OS === 'ios') {
|
|
1405
1413
|
const RCTTextInputView =
|
|
1406
1414
|
props.multiline === true
|
|
@@ -1436,6 +1444,7 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1436
1444
|
onSelectionChange={_onSelectionChange}
|
|
1437
1445
|
onSelectionChangeShouldSetResponder={emptyFunctionThatReturnsTrue}
|
|
1438
1446
|
selection={selection}
|
|
1447
|
+
selectionColor={selectionColor}
|
|
1439
1448
|
style={StyleSheet.compose(
|
|
1440
1449
|
useMultilineDefaultStyle ? styles.multilineDefault : null,
|
|
1441
1450
|
style,
|
|
@@ -1144,12 +1144,14 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1144
1144
|
};
|
|
1145
1145
|
|
|
1146
1146
|
const [mostRecentEventCount, setMostRecentEventCount] = useState<number>(0);
|
|
1147
|
-
|
|
1148
1147
|
const [lastNativeText, setLastNativeText] = useState<?Stringish>(props.value);
|
|
1149
1148
|
const [lastNativeSelectionState, setLastNativeSelection] = useState<{|
|
|
1150
|
-
selection:
|
|
1149
|
+
selection: Selection,
|
|
1151
1150
|
mostRecentEventCount: number,
|
|
1152
|
-
|}>({
|
|
1151
|
+
|}>({
|
|
1152
|
+
selection: {start: -1, end: -1},
|
|
1153
|
+
mostRecentEventCount: mostRecentEventCount,
|
|
1154
|
+
});
|
|
1153
1155
|
|
|
1154
1156
|
const lastNativeSelection = lastNativeSelectionState.selection;
|
|
1155
1157
|
|
|
@@ -1514,6 +1516,12 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1514
1516
|
|
|
1515
1517
|
const style = flattenStyle<TextStyleProp>(props.style);
|
|
1516
1518
|
|
|
1519
|
+
if (typeof style?.fontWeight === 'number') {
|
|
1520
|
+
// $FlowFixMe[prop-missing]
|
|
1521
|
+
// $FlowFixMe[cannot-write]
|
|
1522
|
+
style.fontWeight = style?.fontWeight.toString();
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1517
1525
|
if (Platform.OS === 'ios') {
|
|
1518
1526
|
const RCTTextInputView =
|
|
1519
1527
|
props.multiline === true
|
|
@@ -1550,6 +1558,7 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1550
1558
|
onSelectionChange={_onSelectionChange}
|
|
1551
1559
|
onSelectionChangeShouldSetResponder={emptyFunctionThatReturnsTrue}
|
|
1552
1560
|
selection={selection}
|
|
1561
|
+
selectionColor={selectionColor}
|
|
1553
1562
|
style={StyleSheet.compose(
|
|
1554
1563
|
useMultilineDefaultStyle ? styles.multilineDefault : null,
|
|
1555
1564
|
style,
|
|
@@ -12,6 +12,7 @@ import type {AnyAttributeType} from '../../Renderer/shims/ReactNativeTypes';
|
|
|
12
12
|
|
|
13
13
|
import processAspectRatio from '../../StyleSheet/processAspectRatio';
|
|
14
14
|
import processColor from '../../StyleSheet/processColor';
|
|
15
|
+
import processFilter from '../../StyleSheet/processFilter';
|
|
15
16
|
import processFontVariant from '../../StyleSheet/processFontVariant';
|
|
16
17
|
import processTransform from '../../StyleSheet/processTransform';
|
|
17
18
|
import processTransformOrigin from '../../StyleSheet/processTransformOrigin';
|
|
@@ -114,6 +115,11 @@ const ReactNativeStyleAttributes: {[string]: AnyAttributeType, ...} = {
|
|
|
114
115
|
transform: {process: processTransform},
|
|
115
116
|
transformOrigin: {process: processTransformOrigin},
|
|
116
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Filter
|
|
120
|
+
*/
|
|
121
|
+
experimental_filter: {process: processFilter},
|
|
122
|
+
|
|
117
123
|
/**
|
|
118
124
|
* View
|
|
119
125
|
*/
|
|
@@ -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
|