react-native-macos 0.0.0-d74468479 → 0.0.0-d9a5f84e0
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/Libraries/Animated/AnimatedEvent.js +10 -5
- package/Libraries/Animated/AnimatedImplementation.js +39 -7
- package/Libraries/Animated/AnimatedMock.js +6 -3
- package/Libraries/Animated/AnimatedPlatformConfig.js +13 -0
- package/Libraries/Animated/Easing.js +36 -36
- package/Libraries/Animated/animations/Animation.js +5 -3
- package/Libraries/Animated/animations/DecayAnimation.js +5 -0
- package/Libraries/Animated/animations/SpringAnimation.js +15 -0
- package/Libraries/Animated/animations/TimingAnimation.js +14 -1
- package/Libraries/Animated/nodes/AnimatedAddition.js +5 -4
- package/Libraries/Animated/nodes/AnimatedColor.js +266 -0
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +4 -3
- package/Libraries/Animated/nodes/AnimatedDivision.js +5 -4
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +5 -3
- package/Libraries/Animated/nodes/AnimatedModulo.js +4 -3
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +5 -4
- package/Libraries/Animated/nodes/AnimatedNode.js +17 -5
- package/Libraries/Animated/nodes/AnimatedProps.js +11 -3
- package/Libraries/Animated/nodes/AnimatedStyle.js +6 -4
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +5 -4
- package/Libraries/Animated/nodes/AnimatedTracking.js +7 -5
- package/Libraries/Animated/nodes/AnimatedTransform.js +5 -3
- package/Libraries/Animated/nodes/AnimatedValue.js +2 -0
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +5 -4
- package/Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js +2 -2
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +3 -3
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js +2 -0
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +12 -0
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +130 -68
- package/Libraries/Components/Slider/SliderNativeComponent.js +2 -2
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +115 -2
- package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +8 -1
- package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +4 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +31 -8
- package/Libraries/Components/Touchable/TouchableOpacity.js +0 -1
- package/Libraries/Components/View/ViewPropTypes.js +7 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/ReactNativeVersionCheck.js +1 -0
- package/Libraries/Core/Timers/JSTimers.js +17 -28
- package/Libraries/Image/Image.android.js +16 -7
- package/Libraries/Image/ImageViewNativeComponent.js +94 -57
- package/Libraries/Image/RCTImageView.mm +22 -14
- package/Libraries/Image/TextInlineImageNativeComponent.js +10 -68
- package/Libraries/Lists/VirtualizedList.js +8 -6
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +0 -1
- package/Libraries/Modal/Modal.js +0 -1
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +39 -0
- package/Libraries/Network/XMLHttpRequest.js +0 -1
- package/Libraries/Performance/QuickPerformanceLogger.js +17 -0
- package/Libraries/ReactNative/UIManager.js +5 -10
- package/Libraries/ReactNative/UIManagerInjection.js +3 -3
- package/Libraries/ReactNative/getNativeComponentAttributes.js +4 -0
- package/Libraries/Renderer/REVISION +1 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +278 -356
- package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +87 -78
- package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +340 -393
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +278 -356
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +87 -78
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +340 -393
- package/Libraries/Text/RCTTextAttributes.m +18 -1
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +2 -0
- package/Libraries/WebSocket/RCTSRWebSocket.m +4 -0
- package/React/Base/RCTConvert.m +18 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTAlertController.m +6 -0
- package/React/CoreModules/RCTDevSettings.mm +33 -12
- package/React/CoreModules/RCTExceptionsManager.mm +1 -1
- package/React/Fabric/RCTSurfacePresenter.mm +0 -2
- package/React/Views/RCTFont.mm +11 -9
- package/React/Views/RCTModalHostView.h +5 -0
- package/React/Views/RCTModalHostViewManager.m +3 -0
- package/React/Views/RCTSliderManager.m +1 -0
- package/ReactAndroid/build.gradle +14 -5
- package/ReactAndroid/gradle.properties +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +12 -4
- package/ReactAndroid/src/main/java/com/facebook/react/animated/AdditionAnimatedNode.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/DiffClampAnimatedNode.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/EventAnimationDriver.java +39 -3
- package/ReactAndroid/src/main/java/com/facebook/react/animated/ModulusAnimatedNode.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/animated/MultiplicationAnimatedNode.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/SubtractionAnimatedNode.java +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSIModuleRegistry.java +0 -4
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeModuleRegistry.java +0 -3
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java +0 -6
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/WritableNativeArray.java +6 -6
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/WritableNativeMap.java +6 -6
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/ReadableMapBuffer.java +119 -78
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/jni/react/common/mapbuffer/ReadableMapBuffer.cpp +7 -35
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/jni/react/common/mapbuffer/ReadableMapBuffer.h +5 -18
- package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +0 -14
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricJSIModuleProvider.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +0 -2
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.cpp +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +15 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerAdapter.java +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/PointerEvents.java +18 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java +12 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +0 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/interfaces/BaseViewManagerDelegate.java +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/interfaces/BaseViewManagerInterface.java +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/interfaces/ViewProps.java +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/ReactDrawerLayoutManager.java +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.java +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/ReactProgressBarViewManager.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +22 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.java +6 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +22 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java +23 -14
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java +6 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderManager.java +24 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java +8 -8
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManagerMapBuffer.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageShadowNode.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageViewManager.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java +1 -8
- package/ReactAndroid/src/main/jni/react/jni/JSLoader.cpp +40 -16
- package/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.cpp +3 -3
- package/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.h +3 -3
- package/ReactAndroid/src/main/jni/react/jni/WritableNativeMap.cpp +2 -2
- package/ReactAndroid/src/main/jni/react/jni/WritableNativeMap.h +3 -3
- package/ReactAndroid/src/main/res/views/uimanager/values/ids.xml +3 -0
- package/ReactAndroid/src/main/third-party/java/okhttp/BUCK +4 -4
- package/ReactCommon/cxxreact/JSBigString.cpp +0 -65
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm +8 -3
- package/ReactCommon/react/renderer/attributedstring/conversions.h +38 -38
- package/ReactCommon/react/renderer/components/text/conversions.h +4 -4
- package/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp +5 -5
- package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +10 -1
- package/ReactCommon/react/renderer/mapbuffer/MapBuffer.cpp +64 -85
- package/ReactCommon/react/renderer/mapbuffer/MapBuffer.h +101 -27
- package/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.cpp +86 -165
- package/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.h +22 -57
- package/ReactCommon/react/renderer/mapbuffer/tests/MapBufferTest.cpp +36 -26
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +9 -19
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +30 -12
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.cpp +1 -1
- package/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +4 -11
- package/ReactCommon/react/renderer/runtimescheduler/tests/StubQueue.h +1 -0
- package/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp +4 -0
- package/jest/mockModal.js +2 -2
- package/package.json +11 -48
- package/react.gradle +0 -4
- package/scripts/find-node.sh +7 -0
- package/scripts/react_native_pods.rb +6 -5
- package/scripts/react_native_pods_utils/script_phases.rb +2 -2
- package/scripts/react_native_pods_utils/script_phases.sh +1 -1
- package/template/Gemfile.lock +3 -3
- package/template/_flowconfig +1 -1
- package/template/_gitignore +2 -1
- package/template/android/build.gradle +1 -1
- package/template/android/gradle.properties +1 -1
- package/template/android/settings.gradle +1 -5
- package/template/ios/Podfile +1 -0
- package/template/package.json +3 -3
- package/Libraries/Components/TextInput/AndroidTextInputViewConfig.js +0 -113
- package/Libraries/DeprecatedPropTypes/DeprecatedColorPropType.js +0 -76
- package/Libraries/DeprecatedPropTypes/DeprecatedEdgeInsetsPropType.js +0 -28
- package/Libraries/DeprecatedPropTypes/DeprecatedImagePropType.android.js +0 -131
- package/Libraries/DeprecatedPropTypes/DeprecatedImagePropType.ios.js +0 -82
- package/Libraries/DeprecatedPropTypes/DeprecatedImageSourcePropType.js +0 -40
- package/Libraries/DeprecatedPropTypes/DeprecatedImageStylePropTypes.js +0 -76
- package/Libraries/DeprecatedPropTypes/DeprecatedLayoutPropTypes.js +0 -233
- package/Libraries/DeprecatedPropTypes/DeprecatedPointPropType.js +0 -24
- package/Libraries/DeprecatedPropTypes/DeprecatedShadowPropTypesIOS.js +0 -30
- package/Libraries/DeprecatedPropTypes/DeprecatedStyleSheetPropType.js +0 -32
- package/Libraries/DeprecatedPropTypes/DeprecatedTextInputPropTypes.js +0 -693
- package/Libraries/DeprecatedPropTypes/DeprecatedTextPropTypes.js +0 -158
- package/Libraries/DeprecatedPropTypes/DeprecatedTextStylePropTypes.js +0 -168
- package/Libraries/DeprecatedPropTypes/DeprecatedTransformPropTypes.js +0 -99
- package/Libraries/DeprecatedPropTypes/DeprecatedViewAccessibility.js +0 -46
- package/Libraries/DeprecatedPropTypes/DeprecatedViewPropTypes.js +0 -408
- package/Libraries/DeprecatedPropTypes/DeprecatedViewStylePropTypes.js +0 -68
- package/Libraries/DeprecatedPropTypes/deprecatedCreateStrictShapeTypeChecker.js +0 -86
- package/ReactCommon/react/renderer/mapbuffer/primitives.h +0 -91
- package/flow-typed/npm/prop-types_v15.x.x.js +0 -42
|
@@ -198,13 +198,22 @@ let Image = (props: ImagePropsType, forwardedRef) => {
|
|
|
198
198
|
: nativeProps;
|
|
199
199
|
return (
|
|
200
200
|
<TextAncestor.Consumer>
|
|
201
|
-
{hasTextAncestor =>
|
|
202
|
-
hasTextAncestor
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
201
|
+
{hasTextAncestor => {
|
|
202
|
+
if (hasTextAncestor) {
|
|
203
|
+
let src = Array.isArray(sources) ? sources : [sources];
|
|
204
|
+
return (
|
|
205
|
+
<TextInlineImageNativeComponent
|
|
206
|
+
style={style}
|
|
207
|
+
resizeMode={props.resizeMode}
|
|
208
|
+
headers={nativeProps.headers}
|
|
209
|
+
src={src}
|
|
210
|
+
ref={forwardedRef}
|
|
211
|
+
/>
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
return <ImageViewNativeComponent {...nativePropsWithAnalytics} />;
|
|
216
|
+
}}
|
|
208
217
|
</TextAncestor.Consumer>
|
|
209
218
|
);
|
|
210
219
|
}}
|
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
DangerouslyImpreciseStyle,
|
|
19
19
|
ImageStyleProp,
|
|
20
20
|
} from '../StyleSheet/StyleSheet';
|
|
21
|
+
import Platform from '../Utilities/Platform';
|
|
21
22
|
|
|
22
23
|
type Props = $ReadOnly<{
|
|
23
24
|
...ImageProps,
|
|
@@ -31,69 +32,105 @@ type Props = $ReadOnly<{
|
|
|
31
32
|
// Android native props
|
|
32
33
|
shouldNotifyLoadEvents?: boolean,
|
|
33
34
|
src?: ?ResolvedAssetSource | $ReadOnlyArray<{uri: string, ...}>,
|
|
34
|
-
headers?: ?string,
|
|
35
|
+
headers?: ?{[string]: string},
|
|
35
36
|
defaultSrc?: ?string,
|
|
36
37
|
loadingIndicatorSrc?: ?string,
|
|
37
38
|
}>;
|
|
38
39
|
|
|
40
|
+
const ImageViewViewConfig =
|
|
41
|
+
Platform.OS === 'android'
|
|
42
|
+
? {
|
|
43
|
+
uiViewClassName: 'RCTImageView',
|
|
44
|
+
bubblingEventTypes: {},
|
|
45
|
+
directEventTypes: {
|
|
46
|
+
topLoadStart: {
|
|
47
|
+
registrationName: 'onLoadStart',
|
|
48
|
+
},
|
|
49
|
+
topProgress: {
|
|
50
|
+
registrationName: 'onProgress',
|
|
51
|
+
},
|
|
52
|
+
topError: {
|
|
53
|
+
registrationName: 'onError',
|
|
54
|
+
},
|
|
55
|
+
topLoad: {
|
|
56
|
+
registrationName: 'onLoad',
|
|
57
|
+
},
|
|
58
|
+
topLoadEnd: {
|
|
59
|
+
registrationName: 'onLoadEnd',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
validAttributes: {
|
|
63
|
+
blurRadius: true,
|
|
64
|
+
internal_analyticTag: true,
|
|
65
|
+
resizeMode: true,
|
|
66
|
+
tintColor: {
|
|
67
|
+
process: require('../StyleSheet/processColor'),
|
|
68
|
+
},
|
|
69
|
+
borderBottomLeftRadius: true,
|
|
70
|
+
borderTopLeftRadius: true,
|
|
71
|
+
resizeMethod: true,
|
|
72
|
+
src: true,
|
|
73
|
+
borderRadius: true,
|
|
74
|
+
headers: true,
|
|
75
|
+
shouldNotifyLoadEvents: true,
|
|
76
|
+
defaultSrc: true,
|
|
77
|
+
overlayColor: {
|
|
78
|
+
process: require('../StyleSheet/processColor'),
|
|
79
|
+
},
|
|
80
|
+
borderColor: {
|
|
81
|
+
process: require('../StyleSheet/processColor'),
|
|
82
|
+
},
|
|
83
|
+
accessible: true,
|
|
84
|
+
progressiveRenderingEnabled: true,
|
|
85
|
+
fadeDuration: true,
|
|
86
|
+
borderBottomRightRadius: true,
|
|
87
|
+
borderTopRightRadius: true,
|
|
88
|
+
loadingIndicatorSrc: true,
|
|
89
|
+
},
|
|
90
|
+
}
|
|
91
|
+
: {
|
|
92
|
+
uiViewClassName: 'RCTImageView',
|
|
93
|
+
bubblingEventTypes: {},
|
|
94
|
+
directEventTypes: {
|
|
95
|
+
topLoadStart: {
|
|
96
|
+
registrationName: 'onLoadStart',
|
|
97
|
+
},
|
|
98
|
+
topProgress: {
|
|
99
|
+
registrationName: 'onProgress',
|
|
100
|
+
},
|
|
101
|
+
topError: {
|
|
102
|
+
registrationName: 'onError',
|
|
103
|
+
},
|
|
104
|
+
topPartialLoad: {
|
|
105
|
+
registrationName: 'onPartialLoad',
|
|
106
|
+
},
|
|
107
|
+
topLoad: {
|
|
108
|
+
registrationName: 'onLoad',
|
|
109
|
+
},
|
|
110
|
+
topLoadEnd: {
|
|
111
|
+
registrationName: 'onLoadEnd',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
validAttributes: {
|
|
115
|
+
blurRadius: true,
|
|
116
|
+
capInsets: {
|
|
117
|
+
diff: require('../Utilities/differ/insetsDiffer'),
|
|
118
|
+
},
|
|
119
|
+
defaultSource: {
|
|
120
|
+
process: require('./resolveAssetSource'),
|
|
121
|
+
},
|
|
122
|
+
internal_analyticTag: true,
|
|
123
|
+
resizeMode: true,
|
|
124
|
+
source: true,
|
|
125
|
+
tintColor: {
|
|
126
|
+
process: require('../StyleSheet/processColor'),
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
|
|
39
131
|
const ImageViewNativeComponent: HostComponent<Props> = NativeComponentRegistry.get<Props>(
|
|
40
132
|
'RCTImageView',
|
|
41
|
-
() =>
|
|
42
|
-
uiViewClassName: 'RCTImageView',
|
|
43
|
-
bubblingEventTypes: {},
|
|
44
|
-
directEventTypes: {
|
|
45
|
-
topLoadStart: {
|
|
46
|
-
registrationName: 'onLoadStart',
|
|
47
|
-
},
|
|
48
|
-
topProgress: {
|
|
49
|
-
registrationName: 'onProgress',
|
|
50
|
-
},
|
|
51
|
-
topError: {
|
|
52
|
-
registrationName: 'onError',
|
|
53
|
-
},
|
|
54
|
-
topPartialLoad: {
|
|
55
|
-
registrationName: 'onPartialLoad',
|
|
56
|
-
},
|
|
57
|
-
topLoad: {
|
|
58
|
-
registrationName: 'onLoad',
|
|
59
|
-
},
|
|
60
|
-
topLoadEnd: {
|
|
61
|
-
registrationName: 'onLoadEnd',
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
validAttributes: {
|
|
65
|
-
blurRadius: true,
|
|
66
|
-
capInsets: {
|
|
67
|
-
diff: require('../Utilities/differ/insetsDiffer'),
|
|
68
|
-
},
|
|
69
|
-
defaultSource: {
|
|
70
|
-
process: require('./resolveAssetSource'),
|
|
71
|
-
},
|
|
72
|
-
defaultSrc: true,
|
|
73
|
-
fadeDuration: true,
|
|
74
|
-
headers: true,
|
|
75
|
-
internal_analyticTag: true,
|
|
76
|
-
loadingIndicatorSrc: true,
|
|
77
|
-
onError: true,
|
|
78
|
-
onLoad: true,
|
|
79
|
-
onLoadEnd: true,
|
|
80
|
-
onLoadStart: true,
|
|
81
|
-
onPartialLoad: true,
|
|
82
|
-
onProgress: true,
|
|
83
|
-
overlayColor: {
|
|
84
|
-
process: require('../StyleSheet/processColor'),
|
|
85
|
-
},
|
|
86
|
-
progressiveRenderingEnabled: true,
|
|
87
|
-
resizeMethod: true,
|
|
88
|
-
resizeMode: true,
|
|
89
|
-
shouldNotifyLoadEvents: true,
|
|
90
|
-
source: true,
|
|
91
|
-
src: true,
|
|
92
|
-
tintColor: {
|
|
93
|
-
process: require('../StyleSheet/processColor'),
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
}),
|
|
133
|
+
() => ImageViewViewConfig,
|
|
97
134
|
);
|
|
98
135
|
|
|
99
136
|
export default ImageViewNativeComponent;
|
|
@@ -335,7 +335,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
|
|
|
335
335
|
|
|
336
336
|
[_imageLoader trackURLImageRequestDidDestroy:_loaderRequest];
|
|
337
337
|
_loaderRequest = nil;
|
|
338
|
-
|
|
338
|
+
|
|
339
339
|
if (!self.image) {
|
|
340
340
|
self.image = _defaultImage;
|
|
341
341
|
}
|
|
@@ -420,9 +420,10 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
|
|
|
420
420
|
}
|
|
421
421
|
|
|
422
422
|
RCTImageLoaderProgressBlock progressHandler = nil;
|
|
423
|
-
if (
|
|
423
|
+
if (self.onProgress) {
|
|
424
|
+
RCTDirectEventBlock onProgress = self.onProgress;
|
|
424
425
|
progressHandler = ^(int64_t loaded, int64_t total) {
|
|
425
|
-
|
|
426
|
+
onProgress(@{
|
|
426
427
|
@"loaded": @((double)loaded),
|
|
427
428
|
@"total": @((double)total),
|
|
428
429
|
});
|
|
@@ -482,8 +483,9 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
|
|
|
482
483
|
}
|
|
483
484
|
|
|
484
485
|
if (error) {
|
|
486
|
+
__weak RCTImageView *weakSelf = self;
|
|
485
487
|
RCTExecuteOnMainQueue(^{
|
|
486
|
-
|
|
488
|
+
weakSelf.image = nil;
|
|
487
489
|
});
|
|
488
490
|
|
|
489
491
|
if (_onError) {
|
|
@@ -495,33 +497,39 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
|
|
|
495
497
|
return;
|
|
496
498
|
}
|
|
497
499
|
|
|
500
|
+
__weak RCTImageView *weakSelf = self;
|
|
498
501
|
void (^setImageBlock)(UIImage *) = ^(UIImage *image) {
|
|
502
|
+
RCTImageView *strongSelf = weakSelf;
|
|
503
|
+
if (!strongSelf) {
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
499
506
|
if (!isPartialLoad) {
|
|
500
|
-
|
|
501
|
-
|
|
507
|
+
strongSelf->_imageSource = source;
|
|
508
|
+
strongSelf->_pendingImageSource = nil;
|
|
502
509
|
}
|
|
503
510
|
|
|
504
|
-
|
|
511
|
+
strongSelf.image = image;
|
|
505
512
|
|
|
506
513
|
if (isPartialLoad) {
|
|
507
|
-
if (
|
|
508
|
-
|
|
514
|
+
if (strongSelf->_onPartialLoad) {
|
|
515
|
+
strongSelf->_onPartialLoad(nil);
|
|
509
516
|
}
|
|
510
517
|
} else {
|
|
511
|
-
if (
|
|
518
|
+
if (strongSelf->_onLoad) {
|
|
512
519
|
RCTImageSource *sourceLoaded = [source imageSourceWithSize:image.size scale:source.scale];
|
|
513
|
-
|
|
520
|
+
strongSelf->_onLoad(onLoadParamsForSource(sourceLoaded));
|
|
514
521
|
}
|
|
515
|
-
if (
|
|
516
|
-
|
|
522
|
+
if (strongSelf->_onLoadEnd) {
|
|
523
|
+
strongSelf->_onLoadEnd(nil);
|
|
517
524
|
}
|
|
518
525
|
}
|
|
519
526
|
};
|
|
520
527
|
|
|
521
528
|
if (_blurRadius > __FLT_EPSILON__) {
|
|
522
529
|
// Blur on a background thread to avoid blocking interaction
|
|
530
|
+
CGFloat blurRadius = self.blurRadius;
|
|
523
531
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
524
|
-
UIImage *blurredImage = RCTBlurredImageWithRadius(loadedImage,
|
|
532
|
+
UIImage *blurredImage = RCTBlurredImageWithRadius(loadedImage, blurRadius);
|
|
525
533
|
RCTExecuteOnMainQueue(^{
|
|
526
534
|
setImageBlock(blurredImage);
|
|
527
535
|
});
|
|
@@ -10,91 +10,33 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
import type {ResolvedAssetSource} from './AssetSourceResolver';
|
|
14
13
|
import type {HostComponent} from '../Renderer/shims/ReactNativeTypes';
|
|
15
|
-
import type {ImageProps} from './ImageProps';
|
|
16
14
|
import type {ViewProps} from '../Components/View/ViewPropTypes';
|
|
15
|
+
import type {ImageResizeMode} from './ImageResizeMode';
|
|
17
16
|
import * as NativeComponentRegistry from '../NativeComponent/NativeComponentRegistry';
|
|
18
|
-
import type {
|
|
19
|
-
ColorValue,
|
|
20
|
-
DangerouslyImpreciseStyle,
|
|
21
|
-
ImageStyleProp,
|
|
22
|
-
} from '../StyleSheet/StyleSheet';
|
|
17
|
+
import type {ColorValue} from '../StyleSheet/StyleSheet';
|
|
23
18
|
|
|
24
|
-
type
|
|
25
|
-
...ImageProps,
|
|
19
|
+
type NativeProps = $ReadOnly<{
|
|
26
20
|
...ViewProps,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
tintColor?: ColorValue,
|
|
32
|
-
|
|
33
|
-
// Android native props
|
|
34
|
-
shouldNotifyLoadEvents?: boolean,
|
|
35
|
-
src?: ?ResolvedAssetSource | $ReadOnlyArray<{uri: string, ...}>,
|
|
36
|
-
headers?: ?string,
|
|
37
|
-
defaultSrc?: ?string,
|
|
38
|
-
loadingIndicatorSrc?: ?string,
|
|
39
|
-
internal_analyticTag?: ?string,
|
|
21
|
+
resizeMode?: ?ImageResizeMode,
|
|
22
|
+
src?: ?$ReadOnlyArray<?$ReadOnly<{uri: string, ...}>>,
|
|
23
|
+
tintColor?: ?ColorValue,
|
|
24
|
+
headers?: ?{[string]: string},
|
|
40
25
|
}>;
|
|
41
26
|
|
|
42
|
-
const TextInlineImage: HostComponent<
|
|
27
|
+
const TextInlineImage: HostComponent<NativeProps> = NativeComponentRegistry.get<NativeProps>(
|
|
43
28
|
'RCTTextInlineImage',
|
|
44
29
|
() => ({
|
|
45
30
|
uiViewClassName: 'RCTTextInlineImage',
|
|
46
31
|
bubblingEventTypes: {},
|
|
47
|
-
directEventTypes: {
|
|
48
|
-
topLoadStart: {
|
|
49
|
-
registrationName: 'onLoadStart',
|
|
50
|
-
},
|
|
51
|
-
topProgress: {
|
|
52
|
-
registrationName: 'onProgress',
|
|
53
|
-
},
|
|
54
|
-
topError: {
|
|
55
|
-
registrationName: 'onError',
|
|
56
|
-
},
|
|
57
|
-
topPartialLoad: {
|
|
58
|
-
registrationName: 'onPartialLoad',
|
|
59
|
-
},
|
|
60
|
-
topLoad: {
|
|
61
|
-
registrationName: 'onLoad',
|
|
62
|
-
},
|
|
63
|
-
topLoadEnd: {
|
|
64
|
-
registrationName: 'onLoadEnd',
|
|
65
|
-
},
|
|
66
|
-
},
|
|
32
|
+
directEventTypes: {},
|
|
67
33
|
validAttributes: {
|
|
68
|
-
blurRadius: true,
|
|
69
|
-
capInsets: {
|
|
70
|
-
diff: require('../Utilities/differ/insetsDiffer'),
|
|
71
|
-
},
|
|
72
|
-
defaultSource: {
|
|
73
|
-
process: require('./resolveAssetSource'),
|
|
74
|
-
},
|
|
75
|
-
defaultSrc: true,
|
|
76
|
-
fadeDuration: true,
|
|
77
|
-
headers: true,
|
|
78
|
-
internal_analyticTag: true,
|
|
79
|
-
loadingIndicatorSrc: true,
|
|
80
|
-
onError: true,
|
|
81
|
-
onLoad: true,
|
|
82
|
-
onLoadEnd: true,
|
|
83
|
-
onLoadStart: true,
|
|
84
|
-
onPartialLoad: true,
|
|
85
|
-
onProgress: true,
|
|
86
|
-
overlayColor: {
|
|
87
|
-
process: require('../StyleSheet/processColor'),
|
|
88
|
-
},
|
|
89
|
-
progressiveRenderingEnabled: true,
|
|
90
|
-
resizeMethod: true,
|
|
91
34
|
resizeMode: true,
|
|
92
|
-
shouldNotifyLoadEvents: true,
|
|
93
|
-
source: true,
|
|
94
35
|
src: true,
|
|
95
36
|
tintColor: {
|
|
96
37
|
process: require('../StyleSheet/processColor'),
|
|
97
38
|
},
|
|
39
|
+
headers: true,
|
|
98
40
|
},
|
|
99
41
|
}),
|
|
100
42
|
);
|
|
@@ -760,12 +760,14 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
760
760
|
onViewableItemsChanged: pair.onViewableItemsChanged,
|
|
761
761
|
}),
|
|
762
762
|
);
|
|
763
|
-
} else
|
|
764
|
-
this.
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
763
|
+
} else {
|
|
764
|
+
const {onViewableItemsChanged, viewabilityConfig} = this.props;
|
|
765
|
+
if (onViewableItemsChanged) {
|
|
766
|
+
this._viewabilityTuples.push({
|
|
767
|
+
viewabilityHelper: new ViewabilityHelper(viewabilityConfig),
|
|
768
|
+
onViewableItemsChanged: onViewableItemsChanged,
|
|
769
|
+
});
|
|
770
|
+
}
|
|
769
771
|
}
|
|
770
772
|
|
|
771
773
|
let initialState = {
|
package/Libraries/Modal/Modal.js
CHANGED
|
@@ -15,7 +15,6 @@ import NativeEventEmitter from '../EventEmitter/NativeEventEmitter';
|
|
|
15
15
|
import NativeModalManager from './NativeModalManager';
|
|
16
16
|
const Platform = require('../Utilities/Platform');
|
|
17
17
|
const React = require('react');
|
|
18
|
-
const PropTypes = require('prop-types');
|
|
19
18
|
const ScrollView = require('../Components/ScrollView/ScrollView');
|
|
20
19
|
const StyleSheet = require('../StyleSheet/StyleSheet');
|
|
21
20
|
const View = require('../Components/View/View');
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import {type ViewConfig} from '../Renderer/shims/ReactNativeTypes';
|
|
12
|
+
// $FlowFixMe[nonstrict-import]
|
|
13
|
+
import getNativeComponentAttributes from '../ReactNative/getNativeComponentAttributes';
|
|
14
|
+
// $FlowFixMe[nonstrict-import]
|
|
15
|
+
import {createViewConfig} from './ViewConfig';
|
|
12
16
|
|
|
13
17
|
type Difference =
|
|
14
18
|
| {
|
|
@@ -37,6 +41,41 @@ type InvalidResult = {
|
|
|
37
41
|
differences: Array<Difference>,
|
|
38
42
|
};
|
|
39
43
|
|
|
44
|
+
type ViewConfigValidationResult = {
|
|
45
|
+
componentName: string,
|
|
46
|
+
nativeViewConfig?: ?ViewConfig,
|
|
47
|
+
staticViewConfig?: ?ViewConfig,
|
|
48
|
+
validationResult?: ?ValidationResult,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// e.g. require('MyNativeComponent') where MyNativeComponent.js exports a HostComponent
|
|
52
|
+
type JSModule = $FlowFixMe;
|
|
53
|
+
|
|
54
|
+
export function validateStaticViewConfigs(
|
|
55
|
+
nativeComponent: JSModule,
|
|
56
|
+
): ViewConfigValidationResult {
|
|
57
|
+
const nativeViewConfig = getNativeComponentAttributes(
|
|
58
|
+
nativeComponent.default || nativeComponent,
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
const generatedPartialViewConfig = nativeComponent.__INTERNAL_VIEW_CONFIG;
|
|
62
|
+
const staticViewConfig: ?ViewConfig =
|
|
63
|
+
generatedPartialViewConfig && createViewConfig(generatedPartialViewConfig);
|
|
64
|
+
|
|
65
|
+
const componentName: string = nativeComponent.default || nativeComponent;
|
|
66
|
+
const validationResult: ?ValidationResult =
|
|
67
|
+
nativeViewConfig &&
|
|
68
|
+
staticViewConfig &&
|
|
69
|
+
validate(componentName, nativeViewConfig, staticViewConfig);
|
|
70
|
+
|
|
71
|
+
return {
|
|
72
|
+
componentName,
|
|
73
|
+
nativeViewConfig,
|
|
74
|
+
staticViewConfig,
|
|
75
|
+
validationResult,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
40
79
|
/**
|
|
41
80
|
* During the migration from native view configs to static view configs, this is
|
|
42
81
|
* used to validate that the two are equivalent.
|
|
@@ -136,7 +136,6 @@ class XMLHttpRequest extends (EventTarget(...XHR_EVENTS): any) {
|
|
|
136
136
|
_lowerCaseResponseHeaders: Object;
|
|
137
137
|
_method: ?string = null;
|
|
138
138
|
_perfKey: ?string = null;
|
|
139
|
-
_response: string | ?Object;
|
|
140
139
|
_responseType: ResponseType;
|
|
141
140
|
_response: string = '';
|
|
142
141
|
_sent: boolean;
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
const AUTO_SET_TIMESTAMP = -1;
|
|
14
14
|
const DUMMY_INSTANCE_KEY = 0;
|
|
15
15
|
|
|
16
|
+
// Defines map of annotations for markEvent
|
|
17
|
+
// Use as following:
|
|
18
|
+
// {string: {key1: value1, key2: value2}}
|
|
19
|
+
export type AnnotationsMap = $Shape<{
|
|
20
|
+
string: ?{[string]: string, ...},
|
|
21
|
+
}>;
|
|
22
|
+
|
|
16
23
|
const QuickPerformanceLogger = {
|
|
17
24
|
markerStart(
|
|
18
25
|
markerId: number,
|
|
@@ -90,6 +97,16 @@ const QuickPerformanceLogger = {
|
|
|
90
97
|
}
|
|
91
98
|
},
|
|
92
99
|
|
|
100
|
+
markEvent(
|
|
101
|
+
markerId: number,
|
|
102
|
+
type: string,
|
|
103
|
+
annotations: ?AnnotationsMap = null,
|
|
104
|
+
): void {
|
|
105
|
+
if (global.nativeQPLMarkEvent) {
|
|
106
|
+
global.nativeQPLMarkEvent(markerId, type, annotations);
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
|
|
93
110
|
currentTimestamp(): number {
|
|
94
111
|
if (global.nativeQPLTimestamp) {
|
|
95
112
|
return global.nativeQPLTimestamp();
|
|
@@ -31,15 +31,10 @@ export interface UIManagerJSInterface extends Spec {
|
|
|
31
31
|
) => void;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const {unstable_UIManager} = require('./UIManagerInjection');
|
|
40
|
-
UIManager = unstable_UIManager
|
|
41
|
-
? unstable_UIManager
|
|
42
|
-
: require('./PaperUIManager');
|
|
43
|
-
}
|
|
34
|
+
const UIManager: UIManagerJSInterface =
|
|
35
|
+
global.RN$Bridgeless === true
|
|
36
|
+
? require('./DummyUIManager')
|
|
37
|
+
: require('./UIManagerInjection').default.unstable_UIManager ??
|
|
38
|
+
require('./PaperUIManager');
|
|
44
39
|
|
|
45
40
|
module.exports = UIManager;
|
|
@@ -164,6 +164,8 @@ function getDifferForType(
|
|
|
164
164
|
// Android Types
|
|
165
165
|
case 'Point':
|
|
166
166
|
return pointsDiffer;
|
|
167
|
+
case 'EdgeInsets':
|
|
168
|
+
return insetsDiffer;
|
|
167
169
|
}
|
|
168
170
|
return null;
|
|
169
171
|
}
|
|
@@ -186,6 +188,8 @@ function getProcessorForType(typeName: string): ?(nextProp: any) => any {
|
|
|
186
188
|
return processColor;
|
|
187
189
|
case 'ColorArray':
|
|
188
190
|
return processColorArray;
|
|
191
|
+
case 'ImageSource':
|
|
192
|
+
return resolveAssetSource;
|
|
189
193
|
}
|
|
190
194
|
return null;
|
|
191
195
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
51947a14bb24bd151f76f6fc0acdbbc404de13f7
|