@shortkitsdk/react-native 0.2.6 → 0.2.12
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 +17 -1
- package/android/src/main/java/com/shortkit/reactnative/ReactCarouselOverlayHost.kt +379 -0
- package/android/src/main/java/com/shortkit/reactnative/ReactLoadingHost.kt +40 -0
- package/android/src/main/java/com/shortkit/reactnative/ReactOverlayHost.kt +570 -0
- package/android/src/main/java/com/shortkit/reactnative/ShortKitBridge.kt +1029 -0
- package/android/src/main/java/com/shortkit/reactnative/ShortKitFeedView.kt +212 -219
- package/android/src/main/java/com/shortkit/reactnative/ShortKitFeedViewManager.kt +17 -3
- package/android/src/main/java/com/shortkit/reactnative/ShortKitModule.kt +157 -742
- package/android/src/main/java/com/shortkit/reactnative/ShortKitPlayerNativeView.kt +11 -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 +444 -0
- package/ios/SKFabricSurfaceWrapper.h +18 -0
- package/ios/SKFabricSurfaceWrapper.mm +57 -0
- package/ios/ShortKitBridge.swift +220 -63
- package/ios/ShortKitFeedView.swift +82 -228
- package/ios/ShortKitFeedViewManager.mm +3 -2
- package/ios/ShortKitModule.mm +69 -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 +3683 -1249
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +56 -15
- 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 +56 -15
- 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 +3683 -1249
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +56 -15
- 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 +56 -15
- 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 -24
- package/src/ShortKitFeed.tsx +124 -41
- package/src/ShortKitLoadingSurface.tsx +24 -0
- package/src/ShortKitOverlaySurface.tsx +313 -0
- package/src/ShortKitPlayer.tsx +30 -9
- package/src/ShortKitProvider.tsx +28 -285
- package/src/index.ts +9 -3
- package/src/serialization.ts +20 -39
- package/src/specs/NativeShortKitModule.ts +74 -45
- package/src/specs/ShortKitFeedViewNativeComponent.ts +3 -2
- package/src/types.ts +84 -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
|
|
@@ -168,6 +169,15 @@ public enum FeedHeight : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
|
168
169
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
169
170
|
public init(from decoder: any Swift.Decoder) throws
|
|
170
171
|
}
|
|
172
|
+
public enum ScrollAxis : Swift.String, Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
173
|
+
case vertical
|
|
174
|
+
case horizontal
|
|
175
|
+
public init?(rawValue: Swift.String)
|
|
176
|
+
public typealias RawValue = Swift.String
|
|
177
|
+
public var rawValue: Swift.String {
|
|
178
|
+
get
|
|
179
|
+
}
|
|
180
|
+
}
|
|
171
181
|
public enum FeedSource : Swift.String, Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
172
182
|
case algorithmic
|
|
173
183
|
case custom
|
|
@@ -177,8 +187,20 @@ public enum FeedSource : Swift.String, Swift.Codable, Swift.Equatable, Swift.Sen
|
|
|
177
187
|
get
|
|
178
188
|
}
|
|
179
189
|
}
|
|
190
|
+
public struct FeedFilter : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
191
|
+
public var tags: [Swift.String]?
|
|
192
|
+
public var section: Swift.String?
|
|
193
|
+
public var author: Swift.String?
|
|
194
|
+
public var contentType: Swift.String?
|
|
195
|
+
public var metadata: [Swift.String : Swift.String]?
|
|
196
|
+
public init(tags: [Swift.String]? = nil, section: Swift.String? = nil, author: Swift.String? = nil, contentType: Swift.String? = nil, metadata: [Swift.String : Swift.String]? = nil)
|
|
197
|
+
public static func == (a: ShortKitSDK.FeedFilter, b: ShortKitSDK.FeedFilter) -> Swift.Bool
|
|
198
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
199
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
200
|
+
}
|
|
180
201
|
public struct FeedConfig : Swift.Codable {
|
|
181
202
|
public var feedHeight: ShortKitSDK.FeedHeight
|
|
203
|
+
public var scrollAxis: ShortKitSDK.ScrollAxis
|
|
182
204
|
public var videoOverlay: ShortKitSDK.VideoOverlayMode
|
|
183
205
|
public var carouselOverlay: ShortKitSDK.CarouselOverlayMode
|
|
184
206
|
public var surveyOverlay: ShortKitSDK.SurveyOverlayMode
|
|
@@ -187,7 +209,9 @@ public struct FeedConfig : Swift.Codable {
|
|
|
187
209
|
public var autoplay: Swift.Bool
|
|
188
210
|
public var feedSource: ShortKitSDK.FeedSource
|
|
189
211
|
public var coldStartEnabled: Swift.Bool
|
|
190
|
-
public
|
|
212
|
+
public var filter: ShortKitSDK.FeedFilter?
|
|
213
|
+
public var preload: ShortKitSDK.FeedPreload?
|
|
214
|
+
public init(feedHeight: ShortKitSDK.FeedHeight = .fullscreen, scrollAxis: ShortKitSDK.ScrollAxis = .vertical, 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
215
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
192
216
|
public init(from decoder: any Swift.Decoder) throws
|
|
193
217
|
}
|
|
@@ -248,22 +272,37 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
248
272
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
249
273
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFetchContentItems items: [ShortKitSDK.ContentItem])
|
|
250
274
|
}
|
|
275
|
+
@_hasMissingDesignatedInitializers final public class FeedPreload : @unchecked Swift.Sendable {
|
|
276
|
+
@objc deinit
|
|
277
|
+
}
|
|
251
278
|
@_Concurrency.MainActor @preconcurrency public struct ShortKitFeedView : SwiftUI.UIViewControllerRepresentable {
|
|
252
|
-
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit)
|
|
279
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig = FeedConfig(), onFeedReady: (() -> Swift.Void)? = nil)
|
|
280
|
+
@_Concurrency.MainActor @preconcurrency public func makeCoordinator() -> ShortKitSDK.ShortKitFeedView.Coordinator
|
|
253
281
|
@_Concurrency.MainActor @preconcurrency public func makeUIViewController(context: ShortKitSDK.ShortKitFeedView.Context) -> ShortKitSDK.ShortKitFeedViewController
|
|
254
282
|
@_Concurrency.MainActor @preconcurrency public func updateUIViewController(_ uiViewController: ShortKitSDK.ShortKitFeedViewController, context: ShortKitSDK.ShortKitFeedView.Context)
|
|
283
|
+
@_hasMissingDesignatedInitializers final public class Coordinator {
|
|
284
|
+
weak final public var feedViewController: ShortKitSDK.ShortKitFeedViewController?
|
|
285
|
+
@objc deinit
|
|
286
|
+
}
|
|
255
287
|
public typealias Body = Swift.Never
|
|
256
|
-
public typealias Coordinator = Swift.Void
|
|
257
288
|
public typealias UIViewControllerType = ShortKitSDK.ShortKitFeedViewController
|
|
258
289
|
}
|
|
259
290
|
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class ShortKitFeedViewController : UIKit.UIViewController {
|
|
260
291
|
@_Concurrency.MainActor @preconcurrency public var onDismiss: (() -> Swift.Void)?
|
|
261
|
-
@_Concurrency.MainActor @preconcurrency public
|
|
292
|
+
@_Concurrency.MainActor @preconcurrency public var onRemainingContentCountChange: ((Swift.Int) -> Swift.Void)?
|
|
293
|
+
@_Concurrency.MainActor @preconcurrency public var onFeedReady: (() -> Swift.Void)?
|
|
294
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig, startAtItemId: Swift.String? = nil)
|
|
295
|
+
@_Concurrency.MainActor public func setFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
296
|
+
@_Concurrency.MainActor public func appendFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
297
|
+
@_Concurrency.MainActor public func applyFilter(_ filter: ShortKitSDK.FeedFilter?)
|
|
262
298
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLoad()
|
|
263
299
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLayoutSubviews()
|
|
264
300
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillAppear(_ animated: Swift.Bool)
|
|
265
301
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidAppear(_ animated: Swift.Bool)
|
|
266
302
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillDisappear(_ animated: Swift.Bool)
|
|
303
|
+
@_Concurrency.MainActor @preconcurrency public func setBridgeManaged()
|
|
304
|
+
@_Concurrency.MainActor @preconcurrency public func activate()
|
|
305
|
+
@_Concurrency.MainActor @preconcurrency public func deactivate()
|
|
267
306
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidDisappear(_ animated: Swift.Bool)
|
|
268
307
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public var supportedInterfaceOrientations: UIKit.UIInterfaceOrientationMask {
|
|
269
308
|
@objc get
|
|
@@ -421,14 +460,13 @@ extension ShortKitSDK.FeedItem : Swift.Codable {
|
|
|
421
460
|
public struct ImageCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
422
461
|
public let id: Swift.String
|
|
423
462
|
public let images: [ShortKitSDK.CarouselImage]
|
|
424
|
-
public let autoScrollInterval: Swift.Double?
|
|
425
463
|
public let caption: Swift.String?
|
|
426
464
|
public let title: Swift.String?
|
|
427
465
|
public let description: Swift.String?
|
|
428
466
|
public let author: Swift.String?
|
|
429
467
|
public let section: Swift.String?
|
|
430
468
|
public let articleUrl: Swift.String?
|
|
431
|
-
public init(id: Swift.String, images: [ShortKitSDK.CarouselImage],
|
|
469
|
+
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
470
|
public static func == (a: ShortKitSDK.ImageCarouselItem, b: ShortKitSDK.ImageCarouselItem) -> Swift.Bool
|
|
433
471
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
434
472
|
public init(from decoder: any Swift.Decoder) throws
|
|
@@ -515,12 +553,16 @@ public protocol CarouselOverlay : AnyObject {
|
|
|
515
553
|
var cachedImage: ((Swift.String) -> UIKit.UIImage?)? { get set }
|
|
516
554
|
func configure(with item: ShortKitSDK.ImageCarouselItem)
|
|
517
555
|
func resetState()
|
|
556
|
+
var wantsNativeImagePrefetch: Swift.Bool { get }
|
|
518
557
|
}
|
|
519
558
|
extension ShortKitSDK.CarouselOverlay {
|
|
520
559
|
public var cachedImage: ((Swift.String) -> UIKit.UIImage?)? {
|
|
521
560
|
get
|
|
522
561
|
set
|
|
523
562
|
}
|
|
563
|
+
public var wantsNativeImagePrefetch: Swift.Bool {
|
|
564
|
+
get
|
|
565
|
+
}
|
|
524
566
|
}
|
|
525
567
|
final public class CellContent : Combine.ObservableObject {
|
|
526
568
|
@Combine.Published @_projectedValueProperty($item) final public var item: ShortKitSDK.ContentItem? {
|
|
@@ -542,7 +584,6 @@ final public class CellContent : Combine.ObservableObject {
|
|
|
542
584
|
public protocol FeedOverlay : AnyObject {
|
|
543
585
|
func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
544
586
|
func configure(with item: ShortKitSDK.ContentItem)
|
|
545
|
-
func resetPlaybackProgress()
|
|
546
587
|
func activatePlayback()
|
|
547
588
|
}
|
|
548
589
|
public protocol SurveyOverlay : AnyObject {
|
|
@@ -662,9 +703,6 @@ public enum ContentSignal : Swift.Equatable, Swift.Sendable {
|
|
|
662
703
|
final public var remainingContentCount: Combine.AnyPublisher<Swift.Int, Swift.Never> {
|
|
663
704
|
get
|
|
664
705
|
}
|
|
665
|
-
final public var feedReady: Combine.AnyPublisher<Swift.Void, Swift.Never> {
|
|
666
|
-
get
|
|
667
|
-
}
|
|
668
706
|
final public var currentItemValue: ShortKitSDK.ContentItem? {
|
|
669
707
|
get
|
|
670
708
|
}
|
|
@@ -724,12 +762,13 @@ public enum ShortKitVersion {
|
|
|
724
762
|
final public class ShortKit {
|
|
725
763
|
final public let player: ShortKitSDK.ShortKitPlayer
|
|
726
764
|
weak final public var delegate: (any ShortKitSDK.ShortKitDelegate)?
|
|
727
|
-
public
|
|
728
|
-
|
|
765
|
+
final public var loadingViewProvider: (() -> UIKit.UIView)?
|
|
766
|
+
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)
|
|
767
|
+
final public func preloadFeed(filter: ShortKitSDK.FeedFilter? = nil, limit: Swift.Int = 10) -> ShortKitSDK.FeedPreload
|
|
768
|
+
final public func preloadFeed(items: [ShortKitSDK.FeedInput]) -> ShortKitSDK.FeedPreload
|
|
769
|
+
final public func fetchContent(limit: Swift.Int = 10, filter: ShortKitSDK.FeedFilter? = nil) async throws -> [ShortKitSDK.ContentItem]
|
|
729
770
|
final public func setUserId(_ id: Swift.String)
|
|
730
771
|
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
772
|
@_Concurrency.MainActor final public func setColdStartQueue(_ items: [ShortKitSDK.FeedInput])
|
|
734
773
|
final public func clearColdStartCache()
|
|
735
774
|
@objc deinit
|
|
@@ -808,6 +847,8 @@ public struct WidgetConfig {
|
|
|
808
847
|
}
|
|
809
848
|
extension ShortKitSDK.AdQuartile : Swift.Equatable {}
|
|
810
849
|
extension ShortKitSDK.AdQuartile : Swift.Hashable {}
|
|
850
|
+
extension ShortKitSDK.ScrollAxis : Swift.Hashable {}
|
|
851
|
+
extension ShortKitSDK.ScrollAxis : Swift.RawRepresentable {}
|
|
811
852
|
extension ShortKitSDK.FeedSource : Swift.Hashable {}
|
|
812
853
|
extension ShortKitSDK.FeedSource : Swift.RawRepresentable {}
|
|
813
854
|
extension ShortKitSDK.ShortKitFeedView : Swift.Sendable {}
|
|
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
|
|
@@ -168,6 +169,15 @@ public enum FeedHeight : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
|
168
169
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
169
170
|
public init(from decoder: any Swift.Decoder) throws
|
|
170
171
|
}
|
|
172
|
+
public enum ScrollAxis : Swift.String, Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
173
|
+
case vertical
|
|
174
|
+
case horizontal
|
|
175
|
+
public init?(rawValue: Swift.String)
|
|
176
|
+
public typealias RawValue = Swift.String
|
|
177
|
+
public var rawValue: Swift.String {
|
|
178
|
+
get
|
|
179
|
+
}
|
|
180
|
+
}
|
|
171
181
|
public enum FeedSource : Swift.String, Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
172
182
|
case algorithmic
|
|
173
183
|
case custom
|
|
@@ -177,8 +187,20 @@ public enum FeedSource : Swift.String, Swift.Codable, Swift.Equatable, Swift.Sen
|
|
|
177
187
|
get
|
|
178
188
|
}
|
|
179
189
|
}
|
|
190
|
+
public struct FeedFilter : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
191
|
+
public var tags: [Swift.String]?
|
|
192
|
+
public var section: Swift.String?
|
|
193
|
+
public var author: Swift.String?
|
|
194
|
+
public var contentType: Swift.String?
|
|
195
|
+
public var metadata: [Swift.String : Swift.String]?
|
|
196
|
+
public init(tags: [Swift.String]? = nil, section: Swift.String? = nil, author: Swift.String? = nil, contentType: Swift.String? = nil, metadata: [Swift.String : Swift.String]? = nil)
|
|
197
|
+
public static func == (a: ShortKitSDK.FeedFilter, b: ShortKitSDK.FeedFilter) -> Swift.Bool
|
|
198
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
199
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
200
|
+
}
|
|
180
201
|
public struct FeedConfig : Swift.Codable {
|
|
181
202
|
public var feedHeight: ShortKitSDK.FeedHeight
|
|
203
|
+
public var scrollAxis: ShortKitSDK.ScrollAxis
|
|
182
204
|
public var videoOverlay: ShortKitSDK.VideoOverlayMode
|
|
183
205
|
public var carouselOverlay: ShortKitSDK.CarouselOverlayMode
|
|
184
206
|
public var surveyOverlay: ShortKitSDK.SurveyOverlayMode
|
|
@@ -187,7 +209,9 @@ public struct FeedConfig : Swift.Codable {
|
|
|
187
209
|
public var autoplay: Swift.Bool
|
|
188
210
|
public var feedSource: ShortKitSDK.FeedSource
|
|
189
211
|
public var coldStartEnabled: Swift.Bool
|
|
190
|
-
public
|
|
212
|
+
public var filter: ShortKitSDK.FeedFilter?
|
|
213
|
+
public var preload: ShortKitSDK.FeedPreload?
|
|
214
|
+
public init(feedHeight: ShortKitSDK.FeedHeight = .fullscreen, scrollAxis: ShortKitSDK.ScrollAxis = .vertical, 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
215
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
192
216
|
public init(from decoder: any Swift.Decoder) throws
|
|
193
217
|
}
|
|
@@ -248,22 +272,37 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
248
272
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
249
273
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFetchContentItems items: [ShortKitSDK.ContentItem])
|
|
250
274
|
}
|
|
275
|
+
@_hasMissingDesignatedInitializers final public class FeedPreload : @unchecked Swift.Sendable {
|
|
276
|
+
@objc deinit
|
|
277
|
+
}
|
|
251
278
|
@_Concurrency.MainActor @preconcurrency public struct ShortKitFeedView : SwiftUI.UIViewControllerRepresentable {
|
|
252
|
-
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit)
|
|
279
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig = FeedConfig(), onFeedReady: (() -> Swift.Void)? = nil)
|
|
280
|
+
@_Concurrency.MainActor @preconcurrency public func makeCoordinator() -> ShortKitSDK.ShortKitFeedView.Coordinator
|
|
253
281
|
@_Concurrency.MainActor @preconcurrency public func makeUIViewController(context: ShortKitSDK.ShortKitFeedView.Context) -> ShortKitSDK.ShortKitFeedViewController
|
|
254
282
|
@_Concurrency.MainActor @preconcurrency public func updateUIViewController(_ uiViewController: ShortKitSDK.ShortKitFeedViewController, context: ShortKitSDK.ShortKitFeedView.Context)
|
|
283
|
+
@_hasMissingDesignatedInitializers final public class Coordinator {
|
|
284
|
+
weak final public var feedViewController: ShortKitSDK.ShortKitFeedViewController?
|
|
285
|
+
@objc deinit
|
|
286
|
+
}
|
|
255
287
|
public typealias Body = Swift.Never
|
|
256
|
-
public typealias Coordinator = Swift.Void
|
|
257
288
|
public typealias UIViewControllerType = ShortKitSDK.ShortKitFeedViewController
|
|
258
289
|
}
|
|
259
290
|
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class ShortKitFeedViewController : UIKit.UIViewController {
|
|
260
291
|
@_Concurrency.MainActor @preconcurrency public var onDismiss: (() -> Swift.Void)?
|
|
261
|
-
@_Concurrency.MainActor @preconcurrency public
|
|
292
|
+
@_Concurrency.MainActor @preconcurrency public var onRemainingContentCountChange: ((Swift.Int) -> Swift.Void)?
|
|
293
|
+
@_Concurrency.MainActor @preconcurrency public var onFeedReady: (() -> Swift.Void)?
|
|
294
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig, startAtItemId: Swift.String? = nil)
|
|
295
|
+
@_Concurrency.MainActor public func setFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
296
|
+
@_Concurrency.MainActor public func appendFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
297
|
+
@_Concurrency.MainActor public func applyFilter(_ filter: ShortKitSDK.FeedFilter?)
|
|
262
298
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLoad()
|
|
263
299
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLayoutSubviews()
|
|
264
300
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillAppear(_ animated: Swift.Bool)
|
|
265
301
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidAppear(_ animated: Swift.Bool)
|
|
266
302
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillDisappear(_ animated: Swift.Bool)
|
|
303
|
+
@_Concurrency.MainActor @preconcurrency public func setBridgeManaged()
|
|
304
|
+
@_Concurrency.MainActor @preconcurrency public func activate()
|
|
305
|
+
@_Concurrency.MainActor @preconcurrency public func deactivate()
|
|
267
306
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidDisappear(_ animated: Swift.Bool)
|
|
268
307
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public var supportedInterfaceOrientations: UIKit.UIInterfaceOrientationMask {
|
|
269
308
|
@objc get
|
|
@@ -421,14 +460,13 @@ extension ShortKitSDK.FeedItem : Swift.Codable {
|
|
|
421
460
|
public struct ImageCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
422
461
|
public let id: Swift.String
|
|
423
462
|
public let images: [ShortKitSDK.CarouselImage]
|
|
424
|
-
public let autoScrollInterval: Swift.Double?
|
|
425
463
|
public let caption: Swift.String?
|
|
426
464
|
public let title: Swift.String?
|
|
427
465
|
public let description: Swift.String?
|
|
428
466
|
public let author: Swift.String?
|
|
429
467
|
public let section: Swift.String?
|
|
430
468
|
public let articleUrl: Swift.String?
|
|
431
|
-
public init(id: Swift.String, images: [ShortKitSDK.CarouselImage],
|
|
469
|
+
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
470
|
public static func == (a: ShortKitSDK.ImageCarouselItem, b: ShortKitSDK.ImageCarouselItem) -> Swift.Bool
|
|
433
471
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
434
472
|
public init(from decoder: any Swift.Decoder) throws
|
|
@@ -515,12 +553,16 @@ public protocol CarouselOverlay : AnyObject {
|
|
|
515
553
|
var cachedImage: ((Swift.String) -> UIKit.UIImage?)? { get set }
|
|
516
554
|
func configure(with item: ShortKitSDK.ImageCarouselItem)
|
|
517
555
|
func resetState()
|
|
556
|
+
var wantsNativeImagePrefetch: Swift.Bool { get }
|
|
518
557
|
}
|
|
519
558
|
extension ShortKitSDK.CarouselOverlay {
|
|
520
559
|
public var cachedImage: ((Swift.String) -> UIKit.UIImage?)? {
|
|
521
560
|
get
|
|
522
561
|
set
|
|
523
562
|
}
|
|
563
|
+
public var wantsNativeImagePrefetch: Swift.Bool {
|
|
564
|
+
get
|
|
565
|
+
}
|
|
524
566
|
}
|
|
525
567
|
final public class CellContent : Combine.ObservableObject {
|
|
526
568
|
@Combine.Published @_projectedValueProperty($item) final public var item: ShortKitSDK.ContentItem? {
|
|
@@ -542,7 +584,6 @@ final public class CellContent : Combine.ObservableObject {
|
|
|
542
584
|
public protocol FeedOverlay : AnyObject {
|
|
543
585
|
func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
544
586
|
func configure(with item: ShortKitSDK.ContentItem)
|
|
545
|
-
func resetPlaybackProgress()
|
|
546
587
|
func activatePlayback()
|
|
547
588
|
}
|
|
548
589
|
public protocol SurveyOverlay : AnyObject {
|
|
@@ -662,9 +703,6 @@ public enum ContentSignal : Swift.Equatable, Swift.Sendable {
|
|
|
662
703
|
final public var remainingContentCount: Combine.AnyPublisher<Swift.Int, Swift.Never> {
|
|
663
704
|
get
|
|
664
705
|
}
|
|
665
|
-
final public var feedReady: Combine.AnyPublisher<Swift.Void, Swift.Never> {
|
|
666
|
-
get
|
|
667
|
-
}
|
|
668
706
|
final public var currentItemValue: ShortKitSDK.ContentItem? {
|
|
669
707
|
get
|
|
670
708
|
}
|
|
@@ -724,12 +762,13 @@ public enum ShortKitVersion {
|
|
|
724
762
|
final public class ShortKit {
|
|
725
763
|
final public let player: ShortKitSDK.ShortKitPlayer
|
|
726
764
|
weak final public var delegate: (any ShortKitSDK.ShortKitDelegate)?
|
|
727
|
-
public
|
|
728
|
-
|
|
765
|
+
final public var loadingViewProvider: (() -> UIKit.UIView)?
|
|
766
|
+
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)
|
|
767
|
+
final public func preloadFeed(filter: ShortKitSDK.FeedFilter? = nil, limit: Swift.Int = 10) -> ShortKitSDK.FeedPreload
|
|
768
|
+
final public func preloadFeed(items: [ShortKitSDK.FeedInput]) -> ShortKitSDK.FeedPreload
|
|
769
|
+
final public func fetchContent(limit: Swift.Int = 10, filter: ShortKitSDK.FeedFilter? = nil) async throws -> [ShortKitSDK.ContentItem]
|
|
729
770
|
final public func setUserId(_ id: Swift.String)
|
|
730
771
|
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
772
|
@_Concurrency.MainActor final public func setColdStartQueue(_ items: [ShortKitSDK.FeedInput])
|
|
734
773
|
final public func clearColdStartCache()
|
|
735
774
|
@objc deinit
|
|
@@ -808,6 +847,8 @@ public struct WidgetConfig {
|
|
|
808
847
|
}
|
|
809
848
|
extension ShortKitSDK.AdQuartile : Swift.Equatable {}
|
|
810
849
|
extension ShortKitSDK.AdQuartile : Swift.Hashable {}
|
|
850
|
+
extension ShortKitSDK.ScrollAxis : Swift.Hashable {}
|
|
851
|
+
extension ShortKitSDK.ScrollAxis : Swift.RawRepresentable {}
|
|
811
852
|
extension ShortKitSDK.FeedSource : Swift.Hashable {}
|
|
812
853
|
extension ShortKitSDK.FeedSource : Swift.RawRepresentable {}
|
|
813
854
|
extension ShortKitSDK.ShortKitFeedView : Swift.Sendable {}
|
|
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
|