Skip to content

Commit 4f75999

Browse files
authored
[#662] 공용 UI 요소를 Shared 모듈로 분리한다 (#674)
* chore: PresentationShared 하위 모듈 추가 * chore: Presentation 공용 타입을 PresentationShared로 이동 * docs: Tuist 의존성 그래프 갱신
1 parent b09bf0b commit 4f75999

19 files changed

Lines changed: 41 additions & 12 deletions

Application/Presentation/Project.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ let project = Project.devlogFramework(
1111
dependencies: [
1212
.project(target: "Domain", path: "../Domain"),
1313
.project(target: "Core", path: "../Core"),
14+
.project(target: "PresentationShared", path: "Shared"),
1415
] + DevLogPackages.presentationPackageDependencies,
1516
hasTests: true
1617
)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import ProjectDescription
2+
import ProjectDescriptionHelpers
3+
4+
let project = Project.devlogFramework(
5+
name: "PresentationShared",
6+
bundleId: "com.opfic.DevLog.PresentationShared",
7+
versionXcconfigPath: "../../Shared/Version.xcconfig",
8+
frameworkInfoPlistPath: "../../Shared/InfoPlists/Framework-Info.plist",
9+
testsInfoPlistPath: "../../Shared/InfoPlists/UnitTests-Info.plist",
10+
packages: DevLogPackages.defaultPackages,
11+
hasTests: false
12+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
parent_config: ../../../../.swiftlint.yml

Application/Presentation/Sources/Common/Component/LoadingView.swift renamed to Application/Presentation/Shared/Sources/Common/Component/LoadingView.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
//
22
// LoadingView.swift
3-
// Presentation
3+
// PresentationShared
44
//
55
// Created by opfic on 5/16/25.
66
//
77

88
import SwiftUI
9-
import Domain
109

11-
struct LoadingView: View {
12-
var body: some View {
10+
public struct LoadingView: View {
11+
public init() {}
12+
13+
public var body: some View {
1314
ZStack {
1415
Color.gray.opacity(0.001).ignoresSafeArea()
1516
ProgressView()

Application/Presentation/Sources/Common/NavigationRouter.swift renamed to Application/Presentation/Shared/Sources/Common/NavigationRouter.swift

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
//
22
// NavigationRouter.swift
3-
// Presentation
3+
// PresentationShared
44
//
55
// Created by 최윤진 on 1/1/26.
66
//
77

88
import SwiftUI
9-
import Domain
109

1110
@Observable
12-
final class NavigationRouter<Route: Hashable> {
13-
var path: [Route] = []
11+
public final class NavigationRouter<Route: Hashable> {
12+
public var path: [Route] = []
1413

15-
var root: Route? {
14+
public var root: Route? {
1615
path.first
1716
}
1817

19-
var detailPath: [Route] {
18+
public var detailPath: [Route] {
2019
get {
2120
Array(path.dropFirst())
2221
}
@@ -29,11 +28,13 @@ final class NavigationRouter<Route: Hashable> {
2928
}
3029
}
3130

32-
func replace(with route: Route) {
31+
public init() {}
32+
33+
public func replace(with route: Route) {
3334
path = [route]
3435
}
3536

36-
func push(_ route: Route) {
37+
public func push(_ route: Route) {
3738
path.append(route)
3839
}
3940
}

Application/Presentation/Sources/Home/Home/HomeView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import SwiftUI
99
import ComposableArchitecture
1010
import Domain
11+
import PresentationShared
1112

1213
struct HomeView: View {
1314
@Environment(\.openWindow) private var openWindow

Application/Presentation/Sources/Home/Home/HomeViewCoordinator.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import ComposableArchitecture
1010
import Foundation
1111
import Core
1212
import Domain
13+
import PresentationShared
1314

1415
@MainActor
1516
@Observable

Application/Presentation/Sources/Main/MainView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import SwiftUI
99
import ComposableArchitecture
1010
import Core
1111
import Domain
12+
import PresentationShared
1213

1314
struct MainView: View {
1415
@Environment(\.horizontalSizeClass) private var horizontalSizeClass

Application/Presentation/Sources/Profile/ProfileView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import SwiftUI
1010
import ComposableArchitecture
1111
import Core
1212
import Domain
13+
import PresentationShared
1314

1415
struct ProfileView: View {
1516
@Bindable var store: StoreOf<ProfileFeature>

Application/Presentation/Sources/Profile/ProfileViewCoordinator.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Foundation
99
import ComposableArchitecture
1010
import Core
1111
import Domain
12+
import PresentationShared
1213

1314
@MainActor
1415
@Observable

0 commit comments

Comments
 (0)