react-native-macos 0.0.0-cf2105fa4 → 0.0.0-d2f5a1ffb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/AddressSanitizerCrash/RCTAddressSanitizerCrash.js +25 -0
- package/Libraries/Animated/AnimatedEvent.js +23 -4
- package/Libraries/Animated/NativeAnimatedHelper.js +1 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +22 -12
- package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +3 -6
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -7
- package/Libraries/Components/ScrollView/ScrollView.js +8 -5
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +268 -252
- package/Libraries/Components/Touchable/TouchableBounce.js +11 -22
- package/Libraries/Components/Touchable/TouchableHighlight.js +19 -30
- package/Libraries/Components/Touchable/TouchableOpacity.js +14 -29
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +8 -18
- package/Libraries/Components/View/ReactNativeViewAttributes.js +8 -7
- package/Libraries/Components/View/ReactNativeViewViewConfigMacOS.js +1 -2
- package/Libraries/Components/View/View.js +8 -10
- package/Libraries/Components/View/ViewPropTypes.js +1 -7
- package/Libraries/Core/ExceptionsManager.js +3 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpBatchedBridge.js +1 -1
- package/Libraries/Core/setUpGlobals.js +2 -0
- package/Libraries/Core/setUpTimers.js +2 -2
- package/Libraries/Image/Image.ios.js +6 -0
- package/Libraries/LogBox/UI/LogBoxImages/alert-triangle.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/chevron-left.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/chevron-right.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/close.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/loader.png +0 -0
- package/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m +0 -3
- package/Libraries/NativeAnimation/RCTNativeAnimatedModule.mm +6 -3
- package/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.h +1 -2
- package/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm +2 -1
- package/Libraries/NewAppScreen/components/logo.png +0 -0
- package/Libraries/Pressability/Pressability.js +1 -0
- package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +1 -0
- package/Libraries/Renderer/REVISION +1 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +238 -47
- package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +84 -18
- package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +84 -18
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +238 -47
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +84 -18
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +84 -18
- package/Libraries/StyleSheet/PlatformColorValueTypes.macos.js +16 -1
- package/Libraries/StyleSheet/PlatformColorValueTypesMacOS.js +2 -0
- package/Libraries/StyleSheet/PlatformColorValueTypesMacOS.macos.js +8 -1
- package/Libraries/StyleSheet/normalizeColor.js +2 -2
- package/Libraries/Text/RawText/RCTRawTextShadowView.m +2 -0
- package/Libraries/Text/Text/RCTTextView.m +7 -9
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.m +10 -8
- package/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h +2 -0
- package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.m +15 -3
- package/Libraries/Text/TextInput/RCTBaseTextInputView.m +10 -1
- package/Libraries/Text/TextProps.js +1 -7
- package/Libraries/TurboModule/TurboModuleRegistry.js +1 -1
- package/Libraries/Utilities/HMRClient.js +1 -1
- package/Libraries/WebSocket/RCTSRWebSocket.m +23 -0
- package/README.md +18 -42
- package/React/Base/RCTBridge+Private.h +8 -0
- package/React/Base/RCTBridge.h +4 -0
- package/React/Base/RCTBridge.m +17 -0
- package/React/Base/RCTBridgeModule.h +2 -2
- package/React/Base/RCTBundleURLProvider.h +1 -1
- package/React/Base/RCTBundleURLProvider.mm +2 -2
- package/React/Base/RCTConvert.m +23 -6
- package/React/Base/RCTDefines.h +12 -3
- package/React/Base/RCTEventDispatcherProtocol.h +2 -0
- package/React/Base/RCTImageSource.m +2 -0
- package/React/Base/RCTJSStackFrame.m +2 -0
- package/React/Base/RCTJavaScriptLoader.mm +2 -0
- package/React/Base/RCTKeyCommands.m +2 -0
- package/React/Base/RCTModuleData.mm +2 -0
- package/React/Base/RCTModuleMethod.mm +2 -0
- package/React/Base/RCTRootView.h +15 -0
- package/React/Base/RCTRootView.m +15 -0
- package/React/Base/RCTTouchEvent.m +2 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.h +11 -0
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +35 -1
- package/React/Base/macOS/RCTPlatformDisplayLink.m +4 -1
- package/React/CoreModules/RCTActionSheetManager.mm +4 -0
- package/React/CoreModules/RCTAddressSanitizerCrashManager.h +12 -0
- package/React/CoreModules/RCTAddressSanitizerCrashManager.mm +18 -0
- package/React/CoreModules/RCTAppearance.mm +5 -1
- package/React/CoreModules/RCTDevLoadingView.mm +14 -9
- package/React/CoreModules/RCTDevMenu.mm +4 -4
- package/React/CoreModules/RCTDevSettings.mm +6 -6
- package/React/CoreModules/RCTDevSplitBundleLoader.mm +1 -1
- package/React/CoreModules/RCTDeviceInfo.mm +4 -4
- package/React/CoreModules/RCTEventDispatcher.mm +5 -0
- package/React/CoreModules/RCTPerfMonitor.mm +9 -4
- package/React/CxxBridge/RCTCxxBridge.mm +18 -1
- package/React/CxxModule/RCTCxxMethod.mm +2 -0
- package/React/DevSupport/RCTInspectorDevServerHelper.mm +12 -0
- package/React/FBReactNativeSpec/FBReactNativeSpec.podspec +11 -3
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +9 -0
- package/React/Fabric/Mounting/RCTMountingManager.mm +15 -1
- package/React/Fabric/RCTScheduler.mm +10 -3
- package/React/Modules/RCTLayoutAnimation.m +2 -0
- package/React/Modules/RCTLayoutAnimationGroup.m +2 -0
- package/React/Modules/RCTUIManager.m +19 -10
- package/React/Views/RCTFont.mm +58 -47
- package/React/Views/RCTShadowView.m +3 -1
- package/React/Views/RCTView.h +5 -2
- package/React/Views/RCTView.m +22 -10
- package/React/Views/RCTViewManager.m +12 -16
- package/React/Views/SafeAreaView/RCTSafeAreaView.m +2 -0
- package/React/Views/ScrollView/MacOS/RCTScrollContentLocalData.h +2 -2
- package/React/Views/ScrollView/MacOS/RCTScrollContentLocalData.m +4 -4
- package/React/Views/ScrollView/RCTScrollContentView.m +10 -24
- package/React/Views/ScrollView/RCTScrollView.m +1 -5
- package/ReactAndroid/build.gradle +12 -6
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/BUCK +0 -1
- package/ReactAndroid/src/androidTest/js/TestBundle.js +0 -7
- package/ReactAndroid/src/main/java/com/facebook/react/BUCK +0 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +51 -21
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.java +12 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java +6 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstance.java +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactCxxErrorHandler.java +39 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/RuntimeScheduler.java +21 -0
- package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +6 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/Binding.java +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricJSIModuleProvider.java +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Android.mk +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +14 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.h +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java +9 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java +19 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/{JavaScriptTimerManager.java → JavaScriptTimerExecutor.java} +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.java +7 -7
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/TimingModule.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nManagerModule.java +7 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/intent/IntentModule.java +23 -19
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ForwardingCookieHandler.java +1 -4
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/shell/BUCK +0 -1
- package/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java +0 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextAnchorViewManager.java +0 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java +20 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java +25 -6
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManagerMapBuffer.java +25 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditTextInputConnectionWrapper.java +3 -0
- package/ReactAndroid/src/main/jni/react/jni/Android.mk +3 -2
- package/ReactAndroid/src/main/jni/react/jni/BUCK +2 -0
- package/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.cpp +29 -0
- package/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.h +4 -0
- package/ReactAndroid/src/main/jni/react/jni/JReactCxxErrorHandler.cpp +18 -0
- package/ReactAndroid/src/main/jni/react/jni/JReactCxxErrorHandler.h +25 -0
- package/ReactAndroid/src/main/jni/react/jni/JRuntimeScheduler.cpp +22 -0
- package/ReactAndroid/src/main/jni/react/jni/JRuntimeScheduler.h +30 -0
- package/ReactAndroid/src/main/third-party/android/androidx/BUCK +6 -6
- package/ReactCommon/React-Fabric.podspec +9 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/hermes/inspector/tools/msggen/package.json +7 -4
- package/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +1238 -1491
- package/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm +14 -31
- package/ReactCommon/react/renderer/animations/BUCK +1 -0
- package/ReactCommon/react/renderer/animations/LayoutAnimationCallbackWrapper.h +34 -0
- package/ReactCommon/react/renderer/animations/LayoutAnimationDriver.cpp +5 -26
- package/ReactCommon/react/renderer/animations/LayoutAnimationDriver.h +3 -13
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +1399 -1622
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h +76 -244
- package/ReactCommon/react/renderer/animations/conversions.h +212 -0
- package/ReactCommon/react/renderer/animations/primitives.h +104 -0
- package/ReactCommon/react/renderer/animations/utils.cpp +71 -0
- package/ReactCommon/react/renderer/animations/utils.h +80 -0
- package/ReactCommon/react/renderer/attributedstring/AttributedString.h +0 -1
- package/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.cpp +7 -3
- package/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.h +12 -2
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +1 -1
- package/ReactCommon/react/renderer/attributedstring/conversions.h +58 -3
- package/ReactCommon/react/renderer/attributedstring/primitives.h +18 -1
- package/ReactCommon/react/renderer/components/text/ParagraphComponentDescriptor.h +1 -17
- package/ReactCommon/react/renderer/components/view/Android.mk +1 -1
- package/ReactCommon/react/renderer/components/view/ViewComponentDescriptor.h +0 -23
- package/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h +2 -3
- package/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp +1 -0
- package/ReactCommon/react/renderer/components/view/ViewShadowNode.h +1 -1
- package/ReactCommon/react/renderer/components/view/accessibilityPropsConversions.h +4 -0
- package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +14 -6
- package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +1 -0
- package/ReactCommon/react/renderer/core/Props.h +1 -0
- package/ReactCommon/react/renderer/core/PropsParserContext.h +3 -2
- package/ReactCommon/react/renderer/core/RawPropsKey.cpp +10 -2
- package/ReactCommon/react/renderer/core/ReactPrimitives.h +0 -2
- package/ReactCommon/react/renderer/core/ShadowNodeFamily.h +1 -0
- package/ReactCommon/react/renderer/graphics/Android.mk +1 -1
- package/ReactCommon/react/renderer/graphics/Transform.cpp +1 -1
- package/ReactCommon/react/renderer/graphics/Transform.h +1 -1
- package/ReactCommon/react/renderer/mounting/Android.mk +2 -1
- package/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h +1 -1
- package/ReactCommon/react/renderer/mounting/ShadowViewMutation.cpp +12 -0
- package/ReactCommon/react/renderer/mounting/ShadowViewMutation.h +10 -1
- package/ReactCommon/react/renderer/runtimescheduler/BUCK +0 -1
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +4 -2
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +4 -2
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.cpp +4 -3
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.h +4 -2
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerClock.h +4 -2
- package/ReactCommon/react/renderer/runtimescheduler/SchedulerPriority.h +4 -3
- package/ReactCommon/react/renderer/runtimescheduler/Task.cpp +4 -2
- package/ReactCommon/react/renderer/runtimescheduler/Task.h +4 -2
- package/ReactCommon/react/renderer/runtimescheduler/primitives.h +4 -2
- package/ReactCommon/react/renderer/scheduler/SurfaceHandler.h +4 -4
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.h +2 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +19 -0
- package/ReactCommon/react/renderer/timeline/BUCK +6 -6
- package/ReactCommon/react/renderer/uimanager/UIManagerAnimationDelegate.h +1 -1
- package/ReactCommon/react/test_utils/BUCK +3 -0
- package/ReactCommon/react/test_utils/MockSurfaceHandler.h +25 -0
- package/ReactCommon/react/utils/ContextContainer.h +0 -27
- package/flow/global.js +45 -0
- package/index.js +15 -10
- package/package.json +23 -15
- package/react.gradle +1 -1
- package/scripts/generate-specs-cli.js +18 -0
- package/scripts/ios-configure-glog.sh +4 -0
- package/scripts/react_native_pods.rb +156 -37
- package/template/_flowconfig +1 -1
- package/template/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/template/package.json +2 -2
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js +0 -87
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js +0 -30
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroidTypes.js +0 -30
- package/React/Base/macOS/RCTDynamicColor.h +0 -28
- package/React/Base/macOS/RCTDynamicColor.m +0 -217
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/DatePickerDialogTestCase.java +0 -172
- package/ReactAndroid/src/androidTest/js/DatePickerDialogTestModule.js +0 -45
- package/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/BUCK +0 -27
- package/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/DatePickerDialogFragment.java +0 -137
- package/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/DatePickerDialogModule.java +0 -153
- package/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/DatePickerMode.java +0 -15
- package/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/DismissableDatePickerDialog.java +0 -117
- package/ReactAndroid/src/main/java/com/facebook/react/runtimescheduler/BUCK +0 -20
- package/ReactAndroid/src/main/java/com/facebook/react/runtimescheduler/RuntimeSchedulerManager.java +0 -39
- package/ReactAndroid/src/main/java/com/facebook/react/runtimescheduler/jni/Android.mk +0 -34
- package/ReactAndroid/src/main/java/com/facebook/react/runtimescheduler/jni/BUCK +0 -35
- package/ReactAndroid/src/main/java/com/facebook/react/runtimescheduler/jni/OnLoad.cpp +0 -15
- package/ReactAndroid/src/main/java/com/facebook/react/runtimescheduler/jni/RuntimeSchedulerManager.cpp +0 -46
- package/ReactAndroid/src/main/java/com/facebook/react/runtimescheduler/jni/RuntimeSchedulerManager.h +0 -40
- package/scripts/generate-specs.sh +0 -99
- package/template/_editorconfig +0 -3
- package/template/_gitattributes +0 -3
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
|
+
#include <react/renderer/core/ReactPrimitives.h>
|
|
10
11
|
#include <react/utils/ContextContainer.h>
|
|
11
12
|
|
|
12
13
|
namespace facebook {
|
|
@@ -20,8 +21,8 @@ struct PropsParserContext {
|
|
|
20
21
|
PropsParserContext(const PropsParserContext &) = delete;
|
|
21
22
|
PropsParserContext &operator=(const PropsParserContext &) = delete;
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
const
|
|
24
|
+
SurfaceId const surfaceId;
|
|
25
|
+
ContextContainer const &contextContainer;
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
} // namespace react
|
|
@@ -51,10 +51,18 @@ RawPropsKey::operator std::string() const noexcept {
|
|
|
51
51
|
return std::string{buffer, length};
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
static bool areFieldsEqual(char const *lhs, char const *rhs) {
|
|
55
|
+
if (lhs == nullptr || rhs == nullptr) {
|
|
56
|
+
return lhs == rhs;
|
|
57
|
+
}
|
|
58
|
+
return std::string(lhs) == std::string(rhs);
|
|
59
|
+
}
|
|
60
|
+
|
|
54
61
|
bool operator==(RawPropsKey const &lhs, RawPropsKey const &rhs) noexcept {
|
|
55
62
|
// Note: We check the name first.
|
|
56
|
-
return lhs.name
|
|
57
|
-
lhs.
|
|
63
|
+
return areFieldsEqual(lhs.name, rhs.name) &&
|
|
64
|
+
areFieldsEqual(lhs.prefix, rhs.prefix) &&
|
|
65
|
+
areFieldsEqual(lhs.suffix, rhs.suffix);
|
|
58
66
|
}
|
|
59
67
|
|
|
60
68
|
bool operator!=(RawPropsKey const &lhs, RawPropsKey const &rhs) noexcept {
|
|
@@ -15,7 +15,7 @@ LOCAL_SHARED_LIBRARIES := libfolly_json libreact_debug libfb libfbjni libfolly_j
|
|
|
15
15
|
|
|
16
16
|
LOCAL_STATIC_LIBRARIES :=
|
|
17
17
|
|
|
18
|
-
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../ $(LOCAL_PATH)/platform/cxx/
|
|
18
|
+
LOCAL_C_INCLUDES := $(LOCAL_PATH)/ $(LOCAL_PATH)/../../../ $(LOCAL_PATH)/platform/cxx/
|
|
19
19
|
|
|
20
20
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../ $(LOCAL_PATH)/platform/cxx/
|
|
21
21
|
|
|
@@ -183,7 +183,7 @@ TransformOperation Transform::DefaultTransformOperation(
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
Transform Transform::Interpolate(
|
|
186
|
-
|
|
186
|
+
Float animationProgress,
|
|
187
187
|
Transform const &lhs,
|
|
188
188
|
Transform const &rhs) {
|
|
189
189
|
// Iterate through operations and reconstruct an interpolated resulting
|
|
@@ -21,7 +21,7 @@ LOCAL_CFLAGS += -fexceptions -frtti -std=c++17 -Wall
|
|
|
21
21
|
|
|
22
22
|
LOCAL_STATIC_LIBRARIES :=
|
|
23
23
|
|
|
24
|
-
LOCAL_SHARED_LIBRARIES := libjsi libbetter libyoga libfolly_futures glog libfolly_json libglog_init libreact_render_core libreact_render_debug librrc_view librrc_root libreact_utils libreact_debug libreact_render_telemetry
|
|
24
|
+
LOCAL_SHARED_LIBRARIES := libjsi libbetter libyoga libfolly_futures glog libfolly_json libglog_init libreact_render_core libreact_render_debug librrc_view librrc_root libreact_utils libreact_debug libreact_render_graphics libreact_render_telemetry
|
|
25
25
|
|
|
26
26
|
include $(BUILD_SHARED_LIBRARY)
|
|
27
27
|
|
|
@@ -36,4 +36,5 @@ $(call import-module,react/renderer/debug)
|
|
|
36
36
|
$(call import-module,react/utils)
|
|
37
37
|
$(call import-module,react/debug)
|
|
38
38
|
$(call import-module,yogajni)
|
|
39
|
+
$(call import-module,react/renderer/graphics)
|
|
39
40
|
$(call import-module,react/renderer/telemetry)
|
|
@@ -22,7 +22,7 @@ class MountingCoordinator;
|
|
|
22
22
|
class MountingOverrideDelegate {
|
|
23
23
|
public:
|
|
24
24
|
virtual bool shouldOverridePullTransaction() const = 0;
|
|
25
|
-
virtual ~MountingOverrideDelegate()
|
|
25
|
+
virtual ~MountingOverrideDelegate() = default;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Delegates that override this method are responsible for:
|
|
@@ -84,6 +84,18 @@ bool ShadowViewMutation::mutatedViewIsVirtual() const {
|
|
|
84
84
|
return viewIsVirtual;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
ShadowViewMutation::ShadowViewMutation(
|
|
88
|
+
Type type,
|
|
89
|
+
ShadowView parentShadowView,
|
|
90
|
+
ShadowView oldChildShadowView,
|
|
91
|
+
ShadowView newChildShadowView,
|
|
92
|
+
int index)
|
|
93
|
+
: type(type),
|
|
94
|
+
parentShadowView(parentShadowView),
|
|
95
|
+
oldChildShadowView(oldChildShadowView),
|
|
96
|
+
newChildShadowView(newChildShadowView),
|
|
97
|
+
index(index) {}
|
|
98
|
+
|
|
87
99
|
#if RN_DEBUG_STRING_CONVERTIBLE
|
|
88
100
|
|
|
89
101
|
std::string getDebugName(ShadowViewMutation const &mutation) {
|
|
@@ -23,6 +23,8 @@ namespace react {
|
|
|
23
23
|
struct ShadowViewMutation final {
|
|
24
24
|
using List = std::vector<ShadowViewMutation>;
|
|
25
25
|
|
|
26
|
+
ShadowViewMutation() = delete;
|
|
27
|
+
|
|
26
28
|
#pragma mark - Designated Initializers
|
|
27
29
|
|
|
28
30
|
/*
|
|
@@ -70,13 +72,20 @@ struct ShadowViewMutation final {
|
|
|
70
72
|
ShadowView newChildShadowView = {};
|
|
71
73
|
int index = -1;
|
|
72
74
|
|
|
73
|
-
public:
|
|
74
75
|
// Some platforms can have the notion of virtual views - views that are in the
|
|
75
76
|
// ShadowTree hierarchy but never are on the platform. Generally this is used
|
|
76
77
|
// so notify the platform that a view exists so that we can keep EventEmitters
|
|
77
78
|
// around, to notify JS of something. This mechanism is DEPRECATED and it is
|
|
78
79
|
// highly recommended that you NOT make use of this in your platform!
|
|
79
80
|
bool mutatedViewIsVirtual() const;
|
|
81
|
+
|
|
82
|
+
private:
|
|
83
|
+
ShadowViewMutation(
|
|
84
|
+
Type type,
|
|
85
|
+
ShadowView parentShadowView,
|
|
86
|
+
ShadowView oldChildShadowView,
|
|
87
|
+
ShadowView newChildShadowView,
|
|
88
|
+
int index);
|
|
80
89
|
};
|
|
81
90
|
|
|
82
91
|
using ShadowViewMutationList = std::vector<ShadowViewMutation>;
|
|
@@ -50,7 +50,6 @@ rn_xplat_cxx_library(
|
|
|
50
50
|
tests = [":tests"],
|
|
51
51
|
visibility = ["PUBLIC"],
|
|
52
52
|
deps = [
|
|
53
|
-
react_native_xplat_target("react/renderer/core:core"),
|
|
54
53
|
react_native_xplat_target("runtimeexecutor:runtimeexecutor"),
|
|
55
54
|
react_native_xplat_target("react/renderer/debug:debug"),
|
|
56
55
|
react_native_xplat_target("better:better"),
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
#include "RuntimeScheduler.h"
|
|
9
9
|
|
|
10
|
-
namespace facebook
|
|
10
|
+
namespace facebook {
|
|
11
|
+
namespace react {
|
|
11
12
|
|
|
12
13
|
#pragma mark - Public
|
|
13
14
|
|
|
@@ -113,4 +114,5 @@ void RuntimeScheduler::startWorkLoop(jsi::Runtime &runtime) const {
|
|
|
113
114
|
isPerformingWork_ = false;
|
|
114
115
|
}
|
|
115
116
|
|
|
116
|
-
} // namespace
|
|
117
|
+
} // namespace react
|
|
118
|
+
} // namespace facebook
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
#include <memory>
|
|
15
15
|
#include <queue>
|
|
16
16
|
|
|
17
|
-
namespace facebook
|
|
17
|
+
namespace facebook {
|
|
18
|
+
namespace react {
|
|
18
19
|
|
|
19
20
|
class RuntimeScheduler final {
|
|
20
21
|
public:
|
|
@@ -100,4 +101,5 @@ class RuntimeScheduler final {
|
|
|
100
101
|
mutable bool isPerformingWork_{false};
|
|
101
102
|
};
|
|
102
103
|
|
|
103
|
-
} // namespace
|
|
104
|
+
} // namespace react
|
|
105
|
+
} // namespace facebook
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
#include "primitives.h"
|
|
11
11
|
|
|
12
12
|
#include <react/debug/react_native_assert.h>
|
|
13
|
-
#include <react/renderer/core/PropsParserContext.h>
|
|
14
13
|
#include <chrono>
|
|
15
14
|
#include <memory>
|
|
16
15
|
|
|
17
|
-
namespace facebook
|
|
16
|
+
namespace facebook {
|
|
17
|
+
namespace react {
|
|
18
18
|
|
|
19
19
|
std::shared_ptr<RuntimeSchedulerBinding>
|
|
20
20
|
RuntimeSchedulerBinding::createAndInstallIfNeeded(
|
|
@@ -167,4 +167,5 @@ jsi::Value RuntimeSchedulerBinding::get(
|
|
|
167
167
|
return jsi::Value::undefined();
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
} // namespace
|
|
170
|
+
} // namespace react
|
|
171
|
+
} // namespace facebook
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
#include <jsi/jsi.h>
|
|
11
11
|
#include <react/renderer/runtimescheduler/RuntimeScheduler.h>
|
|
12
12
|
|
|
13
|
-
namespace facebook
|
|
13
|
+
namespace facebook {
|
|
14
|
+
namespace react {
|
|
14
15
|
|
|
15
16
|
/*
|
|
16
17
|
* Exposes RuntimeScheduler to JavaScript realm.
|
|
@@ -39,4 +40,5 @@ class RuntimeSchedulerBinding : public jsi::HostObject {
|
|
|
39
40
|
std::shared_ptr<RuntimeScheduler> runtimeScheduler_;
|
|
40
41
|
};
|
|
41
42
|
|
|
42
|
-
} // namespace
|
|
43
|
+
} // namespace react
|
|
44
|
+
} // namespace facebook
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
#include <chrono>
|
|
11
11
|
|
|
12
|
-
namespace facebook
|
|
12
|
+
namespace facebook {
|
|
13
|
+
namespace react {
|
|
13
14
|
|
|
14
15
|
/*
|
|
15
16
|
* Represents a monotonic clock suitable for measuring intervals.
|
|
@@ -19,4 +20,5 @@ using RuntimeSchedulerClock = std::chrono::steady_clock;
|
|
|
19
20
|
using RuntimeSchedulerTimePoint = RuntimeSchedulerClock::time_point;
|
|
20
21
|
using RuntimeSchedulerDuration = RuntimeSchedulerClock::duration;
|
|
21
22
|
|
|
22
|
-
} // namespace
|
|
23
|
+
} // namespace react
|
|
24
|
+
} // namespace facebook
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
10
|
#include <react/debug/react_native_assert.h>
|
|
11
|
-
#include <react/renderer/core/PropsParserContext.h>
|
|
12
11
|
#include <chrono>
|
|
13
12
|
|
|
14
|
-
namespace facebook
|
|
13
|
+
namespace facebook {
|
|
14
|
+
namespace react {
|
|
15
15
|
|
|
16
16
|
enum class SchedulerPriority : int {
|
|
17
17
|
ImmediatePriority = 1,
|
|
@@ -61,4 +61,5 @@ static inline std::chrono::milliseconds timeoutForSchedulerPriority(
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
} // namespace
|
|
64
|
+
} // namespace react
|
|
65
|
+
} // namespace facebook
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
#include "RuntimeScheduler.h"
|
|
9
9
|
|
|
10
|
-
namespace facebook
|
|
10
|
+
namespace facebook {
|
|
11
|
+
namespace react {
|
|
11
12
|
|
|
12
13
|
Task::Task(
|
|
13
14
|
SchedulerPriority priority,
|
|
@@ -32,4 +33,5 @@ jsi::Value Task::execute(jsi::Runtime &runtime) {
|
|
|
32
33
|
return result;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
} // namespace
|
|
36
|
+
} // namespace react
|
|
37
|
+
} // namespace facebook
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
#include <react/renderer/runtimescheduler/RuntimeSchedulerClock.h>
|
|
13
13
|
#include <react/renderer/runtimescheduler/SchedulerPriority.h>
|
|
14
14
|
|
|
15
|
-
namespace facebook
|
|
15
|
+
namespace facebook {
|
|
16
|
+
namespace react {
|
|
16
17
|
|
|
17
18
|
class RuntimeScheduler;
|
|
18
19
|
class TaskPriorityComparer;
|
|
@@ -43,4 +44,5 @@ class TaskPriorityComparer {
|
|
|
43
44
|
}
|
|
44
45
|
};
|
|
45
46
|
|
|
46
|
-
} // namespace
|
|
47
|
+
} // namespace react
|
|
48
|
+
} // namespace facebook
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
#include <jsi/jsi.h>
|
|
12
12
|
#include <react/renderer/runtimescheduler/Task.h>
|
|
13
13
|
|
|
14
|
-
namespace facebook
|
|
14
|
+
namespace facebook {
|
|
15
|
+
namespace react {
|
|
15
16
|
|
|
16
17
|
struct TaskWrapper : public jsi::HostObject {
|
|
17
18
|
TaskWrapper(std::shared_ptr<Task> const &task) : task(task) {}
|
|
@@ -36,4 +37,5 @@ inline static std::shared_ptr<Task> taskFromValue(
|
|
|
36
37
|
return value.getObject(runtime).getHostObject<TaskWrapper>(runtime)->task;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
|
-
} // namespace
|
|
40
|
+
} // namespace react
|
|
41
|
+
} // namespace facebook
|
|
@@ -34,7 +34,7 @@ class UIManager;
|
|
|
34
34
|
* ensure the logical consistency of some methods (e.g. calling `stop` for
|
|
35
35
|
* non-running surface will crash).
|
|
36
36
|
*/
|
|
37
|
-
class SurfaceHandler
|
|
37
|
+
class SurfaceHandler {
|
|
38
38
|
public:
|
|
39
39
|
/*
|
|
40
40
|
* Represents a status of the `SurfaceHandler` instance.
|
|
@@ -62,7 +62,7 @@ class SurfaceHandler final {
|
|
|
62
62
|
* Can be constructed anytime with a `moduleName` and a `surfaceId`.
|
|
63
63
|
*/
|
|
64
64
|
SurfaceHandler(std::string const &moduleName, SurfaceId surfaceId) noexcept;
|
|
65
|
-
~SurfaceHandler() noexcept;
|
|
65
|
+
virtual ~SurfaceHandler() noexcept;
|
|
66
66
|
|
|
67
67
|
/*
|
|
68
68
|
* Movable-only.
|
|
@@ -95,10 +95,10 @@ class SurfaceHandler final {
|
|
|
95
95
|
void stop() const noexcept;
|
|
96
96
|
|
|
97
97
|
/*
|
|
98
|
-
* Sets (and gets) the
|
|
98
|
+
* Sets (and gets) the running mode.
|
|
99
99
|
* The running mode can be changed anytime (even for `Unregistered` surface).
|
|
100
100
|
*/
|
|
101
|
-
void setDisplayMode(DisplayMode displayMode) const noexcept;
|
|
101
|
+
virtual void setDisplayMode(DisplayMode displayMode) const noexcept;
|
|
102
102
|
DisplayMode getDisplayMode() const noexcept;
|
|
103
103
|
|
|
104
104
|
#pragma mark - Accessors
|
|
@@ -35,6 +35,8 @@ NSAttributedString *RCTNSAttributedStringFromAttributedStringBox(
|
|
|
35
35
|
facebook::react::AttributedStringBox RCTAttributedStringBoxFromNSAttributedString(
|
|
36
36
|
NSAttributedString *nsAttributedString);
|
|
37
37
|
|
|
38
|
+
NSString *RCTNSStringFromStringApplyingTextTransform(NSString *string, facebook::react::TextTransform textTransform);
|
|
39
|
+
|
|
38
40
|
@interface RCTWeakEventEmitterWrapper : NSObject
|
|
39
41
|
@property (nonatomic, assign) facebook::react::SharedEventEmitter eventEmitter;
|
|
40
42
|
@end
|
|
@@ -335,6 +335,11 @@ NSAttributedString *RCTNSAttributedStringFromAttributedString(const AttributedSt
|
|
|
335
335
|
} else {
|
|
336
336
|
NSString *string = [NSString stringWithCString:fragment.string.c_str() encoding:NSUTF8StringEncoding];
|
|
337
337
|
|
|
338
|
+
if (fragment.textAttributes.textTransform.hasValue()) {
|
|
339
|
+
auto textTransform = fragment.textAttributes.textTransform.value();
|
|
340
|
+
string = RCTNSStringFromStringApplyingTextTransform(string, textTransform);
|
|
341
|
+
}
|
|
342
|
+
|
|
338
343
|
nsAttributedStringFragment = [[NSMutableAttributedString alloc]
|
|
339
344
|
initWithString:string
|
|
340
345
|
attributes:RCTNSTextAttributesFromTextAttributes(fragment.textAttributes)];
|
|
@@ -373,3 +378,17 @@ AttributedStringBox RCTAttributedStringBoxFromNSAttributedString(NSAttributedStr
|
|
|
373
378
|
{
|
|
374
379
|
return nsAttributedString.length ? AttributedStringBox{wrapManagedObject(nsAttributedString)} : AttributedStringBox{};
|
|
375
380
|
}
|
|
381
|
+
|
|
382
|
+
NSString *RCTNSStringFromStringApplyingTextTransform(NSString *string, TextTransform textTransform)
|
|
383
|
+
{
|
|
384
|
+
switch (textTransform) {
|
|
385
|
+
case TextTransform::Uppercase:
|
|
386
|
+
return [string uppercaseString];
|
|
387
|
+
case TextTransform::Lowercase:
|
|
388
|
+
return [string lowercaseString];
|
|
389
|
+
case TextTransform::Capitalize:
|
|
390
|
+
return [string capitalizedString];
|
|
391
|
+
default:
|
|
392
|
+
return string;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
@@ -50,11 +50,11 @@ rn_xplat_cxx_library(
|
|
|
50
50
|
tests = [":tests"],
|
|
51
51
|
visibility = ["PUBLIC"],
|
|
52
52
|
deps = [
|
|
53
|
-
"fbsource//xplat/fbsystrace:fbsystrace",
|
|
54
|
-
"fbsource//xplat/folly:headers_only",
|
|
55
|
-
"fbsource//xplat/folly:memory",
|
|
56
|
-
"fbsource//xplat/folly:molly",
|
|
57
53
|
"//third-party/glog:glog",
|
|
54
|
+
"//xplat/fbsystrace:fbsystrace",
|
|
55
|
+
"//xplat/folly:headers_only",
|
|
56
|
+
"//xplat/folly:memory",
|
|
57
|
+
"//xplat/folly:molly",
|
|
58
58
|
react_native_xplat_target("react/utils:utils"),
|
|
59
59
|
react_native_xplat_target("react/renderer/debug:debug"),
|
|
60
60
|
react_native_xplat_target("react/renderer/core:core"),
|
|
@@ -77,8 +77,8 @@ fb_xplat_cxx_test(
|
|
|
77
77
|
contacts = ["oncall+react_native@xmail.facebook.com"],
|
|
78
78
|
platforms = (ANDROID, APPLE, CXX),
|
|
79
79
|
deps = [
|
|
80
|
-
"fbsource//xplat/folly:molly",
|
|
81
|
-
"fbsource//xplat/third-party/gmock:gtest",
|
|
82
80
|
":timeline",
|
|
81
|
+
"//xplat/folly:molly",
|
|
82
|
+
"//xplat/third-party/gmock:gtest",
|
|
83
83
|
],
|
|
84
84
|
)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its 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
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <gmock/gmock.h>
|
|
11
|
+
|
|
12
|
+
#include <react/renderer/scheduler/SurfaceHandler.h>
|
|
13
|
+
|
|
14
|
+
namespace facebook {
|
|
15
|
+
namespace react {
|
|
16
|
+
|
|
17
|
+
class MockSurfaceHandler : public SurfaceHandler {
|
|
18
|
+
public:
|
|
19
|
+
MockSurfaceHandler() : SurfaceHandler("moduleName", 0){};
|
|
20
|
+
|
|
21
|
+
MOCK_QUALIFIED_METHOD1(setDisplayMode, const noexcept, void(DisplayMode));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
} // namespace react
|
|
25
|
+
} // namespace facebook
|
|
@@ -45,10 +45,6 @@ class ContextContainer final {
|
|
|
45
45
|
std::unique_lock<better::shared_mutex> lock(mutex_);
|
|
46
46
|
|
|
47
47
|
instances_.insert({key, std::make_shared<T>(instance)});
|
|
48
|
-
|
|
49
|
-
#ifdef REACT_NATIVE_DEBUG
|
|
50
|
-
typeNames_.insert({key, typeid(T).name()});
|
|
51
|
-
#endif
|
|
52
48
|
}
|
|
53
49
|
|
|
54
50
|
/*
|
|
@@ -59,10 +55,6 @@ class ContextContainer final {
|
|
|
59
55
|
std::unique_lock<better::shared_mutex> lock(mutex_);
|
|
60
56
|
|
|
61
57
|
instances_.erase(key);
|
|
62
|
-
|
|
63
|
-
#ifdef REACT_NATIVE_DEBUG
|
|
64
|
-
typeNames_.erase(key);
|
|
65
|
-
#endif
|
|
66
58
|
}
|
|
67
59
|
|
|
68
60
|
/*
|
|
@@ -76,11 +68,6 @@ class ContextContainer final {
|
|
|
76
68
|
for (auto const &pair : contextContainer.instances_) {
|
|
77
69
|
instances_.erase(pair.first);
|
|
78
70
|
instances_.insert(pair);
|
|
79
|
-
#ifdef REACT_NATIVE_DEBUG
|
|
80
|
-
typeNames_.erase(pair.first);
|
|
81
|
-
typeNames_.insert(
|
|
82
|
-
{pair.first, contextContainer.typeNames_.at(pair.first)});
|
|
83
|
-
#endif
|
|
84
71
|
}
|
|
85
72
|
}
|
|
86
73
|
|
|
@@ -96,11 +83,6 @@ class ContextContainer final {
|
|
|
96
83
|
react_native_assert(
|
|
97
84
|
instances_.find(key) != instances_.end() &&
|
|
98
85
|
"ContextContainer doesn't have an instance for given key.");
|
|
99
|
-
#ifdef REACT_NATIVE_DEBUG
|
|
100
|
-
react_native_assert(
|
|
101
|
-
typeNames_.at(key) == typeid(T).name() &&
|
|
102
|
-
"ContextContainer stores an instance of different type for given key.");
|
|
103
|
-
#endif
|
|
104
86
|
return *std::static_pointer_cast<T>(instances_.at(key));
|
|
105
87
|
}
|
|
106
88
|
|
|
@@ -118,12 +100,6 @@ class ContextContainer final {
|
|
|
118
100
|
return {};
|
|
119
101
|
}
|
|
120
102
|
|
|
121
|
-
#ifdef REACT_NATIVE_DEBUG
|
|
122
|
-
react_native_assert(
|
|
123
|
-
typeNames_.at(key) == typeid(T).name() &&
|
|
124
|
-
"ContextContainer stores an instance of different type for given key.");
|
|
125
|
-
#endif
|
|
126
|
-
|
|
127
103
|
return *std::static_pointer_cast<T>(iterator->second);
|
|
128
104
|
}
|
|
129
105
|
|
|
@@ -131,9 +107,6 @@ class ContextContainer final {
|
|
|
131
107
|
mutable better::shared_mutex mutex_;
|
|
132
108
|
// Protected by mutex_`.
|
|
133
109
|
mutable better::map<std::string, std::shared_ptr<void>> instances_;
|
|
134
|
-
#ifdef REACT_NATIVE_DEBUG
|
|
135
|
-
mutable better::map<std::string, std::string> typeNames_;
|
|
136
|
-
#endif
|
|
137
110
|
};
|
|
138
111
|
|
|
139
112
|
} // namespace react
|
package/flow/global.js
CHANGED
|
@@ -16,8 +16,53 @@
|
|
|
16
16
|
* writeability (`+`) when defining types.
|
|
17
17
|
*/
|
|
18
18
|
declare var global: {
|
|
19
|
+
// setUpGlobals
|
|
20
|
+
+window: typeof global,
|
|
21
|
+
+self: typeof global,
|
|
22
|
+
|
|
23
|
+
// setXHR
|
|
24
|
+
+XMLHttpRequest: typeof XMLHttpRequest,
|
|
25
|
+
+FormData: typeof FormData,
|
|
26
|
+
+fetch: typeof fetch,
|
|
27
|
+
+Headers: typeof Headers,
|
|
28
|
+
+Request: typeof Request,
|
|
29
|
+
+Response: typeof Response,
|
|
30
|
+
+WebSocket: typeof WebSocket,
|
|
31
|
+
+Blob: typeof Blob,
|
|
32
|
+
+File: typeof File,
|
|
33
|
+
+FileReader: typeof FileReader,
|
|
34
|
+
+URL: typeof URL,
|
|
35
|
+
+URLSearchParams: typeof URLSearchParams,
|
|
36
|
+
+AbortController: typeof AbortController,
|
|
37
|
+
+AbortSignal: typeof AbortSignal,
|
|
38
|
+
|
|
39
|
+
// setUpAlert
|
|
40
|
+
+alert: typeof alert,
|
|
41
|
+
|
|
42
|
+
// setUpTimers
|
|
43
|
+
+clearInterval: typeof clearInterval,
|
|
44
|
+
+clearTimeout: typeof clearTimeout,
|
|
45
|
+
+setInterval: typeof setInterval,
|
|
46
|
+
+setTimeout: typeof setTimeout,
|
|
47
|
+
+requestAnimationFrame: typeof requestAnimationFrame,
|
|
48
|
+
+cancelAnimationFrame: typeof cancelAnimationFrame,
|
|
49
|
+
+requestIdleCallback: typeof requestIdleCallback,
|
|
50
|
+
+cancelIdleCallback: typeof cancelIdleCallback,
|
|
51
|
+
+setTimeout: typeof setTimeout,
|
|
52
|
+
// TODO(T97509743): use `typeof` when the next Flow release is available.
|
|
53
|
+
+queueMicrotask: <TArguments: Array<mixed>>(
|
|
54
|
+
jobCallback: (...args: TArguments) => mixed,
|
|
55
|
+
) => void,
|
|
56
|
+
|
|
57
|
+
+console: typeof console,
|
|
58
|
+
|
|
59
|
+
// JavaScript environments specific
|
|
19
60
|
+HermesInternal: ?$HermesInternalType,
|
|
20
61
|
|
|
62
|
+
// Internal-specific
|
|
63
|
+
+__DEV__?: boolean,
|
|
64
|
+
+RN$Bridgeless?: boolean,
|
|
65
|
+
|
|
21
66
|
// Undeclared properties are implicitly `any`.
|
|
22
67
|
[string | symbol]: any,
|
|
23
68
|
};
|
package/index.js
CHANGED
|
@@ -57,7 +57,6 @@ import typeof AppState from './Libraries/AppState/AppState';
|
|
|
57
57
|
import typeof AsyncStorage from './Libraries/Storage/AsyncStorage';
|
|
58
58
|
import typeof BackHandler from './Libraries/Utilities/BackHandler';
|
|
59
59
|
import typeof Clipboard from './Libraries/Components/Clipboard/Clipboard';
|
|
60
|
-
import typeof DatePickerAndroid from './Libraries/Components/DatePickerAndroid/DatePickerAndroid';
|
|
61
60
|
import typeof DeviceInfo from './Libraries/Utilities/DeviceInfo';
|
|
62
61
|
import typeof DevSettings from './Libraries/Utilities/DevSettings';
|
|
63
62
|
import typeof Dimensions from './Libraries/Utilities/Dimensions';
|
|
@@ -322,15 +321,6 @@ module.exports = {
|
|
|
322
321
|
);
|
|
323
322
|
return require('./Libraries/Components/Clipboard/Clipboard');
|
|
324
323
|
},
|
|
325
|
-
get DatePickerAndroid(): DatePickerAndroid {
|
|
326
|
-
warnOnce(
|
|
327
|
-
'DatePickerAndroid-merged',
|
|
328
|
-
'DatePickerAndroid has been merged with DatePickerIOS and will be removed in a future release. ' +
|
|
329
|
-
"It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
|
|
330
|
-
'See https://github.com/react-native-datetimepicker/datetimepicker',
|
|
331
|
-
);
|
|
332
|
-
return require('./Libraries/Components/DatePickerAndroid/DatePickerAndroid');
|
|
333
|
-
},
|
|
334
324
|
get DeviceInfo(): DeviceInfo {
|
|
335
325
|
return require('./Libraries/Utilities/DeviceInfo');
|
|
336
326
|
},
|
|
@@ -752,4 +742,19 @@ if (__DEV__) {
|
|
|
752
742
|
);
|
|
753
743
|
},
|
|
754
744
|
});
|
|
745
|
+
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
|
|
746
|
+
* attempting to access DatePickerAndroid. */
|
|
747
|
+
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
|
|
748
|
+
* attempting to access DatePickerAndroid. */
|
|
749
|
+
Object.defineProperty(module.exports, 'DatePickerAndroid', {
|
|
750
|
+
configurable: true,
|
|
751
|
+
get() {
|
|
752
|
+
invariant(
|
|
753
|
+
false,
|
|
754
|
+
'DatePickerAndroid has been removed from React Native. ' +
|
|
755
|
+
"It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
|
|
756
|
+
'See https://github.com/react-native-datetimepicker/datetimepicker',
|
|
757
|
+
);
|
|
758
|
+
},
|
|
759
|
+
});
|
|
755
760
|
}
|