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
package/.flowconfig
CHANGED
|
@@ -143,17 +143,12 @@ module.name_mapper='^react-native-windows$' -> '<PROJECT_ROOT>/index.windows.js'
|
|
|
143
143
|
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/\1'
|
|
144
144
|
module.name_mapper='^react-native-windows/\(.*\)$' -> '<PROJECT_ROOT>/\1'
|
|
145
145
|
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/\1'
|
|
146
|
-
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\)$' -> '<PROJECT_ROOT>/Libraries/Image/RelativeImageStub'
|
|
146
|
+
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\|ktx\)$' -> '<PROJECT_ROOT>/Libraries/Image/RelativeImageStub'
|
|
147
147
|
|
|
148
148
|
module.system.haste.module_ref_prefix=m#
|
|
149
149
|
|
|
150
150
|
react.runtime=automatic
|
|
151
151
|
|
|
152
|
-
experimental.only_support_flow_fixme_and_expected_error=true
|
|
153
|
-
experimental.require_suppression_with_error_code=true
|
|
154
|
-
experimental.invariant_subtyping_error_message_improvement=true
|
|
155
|
-
experimental.natural_inference.local_object_literals.followup_fix=true
|
|
156
|
-
|
|
157
152
|
ban_spread_key_props=true
|
|
158
153
|
sharedmemory.hash_table_pow=21
|
|
159
154
|
|
|
@@ -178,4 +173,4 @@ untyped-import
|
|
|
178
173
|
untyped-type-import
|
|
179
174
|
|
|
180
175
|
[version]
|
|
181
|
-
^0.
|
|
176
|
+
^0.289.0
|
|
@@ -14,8 +14,10 @@ import FlatList, {type FlatListProps} from '../../Lists/FlatList';
|
|
|
14
14
|
import createAnimatedComponent from '../createAnimatedComponent';
|
|
15
15
|
import * as React from 'react';
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
export default createAnimatedComponent(FlatList) as $FlowFixMe as component<
|
|
18
|
+
// $FlowExpectedError[unclear-type]
|
|
19
|
+
ItemT = any,
|
|
20
|
+
>(
|
|
19
21
|
ref?: React.RefSetter<FlatList<ItemT>>,
|
|
20
22
|
...props: AnimatedProps<FlatListProps<ItemT>>
|
|
21
|
-
)
|
|
23
|
+
);
|
|
@@ -14,9 +14,10 @@ import Image from '../../Image/Image';
|
|
|
14
14
|
import createAnimatedComponent from '../createAnimatedComponent';
|
|
15
15
|
import * as React from 'react';
|
|
16
16
|
|
|
17
|
-
export default (createAnimatedComponent
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
export default (createAnimatedComponent<
|
|
18
|
+
$FlowFixMe,
|
|
19
|
+
React.ElementRef<typeof Image>,
|
|
20
|
+
>((Image: $FlowFixMe)): AnimatedComponentType<
|
|
20
21
|
React.ElementConfig<typeof Image>,
|
|
21
22
|
React.ElementRef<typeof Image>,
|
|
22
23
|
>);
|
|
@@ -15,7 +15,7 @@ import createAnimatedComponent from '../createAnimatedComponent';
|
|
|
15
15
|
import * as React from 'react';
|
|
16
16
|
|
|
17
17
|
// $FlowFixMe[incompatible-type]
|
|
18
|
-
export default
|
|
18
|
+
export default createAnimatedComponent(SectionList) as $FlowFixMe as component<
|
|
19
19
|
// $FlowExpectedError[unclear-type]
|
|
20
20
|
ItemT = any,
|
|
21
21
|
// $FlowExpectedError[unclear-type]
|
|
@@ -23,4 +23,4 @@ export default (createAnimatedComponent(SectionList): component<
|
|
|
23
23
|
>(
|
|
24
24
|
ref?: React.RefSetter<SectionList<ItemT, SectionT>>,
|
|
25
25
|
...props: AnimatedProps<SectionListProps<ItemT, SectionT>>
|
|
26
|
-
)
|
|
26
|
+
);
|
|
@@ -14,6 +14,10 @@ import Text, {type TextProps} from '../../Text/Text';
|
|
|
14
14
|
import createAnimatedComponent from '../createAnimatedComponent';
|
|
15
15
|
import * as React from 'react';
|
|
16
16
|
|
|
17
|
-
export default (createAnimatedComponent
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
export default (createAnimatedComponent<
|
|
18
|
+
$FlowFixMe,
|
|
19
|
+
React.ElementRef<typeof Text>,
|
|
20
|
+
>((Text: $FlowFixMe)): AnimatedComponentType<
|
|
21
|
+
TextProps,
|
|
22
|
+
React.ElementRef<typeof Text>,
|
|
23
|
+
>);
|
|
@@ -15,7 +15,8 @@ import View from '../../Components/View/View';
|
|
|
15
15
|
import createAnimatedComponent from '../createAnimatedComponent';
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
// $FlowFixMe[incompatible-type]
|
|
19
|
+
export default createAnimatedComponent(View) as AnimatedComponentType<
|
|
19
20
|
ViewProps,
|
|
20
21
|
React.ElementRef<typeof View>,
|
|
21
|
-
|
|
22
|
+
>;
|
|
@@ -63,17 +63,29 @@ type PassThroughProps = $ReadOnly<{
|
|
|
63
63
|
passthroughAnimatedPropExplicitValues?: ViewProps | null,
|
|
64
64
|
}>;
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
66
|
+
type LooseOmit<O: interface {}, K: $Keys<$FlowFixMe>> = Pick<
|
|
67
|
+
O,
|
|
68
|
+
Exclude<$Keys<O>, K>,
|
|
69
|
+
>;
|
|
70
|
+
|
|
71
|
+
export type AnimatedProps<Props: {...}> = LooseOmit<
|
|
72
|
+
{
|
|
73
|
+
[K in keyof Props]: K extends NonAnimatedProps
|
|
74
|
+
? Props[K]
|
|
75
|
+
: WithAnimatedValue<Props[K]>,
|
|
76
|
+
},
|
|
77
|
+
'ref',
|
|
78
|
+
> &
|
|
79
|
+
PassThroughProps;
|
|
80
|
+
|
|
81
|
+
export type AnimatedBaseProps<Props: {...}> = LooseOmit<
|
|
82
|
+
{
|
|
83
|
+
[K in keyof Props]: K extends NonAnimatedProps
|
|
84
|
+
? Props[K]
|
|
85
|
+
: WithAnimatedValue<Props[K]>,
|
|
86
|
+
},
|
|
87
|
+
'ref',
|
|
88
|
+
>;
|
|
77
89
|
|
|
78
90
|
export type AnimatedComponentType<Props: {...}, +Instance = mixed> = component(
|
|
79
91
|
ref?: React.RefSetter<Instance>,
|
|
@@ -85,7 +97,7 @@ export default function createAnimatedComponent<
|
|
|
85
97
|
>(
|
|
86
98
|
Component: TInstance,
|
|
87
99
|
): AnimatedComponentType<
|
|
88
|
-
$ReadOnly<React.
|
|
100
|
+
$ReadOnly<React.ElementConfig<TInstance>>,
|
|
89
101
|
React.ElementRef<TInstance>,
|
|
90
102
|
> {
|
|
91
103
|
return unstable_createAnimatedComponentWithAllowlist(Component, null);
|
|
@@ -110,6 +110,27 @@ function isRgbaAnimatedValue(value: any): boolean {
|
|
|
110
110
|
);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
export function getRgbaValueAndNativeColor(
|
|
114
|
+
value: RgbaValue | ColorValue,
|
|
115
|
+
): $ReadOnly<{
|
|
116
|
+
rgbaValue: RgbaValue,
|
|
117
|
+
nativeColor?: NativeColorValue,
|
|
118
|
+
}> {
|
|
119
|
+
const processedColor: RgbaValue | NativeColorValue =
|
|
120
|
+
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
121
|
+
processColor((value: ColorValue | RgbaValue)) ?? defaultColor;
|
|
122
|
+
if (isRgbaValue(processedColor)) {
|
|
123
|
+
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
124
|
+
return {rgbaValue: (processedColor: RgbaValue)};
|
|
125
|
+
} else {
|
|
126
|
+
return {
|
|
127
|
+
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
128
|
+
nativeColor: (processedColor: NativeColorValue),
|
|
129
|
+
rgbaValue: defaultColor,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
113
134
|
export default class AnimatedColor extends AnimatedWithChildren {
|
|
114
135
|
r: AnimatedValue;
|
|
115
136
|
g: AnimatedValue;
|
|
@@ -132,18 +153,13 @@ export default class AnimatedColor extends AnimatedWithChildren {
|
|
|
132
153
|
this.b = rgbaAnimatedValue.b;
|
|
133
154
|
this.a = rgbaAnimatedValue.a;
|
|
134
155
|
} else {
|
|
135
|
-
const
|
|
136
|
-
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
137
|
-
processColor((value: ColorValue | RgbaValue)) ?? defaultColor;
|
|
138
|
-
let initColor: RgbaValue = defaultColor;
|
|
139
|
-
if (isRgbaValue(processedColor)) {
|
|
156
|
+
const {rgbaValue: initColor, nativeColor} = getRgbaValueAndNativeColor(
|
|
140
157
|
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
this.nativeColor =
|
|
158
|
+
(value: ColorValue | RgbaValue),
|
|
159
|
+
);
|
|
160
|
+
if (nativeColor) {
|
|
161
|
+
this.nativeColor = nativeColor;
|
|
145
162
|
}
|
|
146
|
-
|
|
147
163
|
this.r = new AnimatedValue(initColor.r);
|
|
148
164
|
this.g = new AnimatedValue(initColor.g);
|
|
149
165
|
this.b = new AnimatedValue(initColor.b);
|
|
@@ -99,7 +99,7 @@ const AccessibilityInfo = {
|
|
|
99
99
|
reject,
|
|
100
100
|
);
|
|
101
101
|
} else {
|
|
102
|
-
reject(
|
|
102
|
+
reject(new Error('NativeAccessibilityManagerIOS is not available'));
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
105
|
}
|
|
@@ -119,7 +119,11 @@ const AccessibilityInfo = {
|
|
|
119
119
|
if (NativeAccessibilityInfoAndroid?.isGrayscaleEnabled != null) {
|
|
120
120
|
NativeAccessibilityInfoAndroid.isGrayscaleEnabled(resolve);
|
|
121
121
|
} else {
|
|
122
|
-
reject(
|
|
122
|
+
reject(
|
|
123
|
+
new Error(
|
|
124
|
+
'NativeAccessibilityInfoAndroid.isGrayscaleEnabled is not available',
|
|
125
|
+
),
|
|
126
|
+
);
|
|
123
127
|
}
|
|
124
128
|
});
|
|
125
129
|
} else {
|
|
@@ -130,7 +134,7 @@ const AccessibilityInfo = {
|
|
|
130
134
|
reject,
|
|
131
135
|
);
|
|
132
136
|
} else {
|
|
133
|
-
reject(
|
|
137
|
+
reject(new Error('AccessibilityInfo native module is not available'));
|
|
134
138
|
}
|
|
135
139
|
});
|
|
136
140
|
}
|
|
@@ -150,7 +154,11 @@ const AccessibilityInfo = {
|
|
|
150
154
|
if (NativeAccessibilityInfoAndroid?.isInvertColorsEnabled != null) {
|
|
151
155
|
NativeAccessibilityInfoAndroid.isInvertColorsEnabled(resolve);
|
|
152
156
|
} else {
|
|
153
|
-
reject(
|
|
157
|
+
reject(
|
|
158
|
+
new Error(
|
|
159
|
+
'NativeAccessibilityInfoAndroid.isInvertColorsEnabled is not available',
|
|
160
|
+
),
|
|
161
|
+
);
|
|
154
162
|
}
|
|
155
163
|
});
|
|
156
164
|
} else {
|
|
@@ -161,7 +169,7 @@ const AccessibilityInfo = {
|
|
|
161
169
|
reject,
|
|
162
170
|
);
|
|
163
171
|
} else {
|
|
164
|
-
reject(
|
|
172
|
+
reject(new Error('AccessibilityInfo native module is not available'));
|
|
165
173
|
}
|
|
166
174
|
});
|
|
167
175
|
}
|
|
@@ -181,7 +189,7 @@ const AccessibilityInfo = {
|
|
|
181
189
|
if (NativeAccessibilityInfoAndroid != null) {
|
|
182
190
|
NativeAccessibilityInfoAndroid.isReduceMotionEnabled(resolve);
|
|
183
191
|
} else {
|
|
184
|
-
reject(
|
|
192
|
+
reject(new Error('AccessibilityInfo native module is not available'));
|
|
185
193
|
}
|
|
186
194
|
} else {
|
|
187
195
|
if (NativeAccessibilityManagerIOS != null) {
|
|
@@ -190,7 +198,7 @@ const AccessibilityInfo = {
|
|
|
190
198
|
reject,
|
|
191
199
|
);
|
|
192
200
|
} else {
|
|
193
|
-
reject(
|
|
201
|
+
reject(new Error('NativeAccessibilityManagerIOS is not available'));
|
|
194
202
|
}
|
|
195
203
|
}
|
|
196
204
|
});
|
|
@@ -208,7 +216,11 @@ const AccessibilityInfo = {
|
|
|
208
216
|
if (NativeAccessibilityInfoAndroid?.isHighTextContrastEnabled != null) {
|
|
209
217
|
NativeAccessibilityInfoAndroid.isHighTextContrastEnabled(resolve);
|
|
210
218
|
} else {
|
|
211
|
-
reject(
|
|
219
|
+
reject(
|
|
220
|
+
new Error(
|
|
221
|
+
'NativeAccessibilityInfoAndroid.isHighTextContrastEnabled is not available',
|
|
222
|
+
),
|
|
223
|
+
);
|
|
212
224
|
}
|
|
213
225
|
} else {
|
|
214
226
|
return Promise.resolve(false);
|
|
@@ -236,7 +248,11 @@ const AccessibilityInfo = {
|
|
|
236
248
|
reject,
|
|
237
249
|
);
|
|
238
250
|
} else {
|
|
239
|
-
reject(
|
|
251
|
+
reject(
|
|
252
|
+
new Error(
|
|
253
|
+
'NativeAccessibilityManagerIOS.getCurrentDarkerSystemColorsState is not available',
|
|
254
|
+
),
|
|
255
|
+
);
|
|
240
256
|
}
|
|
241
257
|
}
|
|
242
258
|
});
|
|
@@ -264,7 +280,11 @@ const AccessibilityInfo = {
|
|
|
264
280
|
reject,
|
|
265
281
|
);
|
|
266
282
|
} else {
|
|
267
|
-
reject(
|
|
283
|
+
reject(
|
|
284
|
+
new Error(
|
|
285
|
+
'NativeAccessibilityManagerIOS.getCurrentPrefersCrossFadeTransitionsState is not available',
|
|
286
|
+
),
|
|
287
|
+
);
|
|
268
288
|
}
|
|
269
289
|
}
|
|
270
290
|
});
|
|
@@ -289,7 +309,7 @@ const AccessibilityInfo = {
|
|
|
289
309
|
reject,
|
|
290
310
|
);
|
|
291
311
|
} else {
|
|
292
|
-
reject(
|
|
312
|
+
reject(new Error('NativeAccessibilityManagerIOS is not available'));
|
|
293
313
|
}
|
|
294
314
|
});
|
|
295
315
|
}
|
|
@@ -309,7 +329,7 @@ const AccessibilityInfo = {
|
|
|
309
329
|
if (NativeAccessibilityInfoAndroid != null) {
|
|
310
330
|
NativeAccessibilityInfoAndroid.isTouchExplorationEnabled(resolve);
|
|
311
331
|
} else {
|
|
312
|
-
reject(
|
|
332
|
+
reject(new Error('NativeAccessibilityInfoAndroid is not available'));
|
|
313
333
|
}
|
|
314
334
|
} else {
|
|
315
335
|
if (NativeAccessibilityManagerIOS != null) {
|
|
@@ -318,7 +338,7 @@ const AccessibilityInfo = {
|
|
|
318
338
|
reject,
|
|
319
339
|
);
|
|
320
340
|
} else {
|
|
321
|
-
reject(
|
|
341
|
+
reject(new Error('NativeAccessibilityManagerIOS is not available'));
|
|
322
342
|
}
|
|
323
343
|
}
|
|
324
344
|
});
|
|
@@ -343,10 +363,18 @@ const AccessibilityInfo = {
|
|
|
343
363
|
) {
|
|
344
364
|
NativeAccessibilityInfoAndroid.isAccessibilityServiceEnabled(resolve);
|
|
345
365
|
} else {
|
|
346
|
-
reject(
|
|
366
|
+
reject(
|
|
367
|
+
new Error(
|
|
368
|
+
'NativeAccessibilityInfoAndroid.isAccessibilityServiceEnabled is not available',
|
|
369
|
+
),
|
|
370
|
+
);
|
|
347
371
|
}
|
|
348
372
|
} else {
|
|
349
|
-
reject(
|
|
373
|
+
reject(
|
|
374
|
+
new Error(
|
|
375
|
+
'isAccessibilityServiceEnabled is only available on Android',
|
|
376
|
+
),
|
|
377
|
+
);
|
|
350
378
|
}
|
|
351
379
|
});
|
|
352
380
|
},
|
|
@@ -106,7 +106,7 @@ const AccessibilityInfo = {
|
|
|
106
106
|
reject,
|
|
107
107
|
);
|
|
108
108
|
} else {
|
|
109
|
-
reject(
|
|
109
|
+
reject(new Error('NativeAccessibilityManagerIOS is not available'));
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
112
|
}
|
|
@@ -126,7 +126,11 @@ const AccessibilityInfo = {
|
|
|
126
126
|
if (NativeAccessibilityInfoAndroid?.isGrayscaleEnabled != null) {
|
|
127
127
|
NativeAccessibilityInfoAndroid.isGrayscaleEnabled(resolve);
|
|
128
128
|
} else {
|
|
129
|
-
reject(
|
|
129
|
+
reject(
|
|
130
|
+
new Error(
|
|
131
|
+
'NativeAccessibilityInfoAndroid.isGrayscaleEnabled is not available',
|
|
132
|
+
),
|
|
133
|
+
);
|
|
130
134
|
}
|
|
131
135
|
});
|
|
132
136
|
} else if (Platform.OS === 'windows') {
|
|
@@ -139,7 +143,7 @@ const AccessibilityInfo = {
|
|
|
139
143
|
reject,
|
|
140
144
|
);
|
|
141
145
|
} else {
|
|
142
|
-
reject(
|
|
146
|
+
reject(new Error('AccessibilityInfo native module is not available'));
|
|
143
147
|
}
|
|
144
148
|
});
|
|
145
149
|
}
|
|
@@ -159,7 +163,11 @@ const AccessibilityInfo = {
|
|
|
159
163
|
if (NativeAccessibilityInfoAndroid?.isInvertColorsEnabled != null) {
|
|
160
164
|
NativeAccessibilityInfoAndroid.isInvertColorsEnabled(resolve);
|
|
161
165
|
} else {
|
|
162
|
-
reject(
|
|
166
|
+
reject(
|
|
167
|
+
new Error(
|
|
168
|
+
'NativeAccessibilityInfoAndroid.isInvertColorsEnabled is not available',
|
|
169
|
+
),
|
|
170
|
+
);
|
|
163
171
|
}
|
|
164
172
|
});
|
|
165
173
|
} else if (Platform.OS === 'windows') {
|
|
@@ -172,7 +180,7 @@ const AccessibilityInfo = {
|
|
|
172
180
|
reject,
|
|
173
181
|
);
|
|
174
182
|
} else {
|
|
175
|
-
reject(
|
|
183
|
+
reject(new Error('AccessibilityInfo native module is not available'));
|
|
176
184
|
}
|
|
177
185
|
});
|
|
178
186
|
}
|
|
@@ -192,7 +200,7 @@ const AccessibilityInfo = {
|
|
|
192
200
|
if (NativeAccessibilityInfo != null) {
|
|
193
201
|
NativeAccessibilityInfo.isReduceMotionEnabled(resolve);
|
|
194
202
|
} else {
|
|
195
|
-
reject(
|
|
203
|
+
reject(new Error('AccessibilityInfo native module is not available'));
|
|
196
204
|
}
|
|
197
205
|
} else {
|
|
198
206
|
if (NativeAccessibilityManagerIOS != null) {
|
|
@@ -201,7 +209,7 @@ const AccessibilityInfo = {
|
|
|
201
209
|
reject,
|
|
202
210
|
);
|
|
203
211
|
} else {
|
|
204
|
-
reject(
|
|
212
|
+
reject(new Error('NativeAccessibilityManagerIOS is not available'));
|
|
205
213
|
}
|
|
206
214
|
}
|
|
207
215
|
});
|
|
@@ -219,7 +227,11 @@ const AccessibilityInfo = {
|
|
|
219
227
|
if (NativeAccessibilityInfo?.isHighTextContrastEnabled != null) {
|
|
220
228
|
NativeAccessibilityInfo.isHighTextContrastEnabled(resolve);
|
|
221
229
|
} else {
|
|
222
|
-
reject(
|
|
230
|
+
reject(
|
|
231
|
+
new Error(
|
|
232
|
+
'NativeAccessibilityInfoAndroid.isHighTextContrastEnabled is not available',
|
|
233
|
+
),
|
|
234
|
+
);
|
|
223
235
|
}
|
|
224
236
|
} else {
|
|
225
237
|
return Promise.resolve(false);
|
|
@@ -247,7 +259,11 @@ const AccessibilityInfo = {
|
|
|
247
259
|
reject,
|
|
248
260
|
);
|
|
249
261
|
} else {
|
|
250
|
-
reject(
|
|
262
|
+
reject(
|
|
263
|
+
new Error(
|
|
264
|
+
'NativeAccessibilityManagerIOS.getCurrentDarkerSystemColorsState is not available',
|
|
265
|
+
),
|
|
266
|
+
);
|
|
251
267
|
}
|
|
252
268
|
}
|
|
253
269
|
});
|
|
@@ -275,7 +291,11 @@ const AccessibilityInfo = {
|
|
|
275
291
|
reject,
|
|
276
292
|
);
|
|
277
293
|
} else {
|
|
278
|
-
reject(
|
|
294
|
+
reject(
|
|
295
|
+
new Error(
|
|
296
|
+
'NativeAccessibilityManagerIOS.getCurrentPrefersCrossFadeTransitionsState is not available',
|
|
297
|
+
),
|
|
298
|
+
);
|
|
279
299
|
}
|
|
280
300
|
}
|
|
281
301
|
});
|
|
@@ -300,7 +320,7 @@ const AccessibilityInfo = {
|
|
|
300
320
|
reject,
|
|
301
321
|
);
|
|
302
322
|
} else {
|
|
303
|
-
reject(
|
|
323
|
+
reject(new Error('NativeAccessibilityManagerIOS is not available'));
|
|
304
324
|
}
|
|
305
325
|
});
|
|
306
326
|
}
|
|
@@ -320,7 +340,7 @@ const AccessibilityInfo = {
|
|
|
320
340
|
if (NativeAccessibilityInfo != null) {
|
|
321
341
|
NativeAccessibilityInfo.isTouchExplorationEnabled(resolve);
|
|
322
342
|
} else {
|
|
323
|
-
reject(
|
|
343
|
+
reject(new Error('NativeAccessibilityInfoAndroid is not available'));
|
|
324
344
|
}
|
|
325
345
|
} else {
|
|
326
346
|
if (NativeAccessibilityManagerIOS != null) {
|
|
@@ -329,7 +349,7 @@ const AccessibilityInfo = {
|
|
|
329
349
|
reject,
|
|
330
350
|
);
|
|
331
351
|
} else {
|
|
332
|
-
reject(
|
|
352
|
+
reject(new Error('NativeAccessibilityManagerIOS is not available'));
|
|
333
353
|
}
|
|
334
354
|
}
|
|
335
355
|
});
|
|
@@ -354,10 +374,18 @@ const AccessibilityInfo = {
|
|
|
354
374
|
) {
|
|
355
375
|
NativeAccessibilityInfo.isAccessibilityServiceEnabled(resolve);
|
|
356
376
|
} else {
|
|
357
|
-
reject(
|
|
377
|
+
reject(
|
|
378
|
+
new Error(
|
|
379
|
+
'NativeAccessibilityInfoAndroid.isAccessibilityServiceEnabled is not available',
|
|
380
|
+
),
|
|
381
|
+
);
|
|
358
382
|
}
|
|
359
383
|
} else {
|
|
360
|
-
reject(
|
|
384
|
+
reject(
|
|
385
|
+
new Error(
|
|
386
|
+
'isAccessibilityServiceEnabled is only available on Android',
|
|
387
|
+
),
|
|
388
|
+
);
|
|
361
389
|
}
|
|
362
390
|
});
|
|
363
391
|
},
|
|
@@ -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 {LayoutChangeEvent} from '../../Types/CoreEventTypes';
|
|
@@ -46,7 +46,7 @@ export interface ActivityIndicatorProps extends ViewProps {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
declare class ActivityIndicatorComponent extends React.Component<ActivityIndicatorProps> {}
|
|
49
|
-
declare const ActivityIndicatorBase: Constructor<
|
|
49
|
+
declare const ActivityIndicatorBase: Constructor<HostInstance> &
|
|
50
50
|
typeof ActivityIndicatorComponent;
|
|
51
51
|
export class ActivityIndicator extends ActivityIndicatorBase {}
|
|
52
52
|
|
|
@@ -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} from '../../StyleSheet/StyleSheet';
|
|
14
14
|
import {
|
|
15
15
|
NativeSyntheticEvent,
|
|
@@ -121,7 +121,7 @@ interface DrawerPosition {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
declare class DrawerLayoutAndroidComponent extends React.Component<DrawerLayoutAndroidProps> {}
|
|
124
|
-
declare const DrawerLayoutAndroidBase: Constructor<
|
|
124
|
+
declare const DrawerLayoutAndroidBase: Constructor<HostInstance> &
|
|
125
125
|
typeof DrawerLayoutAndroidComponent;
|
|
126
126
|
export class DrawerLayoutAndroid extends DrawerLayoutAndroidBase {
|
|
127
127
|
/**
|
|
@@ -33,7 +33,10 @@ export type Props = $ReadOnly<{|
|
|
|
33
33
|
export const Glyph: React.AbstractComponent<
|
|
34
34
|
Props,
|
|
35
35
|
React.ElementRef<typeof GlyphNativeComponent>,
|
|
36
|
-
> = React.forwardRef(function Glyph(
|
|
36
|
+
> = React.forwardRef(function Glyph(
|
|
37
|
+
props: Props,
|
|
38
|
+
forwardedRef: React.RefSetter<React.ElementRef<typeof GlyphNativeComponent>>,
|
|
39
|
+
): React.Node {
|
|
37
40
|
const nativeSwitchRef = React.useRef<React.ElementRef<
|
|
38
41
|
typeof GlyphNativeComponent,
|
|
39
42
|
> | null>(null);
|
|
@@ -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} from '../../StyleSheet/StyleSheet';
|
|
14
14
|
import {ViewProps} from '../View/ViewPropTypes';
|
|
15
15
|
|
|
@@ -72,7 +72,7 @@ export interface ProgressBarAndroidProps extends ViewProps {
|
|
|
72
72
|
* that the app is loading or there is some activity in the app.
|
|
73
73
|
*/
|
|
74
74
|
declare class ProgressBarAndroidComponent extends React.Component<ProgressBarAndroidProps> {}
|
|
75
|
-
declare const ProgressBarAndroidBase: Constructor<
|
|
75
|
+
declare const ProgressBarAndroidBase: Constructor<HostInstance> &
|
|
76
76
|
typeof ProgressBarAndroidComponent;
|
|
77
77
|
/**
|
|
78
78
|
* ProgressBarAndroid has been extracted from react-native core and will be removed in a future release.
|
|
@@ -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} from '../../StyleSheet/StyleSheet';
|
|
14
14
|
import {ViewProps} from '../View/ViewPropTypes';
|
|
15
15
|
|
|
@@ -49,7 +49,7 @@ export interface RefreshControlPropsAndroid extends ViewProps {
|
|
|
49
49
|
/**
|
|
50
50
|
* Size of the refresh indicator, see RefreshControl.SIZE.
|
|
51
51
|
*/
|
|
52
|
-
size?:
|
|
52
|
+
size?: 'default' | 'large' | undefined;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export interface RefreshControlProps
|
|
@@ -80,7 +80,7 @@ export interface RefreshControlProps
|
|
|
80
80
|
* in the `onRefresh` function otherwise the refresh indicator will stop immediately.
|
|
81
81
|
*/
|
|
82
82
|
declare class RefreshControlComponent extends React.Component<RefreshControlProps> {}
|
|
83
|
-
declare const RefreshControlBase: Constructor<
|
|
83
|
+
declare const RefreshControlBase: Constructor<HostInstance> &
|
|
84
84
|
typeof RefreshControlComponent;
|
|
85
85
|
export class RefreshControl extends RefreshControlBase {
|
|
86
86
|
static SIZE: Object; // Undocumented
|
|
@@ -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 {ViewProps} from '../View/ViewPropTypes';
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -23,7 +23,7 @@ import {ViewProps} from '../View/ViewPropTypes';
|
|
|
23
23
|
*/
|
|
24
24
|
declare class SafeAreaViewComponent extends React.Component<ViewProps> {}
|
|
25
25
|
|
|
26
|
-
declare const SafeAreaViewBase: Constructor<
|
|
26
|
+
declare const SafeAreaViewBase: Constructor<HostInstance> &
|
|
27
27
|
typeof SafeAreaViewComponent;
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -1690,6 +1690,7 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
|
|
|
1690
1690
|
return (
|
|
1691
1691
|
<StickyHeaderComponent
|
|
1692
1692
|
key={key}
|
|
1693
|
+
/* $FlowFixMe[incompatible-type] */
|
|
1693
1694
|
ref={ref => this._setStickyHeaderRef(key, ref)}
|
|
1694
1695
|
nextHeaderLayoutY={this._headerLayoutYs.get(
|
|
1695
1696
|
this._getKeyForIndex(nextIndex, children),
|
|
@@ -1690,6 +1690,7 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
|
|
|
1690
1690
|
return (
|
|
1691
1691
|
<StickyHeaderComponent
|
|
1692
1692
|
key={key}
|
|
1693
|
+
/* $FlowFixMe[incompatible-type] */
|
|
1693
1694
|
ref={ref => this._setStickyHeaderRef(key, ref)}
|
|
1694
1695
|
nextHeaderLayoutY={this._headerLayoutYs.get(
|
|
1695
1696
|
this._getKeyForIndex(nextIndex, children),
|