@shortkitsdk/react-native 0.2.12 → 0.2.15
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/android/src/main/java/com/shortkit/reactnative/ReactCarouselOverlayHost.kt +47 -4
- package/android/src/main/java/com/shortkit/reactnative/ReactVideoCarouselOverlayHost.kt +431 -0
- package/android/src/main/java/com/shortkit/reactnative/ShortKitBridge.kt +117 -2
- package/android/src/main/java/com/shortkit/reactnative/ShortKitModule.kt +7 -5
- package/ios/ReactCarouselOverlayHost.swift +67 -35
- package/ios/ReactOverlayHost.swift +85 -75
- package/ios/ReactVideoCarouselOverlayHost.swift +283 -0
- package/ios/ShortKitBridge.swift +122 -20
- package/ios/ShortKitModule.mm +15 -5
- package/ios/ShortKitSDK.xcframework/Info.plist +5 -4
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Headers/ShortKitSDK-Swift.h +1 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Info.plist +5 -1
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +2488 -281
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +65 -5
- 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 +65 -5
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/_CodeSignature/CodeResources +168 -0
- package/ios/{ShortKitSDK.xcframework.bak/ios-arm64-simulator → ShortKitSDK.xcframework/ios-arm64_x86_64-simulator}/ShortKitSDK.framework/Headers/ShortKitSDK-Swift.h +2 -1
- package/ios/ShortKitSDK.xcframework/{ios-arm64-simulator → ios-arm64_x86_64-simulator}/ShortKitSDK.framework/Info.plist +5 -1
- package/ios/{ShortKitSDK.xcframework.bak/ios-arm64-simulator → ShortKitSDK.xcframework/ios-arm64_x86_64-simulator}/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +8233 -3592
- package/ios/{ShortKitSDK.xcframework.bak/ios-arm64-simulator → ShortKitSDK.xcframework/ios-arm64_x86_64-simulator}/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +120 -19
- package/ios/{ShortKitSDK.xcframework.bak/ios-arm64-simulator → ShortKitSDK.xcframework/ios-arm64_x86_64-simulator}/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/{ShortKitSDK.xcframework.bak/ios-arm64-simulator → ShortKitSDK.xcframework/ios-arm64_x86_64-simulator}/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +120 -19
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +33558 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +925 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +925 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/_CodeSignature/CodeResources +212 -0
- package/ios/{ShortKitSDK.xcframework.bak → ShortKitSDK.xcframework.dev-backup}/ios-arm64/ShortKitSDK.framework/Headers/ShortKitSDK-Swift.h +1 -1
- package/ios/{ShortKitSDK.xcframework.bak → ShortKitSDK.xcframework.dev-backup}/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +7338 -3272
- package/ios/{ShortKitSDK.xcframework.bak → ShortKitSDK.xcframework.dev-backup}/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +106 -15
- package/ios/{ShortKitSDK.xcframework.bak → ShortKitSDK.xcframework.dev-backup}/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/{ShortKitSDK.xcframework.bak → ShortKitSDK.xcframework.dev-backup}/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftinterface +106 -15
- package/ios/ShortKitSDK.xcframework.dev-backup/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework.dev-backup/ios-arm64/ShortKitSDK.framework/_CodeSignature/CodeResources +168 -0
- package/ios/{ShortKitSDK.xcframework → ShortKitSDK.xcframework.dev-backup}/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +1838 -206
- package/ios/{ShortKitSDK.xcframework → ShortKitSDK.xcframework.dev-backup}/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +51 -1
- package/ios/{ShortKitSDK.xcframework → ShortKitSDK.xcframework.dev-backup}/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/{ShortKitSDK.xcframework → ShortKitSDK.xcframework.dev-backup}/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +51 -1
- package/ios/ShortKitSDK.xcframework.dev-backup/ios-arm64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework.dev-backup/ios-arm64-simulator/ShortKitSDK.framework/_CodeSignature/CodeResources +168 -0
- package/package.json +1 -1
- package/src/ShortKitCarouselOverlaySurface.tsx +57 -2
- package/src/ShortKitContext.ts +11 -0
- package/src/ShortKitFeed.tsx +25 -10
- package/src/ShortKitOverlaySurface.tsx +24 -11
- package/src/ShortKitProvider.tsx +4 -2
- package/src/ShortKitVideoCarouselOverlaySurface.tsx +156 -0
- package/src/ShortKitWidget.tsx +3 -3
- package/src/index.ts +5 -1
- package/src/serialization.ts +7 -0
- package/src/specs/NativeShortKitModule.ts +18 -2
- package/src/types.ts +48 -3
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework.bak/ios-arm64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework/{ios-arm64-simulator → ios-arm64_x86_64-simulator}/ShortKitSDK.framework/Modules/module.modulemap +0 -0
- package/ios/{ShortKitSDK.xcframework.bak → ShortKitSDK.xcframework.dev-backup}/Info.plist +4 -4
- /package/ios/{ShortKitSDK.xcframework.bak → ShortKitSDK.xcframework.dev-backup}/ios-arm64/ShortKitSDK.framework/Info.plist +0 -0
- /package/ios/{ShortKitSDK.xcframework.bak → ShortKitSDK.xcframework.dev-backup}/ios-arm64/ShortKitSDK.framework/Modules/module.modulemap +0 -0
- /package/ios/{ShortKitSDK.xcframework → ShortKitSDK.xcframework.dev-backup}/ios-arm64-simulator/ShortKitSDK.framework/Headers/ShortKitSDK-Swift.h +0 -0
- /package/ios/{ShortKitSDK.xcframework.bak → ShortKitSDK.xcframework.dev-backup}/ios-arm64-simulator/ShortKitSDK.framework/Info.plist +0 -0
- /package/ios/{ShortKitSDK.xcframework.bak → ShortKitSDK.xcframework.dev-backup}/ios-arm64-simulator/ShortKitSDK.framework/Modules/module.modulemap +0 -0
|
@@ -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-simulator -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,17 +187,33 @@ 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
|
|
206
|
+
public var videoCarouselOverlay: ShortKitSDK.VideoCarouselOverlayMode
|
|
184
207
|
public var surveyOverlay: ShortKitSDK.SurveyOverlayMode
|
|
185
208
|
public var adOverlay: ShortKitSDK.AdOverlayMode
|
|
186
209
|
public var muteOnStart: Swift.Bool
|
|
187
210
|
public var autoplay: Swift.Bool
|
|
188
211
|
public var feedSource: ShortKitSDK.FeedSource
|
|
189
212
|
public var coldStartEnabled: Swift.Bool
|
|
190
|
-
public
|
|
213
|
+
public var pullToRefreshEnabled: Swift.Bool
|
|
214
|
+
public var filter: ShortKitSDK.FeedFilter?
|
|
215
|
+
public var preload: ShortKitSDK.FeedPreload?
|
|
216
|
+
public init(feedHeight: ShortKitSDK.FeedHeight = .fullscreen, scrollAxis: ShortKitSDK.ScrollAxis = .vertical, videoOverlay: ShortKitSDK.VideoOverlayMode = .none, carouselOverlay: ShortKitSDK.CarouselOverlayMode = .none, videoCarouselOverlay: ShortKitSDK.VideoCarouselOverlayMode = .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, pullToRefreshEnabled: Swift.Bool = true, filter: ShortKitSDK.FeedFilter? = nil, preload: ShortKitSDK.FeedPreload? = nil)
|
|
191
217
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
192
218
|
public init(from decoder: any Swift.Decoder) throws
|
|
193
219
|
}
|
|
@@ -216,6 +242,17 @@ extension ShortKitSDK.CarouselOverlayMode : Swift.Codable {
|
|
|
216
242
|
public init(from decoder: any Swift.Decoder) throws
|
|
217
243
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
218
244
|
}
|
|
245
|
+
public enum VideoCarouselOverlayMode {
|
|
246
|
+
case none
|
|
247
|
+
case custom(@Sendable () -> any UIKit.UIView & ShortKitSDK.VideoCarouselOverlay)
|
|
248
|
+
}
|
|
249
|
+
extension ShortKitSDK.VideoCarouselOverlayMode : Swift.Equatable {
|
|
250
|
+
public static func == (lhs: ShortKitSDK.VideoCarouselOverlayMode, rhs: ShortKitSDK.VideoCarouselOverlayMode) -> Swift.Bool
|
|
251
|
+
}
|
|
252
|
+
extension ShortKitSDK.VideoCarouselOverlayMode : Swift.Codable {
|
|
253
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
254
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
255
|
+
}
|
|
219
256
|
public enum SurveyOverlayMode {
|
|
220
257
|
case none
|
|
221
258
|
case custom(@Sendable () -> any UIKit.UIView & ShortKitSDK.SurveyOverlay)
|
|
@@ -239,31 +276,46 @@ extension ShortKitSDK.AdOverlayMode : Swift.Codable {
|
|
|
239
276
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
240
277
|
}
|
|
241
278
|
public protocol ShortKitDelegate : AnyObject {
|
|
242
|
-
func
|
|
279
|
+
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didChangeRefreshState state: ShortKitSDK.ShortKitRefreshState)
|
|
243
280
|
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
244
281
|
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFetchContentItems items: [ShortKitSDK.ContentItem])
|
|
245
282
|
}
|
|
246
283
|
extension ShortKitSDK.ShortKitDelegate {
|
|
247
|
-
public func
|
|
284
|
+
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didChangeRefreshState state: ShortKitSDK.ShortKitRefreshState)
|
|
248
285
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
249
286
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFetchContentItems items: [ShortKitSDK.ContentItem])
|
|
250
287
|
}
|
|
288
|
+
@_hasMissingDesignatedInitializers final public class FeedPreload : @unchecked Swift.Sendable {
|
|
289
|
+
@objc deinit
|
|
290
|
+
}
|
|
251
291
|
@_Concurrency.MainActor @preconcurrency public struct ShortKitFeedView : SwiftUI.UIViewControllerRepresentable {
|
|
252
|
-
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit)
|
|
292
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig = FeedConfig(), onFeedReady: (() -> Swift.Void)? = nil)
|
|
293
|
+
@_Concurrency.MainActor @preconcurrency public func makeCoordinator() -> ShortKitSDK.ShortKitFeedView.Coordinator
|
|
253
294
|
@_Concurrency.MainActor @preconcurrency public func makeUIViewController(context: ShortKitSDK.ShortKitFeedView.Context) -> ShortKitSDK.ShortKitFeedViewController
|
|
254
295
|
@_Concurrency.MainActor @preconcurrency public func updateUIViewController(_ uiViewController: ShortKitSDK.ShortKitFeedViewController, context: ShortKitSDK.ShortKitFeedView.Context)
|
|
296
|
+
@_hasMissingDesignatedInitializers final public class Coordinator {
|
|
297
|
+
weak final public var feedViewController: ShortKitSDK.ShortKitFeedViewController?
|
|
298
|
+
@objc deinit
|
|
299
|
+
}
|
|
255
300
|
public typealias Body = Swift.Never
|
|
256
|
-
public typealias Coordinator = Swift.Void
|
|
257
301
|
public typealias UIViewControllerType = ShortKitSDK.ShortKitFeedViewController
|
|
258
302
|
}
|
|
259
303
|
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class ShortKitFeedViewController : UIKit.UIViewController {
|
|
260
304
|
@_Concurrency.MainActor @preconcurrency public var onDismiss: (() -> Swift.Void)?
|
|
261
|
-
@_Concurrency.MainActor @preconcurrency public
|
|
305
|
+
@_Concurrency.MainActor @preconcurrency public var onRemainingContentCountChange: ((Swift.Int) -> Swift.Void)?
|
|
306
|
+
@_Concurrency.MainActor @preconcurrency public var onFeedReady: (() -> Swift.Void)?
|
|
307
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig, startAtItemId: Swift.String? = nil)
|
|
308
|
+
@_Concurrency.MainActor public func setFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
309
|
+
@_Concurrency.MainActor public func appendFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
310
|
+
@_Concurrency.MainActor public func applyFilter(_ filter: ShortKitSDK.FeedFilter?)
|
|
262
311
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLoad()
|
|
263
312
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLayoutSubviews()
|
|
264
313
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillAppear(_ animated: Swift.Bool)
|
|
265
314
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidAppear(_ animated: Swift.Bool)
|
|
266
315
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillDisappear(_ animated: Swift.Bool)
|
|
316
|
+
@_Concurrency.MainActor @preconcurrency public func setBridgeManaged()
|
|
317
|
+
@_Concurrency.MainActor @preconcurrency public func activate()
|
|
318
|
+
@_Concurrency.MainActor @preconcurrency public func deactivate()
|
|
267
319
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidDisappear(_ animated: Swift.Bool)
|
|
268
320
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public var supportedInterfaceOrientations: UIKit.UIInterfaceOrientationMask {
|
|
269
321
|
@objc get
|
|
@@ -276,6 +328,7 @@ extension ShortKitSDK.ShortKitFeedViewController : UIKit.UICollectionViewDelegat
|
|
|
276
328
|
@_Concurrency.MainActor @preconcurrency @objc dynamic public func scrollViewWillBeginDragging(_ scrollView: UIKit.UIScrollView)
|
|
277
329
|
@_Concurrency.MainActor @preconcurrency @objc dynamic public func scrollViewDidEndDecelerating(_ scrollView: UIKit.UIScrollView)
|
|
278
330
|
@_Concurrency.MainActor @preconcurrency @objc dynamic public func scrollViewDidEndDragging(_ scrollView: UIKit.UIScrollView, willDecelerate decelerate: Swift.Bool)
|
|
331
|
+
@_Concurrency.MainActor @preconcurrency @objc dynamic public func scrollViewDidScrollToTop(_ scrollView: UIKit.UIScrollView)
|
|
279
332
|
@_Concurrency.MainActor @preconcurrency @objc dynamic public func scrollViewDidScroll(_ scrollView: UIKit.UIScrollView)
|
|
280
333
|
}
|
|
281
334
|
extension ShortKitSDK.ShortKitFeedViewController : UIKit.UICollectionViewDataSourcePrefetching {
|
|
@@ -289,6 +342,12 @@ extension ShortKitSDK.ShortKitFeedViewController : ShortKitSDK.ShortKitAdDelegat
|
|
|
289
342
|
@_Concurrency.MainActor @preconcurrency public func adDidFail(_ ad: ShortKitSDK.PreparedAd, error: ShortKitSDK.AdError)
|
|
290
343
|
@_Concurrency.MainActor @preconcurrency public func adDidReceiveClick(_ ad: ShortKitSDK.PreparedAd)
|
|
291
344
|
}
|
|
345
|
+
public enum ShortKitRefreshState : Swift.Sendable {
|
|
346
|
+
case idle
|
|
347
|
+
case pulling(progress: CoreFoundation.CGFloat)
|
|
348
|
+
case triggered
|
|
349
|
+
case refreshing
|
|
350
|
+
}
|
|
292
351
|
public enum AdError : Swift.Error, Swift.Equatable {
|
|
293
352
|
case noFill
|
|
294
353
|
case timeout
|
|
@@ -370,12 +429,14 @@ public struct ContentItem : Swift.Codable, Swift.Equatable, @unchecked Swift.Sen
|
|
|
370
429
|
public enum FeedInput : Swift.Sendable {
|
|
371
430
|
case video(playbackId: Swift.String, fallbackUrl: Swift.String? = nil)
|
|
372
431
|
case imageCarousel(ShortKitSDK.ImageCarouselItem)
|
|
432
|
+
case videoCarousel(ShortKitSDK.VideoCarouselItem)
|
|
373
433
|
}
|
|
374
434
|
public enum FeedItem : Swift.Sendable {
|
|
375
435
|
case content(ShortKitSDK.ContentItem)
|
|
376
436
|
case adSlot(ShortKitSDK.AdSlot)
|
|
377
437
|
case imageCarousel(ShortKitSDK.ImageCarouselItem)
|
|
378
438
|
case survey(ShortKitSDK.SurveyItem)
|
|
439
|
+
case videoCarousel(ShortKitSDK.VideoCarouselItem)
|
|
379
440
|
public var isContent: Swift.Bool {
|
|
380
441
|
get
|
|
381
442
|
}
|
|
@@ -388,6 +449,9 @@ public enum FeedItem : Swift.Sendable {
|
|
|
388
449
|
public var isSurvey: Swift.Bool {
|
|
389
450
|
get
|
|
390
451
|
}
|
|
452
|
+
public var isVideoCarousel: Swift.Bool {
|
|
453
|
+
get
|
|
454
|
+
}
|
|
391
455
|
public var isNonVideo: Swift.Bool {
|
|
392
456
|
get
|
|
393
457
|
}
|
|
@@ -403,6 +467,9 @@ public enum FeedItem : Swift.Sendable {
|
|
|
403
467
|
public var surveyItem: ShortKitSDK.SurveyItem? {
|
|
404
468
|
get
|
|
405
469
|
}
|
|
470
|
+
public var videoCarouselItem: ShortKitSDK.VideoCarouselItem? {
|
|
471
|
+
get
|
|
472
|
+
}
|
|
406
473
|
public var id: Swift.String {
|
|
407
474
|
get
|
|
408
475
|
}
|
|
@@ -421,14 +488,13 @@ extension ShortKitSDK.FeedItem : Swift.Codable {
|
|
|
421
488
|
public struct ImageCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
422
489
|
public let id: Swift.String
|
|
423
490
|
public let images: [ShortKitSDK.CarouselImage]
|
|
424
|
-
public let autoScrollInterval: Swift.Double?
|
|
425
491
|
public let caption: Swift.String?
|
|
426
492
|
public let title: Swift.String?
|
|
427
493
|
public let description: Swift.String?
|
|
428
494
|
public let author: Swift.String?
|
|
429
495
|
public let section: Swift.String?
|
|
430
496
|
public let articleUrl: Swift.String?
|
|
431
|
-
public init(id: Swift.String, images: [ShortKitSDK.CarouselImage],
|
|
497
|
+
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
498
|
public static func == (a: ShortKitSDK.ImageCarouselItem, b: ShortKitSDK.ImageCarouselItem) -> Swift.Bool
|
|
433
499
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
434
500
|
public init(from decoder: any Swift.Decoder) throws
|
|
@@ -507,6 +573,19 @@ public struct VTTCue : Swift.Equatable, Swift.Sendable {
|
|
|
507
573
|
public init(startTime: Swift.Double, endTime: Swift.Double, text: Swift.String)
|
|
508
574
|
public static func == (a: ShortKitSDK.VTTCue, b: ShortKitSDK.VTTCue) -> Swift.Bool
|
|
509
575
|
}
|
|
576
|
+
public struct VideoCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
577
|
+
public let id: Swift.String
|
|
578
|
+
public let videos: [ShortKitSDK.ContentItem]
|
|
579
|
+
public let title: Swift.String?
|
|
580
|
+
public let description: Swift.String?
|
|
581
|
+
public let author: Swift.String?
|
|
582
|
+
public let section: Swift.String?
|
|
583
|
+
public let articleUrl: Swift.String?
|
|
584
|
+
public init(id: Swift.String, videos: [ShortKitSDK.ContentItem], title: Swift.String? = nil, description: Swift.String? = nil, author: Swift.String? = nil, section: Swift.String? = nil, articleUrl: Swift.String? = nil)
|
|
585
|
+
public static func == (a: ShortKitSDK.VideoCarouselItem, b: ShortKitSDK.VideoCarouselItem) -> Swift.Bool
|
|
586
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
587
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
588
|
+
}
|
|
510
589
|
public protocol AdOverlay : AnyObject {
|
|
511
590
|
func configure(with content: ShortKitSDK.NativeAdContent)
|
|
512
591
|
func resetState()
|
|
@@ -515,12 +594,20 @@ public protocol CarouselOverlay : AnyObject {
|
|
|
515
594
|
var cachedImage: ((Swift.String) -> UIKit.UIImage?)? { get set }
|
|
516
595
|
func configure(with item: ShortKitSDK.ImageCarouselItem)
|
|
517
596
|
func resetState()
|
|
597
|
+
var wantsNativeImagePrefetch: Swift.Bool { get }
|
|
598
|
+
func activatePlayback()
|
|
599
|
+
func updateActiveImage(index: Swift.Int)
|
|
518
600
|
}
|
|
519
601
|
extension ShortKitSDK.CarouselOverlay {
|
|
520
602
|
public var cachedImage: ((Swift.String) -> UIKit.UIImage?)? {
|
|
521
603
|
get
|
|
522
604
|
set
|
|
523
605
|
}
|
|
606
|
+
public var wantsNativeImagePrefetch: Swift.Bool {
|
|
607
|
+
get
|
|
608
|
+
}
|
|
609
|
+
public func activatePlayback()
|
|
610
|
+
public func updateActiveImage(index: Swift.Int)
|
|
524
611
|
}
|
|
525
612
|
final public class CellContent : Combine.ObservableObject {
|
|
526
613
|
@Combine.Published @_projectedValueProperty($item) final public var item: ShortKitSDK.ContentItem? {
|
|
@@ -542,7 +629,6 @@ final public class CellContent : Combine.ObservableObject {
|
|
|
542
629
|
public protocol FeedOverlay : AnyObject {
|
|
543
630
|
func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
544
631
|
func configure(with item: ShortKitSDK.ContentItem)
|
|
545
|
-
func resetPlaybackProgress()
|
|
546
632
|
func activatePlayback()
|
|
547
633
|
}
|
|
548
634
|
public protocol SurveyOverlay : AnyObject {
|
|
@@ -551,6 +637,19 @@ public protocol SurveyOverlay : AnyObject {
|
|
|
551
637
|
func configure(with item: ShortKitSDK.SurveyItem)
|
|
552
638
|
func resetState()
|
|
553
639
|
}
|
|
640
|
+
public protocol VideoCarouselOverlay : AnyObject {
|
|
641
|
+
func configure(with item: ShortKitSDK.VideoCarouselItem)
|
|
642
|
+
func updateActiveVideo(index: Swift.Int, item: ShortKitSDK.ContentItem)
|
|
643
|
+
func resetState()
|
|
644
|
+
func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
645
|
+
func activatePlayback()
|
|
646
|
+
func deactivatePlayback()
|
|
647
|
+
}
|
|
648
|
+
extension ShortKitSDK.VideoCarouselOverlay {
|
|
649
|
+
public func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
650
|
+
public func activatePlayback()
|
|
651
|
+
public func deactivatePlayback()
|
|
652
|
+
}
|
|
554
653
|
public struct PlayerTime : Swift.Equatable, Swift.Sendable {
|
|
555
654
|
public let current: Swift.Double
|
|
556
655
|
public let duration: Swift.Double
|
|
@@ -662,9 +761,6 @@ public enum ContentSignal : Swift.Equatable, Swift.Sendable {
|
|
|
662
761
|
final public var remainingContentCount: Combine.AnyPublisher<Swift.Int, Swift.Never> {
|
|
663
762
|
get
|
|
664
763
|
}
|
|
665
|
-
final public var feedReady: Combine.AnyPublisher<Swift.Void, Swift.Never> {
|
|
666
|
-
get
|
|
667
|
-
}
|
|
668
764
|
final public var currentItemValue: ShortKitSDK.ContentItem? {
|
|
669
765
|
get
|
|
670
766
|
}
|
|
@@ -724,12 +820,13 @@ public enum ShortKitVersion {
|
|
|
724
820
|
final public class ShortKit {
|
|
725
821
|
final public let player: ShortKitSDK.ShortKitPlayer
|
|
726
822
|
weak final public var delegate: (any ShortKitSDK.ShortKitDelegate)?
|
|
727
|
-
public
|
|
728
|
-
|
|
823
|
+
final public var loadingViewProvider: (() -> UIKit.UIView)?
|
|
824
|
+
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)
|
|
825
|
+
final public func preloadFeed(filter: ShortKitSDK.FeedFilter? = nil, limit: Swift.Int = 10) -> ShortKitSDK.FeedPreload
|
|
826
|
+
final public func preloadFeed(items: [ShortKitSDK.FeedInput]) -> ShortKitSDK.FeedPreload
|
|
827
|
+
final public func fetchContent(limit: Swift.Int = 10, filter: ShortKitSDK.FeedFilter? = nil) async throws -> [ShortKitSDK.ContentItem]
|
|
729
828
|
final public func setUserId(_ id: Swift.String)
|
|
730
829
|
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
830
|
@_Concurrency.MainActor final public func setColdStartQueue(_ items: [ShortKitSDK.FeedInput])
|
|
734
831
|
final public func clearColdStartCache()
|
|
735
832
|
@objc deinit
|
|
@@ -751,7 +848,8 @@ public struct PlayerConfig {
|
|
|
751
848
|
public var loop: Swift.Bool
|
|
752
849
|
public var muteOnStart: Swift.Bool
|
|
753
850
|
public var videoOverlay: ShortKitSDK.VideoOverlayMode
|
|
754
|
-
public
|
|
851
|
+
public var feedConfig: ShortKitSDK.FeedConfig
|
|
852
|
+
public init(cornerRadius: CoreFoundation.CGFloat = 12, clickAction: ShortKitSDK.PlayerClickAction = .feed, autoplay: Swift.Bool = true, loop: Swift.Bool = true, muteOnStart: Swift.Bool = true, videoOverlay: ShortKitSDK.VideoOverlayMode = .none, feedConfig: ShortKitSDK.FeedConfig = FeedConfig())
|
|
755
853
|
}
|
|
756
854
|
@_Concurrency.MainActor @preconcurrency public struct ShortKitPlayerView : SwiftUI.UIViewControllerRepresentable {
|
|
757
855
|
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.PlayerConfig = PlayerConfig())
|
|
@@ -804,10 +902,13 @@ public struct WidgetConfig {
|
|
|
804
902
|
public var rotationInterval: Foundation.TimeInterval
|
|
805
903
|
public var clickAction: ShortKitSDK.PlayerClickAction
|
|
806
904
|
public var cardOverlay: ShortKitSDK.VideoOverlayMode
|
|
807
|
-
public
|
|
905
|
+
public var feedConfig: ShortKitSDK.FeedConfig
|
|
906
|
+
public init(cardCount: Swift.Int = 3, cardSpacing: CoreFoundation.CGFloat = 8, cornerRadius: CoreFoundation.CGFloat = 12, autoplay: Swift.Bool = true, muteOnStart: Swift.Bool = true, loop: Swift.Bool = true, rotationInterval: Foundation.TimeInterval = 10, clickAction: ShortKitSDK.PlayerClickAction = .feed, cardOverlay: ShortKitSDK.VideoOverlayMode = .none, feedConfig: ShortKitSDK.FeedConfig = FeedConfig())
|
|
808
907
|
}
|
|
809
908
|
extension ShortKitSDK.AdQuartile : Swift.Equatable {}
|
|
810
909
|
extension ShortKitSDK.AdQuartile : Swift.Hashable {}
|
|
910
|
+
extension ShortKitSDK.ScrollAxis : Swift.Hashable {}
|
|
911
|
+
extension ShortKitSDK.ScrollAxis : Swift.RawRepresentable {}
|
|
811
912
|
extension ShortKitSDK.FeedSource : Swift.Hashable {}
|
|
812
913
|
extension ShortKitSDK.FeedSource : Swift.RawRepresentable {}
|
|
813
914
|
extension ShortKitSDK.ShortKitFeedView : Swift.Sendable {}
|
|
@@ -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-simulator -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,17 +187,33 @@ 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
|
|
206
|
+
public var videoCarouselOverlay: ShortKitSDK.VideoCarouselOverlayMode
|
|
184
207
|
public var surveyOverlay: ShortKitSDK.SurveyOverlayMode
|
|
185
208
|
public var adOverlay: ShortKitSDK.AdOverlayMode
|
|
186
209
|
public var muteOnStart: Swift.Bool
|
|
187
210
|
public var autoplay: Swift.Bool
|
|
188
211
|
public var feedSource: ShortKitSDK.FeedSource
|
|
189
212
|
public var coldStartEnabled: Swift.Bool
|
|
190
|
-
public
|
|
213
|
+
public var pullToRefreshEnabled: Swift.Bool
|
|
214
|
+
public var filter: ShortKitSDK.FeedFilter?
|
|
215
|
+
public var preload: ShortKitSDK.FeedPreload?
|
|
216
|
+
public init(feedHeight: ShortKitSDK.FeedHeight = .fullscreen, scrollAxis: ShortKitSDK.ScrollAxis = .vertical, videoOverlay: ShortKitSDK.VideoOverlayMode = .none, carouselOverlay: ShortKitSDK.CarouselOverlayMode = .none, videoCarouselOverlay: ShortKitSDK.VideoCarouselOverlayMode = .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, pullToRefreshEnabled: Swift.Bool = true, filter: ShortKitSDK.FeedFilter? = nil, preload: ShortKitSDK.FeedPreload? = nil)
|
|
191
217
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
192
218
|
public init(from decoder: any Swift.Decoder) throws
|
|
193
219
|
}
|
|
@@ -216,6 +242,17 @@ extension ShortKitSDK.CarouselOverlayMode : Swift.Codable {
|
|
|
216
242
|
public init(from decoder: any Swift.Decoder) throws
|
|
217
243
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
218
244
|
}
|
|
245
|
+
public enum VideoCarouselOverlayMode {
|
|
246
|
+
case none
|
|
247
|
+
case custom(@Sendable () -> any UIKit.UIView & ShortKitSDK.VideoCarouselOverlay)
|
|
248
|
+
}
|
|
249
|
+
extension ShortKitSDK.VideoCarouselOverlayMode : Swift.Equatable {
|
|
250
|
+
public static func == (lhs: ShortKitSDK.VideoCarouselOverlayMode, rhs: ShortKitSDK.VideoCarouselOverlayMode) -> Swift.Bool
|
|
251
|
+
}
|
|
252
|
+
extension ShortKitSDK.VideoCarouselOverlayMode : Swift.Codable {
|
|
253
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
254
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
255
|
+
}
|
|
219
256
|
public enum SurveyOverlayMode {
|
|
220
257
|
case none
|
|
221
258
|
case custom(@Sendable () -> any UIKit.UIView & ShortKitSDK.SurveyOverlay)
|
|
@@ -239,31 +276,46 @@ extension ShortKitSDK.AdOverlayMode : Swift.Codable {
|
|
|
239
276
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
240
277
|
}
|
|
241
278
|
public protocol ShortKitDelegate : AnyObject {
|
|
242
|
-
func
|
|
279
|
+
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didChangeRefreshState state: ShortKitSDK.ShortKitRefreshState)
|
|
243
280
|
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
244
281
|
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFetchContentItems items: [ShortKitSDK.ContentItem])
|
|
245
282
|
}
|
|
246
283
|
extension ShortKitSDK.ShortKitDelegate {
|
|
247
|
-
public func
|
|
284
|
+
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didChangeRefreshState state: ShortKitSDK.ShortKitRefreshState)
|
|
248
285
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
249
286
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFetchContentItems items: [ShortKitSDK.ContentItem])
|
|
250
287
|
}
|
|
288
|
+
@_hasMissingDesignatedInitializers final public class FeedPreload : @unchecked Swift.Sendable {
|
|
289
|
+
@objc deinit
|
|
290
|
+
}
|
|
251
291
|
@_Concurrency.MainActor @preconcurrency public struct ShortKitFeedView : SwiftUI.UIViewControllerRepresentable {
|
|
252
|
-
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit)
|
|
292
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig = FeedConfig(), onFeedReady: (() -> Swift.Void)? = nil)
|
|
293
|
+
@_Concurrency.MainActor @preconcurrency public func makeCoordinator() -> ShortKitSDK.ShortKitFeedView.Coordinator
|
|
253
294
|
@_Concurrency.MainActor @preconcurrency public func makeUIViewController(context: ShortKitSDK.ShortKitFeedView.Context) -> ShortKitSDK.ShortKitFeedViewController
|
|
254
295
|
@_Concurrency.MainActor @preconcurrency public func updateUIViewController(_ uiViewController: ShortKitSDK.ShortKitFeedViewController, context: ShortKitSDK.ShortKitFeedView.Context)
|
|
296
|
+
@_hasMissingDesignatedInitializers final public class Coordinator {
|
|
297
|
+
weak final public var feedViewController: ShortKitSDK.ShortKitFeedViewController?
|
|
298
|
+
@objc deinit
|
|
299
|
+
}
|
|
255
300
|
public typealias Body = Swift.Never
|
|
256
|
-
public typealias Coordinator = Swift.Void
|
|
257
301
|
public typealias UIViewControllerType = ShortKitSDK.ShortKitFeedViewController
|
|
258
302
|
}
|
|
259
303
|
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class ShortKitFeedViewController : UIKit.UIViewController {
|
|
260
304
|
@_Concurrency.MainActor @preconcurrency public var onDismiss: (() -> Swift.Void)?
|
|
261
|
-
@_Concurrency.MainActor @preconcurrency public
|
|
305
|
+
@_Concurrency.MainActor @preconcurrency public var onRemainingContentCountChange: ((Swift.Int) -> Swift.Void)?
|
|
306
|
+
@_Concurrency.MainActor @preconcurrency public var onFeedReady: (() -> Swift.Void)?
|
|
307
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig, startAtItemId: Swift.String? = nil)
|
|
308
|
+
@_Concurrency.MainActor public func setFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
309
|
+
@_Concurrency.MainActor public func appendFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
310
|
+
@_Concurrency.MainActor public func applyFilter(_ filter: ShortKitSDK.FeedFilter?)
|
|
262
311
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLoad()
|
|
263
312
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLayoutSubviews()
|
|
264
313
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillAppear(_ animated: Swift.Bool)
|
|
265
314
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidAppear(_ animated: Swift.Bool)
|
|
266
315
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillDisappear(_ animated: Swift.Bool)
|
|
316
|
+
@_Concurrency.MainActor @preconcurrency public func setBridgeManaged()
|
|
317
|
+
@_Concurrency.MainActor @preconcurrency public func activate()
|
|
318
|
+
@_Concurrency.MainActor @preconcurrency public func deactivate()
|
|
267
319
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidDisappear(_ animated: Swift.Bool)
|
|
268
320
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public var supportedInterfaceOrientations: UIKit.UIInterfaceOrientationMask {
|
|
269
321
|
@objc get
|
|
@@ -276,6 +328,7 @@ extension ShortKitSDK.ShortKitFeedViewController : UIKit.UICollectionViewDelegat
|
|
|
276
328
|
@_Concurrency.MainActor @preconcurrency @objc dynamic public func scrollViewWillBeginDragging(_ scrollView: UIKit.UIScrollView)
|
|
277
329
|
@_Concurrency.MainActor @preconcurrency @objc dynamic public func scrollViewDidEndDecelerating(_ scrollView: UIKit.UIScrollView)
|
|
278
330
|
@_Concurrency.MainActor @preconcurrency @objc dynamic public func scrollViewDidEndDragging(_ scrollView: UIKit.UIScrollView, willDecelerate decelerate: Swift.Bool)
|
|
331
|
+
@_Concurrency.MainActor @preconcurrency @objc dynamic public func scrollViewDidScrollToTop(_ scrollView: UIKit.UIScrollView)
|
|
279
332
|
@_Concurrency.MainActor @preconcurrency @objc dynamic public func scrollViewDidScroll(_ scrollView: UIKit.UIScrollView)
|
|
280
333
|
}
|
|
281
334
|
extension ShortKitSDK.ShortKitFeedViewController : UIKit.UICollectionViewDataSourcePrefetching {
|
|
@@ -289,6 +342,12 @@ extension ShortKitSDK.ShortKitFeedViewController : ShortKitSDK.ShortKitAdDelegat
|
|
|
289
342
|
@_Concurrency.MainActor @preconcurrency public func adDidFail(_ ad: ShortKitSDK.PreparedAd, error: ShortKitSDK.AdError)
|
|
290
343
|
@_Concurrency.MainActor @preconcurrency public func adDidReceiveClick(_ ad: ShortKitSDK.PreparedAd)
|
|
291
344
|
}
|
|
345
|
+
public enum ShortKitRefreshState : Swift.Sendable {
|
|
346
|
+
case idle
|
|
347
|
+
case pulling(progress: CoreFoundation.CGFloat)
|
|
348
|
+
case triggered
|
|
349
|
+
case refreshing
|
|
350
|
+
}
|
|
292
351
|
public enum AdError : Swift.Error, Swift.Equatable {
|
|
293
352
|
case noFill
|
|
294
353
|
case timeout
|
|
@@ -370,12 +429,14 @@ public struct ContentItem : Swift.Codable, Swift.Equatable, @unchecked Swift.Sen
|
|
|
370
429
|
public enum FeedInput : Swift.Sendable {
|
|
371
430
|
case video(playbackId: Swift.String, fallbackUrl: Swift.String? = nil)
|
|
372
431
|
case imageCarousel(ShortKitSDK.ImageCarouselItem)
|
|
432
|
+
case videoCarousel(ShortKitSDK.VideoCarouselItem)
|
|
373
433
|
}
|
|
374
434
|
public enum FeedItem : Swift.Sendable {
|
|
375
435
|
case content(ShortKitSDK.ContentItem)
|
|
376
436
|
case adSlot(ShortKitSDK.AdSlot)
|
|
377
437
|
case imageCarousel(ShortKitSDK.ImageCarouselItem)
|
|
378
438
|
case survey(ShortKitSDK.SurveyItem)
|
|
439
|
+
case videoCarousel(ShortKitSDK.VideoCarouselItem)
|
|
379
440
|
public var isContent: Swift.Bool {
|
|
380
441
|
get
|
|
381
442
|
}
|
|
@@ -388,6 +449,9 @@ public enum FeedItem : Swift.Sendable {
|
|
|
388
449
|
public var isSurvey: Swift.Bool {
|
|
389
450
|
get
|
|
390
451
|
}
|
|
452
|
+
public var isVideoCarousel: Swift.Bool {
|
|
453
|
+
get
|
|
454
|
+
}
|
|
391
455
|
public var isNonVideo: Swift.Bool {
|
|
392
456
|
get
|
|
393
457
|
}
|
|
@@ -403,6 +467,9 @@ public enum FeedItem : Swift.Sendable {
|
|
|
403
467
|
public var surveyItem: ShortKitSDK.SurveyItem? {
|
|
404
468
|
get
|
|
405
469
|
}
|
|
470
|
+
public var videoCarouselItem: ShortKitSDK.VideoCarouselItem? {
|
|
471
|
+
get
|
|
472
|
+
}
|
|
406
473
|
public var id: Swift.String {
|
|
407
474
|
get
|
|
408
475
|
}
|
|
@@ -421,14 +488,13 @@ extension ShortKitSDK.FeedItem : Swift.Codable {
|
|
|
421
488
|
public struct ImageCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
422
489
|
public let id: Swift.String
|
|
423
490
|
public let images: [ShortKitSDK.CarouselImage]
|
|
424
|
-
public let autoScrollInterval: Swift.Double?
|
|
425
491
|
public let caption: Swift.String?
|
|
426
492
|
public let title: Swift.String?
|
|
427
493
|
public let description: Swift.String?
|
|
428
494
|
public let author: Swift.String?
|
|
429
495
|
public let section: Swift.String?
|
|
430
496
|
public let articleUrl: Swift.String?
|
|
431
|
-
public init(id: Swift.String, images: [ShortKitSDK.CarouselImage],
|
|
497
|
+
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
498
|
public static func == (a: ShortKitSDK.ImageCarouselItem, b: ShortKitSDK.ImageCarouselItem) -> Swift.Bool
|
|
433
499
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
434
500
|
public init(from decoder: any Swift.Decoder) throws
|
|
@@ -507,6 +573,19 @@ public struct VTTCue : Swift.Equatable, Swift.Sendable {
|
|
|
507
573
|
public init(startTime: Swift.Double, endTime: Swift.Double, text: Swift.String)
|
|
508
574
|
public static func == (a: ShortKitSDK.VTTCue, b: ShortKitSDK.VTTCue) -> Swift.Bool
|
|
509
575
|
}
|
|
576
|
+
public struct VideoCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
577
|
+
public let id: Swift.String
|
|
578
|
+
public let videos: [ShortKitSDK.ContentItem]
|
|
579
|
+
public let title: Swift.String?
|
|
580
|
+
public let description: Swift.String?
|
|
581
|
+
public let author: Swift.String?
|
|
582
|
+
public let section: Swift.String?
|
|
583
|
+
public let articleUrl: Swift.String?
|
|
584
|
+
public init(id: Swift.String, videos: [ShortKitSDK.ContentItem], title: Swift.String? = nil, description: Swift.String? = nil, author: Swift.String? = nil, section: Swift.String? = nil, articleUrl: Swift.String? = nil)
|
|
585
|
+
public static func == (a: ShortKitSDK.VideoCarouselItem, b: ShortKitSDK.VideoCarouselItem) -> Swift.Bool
|
|
586
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
587
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
588
|
+
}
|
|
510
589
|
public protocol AdOverlay : AnyObject {
|
|
511
590
|
func configure(with content: ShortKitSDK.NativeAdContent)
|
|
512
591
|
func resetState()
|
|
@@ -515,12 +594,20 @@ public protocol CarouselOverlay : AnyObject {
|
|
|
515
594
|
var cachedImage: ((Swift.String) -> UIKit.UIImage?)? { get set }
|
|
516
595
|
func configure(with item: ShortKitSDK.ImageCarouselItem)
|
|
517
596
|
func resetState()
|
|
597
|
+
var wantsNativeImagePrefetch: Swift.Bool { get }
|
|
598
|
+
func activatePlayback()
|
|
599
|
+
func updateActiveImage(index: Swift.Int)
|
|
518
600
|
}
|
|
519
601
|
extension ShortKitSDK.CarouselOverlay {
|
|
520
602
|
public var cachedImage: ((Swift.String) -> UIKit.UIImage?)? {
|
|
521
603
|
get
|
|
522
604
|
set
|
|
523
605
|
}
|
|
606
|
+
public var wantsNativeImagePrefetch: Swift.Bool {
|
|
607
|
+
get
|
|
608
|
+
}
|
|
609
|
+
public func activatePlayback()
|
|
610
|
+
public func updateActiveImage(index: Swift.Int)
|
|
524
611
|
}
|
|
525
612
|
final public class CellContent : Combine.ObservableObject {
|
|
526
613
|
@Combine.Published @_projectedValueProperty($item) final public var item: ShortKitSDK.ContentItem? {
|
|
@@ -542,7 +629,6 @@ final public class CellContent : Combine.ObservableObject {
|
|
|
542
629
|
public protocol FeedOverlay : AnyObject {
|
|
543
630
|
func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
544
631
|
func configure(with item: ShortKitSDK.ContentItem)
|
|
545
|
-
func resetPlaybackProgress()
|
|
546
632
|
func activatePlayback()
|
|
547
633
|
}
|
|
548
634
|
public protocol SurveyOverlay : AnyObject {
|
|
@@ -551,6 +637,19 @@ public protocol SurveyOverlay : AnyObject {
|
|
|
551
637
|
func configure(with item: ShortKitSDK.SurveyItem)
|
|
552
638
|
func resetState()
|
|
553
639
|
}
|
|
640
|
+
public protocol VideoCarouselOverlay : AnyObject {
|
|
641
|
+
func configure(with item: ShortKitSDK.VideoCarouselItem)
|
|
642
|
+
func updateActiveVideo(index: Swift.Int, item: ShortKitSDK.ContentItem)
|
|
643
|
+
func resetState()
|
|
644
|
+
func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
645
|
+
func activatePlayback()
|
|
646
|
+
func deactivatePlayback()
|
|
647
|
+
}
|
|
648
|
+
extension ShortKitSDK.VideoCarouselOverlay {
|
|
649
|
+
public func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
650
|
+
public func activatePlayback()
|
|
651
|
+
public func deactivatePlayback()
|
|
652
|
+
}
|
|
554
653
|
public struct PlayerTime : Swift.Equatable, Swift.Sendable {
|
|
555
654
|
public let current: Swift.Double
|
|
556
655
|
public let duration: Swift.Double
|
|
@@ -662,9 +761,6 @@ public enum ContentSignal : Swift.Equatable, Swift.Sendable {
|
|
|
662
761
|
final public var remainingContentCount: Combine.AnyPublisher<Swift.Int, Swift.Never> {
|
|
663
762
|
get
|
|
664
763
|
}
|
|
665
|
-
final public var feedReady: Combine.AnyPublisher<Swift.Void, Swift.Never> {
|
|
666
|
-
get
|
|
667
|
-
}
|
|
668
764
|
final public var currentItemValue: ShortKitSDK.ContentItem? {
|
|
669
765
|
get
|
|
670
766
|
}
|
|
@@ -724,12 +820,13 @@ public enum ShortKitVersion {
|
|
|
724
820
|
final public class ShortKit {
|
|
725
821
|
final public let player: ShortKitSDK.ShortKitPlayer
|
|
726
822
|
weak final public var delegate: (any ShortKitSDK.ShortKitDelegate)?
|
|
727
|
-
public
|
|
728
|
-
|
|
823
|
+
final public var loadingViewProvider: (() -> UIKit.UIView)?
|
|
824
|
+
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)
|
|
825
|
+
final public func preloadFeed(filter: ShortKitSDK.FeedFilter? = nil, limit: Swift.Int = 10) -> ShortKitSDK.FeedPreload
|
|
826
|
+
final public func preloadFeed(items: [ShortKitSDK.FeedInput]) -> ShortKitSDK.FeedPreload
|
|
827
|
+
final public func fetchContent(limit: Swift.Int = 10, filter: ShortKitSDK.FeedFilter? = nil) async throws -> [ShortKitSDK.ContentItem]
|
|
729
828
|
final public func setUserId(_ id: Swift.String)
|
|
730
829
|
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
830
|
@_Concurrency.MainActor final public func setColdStartQueue(_ items: [ShortKitSDK.FeedInput])
|
|
734
831
|
final public func clearColdStartCache()
|
|
735
832
|
@objc deinit
|
|
@@ -751,7 +848,8 @@ public struct PlayerConfig {
|
|
|
751
848
|
public var loop: Swift.Bool
|
|
752
849
|
public var muteOnStart: Swift.Bool
|
|
753
850
|
public var videoOverlay: ShortKitSDK.VideoOverlayMode
|
|
754
|
-
public
|
|
851
|
+
public var feedConfig: ShortKitSDK.FeedConfig
|
|
852
|
+
public init(cornerRadius: CoreFoundation.CGFloat = 12, clickAction: ShortKitSDK.PlayerClickAction = .feed, autoplay: Swift.Bool = true, loop: Swift.Bool = true, muteOnStart: Swift.Bool = true, videoOverlay: ShortKitSDK.VideoOverlayMode = .none, feedConfig: ShortKitSDK.FeedConfig = FeedConfig())
|
|
755
853
|
}
|
|
756
854
|
@_Concurrency.MainActor @preconcurrency public struct ShortKitPlayerView : SwiftUI.UIViewControllerRepresentable {
|
|
757
855
|
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.PlayerConfig = PlayerConfig())
|
|
@@ -804,10 +902,13 @@ public struct WidgetConfig {
|
|
|
804
902
|
public var rotationInterval: Foundation.TimeInterval
|
|
805
903
|
public var clickAction: ShortKitSDK.PlayerClickAction
|
|
806
904
|
public var cardOverlay: ShortKitSDK.VideoOverlayMode
|
|
807
|
-
public
|
|
905
|
+
public var feedConfig: ShortKitSDK.FeedConfig
|
|
906
|
+
public init(cardCount: Swift.Int = 3, cardSpacing: CoreFoundation.CGFloat = 8, cornerRadius: CoreFoundation.CGFloat = 12, autoplay: Swift.Bool = true, muteOnStart: Swift.Bool = true, loop: Swift.Bool = true, rotationInterval: Foundation.TimeInterval = 10, clickAction: ShortKitSDK.PlayerClickAction = .feed, cardOverlay: ShortKitSDK.VideoOverlayMode = .none, feedConfig: ShortKitSDK.FeedConfig = FeedConfig())
|
|
808
907
|
}
|
|
809
908
|
extension ShortKitSDK.AdQuartile : Swift.Equatable {}
|
|
810
909
|
extension ShortKitSDK.AdQuartile : Swift.Hashable {}
|
|
910
|
+
extension ShortKitSDK.ScrollAxis : Swift.Hashable {}
|
|
911
|
+
extension ShortKitSDK.ScrollAxis : Swift.RawRepresentable {}
|
|
811
912
|
extension ShortKitSDK.FeedSource : Swift.Hashable {}
|
|
812
913
|
extension ShortKitSDK.FeedSource : Swift.RawRepresentable {}
|
|
813
914
|
extension ShortKitSDK.ShortKitFeedView : Swift.Sendable {}
|