-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
94 additions
and
49 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
32 changes: 32 additions & 0 deletions
32
Modules/Capabilities/DesignSystem/Sources/Extensions/ViewExtensions.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Created by Geoff Pado on 5/13/24. | ||
// Copyright © 2024 Cocoatype, LLC. All rights reserved. | ||
|
||
import Combine | ||
import SwiftUI | ||
|
||
public extension View { | ||
func onAppReceive<P>(_ publisher: P, perform action: @escaping (P.Output) -> Void) -> some View where P: Publisher, P.Failure == Never { | ||
let isPreview: Bool | ||
#if DEBUG | ||
isPreview = ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1" | ||
#else | ||
isPreview = false | ||
#endif | ||
|
||
if isPreview { | ||
return self.onReceive(publisher, perform: { _ in }) | ||
} else { | ||
return self.onReceive(publisher, perform: action) | ||
} | ||
} | ||
|
||
func fill() -> some View { | ||
return self.modifier(FillViewModifier()) | ||
} | ||
} | ||
|
||
struct FillViewModifier: ViewModifier { | ||
func body(content: Content) -> some View { | ||
AnyView(content).frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity, alignment: .center) | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
Modules/Capabilities/DesignSystem/Sources/ReadableWidthKey.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Created by Geoff Pado on 5/13/24. | ||
// Copyright © 2024 Cocoatype, LLC. All rights reserved. | ||
|
||
import SwiftUI | ||
|
||
struct ReadableWidthKey: EnvironmentKey { | ||
static let defaultValue = CGFloat.zero | ||
} | ||
|
||
public extension EnvironmentValues { | ||
var readableWidth: CGFloat { | ||
get { self[ReadableWidthKey.self] } | ||
set { self[ReadableWidthKey.self] = newValue } | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
7 changes: 5 additions & 2 deletions
7
...ase Marketing/PurchaseMarketingView.swift → ...eting/Sources/PurchaseMarketingView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
.../PurchaseMarketingTopBarSubheadline.swift → .../PurchaseMarketingTopBarSubheadline.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
1 change: 1 addition & 0 deletions
1
Modules/Capabilities/PurchaseMarketing/Tests/PurchaseMarketingTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// blank |
14 changes: 2 additions & 12 deletions
14
...Sources/Application/EnvironmentKeys.swift → ...g/Sources/PurchaseStatePublisherKey.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Modules/Legacy/Core/Sources/Settings/Desktop/DesktopSettingsView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Modules/Legacy/Core/Sources/Settings/Purchase Item/PurchaseSubtitle.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
Tuist/ProjectDescriptionHelpers/Targets/PurchaseMarketing.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import ProjectDescription | ||
|
||
public enum PurchaseMarketing { | ||
public static let target = Target.capabilitiesTarget(name: "PurchaseMarketing", dependencies: [ | ||
.target(DesignSystem.target), | ||
.target(Purchasing.target), | ||
]) | ||
|
||
public static let testTarget = Target.capabilitiesTestTarget(name: "PurchaseMarketing") | ||
} |