react-native-macos 0.0.0-dae9a3e3b → 0.0.0-db2cc6efb
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/Blob/React-RCTBlob.podspec +1 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/React-RCTImage.podspec +1 -1
- package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
- package/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.h +14 -0
- 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/Network/React-RCTNetwork.podspec +1 -1
- package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
- package/Libraries/Settings/React-RCTSettings.podspec +1 -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.m +1 -7
- package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
- package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
- package/React/Base/RCTUIKit.h +11 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +0 -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/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 +1 -1
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +6 -14
- 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 +8 -4
- 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/ScrollView/RCTEnhancedScrollView.h +3 -3
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +4 -4
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +4 -4
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +22 -22
- package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +5 -5
- package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h +2 -2
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +3 -0
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +5 -5
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +7 -6
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +4 -4
- package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.h +2 -1
- package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +5 -5
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +23 -22
- 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 +10 -1
- 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 +3 -3
- package/React/Fabric/Mounting/RCTMountingManager.mm +19 -11
- package/React/Fabric/Mounting/RCTMountingManagerDelegate.h +1 -1
- package/React/Fabric/Mounting/RCTMountingTransactionObserving.h +1 -1
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +6 -6
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +6 -6
- package/React/Fabric/RCTConversions.h +6 -6
- package/React/Fabric/RCTImageResponseDelegate.h +1 -1
- package/React/Fabric/RCTLocalizationProvider.h +1 -1
- package/React/Fabric/RCTScheduler.h +1 -1
- package/React/Fabric/RCTSurfacePresenter.h +8 -2
- package/React/Fabric/RCTSurfacePresenter.mm +14 -6
- 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 -8
- package/React/Fabric/RCTTouchableComponentViewProtocol.h +1 -1
- package/React/Fabric/Surface/RCTFabricSurface.mm +1 -1
- package/React/Fabric/Utils/RCTGenericDelegateSplitter.h +1 -1
- package/React/Modules/RCTSurfacePresenterStub.h +4 -0
- package/React/React-RCTFabric.podspec +1 -1
- 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/RCTView.m +1 -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 +0 -30
- package/React/Views/ScrollView/RCTScrollableProtocol.h +1 -1
- package/ReactAndroid/gradle.properties +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/systeminfo/ReactNativeVersion.java +1 -1
- 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/ReactCommon/ReactCommon.podspec +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/cxxreact/tests/BUCK +1 -1
- 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/RCTLegacyViewManagerInteropCoordinator.h +3 -3
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +3 -3
- 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/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/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/runtimescheduler/Task.h +3 -2
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +1 -2
- package/ReactCommon/react/renderer/scheduler/Scheduler.h +1 -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/RCTTextPrimitivesConversions.h +6 -6
- package/ReactCommon/react/utils/ContextContainer.h +2 -2
- package/ReactCommon/react/utils/SimpleThreadSafeCache.h +2 -2
- package/ReactCommon/yoga/Yoga.podspec +1 -1
- package/package.json +4 -1
- package/scripts/react_native_pods.rb +1 -1
- package/template/Gemfile.lock +2 -2
- package/template/package.json +1 -1
- package/ReactCommon/butter/optional.h +0 -38
|
@@ -56,7 +56,7 @@ static UIScrollViewIndicatorStyle RCTUIScrollViewIndicatorStyleFromProps(ScrollV
|
|
|
56
56
|
// This is just a workaround to allow animations based on onScroll event.
|
|
57
57
|
// This is only used to animate sticky headers in ScrollViews, and only the contentOffset and tag is used.
|
|
58
58
|
// TODO: T116850910 [Fabric][iOS] Make Fabric not use legacy RCTEventDispatcher for native-driven AnimatedEvents
|
|
59
|
-
static void RCTSendScrollEventForNativeAnimations_DEPRECATED(
|
|
59
|
+
static void RCTSendScrollEventForNativeAnimations_DEPRECATED(RCTUIScrollView *scrollView, NSInteger tag) // TODO(macOS GH#774)
|
|
60
60
|
{
|
|
61
61
|
static uint16_t coalescingKey = 0;
|
|
62
62
|
RCTScrollEvent *scrollEvent = [[RCTScrollEvent alloc] initWithEventName:@"onScroll"
|
|
@@ -102,7 +102,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
|
|
102
102
|
CGPoint _contentOffsetWhenClipped;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
+ (RCTScrollViewComponentView *_Nullable)findScrollViewComponentViewForView:(
|
|
105
|
+
+ (RCTScrollViewComponentView *_Nullable)findScrollViewComponentViewForView:(RCTUIView *)view // TODO(macOS GH#774)
|
|
106
106
|
{
|
|
107
107
|
do {
|
|
108
108
|
view = view.superview;
|
|
@@ -124,7 +124,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
|
|
124
124
|
_shouldUpdateContentInsetAdjustmentBehavior = YES;
|
|
125
125
|
[self addSubview:_scrollView];
|
|
126
126
|
|
|
127
|
-
_containerView = [[
|
|
127
|
+
_containerView = [[RCTUIView alloc] initWithFrame:CGRectZero]; // TODO(macOS GH#774)
|
|
128
128
|
[_scrollView addSubview:_containerView];
|
|
129
129
|
|
|
130
130
|
[self.scrollViewDelegateSplitter addDelegate:self];
|
|
@@ -334,12 +334,12 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
|
|
334
334
|
[((RCTEnhancedScrollView *)_scrollView) preserveContentOffsetWithBlock:block];
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
- (void)mountChildComponentView:(
|
|
337
|
+
- (void)mountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index // TODO(macOS GH#774)
|
|
338
338
|
{
|
|
339
339
|
[_containerView insertSubview:childComponentView atIndex:index];
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
-
- (void)unmountChildComponentView:(
|
|
342
|
+
- (void)unmountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index // TODO(macOS GH#774)
|
|
343
343
|
{
|
|
344
344
|
[childComponentView removeFromSuperview];
|
|
345
345
|
}
|
|
@@ -350,11 +350,11 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
|
|
350
350
|
*/
|
|
351
351
|
- (BOOL)_shouldDisableScrollInteraction
|
|
352
352
|
{
|
|
353
|
-
|
|
353
|
+
RCTUIView *ancestorView = self.superview; // TODO(macOS GH#774)
|
|
354
354
|
|
|
355
355
|
while (ancestorView) {
|
|
356
356
|
if ([ancestorView respondsToSelector:@selector(isJSResponder)]) {
|
|
357
|
-
BOOL isJSResponder = ((
|
|
357
|
+
BOOL isJSResponder = ((RCTUIView<RCTComponentViewProtocol> *)ancestorView).isJSResponder; // TODO(macOS GH#774)
|
|
358
358
|
if (isJSResponder) {
|
|
359
359
|
return YES;
|
|
360
360
|
}
|
|
@@ -409,14 +409,14 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
|
|
409
409
|
|
|
410
410
|
#pragma mark - UIScrollViewDelegate
|
|
411
411
|
|
|
412
|
-
- (BOOL)touchesShouldCancelInContentView:(__unused
|
|
412
|
+
- (BOOL)touchesShouldCancelInContentView:(__unused RCTUIView *)view // TODO(macOS GH#774)
|
|
413
413
|
{
|
|
414
414
|
// Historically, `UIScrollView`s in React Native do not cancel touches
|
|
415
415
|
// started on `UIControl`-based views (as normal iOS `UIScrollView`s do).
|
|
416
416
|
return ![self _shouldDisableScrollInteraction];
|
|
417
417
|
}
|
|
418
418
|
|
|
419
|
-
- (void)scrollViewDidScroll:(
|
|
419
|
+
- (void)scrollViewDidScroll:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
|
|
420
420
|
{
|
|
421
421
|
if (!_isUserTriggeredScrolling) {
|
|
422
422
|
[self _updateStateWithContentOffset];
|
|
@@ -435,24 +435,24 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
|
|
435
435
|
[self _remountChildrenIfNeeded];
|
|
436
436
|
}
|
|
437
437
|
|
|
438
|
-
- (void)scrollViewDidZoom:(
|
|
438
|
+
- (void)scrollViewDidZoom:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
|
|
439
439
|
{
|
|
440
440
|
[self scrollViewDidScroll:scrollView];
|
|
441
441
|
}
|
|
442
442
|
|
|
443
|
-
- (BOOL)scrollViewShouldScrollToTop:(
|
|
443
|
+
- (BOOL)scrollViewShouldScrollToTop:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
|
|
444
444
|
{
|
|
445
445
|
_isUserTriggeredScrolling = YES;
|
|
446
446
|
return YES;
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
-
- (void)scrollViewDidScrollToTop:(
|
|
449
|
+
- (void)scrollViewDidScrollToTop:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
|
|
450
450
|
{
|
|
451
451
|
_isUserTriggeredScrolling = NO;
|
|
452
452
|
[self _updateStateWithContentOffset];
|
|
453
453
|
}
|
|
454
454
|
|
|
455
|
-
- (void)scrollViewWillBeginDragging:(
|
|
455
|
+
- (void)scrollViewWillBeginDragging:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
|
|
456
456
|
{
|
|
457
457
|
[self _forceDispatchNextScrollEvent];
|
|
458
458
|
|
|
@@ -464,7 +464,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
|
|
464
464
|
_isUserTriggeredScrolling = YES;
|
|
465
465
|
}
|
|
466
466
|
|
|
467
|
-
- (void)scrollViewDidEndDragging:(
|
|
467
|
+
- (void)scrollViewDidEndDragging:(RCTUIScrollView *)scrollView willDecelerate:(BOOL)decelerate // TODO(macOS GH#774)
|
|
468
468
|
{
|
|
469
469
|
[self _forceDispatchNextScrollEvent];
|
|
470
470
|
|
|
@@ -476,7 +476,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
|
|
476
476
|
[self _updateStateWithContentOffset];
|
|
477
477
|
}
|
|
478
478
|
|
|
479
|
-
- (void)scrollViewWillBeginDecelerating:(
|
|
479
|
+
- (void)scrollViewWillBeginDecelerating:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
|
|
480
480
|
{
|
|
481
481
|
[self _forceDispatchNextScrollEvent];
|
|
482
482
|
|
|
@@ -488,7 +488,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
|
|
488
488
|
->onMomentumScrollBegin([self _scrollViewMetrics]);
|
|
489
489
|
}
|
|
490
490
|
|
|
491
|
-
- (void)scrollViewDidEndDecelerating:(
|
|
491
|
+
- (void)scrollViewDidEndDecelerating:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
|
|
492
492
|
{
|
|
493
493
|
[self _forceDispatchNextScrollEvent];
|
|
494
494
|
|
|
@@ -501,12 +501,12 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
|
|
501
501
|
_isUserTriggeredScrolling = NO;
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
-
- (void)scrollViewDidEndScrollingAnimation:(
|
|
504
|
+
- (void)scrollViewDidEndScrollingAnimation:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
|
|
505
505
|
{
|
|
506
506
|
[self _handleFinishedScrolling:scrollView];
|
|
507
507
|
}
|
|
508
508
|
|
|
509
|
-
- (void)_handleFinishedScrolling:(
|
|
509
|
+
- (void)_handleFinishedScrolling:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
|
|
510
510
|
{
|
|
511
511
|
[self _forceDispatchNextScrollEvent];
|
|
512
512
|
[self scrollViewDidScroll:scrollView];
|
|
@@ -519,7 +519,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
|
|
519
519
|
[self _updateStateWithContentOffset];
|
|
520
520
|
}
|
|
521
521
|
|
|
522
|
-
- (void)scrollViewWillBeginZooming:(
|
|
522
|
+
- (void)scrollViewWillBeginZooming:(RCTUIScrollView *)scrollView withView:(nullable RCTUIView *)view // TODO(macOS GH#774)
|
|
523
523
|
{
|
|
524
524
|
[self _forceDispatchNextScrollEvent];
|
|
525
525
|
|
|
@@ -530,7 +530,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
|
|
530
530
|
std::static_pointer_cast<ScrollViewEventEmitter const>(_eventEmitter)->onScrollBeginDrag([self _scrollViewMetrics]);
|
|
531
531
|
}
|
|
532
532
|
|
|
533
|
-
- (void)scrollViewDidEndZooming:(
|
|
533
|
+
- (void)scrollViewDidEndZooming:(RCTUIScrollView *)scrollView withView:(nullable RCTUIView *)view atScale:(CGFloat)scale // TODO(macOS GH#774)
|
|
534
534
|
{
|
|
535
535
|
[self _forceDispatchNextScrollEvent];
|
|
536
536
|
|
|
@@ -542,7 +542,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
|
|
542
542
|
[self _updateStateWithContentOffset];
|
|
543
543
|
}
|
|
544
544
|
|
|
545
|
-
- (
|
|
545
|
+
- (RCTUIView *)viewForZoomingInScrollView:(__unused RCTUIScrollView *)scrollView // TODO(macOS GH#774)
|
|
546
546
|
{
|
|
547
547
|
return _containerView;
|
|
548
548
|
}
|
|
@@ -610,7 +610,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
|
|
610
610
|
|
|
611
611
|
#pragma mark - Child views mounting
|
|
612
612
|
|
|
613
|
-
- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(
|
|
613
|
+
- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(RCTUIView *)clipView // TODO(macOS GH#774)
|
|
614
614
|
{
|
|
615
615
|
// Do nothing. ScrollView manages its subview clipping individually in `_remountChildren`.
|
|
616
616
|
}
|
|
@@ -23,7 +23,7 @@ using namespace facebook::react;
|
|
|
23
23
|
@end
|
|
24
24
|
|
|
25
25
|
@implementation RCTSliderComponentView {
|
|
26
|
-
|
|
26
|
+
RCTUISlider *_sliderView; // TODO(macOS GH#774)
|
|
27
27
|
float _previousValue;
|
|
28
28
|
|
|
29
29
|
UIImage *_trackImage;
|
|
@@ -48,7 +48,7 @@ using namespace facebook::react;
|
|
|
48
48
|
static const auto defaultProps = std::make_shared<const SliderProps>();
|
|
49
49
|
_props = defaultProps;
|
|
50
50
|
|
|
51
|
-
_sliderView = [[
|
|
51
|
+
_sliderView = [[RCTUISlider alloc] initWithFrame:self.bounds]; // TODO(macOS GH#774)
|
|
52
52
|
|
|
53
53
|
[_sliderView addTarget:self action:@selector(onChange:) forControlEvents:UIControlEventValueChanged];
|
|
54
54
|
[_sliderView addTarget:self
|
|
@@ -284,17 +284,17 @@ using namespace facebook::react;
|
|
|
284
284
|
[_sliderView setThumbImage:thumbImage forState:UIControlStateNormal];
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
- (void)onChange:(
|
|
287
|
+
- (void)onChange:(RCTUISlider *)sender // TODO(macOS GH#774)
|
|
288
288
|
{
|
|
289
289
|
[self onChange:sender withContinuous:YES];
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
- (void)sliderTouchEnd:(
|
|
292
|
+
- (void)sliderTouchEnd:(RCTUISlider *)sender // TODO(macOS GH#774)
|
|
293
293
|
{
|
|
294
294
|
[self onChange:sender withContinuous:NO];
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
- (void)onChange:(
|
|
297
|
+
- (void)onChange:(RCTUISlider *)sender withContinuous:(BOOL)continuous // TODO(macOS GH#774)
|
|
298
298
|
{
|
|
299
299
|
float value = sender.value;
|
|
300
300
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
- (CGRect)accessibilityFrame
|
|
13
13
|
{
|
|
14
|
-
|
|
14
|
+
RCTUIView *container = (RCTUIView *)self.accessibilityContainer; // TODO(macOS GH#774)
|
|
15
15
|
if (CGRectEqualToRect(_frame, CGRectZero)) {
|
|
16
16
|
return UIAccessibilityConvertFrameToScreenCoordinates(container.bounds, container);
|
|
17
17
|
} else {
|
package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#import <
|
|
8
|
+
#import <React/RCTUIKit.h> // TODO(macOS GH#774)
|
|
9
9
|
|
|
10
10
|
#import <react/renderer/attributedstring/AttributedString.h>
|
|
11
11
|
#import <react/renderer/attributedstring/ParagraphAttributes.h>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
layoutManager:(RCTTextLayoutManager *)layoutManager
|
|
20
20
|
paragraphAttributes:(facebook::react::ParagraphAttributes)paragraphAttributes
|
|
21
21
|
frame:(CGRect)frame
|
|
22
|
-
view:(
|
|
22
|
+
view:(RCTUIView *)view; // TODO(macOS GH#774)
|
|
23
23
|
|
|
24
24
|
/*
|
|
25
25
|
* Returns an array of `UIAccessibilityElement`s to be used for `UIAccessibilityContainer` implementation.
|
package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm
CHANGED
|
@@ -26,14 +26,14 @@ using namespace facebook::react;
|
|
|
26
26
|
RCTTextLayoutManager *_layoutManager;
|
|
27
27
|
ParagraphAttributes _paragraphAttributes;
|
|
28
28
|
CGRect _frame;
|
|
29
|
-
__weak
|
|
29
|
+
__weak RCTUIView *_view; // TODO(macOS GH#774)
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
- (instancetype)initWithString:(facebook::react::AttributedString)attributedString
|
|
33
33
|
layoutManager:(RCTTextLayoutManager *)layoutManager
|
|
34
34
|
paragraphAttributes:(ParagraphAttributes)paragraphAttributes
|
|
35
35
|
frame:(CGRect)frame
|
|
36
|
-
view:(
|
|
36
|
+
view:(RCTUIView *)view // TODO(macOS GH#774)
|
|
37
37
|
{
|
|
38
38
|
if (self = [super init]) {
|
|
39
39
|
_attributedString = attributedString;
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
#import "RCTParagraphComponentView.h"
|
|
9
9
|
#import "RCTParagraphComponentAccessibilityProvider.h"
|
|
10
10
|
|
|
11
|
+
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
11
12
|
#import <MobileCoreServices/UTCoreTypes.h>
|
|
13
|
+
#endif // ]TODO(macOS GH#774)
|
|
14
|
+
|
|
12
15
|
#import <react/renderer/components/text/ParagraphComponentDescriptor.h>
|
|
13
16
|
#import <react/renderer/components/text/ParagraphProps.h>
|
|
14
17
|
#import <react/renderer/components/text/ParagraphState.h>
|
|
@@ -30,7 +30,7 @@ using namespace facebook::react;
|
|
|
30
30
|
|
|
31
31
|
@implementation RCTTextInputComponentView {
|
|
32
32
|
TextInputShadowNode::ConcreteState::Shared _state;
|
|
33
|
-
|
|
33
|
+
RCTUIView<RCTBackedTextInputViewProtocol> *_backedTextInputView; // TODO(macOS GH#774)
|
|
34
34
|
NSUInteger _mostRecentEventCount;
|
|
35
35
|
NSAttributedString *_lastStringStateWasUpdatedWith;
|
|
36
36
|
|
|
@@ -409,7 +409,7 @@ using namespace facebook::react;
|
|
|
409
409
|
|
|
410
410
|
#pragma mark - RCTBackedTextInputDelegate (UIScrollViewDelegate)
|
|
411
411
|
|
|
412
|
-
- (void)scrollViewDidScroll:(
|
|
412
|
+
- (void)scrollViewDidScroll:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
|
|
413
413
|
{
|
|
414
414
|
if (_eventEmitter) {
|
|
415
415
|
std::static_pointer_cast<TextInputEventEmitter const>(_eventEmitter)->onScroll([self _textInputMetrics]);
|
|
@@ -566,8 +566,8 @@ using namespace facebook::react;
|
|
|
566
566
|
|
|
567
567
|
- (void)_restoreTextSelection
|
|
568
568
|
{
|
|
569
|
-
const
|
|
570
|
-
if (selection
|
|
569
|
+
auto const selection = std::dynamic_pointer_cast<TextInputProps const>(_props)->selection;
|
|
570
|
+
if (!selection.has_value()) {
|
|
571
571
|
return;
|
|
572
572
|
}
|
|
573
573
|
auto start = [_backedTextInputView positionFromPosition:_backedTextInputView.beginningOfDocument
|
|
@@ -603,7 +603,7 @@ using namespace facebook::react;
|
|
|
603
603
|
- (void)_setMultiline:(BOOL)multiline
|
|
604
604
|
{
|
|
605
605
|
[_backedTextInputView removeFromSuperview];
|
|
606
|
-
|
|
606
|
+
RCTUIView<RCTBackedTextInputViewProtocol> *backedTextInputView = multiline ? [RCTUITextView new] : [RCTUITextField new]; // TODO(macOS GH#774)
|
|
607
607
|
backedTextInputView.frame = _backedTextInputView.frame;
|
|
608
608
|
RCTCopyBackedTextInput(_backedTextInputView, backedTextInputView);
|
|
609
609
|
_backedTextInputView = backedTextInputView;
|
|
@@ -5,19 +5,20 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#import <
|
|
8
|
+
#import <React/RCTUIKit.h> // TODO(macOS GH#774)
|
|
9
|
+
|
|
10
|
+
#import <optional>
|
|
9
11
|
|
|
10
12
|
#import <React/RCTBackedTextInputViewProtocol.h>
|
|
11
|
-
#import <butter/optional.h>
|
|
12
13
|
#import <react/renderer/components/iostextinput/primitives.h>
|
|
13
14
|
|
|
14
15
|
NS_ASSUME_NONNULL_BEGIN
|
|
15
16
|
|
|
16
17
|
void RCTCopyBackedTextInput(
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
RCTUIView<RCTBackedTextInputViewProtocol> *fromTextInput,
|
|
19
|
+
RCTUIView<RCTBackedTextInputViewProtocol> *toTextInput); // TODO(macOS GH#774)
|
|
19
20
|
|
|
20
|
-
UITextAutocorrectionType RCTUITextAutocorrectionTypeFromOptionalBool(
|
|
21
|
+
UITextAutocorrectionType RCTUITextAutocorrectionTypeFromOptionalBool(std::optional<bool> autoCorrect);
|
|
21
22
|
|
|
22
23
|
UITextAutocapitalizationType RCTUITextAutocapitalizationTypeFromAutocapitalizationType(
|
|
23
24
|
facebook::react::AutocapitalizationType autocapitalizationType);
|
|
@@ -25,7 +26,7 @@ UITextAutocapitalizationType RCTUITextAutocapitalizationTypeFromAutocapitalizati
|
|
|
25
26
|
UIKeyboardAppearance RCTUIKeyboardAppearanceFromKeyboardAppearance(
|
|
26
27
|
facebook::react::KeyboardAppearance keyboardAppearance);
|
|
27
28
|
|
|
28
|
-
UITextSpellCheckingType RCTUITextSpellCheckingTypeFromOptionalBool(
|
|
29
|
+
UITextSpellCheckingType RCTUITextSpellCheckingTypeFromOptionalBool(std::optional<bool> spellCheck);
|
|
29
30
|
|
|
30
31
|
UITextFieldViewMode RCTUITextFieldViewModeFromTextInputAccessoryVisibilityMode(
|
|
31
32
|
facebook::react::TextInputAccessoryVisibilityMode mode);
|
|
@@ -19,8 +19,8 @@ static NSAttributedString *RCTSanitizeAttributedString(NSAttributedString *attri
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
void RCTCopyBackedTextInput(
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
RCTUIView<RCTBackedTextInputViewProtocol> *fromTextInput,
|
|
23
|
+
RCTUIView<RCTBackedTextInputViewProtocol> *toTextInput) // TODO(macOS GH#774)
|
|
24
24
|
{
|
|
25
25
|
toTextInput.attributedText = RCTSanitizeAttributedString(fromTextInput.attributedText);
|
|
26
26
|
toTextInput.placeholder = fromTextInput.placeholder;
|
|
@@ -51,7 +51,7 @@ void RCTCopyBackedTextInput(
|
|
|
51
51
|
[toTextInput setSelectedTextRange:fromTextInput.selectedTextRange notifyDelegate:NO];
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
UITextAutocorrectionType RCTUITextAutocorrectionTypeFromOptionalBool(
|
|
54
|
+
UITextAutocorrectionType RCTUITextAutocorrectionTypeFromOptionalBool(std::optional<bool> autoCorrect)
|
|
55
55
|
{
|
|
56
56
|
return autoCorrect.has_value() ? (*autoCorrect ? UITextAutocorrectionTypeYes : UITextAutocorrectionTypeNo)
|
|
57
57
|
: UITextAutocorrectionTypeDefault;
|
|
@@ -84,7 +84,7 @@ UIKeyboardAppearance RCTUIKeyboardAppearanceFromKeyboardAppearance(KeyboardAppea
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
UITextSpellCheckingType RCTUITextSpellCheckingTypeFromOptionalBool(
|
|
87
|
+
UITextSpellCheckingType RCTUITextSpellCheckingTypeFromOptionalBool(std::optional<bool> spellCheck)
|
|
88
88
|
{
|
|
89
89
|
return spellCheck.has_value() ? (*spellCheck ? UITextSpellCheckingTypeYes : UITextSpellCheckingTypeNo)
|
|
90
90
|
: UITextSpellCheckingTypeDefault;
|
|
@@ -25,12 +25,12 @@ using namespace facebook::react;
|
|
|
25
25
|
|
|
26
26
|
CGRect bounds = self.bounds;
|
|
27
27
|
_label = [[UILabel alloc] initWithFrame:bounds];
|
|
28
|
-
_label.backgroundColor = [
|
|
28
|
+
_label.backgroundColor = [RCTUIColor colorWithRed:1.0 green:0.0 blue:0.0 alpha:0.3]; // TODO(macOS GH#774)
|
|
29
29
|
_label.layoutMargins = UIEdgeInsetsMake(12, 12, 12, 12);
|
|
30
30
|
_label.lineBreakMode = NSLineBreakByWordWrapping;
|
|
31
31
|
_label.numberOfLines = 0;
|
|
32
32
|
_label.textAlignment = NSTextAlignmentCenter;
|
|
33
|
-
_label.textColor = [
|
|
33
|
+
_label.textColor = [RCTUIColor whiteColor]; // TODO(macOS GH#774)
|
|
34
34
|
|
|
35
35
|
self.contentView = _label;
|
|
36
36
|
}
|
package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm
CHANGED
|
@@ -31,11 +31,11 @@ using namespace facebook::react;
|
|
|
31
31
|
_props = defaultProps;
|
|
32
32
|
|
|
33
33
|
_label = [[UILabel alloc] initWithFrame:self.bounds];
|
|
34
|
-
_label.backgroundColor = [
|
|
34
|
+
_label.backgroundColor = [RCTUIColor colorWithRed:1.0 green:0.0 blue:0.0 alpha:0.3]; // TODO(macOS GH#774)
|
|
35
35
|
_label.lineBreakMode = NSLineBreakByCharWrapping;
|
|
36
36
|
_label.numberOfLines = 0;
|
|
37
37
|
_label.textAlignment = NSTextAlignmentCenter;
|
|
38
|
-
_label.textColor = [
|
|
38
|
+
_label.textColor = [RCTUIColor whiteColor]; // TODO(macOS GH#774)
|
|
39
39
|
_label.allowsDefaultTighteningForTruncation = YES;
|
|
40
40
|
_label.adjustsFontSizeToFitWidth = YES;
|
|
41
41
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#import <
|
|
8
|
+
#import <React/RCTUIKit.h> // TODO(macOS GH#774)
|
|
9
9
|
|
|
10
10
|
#import <React/RCTComponentViewProtocol.h>
|
|
11
11
|
#import <React/RCTConstants.h>
|
|
@@ -22,12 +22,12 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
22
22
|
/**
|
|
23
23
|
* UIView class for <View> component.
|
|
24
24
|
*/
|
|
25
|
-
@interface RCTViewComponentView :
|
|
25
|
+
@interface RCTViewComponentView : RCTUIView <RCTComponentViewProtocol, RCTTouchableComponentViewProtocol> {
|
|
26
26
|
@protected
|
|
27
27
|
facebook::react::LayoutMetrics _layoutMetrics;
|
|
28
28
|
facebook::react::SharedViewProps _props;
|
|
29
29
|
facebook::react::SharedViewEventEmitter _eventEmitter;
|
|
30
|
-
}
|
|
30
|
+
} // TODO(macOS GH#774)
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Represents the `UIView` instance that is being automatically attached to
|
|
@@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
37
37
|
* to embed/bridge pure native views as component views.
|
|
38
38
|
* Defaults to `nil`. Assign `nil` to remove view as subview.
|
|
39
39
|
*/
|
|
40
|
-
@property (nonatomic, strong, nullable)
|
|
40
|
+
@property (nonatomic, strong, nullable) RCTUIView *contentView; // TODO(macOS GH#774)
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Provides access to `nativeId` prop of the component.
|
|
@@ -52,7 +52,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
52
52
|
* Provides access to `foregroundColor` prop of the component.
|
|
53
53
|
* Must be used by subclasses only.
|
|
54
54
|
*/
|
|
55
|
-
@property (nonatomic, strong, nullable)
|
|
55
|
+
@property (nonatomic, strong, nullable) RCTUIColor *foregroundColor; // TODO(macOS GH#774)
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* Returns the object - usually (sub)view - which represents this
|