react-native-windows 0.82.1 → 0.83.0-preview.0
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 +2 -7
- package/Libraries/Animated/components/AnimatedFlatList.js +5 -3
- package/Libraries/Animated/components/AnimatedImage.js +4 -3
- package/Libraries/Animated/components/AnimatedSectionList.js +2 -2
- package/Libraries/Animated/components/AnimatedText.js +7 -3
- package/Libraries/Animated/components/AnimatedView.js +3 -2
- package/Libraries/Animated/createAnimatedComponent.js +24 -12
- package/Libraries/Animated/nodes/AnimatedColor.js +26 -10
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +43 -15
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +43 -15
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +2 -2
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +2 -2
- package/Libraries/Components/Glyph/Glyph.js +4 -1
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +2 -2
- package/Libraries/Components/RefreshControl/RefreshControl.d.ts +3 -3
- package/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +2 -2
- package/Libraries/Components/ScrollView/ScrollView.js +1 -0
- package/Libraries/Components/ScrollView/ScrollView.windows.js +1 -0
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +6 -6
- package/Libraries/Components/Switch/Switch.d.ts +2 -2
- package/Libraries/Components/Switch/Switch.windows.js +1 -1
- package/Libraries/Components/TextInput/TextInput.d.ts +2 -5
- package/Libraries/Components/TextInput/TextInput.js +6 -0
- package/Libraries/Components/TextInput/TextInput.windows.js +6 -0
- package/Libraries/Components/Touchable/TouchableBounce.js +7 -7
- package/Libraries/Components/Touchable/TouchableBounce.windows.js +7 -7
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +1 -1
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +19 -1
- package/Libraries/Components/View/View.d.ts +2 -2
- package/Libraries/Components/View/View.windows.js +0 -1
- package/Libraries/Components/View/ViewNativeComponent.js +13 -1
- package/Libraries/Core/ReactNativeVersion.js +3 -3
- package/Libraries/Core/setUpPerformance.js +2 -0
- package/Libraries/Debugging/DebuggingOverlay.js +14 -14
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +8 -2
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +5 -2
- package/Libraries/Image/Image.d.ts +3 -3
- package/Libraries/Image/ImageInjection.js +3 -6
- package/Libraries/Image/ImageTypes.flow.js +3 -7
- package/Libraries/Lists/FlatList.js +8 -8
- package/Libraries/Lists/SectionList.d.ts +5 -1
- package/Libraries/Lists/ViewabilityHelper.js +1 -1
- package/Libraries/Lists/VirtualizedList.js +1 -0
- package/Libraries/LogBox/UI/AnsiHighlight.js +4 -1
- package/Libraries/NativeComponent/BaseViewConfig.android.js +11 -2
- package/Libraries/NativeComponent/NativeComponentRegistry.d.ts +98 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +2 -0
- package/Libraries/NativeComponent/NativeComponentRegistryUnstable.js +3 -1
- package/Libraries/NativeComponent/ViewConfigIgnore.windows.js +45 -0
- package/Libraries/Network/RCTNetworking.android.js +3 -1
- package/Libraries/Network/RCTNetworking.ios.js +3 -0
- package/Libraries/Network/RCTNetworking.windows.js +3 -0
- package/Libraries/Network/XMLHttpRequest.js +1 -41
- package/Libraries/Pressability/usePressability.js +14 -3
- package/Libraries/ReactNative/PaperUIManager.windows.js +3 -3
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +20 -82
- package/Libraries/ReactNative/getNativeComponentAttributes.js +12 -0
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +6759 -4478
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3169 -3119
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4732 -3535
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +6646 -4070
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3136 -2825
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4761 -3312
- package/Libraries/Renderer/shims/ReactNative.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeTypes.js +2 -1
- package/Libraries/Renderer/shims/ReactNativeTypes.windows.js +2 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +44 -0
- package/Libraries/StyleSheet/processBackgroundPosition.js +284 -0
- package/Libraries/StyleSheet/processBackgroundRepeat.js +105 -0
- package/Libraries/StyleSheet/processBackgroundSize.js +104 -0
- package/Libraries/Text/Text.d.ts +2 -2
- package/Libraries/Text/TextNativeComponent.js +10 -0
- package/Libraries/TurboModule/TurboModuleRegistry.js +3 -9
- package/Libraries/Utilities/DevLoadingView.js +14 -6
- package/Libraries/Utilities/HMRClient.js +13 -5
- package/Microsoft.ReactNative/Base/CxxReactIncludes.h +11 -0
- package/Microsoft.ReactNative/CompositionComponentView.idl +2 -0
- package/Microsoft.ReactNative/CompositionHwndHost.idl +1 -0
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/ComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +10 -40
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +3 -80
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +45 -12
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +8 -0
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +61 -74
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +4 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +4 -3
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeWindow.cpp +245 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeWindow.h +80 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +20 -36
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +70 -49
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +4 -1
- package/Microsoft.ReactNative/Fabric/Composition/UriImageManager.cpp +5 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/WindowsTextLayoutManager.cpp +7 -2
- package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +1 -0
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +1 -1
- package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +20 -94
- package/Microsoft.ReactNative/Modules/LogBoxModule.h +1 -3
- package/Microsoft.ReactNative/Pch/pch.h +2 -0
- package/Microsoft.ReactNative/ReactHost/CrashManager.cpp +5 -0
- package/Microsoft.ReactNative/ReactHost/ReactNativeHeaders.h +1 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +0 -41
- package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +0 -11
- package/Microsoft.ReactNative/ReactNativeIsland.idl +2 -3
- package/Microsoft.ReactNative/ReactNativeWin32App.cpp +31 -101
- package/Microsoft.ReactNative/ReactNativeWin32App.h +2 -13
- package/Microsoft.ReactNative/ReactNativeWindow.idl +44 -0
- package/Microsoft.ReactNative.Cxx/AutoDraw.h +9 -1
- package/Microsoft.ReactNative.Cxx/ReactCommon/CallInvoker.h +13 -16
- package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModule.h +24 -36
- package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModuleUtils.h +5 -8
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/AString.h +8 -6
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Array.h +32 -49
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Base.h +27 -76
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Bool.h +4 -2
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/CallbackWrapper.h +19 -18
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Class.h +25 -48
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Convert.h +38 -31
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Error.h +11 -6
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/EventEmitter.h +47 -45
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Function.h +69 -89
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/HighResTimeStamp.h +8 -8
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/LongLivedObject.h +6 -6
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Number.h +16 -8
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Object.h +17 -24
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Promise.h +17 -17
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Value.h +20 -29
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/debug/react_native_assert.h +2 -7
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/timing/primitives.h +127 -115
- package/PropertySheets/External/Microsoft.ReactNative.Composition.CppLib.props +10 -0
- package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.props +10 -0
- package/PropertySheets/Generated/PackageVersion.g.props +5 -5
- package/PropertySheets/Warnings.props +2 -1
- package/ReactCommon/ReactCommon.vcxproj +21 -12
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp +2 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/Instance.cpp +381 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +49 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSIndexedRAMBundle.cpp +145 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/MethodCall.cpp +100 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ModuleRegistry.cpp +256 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +13 -4
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/RAMBundleRegistry.cpp +93 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ReactMarker.cpp +149 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h +25 -35
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +86 -67
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsiexecutor/jsireact/JSIExecutor.cpp +629 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsiexecutor/jsireact/JSINativeModules.cpp +123 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +84 -68
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +31 -35
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h +4 -5
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/network/HttpUtils.cpp +2 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +24 -36
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.h +28 -66
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/webperformance/NativePerformance.cpp +414 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +3 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/image/conversions.h +8 -4
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/ParagraphShadowNode.cpp +19 -16
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/platform/android/react/renderer/components/text/ParagraphState.h +8 -9
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +25 -95
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/accessibilityPropsConversions.h +85 -42
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventDispatcher.cpp +81 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventQueueProcessor.cpp +140 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/imagemanager/primitives.h +25 -31
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/UIManager.cpp +746 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +702 -0
- package/Scripts/Tfs/Layout-Desktop-Headers.ps1 +1 -15
- package/Scripts/creaternwapp.cmd +1 -1
- package/Scripts/perf/compare-results.js +357 -0
- package/Scripts/perf/create-perf-test.js +343 -0
- package/Scripts/perf/post-pr-comment.js +210 -0
- package/Shared/Hermes/HermesRuntimeTargetDelegate.cpp +8 -0
- package/Shared/Hermes/HermesRuntimeTargetDelegate.h +3 -0
- package/Shared/Shared.vcxitems +24 -12
- package/Shared/Shared.vcxitems.filters +11 -3
- package/codegen/NativeIntersectionObserverSpec.g.h +2 -0
- package/codegen/NativeNetworkingIOSSpec.g.h +2 -0
- package/codegen/NativePerformanceSpec.g.h +6 -0
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +229 -139
- package/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +2 -1
- package/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +42 -25
- package/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +2 -1
- package/codegen/react/components/rnwcore/AndroidProgressBar.g.h +2 -1
- package/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +11 -6
- package/codegen/react/components/rnwcore/AndroidSwitch.g.h +11 -6
- package/codegen/react/components/rnwcore/DebuggingOverlay.g.h +1 -0
- package/codegen/react/components/rnwcore/InputAccessory.g.h +2 -1
- package/codegen/react/components/rnwcore/ModalHostView.g.h +40 -23
- package/codegen/react/components/rnwcore/Props.cpp +6 -1
- package/codegen/react/components/rnwcore/Props.h +1 -0
- package/codegen/react/components/rnwcore/PullToRefreshView.g.h +11 -6
- package/codegen/react/components/rnwcore/SafeAreaView.g.h +1 -0
- package/codegen/react/components/rnwcore/Switch.g.h +11 -6
- package/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +2 -1
- package/codegen/react/components/rnwcore/VirtualView.g.h +41 -8
- package/codegen/react/components/rnwcore/VirtualViewExperimental.g.h +45 -8
- package/codegen/rnwcoreJSI.h +3973 -6059
- package/index.js +6 -0
- package/index.windows.js +6 -0
- package/jest/mockComponent.js +6 -6
- package/jest/setup.js +15 -10
- package/package.json +27 -27
- package/src/private/components/virtualview/VirtualView.js +22 -27
- package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +6 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +100 -19
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +18 -3
- package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
- package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeNetworkingIOS.js +1 -0
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +12 -2
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +76 -15
- package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +1 -0
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
- package/src/private/webapis/performance/ResourceTiming.js +31 -4
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +4 -1
- package/src/private/webapis/performance/specs/NativePerformance.js +3 -0
- package/stubs/double-conversion/double-conversion.h +5 -0
- package/templates/cpp-app/template.config.js +1 -1
- package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +3 -1
- package/templates/cpp-lib/template.config.js +1 -1
- package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +1 -1
- package/types/index.d.ts +1 -0
- package/types/public/ReactNativeTypes.d.ts +115 -2
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +0 -152
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/conversions.h +0 -1574
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/ShadowNode.cpp +0 -528
- package/Scripts/OpenSSL.nuspec +0 -39
- package/Scripts/OpenSSL.targets +0 -36
- package/codegen/rnwcoreJSI-generated.cpp +0 -3470
|
@@ -44,7 +44,7 @@ interface Instance extends React.ElementRef<typeof Animated.View> {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
const ScrollViewStickyHeader: component(
|
|
47
|
-
ref
|
|
47
|
+
ref?: React.RefSetter<Instance>,
|
|
48
48
|
...props: ScrollViewStickyHeaderProps
|
|
49
49
|
) = function ScrollViewStickyHeader({
|
|
50
50
|
ref: forwardedRef,
|
|
@@ -282,7 +282,7 @@ const ScrollViewStickyHeader: component(
|
|
|
282
282
|
const passthroughAnimatedPropExplicitValues =
|
|
283
283
|
isFabric && translateY != null
|
|
284
284
|
? {
|
|
285
|
-
style: {transform: [{translateY
|
|
285
|
+
style: {transform: [{translateY}]},
|
|
286
286
|
}
|
|
287
287
|
: null;
|
|
288
288
|
|
|
@@ -303,20 +303,20 @@ const ScrollViewStickyHeader: component(
|
|
|
303
303
|
passthroughAnimatedPropExplicitValues
|
|
304
304
|
}>
|
|
305
305
|
{cloneElement(child, {
|
|
306
|
-
style: styles.fill, // We transfer the child style to the wrapper.
|
|
307
306
|
onLayout: undefined, // we call this manually through our this._onLayout
|
|
307
|
+
style: styles.fill, // We transfer the child style to the wrapper.
|
|
308
308
|
})}
|
|
309
309
|
</Animated.View>
|
|
310
310
|
);
|
|
311
311
|
};
|
|
312
312
|
|
|
313
313
|
const styles = StyleSheet.create({
|
|
314
|
-
header: {
|
|
315
|
-
zIndex: 10,
|
|
316
|
-
},
|
|
317
314
|
fill: {
|
|
318
315
|
flex: 1,
|
|
319
316
|
},
|
|
317
|
+
header: {
|
|
318
|
+
zIndex: 10,
|
|
319
|
+
},
|
|
320
320
|
});
|
|
321
321
|
|
|
322
322
|
export default ScrollViewStickyHeader;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import type * as React from 'react';
|
|
11
11
|
import {Constructor} from '../../../types/private/Utilities';
|
|
12
|
-
import {
|
|
12
|
+
import {HostInstance} from '../../../types/public/ReactNativeTypes';
|
|
13
13
|
import {ColorValue, StyleProp} from '../../StyleSheet/StyleSheet';
|
|
14
14
|
import {ViewStyle} from '../../StyleSheet/StyleSheetTypes';
|
|
15
15
|
import {ViewProps} from '../View/ViewPropTypes';
|
|
@@ -114,5 +114,5 @@ export interface SwitchProps extends SwitchPropsIOS {
|
|
|
114
114
|
* the supplied `value` prop instead of the expected result of any user actions.
|
|
115
115
|
*/
|
|
116
116
|
declare class SwitchComponent extends React.Component<SwitchProps> {}
|
|
117
|
-
declare const SwitchBase: Constructor<
|
|
117
|
+
declare const SwitchBase: Constructor<HostInstance> & typeof SwitchComponent;
|
|
118
118
|
export class Switch extends SwitchBase {}
|
|
@@ -272,7 +272,7 @@ const Switch: component(
|
|
|
272
272
|
disabled,
|
|
273
273
|
onTintColor: trackColorForTrue,
|
|
274
274
|
style: StyleSheet.compose(
|
|
275
|
-
{height: 31, width: 51},
|
|
275
|
+
{height: 31, width: 51}, //#Windows 15652
|
|
276
276
|
StyleSheet.compose(
|
|
277
277
|
style,
|
|
278
278
|
ios_backgroundColor == null
|
|
@@ -10,10 +10,7 @@
|
|
|
10
10
|
import type * as React from 'react';
|
|
11
11
|
import {Constructor} from '../../../types/private/Utilities';
|
|
12
12
|
import {TimerMixin} from '../../../types/private/TimerMixin';
|
|
13
|
-
import {
|
|
14
|
-
HostInstance,
|
|
15
|
-
NativeMethods,
|
|
16
|
-
} from '../../../types/public/ReactNativeTypes';
|
|
13
|
+
import {HostInstance} from '../../../types/public/ReactNativeTypes';
|
|
17
14
|
import {ColorValue, StyleProp} from '../../StyleSheet/StyleSheet';
|
|
18
15
|
import {TextStyle} from '../../StyleSheet/StyleSheetTypes';
|
|
19
16
|
import {
|
|
@@ -1029,7 +1026,7 @@ interface TextInputState {
|
|
|
1029
1026
|
* @see https://reactnative.dev/docs/textinput#methods
|
|
1030
1027
|
*/
|
|
1031
1028
|
declare class TextInputComponent extends React.Component<TextInputProps> {}
|
|
1032
|
-
declare const TextInputBase: Constructor<
|
|
1029
|
+
declare const TextInputBase: Constructor<HostInstance> &
|
|
1033
1030
|
Constructor<TimerMixin> &
|
|
1034
1031
|
typeof TextInputComponent;
|
|
1035
1032
|
export class TextInput extends TextInputBase {
|
|
@@ -449,6 +449,12 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
449
449
|
before we can get to the long term breaking change.
|
|
450
450
|
*/
|
|
451
451
|
if (instance != null) {
|
|
452
|
+
// Register the input immediately when the ref is set so that focus()
|
|
453
|
+
// can be called from ref callbacks
|
|
454
|
+
// Double registering during useLayoutEffect is fine, because the underlying
|
|
455
|
+
// state is a Set.
|
|
456
|
+
TextInputState.registerInput(instance);
|
|
457
|
+
|
|
452
458
|
// $FlowFixMe[prop-missing] - See the explanation above.
|
|
453
459
|
// $FlowFixMe[unsafe-object-assign]
|
|
454
460
|
Object.assign(instance, {
|
|
@@ -476,6 +476,12 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
476
476
|
before we can get to the long term breaking change.
|
|
477
477
|
*/
|
|
478
478
|
if (instance != null) {
|
|
479
|
+
// Register the input immediately when the ref is set so that focus()
|
|
480
|
+
// can be called from ref callbacks
|
|
481
|
+
// Double registering during useLayoutEffect is fine, because the underlying
|
|
482
|
+
// state is a Set.
|
|
483
|
+
TextInputState.registerInput(instance);
|
|
484
|
+
|
|
479
485
|
// $FlowFixMe[prop-missing] - See the explanation above.
|
|
480
486
|
// $FlowFixMe[unsafe-object-assign] - Intentional mutation of ref instance
|
|
481
487
|
Object.assign(instance, {
|
|
@@ -47,15 +47,14 @@ class TouchableBounce extends React.Component<
|
|
|
47
47
|
|
|
48
48
|
_createPressabilityConfig(): PressabilityConfig {
|
|
49
49
|
return {
|
|
50
|
+
android_disableSound: this.props.touchSoundDisabled,
|
|
50
51
|
cancelable: !this.props.rejectResponderTermination,
|
|
51
|
-
disabled: this.props.disabled,
|
|
52
|
-
hitSlop: this.props.hitSlop,
|
|
53
52
|
delayLongPress: this.props.delayLongPress,
|
|
54
53
|
delayPressIn: this.props.delayPressIn,
|
|
55
54
|
delayPressOut: this.props.delayPressOut,
|
|
55
|
+
disabled: this.props.disabled,
|
|
56
|
+
hitSlop: this.props.hitSlop,
|
|
56
57
|
minPressDuration: 0,
|
|
57
|
-
pressRectOffset: this.props.pressRetentionOffset,
|
|
58
|
-
android_disableSound: this.props.touchSoundDisabled,
|
|
59
58
|
onBlur: event => {
|
|
60
59
|
if (Platform.isTV) {
|
|
61
60
|
this._bounceTo(1, 0.4, 0);
|
|
@@ -113,6 +112,7 @@ class TouchableBounce extends React.Component<
|
|
|
113
112
|
this.props.onPressOut(event);
|
|
114
113
|
}
|
|
115
114
|
},
|
|
115
|
+
pressRectOffset: this.props.pressRetentionOffset,
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
|
|
@@ -123,10 +123,10 @@ class TouchableBounce extends React.Component<
|
|
|
123
123
|
callback?: ?() => void,
|
|
124
124
|
) {
|
|
125
125
|
Animated.spring(this.state.scale, {
|
|
126
|
-
toValue,
|
|
127
|
-
velocity,
|
|
128
126
|
bounciness,
|
|
127
|
+
toValue,
|
|
129
128
|
useNativeDriver: true,
|
|
129
|
+
velocity,
|
|
130
130
|
}).start(callback);
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -230,6 +230,6 @@ export default (function TouchableBounceWrapper({
|
|
|
230
230
|
}) {
|
|
231
231
|
return <TouchableBounce {...props} hostRef={hostRef} />;
|
|
232
232
|
} as component(
|
|
233
|
-
ref
|
|
233
|
+
ref?: React.RefSetter<mixed>,
|
|
234
234
|
...props: $ReadOnly<Omit<TouchableBounceProps, 'hostRef'>>
|
|
235
235
|
));
|
|
@@ -47,15 +47,14 @@ class TouchableBounce extends React.Component<
|
|
|
47
47
|
|
|
48
48
|
_createPressabilityConfig(): PressabilityConfig {
|
|
49
49
|
return {
|
|
50
|
+
android_disableSound: this.props.touchSoundDisabled,
|
|
50
51
|
cancelable: !this.props.rejectResponderTermination,
|
|
51
|
-
disabled: this.props.disabled,
|
|
52
|
-
hitSlop: this.props.hitSlop,
|
|
53
52
|
delayLongPress: this.props.delayLongPress,
|
|
54
53
|
delayPressIn: this.props.delayPressIn,
|
|
55
54
|
delayPressOut: this.props.delayPressOut,
|
|
55
|
+
disabled: this.props.disabled,
|
|
56
|
+
hitSlop: this.props.hitSlop,
|
|
56
57
|
minPressDuration: 0,
|
|
57
|
-
pressRectOffset: this.props.pressRetentionOffset,
|
|
58
|
-
android_disableSound: this.props.touchSoundDisabled,
|
|
59
58
|
onBlur: event => {
|
|
60
59
|
if (Platform.isTV) {
|
|
61
60
|
this._bounceTo(1, 0.4, 0);
|
|
@@ -113,6 +112,7 @@ class TouchableBounce extends React.Component<
|
|
|
113
112
|
this.props.onPressOut(event);
|
|
114
113
|
}
|
|
115
114
|
},
|
|
115
|
+
pressRectOffset: this.props.pressRetentionOffset,
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
|
|
@@ -123,10 +123,10 @@ class TouchableBounce extends React.Component<
|
|
|
123
123
|
callback?: ?() => void,
|
|
124
124
|
) {
|
|
125
125
|
Animated.spring(this.state.scale, {
|
|
126
|
-
toValue,
|
|
127
|
-
velocity,
|
|
128
126
|
bounciness,
|
|
127
|
+
toValue,
|
|
129
128
|
useNativeDriver: true,
|
|
129
|
+
velocity,
|
|
130
130
|
}).start(callback);
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -237,6 +237,6 @@ export default (function TouchableBounceWrapper({
|
|
|
237
237
|
}) {
|
|
238
238
|
return <TouchableBounce {...props} hostRef={hostRef} />;
|
|
239
239
|
} as component(
|
|
240
|
-
ref
|
|
240
|
+
ref?: React.RefSetter<mixed>,
|
|
241
241
|
...props: $ReadOnly<Omit<TouchableBounceProps, 'hostRef'>>
|
|
242
242
|
));
|
|
@@ -191,7 +191,7 @@ const TouchableWithoutFeedback: React.AbstractComponent<
|
|
|
191
191
|
React.ElementRef<typeof Animated.View>,
|
|
192
192
|
> = React.forwardRef(function TouchableWithoutFeedback(
|
|
193
193
|
props: TouchableWithoutFeedbackProps,
|
|
194
|
-
ref
|
|
194
|
+
ref: React.RefSetter<React.ElementRef<typeof Animated.View>>,
|
|
195
195
|
): React.Node {
|
|
196
196
|
const {
|
|
197
197
|
disabled,
|
|
@@ -13,6 +13,9 @@ import type {AnyAttributeType} from '../../Renderer/shims/ReactNativeTypes';
|
|
|
13
13
|
import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
|
|
14
14
|
import processAspectRatio from '../../StyleSheet/processAspectRatio';
|
|
15
15
|
import processBackgroundImage from '../../StyleSheet/processBackgroundImage';
|
|
16
|
+
import processBackgroundPosition from '../../StyleSheet/processBackgroundPosition';
|
|
17
|
+
import processBackgroundRepeat from '../../StyleSheet/processBackgroundRepeat';
|
|
18
|
+
import processBackgroundSize from '../../StyleSheet/processBackgroundSize';
|
|
16
19
|
import processBoxShadow from '../../StyleSheet/processBoxShadow';
|
|
17
20
|
import processColor from '../../StyleSheet/processColor';
|
|
18
21
|
import processFilter from '../../StyleSheet/processFilter';
|
|
@@ -144,10 +147,25 @@ const ReactNativeStyleAttributes: {[string]: AnyAttributeType, ...} = {
|
|
|
144
147
|
: {process: processBoxShadow},
|
|
145
148
|
|
|
146
149
|
/**
|
|
147
|
-
*
|
|
150
|
+
* BackgroundImage
|
|
148
151
|
*/
|
|
149
152
|
experimental_backgroundImage: {process: processBackgroundImage},
|
|
150
153
|
|
|
154
|
+
/**
|
|
155
|
+
* BackgroundSize
|
|
156
|
+
*/
|
|
157
|
+
experimental_backgroundSize: {process: processBackgroundSize},
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* BackgroundPosition
|
|
161
|
+
*/
|
|
162
|
+
experimental_backgroundPosition: {process: processBackgroundPosition},
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* BackgroundRepeat
|
|
166
|
+
*/
|
|
167
|
+
experimental_backgroundRepeat: {process: processBackgroundRepeat},
|
|
168
|
+
|
|
151
169
|
/**
|
|
152
170
|
* View
|
|
153
171
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import type * as React from 'react';
|
|
11
11
|
import {Constructor} from '../../../types/private/Utilities';
|
|
12
12
|
import {ViewProps} from './ViewPropTypes';
|
|
13
|
-
import {
|
|
13
|
+
import {HostInstance} from '../../../types/public/ReactNativeTypes';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* The most fundamental component for building UI, View is a container that supports layout with flexbox, style, some touch handling,
|
|
@@ -19,7 +19,7 @@ import {NativeMethods} from '../../../types/public/ReactNativeTypes';
|
|
|
19
19
|
* whether that is a UIView, <div>, android.view, etc.
|
|
20
20
|
*/
|
|
21
21
|
declare class ViewComponent extends React.Component<ViewProps> {}
|
|
22
|
-
declare const ViewBase: Constructor<
|
|
22
|
+
declare const ViewBase: Constructor<HostInstance> & typeof ViewComponent;
|
|
23
23
|
export class View extends ViewBase {
|
|
24
24
|
/**
|
|
25
25
|
* Is 3D Touch / Force Touch available (i.e. will touch events include `force`)
|
|
@@ -21,14 +21,26 @@ const ViewNativeComponent: HostComponent<Props> =
|
|
|
21
21
|
}));
|
|
22
22
|
|
|
23
23
|
interface NativeCommands {
|
|
24
|
+
+focus: (viewRef: HostInstance) => void;
|
|
25
|
+
+blur: (viewRef: HostInstance) => void;
|
|
24
26
|
+hotspotUpdate: (viewRef: HostInstance, x: number, y: number) => void;
|
|
25
27
|
+setPressed: (viewRef: HostInstance, pressed: boolean) => void;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
29
|
-
supportedCommands: ['hotspotUpdate', 'setPressed'],
|
|
31
|
+
supportedCommands: ['focus', 'blur', 'hotspotUpdate', 'setPressed'],
|
|
30
32
|
});
|
|
31
33
|
|
|
34
|
+
/**
|
|
35
|
+
* `ViewNativeComponent` is an internal React Native host component, and is
|
|
36
|
+
* exported to provide lower-level access for libraries.
|
|
37
|
+
*
|
|
38
|
+
* @warning `<unstable_NativeView>` provides no semver guarantees and is not
|
|
39
|
+
* intended to be used in app code. Please use
|
|
40
|
+
* [`<View>`](https://reactnative.dev/docs/view) instead.
|
|
41
|
+
*/
|
|
42
|
+
// Additional note: Our long term plan is to reduce the overhead of the <Text>
|
|
43
|
+
// and <View> wrappers so that we no longer have any reason to export these APIs.
|
|
32
44
|
export default ViewNativeComponent;
|
|
33
45
|
|
|
34
46
|
export type ViewNativeComponentType = HostComponent<Props>;
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
*/
|
|
28
28
|
export default class ReactNativeVersion {
|
|
29
29
|
static major: number = 0;
|
|
30
|
-
static minor: number =
|
|
31
|
-
static patch: number =
|
|
32
|
-
static prerelease: string | null =
|
|
30
|
+
static minor: number = 83;
|
|
31
|
+
static patch: number = 0;
|
|
32
|
+
static prerelease: string | null = 'rc.5';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
@@ -20,7 +20,9 @@ if (NativePerformance) {
|
|
|
20
20
|
// $FlowExpectedError[cannot-write]
|
|
21
21
|
global.performance = {
|
|
22
22
|
mark: () => {},
|
|
23
|
+
clearMarks: () => {},
|
|
23
24
|
measure: () => {},
|
|
25
|
+
clearMeasures: () => {},
|
|
24
26
|
now: () => {
|
|
25
27
|
const performanceNow = global.nativePerformanceNow || Date.now;
|
|
26
28
|
return performanceNow();
|
|
@@ -39,20 +39,13 @@ function DebuggingOverlay({
|
|
|
39
39
|
useImperativeHandle(
|
|
40
40
|
ref,
|
|
41
41
|
() => ({
|
|
42
|
-
|
|
42
|
+
clearElementsHighlight() {
|
|
43
43
|
if (!isNativeComponentReady) {
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
const nonEmptyRectangles = updates.filter(
|
|
48
|
-
({rectangle, color}) => rectangle.width >= 0 && rectangle.height >= 0,
|
|
49
|
-
);
|
|
50
|
-
|
|
51
47
|
if (nativeComponentRef.current != null) {
|
|
52
|
-
Commands.
|
|
53
|
-
nativeComponentRef.current,
|
|
54
|
-
nonEmptyRectangles,
|
|
55
|
-
);
|
|
48
|
+
Commands.clearElementsHighlights(nativeComponentRef.current);
|
|
56
49
|
}
|
|
57
50
|
},
|
|
58
51
|
highlightElements(elements) {
|
|
@@ -64,13 +57,20 @@ function DebuggingOverlay({
|
|
|
64
57
|
Commands.highlightElements(nativeComponentRef.current, elements);
|
|
65
58
|
}
|
|
66
59
|
},
|
|
67
|
-
|
|
60
|
+
highlightTraceUpdates(updates) {
|
|
68
61
|
if (!isNativeComponentReady) {
|
|
69
62
|
return;
|
|
70
63
|
}
|
|
71
64
|
|
|
65
|
+
const nonEmptyRectangles = updates.filter(
|
|
66
|
+
({rectangle, color}) => rectangle.width >= 0 && rectangle.height >= 0,
|
|
67
|
+
);
|
|
68
|
+
|
|
72
69
|
if (nativeComponentRef.current != null) {
|
|
73
|
-
Commands.
|
|
70
|
+
Commands.highlightTraceUpdates(
|
|
71
|
+
nativeComponentRef.current,
|
|
72
|
+
nonEmptyRectangles,
|
|
73
|
+
);
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
}),
|
|
@@ -95,14 +95,14 @@ function DebuggingOverlay({
|
|
|
95
95
|
|
|
96
96
|
const styles = StyleSheet.create({
|
|
97
97
|
overlay: {
|
|
98
|
-
position: 'absolute',
|
|
99
|
-
top: 0,
|
|
100
98
|
bottom: 0,
|
|
101
99
|
left: 0,
|
|
100
|
+
position: 'absolute',
|
|
102
101
|
right: 0,
|
|
102
|
+
top: 0,
|
|
103
103
|
},
|
|
104
104
|
});
|
|
105
105
|
|
|
106
106
|
export default DebuggingOverlay as component(
|
|
107
|
-
ref
|
|
107
|
+
ref?: React.RefSetter<DebuggingOverlayHandle>,
|
|
108
108
|
);
|
|
@@ -332,7 +332,9 @@ class DebuggingOverlayRegistry {
|
|
|
332
332
|
instance.measure((x, y, width, height, left, top) => {
|
|
333
333
|
// measure can execute callback without any values provided to signal error.
|
|
334
334
|
if (left == null || top == null || width == null || height == null) {
|
|
335
|
-
reject(
|
|
335
|
+
reject(
|
|
336
|
+
new Error('Unexpectedly failed to call measure on an instance.'),
|
|
337
|
+
);
|
|
336
338
|
}
|
|
337
339
|
|
|
338
340
|
resolve({
|
|
@@ -480,7 +482,11 @@ class DebuggingOverlayRegistry {
|
|
|
480
482
|
width == null ||
|
|
481
483
|
height == null
|
|
482
484
|
) {
|
|
483
|
-
reject(
|
|
485
|
+
reject(
|
|
486
|
+
new Error(
|
|
487
|
+
'Unexpectedly failed to call measure on an instance.',
|
|
488
|
+
),
|
|
489
|
+
);
|
|
484
490
|
}
|
|
485
491
|
|
|
486
492
|
resolve({x: left, y: top, width, height});
|
|
@@ -30,8 +30,11 @@ class RCTDeviceEventEmitterImpl extends EventEmitter<RCTDeviceEventDefinitions>
|
|
|
30
30
|
...args: RCTDeviceEventDefinitions[TEvent]
|
|
31
31
|
): void {
|
|
32
32
|
beginEvent(() => `RCTDeviceEventEmitter.emit#${eventType}`);
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
try {
|
|
34
|
+
super.emit(eventType, ...args);
|
|
35
|
+
} finally {
|
|
36
|
+
endEvent();
|
|
37
|
+
}
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
const RCTDeviceEventEmitter: IEventEmitter<RCTDeviceEventDefinitions> =
|
|
@@ -11,7 +11,7 @@ import * as React from 'react';
|
|
|
11
11
|
import {Constructor} from '../../types/private/Utilities';
|
|
12
12
|
import {AccessibilityProps} from '../Components/View/ViewAccessibility';
|
|
13
13
|
import {Insets} from '../../types/public/Insets';
|
|
14
|
-
import {
|
|
14
|
+
import {HostInstance} from '../../types/public/ReactNativeTypes';
|
|
15
15
|
import {ColorValue, StyleProp} from '../StyleSheet/StyleSheet';
|
|
16
16
|
import {ImageStyle, ViewStyle} from '../StyleSheet/StyleSheetTypes';
|
|
17
17
|
import {LayoutChangeEvent, NativeSyntheticEvent} from '../Types/CoreEventTypes';
|
|
@@ -338,7 +338,7 @@ export interface ImageSize {
|
|
|
338
338
|
}
|
|
339
339
|
|
|
340
340
|
declare class ImageComponent extends React.Component<ImageProps> {}
|
|
341
|
-
declare const ImageBase: Constructor<
|
|
341
|
+
declare const ImageBase: Constructor<HostInstance> & typeof ImageComponent;
|
|
342
342
|
export class Image extends ImageBase {
|
|
343
343
|
static getSize(uri: string): Promise<ImageSize>;
|
|
344
344
|
static getSize(
|
|
@@ -384,6 +384,6 @@ export interface ImageBackgroundProps extends ImagePropsBase {
|
|
|
384
384
|
}
|
|
385
385
|
|
|
386
386
|
declare class ImageBackgroundComponent extends React.Component<ImageBackgroundProps> {}
|
|
387
|
-
declare const ImageBackgroundBase: Constructor<
|
|
387
|
+
declare const ImageBackgroundBase: Constructor<HostInstance> &
|
|
388
388
|
typeof ImageBackgroundComponent;
|
|
389
389
|
export class ImageBackground extends ImageBackgroundBase {}
|
|
@@ -8,11 +8,8 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type {
|
|
12
|
-
|
|
13
|
-
AbstractImageIOS,
|
|
14
|
-
ImageType as ImageComponent,
|
|
15
|
-
} from './ImageTypes.flow';
|
|
11
|
+
import type {HostInstance} from '../..';
|
|
12
|
+
import type {AbstractImageAndroid, AbstractImageIOS} from './ImageTypes.flow';
|
|
16
13
|
|
|
17
14
|
import useMergeRefs from '../Utilities/useMergeRefs';
|
|
18
15
|
import * as React from 'react';
|
|
@@ -33,7 +30,7 @@ export function unstable_getImageComponentDecorator(): ?ImageComponentDecorator
|
|
|
33
30
|
return injectedImageComponentDecorator;
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
type ImageInstance =
|
|
33
|
+
type ImageInstance = HostInstance;
|
|
37
34
|
|
|
38
35
|
type ImageAttachedCallback = (
|
|
39
36
|
imageInstance: ImageInstance,
|
|
@@ -8,12 +8,11 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import type {HostInstance} from '../..';
|
|
11
12
|
import type {RootTag} from '../Types/RootTagTypes';
|
|
12
13
|
import type {ResolvedAssetSource} from './AssetSourceResolver';
|
|
13
14
|
import type {ImageProps as ImagePropsType} from './ImageProps';
|
|
14
15
|
import type {ImageSource} from './ImageSource';
|
|
15
|
-
import typeof ImageViewNativeComponent from './ImageViewNativeComponent';
|
|
16
|
-
import typeof TextInlineImageNativeComponent from './TextInlineImageNativeComponent';
|
|
17
16
|
|
|
18
17
|
import * as React from 'react';
|
|
19
18
|
|
|
@@ -67,17 +66,14 @@ type ImageComponentStaticsAndroid = $ReadOnly<{
|
|
|
67
66
|
}>;
|
|
68
67
|
|
|
69
68
|
export type AbstractImageAndroid = component(
|
|
70
|
-
ref?: React.RefSetter<
|
|
71
|
-
| React.ElementRef<TextInlineImageNativeComponent>
|
|
72
|
-
| React.ElementRef<ImageViewNativeComponent>,
|
|
73
|
-
>,
|
|
69
|
+
ref?: React.RefSetter<HostInstance>,
|
|
74
70
|
...props: ImagePropsType
|
|
75
71
|
);
|
|
76
72
|
|
|
77
73
|
export type ImageAndroid = AbstractImageAndroid & ImageComponentStaticsAndroid;
|
|
78
74
|
|
|
79
75
|
export type AbstractImageIOS = component(
|
|
80
|
-
ref?: React.RefSetter<
|
|
76
|
+
ref?: React.RefSetter<HostInstance>,
|
|
81
77
|
...props: ImagePropsType
|
|
82
78
|
);
|
|
83
79
|
|
|
@@ -13,8 +13,8 @@ import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
|
|
|
13
13
|
import type {
|
|
14
14
|
ListRenderItem,
|
|
15
15
|
ListRenderItemInfo,
|
|
16
|
+
ListViewToken,
|
|
16
17
|
ViewabilityConfigCallbackPair,
|
|
17
|
-
ViewToken,
|
|
18
18
|
VirtualizedListProps,
|
|
19
19
|
} from '@react-native/virtualized-lists';
|
|
20
20
|
|
|
@@ -573,7 +573,7 @@ class FlatList<ItemT = any> extends React.PureComponent<FlatListProps<ItemT>> {
|
|
|
573
573
|
return keyExtractor(items, index);
|
|
574
574
|
};
|
|
575
575
|
|
|
576
|
-
_pushMultiColumnViewable(arr: Array<
|
|
576
|
+
_pushMultiColumnViewable(arr: Array<ListViewToken>, v: ListViewToken): void {
|
|
577
577
|
const numColumns = numColumnsOrDefault(this.props.numColumns);
|
|
578
578
|
const keyExtractor = this.props.keyExtractor ?? defaultKeyExtractor;
|
|
579
579
|
v.item.forEach((item, ii) => {
|
|
@@ -585,22 +585,22 @@ class FlatList<ItemT = any> extends React.PureComponent<FlatListProps<ItemT>> {
|
|
|
585
585
|
|
|
586
586
|
_createOnViewableItemsChanged(
|
|
587
587
|
onViewableItemsChanged: ?(info: {
|
|
588
|
-
viewableItems: Array<
|
|
589
|
-
changed: Array<
|
|
588
|
+
viewableItems: Array<ListViewToken>,
|
|
589
|
+
changed: Array<ListViewToken>,
|
|
590
590
|
...
|
|
591
591
|
}) => void,
|
|
592
592
|
// $FlowFixMe[missing-local-annot]
|
|
593
593
|
) {
|
|
594
594
|
return (info: {
|
|
595
|
-
viewableItems: Array<
|
|
596
|
-
changed: Array<
|
|
595
|
+
viewableItems: Array<ListViewToken>,
|
|
596
|
+
changed: Array<ListViewToken>,
|
|
597
597
|
...
|
|
598
598
|
}) => {
|
|
599
599
|
const numColumns = numColumnsOrDefault(this.props.numColumns);
|
|
600
600
|
if (onViewableItemsChanged) {
|
|
601
601
|
if (numColumns > 1) {
|
|
602
|
-
const changed: Array<
|
|
603
|
-
const viewableItems: Array<
|
|
602
|
+
const changed: Array<ListViewToken> = [];
|
|
603
|
+
const viewableItems: Array<ListViewToken> = [];
|
|
604
604
|
info.viewableItems.forEach(v =>
|
|
605
605
|
this._pushMultiColumnViewable(viewableItems, v),
|
|
606
606
|
);
|
|
@@ -35,7 +35,11 @@ export interface SectionBase<ItemT, SectionT = DefaultSectionT> {
|
|
|
35
35
|
|
|
36
36
|
renderItem?: SectionListRenderItem<ItemT, SectionT> | undefined;
|
|
37
37
|
|
|
38
|
-
ItemSeparatorComponent?:
|
|
38
|
+
ItemSeparatorComponent?:
|
|
39
|
+
| React.ComponentType<any>
|
|
40
|
+
| React.ReactElement
|
|
41
|
+
| null
|
|
42
|
+
| undefined;
|
|
39
43
|
|
|
40
44
|
keyExtractor?: ((item: ItemT, index: number) => string) | undefined;
|
|
41
45
|
}
|
|
@@ -87,7 +87,7 @@ export default function Ansi({
|
|
|
87
87
|
<View style={styles.container}>
|
|
88
88
|
{parsedLines.map((items, i) => (
|
|
89
89
|
<View style={styles.line} key={i}>
|
|
90
|
-
<Text>
|
|
90
|
+
<Text style={styles.text}>
|
|
91
91
|
{items.map((bundle, key) => {
|
|
92
92
|
const textStyle =
|
|
93
93
|
bundle.fg && COLORS[bundle.fg]
|
|
@@ -122,4 +122,7 @@ const styles = StyleSheet.create({
|
|
|
122
122
|
line: {
|
|
123
123
|
flexDirection: 'row',
|
|
124
124
|
},
|
|
125
|
+
text: {
|
|
126
|
+
flexGrow: 1,
|
|
127
|
+
},
|
|
125
128
|
});
|
|
@@ -179,8 +179,17 @@ const validAttributesForNonEventProps = {
|
|
|
179
179
|
backgroundColor: {process: require('../StyleSheet/processColor').default},
|
|
180
180
|
transform: true,
|
|
181
181
|
transformOrigin: true,
|
|
182
|
-
experimental_backgroundImage:
|
|
183
|
-
|
|
182
|
+
experimental_backgroundImage: ReactNativeFeatureFlags.enableNativeCSSParsing()
|
|
183
|
+
? (true as const)
|
|
184
|
+
: {process: require('../StyleSheet/processBackgroundImage').default},
|
|
185
|
+
experimental_backgroundSize: {
|
|
186
|
+
process: require('../StyleSheet/processBackgroundSize').default,
|
|
187
|
+
},
|
|
188
|
+
experimental_backgroundPosition: {
|
|
189
|
+
process: require('../StyleSheet/processBackgroundPosition').default,
|
|
190
|
+
},
|
|
191
|
+
experimental_backgroundRepeat: {
|
|
192
|
+
process: require('../StyleSheet/processBackgroundRepeat').default,
|
|
184
193
|
},
|
|
185
194
|
boxShadow: ReactNativeFeatureFlags.enableNativeCSSParsing()
|
|
186
195
|
? (true as const)
|