react-native-macos 0.0.0-cb5eaa9e1 → 0.0.0-ccc088f1d
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/Alert/Alert.js +115 -6
- package/Libraries/Alert/NativeAlertManager.js +1 -19
- package/Libraries/Animated/animations/TimingAnimation.js +2 -7
- package/Libraries/Animated/nodes/AnimatedColor.js +20 -1
- package/Libraries/Blob/React-RCTBlob.podspec +1 -1
- package/Libraries/Components/Pressable/Pressable.js +2 -3
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.js +7 -0
- package/Libraries/Components/View/ViewAccessibility.js +0 -5
- package/Libraries/Components/View/ViewNativeComponent.js +64 -7
- package/Libraries/Components/View/ViewPropTypes.js +97 -117
- package/Libraries/Core/ReactNativeVersion.js +1 -5
- package/Libraries/Core/setUpReactDevTools.js +3 -2
- package/Libraries/Image/RCTImageLoader.mm +19 -13
- package/Libraries/Image/RCTImageView.h +0 -8
- package/Libraries/Image/React-RCTImage.podspec +1 -1
- package/Libraries/Inspector/Inspector.js +2 -4
- package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
- package/Libraries/Lists/VirtualizedList.js +13 -1
- package/{ReactCommon/react/renderer/mounting/MountingTransactionMetadata.cpp → Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.h} +6 -4
- package/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.m +30 -0
- package/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m +11 -6
- package/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.m +8 -4
- package/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m +2 -0
- package/Libraries/NativeAnimation/React-RCTAnimation.podspec +2 -2
- package/Libraries/NativeComponent/PlatformBaseViewConfig.js +506 -0
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +5 -1
- package/Libraries/NativeComponent/ViewConfig.js +4 -4
- package/Libraries/NativeComponent/ViewConfigIgnore.js +27 -0
- package/Libraries/Network/React-RCTNetwork.podspec +1 -1
- package/Libraries/Pressability/PressabilityDebug.js +5 -9
- package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
- package/Libraries/ReactNative/DummyUIManager.js +5 -3
- package/Libraries/ReactNative/UIManager.js +1 -2
- package/Libraries/Settings/React-RCTSettings.podspec +1 -1
- package/Libraries/StyleSheet/EdgeInsetsPropType.js +4 -1
- package/Libraries/Text/BaseText/RCTBaseTextViewManager.m +7 -0
- package/Libraries/Text/RCTTextAttributes.h +9 -3
- package/Libraries/Text/RCTTextAttributes.m +17 -0
- package/Libraries/Text/Text/RCTTextView.h +1 -1
- package/Libraries/Text/Text/RCTTextView.m +8 -14
- package/Libraries/Text/Text.js +0 -6
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.h +5 -0
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m +55 -5
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m +2 -0
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.h +1 -1
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.m +7 -3
- package/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +2 -2
- package/Libraries/Text/TextInput/RCTBaseTextInputView.m +7 -1
- package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m +2 -3
- package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +2 -2
- package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
- package/React/Base/RCTAssert.h +30 -15
- package/React/Base/RCTAssert.m +59 -19
- package/React/Base/RCTBridge.m +5 -3
- package/React/Base/RCTConstants.h +6 -0
- package/React/Base/RCTConstants.m +15 -0
- package/React/Base/RCTEventDispatcherProtocol.h +5 -0
- package/React/Base/RCTRootContentView.m +2 -2
- package/React/Base/RCTTouchHandler.m +4 -3
- package/React/Base/RCTUIKit.h +91 -19
- package/React/Base/RCTVersion.m +1 -5
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +0 -1
- package/React/Base/macOS/RCTUIKit.m +83 -7
- package/React/CoreModules/RCTAlertManager.mm +1 -1
- package/React/CoreModules/RCTEventDispatcher.mm +6 -1
- package/React/CoreModules/RCTLogBox.h +1 -1
- package/React/CoreModules/RCTLogBox.mm +35 -19
- package/React/CoreModules/RCTLogBoxView.h +8 -5
- package/React/CoreModules/RCTLogBoxView.mm +64 -23
- package/React/CoreModules/React-CoreModules.podspec +1 -1
- package/React/FBReactNativeSpec/FBReactNativeSpec.podspec +1 -1
- package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm +3 -2
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm +8 -8
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.h +2 -2
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.mm +3 -3
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.h +2 -1
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +75 -25
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.h +2 -0
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +10 -5
- package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.mm +10 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h +5 -3
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +23 -6
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +17 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +6 -4
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +98 -34
- package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +19 -5
- package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm +3 -3
- package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.h +5 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.mm +3 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h +4 -2
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm +6 -2
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +22 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +39 -5
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +9 -6
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +16 -4
- package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.h +2 -1
- package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm +6 -4
- package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm +14 -4
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +5 -5
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +41 -23
- package/React/Fabric/Mounting/RCTComponentViewClassDescriptor.h +1 -1
- package/React/Fabric/Mounting/RCTComponentViewDescriptor.h +2 -2
- package/React/Fabric/Mounting/RCTComponentViewFactory.h +1 -1
- package/React/Fabric/Mounting/RCTComponentViewFactory.mm +12 -3
- package/React/Fabric/Mounting/RCTComponentViewProtocol.h +4 -4
- package/React/Fabric/Mounting/RCTComponentViewRegistry.h +2 -2
- package/React/Fabric/Mounting/RCTComponentViewRegistry.mm +3 -1
- package/React/Fabric/Mounting/RCTMountingManager.h +4 -4
- package/React/Fabric/Mounting/RCTMountingManager.mm +30 -19
- package/React/Fabric/Mounting/RCTMountingManagerDelegate.h +1 -1
- package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.h +5 -3
- package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.mm +10 -8
- package/React/Fabric/Mounting/RCTMountingTransactionObserving.h +6 -4
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +6 -6
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +6 -6
- package/React/Fabric/RCTConversions.h +17 -7
- package/React/Fabric/RCTImageResponseDelegate.h +1 -1
- package/React/Fabric/RCTLocalizationProvider.h +1 -1
- package/React/Fabric/RCTLocalizationProvider.mm +10 -4
- package/React/Fabric/RCTScheduler.h +8 -1
- package/React/Fabric/RCTScheduler.mm +15 -0
- package/React/Fabric/RCTSurfacePresenter.h +10 -2
- package/React/Fabric/RCTSurfacePresenter.mm +59 -27
- package/React/Fabric/RCTSurfacePresenterBridgeAdapter.h +1 -1
- package/React/Fabric/RCTSurfaceRegistry.h +1 -1
- package/React/Fabric/RCTSurfaceTouchHandler.h +3 -3
- package/React/Fabric/RCTSurfaceTouchHandler.mm +8 -9
- package/React/Fabric/RCTTouchableComponentViewProtocol.h +1 -1
- package/React/Fabric/Surface/RCTFabricSurface.mm +3 -1
- package/React/Fabric/Utils/RCTGenericDelegateSplitter.h +1 -1
- package/React/Modules/RCTSurfacePresenterStub.h +4 -0
- package/React/Modules/RCTUIManager.h +1 -1
- package/React/Modules/RCTUIManager.m +6 -5
- package/React/React-RCTFabric.podspec +2 -2
- package/React/Views/RCTMaskedView.h +1 -1
- package/React/Views/RCTModalHostView.h +2 -2
- package/React/Views/RCTModalHostViewController.h +1 -1
- package/React/Views/RCTModalManager.h +1 -1
- package/React/Views/RCTSlider.h +4 -0
- package/React/Views/RCTSwitch.h +1 -10
- package/React/Views/RCTSwitch.m +0 -20
- package/React/Views/RCTSwitchManager.m +0 -4
- package/React/Views/RCTView.m +8 -3
- package/React/Views/RCTViewManager.m +2 -1
- package/React/Views/RCTWeakViewHolder.h +1 -1
- package/React/Views/RCTWrapperViewController.h +2 -2
- package/React/Views/RefreshControl/RCTRefreshControl.h +2 -2
- package/React/Views/RefreshControl/RCTRefreshableProtocol.h +1 -1
- package/React/Views/SafeAreaView/RCTSafeAreaView.h +1 -1
- package/React/Views/SafeAreaView/RCTSafeAreaViewLocalData.h +1 -1
- package/React/Views/ScrollView/RCTScrollView.m +1 -31
- package/React/Views/ScrollView/RCTScrollableProtocol.h +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +0 -21
- package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/animated/BUCK +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java +66 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/StyleAnimatedNode.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +0 -3
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/viewPropConversions.h +527 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java +20 -8
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -5
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +0 -11
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ColorUtil.java +19 -0
- package/ReactAndroid/src/main/jni/Application.mk +1 -1
- package/ReactAndroid/src/main/jni/first-party/fb/BUCK +1 -1
- package/ReactAndroid/src/main/jni/react/jni/Android.mk +2 -2
- package/ReactAndroid/src/test/java/com/facebook/react/views/BUCK +5 -2
- package/ReactAndroid/src/test/java/com/facebook/react/views/view/ColorUtilTest.java +9 -0
- package/ReactCommon/React-Fabric.podspec +1 -1
- package/ReactCommon/React-rncore.podspec +1 -1
- package/ReactCommon/ReactCommon.podspec +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -5
- package/ReactCommon/cxxreact/tests/BUCK +1 -1
- package/ReactCommon/hermes/inspector/Exceptions.h +6 -0
- package/ReactCommon/hermes/inspector/Inspector.cpp +5 -2
- package/ReactCommon/hermes/inspector/Inspector.h +14 -0
- package/ReactCommon/hermes/inspector/InspectorState.cpp +16 -8
- package/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +6 -6
- package/ReactCommon/microprofiler/BUCK +1 -1
- package/ReactCommon/react/debug/react_native_assert.h +1 -1
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +6 -6
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h +4 -3
- package/ReactCommon/react/renderer/animations/conversions.h +11 -11
- package/ReactCommon/react/renderer/animations/tests/LayoutAnimationTest.cpp +1 -1
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +16 -16
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +14 -14
- package/ReactCommon/react/renderer/attributedstring/conversions.h +1 -1
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +5 -0
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +3 -3
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +7 -5
- package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h +1 -1
- package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h +1 -1
- package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.cpp +1 -1
- package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.h +1 -1
- package/ReactCommon/react/renderer/components/textinput/iostextinput/primitives.h +3 -4
- package/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +6 -6
- package/ReactCommon/react/renderer/components/view/ViewProps.h +3 -1
- package/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h +3 -3
- package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +16 -16
- package/ReactCommon/react/renderer/components/view/conversions.h +5 -6
- package/ReactCommon/react/renderer/components/view/primitives.h +4 -3
- package/ReactCommon/react/renderer/components/view/propsConversions.h +2 -0
- package/ReactCommon/react/renderer/core/ComponentDescriptor.h +5 -5
- package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +7 -7
- package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +2 -2
- package/ReactCommon/react/renderer/core/EventDispatcher.cpp +21 -0
- package/ReactCommon/react/renderer/core/EventDispatcher.h +15 -0
- package/ReactCommon/react/renderer/core/EventListener.cpp +39 -0
- package/ReactCommon/react/renderer/core/EventListener.h +44 -0
- package/ReactCommon/react/renderer/core/Props.h +0 -4
- package/ReactCommon/react/renderer/core/RawProps.h +1 -1
- package/ReactCommon/react/renderer/core/ShadowNode.cpp +2 -2
- package/ReactCommon/react/renderer/core/ShadowNode.h +5 -5
- package/ReactCommon/react/renderer/core/propsConversions.h +6 -5
- package/ReactCommon/react/renderer/core/tests/ComponentDescriptorTest.cpp +3 -3
- package/ReactCommon/react/renderer/debug/debugStringConvertibleUtils.h +3 -3
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
- package/ReactCommon/react/renderer/graphics/platform/ios/Color.h +1 -1
- package/ReactCommon/react/renderer/graphics/platform/ios/RCTPlatformColorUtils.mm +9 -9
- package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImageManager.h +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImagePrimitivesConversions.h +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTSyncImageManager.h +1 -1
- package/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp +2 -2
- package/ReactCommon/react/renderer/mounting/MountingCoordinator.h +3 -3
- package/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h +1 -1
- package/ReactCommon/react/renderer/mounting/ShadowTreeRevision.h +0 -2
- package/ReactCommon/react/renderer/mounting/StubView.h +1 -1
- package/ReactCommon/react/renderer/mounting/StubViewTree.cpp +1 -1
- package/ReactCommon/react/renderer/mounting/TelemetryController.cpp +6 -9
- package/ReactCommon/react/renderer/mounting/TelemetryController.h +7 -7
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +38 -32
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +18 -1
- package/ReactCommon/react/renderer/runtimescheduler/Task.h +3 -2
- package/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +7 -2
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +40 -4
- package/ReactCommon/react/renderer/scheduler/Scheduler.h +10 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/NSTextStorage+FontScaling.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +15 -15
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontProperties.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.mm +5 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextPrimitivesConversions.h +6 -6
- package/ReactCommon/react/utils/ContextContainer.h +2 -2
- package/ReactCommon/react/utils/ManagedObjectWrapper.h +1 -1
- package/ReactCommon/react/utils/ManagedObjectWrapper.mm +1 -3
- package/ReactCommon/react/utils/SimpleThreadSafeCache.h +2 -2
- package/ReactCommon/yoga/Yoga.podspec +1 -1
- package/index.js +0 -11
- package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.m +1 -1
- package/package.json +4 -1
- package/scripts/react_native_pods.rb +1 -1
- package/template/Gemfile.lock +5 -5
- package/template/package.json +1 -1
- package/Libraries/Alert/AlertMacOS.js +0 -211
- package/Libraries/Components/View/PlatformViewPropTypes.macos.js +0 -16
- package/Libraries/Components/View/ReactNativeViewViewConfig.js +0 -374
- package/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js +0 -83
- package/Libraries/ReactNative/UIManagerInjection.js +0 -15
- package/ReactCommon/butter/optional.h +0 -38
- package/ReactCommon/react/renderer/mounting/MountingTransactionMetadata.h +0 -32
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
import type {Rect} from './Rect';
|
|
13
|
+
import type {Rect, RectOrSize} from './Rect';
|
|
14
14
|
|
|
15
|
+
// TODO: allow all EdgeInsets-like property to be set using a single number
|
|
16
|
+
// and unify EdgeInsetsProp with EdgeInsetsOrSizeProp
|
|
15
17
|
export type EdgeInsetsProp = Rect;
|
|
18
|
+
export type EdgeInsetsOrSizeProp = RectOrSize;
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
#import <React/RCTBaseTextViewManager.h>
|
|
9
|
+
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
10
|
+
#import <React/RCTCursor.h>
|
|
11
|
+
#endif // ]TODO(macOS GH#774)
|
|
9
12
|
|
|
10
13
|
@implementation RCTBaseTextViewManager
|
|
11
14
|
|
|
@@ -56,4 +59,8 @@ RCT_REMAP_SHADOW_PROPERTY(textShadowColor, textAttributes.textShadowColor, UICol
|
|
|
56
59
|
RCT_REMAP_SHADOW_PROPERTY(isHighlighted, textAttributes.isHighlighted, BOOL)
|
|
57
60
|
RCT_REMAP_SHADOW_PROPERTY(textTransform, textAttributes.textTransform, RCTTextTransform)
|
|
58
61
|
|
|
62
|
+
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
63
|
+
RCT_REMAP_SHADOW_PROPERTY(cursor, textAttributes.cursor, RCTCursor)
|
|
64
|
+
#endif // ]TODO(macOS GH#774)
|
|
65
|
+
|
|
59
66
|
@end
|
|
@@ -6,13 +6,15 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
#import <React/RCTUIKit.h> // TODO(macOS GH#774)
|
|
9
|
-
|
|
10
9
|
#import <React/RCTTextDecorationLineType.h>
|
|
11
10
|
#import <React/RCTDynamicTypeRamp.h> // TODO(macOS GH#774)
|
|
12
|
-
#import <React/RCTFontSmoothing.h> // TODO(
|
|
13
|
-
|
|
11
|
+
#import <React/RCTFontSmoothing.h> // TODO(macOS GH#774)
|
|
14
12
|
#import "RCTTextTransform.h"
|
|
15
13
|
|
|
14
|
+
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
15
|
+
#import <React/RCTCursor.h>
|
|
16
|
+
#endif // ]TODO(macOS GH#774)
|
|
17
|
+
|
|
16
18
|
NS_ASSUME_NONNULL_BEGIN
|
|
17
19
|
|
|
18
20
|
extern NSString *const RCTTextAttributesIsHighlightedAttributeName;
|
|
@@ -61,6 +63,10 @@ extern NSString *const RCTTextAttributesTagAttributeName;
|
|
|
61
63
|
@property (nonatomic, assign) UIUserInterfaceLayoutDirection layoutDirection;
|
|
62
64
|
@property (nonatomic, assign) RCTTextTransform textTransform;
|
|
63
65
|
|
|
66
|
+
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
67
|
+
@property (nonatomic, assign) RCTCursor cursor;
|
|
68
|
+
#endif // ]TODO(macOS GH#774)
|
|
69
|
+
|
|
64
70
|
#pragma mark - Inheritance
|
|
65
71
|
|
|
66
72
|
- (void)applyTextAttributes:(RCTTextAttributes *)textAttributes;
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
#import <React/RCTFont.h>
|
|
12
12
|
#import <React/RCTLog.h>
|
|
13
13
|
|
|
14
|
+
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
15
|
+
#import <React/RCTCursor.h>
|
|
16
|
+
#endif // ]TODO(macOS GH#774)
|
|
17
|
+
|
|
14
18
|
NSString *const RCTTextAttributesIsHighlightedAttributeName = @"RCTTextAttributesIsHighlightedAttributeName";
|
|
15
19
|
NSString *const RCTTextAttributesFontSmoothingAttributeName = @"RCTTextAttributesFontSmoothingAttributeName"; // TODO(OSS Candidate ISS#2710739)
|
|
16
20
|
NSString *const RCTTextAttributesTagAttributeName = @"RCTTextAttributesTagAttributeName";
|
|
@@ -45,6 +49,9 @@ NSString *const RCTTextAttributesTagAttributeName = @"RCTTextAttributesTagAttrib
|
|
|
45
49
|
// [TODO(macOS GH#774)
|
|
46
50
|
_foregroundColor = [RCTTextAttributes defaultForegroundColor];
|
|
47
51
|
// ]TODO(macOS GH#774)
|
|
52
|
+
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
53
|
+
_cursor = RCTCursorAuto;
|
|
54
|
+
#endif // ]TODO(macOS GH#774)
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
return self;
|
|
@@ -94,6 +101,10 @@ NSString *const RCTTextAttributesTagAttributeName = @"RCTTextAttributesTagAttrib
|
|
|
94
101
|
_tag = textAttributes->_tag ?: _tag;
|
|
95
102
|
_layoutDirection = textAttributes->_layoutDirection != UIUserInterfaceLayoutDirectionLeftToRight ? textAttributes->_layoutDirection : _layoutDirection;
|
|
96
103
|
_textTransform = textAttributes->_textTransform != RCTTextTransformUndefined ? textAttributes->_textTransform : _textTransform;
|
|
104
|
+
|
|
105
|
+
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
106
|
+
_cursor = textAttributes->_cursor != RCTCursorAuto ? textAttributes->_cursor : _cursor;
|
|
107
|
+
#endif // ]TODO(macOS GH#774)
|
|
97
108
|
}
|
|
98
109
|
|
|
99
110
|
- (NSParagraphStyle *)effectiveParagraphStyle
|
|
@@ -210,6 +221,12 @@ NSString *const RCTTextAttributesTagAttributeName = @"RCTTextAttributesTagAttrib
|
|
|
210
221
|
attributes[RCTTextAttributesTagAttributeName] = _tag;
|
|
211
222
|
}
|
|
212
223
|
|
|
224
|
+
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
225
|
+
if (_cursor != RCTCursorAuto) {
|
|
226
|
+
attributes[NSCursorAttributeName] = [RCTConvert NSCursor:_cursor];
|
|
227
|
+
}
|
|
228
|
+
#endif // ]TODO(macOS GH#774)
|
|
229
|
+
|
|
213
230
|
return [attributes copy];
|
|
214
231
|
}
|
|
215
232
|
|
|
@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
14
14
|
|
|
15
15
|
@interface RCTTextView : RCTUIView // TODO(macOS ISS#3536887)
|
|
16
16
|
|
|
17
|
-
- (instancetype)initWithEventDispatcher:(
|
|
17
|
+
- (instancetype)initWithEventDispatcher:(id<RCTEventDispatcherProtocol>)eventDispatcher; // TODO(OSS Candidate ISS#2710739)
|
|
18
18
|
|
|
19
19
|
@property (nonatomic, assign) BOOL selectable;
|
|
20
20
|
|
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
|
|
10
10
|
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
11
11
|
#import <MobileCoreServices/UTCoreTypes.h>
|
|
12
|
-
#else
|
|
13
|
-
#import <Quartz/Quartz.h> // TODO(macOS GH#774) for CATiledLayer
|
|
14
12
|
#endif // TODO(macOS GH#774)
|
|
15
13
|
|
|
16
14
|
#import <React/RCTAssert.h> // TODO(macOS GH#774)
|
|
@@ -20,7 +18,7 @@
|
|
|
20
18
|
|
|
21
19
|
#import <React/RCTTextShadowView.h>
|
|
22
20
|
|
|
23
|
-
#import <QuartzCore/QuartzCore.h>
|
|
21
|
+
#import <QuartzCore/QuartzCore.h>
|
|
24
22
|
|
|
25
23
|
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
26
24
|
|
|
@@ -53,14 +51,14 @@
|
|
|
53
51
|
NSTextView *_textView;
|
|
54
52
|
#endif // ]TODO(macOS GH#774)
|
|
55
53
|
|
|
56
|
-
|
|
54
|
+
id<RCTEventDispatcherProtocol> _eventDispatcher; // TODO(OSS Candidate ISS#2710739)
|
|
57
55
|
NSArray<RCTUIView *> *_Nullable _descendantViews; // TODO(macOS ISS#3536887)
|
|
58
56
|
NSTextStorage *_Nullable _textStorage;
|
|
59
57
|
CGRect _contentFrame;
|
|
60
58
|
}
|
|
61
59
|
|
|
62
60
|
// [TODO(OSS Candidate ISS#2710739)
|
|
63
|
-
- (instancetype)initWithEventDispatcher:(
|
|
61
|
+
- (instancetype)initWithEventDispatcher:(id<RCTEventDispatcherProtocol>)eventDispatcher
|
|
64
62
|
{
|
|
65
63
|
if ((self = [self initWithFrame:CGRectZero])) {
|
|
66
64
|
_eventDispatcher = eventDispatcher;
|
|
@@ -75,6 +73,7 @@
|
|
|
75
73
|
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
76
74
|
self.isAccessibilityElement = YES;
|
|
77
75
|
self.accessibilityTraits |= UIAccessibilityTraitStaticText;
|
|
76
|
+
self.opaque = NO;
|
|
78
77
|
#else // [TODO(macOS GH#774)
|
|
79
78
|
self.accessibilityRole = NSAccessibilityStaticTextRole;
|
|
80
79
|
// Fix blurry text on non-retina displays.
|
|
@@ -92,16 +91,11 @@
|
|
|
92
91
|
_textStorage = _textView.textStorage;
|
|
93
92
|
[self addSubview:_textView];
|
|
94
93
|
#endif // ]TODO(macOS GH#774)
|
|
95
|
-
self.opaque = NO;
|
|
96
94
|
RCTUIViewSetContentModeRedraw(self); // TODO(macOS GH#774) and TODO(macOS ISS#3536887)
|
|
97
95
|
}
|
|
98
96
|
return self;
|
|
99
97
|
}
|
|
100
98
|
|
|
101
|
-
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
102
|
-
|
|
103
|
-
#endif // ]TODO(macOS GH#774)
|
|
104
|
-
|
|
105
99
|
#if DEBUG // TODO(macOS GH#774) description is a debug-only feature
|
|
106
100
|
- (NSString *)description
|
|
107
101
|
{
|
|
@@ -527,7 +521,7 @@
|
|
|
527
521
|
NSData *rtf = [attributedText dataFromRange:NSMakeRange(0, attributedText.length)
|
|
528
522
|
documentAttributes:@{NSDocumentTypeDocumentAttribute: NSRTFDTextDocumentType}
|
|
529
523
|
error:nil];
|
|
530
|
-
#if TARGET_OS_IPHONE // TODO(macOS GH#774)
|
|
524
|
+
#if TARGET_OS_IPHONE // [TODO(macOS GH#774)
|
|
531
525
|
NSMutableDictionary *item = [NSMutableDictionary new]; // TODO(macOS GH#774)
|
|
532
526
|
|
|
533
527
|
if (rtf) {
|
|
@@ -538,13 +532,13 @@
|
|
|
538
532
|
|
|
539
533
|
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
|
|
540
534
|
pasteboard.items = @[item];
|
|
541
|
-
#elif TARGET_OS_OSX
|
|
535
|
+
#elif TARGET_OS_OSX
|
|
542
536
|
[_textView copy:sender];
|
|
543
537
|
|
|
544
538
|
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
|
|
545
539
|
[pasteboard clearContents];
|
|
546
|
-
[pasteboard
|
|
547
|
-
#endif // TODO(macOS GH#774)
|
|
540
|
+
[pasteboard setData:rtf forType:NSPasteboardTypeRTFD];
|
|
541
|
+
#endif // ]TODO(macOS GH#774)
|
|
548
542
|
}
|
|
549
543
|
|
|
550
544
|
@end
|
package/Libraries/Text/Text.js
CHANGED
|
@@ -181,12 +181,6 @@ const Text: React.AbstractComponent<
|
|
|
181
181
|
|
|
182
182
|
Text.displayName = 'Text';
|
|
183
183
|
|
|
184
|
-
/**
|
|
185
|
-
* Switch to `deprecated-react-native-prop-types` for compatibility with future
|
|
186
|
-
* releases. This is deprecated and will be removed in the future.
|
|
187
|
-
*/
|
|
188
|
-
Text.propTypes = require('deprecated-react-native-prop-types').TextPropTypes;
|
|
189
|
-
|
|
190
184
|
/**
|
|
191
185
|
* Returns false until the first time `newValue` is true, after which this will
|
|
192
186
|
* always return true. This is necessary to lazily initialize `Pressability` so
|
|
@@ -12,8 +12,13 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
12
12
|
@interface RCTMultilineTextInputView : RCTBaseTextInputView
|
|
13
13
|
|
|
14
14
|
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
15
|
+
|
|
16
|
+
@property (nonatomic, assign) BOOL scrollEnabled;
|
|
17
|
+
|
|
15
18
|
- (void)setReadablePasteBoardTypes:(NSArray<NSPasteboardType> *)readablePasteboardTypes;
|
|
19
|
+
@property (nonatomic, assign) BOOL hideVerticalScrollIndicator;
|
|
16
20
|
#endif // ]TODO(macOS GH#774)
|
|
21
|
+
|
|
17
22
|
@end
|
|
18
23
|
|
|
19
24
|
NS_ASSUME_NONNULL_END
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
{
|
|
16
16
|
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
17
17
|
RCTUIScrollView *_scrollView;
|
|
18
|
+
RCTClipView *_clipView;
|
|
18
19
|
#endif // ]TODO(macOS GH#774)
|
|
19
20
|
RCTUITextView *_backedTextInputView;
|
|
20
21
|
}
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
_backedTextInputView = [[RCTUITextView alloc] initWithFrame:self.bounds];
|
|
29
30
|
_backedTextInputView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
|
30
31
|
#if TARGET_OS_OSX // TODO(macOS GH#774)
|
|
32
|
+
self.hideVerticalScrollIndicator = NO;
|
|
31
33
|
_scrollView = [[RCTUIScrollView alloc] initWithFrame:self.bounds]; // TODO(macOS ISS#3536887)
|
|
32
34
|
_scrollView.backgroundColor = [RCTUIColor clearColor];
|
|
33
35
|
_scrollView.drawsBackground = NO;
|
|
@@ -35,6 +37,10 @@
|
|
|
35
37
|
_scrollView.hasHorizontalRuler = NO;
|
|
36
38
|
_scrollView.hasVerticalRuler = NO;
|
|
37
39
|
_scrollView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
|
40
|
+
[_scrollView setHasVerticalScroller:YES];
|
|
41
|
+
|
|
42
|
+
_clipView = [[RCTClipView alloc] initWithFrame:_scrollView.frame];
|
|
43
|
+
[_scrollView setContentView:_clipView];
|
|
38
44
|
|
|
39
45
|
_backedTextInputView.verticallyResizable = YES;
|
|
40
46
|
_backedTextInputView.horizontallyResizable = YES;
|
|
@@ -92,16 +98,63 @@
|
|
|
92
98
|
[self setNeedsLayout];
|
|
93
99
|
}
|
|
94
100
|
|
|
95
|
-
- (void)setEnableFocusRing:(BOOL)enableFocusRing
|
|
101
|
+
- (void)setEnableFocusRing:(BOOL)enableFocusRing
|
|
102
|
+
{
|
|
96
103
|
[super setEnableFocusRing:enableFocusRing];
|
|
97
104
|
if ([_scrollView respondsToSelector:@selector(setEnableFocusRing:)]) {
|
|
98
105
|
[_scrollView setEnableFocusRing:enableFocusRing];
|
|
99
106
|
}
|
|
100
107
|
}
|
|
101
108
|
|
|
102
|
-
- (void)setReadablePasteBoardTypes:(NSArray<NSPasteboardType> *)readablePasteboardTypes
|
|
109
|
+
- (void)setReadablePasteBoardTypes:(NSArray<NSPasteboardType> *)readablePasteboardTypes
|
|
110
|
+
{
|
|
103
111
|
[_backedTextInputView setReadablePasteBoardTypes:readablePasteboardTypes];
|
|
104
112
|
}
|
|
113
|
+
|
|
114
|
+
- (void)setScrollEnabled:(BOOL)scrollEnabled
|
|
115
|
+
{
|
|
116
|
+
if (scrollEnabled) {
|
|
117
|
+
_scrollView.scrollEnabled = YES;
|
|
118
|
+
[_clipView setConstrainScrolling:NO];
|
|
119
|
+
} else {
|
|
120
|
+
_scrollView.scrollEnabled = NO;
|
|
121
|
+
[_clipView setConstrainScrolling:YES];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
- (BOOL)scrollEnabled
|
|
126
|
+
{
|
|
127
|
+
return _scrollView.isScrollEnabled;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
- (BOOL)shouldShowVerticalScrollbar
|
|
131
|
+
{
|
|
132
|
+
// Hide vertical scrollbar if explicity set to NO
|
|
133
|
+
if (self.hideVerticalScrollIndicator) {
|
|
134
|
+
return NO;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Hide vertical scrollbar if attributed text overflows view
|
|
138
|
+
CGSize textViewSize = [_backedTextInputView intrinsicContentSize];
|
|
139
|
+
NSClipView *clipView = (NSClipView *)_scrollView.contentView;
|
|
140
|
+
if (textViewSize.height > clipView.bounds.size.height) {
|
|
141
|
+
return YES;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
return NO;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
- (void)textInputDidChange
|
|
148
|
+
{
|
|
149
|
+
[_scrollView setHasVerticalScroller:[self shouldShowVerticalScrollbar]];
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
- (void)setAttributedText:(NSAttributedString *)attributedText
|
|
153
|
+
{
|
|
154
|
+
[_backedTextInputView setAttributedText:attributedText];
|
|
155
|
+
[_scrollView setHasVerticalScroller:[self shouldShowVerticalScrollbar]];
|
|
156
|
+
}
|
|
157
|
+
|
|
105
158
|
#endif // ]TODO(macOS GH#774)
|
|
106
159
|
|
|
107
160
|
#pragma mark - UIScrollViewDelegate
|
|
@@ -109,9 +162,6 @@
|
|
|
109
162
|
- (void)scrollViewDidScroll:(RCTUIScrollView *)scrollView // TODO(macOS ISS#3536887)
|
|
110
163
|
{
|
|
111
164
|
RCTDirectEventBlock onScroll = self.onScroll;
|
|
112
|
-
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
113
|
-
[_scrollView setHasVerticalScroller:YES];
|
|
114
|
-
#endif // ]TODO(macOS GH#774)
|
|
115
165
|
if (onScroll) {
|
|
116
166
|
CGPoint contentOffset = scrollView.contentOffset;
|
|
117
167
|
CGSize contentSize = scrollView.contentSize;
|
|
@@ -24,6 +24,8 @@ RCT_REMAP_NOT_OSX_VIEW_PROPERTY(dataDetectorTypes, backedTextInputView.dataDetec
|
|
|
24
24
|
RCT_REMAP_OSX_VIEW_PROPERTY(dataDetectorTypes, backedTextInputView.enabledTextCheckingTypes, NSTextCheckingTypes) // TODO(macOS GH#774)
|
|
25
25
|
|
|
26
26
|
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
27
|
+
RCT_EXPORT_VIEW_PROPERTY(scrollEnabled, BOOL)
|
|
28
|
+
RCT_EXPORT_VIEW_PROPERTY(hideVerticalScrollIndicator, BOOL)
|
|
27
29
|
RCT_CUSTOM_VIEW_PROPERTY(pastedTypes, NSArray<NSPasteboardType>*, RCTUITextView)
|
|
28
30
|
{
|
|
29
31
|
NSArray<NSPasteboardType> *types = json ? [RCTConvert NSPasteboardTypeArray:json] : nil;
|
|
@@ -46,7 +46,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
46
46
|
@property (nonatomic, strong, nullable) NSString *inputAccessoryViewID;
|
|
47
47
|
|
|
48
48
|
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
49
|
-
@property (nonatomic,
|
|
49
|
+
@property (nonatomic, getter=isScrollEnabled) BOOL scrollEnabled;
|
|
50
50
|
@property (nonatomic, strong, nullable) RCTUIColor *selectionColor; // TODO(OSS Candidate ISS#2710739)
|
|
51
51
|
@property (nonatomic, assign) UIEdgeInsets textContainerInsets;
|
|
52
52
|
@property (nonatomic, copy) NSString *text;
|
|
@@ -212,8 +212,12 @@ static RCTUIColor *defaultPlaceholderColor() // TODO(OSS Candidate ISS#2710739)
|
|
|
212
212
|
|
|
213
213
|
- (BOOL)resignFirstResponder
|
|
214
214
|
{
|
|
215
|
-
|
|
215
|
+
if (self.selectable) {
|
|
216
|
+
self.selectedRange = NSMakeRange(NSNotFound, 0);
|
|
217
|
+
}
|
|
216
218
|
|
|
219
|
+
BOOL success = [super resignFirstResponder];
|
|
220
|
+
|
|
217
221
|
if (success) {
|
|
218
222
|
// Break undo coalescing when losing focus.
|
|
219
223
|
[self breakUndoCoalescing];
|
|
@@ -436,13 +440,13 @@ static RCTUIColor *defaultPlaceholderColor() // TODO(OSS Candidate ISS#2710739)
|
|
|
436
440
|
{
|
|
437
441
|
[super selectAll:sender];
|
|
438
442
|
|
|
439
|
-
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
443
|
+
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
440
444
|
// `selectAll:` does not work for UITextView when it's being called inside UITextView's delegate methods.
|
|
441
445
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
442
446
|
UITextRange *selectionRange = [self textRangeFromPosition:self.beginningOfDocument toPosition:self.endOfDocument];
|
|
443
447
|
[self setSelectedTextRange:selectionRange notifyDelegate:NO];
|
|
444
448
|
});
|
|
445
|
-
#endif
|
|
449
|
+
#endif // TODO(macOS GH#774)
|
|
446
450
|
}
|
|
447
451
|
|
|
448
452
|
#pragma mark - Layout
|
|
@@ -25,9 +25,9 @@ NS_ASSUME_NONNULL_END
|
|
|
25
25
|
|
|
26
26
|
NS_ASSUME_NONNULL_BEGIN
|
|
27
27
|
|
|
28
|
-
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
28
|
+
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
29
29
|
@protocol RCTBackedTextInputViewProtocol <UITextInput>
|
|
30
|
-
#else
|
|
30
|
+
#else
|
|
31
31
|
@protocol RCTBackedTextInputViewProtocol
|
|
32
32
|
#endif // ]TODO(macOS GH#774)
|
|
33
33
|
|
|
@@ -379,7 +379,13 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)decoder)
|
|
|
379
379
|
}
|
|
380
380
|
|
|
381
381
|
if (_selectTextOnFocus) {
|
|
382
|
-
[self.backedTextInputView selectAll:
|
|
382
|
+
if ([self.backedTextInputView respondsToSelector:@selector(selectAll:)]) {
|
|
383
|
+
[self.backedTextInputView selectAll:nil];
|
|
384
|
+
}
|
|
385
|
+
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
386
|
+
} else {
|
|
387
|
+
[self.backedTextInputView setSelectedTextRange:NSMakeRange(NSNotFound, 0) notifyDelegate:NO];
|
|
388
|
+
#endif // ]TODO(macOS GH#774)
|
|
383
389
|
}
|
|
384
390
|
|
|
385
391
|
[_eventDispatcher sendTextEventWithType:RCTTextEventTypeFocus
|
|
@@ -53,15 +53,14 @@ RCT_REMAP_NOT_OSX_VIEW_PROPERTY(spellCheck, backedTextInputView.spellCheckingTyp
|
|
|
53
53
|
RCT_REMAP_OSX_VIEW_PROPERTY(spellCheck, backedTextInputView.continuousSpellCheckingEnabled, BOOL) // TODO(macOS GH#774)
|
|
54
54
|
RCT_REMAP_NOT_OSX_VIEW_PROPERTY(caretHidden, backedTextInputView.caretHidden, BOOL) // TODO(macOS GH#774)
|
|
55
55
|
RCT_REMAP_NOT_OSX_VIEW_PROPERTY(clearButtonMode, backedTextInputView.clearButtonMode, UITextFieldViewMode) // TODO(macOS GH#774)
|
|
56
|
-
RCT_REMAP_VIEW_PROPERTY(scrollEnabled, backedTextInputView.scrollEnabled, BOOL)
|
|
57
56
|
RCT_REMAP_NOT_OSX_VIEW_PROPERTY(secureTextEntry, backedTextInputView.secureTextEntry, BOOL) // TODO(macOS GH#774)
|
|
58
57
|
RCT_EXPORT_VIEW_PROPERTY(autoFocus, BOOL)
|
|
59
58
|
RCT_EXPORT_VIEW_PROPERTY(blurOnSubmit, BOOL)
|
|
60
|
-
|
|
59
|
+
RCT_EXPORT_VIEW_PROPERTY(clearTextOnFocus, BOOL)
|
|
61
60
|
RCT_REMAP_NOT_OSX_VIEW_PROPERTY(keyboardType, backedTextInputView.keyboardType, UIKeyboardType) // TODO(macOS GH#774)
|
|
62
61
|
RCT_EXPORT_NOT_OSX_VIEW_PROPERTY(showSoftInputOnFocus, BOOL) // TODO(macOS GH#774)
|
|
63
62
|
RCT_EXPORT_VIEW_PROPERTY(maxLength, NSNumber)
|
|
64
|
-
|
|
63
|
+
RCT_EXPORT_VIEW_PROPERTY(selectTextOnFocus, BOOL)
|
|
65
64
|
RCT_EXPORT_VIEW_PROPERTY(selection, RCTTextSelection)
|
|
66
65
|
RCT_EXPORT_VIEW_PROPERTY(inputAccessoryViewID, NSString)
|
|
67
66
|
RCT_EXPORT_VIEW_PROPERTY(textContentType, NSString)
|
|
@@ -33,7 +33,7 @@ Pod::Spec.new do |s|
|
|
|
33
33
|
s.header_dir = "RCTTypeSafety"
|
|
34
34
|
s.pod_target_xcconfig = {
|
|
35
35
|
"USE_HEADERMAP" => "YES",
|
|
36
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++
|
|
36
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
37
37
|
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/Libraries/TypeSafety\" \"$(PODS_ROOT)/RCT-Folly\""
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @flow
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import
|
|
11
|
+
import PlatformBaseViewConfig from '../NativeComponent/PlatformBaseViewConfig';
|
|
12
12
|
import {type ViewConfig} from '../Renderer/shims/ReactNativeTypes';
|
|
13
13
|
|
|
14
14
|
const IGNORED_KEYS = ['transform', 'hitSlop'];
|
|
@@ -109,7 +109,7 @@ export function getConfigWithoutViewProps(
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
return Object.keys(viewConfig[propName])
|
|
112
|
-
.filter(prop => !
|
|
112
|
+
.filter(prop => !PlatformBaseViewConfig[propName][prop])
|
|
113
113
|
.reduce((obj, prop) => {
|
|
114
114
|
obj[prop] = viewConfig[propName][prop];
|
|
115
115
|
return obj;
|
|
@@ -35,7 +35,7 @@ Pod::Spec.new do |s|
|
|
|
35
35
|
s.header_dir = "RCTVibration"
|
|
36
36
|
s.pod_target_xcconfig = {
|
|
37
37
|
"USE_HEADERMAP" => "YES",
|
|
38
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++
|
|
38
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
39
39
|
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
|
|
40
40
|
}
|
|
41
41
|
s.frameworks = "AudioToolbox"
|
package/React/Base/RCTAssert.h
CHANGED
|
@@ -170,20 +170,35 @@ RCT_EXTERN NSString *RCTFormatStackTrace(NSArray<NSDictionary<NSString *, id> *>
|
|
|
170
170
|
|
|
171
171
|
#endif
|
|
172
172
|
|
|
173
|
-
|
|
174
|
-
* Controls for ensuring the new architecture runtime assumption holds.
|
|
175
|
-
* Note: this is work in progress.
|
|
176
|
-
*/
|
|
173
|
+
// MARK: - New Architecture Validation
|
|
177
174
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
__attribute__((used)) RCT_EXTERN void RCTEnableNewArchitectureViolationReporting(BOOL enabled);
|
|
175
|
+
typedef enum {
|
|
176
|
+
RCTNotAllowedInFabric = 1,
|
|
177
|
+
RCTNotAllowedInBridgeless = 2,
|
|
178
|
+
} RCTNotAllowedValidation;
|
|
183
179
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
180
|
+
/**
|
|
181
|
+
* Ensure runtime assumptions holds for the new architecture by reporting when assumptions are violated.
|
|
182
|
+
* Note: this is work in progress.
|
|
183
|
+
*
|
|
184
|
+
* When type is RCTNotAllowedInFabric, validate Fabric assumptions in Bridge or Bridgeless mode.
|
|
185
|
+
* i.e. Report legacy pre-Fabric call sites that should not be used while Fabric is enabled,
|
|
186
|
+
*
|
|
187
|
+
* When type is RCTNotAllowedInBridgeless, validate Bridgeless assumptions, in Bridgeless mode only.
|
|
188
|
+
* i.e. Report Bridge call sites that should not be used while Bridgeless mode is enabled.
|
|
189
|
+
*
|
|
190
|
+
* Note: enabling this at runtime is not early enough to report issues within ObjC class +load execution.
|
|
191
|
+
*/
|
|
192
|
+
__attribute__((used)) RCT_EXTERN void RCTEnableNewArchitectureValidationReporting(RCTNotAllowedValidation type);
|
|
193
|
+
|
|
194
|
+
// When new architecture validation reporting is enabled, trigger an assertion and crash.
|
|
195
|
+
__attribute__((used)) RCT_EXTERN void
|
|
196
|
+
RCTEnforceNewArchitectureValidation(RCTNotAllowedValidation type, id context, NSString *extra);
|
|
197
|
+
// When new architecture validation reporting is enabled, trigger an error but do not crash.
|
|
198
|
+
// When ready, switch to stricter variant above.
|
|
199
|
+
__attribute__((used)) RCT_EXTERN void
|
|
200
|
+
RCTErrorNewArchitectureValidation(RCTNotAllowedValidation type, id context, NSString *extra);
|
|
201
|
+
// When new architecture validation reporting is enabled, log an message.
|
|
202
|
+
// When ready, switch to stricter variant above.
|
|
203
|
+
__attribute__((used)) RCT_EXTERN void
|
|
204
|
+
RCTLogNewArchitectureValidation(RCTNotAllowedValidation type, id context, NSString *extra);
|
package/React/Base/RCTAssert.m
CHANGED
|
@@ -231,54 +231,94 @@ RCTFatalExceptionHandler RCTGetFatalExceptionHandler(void)
|
|
|
231
231
|
return RCTCurrentFatalExceptionHandler;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
//
|
|
235
|
-
// New architecture section
|
|
236
|
-
// -------------------------
|
|
234
|
+
// MARK: - New Architecture Validation - Enable Reporting
|
|
237
235
|
|
|
238
236
|
#if RCT_NEW_ARCHITECTURE
|
|
239
|
-
static
|
|
237
|
+
static RCTNotAllowedValidation validationReportingEnabled = RCTNotAllowedInBridgeless;
|
|
240
238
|
#else
|
|
241
|
-
static
|
|
239
|
+
static RCTNotAllowedValidation validationReportingEnabled = 0;
|
|
242
240
|
#endif
|
|
243
241
|
|
|
244
|
-
void
|
|
242
|
+
__attribute__((used)) RCT_EXTERN void RCTEnableNewArchitectureValidationReporting(RCTNotAllowedValidation type)
|
|
245
243
|
{
|
|
246
244
|
#if RCT_NEW_ARCHITECTURE
|
|
247
245
|
// Cannot disable the reporting in this mode.
|
|
248
246
|
#else
|
|
249
|
-
|
|
247
|
+
validationReportingEnabled = type;
|
|
250
248
|
#endif
|
|
251
249
|
}
|
|
252
250
|
|
|
253
|
-
|
|
251
|
+
// MARK: - New Architecture Validation - Private
|
|
252
|
+
|
|
253
|
+
static BOOL shouldEnforceValidation(RCTNotAllowedValidation type)
|
|
254
|
+
{
|
|
255
|
+
switch (type) {
|
|
256
|
+
case RCTNotAllowedInFabric:
|
|
257
|
+
return validationReportingEnabled == RCTNotAllowedInBridgeless ||
|
|
258
|
+
validationReportingEnabled == RCTNotAllowedInFabric;
|
|
259
|
+
case RCTNotAllowedInBridgeless:
|
|
260
|
+
return validationReportingEnabled == RCTNotAllowedInBridgeless;
|
|
261
|
+
}
|
|
262
|
+
return NO;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
static NSString *stringDescribingContext(id context)
|
|
254
266
|
{
|
|
255
|
-
NSString *tag = @"uncategorized";
|
|
256
267
|
if ([context isKindOfClass:NSString.class]) {
|
|
257
|
-
|
|
268
|
+
return context;
|
|
258
269
|
} else if (context) {
|
|
259
270
|
Class klass = [context class];
|
|
260
271
|
if (klass) {
|
|
261
|
-
|
|
272
|
+
return NSStringFromClass(klass);
|
|
262
273
|
}
|
|
263
274
|
}
|
|
264
|
-
|
|
265
|
-
|
|
275
|
+
return @"uncategorized";
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
static NSString *validationMessage(RCTNotAllowedValidation type, id context, NSString *extra)
|
|
279
|
+
{
|
|
280
|
+
NSString *notAllowedType;
|
|
281
|
+
switch (type) {
|
|
282
|
+
case RCTNotAllowedInFabric:
|
|
283
|
+
notAllowedType = @"Fabric";
|
|
284
|
+
break;
|
|
285
|
+
case RCTNotAllowedInBridgeless:
|
|
286
|
+
notAllowedType = @"Bridgeless";
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
return
|
|
291
|
+
[NSString stringWithFormat:@"[ReactNative Architecture][NotAllowedIn%@] Unexpectedly reached code path in %@. %@",
|
|
292
|
+
notAllowedType,
|
|
293
|
+
stringDescribingContext(context),
|
|
294
|
+
extra ?: @""];
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// MARK: - New Architecture Validation - Public
|
|
298
|
+
|
|
299
|
+
void RCTEnforceNewArchitectureValidation(RCTNotAllowedValidation type, id context, NSString *extra)
|
|
300
|
+
{
|
|
301
|
+
if (!shouldEnforceValidation(type)) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
RCTAssert(0, @"%@", validationMessage(type, context, extra));
|
|
266
306
|
}
|
|
267
307
|
|
|
268
|
-
void
|
|
308
|
+
void RCTErrorNewArchitectureValidation(RCTNotAllowedValidation type, id context, NSString *extra)
|
|
269
309
|
{
|
|
270
|
-
if (!
|
|
310
|
+
if (!shouldEnforceValidation(type)) {
|
|
271
311
|
return;
|
|
272
312
|
}
|
|
273
313
|
|
|
274
|
-
|
|
314
|
+
RCTLogError(@"%@", validationMessage(type, context, extra));
|
|
275
315
|
}
|
|
276
316
|
|
|
277
|
-
void
|
|
317
|
+
void RCTLogNewArchitectureValidation(RCTNotAllowedValidation type, id context, NSString *extra)
|
|
278
318
|
{
|
|
279
|
-
if (!
|
|
319
|
+
if (!shouldEnforceValidation(type)) {
|
|
280
320
|
return;
|
|
281
321
|
}
|
|
282
322
|
|
|
283
|
-
|
|
323
|
+
RCTLogInfo(@"%@", validationMessage(type, context, extra));
|
|
284
324
|
}
|
package/React/Base/RCTBridge.m
CHANGED
|
@@ -60,8 +60,10 @@ NSArray<Class> *RCTGetModuleClasses(void)
|
|
|
60
60
|
void RCTRegisterModule(Class);
|
|
61
61
|
void RCTRegisterModule(Class moduleClass)
|
|
62
62
|
{
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
RCTLogNewArchitectureValidation(
|
|
64
|
+
RCTNotAllowedInBridgeless,
|
|
65
|
+
@"RCTRegisterModule()",
|
|
66
|
+
[NSString stringWithFormat:@"'%@' was registered unexpectedly", moduleClass]);
|
|
65
67
|
|
|
66
68
|
static dispatch_once_t onceToken;
|
|
67
69
|
dispatch_once(&onceToken, ^{
|
|
@@ -223,7 +225,7 @@ static RCTBridge *RCTCurrentBridgeInstance = nil;
|
|
|
223
225
|
launchOptions:(NSDictionary *)launchOptions
|
|
224
226
|
{
|
|
225
227
|
if (self = [super init]) {
|
|
226
|
-
|
|
228
|
+
RCTEnforceNewArchitectureValidation(RCTNotAllowedInBridgeless, self, nil);
|
|
227
229
|
_delegate = delegate;
|
|
228
230
|
_bundleURL = bundleURL;
|
|
229
231
|
_moduleProvider = block;
|