first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface RCTSwiftUIContainerViewWrapper : NSObject
- (UIView *_Nullable)contentView;
- (void)updateBlurRadius:(NSNumber *)radius;
- (void)updateGrayscale:(NSNumber *)grayscale;
- (void)updateDropShadow:(NSNumber *)standardDeviation x:(NSNumber *)x y:(NSNumber *)y color:(UIColor *)color;
- (void)updateSaturation:(NSNumber *)saturation;
- (void)updateContrast:(NSNumber *)contrast;
- (void)updateHueRotate:(NSNumber *)degrees;
- (void)updateContentView:(UIView *)view;
- (UIView *_Nullable)hostingView;
- (void)resetStyles;
- (void)updateLayoutWithBounds:(CGRect)bounds;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,81 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import "RCTSwiftUIContainerViewWrapper.h"
@import RCTSwiftUI;
@interface RCTSwiftUIContainerViewWrapper ()
@property (nonatomic, strong) RCTSwiftUIContainerView *swiftContainerView;
@end
@implementation RCTSwiftUIContainerViewWrapper
- (instancetype)init
{
if (self = [super init]) {
_swiftContainerView = [RCTSwiftUIContainerView new];
}
return self;
}
- (UIView *_Nullable)contentView
{
return [self.swiftContainerView contentView];
}
- (UIView *_Nullable)hostingView
{
return [self.swiftContainerView hostingView];
}
- (void)resetStyles
{
[self.swiftContainerView resetStyles];
}
- (void)updateContentView:(UIView *)view
{
return [self.swiftContainerView updateContentView:view];
}
- (void)updateBlurRadius:(NSNumber *)radius
{
[self.swiftContainerView updateBlurRadius:radius];
}
- (void)updateGrayscale:(NSNumber *)grayscale
{
[self.swiftContainerView updateGrayscale:grayscale];
}
- (void)updateSaturation:(NSNumber *)saturation
{
[self.swiftContainerView updateSaturation:saturation];
}
- (void)updateContrast:(NSNumber *)contrast
{
[self.swiftContainerView updateContrast:contrast];
}
- (void)updateHueRotate:(NSNumber *)degrees
{
[self.swiftContainerView updateHueRotate:degrees];
}
- (void)updateDropShadow:(NSNumber *)standardDeviation x:(NSNumber *)x y:(NSNumber *)y color:(UIColor *)color
{
[self.swiftContainerView updateDropShadowWithStandardDeviation:standardDeviation x:x y:y color:color];
}
- (void)updateLayoutWithBounds:(CGRect)bounds
{
[self.swiftContainerView updateLayoutWithBounds:bounds];
}
@end

View File

@@ -0,0 +1,38 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
require "json"
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
version = package['version']
source = { :git => 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which we're presumably in.
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
else
source[:tag] = "v#{version}"
end
Pod::Spec.new do |s|
s.name = "RCTSwiftUIWrapper"
s.version = version
s.summary = "Swift utilities for React Native."
s.homepage = "https://reactnative.dev/"
s.license = package["license"]
s.author = "Meta Platforms, Inc. and its affiliates"
s.platforms = min_supported_versions
s.source = source
s.source_files = "*.{h,m}"
s.public_header_files = "*.h"
s.module_name = "RCTSwiftUIWrapper"
s.header_dir = "RCTSwiftUIWrapper"
s.dependency "RCTSwiftUI"
s.pod_target_xcconfig = {
"SWIFT_VERSION" => "5.0",
}
end