File tree 16 files changed +75
-59
lines changed
SlideKitDemo-iOS/SlideKitDemo-iOS.xcodeproj
SlideKitDemo-macOS.xcodeproj
16 files changed +75
-59
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "originHash" : "03685eda65c15da75dbc8741acf2f1e3229945f0308344acd05d8ef6aba454d9",
3
+ "pins" : [
4
+ {
5
+ "identity" : "splash",
6
+ "kind" : "remoteSourceControl",
7
+ "location" : "https://github.com/JohnSundell/Splash",
8
+ "state" : {
9
+ "revision" : "7f4df436eb78fe64fe2c32c58006e9949fa28ad8",
10
+ "version" : "0.16.0"
11
+ }
12
+ },
13
+ {
14
+ "identity" : "swift-docc-plugin",
15
+ "kind" : "remoteSourceControl",
16
+ "location" : "https://github.com/apple/swift-docc-plugin",
17
+ "state" : {
18
+ "revision" : "26ac5758409154cc448d7ab82389c520fa8a8247",
19
+ "version" : "1.3.0"
20
+ }
21
+ },
22
+ {
23
+ "identity" : "swift-docc-symbolkit",
24
+ "kind" : "remoteSourceControl",
25
+ "location" : "https://github.com/apple/swift-docc-symbolkit",
26
+ "state" : {
27
+ "revision" : "b45d1f2ed151d057b54504d653e0da5552844e34",
28
+ "version" : "1.0.0"
29
+ }
30
+ },
31
+ {
32
+ "identity" : "swift-syntax",
33
+ "kind" : "remoteSourceControl",
34
+ "location" : "https://github.com/apple/swift-syntax.git",
35
+ "state" : {
36
+ "revision" : "64889f0c732f210a935a0ad7cda38f77f876262d",
37
+ "version" : "509.1.1"
38
+ }
39
+ }
40
+ ],
41
+ "version" : 3
42
+ }
Original file line number Diff line number Diff line change 32
32
"kind" : "remoteSourceControl",
33
33
"location" : "https://github.com/apple/swift-syntax.git",
34
34
"state" : {
35
- "revision" : "67c5007099d9ffdd292f421f81f4efe5ee42963e ",
36
- "version" : "509.0.0-swift-DEVELOPMENT-SNAPSHOT-2023-07-10-a "
35
+ "revision" : "64889f0c732f210a935a0ad7cda38f77f876262d ",
36
+ "version" : "509.1.1 "
37
37
}
38
38
}
39
39
],
Original file line number Diff line number Diff line change 1
- // swift-tools-version: 5.9
1
+ // swift-tools-version: 6.0
2
2
// The swift-tools-version declares the minimum version of Swift required to build this package.
3
3
4
4
import PackageDescription
Original file line number Diff line number Diff line change 11
11
![ Slides] ( https://user-images.githubusercontent.com/12427733/190956930-ea9ce4d0-0a19-4bb3-b43b-28dd2d73374a.png )
12
12
13
13
## Requirements
14
- - Xcode 15+
15
- - Swift 5.9
14
+ - Swift 6.0
16
15
17
16
## Documents
18
17
First, see the [ Tutorial for SlideKit] ( https://mtj0928.github.io/SlideKit/tutorials/meet-slidekit ) .
Original file line number Diff line number Diff line change 318
318
PRODUCT_BUNDLE_IDENTIFIER = "net.matsuji.SlideKitDemo-iOS";
319
319
PRODUCT_NAME = "$(TARGET_NAME)";
320
320
SWIFT_EMIT_LOC_STRINGS = YES;
321
- SWIFT_VERSION = 5 .0;
321
+ SWIFT_VERSION = 6 .0;
322
322
TARGETED_DEVICE_FAMILY = "1,2";
323
323
};
324
324
name = Debug;
347
347
PRODUCT_BUNDLE_IDENTIFIER = "net.matsuji.SlideKitDemo-iOS";
348
348
PRODUCT_NAME = "$(TARGET_NAME)";
349
349
SWIFT_EMIT_LOC_STRINGS = YES;
350
- SWIFT_VERSION = 5 .0;
350
+ SWIFT_VERSION = 6 .0;
351
351
TARGETED_DEVICE_FAMILY = "1,2";
352
352
};
353
353
name = Release;
Original file line number Diff line number Diff line change 316
316
PRODUCT_BUNDLE_IDENTIFIER = "net.matsuji.SlideKitDemo-macOS";
317
317
PRODUCT_NAME = "$(TARGET_NAME)";
318
318
SWIFT_EMIT_LOC_STRINGS = YES;
319
- SWIFT_VERSION = 5 .0;
319
+ SWIFT_VERSION = 6 .0;
320
320
};
321
321
name = Debug;
322
322
};
345
345
PRODUCT_BUNDLE_IDENTIFIER = "net.matsuji.SlideKitDemo-macOS";
346
346
PRODUCT_NAME = "$(TARGET_NAME)";
347
347
SWIFT_EMIT_LOC_STRINGS = YES;
348
- SWIFT_VERSION = 5 .0;
348
+ SWIFT_VERSION = 6 .0;
349
349
};
350
350
name = Release;
351
351
};
Original file line number Diff line number Diff line change 1
- //
2
- // SlideConfiguration.swift
3
- //
4
- // Created by Junnosuke Matsumoto on 2022/08/26.
5
- //
6
-
7
1
import SwiftUI
8
2
import SlideKit
9
3
4
+ @MainActor
10
5
struct SlideConfiguration {
11
6
12
7
/// Edit the slide size.
Original file line number Diff line number Diff line change 1
- //
2
- // EnvironmentValues+ExternalDisplayManager.swift
3
- //
4
- //
5
- // Created by Junnosuke Matsumoto on 2022/08/24.
6
- //
7
-
8
1
#if os(iOS)
9
2
import SwiftUI
10
3
Original file line number Diff line number Diff line change 1
- //
2
- // EnvironmentValues+ObservableObjectContainer.swift
3
- //
4
- //
5
- // Created by Junnosuke Matsumoto on 2022/08/23.
6
- //
7
-
8
1
import SwiftUI
9
2
10
3
public enum ObservableObjectContainerKey : EnvironmentKey {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import SwiftUI
10
10
import UIKit
11
11
12
12
@available ( iOS 15 . 0 , * )
13
- public class ExternalDisplayManager : ObservableObject {
13
+ @ MainActor public final class ExternalDisplayManager : ObservableObject {
14
14
15
15
@Published
16
16
public private( set) var externalDisplayMode = ExternalDisplayMode . presentation
Original file line number Diff line number Diff line change 1
- //
2
- // ObservableObjectContainer.swift
3
- //
4
- //
5
- // Created by Junnosuke Matsumoto on 2022/08/23.
6
- //
7
-
8
1
import SwiftUI
9
2
10
- public class ObservableObjectContainer {
3
+ @MainActor
4
+ public final class ObservableObjectContainer : Sendable {
11
5
12
6
private var container : [ ObjectKey : Any ] = [ : ]
13
7
14
- public init ( ) { }
8
+ nonisolated public init ( ) { }
15
9
16
10
public func resolve< Object: ObservableObject > ( _ factory: ( ) -> Object ) -> Object {
17
11
let objectKey = ObjectKey ( objectType: Object . self)
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import Combine
9
9
import SwiftUI
10
10
11
11
@propertyWrapper
12
+ @MainActor
12
13
public struct PhaseWrapper < State: PhasedState > : DynamicProperty {
13
14
14
15
@Environment ( \. slideIndexController)
@@ -42,6 +43,7 @@ public struct PhaseWrapper<State: PhasedState>: DynamicProperty {
42
43
}
43
44
}
44
45
46
+ @MainActor
45
47
@propertyWrapper
46
48
public struct SharedObject < Object: ObservableObject > : DynamicProperty {
47
49
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ extension View {
24
24
}
25
25
}
26
26
27
- public protocol HeaderSlideStyle {
27
+ @MainActor
28
+ public protocol HeaderSlideStyle : Sendable {
28
29
associatedtype Body : View
29
30
30
31
@ViewBuilder func makeBody( configuration: Self . Configuration ) -> Self . Body
@@ -33,7 +34,7 @@ public protocol HeaderSlideStyle {
33
34
}
34
35
35
36
extension HeaderSlideStyle where Self == DefaultHeaderSlideStyle {
36
- public static var `default` : some HeaderSlideStyle {
37
+ public nonisolated static var `default` : some HeaderSlideStyle {
37
38
DefaultHeaderSlideStyle ( )
38
39
}
39
40
}
@@ -65,11 +66,11 @@ public struct HeaderSlideStyleConfiguration {
65
66
public var content : HeaderSlideStyleConfiguration . Content
66
67
}
67
68
68
- struct AnyHeaderSlideStyle : HeaderSlideStyle {
69
- private let converter : ( Configuration ) -> AnyView
69
+ struct AnyHeaderSlideStyle : HeaderSlideStyle , Sendable {
70
+ private let converter : @ MainActor ( Configuration ) -> AnyView
70
71
71
- init ( style: some HeaderSlideStyle ) {
72
- converter = { configuration in
72
+ nonisolated init ( style: some HeaderSlideStyle ) {
73
+ converter = { @ MainActor configuration in
73
74
AnyView ( style. makeBody ( configuration: configuration) )
74
75
}
75
76
}
Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ extension EnvironmentValues {
31
31
}
32
32
}
33
33
34
- public protocol IndexStyle {
34
+ @MainActor
35
+ public protocol IndexStyle : Sendable {
35
36
typealias Configuration = IndexConfiguration
36
37
associatedtype Body : View
37
38
Original file line number Diff line number Diff line change 7
7
8
8
import SwiftUI
9
9
10
- public protocol ItemStyle {
10
+ @MainActor
11
+ public protocol ItemStyle : Sendable {
11
12
associatedtype Body : View
12
13
13
14
@ViewBuilder func makeBody( configuration: Self . Configuration ) -> Self . Body
@@ -53,10 +54,10 @@ public struct ItemConfiguration {
53
54
}
54
55
}
55
56
56
- struct AnyItemStyle : ItemStyle {
57
- private let converter : ( Configuration ) -> AnyView
57
+ struct AnyItemStyle : ItemStyle , Sendable {
58
+ private let converter : @ MainActor ( Configuration ) -> AnyView
58
59
59
- init ( style: some ItemStyle ) {
60
+ nonisolated init ( style: some ItemStyle ) {
60
61
converter = { configuration in
61
62
AnyView ( style. makeBody ( configuration: configuration) )
62
63
}
@@ -103,7 +104,7 @@ public struct DefaultItemStyle: ItemStyle {
103
104
}
104
105
105
106
extension ItemStyle where Self == DefaultItemStyle {
106
- public static var `default` : DefaultItemStyle {
107
+ public nonisolated static var `default` : DefaultItemStyle {
107
108
DefaultItemStyle ( )
108
109
}
109
110
}
Original file line number Diff line number Diff line change 1
- //
2
- // SlideIndexController.swift
3
- //
4
- //
5
- // Created by Junnosuke Matsumoto on 2022/08/23.
6
- //
7
-
8
1
import Foundation
9
2
10
- public class SlideIndexController : ObservableObject {
3
+ /// A controller managing the current slide index.
4
+ @MainActor
5
+ public final class SlideIndexController : ObservableObject {
11
6
12
7
@Published
13
8
public private( set) var currentIndex : Int
You can’t perform that action at this time.
0 commit comments