Skip to content

Commit

Permalink
🛠 Refactor: Update Imports
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed May 22, 2023
1 parent 99cd472 commit b6ff2dd
Show file tree
Hide file tree
Showing 85 changed files with 96 additions and 92 deletions.
2 changes: 1 addition & 1 deletion ios/src_library/Extensions+Init/CGSize+Init.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/28/23.
//

import Foundation
import UIKit

public extension CGSize {
init?(fromDict dict: NSDictionary){
Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/Extensions+Init/UIBlurEffect+Init.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 3/23/23.
//

import Foundation
import UIKit

extension UIBlurEffect.Style: CaseIterable, CustomStringConvertible {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 3/24/23.
//

import Foundation
import UIKit

extension UIModalPresentationStyle: CaseIterable, CustomStringConvertible {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/21/23.
//

import Foundation
import UIKit


@available(iOS 15.0, *)
Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/Extensions/CAAnimation+Block.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 5/1/23.
//

import Foundation
import UIKit


public class CAAnimationBlockDelegate: NSObject, CAAnimationDelegate {
Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/Extensions/CAAnimation+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 5/1/23.
//

import Foundation
import UIKit

public extension CAAnimation {
func waitUntiEnd(_ block: @escaping () -> Void){
Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/Extensions/CGRect+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 5/19/23.
//

import Foundation
import UIKit

extension CGRect {
mutating func setPoint(
Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/Extensions/Collection+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/10/23.
//

import Foundation
import UIKit

extension Collection {

Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/Extensions/Encodable+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 5/2/23.
//

import Foundation
import UIKit


public extension Encodable {
Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/Extensions/FloatingPoint+Clamping.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 5/19/23.
//

import Foundation
import UIKit

extension FloatingPoint {
public func clamped(min lowerBound: Self?, max upperBound: Self?) -> Self {
Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/Extensions/KeyWindow+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 6/26/20.
//

import Foundation
import UIKit

extension UIWindow {

Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/Extensions/RNIUtilities+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/27/23.
//

import Foundation
import UIKit

/// TODO:2023-03-20-21-29-36 - Move to `RNIUtilities`
extension RNIUtilities {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/22/23.
//

import Foundation
import UIKit

extension UIGestureRecognizer.State: CustomStringConvertible {
public var description: String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 6/29/20.
//

import Foundation
import UIKit

extension UIModalTransitionStyle: CaseIterable {
public static var allCases: [UIModalTransitionStyle] {
Expand Down
1 change: 1 addition & 0 deletions ios/src_library/Extensions/UIView+Helpers.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import UIKit

/// TODO:2023-03-24-01-14-26 - Move `UIView+Helpers` extension to
/// `react-native-utilities`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/11/23.
//

import Foundation
import UIKit

extension UIViewController {

Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/Extensions/UIWindow+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 3/30/23.
//

import Foundation
import UIKit

extension UIWindow: RNIObjectMetadata, RNIIdentifiable {
public static var synthesizedIdPrefix = "window-id-";
Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/Helpers+Utilities/CGSize+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/29/23.
//

import Foundation
import UIKit

public extension CGSize {
var isZero: Bool {
Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/Helpers+Utilities/WeakElement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 8/15/20.
//

import Foundation
import UIKit


public class WeakElement<Element: AnyObject> {
Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/React Native/RNIAnimator/RNIAnimator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/19/23.
//

import Foundation
import UIKit


public class RNIAnimator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/19/23.
//

import Foundation
import UIKit

fileprivate extension CGSize {
init(array: [CGFloat]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/28/23.
//

import Foundation
import UIKit

public struct RNIComputableOffset {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/26/23.
//

import Foundation
import UIKit

public struct RNIComputableSize {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/28/23.
//

import Foundation
import UIKit

public enum RNIComputableSizeMode {
case current;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 5/19/23.
//

import Foundation
import UIKit

public struct RNIComputableValue {

Expand All @@ -23,7 +23,6 @@ public struct RNIComputableValue {
// MARK: - Internal Functions
// --------------------------


func valueWithOffsets(forValue value: CGFloat) -> CGFloat {
return self.offset?.compute(withValue: value) ?? value;
};
Expand Down Expand Up @@ -69,6 +68,18 @@ public struct RNIComputableValue {
let clampedValue = self.valueWithClamp(forValue: rawValue);
return self.valueWithOffsets(forValue: clampedValue);
};

public init(
mode: RNIComputableValueMode,
offset: RNIComputableOffset? = nil,
minValue: CGFloat? = nil,
maxValue: CGFloat? = nil
) {
self.mode = mode;
self.offset = offset;
self.minValue = minValue;
self.maxValue = maxValue;
};
};

extension RNIComputableValue {
Expand All @@ -93,13 +104,7 @@ extension RNIComputableValue {
Self.getDoubleValue(forDict: dict, withKey: "maxValue");
};

public init(mode: RNIComputableValueMode){
self.mode = mode;

self.offset = nil;
self.minValue = nil;
self.maxValue = nil;
};


static private func getDoubleValue(
forDict dict: NSDictionary,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 5/19/23.
//

import Foundation
import UIKit


public enum RNIComputableValueMode {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/27/23.
//

import Foundation
import UIKit


public final class RNIViewMetadata: RNIDictionarySynthesizable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 5/3/23.
//

import Foundation
import UIKit

public protocol RNIDictionaryRepresentable {
var asDictionary: [String: Any] { get };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/27/23.
//

import Foundation
import UIKit

extension RNIDictionarySynthesizable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 3/26/23.
//

import Foundation
import UIKit

/// Any type that conforms to this protocol will be able to create a dictionary
/// representing the keys and values inside that type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 5/12/23.
//

import Foundation
import UIKit

extension RNIBaseError {

Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/React Native/RNIError/RNIBaseError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 9/11/21.
//

import Foundation
import UIKit

/// TODO - Move to `react-native-ios-utilities`
/// * Replace older impl. of `RNIError` with this version
Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/React Native/RNIError/RNIError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 5/12/23.
//

import Foundation
import UIKit

public typealias RNIError =
RNIBaseError & RNIDictionarySynthesizable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 8/28/22.
//

import Foundation
import UIKit

public protocol RNIErrorCodeDefaultable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 5/12/23.
//

import Foundation
import UIKit

public protocol RNIErrorCodeSynthesizable {
var errorCode: Int? { get };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 5/12/23.
//

import Foundation
import UIKit


enum RNIGenericErrorCode:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/27/23.
//

import Foundation
import UIKit

extension RNIIdentifiable {
public static var synthesizedIdPrefix: String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 3/31/23.
//

import Foundation
import UIKit

public protocol RNIIdentifiable:
AnyObject, RNIObjectMetadata where T == RNIObjectIdentifier {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 4/27/23.
//

import Foundation
import UIKit

fileprivate class Counter {
static var typeToCounterMap: Dictionary<String, Int> = [:];
Expand Down
2 changes: 1 addition & 1 deletion ios/src_library/React Native/RNILayout/RNILayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominic Go on 5/19/23.
//

import Foundation
import UIKit

public struct RNILayout {

Expand Down
Loading

0 comments on commit b6ff2dd

Please sign in to comment.