@shortkitsdk/react-native 0.2.6 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ShortKitReactNative.podspec +1 -0
- package/android/build.gradle.kts +5 -1
- package/android/src/main/java/com/shortkit/reactnative/ReactCarouselOverlayHost.kt +319 -0
- package/android/src/main/java/com/shortkit/reactnative/ReactLoadingHost.kt +40 -0
- package/android/src/main/java/com/shortkit/reactnative/ReactOverlayHost.kt +559 -0
- package/android/src/main/java/com/shortkit/reactnative/ShortKitBridge.kt +984 -0
- package/android/src/main/java/com/shortkit/reactnative/ShortKitFeedView.kt +88 -220
- package/android/src/main/java/com/shortkit/reactnative/ShortKitFeedViewManager.kt +12 -3
- package/android/src/main/java/com/shortkit/reactnative/ShortKitModule.kt +123 -741
- package/android/src/main/java/com/shortkit/reactnative/ShortKitPlayerNativeView.kt +2 -2
- package/android/src/main/java/com/shortkit/reactnative/ShortKitWidgetNativeView.kt +2 -2
- package/ios/ReactCarouselOverlayHost.swift +177 -0
- package/ios/ReactLoadingHost.swift +38 -0
- package/ios/ReactOverlayHost.swift +458 -0
- package/ios/SKFabricSurfaceWrapper.h +18 -0
- package/ios/SKFabricSurfaceWrapper.mm +57 -0
- package/ios/ShortKitBridge.swift +186 -63
- package/ios/ShortKitFeedView.swift +62 -229
- package/ios/ShortKitFeedViewManager.mm +3 -2
- package/ios/ShortKitModule.mm +66 -37
- package/ios/ShortKitPlayerNativeView.swift +39 -8
- package/ios/ShortKitReactNative-Bridging-Header.h +2 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Headers/ShortKitSDK-Swift.h +1 -1
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +2380 -522
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +39 -12
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftinterface +39 -12
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Headers/ShortKitSDK-Swift.h +1 -1
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +2380 -522
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +39 -12
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +39 -12
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework.bak/Info.plist +43 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64/ShortKitSDK.framework/Headers/ShortKitSDK-Swift.h +418 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64/ShortKitSDK.framework/Info.plist +16 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +28917 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +824 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftinterface +824 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64/ShortKitSDK.framework/Modules/module.modulemap +4 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64-simulator/ShortKitSDK.framework/Headers/ShortKitSDK-Swift.h +418 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64-simulator/ShortKitSDK.framework/Info.plist +16 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +28917 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +824 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +824 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64-simulator/ShortKitSDK.framework/Modules/module.modulemap +4 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitWidgetNativeView.swift +3 -3
- package/package.json +1 -1
- package/src/ShortKitCarouselOverlaySurface.tsx +55 -0
- package/src/ShortKitCommands.ts +31 -0
- package/src/ShortKitContext.ts +6 -25
- package/src/ShortKitFeed.tsx +110 -41
- package/src/ShortKitLoadingSurface.tsx +24 -0
- package/src/ShortKitOverlaySurface.tsx +205 -0
- package/src/ShortKitPlayer.tsx +6 -7
- package/src/ShortKitProvider.tsx +27 -286
- package/src/index.ts +5 -3
- package/src/serialization.ts +19 -39
- package/src/specs/NativeShortKitModule.ts +58 -46
- package/src/specs/ShortKitFeedViewNativeComponent.ts +3 -2
- package/src/types.ts +78 -16
- package/src/useShortKit.ts +1 -3
- package/src/useShortKitPlayer.ts +7 -7
- package/android/src/main/java/com/shortkit/reactnative/ShortKitCarouselOverlayBridge.kt +0 -48
- package/android/src/main/java/com/shortkit/reactnative/ShortKitOverlayBridge.kt +0 -128
- package/ios/ShortKitCarouselOverlayBridge.swift +0 -219
- package/ios/ShortKitOverlayBridge.swift +0 -111
- package/src/CarouselOverlayManager.tsx +0 -70
- package/src/OverlayManager.tsx +0 -87
- package/src/useShortKitCarousel.ts +0 -29
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// swift-interface-format-version: 1.0
|
|
2
2
|
// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)
|
|
3
|
-
// swift-module-flags: -target arm64-apple-
|
|
3
|
+
// swift-module-flags: -target arm64-apple-ios15.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -O -module-name ShortKitSDK -package-name swift_sdk
|
|
4
4
|
// swift-module-flags-ignorable: -interface-compiler-version 6.1
|
|
5
5
|
import AVFoundation
|
|
6
6
|
import Combine
|
|
7
7
|
import CoreGraphics
|
|
8
8
|
import Foundation
|
|
9
9
|
import Network
|
|
10
|
+
import QuartzCore
|
|
10
11
|
import Swift
|
|
11
12
|
import SwiftUI
|
|
12
13
|
import UIKit
|
|
@@ -177,6 +178,17 @@ public enum FeedSource : Swift.String, Swift.Codable, Swift.Equatable, Swift.Sen
|
|
|
177
178
|
get
|
|
178
179
|
}
|
|
179
180
|
}
|
|
181
|
+
public struct FeedFilter : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
182
|
+
public var tags: [Swift.String]?
|
|
183
|
+
public var section: Swift.String?
|
|
184
|
+
public var author: Swift.String?
|
|
185
|
+
public var contentType: Swift.String?
|
|
186
|
+
public var metadata: [Swift.String : Swift.String]?
|
|
187
|
+
public init(tags: [Swift.String]? = nil, section: Swift.String? = nil, author: Swift.String? = nil, contentType: Swift.String? = nil, metadata: [Swift.String : Swift.String]? = nil)
|
|
188
|
+
public static func == (a: ShortKitSDK.FeedFilter, b: ShortKitSDK.FeedFilter) -> Swift.Bool
|
|
189
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
190
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
191
|
+
}
|
|
180
192
|
public struct FeedConfig : Swift.Codable {
|
|
181
193
|
public var feedHeight: ShortKitSDK.FeedHeight
|
|
182
194
|
public var videoOverlay: ShortKitSDK.VideoOverlayMode
|
|
@@ -187,7 +199,9 @@ public struct FeedConfig : Swift.Codable {
|
|
|
187
199
|
public var autoplay: Swift.Bool
|
|
188
200
|
public var feedSource: ShortKitSDK.FeedSource
|
|
189
201
|
public var coldStartEnabled: Swift.Bool
|
|
190
|
-
public
|
|
202
|
+
public var filter: ShortKitSDK.FeedFilter?
|
|
203
|
+
public var preload: ShortKitSDK.FeedPreload?
|
|
204
|
+
public init(feedHeight: ShortKitSDK.FeedHeight = .fullscreen, videoOverlay: ShortKitSDK.VideoOverlayMode = .none, carouselOverlay: ShortKitSDK.CarouselOverlayMode = .none, surveyOverlay: ShortKitSDK.SurveyOverlayMode = .none, adOverlay: ShortKitSDK.AdOverlayMode = .none, muteOnStart: Swift.Bool = true, autoplay: Swift.Bool = true, feedSource: ShortKitSDK.FeedSource = .algorithmic, coldStartEnabled: Swift.Bool = false, filter: ShortKitSDK.FeedFilter? = nil, preload: ShortKitSDK.FeedPreload? = nil)
|
|
191
205
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
192
206
|
public init(from decoder: any Swift.Decoder) throws
|
|
193
207
|
}
|
|
@@ -248,17 +262,28 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
248
262
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
249
263
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFetchContentItems items: [ShortKitSDK.ContentItem])
|
|
250
264
|
}
|
|
265
|
+
@_hasMissingDesignatedInitializers final public class FeedPreload : @unchecked Swift.Sendable {
|
|
266
|
+
@objc deinit
|
|
267
|
+
}
|
|
251
268
|
@_Concurrency.MainActor @preconcurrency public struct ShortKitFeedView : SwiftUI.UIViewControllerRepresentable {
|
|
252
|
-
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit)
|
|
269
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig)
|
|
270
|
+
@_Concurrency.MainActor @preconcurrency public func makeCoordinator() -> ShortKitSDK.ShortKitFeedView.Coordinator
|
|
253
271
|
@_Concurrency.MainActor @preconcurrency public func makeUIViewController(context: ShortKitSDK.ShortKitFeedView.Context) -> ShortKitSDK.ShortKitFeedViewController
|
|
254
272
|
@_Concurrency.MainActor @preconcurrency public func updateUIViewController(_ uiViewController: ShortKitSDK.ShortKitFeedViewController, context: ShortKitSDK.ShortKitFeedView.Context)
|
|
273
|
+
@_hasMissingDesignatedInitializers final public class Coordinator {
|
|
274
|
+
weak final public var feedViewController: ShortKitSDK.ShortKitFeedViewController?
|
|
275
|
+
@objc deinit
|
|
276
|
+
}
|
|
255
277
|
public typealias Body = Swift.Never
|
|
256
|
-
public typealias Coordinator = Swift.Void
|
|
257
278
|
public typealias UIViewControllerType = ShortKitSDK.ShortKitFeedViewController
|
|
258
279
|
}
|
|
259
280
|
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class ShortKitFeedViewController : UIKit.UIViewController {
|
|
260
281
|
@_Concurrency.MainActor @preconcurrency public var onDismiss: (() -> Swift.Void)?
|
|
261
|
-
@_Concurrency.MainActor @preconcurrency public
|
|
282
|
+
@_Concurrency.MainActor @preconcurrency public var onRemainingContentCountChange: ((Swift.Int) -> Swift.Void)?
|
|
283
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig, startAtItemId: Swift.String? = nil)
|
|
284
|
+
@_Concurrency.MainActor public func setFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
285
|
+
@_Concurrency.MainActor public func appendFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
286
|
+
@_Concurrency.MainActor public func applyFilter(_ filter: ShortKitSDK.FeedFilter?)
|
|
262
287
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLoad()
|
|
263
288
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLayoutSubviews()
|
|
264
289
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillAppear(_ animated: Swift.Bool)
|
|
@@ -421,14 +446,13 @@ extension ShortKitSDK.FeedItem : Swift.Codable {
|
|
|
421
446
|
public struct ImageCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
422
447
|
public let id: Swift.String
|
|
423
448
|
public let images: [ShortKitSDK.CarouselImage]
|
|
424
|
-
public let autoScrollInterval: Swift.Double?
|
|
425
449
|
public let caption: Swift.String?
|
|
426
450
|
public let title: Swift.String?
|
|
427
451
|
public let description: Swift.String?
|
|
428
452
|
public let author: Swift.String?
|
|
429
453
|
public let section: Swift.String?
|
|
430
454
|
public let articleUrl: Swift.String?
|
|
431
|
-
public init(id: Swift.String, images: [ShortKitSDK.CarouselImage],
|
|
455
|
+
public init(id: Swift.String, images: [ShortKitSDK.CarouselImage], caption: Swift.String? = nil, title: Swift.String? = nil, description: Swift.String? = nil, author: Swift.String? = nil, section: Swift.String? = nil, articleUrl: Swift.String? = nil)
|
|
432
456
|
public static func == (a: ShortKitSDK.ImageCarouselItem, b: ShortKitSDK.ImageCarouselItem) -> Swift.Bool
|
|
433
457
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
434
458
|
public init(from decoder: any Swift.Decoder) throws
|
|
@@ -515,12 +539,16 @@ public protocol CarouselOverlay : AnyObject {
|
|
|
515
539
|
var cachedImage: ((Swift.String) -> UIKit.UIImage?)? { get set }
|
|
516
540
|
func configure(with item: ShortKitSDK.ImageCarouselItem)
|
|
517
541
|
func resetState()
|
|
542
|
+
var wantsNativeImagePrefetch: Swift.Bool { get }
|
|
518
543
|
}
|
|
519
544
|
extension ShortKitSDK.CarouselOverlay {
|
|
520
545
|
public var cachedImage: ((Swift.String) -> UIKit.UIImage?)? {
|
|
521
546
|
get
|
|
522
547
|
set
|
|
523
548
|
}
|
|
549
|
+
public var wantsNativeImagePrefetch: Swift.Bool {
|
|
550
|
+
get
|
|
551
|
+
}
|
|
524
552
|
}
|
|
525
553
|
final public class CellContent : Combine.ObservableObject {
|
|
526
554
|
@Combine.Published @_projectedValueProperty($item) final public var item: ShortKitSDK.ContentItem? {
|
|
@@ -542,7 +570,6 @@ final public class CellContent : Combine.ObservableObject {
|
|
|
542
570
|
public protocol FeedOverlay : AnyObject {
|
|
543
571
|
func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
544
572
|
func configure(with item: ShortKitSDK.ContentItem)
|
|
545
|
-
func resetPlaybackProgress()
|
|
546
573
|
func activatePlayback()
|
|
547
574
|
}
|
|
548
575
|
public protocol SurveyOverlay : AnyObject {
|
|
@@ -724,12 +751,12 @@ public enum ShortKitVersion {
|
|
|
724
751
|
final public class ShortKit {
|
|
725
752
|
final public let player: ShortKitSDK.ShortKitPlayer
|
|
726
753
|
weak final public var delegate: (any ShortKitSDK.ShortKitDelegate)?
|
|
727
|
-
public
|
|
728
|
-
|
|
754
|
+
final public var loadingViewProvider: (() -> UIKit.UIView)?
|
|
755
|
+
public init(apiKey: Swift.String, userId: Swift.String? = nil, adProvider: (any ShortKitSDK.ShortKitAdProvider)? = nil, clientAppName: Swift.String? = nil, clientAppVersion: Swift.String? = nil, customDimensions: [Swift.String : Swift.String]? = nil, loadingViewProvider: (() -> UIKit.UIView)? = nil)
|
|
756
|
+
final public func preloadFeed(filter: ShortKitSDK.FeedFilter? = nil, limit: Swift.Int = 10) -> ShortKitSDK.FeedPreload
|
|
757
|
+
final public func fetchContent(limit: Swift.Int = 10, filter: ShortKitSDK.FeedFilter? = nil) async throws -> [ShortKitSDK.ContentItem]
|
|
729
758
|
final public func setUserId(_ id: Swift.String)
|
|
730
759
|
final public func clearUserId()
|
|
731
|
-
@_Concurrency.MainActor final public func setFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
732
|
-
@_Concurrency.MainActor final public func appendFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
733
760
|
@_Concurrency.MainActor final public func setColdStartQueue(_ items: [ShortKitSDK.FeedInput])
|
|
734
761
|
final public func clearColdStartCache()
|
|
735
762
|
@objc deinit
|
|
Binary file
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// swift-interface-format-version: 1.0
|
|
2
2
|
// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)
|
|
3
|
-
// swift-module-flags: -target arm64-apple-
|
|
3
|
+
// swift-module-flags: -target arm64-apple-ios15.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -O -module-name ShortKitSDK -package-name swift_sdk
|
|
4
4
|
// swift-module-flags-ignorable: -interface-compiler-version 6.1
|
|
5
5
|
import AVFoundation
|
|
6
6
|
import Combine
|
|
7
7
|
import CoreGraphics
|
|
8
8
|
import Foundation
|
|
9
9
|
import Network
|
|
10
|
+
import QuartzCore
|
|
10
11
|
import Swift
|
|
11
12
|
import SwiftUI
|
|
12
13
|
import UIKit
|
|
@@ -177,6 +178,17 @@ public enum FeedSource : Swift.String, Swift.Codable, Swift.Equatable, Swift.Sen
|
|
|
177
178
|
get
|
|
178
179
|
}
|
|
179
180
|
}
|
|
181
|
+
public struct FeedFilter : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
182
|
+
public var tags: [Swift.String]?
|
|
183
|
+
public var section: Swift.String?
|
|
184
|
+
public var author: Swift.String?
|
|
185
|
+
public var contentType: Swift.String?
|
|
186
|
+
public var metadata: [Swift.String : Swift.String]?
|
|
187
|
+
public init(tags: [Swift.String]? = nil, section: Swift.String? = nil, author: Swift.String? = nil, contentType: Swift.String? = nil, metadata: [Swift.String : Swift.String]? = nil)
|
|
188
|
+
public static func == (a: ShortKitSDK.FeedFilter, b: ShortKitSDK.FeedFilter) -> Swift.Bool
|
|
189
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
190
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
191
|
+
}
|
|
180
192
|
public struct FeedConfig : Swift.Codable {
|
|
181
193
|
public var feedHeight: ShortKitSDK.FeedHeight
|
|
182
194
|
public var videoOverlay: ShortKitSDK.VideoOverlayMode
|
|
@@ -187,7 +199,9 @@ public struct FeedConfig : Swift.Codable {
|
|
|
187
199
|
public var autoplay: Swift.Bool
|
|
188
200
|
public var feedSource: ShortKitSDK.FeedSource
|
|
189
201
|
public var coldStartEnabled: Swift.Bool
|
|
190
|
-
public
|
|
202
|
+
public var filter: ShortKitSDK.FeedFilter?
|
|
203
|
+
public var preload: ShortKitSDK.FeedPreload?
|
|
204
|
+
public init(feedHeight: ShortKitSDK.FeedHeight = .fullscreen, videoOverlay: ShortKitSDK.VideoOverlayMode = .none, carouselOverlay: ShortKitSDK.CarouselOverlayMode = .none, surveyOverlay: ShortKitSDK.SurveyOverlayMode = .none, adOverlay: ShortKitSDK.AdOverlayMode = .none, muteOnStart: Swift.Bool = true, autoplay: Swift.Bool = true, feedSource: ShortKitSDK.FeedSource = .algorithmic, coldStartEnabled: Swift.Bool = false, filter: ShortKitSDK.FeedFilter? = nil, preload: ShortKitSDK.FeedPreload? = nil)
|
|
191
205
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
192
206
|
public init(from decoder: any Swift.Decoder) throws
|
|
193
207
|
}
|
|
@@ -248,17 +262,28 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
248
262
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
249
263
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFetchContentItems items: [ShortKitSDK.ContentItem])
|
|
250
264
|
}
|
|
265
|
+
@_hasMissingDesignatedInitializers final public class FeedPreload : @unchecked Swift.Sendable {
|
|
266
|
+
@objc deinit
|
|
267
|
+
}
|
|
251
268
|
@_Concurrency.MainActor @preconcurrency public struct ShortKitFeedView : SwiftUI.UIViewControllerRepresentable {
|
|
252
|
-
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit)
|
|
269
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig)
|
|
270
|
+
@_Concurrency.MainActor @preconcurrency public func makeCoordinator() -> ShortKitSDK.ShortKitFeedView.Coordinator
|
|
253
271
|
@_Concurrency.MainActor @preconcurrency public func makeUIViewController(context: ShortKitSDK.ShortKitFeedView.Context) -> ShortKitSDK.ShortKitFeedViewController
|
|
254
272
|
@_Concurrency.MainActor @preconcurrency public func updateUIViewController(_ uiViewController: ShortKitSDK.ShortKitFeedViewController, context: ShortKitSDK.ShortKitFeedView.Context)
|
|
273
|
+
@_hasMissingDesignatedInitializers final public class Coordinator {
|
|
274
|
+
weak final public var feedViewController: ShortKitSDK.ShortKitFeedViewController?
|
|
275
|
+
@objc deinit
|
|
276
|
+
}
|
|
255
277
|
public typealias Body = Swift.Never
|
|
256
|
-
public typealias Coordinator = Swift.Void
|
|
257
278
|
public typealias UIViewControllerType = ShortKitSDK.ShortKitFeedViewController
|
|
258
279
|
}
|
|
259
280
|
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class ShortKitFeedViewController : UIKit.UIViewController {
|
|
260
281
|
@_Concurrency.MainActor @preconcurrency public var onDismiss: (() -> Swift.Void)?
|
|
261
|
-
@_Concurrency.MainActor @preconcurrency public
|
|
282
|
+
@_Concurrency.MainActor @preconcurrency public var onRemainingContentCountChange: ((Swift.Int) -> Swift.Void)?
|
|
283
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig, startAtItemId: Swift.String? = nil)
|
|
284
|
+
@_Concurrency.MainActor public func setFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
285
|
+
@_Concurrency.MainActor public func appendFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
286
|
+
@_Concurrency.MainActor public func applyFilter(_ filter: ShortKitSDK.FeedFilter?)
|
|
262
287
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLoad()
|
|
263
288
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLayoutSubviews()
|
|
264
289
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillAppear(_ animated: Swift.Bool)
|
|
@@ -421,14 +446,13 @@ extension ShortKitSDK.FeedItem : Swift.Codable {
|
|
|
421
446
|
public struct ImageCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
422
447
|
public let id: Swift.String
|
|
423
448
|
public let images: [ShortKitSDK.CarouselImage]
|
|
424
|
-
public let autoScrollInterval: Swift.Double?
|
|
425
449
|
public let caption: Swift.String?
|
|
426
450
|
public let title: Swift.String?
|
|
427
451
|
public let description: Swift.String?
|
|
428
452
|
public let author: Swift.String?
|
|
429
453
|
public let section: Swift.String?
|
|
430
454
|
public let articleUrl: Swift.String?
|
|
431
|
-
public init(id: Swift.String, images: [ShortKitSDK.CarouselImage],
|
|
455
|
+
public init(id: Swift.String, images: [ShortKitSDK.CarouselImage], caption: Swift.String? = nil, title: Swift.String? = nil, description: Swift.String? = nil, author: Swift.String? = nil, section: Swift.String? = nil, articleUrl: Swift.String? = nil)
|
|
432
456
|
public static func == (a: ShortKitSDK.ImageCarouselItem, b: ShortKitSDK.ImageCarouselItem) -> Swift.Bool
|
|
433
457
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
434
458
|
public init(from decoder: any Swift.Decoder) throws
|
|
@@ -515,12 +539,16 @@ public protocol CarouselOverlay : AnyObject {
|
|
|
515
539
|
var cachedImage: ((Swift.String) -> UIKit.UIImage?)? { get set }
|
|
516
540
|
func configure(with item: ShortKitSDK.ImageCarouselItem)
|
|
517
541
|
func resetState()
|
|
542
|
+
var wantsNativeImagePrefetch: Swift.Bool { get }
|
|
518
543
|
}
|
|
519
544
|
extension ShortKitSDK.CarouselOverlay {
|
|
520
545
|
public var cachedImage: ((Swift.String) -> UIKit.UIImage?)? {
|
|
521
546
|
get
|
|
522
547
|
set
|
|
523
548
|
}
|
|
549
|
+
public var wantsNativeImagePrefetch: Swift.Bool {
|
|
550
|
+
get
|
|
551
|
+
}
|
|
524
552
|
}
|
|
525
553
|
final public class CellContent : Combine.ObservableObject {
|
|
526
554
|
@Combine.Published @_projectedValueProperty($item) final public var item: ShortKitSDK.ContentItem? {
|
|
@@ -542,7 +570,6 @@ final public class CellContent : Combine.ObservableObject {
|
|
|
542
570
|
public protocol FeedOverlay : AnyObject {
|
|
543
571
|
func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
544
572
|
func configure(with item: ShortKitSDK.ContentItem)
|
|
545
|
-
func resetPlaybackProgress()
|
|
546
573
|
func activatePlayback()
|
|
547
574
|
}
|
|
548
575
|
public protocol SurveyOverlay : AnyObject {
|
|
@@ -724,12 +751,12 @@ public enum ShortKitVersion {
|
|
|
724
751
|
final public class ShortKit {
|
|
725
752
|
final public let player: ShortKitSDK.ShortKitPlayer
|
|
726
753
|
weak final public var delegate: (any ShortKitSDK.ShortKitDelegate)?
|
|
727
|
-
public
|
|
728
|
-
|
|
754
|
+
final public var loadingViewProvider: (() -> UIKit.UIView)?
|
|
755
|
+
public init(apiKey: Swift.String, userId: Swift.String? = nil, adProvider: (any ShortKitSDK.ShortKitAdProvider)? = nil, clientAppName: Swift.String? = nil, clientAppVersion: Swift.String? = nil, customDimensions: [Swift.String : Swift.String]? = nil, loadingViewProvider: (() -> UIKit.UIView)? = nil)
|
|
756
|
+
final public func preloadFeed(filter: ShortKitSDK.FeedFilter? = nil, limit: Swift.Int = 10) -> ShortKitSDK.FeedPreload
|
|
757
|
+
final public func fetchContent(limit: Swift.Int = 10, filter: ShortKitSDK.FeedFilter? = nil) async throws -> [ShortKitSDK.ContentItem]
|
|
729
758
|
final public func setUserId(_ id: Swift.String)
|
|
730
759
|
final public func clearUserId()
|
|
731
|
-
@_Concurrency.MainActor final public func setFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
732
|
-
@_Concurrency.MainActor final public func appendFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
733
760
|
@_Concurrency.MainActor final public func setColdStartQueue(_ items: [ShortKitSDK.FeedInput])
|
|
734
761
|
final public func clearColdStartCache()
|
|
735
762
|
@objc deinit
|
|
Binary file
|
|
@@ -365,7 +365,7 @@ SWIFT_CLASS("_TtC11ShortKitSDK26ShortKitFeedViewController")
|
|
|
365
365
|
|
|
366
366
|
/// Public single-video player view controller.
|
|
367
367
|
/// Starts in thumbnail-only mode and borrows an AVPlayer from the shared
|
|
368
|
-
/// <code>
|
|
368
|
+
/// <code>PlayerPool</code> tile slots when activated. Call <code>activate()</code> when the tile becomes
|
|
369
369
|
/// visible and <code>deactivate()</code> when it scrolls offscreen.
|
|
370
370
|
SWIFT_CLASS("_TtC11ShortKitSDK28ShortKitPlayerViewController")
|
|
371
371
|
@interface ShortKitPlayerViewController : UIViewController
|