react-native-windows 0.82.3 → 0.83.0-preview.1
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/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/UriImageManager.cpp +5 -0
- package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +1 -0
- 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/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/Generated/PackageVersion.g.props +4 -4
- package/PropertySheets/Warnings.props +2 -1
- package/ReactCommon/ReactCommon.vcxproj +11 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp +2 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/Instance.cpp +4 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +4 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSIndexedRAMBundle.cpp +4 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/MethodCall.cpp +4 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ModuleRegistry.cpp +5 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +4 -4
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/RAMBundleRegistry.cpp +6 -4
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ReactMarker.cpp +2 -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 +15 -8
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsiexecutor/jsireact/JSINativeModules.cpp +4 -2
- 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 +5 -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/BaseViewProps.cpp +36 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/accessibilityPropsConversions.h +85 -42
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventDispatcher.cpp +2 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventQueueProcessor.cpp +2 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/imagemanager/primitives.h +25 -31
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/UIManager.cpp +19 -5
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +16 -1
- 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 +15 -3
- 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 +1 -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
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @format
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type {HostComponent} from '../../types/public/ReactNativeTypes';
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Configures a function that is called to determine whether a given component
|
|
15
|
+
* should be registered using reflection of the native component at runtime.
|
|
16
|
+
*
|
|
17
|
+
* The provider should return null if the native component is unavailable in
|
|
18
|
+
* the current environment.
|
|
19
|
+
*/
|
|
20
|
+
export function setRuntimeConfigProvider(
|
|
21
|
+
runtimeConfigProvider: (name: string) => {
|
|
22
|
+
native: boolean;
|
|
23
|
+
verify: boolean;
|
|
24
|
+
} | null,
|
|
25
|
+
): void;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Gets a `NativeComponent` that can be rendered by React Native.
|
|
29
|
+
*
|
|
30
|
+
* The supplied `viewConfigProvider` may or may not be invoked and utilized,
|
|
31
|
+
* depending on how `setRuntimeConfigProvider` is configured.
|
|
32
|
+
*/
|
|
33
|
+
export function get<Config extends object>(
|
|
34
|
+
name: string,
|
|
35
|
+
viewConfigProvider: () => PartialViewConfig,
|
|
36
|
+
): HostComponent<Config>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Same as `NativeComponentRegistry.get(...)`, except this will check either
|
|
40
|
+
* the `setRuntimeConfigProvider` configuration or use native reflection (slow)
|
|
41
|
+
* to determine whether this native component is available.
|
|
42
|
+
*
|
|
43
|
+
* If the native component is not available, a stub component is returned. Note
|
|
44
|
+
* that the return value of this is not `HostComponent` because the returned
|
|
45
|
+
* component instance is not guaranteed to have native methods.
|
|
46
|
+
*/
|
|
47
|
+
export function getWithFallback_DEPRECATED<Config extends object>(
|
|
48
|
+
name: string,
|
|
49
|
+
viewConfigProvider: () => PartialViewConfig,
|
|
50
|
+
): React.ComponentType<Config>;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Unstable API. Do not use!
|
|
54
|
+
*
|
|
55
|
+
* This method returns if there is a StaticViewConfig registered for the
|
|
56
|
+
* component name received as a parameter.
|
|
57
|
+
*/
|
|
58
|
+
export function unstable_hasStaticViewConfig(name: string): boolean;
|
|
59
|
+
|
|
60
|
+
type AttributeType<T, V> =
|
|
61
|
+
| true
|
|
62
|
+
| {
|
|
63
|
+
readonly diff?: ((arg1: T, arg2: T) => boolean) | undefined;
|
|
64
|
+
readonly process?: ((arg1: V) => T) | undefined;
|
|
65
|
+
};
|
|
66
|
+
type AnyAttributeType = AttributeType<any, any>;
|
|
67
|
+
type AttributeConfiguration = {
|
|
68
|
+
readonly [propName: string]: AnyAttributeType | void;
|
|
69
|
+
readonly style?:
|
|
70
|
+
| {
|
|
71
|
+
readonly [propName: string]: AnyAttributeType;
|
|
72
|
+
}
|
|
73
|
+
| undefined;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
type PartialViewConfig = Readonly<{
|
|
77
|
+
bubblingEventTypes?:
|
|
78
|
+
| {
|
|
79
|
+
readonly [eventName: string]: {
|
|
80
|
+
readonly phasedRegistrationNames: {
|
|
81
|
+
readonly bubbled: string;
|
|
82
|
+
readonly captured: string;
|
|
83
|
+
readonly skipBubbling?: boolean | undefined;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
| undefined;
|
|
88
|
+
directEventTypes?:
|
|
89
|
+
| {
|
|
90
|
+
readonly [eventName: string]: {
|
|
91
|
+
readonly registrationName: string;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
| undefined;
|
|
95
|
+
supportsRawText?: boolean | undefined;
|
|
96
|
+
uiViewClassName: string;
|
|
97
|
+
validAttributes?: AttributeConfiguration | undefined;
|
|
98
|
+
}>;
|
|
@@ -129,11 +129,13 @@ export function getWithFallback_DEPRECATED<Config: {...}>(
|
|
|
129
129
|
// `getRuntimeConfig == null` when static view configs are disabled
|
|
130
130
|
// If `setRuntimeConfigProvider` is not configured, use native reflection.
|
|
131
131
|
if (hasNativeViewConfig(name)) {
|
|
132
|
+
/* $FlowFixMe[incompatible-type] Extra ref prop */
|
|
132
133
|
return get<Config>(name, viewConfigProvider);
|
|
133
134
|
}
|
|
134
135
|
} else {
|
|
135
136
|
// If there is no runtime config, then the native component is unavailable.
|
|
136
137
|
if (getRuntimeConfig(name) != null) {
|
|
138
|
+
/* $FlowFixMe[incompatible-type] Extra ref prop */
|
|
137
139
|
return get<Config>(name, viewConfigProvider);
|
|
138
140
|
}
|
|
139
141
|
}
|
|
@@ -23,7 +23,9 @@ export function unstable_hasComponent(name: string): boolean {
|
|
|
23
23
|
hasNativeComponent = global.__nativeComponentRegistry__hasComponent(name);
|
|
24
24
|
componentNameToExists.set(name, hasNativeComponent);
|
|
25
25
|
} else {
|
|
26
|
-
throw
|
|
26
|
+
throw new Error(
|
|
27
|
+
`unstable_hasComponent('${name}'): Global function is not registered`,
|
|
28
|
+
);
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
return hasNativeComponent;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @flow strict
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const ignoredViewConfigProps = new WeakSet < { ...} > ();
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Decorates ViewConfig values that are dynamically injected by the library,
|
|
14
|
+
* react-native-gesture-handler. (T45765076)
|
|
15
|
+
*/
|
|
16
|
+
export function DynamicallyInjectedByGestureHandler<T: {... }> (object: T): T {
|
|
17
|
+
ignoredViewConfigProps.add(object);
|
|
18
|
+
return object;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* On iOS, ViewManager event declarations generate {eventName}: true entries
|
|
23
|
+
* in ViewConfig valueAttributes. These entries aren't generated for Android.
|
|
24
|
+
* This annotation allows Static ViewConfigs to insert these entries into
|
|
25
|
+
* iOS but not Android.
|
|
26
|
+
*
|
|
27
|
+
* In the future, we want to remove this platform-inconsistency. We want
|
|
28
|
+
* to set RN$ViewConfigEventValidAttributesDisabled = true server-side,
|
|
29
|
+
* so that iOS does not generate validAttributes from event props in iOS RCTViewManager,
|
|
30
|
+
* since Android does not generate validAttributes from events props in Android ViewManager.
|
|
31
|
+
*
|
|
32
|
+
* TODO(T110872225): Remove this logic, after achieving platform-consistency
|
|
33
|
+
*/
|
|
34
|
+
export function ConditionallyIgnoredEventHandlers<
|
|
35
|
+
const T: { +[name: string]: true },
|
|
36
|
+
> (value: T): T | void {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function isIgnored(value: mixed): boolean {
|
|
41
|
+
if (typeof value === 'object' && value != null) {
|
|
42
|
+
return ignoredViewConfigProps.has(value);
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
@@ -77,12 +77,14 @@ const RCTNetworking = {
|
|
|
77
77
|
}));
|
|
78
78
|
}
|
|
79
79
|
const requestId = generateRequestId();
|
|
80
|
+
const devToolsRequestId =
|
|
81
|
+
global.__NETWORK_REPORTER__?.createDevToolsRequestId();
|
|
80
82
|
NativeNetworkingAndroid.sendRequest(
|
|
81
83
|
method,
|
|
82
84
|
url,
|
|
83
85
|
requestId,
|
|
84
86
|
convertHeadersMapToArray(headers),
|
|
85
|
-
{...body, trackingName},
|
|
87
|
+
{...body, trackingName, devToolsRequestId},
|
|
86
88
|
responseType,
|
|
87
89
|
incrementalUpdates,
|
|
88
90
|
timeout,
|
|
@@ -40,6 +40,8 @@ const RCTNetworking = {
|
|
|
40
40
|
withCredentials: boolean,
|
|
41
41
|
) {
|
|
42
42
|
const body = convertRequestBody(data);
|
|
43
|
+
const devToolsRequestId =
|
|
44
|
+
global.__NETWORK_REPORTER__?.createDevToolsRequestId();
|
|
43
45
|
NativeNetworkingIOS.sendRequest(
|
|
44
46
|
{
|
|
45
47
|
method,
|
|
@@ -50,6 +52,7 @@ const RCTNetworking = {
|
|
|
50
52
|
incrementalUpdates,
|
|
51
53
|
timeout,
|
|
52
54
|
withCredentials,
|
|
55
|
+
unstable_devToolsRequestId: devToolsRequestId,
|
|
53
56
|
},
|
|
54
57
|
callback,
|
|
55
58
|
);
|
|
@@ -40,6 +40,8 @@ const RCTNetworking = {
|
|
|
40
40
|
withCredentials: boolean,
|
|
41
41
|
) {
|
|
42
42
|
const body = convertRequestBody(data);
|
|
43
|
+
const devToolsRequestId =
|
|
44
|
+
global.__NETWORK_REPORTER__?.createDevToolsRequestId();
|
|
43
45
|
NativeNetworkingIOS.sendRequest(
|
|
44
46
|
{
|
|
45
47
|
method,
|
|
@@ -50,6 +52,7 @@ const RCTNetworking = {
|
|
|
50
52
|
incrementalUpdates,
|
|
51
53
|
timeout,
|
|
52
54
|
withCredentials,
|
|
55
|
+
unstable_devToolsRequestId: devToolsRequestId,
|
|
53
56
|
},
|
|
54
57
|
callback,
|
|
55
58
|
);
|
|
@@ -14,7 +14,6 @@ import type {
|
|
|
14
14
|
EventCallback,
|
|
15
15
|
EventListener,
|
|
16
16
|
} from '../../src/private/webapis/dom/events/EventTarget';
|
|
17
|
-
import type Performance from '../../src/private/webapis/performance/Performance';
|
|
18
17
|
import type {IPerformanceLogger} from '../Utilities/createPerformanceLogger';
|
|
19
18
|
|
|
20
19
|
import Event from '../../src/private/webapis/dom/events/Event';
|
|
@@ -34,13 +33,7 @@ const RCTNetworking = require('./RCTNetworking').default;
|
|
|
34
33
|
const base64 = require('base64-js');
|
|
35
34
|
const invariant = require('invariant');
|
|
36
35
|
|
|
37
|
-
const PERFORMANCE_TRACK_NAME = 'Network (JS-initiated only)';
|
|
38
|
-
const PERFORMANCE_TRACK_GROUP = 'Chrome DevTools Temp Compat';
|
|
39
|
-
|
|
40
|
-
declare var performance: Performance;
|
|
41
|
-
|
|
42
36
|
const DEBUG_NETWORK_SEND_DELAY: false = false; // Set to a number of milliseconds when debugging
|
|
43
|
-
const LABEL_FOR_MISSING_URL_FOR_PROFILING = 'Unknown URL';
|
|
44
37
|
|
|
45
38
|
export type NativeResponseType = 'base64' | 'blob' | 'text';
|
|
46
39
|
export type ResponseType =
|
|
@@ -141,7 +134,6 @@ class XMLHttpRequest extends EventTarget {
|
|
|
141
134
|
static DONE: number = DONE;
|
|
142
135
|
|
|
143
136
|
static _interceptor: ?XHRInterceptor = null;
|
|
144
|
-
static _profiling: boolean = false;
|
|
145
137
|
|
|
146
138
|
UNSENT: number = UNSENT;
|
|
147
139
|
OPENED: number = OPENED;
|
|
@@ -182,10 +174,6 @@ class XMLHttpRequest extends EventTarget {
|
|
|
182
174
|
XMLHttpRequest._interceptor = interceptor;
|
|
183
175
|
}
|
|
184
176
|
|
|
185
|
-
static enableProfiling(enableProfiling: boolean): void {
|
|
186
|
-
XMLHttpRequest._profiling = enableProfiling;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
177
|
constructor() {
|
|
190
178
|
super();
|
|
191
179
|
this._reset();
|
|
@@ -389,23 +377,12 @@ class XMLHttpRequest extends EventTarget {
|
|
|
389
377
|
return;
|
|
390
378
|
}
|
|
391
379
|
|
|
392
|
-
const start = XMLHttpRequest._profiling ? performance.now() : undefined;
|
|
393
|
-
|
|
394
380
|
if (!this._response) {
|
|
395
381
|
this._response = responseText;
|
|
396
382
|
} else {
|
|
397
383
|
this._response += responseText;
|
|
398
384
|
}
|
|
399
385
|
|
|
400
|
-
if (XMLHttpRequest._profiling) {
|
|
401
|
-
console.timeStamp(
|
|
402
|
-
'Incremental Data: ' + this._getMeasureURL(),
|
|
403
|
-
start,
|
|
404
|
-
undefined,
|
|
405
|
-
PERFORMANCE_TRACK_NAME,
|
|
406
|
-
PERFORMANCE_TRACK_GROUP,
|
|
407
|
-
);
|
|
408
|
-
}
|
|
409
386
|
XMLHttpRequest._interceptor &&
|
|
410
387
|
XMLHttpRequest._interceptor.dataReceived(requestId, responseText);
|
|
411
388
|
|
|
@@ -450,16 +427,7 @@ class XMLHttpRequest extends EventTarget {
|
|
|
450
427
|
this._clearSubscriptions();
|
|
451
428
|
this._requestId = null;
|
|
452
429
|
this.setReadyState(this.DONE);
|
|
453
|
-
|
|
454
|
-
const start = this._startTime;
|
|
455
|
-
console.timeStamp(
|
|
456
|
-
this._getMeasureURL(),
|
|
457
|
-
start,
|
|
458
|
-
undefined,
|
|
459
|
-
PERFORMANCE_TRACK_NAME,
|
|
460
|
-
PERFORMANCE_TRACK_GROUP,
|
|
461
|
-
);
|
|
462
|
-
}
|
|
430
|
+
|
|
463
431
|
if (error) {
|
|
464
432
|
XMLHttpRequest._interceptor &&
|
|
465
433
|
XMLHttpRequest._interceptor.loadingFailed(requestId, error);
|
|
@@ -649,8 +617,6 @@ class XMLHttpRequest extends EventTarget {
|
|
|
649
617
|
this._url,
|
|
650
618
|
this._headers,
|
|
651
619
|
data,
|
|
652
|
-
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was found
|
|
653
|
-
* when making Flow check .android.js files. */
|
|
654
620
|
nativeResponseType,
|
|
655
621
|
incrementalEvents,
|
|
656
622
|
this.timeout,
|
|
@@ -731,12 +697,6 @@ class XMLHttpRequest extends EventTarget {
|
|
|
731
697
|
super.addEventListener(type, listener);
|
|
732
698
|
}
|
|
733
699
|
|
|
734
|
-
_getMeasureURL(): string {
|
|
735
|
-
return (
|
|
736
|
-
this._trackingName ?? this._url ?? LABEL_FOR_MISSING_URL_FOR_PROFILING
|
|
737
|
-
);
|
|
738
|
-
}
|
|
739
|
-
|
|
740
700
|
/*
|
|
741
701
|
* `on<event>` event handling (without JS prototype magic).
|
|
742
702
|
*/
|
|
@@ -8,15 +8,26 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';
|
|
11
12
|
import Pressability, {
|
|
12
13
|
type EventHandlers,
|
|
13
14
|
type PressabilityConfig,
|
|
14
15
|
} from './Pressability';
|
|
15
|
-
import {useEffect, useRef} from 'react';
|
|
16
|
+
import {useEffect, useInsertionEffect, useRef} from 'react';
|
|
16
17
|
|
|
17
18
|
declare function usePressability(config: PressabilityConfig): EventHandlers;
|
|
18
19
|
declare function usePressability(config: null | void): null | EventHandlers;
|
|
19
20
|
|
|
21
|
+
// Experiments with using `useInsertionEffect` instead of `useEffect`, which
|
|
22
|
+
// changes whether `Pressability` is configured or reset when inm a hidden
|
|
23
|
+
// Activity. With `useInsertionEffect`, `Pressability` behaves more like a
|
|
24
|
+
// platform control (e.g. Pointer Events), especially with respect to events
|
|
25
|
+
// like focus and blur.
|
|
26
|
+
const useConfigurationEffect =
|
|
27
|
+
ReactNativeFeatureFlags.configurePressabilityDuringInsertion()
|
|
28
|
+
? useInsertionEffect
|
|
29
|
+
: useEffect;
|
|
30
|
+
|
|
20
31
|
/**
|
|
21
32
|
* Creates a persistent instance of `Pressability` that automatically configures
|
|
22
33
|
* itself and resets. Accepts null `config` to support lazy initialization. Once
|
|
@@ -40,7 +51,7 @@ export default function usePressability(
|
|
|
40
51
|
|
|
41
52
|
// On the initial mount, this is a no-op. On updates, `pressability` will be
|
|
42
53
|
// re-configured to use the new configuration.
|
|
43
|
-
|
|
54
|
+
useConfigurationEffect(() => {
|
|
44
55
|
if (config != null && pressability != null) {
|
|
45
56
|
pressability.configure(config);
|
|
46
57
|
}
|
|
@@ -48,7 +59,7 @@ export default function usePressability(
|
|
|
48
59
|
|
|
49
60
|
// On unmount, reset pending state and timers inside `pressability`. This is
|
|
50
61
|
// a separate effect because we do not want to reset when `config` changes.
|
|
51
|
-
|
|
62
|
+
useConfigurationEffect(() => {
|
|
52
63
|
if (pressability != null) {
|
|
53
64
|
return () => {
|
|
54
65
|
pressability.reset();
|
|
@@ -101,12 +101,12 @@ const UIManagerJS: UIManagerJSInterface = {
|
|
|
101
101
|
for (const propName of Object.getOwnPropertyNames(
|
|
102
102
|
Object.getPrototypeOf(NativeUIManager),
|
|
103
103
|
)) {
|
|
104
|
-
// $FlowFixMe
|
|
104
|
+
// $FlowFixMe[incompatible-type]
|
|
105
105
|
UIManagerJS[propName] = NativeUIManager[propName];
|
|
106
106
|
}
|
|
107
107
|
// Windows]
|
|
108
108
|
|
|
109
|
-
/* $FlowFixMe(>=0.123.0 site=react_native_fb) This comment suppresses an error
|
|
109
|
+
/* $FlowFixMe[cannot-write] (>=0.123.0 site=react_native_fb) This comment suppresses an error
|
|
110
110
|
* found when Flow v0.123.0 was deployed. To see the error, delete this comment
|
|
111
111
|
* and run Flow. */
|
|
112
112
|
//const UIManagerJS = {
|
|
@@ -199,7 +199,7 @@ if (!global.nativeCallSyncHook) {
|
|
|
199
199
|
`Accessing view manager configs directly off UIManager via UIManager['${viewManagerName}'] ` +
|
|
200
200
|
`is no longer supported. Use UIManager.getViewManagerConfig('${viewManagerName}') instead.`,
|
|
201
201
|
);
|
|
202
|
-
// $FlowFixMe
|
|
202
|
+
// $FlowFixMe[incompatible-return]
|
|
203
203
|
return UIManagerJS.getViewManagerConfig(viewManagerName);
|
|
204
204
|
},
|
|
205
205
|
});
|
|
@@ -13,124 +13,62 @@
|
|
|
13
13
|
* instances and get some data from them (like their instance handle / fiber).
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import type ReactNativeDocumentT from '../../../src/private/webapis/dom/nodes/ReactNativeDocument';
|
|
17
|
-
import typeof * as ReactNativeDocumentModuleT from '../../../src/private/webapis/dom/nodes/ReactNativeDocument';
|
|
18
|
-
import type ReactNativeElementT from '../../../src/private/webapis/dom/nodes/ReactNativeElement';
|
|
19
|
-
import type ReadOnlyTextT from '../../../src/private/webapis/dom/nodes/ReadOnlyText';
|
|
20
|
-
import typeof * as RendererProxyT from '../../ReactNative/RendererProxy';
|
|
21
16
|
import type {
|
|
22
17
|
InternalInstanceHandle,
|
|
23
18
|
Node,
|
|
24
19
|
ViewConfig,
|
|
25
20
|
} from '../../Renderer/shims/ReactNativeTypes';
|
|
26
21
|
import type {RootTag} from '../RootTag';
|
|
27
|
-
import type ReactFabricHostComponentT from './ReactFabricHostComponent';
|
|
28
22
|
|
|
29
|
-
import
|
|
23
|
+
import ReactNativeDocument, {
|
|
24
|
+
createReactNativeDocument,
|
|
25
|
+
} from '../../../src/private/webapis/dom/nodes/ReactNativeDocument';
|
|
26
|
+
import ReactNativeElement from '../../../src/private/webapis/dom/nodes/ReactNativeElement';
|
|
27
|
+
import ReadOnlyText from '../../../src/private/webapis/dom/nodes/ReadOnlyText';
|
|
28
|
+
import * as RendererProxy from '../../ReactNative/RendererProxy';
|
|
30
29
|
|
|
31
30
|
export opaque type PublicRootInstance = mixed;
|
|
32
31
|
|
|
33
|
-
// Lazy loaded to avoid evaluating the module when using the legacy renderer.
|
|
34
|
-
let ReactNativeDocumentModuleObject: ?ReactNativeDocumentModuleT;
|
|
35
|
-
let ReactFabricHostComponentClass: Class<ReactFabricHostComponentT>;
|
|
36
|
-
let ReactNativeElementClass: Class<ReactNativeElementT>;
|
|
37
|
-
let ReadOnlyTextClass: Class<ReadOnlyTextT>;
|
|
38
|
-
let RendererProxy: RendererProxyT;
|
|
39
|
-
|
|
40
|
-
function getReactNativeDocumentModule(): ReactNativeDocumentModuleT {
|
|
41
|
-
if (ReactNativeDocumentModuleObject == null) {
|
|
42
|
-
// We initialize this lazily to avoid a require cycle.
|
|
43
|
-
ReactNativeDocumentModuleObject = require('../../../src/private/webapis/dom/nodes/ReactNativeDocument');
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return ReactNativeDocumentModuleObject;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function getReactNativeElementClass(): Class<ReactNativeElementT> {
|
|
50
|
-
if (ReactNativeElementClass == null) {
|
|
51
|
-
ReactNativeElementClass =
|
|
52
|
-
require('../../../src/private/webapis/dom/nodes/ReactNativeElement').default;
|
|
53
|
-
}
|
|
54
|
-
return ReactNativeElementClass;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function getReactFabricHostComponentClass(): Class<ReactFabricHostComponentT> {
|
|
58
|
-
if (ReactFabricHostComponentClass == null) {
|
|
59
|
-
ReactFabricHostComponentClass =
|
|
60
|
-
require('./ReactFabricHostComponent').default;
|
|
61
|
-
}
|
|
62
|
-
return ReactFabricHostComponentClass;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function getReadOnlyTextClass(): Class<ReadOnlyTextT> {
|
|
66
|
-
if (ReadOnlyTextClass == null) {
|
|
67
|
-
ReadOnlyTextClass =
|
|
68
|
-
require('../../../src/private/webapis/dom/nodes/ReadOnlyText').default;
|
|
69
|
-
}
|
|
70
|
-
return ReadOnlyTextClass;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
32
|
export function createPublicRootInstance(rootTag: RootTag): PublicRootInstance {
|
|
74
|
-
if (ReactNativeFeatureFlags.enableAccessToHostTreeInFabric()) {
|
|
75
|
-
const ReactNativeDocumentModule = getReactNativeDocumentModule();
|
|
76
|
-
|
|
77
|
-
// $FlowExpectedError[incompatible-return]
|
|
78
|
-
return ReactNativeDocumentModule.createReactNativeDocument(rootTag);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
33
|
// $FlowExpectedError[incompatible-return]
|
|
82
|
-
return
|
|
34
|
+
return createReactNativeDocument(rootTag);
|
|
83
35
|
}
|
|
84
36
|
|
|
85
37
|
export function createPublicInstance(
|
|
86
38
|
tag: number,
|
|
87
39
|
viewConfig: ViewConfig,
|
|
88
40
|
internalInstanceHandle: InternalInstanceHandle,
|
|
89
|
-
ownerDocument:
|
|
90
|
-
):
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
ownerDocument,
|
|
98
|
-
);
|
|
99
|
-
} else {
|
|
100
|
-
const ReactFabricHostComponent = getReactFabricHostComponentClass();
|
|
101
|
-
return new ReactFabricHostComponent(
|
|
102
|
-
tag,
|
|
103
|
-
viewConfig,
|
|
104
|
-
internalInstanceHandle,
|
|
105
|
-
);
|
|
106
|
-
}
|
|
41
|
+
ownerDocument: ReactNativeDocument,
|
|
42
|
+
): ReactNativeElement {
|
|
43
|
+
return new ReactNativeElement(
|
|
44
|
+
tag,
|
|
45
|
+
viewConfig,
|
|
46
|
+
internalInstanceHandle,
|
|
47
|
+
ownerDocument,
|
|
48
|
+
);
|
|
107
49
|
}
|
|
108
50
|
|
|
109
51
|
export function createPublicTextInstance(
|
|
110
52
|
internalInstanceHandle: InternalInstanceHandle,
|
|
111
|
-
ownerDocument:
|
|
112
|
-
):
|
|
113
|
-
const ReadOnlyText = getReadOnlyTextClass();
|
|
53
|
+
ownerDocument: ReactNativeDocument,
|
|
54
|
+
): ReadOnlyText {
|
|
114
55
|
return new ReadOnlyText(internalInstanceHandle, ownerDocument);
|
|
115
56
|
}
|
|
116
57
|
|
|
117
58
|
export function getNativeTagFromPublicInstance(
|
|
118
|
-
publicInstance:
|
|
59
|
+
publicInstance: ReactNativeElement,
|
|
119
60
|
): number {
|
|
120
61
|
return publicInstance.__nativeTag;
|
|
121
62
|
}
|
|
122
63
|
|
|
123
64
|
export function getNodeFromPublicInstance(
|
|
124
|
-
publicInstance:
|
|
65
|
+
publicInstance: ReactNativeElement,
|
|
125
66
|
): ?Node {
|
|
126
67
|
// Avoid loading ReactFabric if using an instance from the legacy renderer.
|
|
127
68
|
if (publicInstance.__internalInstanceHandle == null) {
|
|
128
69
|
return null;
|
|
129
70
|
}
|
|
130
71
|
|
|
131
|
-
if (RendererProxy == null) {
|
|
132
|
-
RendererProxy = require('../../ReactNative/RendererProxy');
|
|
133
|
-
}
|
|
134
72
|
return RendererProxy.getNodeFromInternalInstanceHandle(
|
|
135
73
|
// $FlowExpectedError[incompatible-type] __internalInstanceHandle is always an InternalInstanceHandle from React when we get here.
|
|
136
74
|
publicInstance.__internalInstanceHandle,
|
|
@@ -138,7 +76,7 @@ export function getNodeFromPublicInstance(
|
|
|
138
76
|
}
|
|
139
77
|
|
|
140
78
|
export function getInternalInstanceHandleFromPublicInstance(
|
|
141
|
-
publicInstance:
|
|
79
|
+
publicInstance: ReactNativeElement,
|
|
142
80
|
): InternalInstanceHandle {
|
|
143
81
|
// TODO(T174762768): Remove this once OSS versions of renderers will be synced.
|
|
144
82
|
// $FlowExpectedError[prop-missing] Keeping this for backwards-compatibility with the renderers versions in open source.
|
|
@@ -17,6 +17,12 @@ const ReactNativeStyleAttributes =
|
|
|
17
17
|
const resolveAssetSource = require('../Image/resolveAssetSource').default;
|
|
18
18
|
const processBackgroundImage =
|
|
19
19
|
require('../StyleSheet/processBackgroundImage').default;
|
|
20
|
+
const processBackgroundPosition =
|
|
21
|
+
require('../StyleSheet/processBackgroundPosition').default;
|
|
22
|
+
const processBackgroundRepeat =
|
|
23
|
+
require('../StyleSheet/processBackgroundRepeat').default;
|
|
24
|
+
const processBackgroundSize =
|
|
25
|
+
require('../StyleSheet/processBackgroundSize').default;
|
|
20
26
|
const processColor = require('../StyleSheet/processColor').default;
|
|
21
27
|
const processColorArray = require('../StyleSheet/processColorArray').default;
|
|
22
28
|
const processFilter = require('../StyleSheet/processFilter').default;
|
|
@@ -203,6 +209,12 @@ function getProcessorForType(typeName: string): ?(nextProp: any) => any {
|
|
|
203
209
|
return processFilter;
|
|
204
210
|
case 'BackgroundImage':
|
|
205
211
|
return processBackgroundImage;
|
|
212
|
+
case 'BackgroundPosition':
|
|
213
|
+
return processBackgroundPosition;
|
|
214
|
+
case 'BackgroundRepeat':
|
|
215
|
+
return processBackgroundRepeat;
|
|
216
|
+
case 'BackgroundSize':
|
|
217
|
+
return processBackgroundSize;
|
|
206
218
|
case 'ImageSource':
|
|
207
219
|
return resolveAssetSource;
|
|
208
220
|
case 'BoxShadow':
|