react-native-macos 0.0.0-d7b3947f3 → 0.0.0-d7b689f90
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/Components/View/ViewAccessibility.js +0 -5
- package/Libraries/Components/View/ViewPropTypes.js +95 -115
- package/Libraries/Core/ReactNativeVersion.js +1 -5
- package/Libraries/Image/RCTImageLoader.mm +19 -13
- package/Libraries/Image/RCTImageView.h +0 -8
- package/Libraries/Text/Text.js +0 -6
- 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 -2
- package/React/Base/RCTTouchHandler.m +2 -1
- package/React/Base/RCTUIKit.h +70 -2
- package/React/Base/RCTVersion.m +1 -5
- package/React/Base/macOS/RCTUIKit.m +51 -2
- package/React/CoreModules/RCTAlertManager.mm +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 +1 -1
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +6 -6
- 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/SafeAreaView/RCTSafeAreaViewComponentView.mm +10 -0
- 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 +16 -0
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +6 -4
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +65 -27
- 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 +21 -0
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +37 -3
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +5 -3
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +14 -2
- 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 +28 -18
- 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/RCTComponentViewProtocol.h +3 -3
- 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 +12 -9
- package/React/Fabric/Mounting/RCTMountingManagerDelegate.h +1 -1
- package/React/Fabric/Mounting/RCTMountingTransactionObserving.h +1 -1
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +5 -5
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +5 -5
- package/React/Fabric/RCTConversions.h +8 -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 +2 -2
- package/React/Fabric/RCTSurfacePresenter.mm +5 -5
- 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 +2 -0
- package/React/Fabric/Utils/RCTGenericDelegateSplitter.h +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/RCTSwitch.h +1 -10
- package/React/Views/RCTSwitch.m +0 -20
- package/React/Views/RCTSwitchManager.m +0 -4
- 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/RCTScrollableProtocol.h +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -5
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -5
- package/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +3 -3
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +3 -3
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +3 -3
- 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/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 +7 -7
- 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/index.js +0 -11
- package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.m +1 -1
- package/package.json +4 -1
- package/template/Gemfile.lock +3 -3
- package/template/package.json +1 -1
- package/Libraries/Alert/AlertMacOS.js +0 -211
|
@@ -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/components/view/AccessibilityPrimitives.h>
|
|
11
11
|
#import <react/renderer/components/view/primitives.h>
|
|
@@ -35,26 +35,26 @@ inline std::string RCTStringFromNSString(NSString *string)
|
|
|
35
35
|
return std::string{string.UTF8String ?: ""};
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
inline
|
|
38
|
+
inline RCTUIColor *_Nullable RCTUIColorFromSharedColor(facebook::react::SharedColor const &sharedColor) // TODO(macOS GH#774)
|
|
39
39
|
{
|
|
40
40
|
if (!sharedColor) {
|
|
41
41
|
return nil;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
if (*facebook::react::clearColor() == *sharedColor) {
|
|
45
|
-
return [
|
|
45
|
+
return [RCTUIColor clearColor]; // TODO(macOS GH#774)
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
if (*facebook::react::blackColor() == *sharedColor) {
|
|
49
|
-
return [
|
|
49
|
+
return [RCTUIColor blackColor]; // TODO(macOS GH#774)
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
if (*facebook::react::whiteColor() == *sharedColor) {
|
|
53
|
-
return [
|
|
53
|
+
return [RCTUIColor whiteColor]; // TODO(macOS GH#774)
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
auto components = facebook::react::colorComponentsFromColor(sharedColor);
|
|
57
|
-
return [
|
|
57
|
+
return [RCTUIColor colorWithRed:components.red green:components.green blue:components.blue alpha:components.alpha]; // TODO(macOS GH#774)
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
inline CF_RETURNS_RETAINED CGColorRef
|
|
@@ -83,6 +83,7 @@ inline UIEdgeInsets RCTUIEdgeInsetsFromEdgeInsets(const facebook::react::EdgeIns
|
|
|
83
83
|
return {edgeInsets.top, edgeInsets.left, edgeInsets.bottom, edgeInsets.right};
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
86
87
|
UIAccessibilityTraits const AccessibilityTraitSwitch = 0x20000000000001;
|
|
87
88
|
|
|
88
89
|
inline UIAccessibilityTraits RCTUIAccessibilityTraitsFromAccessibilityTraits(
|
|
@@ -146,6 +147,7 @@ inline UIAccessibilityTraits RCTUIAccessibilityTraitsFromAccessibilityTraits(
|
|
|
146
147
|
}
|
|
147
148
|
return result;
|
|
148
149
|
};
|
|
150
|
+
#endif // TODO(macOS GH#774)
|
|
149
151
|
|
|
150
152
|
inline CATransform3D RCTCATransform3DFromTransformMatrix(const facebook::react::Transform &transformMatrix)
|
|
151
153
|
{
|
|
@@ -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/RCTPrimitives.h>
|
|
11
11
|
#import <React/RCTSurfacePresenterStub.h>
|
|
@@ -78,7 +78,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
78
78
|
/*
|
|
79
79
|
* Please do not use this, this will be deleted soon.
|
|
80
80
|
*/
|
|
81
|
-
- (nullable
|
|
81
|
+
- (nullable RCTUIView *)findComponentViewWithTag_DO_NOT_USE_DEPRECATED:(NSInteger)tag; // TODO(macOS GH#774)
|
|
82
82
|
|
|
83
83
|
@end
|
|
84
84
|
|
|
@@ -171,10 +171,10 @@ static BackgroundExecutor RCTGetBackgroundExecutor()
|
|
|
171
171
|
initialProperties:initialProperties];
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
- (
|
|
174
|
+
- (RCTUIView *)findComponentViewWithTag_DO_NOT_USE_DEPRECATED:(NSInteger)tag // TODO(macOS GH#774)
|
|
175
175
|
{
|
|
176
|
-
|
|
177
|
-
[_mountingManager.componentViewRegistry findComponentViewWithTag:tag];
|
|
176
|
+
RCTUIView<RCTComponentViewProtocol> *componentView =
|
|
177
|
+
[_mountingManager.componentViewRegistry findComponentViewWithTag:tag]; // TODO(macOS GH#774)
|
|
178
178
|
return componentView;
|
|
179
179
|
}
|
|
180
180
|
|
|
@@ -186,8 +186,8 @@ static BackgroundExecutor RCTGetBackgroundExecutor()
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
ReactTag tag = [reactTag integerValue];
|
|
189
|
-
|
|
190
|
-
[_mountingManager.componentViewRegistry findComponentViewWithTag:tag];
|
|
189
|
+
RCTUIView<RCTComponentViewProtocol> *componentView =
|
|
190
|
+
[_mountingManager.componentViewRegistry findComponentViewWithTag:tag]; // TODO(macOS GH#774)
|
|
191
191
|
if (componentView == nil) {
|
|
192
192
|
return NO; // This view probably isn't managed by Fabric
|
|
193
193
|
}
|
|
@@ -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
|
NS_ASSUME_NONNULL_BEGIN
|
|
11
11
|
|
|
@@ -15,8 +15,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
15
15
|
* Attaches (and detaches) a view to the touch handler.
|
|
16
16
|
* The receiver does not retain the provided view.
|
|
17
17
|
*/
|
|
18
|
-
- (void)attachToView:(
|
|
19
|
-
- (void)detachFromView:(
|
|
18
|
+
- (void)attachToView:(RCTUIView *)view; // TODO(macOS GH#774)
|
|
19
|
+
- (void)detachFromView:(RCTUIView *)view; // TODO(macOS GH#774)
|
|
20
20
|
|
|
21
21
|
/*
|
|
22
22
|
* Offset of the attached view relative to the root component in points.
|
|
@@ -60,7 +60,7 @@ struct ActiveTouch {
|
|
|
60
60
|
/*
|
|
61
61
|
* A component view on which the touch was begun.
|
|
62
62
|
*/
|
|
63
|
-
__strong
|
|
63
|
+
__strong RCTUIView<RCTComponentViewProtocol> *componentView = nil; // TODO(macOS GH#774)
|
|
64
64
|
|
|
65
65
|
struct Hasher {
|
|
66
66
|
size_t operator()(const ActiveTouch &activeTouch) const
|
|
@@ -80,8 +80,8 @@ struct ActiveTouch {
|
|
|
80
80
|
static void UpdateActiveTouchWithUITouch(
|
|
81
81
|
ActiveTouch &activeTouch,
|
|
82
82
|
UITouch *uiTouch,
|
|
83
|
-
|
|
84
|
-
CGPoint rootViewOriginOffset)
|
|
83
|
+
RCTUIView *rootComponentView,
|
|
84
|
+
CGPoint rootViewOriginOffset) // TODO(macOS GH#774)
|
|
85
85
|
{
|
|
86
86
|
CGPoint offsetPoint = [uiTouch locationInView:activeTouch.componentView];
|
|
87
87
|
CGPoint screenPoint = [uiTouch locationInView:uiTouch.window];
|
|
@@ -99,12 +99,12 @@ static void UpdateActiveTouchWithUITouch(
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
static ActiveTouch CreateTouchWithUITouch(UITouch *uiTouch,
|
|
102
|
+
static ActiveTouch CreateTouchWithUITouch(UITouch *uiTouch, RCTUIView *rootComponentView, CGPoint rootViewOriginOffset) // TODO(macOS GH#774)
|
|
103
103
|
{
|
|
104
104
|
ActiveTouch activeTouch = {};
|
|
105
105
|
|
|
106
106
|
// Find closest Fabric-managed touchable view
|
|
107
|
-
|
|
107
|
+
RCTUIView *componentView = uiTouch.view; // TODO(macOS GH#774)
|
|
108
108
|
while (componentView) {
|
|
109
109
|
if ([componentView respondsToSelector:@selector(touchEventEmitterAtPoint:)]) {
|
|
110
110
|
activeTouch.eventEmitter = [(id<RCTTouchableComponentViewProtocol>)componentView
|
|
@@ -164,7 +164,7 @@ struct PointerHasher {
|
|
|
164
164
|
/*
|
|
165
165
|
* We hold the view weakly to prevent a retain cycle.
|
|
166
166
|
*/
|
|
167
|
-
__weak
|
|
167
|
+
__weak RCTUIView *_rootComponentView; // TODO(macOS GH#774)
|
|
168
168
|
IdentifierPool<11> _identifierPool;
|
|
169
169
|
}
|
|
170
170
|
|
|
@@ -187,7 +187,7 @@ struct PointerHasher {
|
|
|
187
187
|
|
|
188
188
|
RCT_NOT_IMPLEMENTED(-(instancetype)initWithTarget : (id)target action : (SEL)action)
|
|
189
189
|
|
|
190
|
-
- (void)attachToView:(
|
|
190
|
+
- (void)attachToView:(RCTUIView *)view // TODO(macOS GH#774)
|
|
191
191
|
{
|
|
192
192
|
RCTAssert(self.view == nil, @"RCTTouchHandler already has attached view.");
|
|
193
193
|
|
|
@@ -195,7 +195,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithTarget : (id)target action : (SEL)act
|
|
|
195
195
|
_rootComponentView = view;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
- (void)detachFromView:(
|
|
198
|
+
- (void)detachFromView:(RCTUIView *)view // TODO(macOS GH#774)
|
|
199
199
|
{
|
|
200
200
|
RCTAssertParam(view);
|
|
201
201
|
RCTAssert(self.view == view, @"RCTTouchHandler attached to another view.");
|
|
@@ -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
|
#import <react/renderer/components/view/TouchEventEmitter.h>
|
|
10
10
|
|
|
11
11
|
@protocol RCTTouchableComponentViewProtocol <NSObject>
|
|
@@ -66,10 +66,12 @@ using namespace facebook::react;
|
|
|
66
66
|
|
|
67
67
|
[self _updateLayoutContext];
|
|
68
68
|
|
|
69
|
+
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
69
70
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
70
71
|
selector:@selector(handleContentSizeCategoryDidChangeNotification:)
|
|
71
72
|
name:UIContentSizeCategoryDidChangeNotification
|
|
72
73
|
object:nil];
|
|
74
|
+
#endif // TODO(macOS GH#774)
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
return self;
|
|
@@ -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/RCTInvalidating.h>
|
|
11
11
|
#import <React/RCTModalHostViewManager.h>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
@protocol RCTModalHostViewInteractor;
|
|
18
18
|
|
|
19
|
-
@interface RCTModalHostView :
|
|
19
|
+
@interface RCTModalHostView : RCTUIView <RCTInvalidating, UIAdaptivePresentationControllerDelegate> // TODO(macOS GH#774)
|
|
20
20
|
|
|
21
21
|
@property (nonatomic, copy) NSString *animationType;
|
|
22
22
|
@property (nonatomic, assign) UIModalPresentationStyle presentationStyle;
|
package/React/Views/RCTSwitch.h
CHANGED
|
@@ -9,18 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
#import <React/RCTComponent.h>
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
@interface RCTSwitch : UISwitch
|
|
14
|
-
#else // [TODO(macOS GH#774)
|
|
15
|
-
@interface RCTSwitch : NSSwitch
|
|
16
|
-
#endif // ]TODO(macOS GH#774)
|
|
12
|
+
@interface RCTSwitch : RCTUISwitch
|
|
17
13
|
|
|
18
|
-
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
19
14
|
@property (nonatomic, assign) BOOL wasOn;
|
|
20
|
-
#else // [TODO(macOS GH#774)
|
|
21
|
-
@property (nonatomic, assign) BOOL on;
|
|
22
|
-
- (void)setOn:(BOOL)on animated:(BOOL)animated;
|
|
23
|
-
#endif // ]TODO(macOS GH#774)
|
|
24
15
|
@property (nonatomic, copy) RCTBubblingEventBlock onChange;
|
|
25
16
|
|
|
26
17
|
@end
|
package/React/Views/RCTSwitch.m
CHANGED
|
@@ -11,30 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
@implementation RCTSwitch
|
|
13
13
|
|
|
14
|
-
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
15
14
|
- (void)setOn:(BOOL)on animated:(BOOL)animated
|
|
16
15
|
{
|
|
17
16
|
_wasOn = on;
|
|
18
17
|
[super setOn:on animated:animated];
|
|
19
18
|
}
|
|
20
|
-
#else // [TODO(macOS GH#774)
|
|
21
|
-
- (void)setOn:(BOOL)on animated:(BOOL)animated {
|
|
22
|
-
self.state = on ? NSControlStateValueOn : NSControlStateValueOff;
|
|
23
|
-
}
|
|
24
|
-
#endif // ]TODO(macOS GH#774)
|
|
25
|
-
|
|
26
|
-
#if TARGET_OS_OSX
|
|
27
|
-
|
|
28
|
-
- (BOOL)on
|
|
29
|
-
{
|
|
30
|
-
return self.state == NSControlStateValueOn;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
- (void)setOn:(BOOL)on
|
|
34
|
-
{
|
|
35
|
-
self.state = on ? NSControlStateValueOn : NSControlStateValueOff;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
#endif // ]TODO(macOS GH#774)
|
|
39
19
|
|
|
40
20
|
@end
|
|
@@ -30,16 +30,12 @@ RCT_EXPORT_MODULE()
|
|
|
30
30
|
|
|
31
31
|
- (void)onChange:(RCTSwitch *)sender
|
|
32
32
|
{
|
|
33
|
-
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
34
33
|
if (sender.wasOn != sender.on) {
|
|
35
34
|
if (sender.onChange) {
|
|
36
35
|
sender.onChange(@{@"value" : @(sender.on)});
|
|
37
36
|
}
|
|
38
37
|
sender.wasOn = sender.on;
|
|
39
38
|
}
|
|
40
|
-
#else // [TODO(macOS GH#774)
|
|
41
|
-
sender.onChange(@{ @"value": @(sender.on) });
|
|
42
|
-
#endif // ]TODO(macOS GH#774)
|
|
43
39
|
}
|
|
44
40
|
|
|
45
41
|
RCT_EXPORT_METHOD(setValue : (nonnull NSNumber *)viewTag toValue : (BOOL)value)
|
|
@@ -5,12 +5,12 @@
|
|
|
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
|
@class RCTWrapperViewController;
|
|
11
11
|
|
|
12
12
|
@interface RCTWrapperViewController : UIViewController
|
|
13
13
|
|
|
14
|
-
- (instancetype)initWithContentView:(
|
|
14
|
+
- (instancetype)initWithContentView:(RCTUIView *)contentView NS_DESIGNATED_INITIALIZER; // TODO(macOS GH#774)
|
|
15
15
|
|
|
16
16
|
@end
|
|
@@ -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/RCTComponent.h>
|
|
11
11
|
#import <React/RCTScrollableProtocol.h>
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
|
|
15
15
|
@property (nonatomic, copy) NSString *title;
|
|
16
16
|
@property (nonatomic, copy) RCTDirectEventBlock onRefresh;
|
|
17
|
-
@property (nonatomic, weak)
|
|
17
|
+
@property (nonatomic, weak) RCTUIScrollView *scrollView; // TODO(macOS GH#774)
|
|
18
18
|
|
|
19
19
|
@end
|
package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java
CHANGED
|
@@ -13,14 +13,10 @@ import com.facebook.react.common.MapBuilder;
|
|
|
13
13
|
|
|
14
14
|
import java.util.Map;
|
|
15
15
|
|
|
16
|
-
// [TODO(macOS GH#944)
|
|
17
|
-
// Note: Be careful not to override these version numbers
|
|
18
|
-
// when we merge upstream stable branches into main
|
|
19
|
-
// TODO(macOS GH#944)]
|
|
20
16
|
public class ReactNativeVersion {
|
|
21
17
|
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
|
|
22
18
|
"major", 0,
|
|
23
19
|
"minor", 0,
|
|
24
20
|
"patch", 0,
|
|
25
|
-
"prerelease", "
|
|
21
|
+
"prerelease", "d7b689f90");
|
|
26
22
|
}
|
|
@@ -14,15 +14,11 @@
|
|
|
14
14
|
|
|
15
15
|
namespace facebook::react {
|
|
16
16
|
|
|
17
|
-
// [TODO(macOS GH#944)
|
|
18
|
-
// Note: Be careful not to override these version numbers
|
|
19
|
-
// when we merge upstream stable branches into main
|
|
20
|
-
// TODO(macOS GH#944)]
|
|
21
17
|
constexpr struct {
|
|
22
18
|
int32_t Major = 0;
|
|
23
19
|
int32_t Minor = 0;
|
|
24
20
|
int32_t Patch = 0;
|
|
25
|
-
std::string_view Prerelease = "
|
|
21
|
+
std::string_view Prerelease = "d7b689f90";
|
|
26
22
|
} ReactNativeVersion;
|
|
27
23
|
|
|
28
24
|
} // namespace facebook::react
|
|
@@ -2107,9 +2107,9 @@ decimal.js@^10.2.1:
|
|
|
2107
2107
|
integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==
|
|
2108
2108
|
|
|
2109
2109
|
decode-uri-component@^0.2.0:
|
|
2110
|
-
version "0.2.
|
|
2111
|
-
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.
|
|
2112
|
-
integrity
|
|
2110
|
+
version "0.2.2"
|
|
2111
|
+
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
|
|
2112
|
+
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==
|
|
2113
2113
|
|
|
2114
2114
|
deep-is@~0.1.3:
|
|
2115
2115
|
version "0.1.4"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
#import <Foundation/Foundation.h>
|
|
9
|
-
#import <
|
|
9
|
+
#import <React/RCTUIKit.h> // TODO(macOS GH#774)
|
|
10
10
|
#include <folly/dynamic.h>
|
|
11
11
|
|
|
12
12
|
NS_ASSUME_NONNULL_BEGIN
|
|
@@ -20,13 +20,13 @@ typedef void (^InterceptorBlock)(std::string eventName, folly::dynamic event);
|
|
|
20
20
|
|
|
21
21
|
- (instancetype)initWithComponentData:(RCTComponentData *)componentData bridge:(RCTBridge *)bridge;
|
|
22
22
|
|
|
23
|
-
- (
|
|
23
|
+
- (RCTUIView *)createPaperViewWithTag:(NSInteger)tag; // TODO(macOS GH#774)
|
|
24
24
|
|
|
25
25
|
- (void)addObserveForTag:(NSInteger)tag usingBlock:(InterceptorBlock)block;
|
|
26
26
|
|
|
27
27
|
- (void)removeObserveForTag:(NSInteger)tag;
|
|
28
28
|
|
|
29
|
-
- (void)setProps:(folly::dynamic const &)props forView:(
|
|
29
|
+
- (void)setProps:(folly::dynamic const &)props forView:(RCTUIView *)view; // TODO(macOS GH#774)
|
|
30
30
|
|
|
31
31
|
- (NSString *)componentViewName;
|
|
32
32
|
|
|
@@ -71,9 +71,9 @@ using namespace facebook::react;
|
|
|
71
71
|
[_eventInterceptors removeObjectForKey:[NSNumber numberWithInteger:tag]];
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
- (
|
|
74
|
+
- (RCTUIView *)createPaperViewWithTag:(NSInteger)tag; // TODO(macOS GH#774)
|
|
75
75
|
{
|
|
76
|
-
|
|
76
|
+
RCTUIView *view = [_componentData createViewWithTag:[NSNumber numberWithInteger:tag] rootTag:NULL]; // TODO(macOS GH#774)
|
|
77
77
|
if ([_componentData.bridgelessViewManager conformsToProtocol:@protocol(RCTWeakViewHolder)]) {
|
|
78
78
|
id<RCTWeakViewHolder> weakViewHolder = (id<RCTWeakViewHolder>)_componentData.bridgelessViewManager;
|
|
79
79
|
if (!weakViewHolder.weakViews) {
|
|
@@ -84,7 +84,7 @@ using namespace facebook::react;
|
|
|
84
84
|
return view;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
- (void)setProps:(folly::dynamic const &)props forView:(
|
|
87
|
+
- (void)setProps:(folly::dynamic const &)props forView:(RCTUIView *)view // TODO(macOS GH#774)
|
|
88
88
|
{
|
|
89
89
|
if (props.isObject()) {
|
|
90
90
|
NSDictionary<NSString *, id> *convertedProps = convertFollyDynamicToId(props);
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
#import <Foundation/Foundation.h>
|
|
11
11
|
#import <React/RCTUtils.h>
|
|
12
|
-
#import <
|
|
12
|
+
#import <React/RCTUIKit.h> // TODO(macOS GH#774)
|
|
13
13
|
|
|
14
14
|
#include <string>
|
|
15
15
|
|
|
@@ -131,7 +131,7 @@ static NSDictionary<NSString *, NSDictionary *> *_PlatformColorSelectorsDict()
|
|
|
131
131
|
return dict;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
static
|
|
134
|
+
static RCTUIColor *_UIColorFromHexValue(NSNumber *hexValue) // TODO(macOS GH#774)
|
|
135
135
|
{
|
|
136
136
|
NSUInteger hexIntValue = [hexValue unsignedIntegerValue];
|
|
137
137
|
|
|
@@ -140,10 +140,10 @@ static UIColor *_UIColorFromHexValue(NSNumber *hexValue)
|
|
|
140
140
|
CGFloat blue = ((CGFloat)((hexIntValue & 0xFF00) >> 8)) / 255.0;
|
|
141
141
|
CGFloat alpha = ((CGFloat)(hexIntValue & 0xFF)) / 255.0;
|
|
142
142
|
|
|
143
|
-
return [
|
|
143
|
+
return [RCTUIColor colorWithRed:red green:green blue:blue alpha:alpha]; // TODO(macOS GH#774)
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
static
|
|
146
|
+
static RCTUIColor *_Nullable _UIColorFromSemanticString(NSString *semanticString) // TODO(macOS GH#774)
|
|
147
147
|
{
|
|
148
148
|
NSString *platformColorString = [semanticString hasSuffix:kColorSuffix]
|
|
149
149
|
? [semanticString substringToIndex:[semanticString length] - [kColorSuffix length]]
|
|
@@ -152,17 +152,17 @@ static UIColor *_Nullable _UIColorFromSemanticString(NSString *semanticString)
|
|
|
152
152
|
NSDictionary<NSString *, id> *colorInfo = platformColorSelectorsDict[platformColorString];
|
|
153
153
|
if (colorInfo) {
|
|
154
154
|
SEL objcColorSelector = NSSelectorFromString([platformColorString stringByAppendingString:kColorSuffix]);
|
|
155
|
-
if (![
|
|
155
|
+
if (![RCTUIColor respondsToSelector:objcColorSelector]) { // TODO(macOS GH#774)
|
|
156
156
|
NSNumber *fallbackRGB = colorInfo[kFallbackARGBKey];
|
|
157
157
|
if (fallbackRGB) {
|
|
158
158
|
return _UIColorFromHexValue(fallbackRGB);
|
|
159
159
|
}
|
|
160
160
|
} else {
|
|
161
|
-
Class uiColorClass = [
|
|
161
|
+
Class uiColorClass = [RCTUIColor class]; // TODO(macOS GH#774)
|
|
162
162
|
IMP imp = [uiColorClass methodForSelector:objcColorSelector];
|
|
163
163
|
id (*getUIColor)(id, SEL) = ((id(*)(id, SEL))imp);
|
|
164
164
|
id colorObject = getUIColor(uiColorClass, objcColorSelector);
|
|
165
|
-
if ([colorObject isKindOfClass:[
|
|
165
|
+
if ([colorObject isKindOfClass:[RCTUIColor class]]) { // TODO(macOS GH#774)
|
|
166
166
|
return colorObject;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
@@ -177,7 +177,7 @@ static inline NSString *_NSStringFromCString(
|
|
|
177
177
|
return [NSString stringWithCString:string.c_str() encoding:encoding];
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
static inline facebook::react::ColorComponents _ColorComponentsFromUIColor(
|
|
180
|
+
static inline facebook::react::ColorComponents _ColorComponentsFromUIColor(RCTUIColor *color) // TODO(macOS GH#774)
|
|
181
181
|
{
|
|
182
182
|
CGFloat rgba[4];
|
|
183
183
|
RCTGetRGBAColorComponents(color.CGColor, rgba);
|
|
@@ -188,7 +188,7 @@ facebook::react::ColorComponents RCTPlatformColorComponentsFromSemanticItems(std
|
|
|
188
188
|
{
|
|
189
189
|
for (const auto &semanticCString : semanticItems) {
|
|
190
190
|
NSString *semanticNSString = _NSStringFromCString(semanticCString);
|
|
191
|
-
|
|
191
|
+
RCTUIColor *uiColor = [RCTUIColor colorNamed:semanticNSString]; // TODO(macOS GH#774)
|
|
192
192
|
if (uiColor != nil) {
|
|
193
193
|
return _ColorComponentsFromUIColor(uiColor);
|
|
194
194
|
}
|