@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 -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,32 @@ 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 filter: ShortKitSDK.FeedFilter?
|
|
214
|
+
public var preload: ShortKitSDK.FeedPreload?
|
|
215
|
+
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, filter: ShortKitSDK.FeedFilter? = nil, preload: ShortKitSDK.FeedPreload? = nil)
|
|
191
216
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
192
217
|
public init(from decoder: any Swift.Decoder) throws
|
|
193
218
|
}
|
|
@@ -216,6 +241,17 @@ extension ShortKitSDK.CarouselOverlayMode : Swift.Codable {
|
|
|
216
241
|
public init(from decoder: any Swift.Decoder) throws
|
|
217
242
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
218
243
|
}
|
|
244
|
+
public enum VideoCarouselOverlayMode {
|
|
245
|
+
case none
|
|
246
|
+
case custom(@Sendable () -> any UIKit.UIView & ShortKitSDK.VideoCarouselOverlay)
|
|
247
|
+
}
|
|
248
|
+
extension ShortKitSDK.VideoCarouselOverlayMode : Swift.Equatable {
|
|
249
|
+
public static func == (lhs: ShortKitSDK.VideoCarouselOverlayMode, rhs: ShortKitSDK.VideoCarouselOverlayMode) -> Swift.Bool
|
|
250
|
+
}
|
|
251
|
+
extension ShortKitSDK.VideoCarouselOverlayMode : Swift.Codable {
|
|
252
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
253
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
254
|
+
}
|
|
219
255
|
public enum SurveyOverlayMode {
|
|
220
256
|
case none
|
|
221
257
|
case custom(@Sendable () -> any UIKit.UIView & ShortKitSDK.SurveyOverlay)
|
|
@@ -248,22 +284,37 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
248
284
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
249
285
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFetchContentItems items: [ShortKitSDK.ContentItem])
|
|
250
286
|
}
|
|
287
|
+
@_hasMissingDesignatedInitializers final public class FeedPreload : @unchecked Swift.Sendable {
|
|
288
|
+
@objc deinit
|
|
289
|
+
}
|
|
251
290
|
@_Concurrency.MainActor @preconcurrency public struct ShortKitFeedView : SwiftUI.UIViewControllerRepresentable {
|
|
252
|
-
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit)
|
|
291
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig = FeedConfig(), onFeedReady: (() -> Swift.Void)? = nil)
|
|
292
|
+
@_Concurrency.MainActor @preconcurrency public func makeCoordinator() -> ShortKitSDK.ShortKitFeedView.Coordinator
|
|
253
293
|
@_Concurrency.MainActor @preconcurrency public func makeUIViewController(context: ShortKitSDK.ShortKitFeedView.Context) -> ShortKitSDK.ShortKitFeedViewController
|
|
254
294
|
@_Concurrency.MainActor @preconcurrency public func updateUIViewController(_ uiViewController: ShortKitSDK.ShortKitFeedViewController, context: ShortKitSDK.ShortKitFeedView.Context)
|
|
295
|
+
@_hasMissingDesignatedInitializers final public class Coordinator {
|
|
296
|
+
weak final public var feedViewController: ShortKitSDK.ShortKitFeedViewController?
|
|
297
|
+
@objc deinit
|
|
298
|
+
}
|
|
255
299
|
public typealias Body = Swift.Never
|
|
256
|
-
public typealias Coordinator = Swift.Void
|
|
257
300
|
public typealias UIViewControllerType = ShortKitSDK.ShortKitFeedViewController
|
|
258
301
|
}
|
|
259
302
|
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class ShortKitFeedViewController : UIKit.UIViewController {
|
|
260
303
|
@_Concurrency.MainActor @preconcurrency public var onDismiss: (() -> Swift.Void)?
|
|
261
|
-
@_Concurrency.MainActor @preconcurrency public
|
|
304
|
+
@_Concurrency.MainActor @preconcurrency public var onRemainingContentCountChange: ((Swift.Int) -> Swift.Void)?
|
|
305
|
+
@_Concurrency.MainActor @preconcurrency public var onFeedReady: (() -> Swift.Void)?
|
|
306
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig, startAtItemId: Swift.String? = nil)
|
|
307
|
+
@_Concurrency.MainActor public func setFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
308
|
+
@_Concurrency.MainActor public func appendFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
309
|
+
@_Concurrency.MainActor public func applyFilter(_ filter: ShortKitSDK.FeedFilter?)
|
|
262
310
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLoad()
|
|
263
311
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLayoutSubviews()
|
|
264
312
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillAppear(_ animated: Swift.Bool)
|
|
265
313
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidAppear(_ animated: Swift.Bool)
|
|
266
314
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillDisappear(_ animated: Swift.Bool)
|
|
315
|
+
@_Concurrency.MainActor @preconcurrency public func setBridgeManaged()
|
|
316
|
+
@_Concurrency.MainActor @preconcurrency public func activate()
|
|
317
|
+
@_Concurrency.MainActor @preconcurrency public func deactivate()
|
|
267
318
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidDisappear(_ animated: Swift.Bool)
|
|
268
319
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public var supportedInterfaceOrientations: UIKit.UIInterfaceOrientationMask {
|
|
269
320
|
@objc get
|
|
@@ -370,12 +421,14 @@ public struct ContentItem : Swift.Codable, Swift.Equatable, @unchecked Swift.Sen
|
|
|
370
421
|
public enum FeedInput : Swift.Sendable {
|
|
371
422
|
case video(playbackId: Swift.String, fallbackUrl: Swift.String? = nil)
|
|
372
423
|
case imageCarousel(ShortKitSDK.ImageCarouselItem)
|
|
424
|
+
case videoCarousel(ShortKitSDK.VideoCarouselItem)
|
|
373
425
|
}
|
|
374
426
|
public enum FeedItem : Swift.Sendable {
|
|
375
427
|
case content(ShortKitSDK.ContentItem)
|
|
376
428
|
case adSlot(ShortKitSDK.AdSlot)
|
|
377
429
|
case imageCarousel(ShortKitSDK.ImageCarouselItem)
|
|
378
430
|
case survey(ShortKitSDK.SurveyItem)
|
|
431
|
+
case videoCarousel(ShortKitSDK.VideoCarouselItem)
|
|
379
432
|
public var isContent: Swift.Bool {
|
|
380
433
|
get
|
|
381
434
|
}
|
|
@@ -388,6 +441,9 @@ public enum FeedItem : Swift.Sendable {
|
|
|
388
441
|
public var isSurvey: Swift.Bool {
|
|
389
442
|
get
|
|
390
443
|
}
|
|
444
|
+
public var isVideoCarousel: Swift.Bool {
|
|
445
|
+
get
|
|
446
|
+
}
|
|
391
447
|
public var isNonVideo: Swift.Bool {
|
|
392
448
|
get
|
|
393
449
|
}
|
|
@@ -403,6 +459,9 @@ public enum FeedItem : Swift.Sendable {
|
|
|
403
459
|
public var surveyItem: ShortKitSDK.SurveyItem? {
|
|
404
460
|
get
|
|
405
461
|
}
|
|
462
|
+
public var videoCarouselItem: ShortKitSDK.VideoCarouselItem? {
|
|
463
|
+
get
|
|
464
|
+
}
|
|
406
465
|
public var id: Swift.String {
|
|
407
466
|
get
|
|
408
467
|
}
|
|
@@ -421,14 +480,13 @@ extension ShortKitSDK.FeedItem : Swift.Codable {
|
|
|
421
480
|
public struct ImageCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
422
481
|
public let id: Swift.String
|
|
423
482
|
public let images: [ShortKitSDK.CarouselImage]
|
|
424
|
-
public let autoScrollInterval: Swift.Double?
|
|
425
483
|
public let caption: Swift.String?
|
|
426
484
|
public let title: Swift.String?
|
|
427
485
|
public let description: Swift.String?
|
|
428
486
|
public let author: Swift.String?
|
|
429
487
|
public let section: Swift.String?
|
|
430
488
|
public let articleUrl: Swift.String?
|
|
431
|
-
public init(id: Swift.String, images: [ShortKitSDK.CarouselImage],
|
|
489
|
+
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
490
|
public static func == (a: ShortKitSDK.ImageCarouselItem, b: ShortKitSDK.ImageCarouselItem) -> Swift.Bool
|
|
433
491
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
434
492
|
public init(from decoder: any Swift.Decoder) throws
|
|
@@ -507,6 +565,19 @@ public struct VTTCue : Swift.Equatable, Swift.Sendable {
|
|
|
507
565
|
public init(startTime: Swift.Double, endTime: Swift.Double, text: Swift.String)
|
|
508
566
|
public static func == (a: ShortKitSDK.VTTCue, b: ShortKitSDK.VTTCue) -> Swift.Bool
|
|
509
567
|
}
|
|
568
|
+
public struct VideoCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
569
|
+
public let id: Swift.String
|
|
570
|
+
public let videos: [ShortKitSDK.ContentItem]
|
|
571
|
+
public let title: Swift.String?
|
|
572
|
+
public let description: Swift.String?
|
|
573
|
+
public let author: Swift.String?
|
|
574
|
+
public let section: Swift.String?
|
|
575
|
+
public let articleUrl: Swift.String?
|
|
576
|
+
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)
|
|
577
|
+
public static func == (a: ShortKitSDK.VideoCarouselItem, b: ShortKitSDK.VideoCarouselItem) -> Swift.Bool
|
|
578
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
579
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
580
|
+
}
|
|
510
581
|
public protocol AdOverlay : AnyObject {
|
|
511
582
|
func configure(with content: ShortKitSDK.NativeAdContent)
|
|
512
583
|
func resetState()
|
|
@@ -515,12 +586,20 @@ public protocol CarouselOverlay : AnyObject {
|
|
|
515
586
|
var cachedImage: ((Swift.String) -> UIKit.UIImage?)? { get set }
|
|
516
587
|
func configure(with item: ShortKitSDK.ImageCarouselItem)
|
|
517
588
|
func resetState()
|
|
589
|
+
var wantsNativeImagePrefetch: Swift.Bool { get }
|
|
590
|
+
func activatePlayback()
|
|
591
|
+
func updateActiveImage(index: Swift.Int)
|
|
518
592
|
}
|
|
519
593
|
extension ShortKitSDK.CarouselOverlay {
|
|
520
594
|
public var cachedImage: ((Swift.String) -> UIKit.UIImage?)? {
|
|
521
595
|
get
|
|
522
596
|
set
|
|
523
597
|
}
|
|
598
|
+
public var wantsNativeImagePrefetch: Swift.Bool {
|
|
599
|
+
get
|
|
600
|
+
}
|
|
601
|
+
public func activatePlayback()
|
|
602
|
+
public func updateActiveImage(index: Swift.Int)
|
|
524
603
|
}
|
|
525
604
|
final public class CellContent : Combine.ObservableObject {
|
|
526
605
|
@Combine.Published @_projectedValueProperty($item) final public var item: ShortKitSDK.ContentItem? {
|
|
@@ -542,7 +621,6 @@ final public class CellContent : Combine.ObservableObject {
|
|
|
542
621
|
public protocol FeedOverlay : AnyObject {
|
|
543
622
|
func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
544
623
|
func configure(with item: ShortKitSDK.ContentItem)
|
|
545
|
-
func resetPlaybackProgress()
|
|
546
624
|
func activatePlayback()
|
|
547
625
|
}
|
|
548
626
|
public protocol SurveyOverlay : AnyObject {
|
|
@@ -551,6 +629,19 @@ public protocol SurveyOverlay : AnyObject {
|
|
|
551
629
|
func configure(with item: ShortKitSDK.SurveyItem)
|
|
552
630
|
func resetState()
|
|
553
631
|
}
|
|
632
|
+
public protocol VideoCarouselOverlay : AnyObject {
|
|
633
|
+
func configure(with item: ShortKitSDK.VideoCarouselItem)
|
|
634
|
+
func updateActiveVideo(index: Swift.Int, item: ShortKitSDK.ContentItem)
|
|
635
|
+
func resetState()
|
|
636
|
+
func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
637
|
+
func activatePlayback()
|
|
638
|
+
func deactivatePlayback()
|
|
639
|
+
}
|
|
640
|
+
extension ShortKitSDK.VideoCarouselOverlay {
|
|
641
|
+
public func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
642
|
+
public func activatePlayback()
|
|
643
|
+
public func deactivatePlayback()
|
|
644
|
+
}
|
|
554
645
|
public struct PlayerTime : Swift.Equatable, Swift.Sendable {
|
|
555
646
|
public let current: Swift.Double
|
|
556
647
|
public let duration: Swift.Double
|
|
@@ -662,9 +753,6 @@ public enum ContentSignal : Swift.Equatable, Swift.Sendable {
|
|
|
662
753
|
final public var remainingContentCount: Combine.AnyPublisher<Swift.Int, Swift.Never> {
|
|
663
754
|
get
|
|
664
755
|
}
|
|
665
|
-
final public var feedReady: Combine.AnyPublisher<Swift.Void, Swift.Never> {
|
|
666
|
-
get
|
|
667
|
-
}
|
|
668
756
|
final public var currentItemValue: ShortKitSDK.ContentItem? {
|
|
669
757
|
get
|
|
670
758
|
}
|
|
@@ -724,12 +812,13 @@ public enum ShortKitVersion {
|
|
|
724
812
|
final public class ShortKit {
|
|
725
813
|
final public let player: ShortKitSDK.ShortKitPlayer
|
|
726
814
|
weak final public var delegate: (any ShortKitSDK.ShortKitDelegate)?
|
|
727
|
-
public
|
|
728
|
-
|
|
815
|
+
final public var loadingViewProvider: (() -> UIKit.UIView)?
|
|
816
|
+
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)
|
|
817
|
+
final public func preloadFeed(filter: ShortKitSDK.FeedFilter? = nil, limit: Swift.Int = 10) -> ShortKitSDK.FeedPreload
|
|
818
|
+
final public func preloadFeed(items: [ShortKitSDK.FeedInput]) -> ShortKitSDK.FeedPreload
|
|
819
|
+
final public func fetchContent(limit: Swift.Int = 10, filter: ShortKitSDK.FeedFilter? = nil) async throws -> [ShortKitSDK.ContentItem]
|
|
729
820
|
final public func setUserId(_ id: Swift.String)
|
|
730
821
|
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
822
|
@_Concurrency.MainActor final public func setColdStartQueue(_ items: [ShortKitSDK.FeedInput])
|
|
734
823
|
final public func clearColdStartCache()
|
|
735
824
|
@objc deinit
|
|
@@ -808,6 +897,8 @@ public struct WidgetConfig {
|
|
|
808
897
|
}
|
|
809
898
|
extension ShortKitSDK.AdQuartile : Swift.Equatable {}
|
|
810
899
|
extension ShortKitSDK.AdQuartile : Swift.Hashable {}
|
|
900
|
+
extension ShortKitSDK.ScrollAxis : Swift.Hashable {}
|
|
901
|
+
extension ShortKitSDK.ScrollAxis : Swift.RawRepresentable {}
|
|
811
902
|
extension ShortKitSDK.FeedSource : Swift.Hashable {}
|
|
812
903
|
extension ShortKitSDK.FeedSource : Swift.RawRepresentable {}
|
|
813
904
|
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,17 +187,32 @@ 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 filter: ShortKitSDK.FeedFilter?
|
|
214
|
+
public var preload: ShortKitSDK.FeedPreload?
|
|
215
|
+
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, filter: ShortKitSDK.FeedFilter? = nil, preload: ShortKitSDK.FeedPreload? = nil)
|
|
191
216
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
192
217
|
public init(from decoder: any Swift.Decoder) throws
|
|
193
218
|
}
|
|
@@ -216,6 +241,17 @@ extension ShortKitSDK.CarouselOverlayMode : Swift.Codable {
|
|
|
216
241
|
public init(from decoder: any Swift.Decoder) throws
|
|
217
242
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
218
243
|
}
|
|
244
|
+
public enum VideoCarouselOverlayMode {
|
|
245
|
+
case none
|
|
246
|
+
case custom(@Sendable () -> any UIKit.UIView & ShortKitSDK.VideoCarouselOverlay)
|
|
247
|
+
}
|
|
248
|
+
extension ShortKitSDK.VideoCarouselOverlayMode : Swift.Equatable {
|
|
249
|
+
public static func == (lhs: ShortKitSDK.VideoCarouselOverlayMode, rhs: ShortKitSDK.VideoCarouselOverlayMode) -> Swift.Bool
|
|
250
|
+
}
|
|
251
|
+
extension ShortKitSDK.VideoCarouselOverlayMode : Swift.Codable {
|
|
252
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
253
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
254
|
+
}
|
|
219
255
|
public enum SurveyOverlayMode {
|
|
220
256
|
case none
|
|
221
257
|
case custom(@Sendable () -> any UIKit.UIView & ShortKitSDK.SurveyOverlay)
|
|
@@ -248,22 +284,37 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
248
284
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
249
285
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFetchContentItems items: [ShortKitSDK.ContentItem])
|
|
250
286
|
}
|
|
287
|
+
@_hasMissingDesignatedInitializers final public class FeedPreload : @unchecked Swift.Sendable {
|
|
288
|
+
@objc deinit
|
|
289
|
+
}
|
|
251
290
|
@_Concurrency.MainActor @preconcurrency public struct ShortKitFeedView : SwiftUI.UIViewControllerRepresentable {
|
|
252
|
-
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit)
|
|
291
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig = FeedConfig(), onFeedReady: (() -> Swift.Void)? = nil)
|
|
292
|
+
@_Concurrency.MainActor @preconcurrency public func makeCoordinator() -> ShortKitSDK.ShortKitFeedView.Coordinator
|
|
253
293
|
@_Concurrency.MainActor @preconcurrency public func makeUIViewController(context: ShortKitSDK.ShortKitFeedView.Context) -> ShortKitSDK.ShortKitFeedViewController
|
|
254
294
|
@_Concurrency.MainActor @preconcurrency public func updateUIViewController(_ uiViewController: ShortKitSDK.ShortKitFeedViewController, context: ShortKitSDK.ShortKitFeedView.Context)
|
|
295
|
+
@_hasMissingDesignatedInitializers final public class Coordinator {
|
|
296
|
+
weak final public var feedViewController: ShortKitSDK.ShortKitFeedViewController?
|
|
297
|
+
@objc deinit
|
|
298
|
+
}
|
|
255
299
|
public typealias Body = Swift.Never
|
|
256
|
-
public typealias Coordinator = Swift.Void
|
|
257
300
|
public typealias UIViewControllerType = ShortKitSDK.ShortKitFeedViewController
|
|
258
301
|
}
|
|
259
302
|
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class ShortKitFeedViewController : UIKit.UIViewController {
|
|
260
303
|
@_Concurrency.MainActor @preconcurrency public var onDismiss: (() -> Swift.Void)?
|
|
261
|
-
@_Concurrency.MainActor @preconcurrency public
|
|
304
|
+
@_Concurrency.MainActor @preconcurrency public var onRemainingContentCountChange: ((Swift.Int) -> Swift.Void)?
|
|
305
|
+
@_Concurrency.MainActor @preconcurrency public var onFeedReady: (() -> Swift.Void)?
|
|
306
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig, startAtItemId: Swift.String? = nil)
|
|
307
|
+
@_Concurrency.MainActor public func setFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
308
|
+
@_Concurrency.MainActor public func appendFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
309
|
+
@_Concurrency.MainActor public func applyFilter(_ filter: ShortKitSDK.FeedFilter?)
|
|
262
310
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLoad()
|
|
263
311
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLayoutSubviews()
|
|
264
312
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillAppear(_ animated: Swift.Bool)
|
|
265
313
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidAppear(_ animated: Swift.Bool)
|
|
266
314
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillDisappear(_ animated: Swift.Bool)
|
|
315
|
+
@_Concurrency.MainActor @preconcurrency public func setBridgeManaged()
|
|
316
|
+
@_Concurrency.MainActor @preconcurrency public func activate()
|
|
317
|
+
@_Concurrency.MainActor @preconcurrency public func deactivate()
|
|
267
318
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidDisappear(_ animated: Swift.Bool)
|
|
268
319
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public var supportedInterfaceOrientations: UIKit.UIInterfaceOrientationMask {
|
|
269
320
|
@objc get
|
|
@@ -370,12 +421,14 @@ public struct ContentItem : Swift.Codable, Swift.Equatable, @unchecked Swift.Sen
|
|
|
370
421
|
public enum FeedInput : Swift.Sendable {
|
|
371
422
|
case video(playbackId: Swift.String, fallbackUrl: Swift.String? = nil)
|
|
372
423
|
case imageCarousel(ShortKitSDK.ImageCarouselItem)
|
|
424
|
+
case videoCarousel(ShortKitSDK.VideoCarouselItem)
|
|
373
425
|
}
|
|
374
426
|
public enum FeedItem : Swift.Sendable {
|
|
375
427
|
case content(ShortKitSDK.ContentItem)
|
|
376
428
|
case adSlot(ShortKitSDK.AdSlot)
|
|
377
429
|
case imageCarousel(ShortKitSDK.ImageCarouselItem)
|
|
378
430
|
case survey(ShortKitSDK.SurveyItem)
|
|
431
|
+
case videoCarousel(ShortKitSDK.VideoCarouselItem)
|
|
379
432
|
public var isContent: Swift.Bool {
|
|
380
433
|
get
|
|
381
434
|
}
|
|
@@ -388,6 +441,9 @@ public enum FeedItem : Swift.Sendable {
|
|
|
388
441
|
public var isSurvey: Swift.Bool {
|
|
389
442
|
get
|
|
390
443
|
}
|
|
444
|
+
public var isVideoCarousel: Swift.Bool {
|
|
445
|
+
get
|
|
446
|
+
}
|
|
391
447
|
public var isNonVideo: Swift.Bool {
|
|
392
448
|
get
|
|
393
449
|
}
|
|
@@ -403,6 +459,9 @@ public enum FeedItem : Swift.Sendable {
|
|
|
403
459
|
public var surveyItem: ShortKitSDK.SurveyItem? {
|
|
404
460
|
get
|
|
405
461
|
}
|
|
462
|
+
public var videoCarouselItem: ShortKitSDK.VideoCarouselItem? {
|
|
463
|
+
get
|
|
464
|
+
}
|
|
406
465
|
public var id: Swift.String {
|
|
407
466
|
get
|
|
408
467
|
}
|
|
@@ -421,14 +480,13 @@ extension ShortKitSDK.FeedItem : Swift.Codable {
|
|
|
421
480
|
public struct ImageCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
422
481
|
public let id: Swift.String
|
|
423
482
|
public let images: [ShortKitSDK.CarouselImage]
|
|
424
|
-
public let autoScrollInterval: Swift.Double?
|
|
425
483
|
public let caption: Swift.String?
|
|
426
484
|
public let title: Swift.String?
|
|
427
485
|
public let description: Swift.String?
|
|
428
486
|
public let author: Swift.String?
|
|
429
487
|
public let section: Swift.String?
|
|
430
488
|
public let articleUrl: Swift.String?
|
|
431
|
-
public init(id: Swift.String, images: [ShortKitSDK.CarouselImage],
|
|
489
|
+
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
490
|
public static func == (a: ShortKitSDK.ImageCarouselItem, b: ShortKitSDK.ImageCarouselItem) -> Swift.Bool
|
|
433
491
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
434
492
|
public init(from decoder: any Swift.Decoder) throws
|
|
@@ -507,6 +565,19 @@ public struct VTTCue : Swift.Equatable, Swift.Sendable {
|
|
|
507
565
|
public init(startTime: Swift.Double, endTime: Swift.Double, text: Swift.String)
|
|
508
566
|
public static func == (a: ShortKitSDK.VTTCue, b: ShortKitSDK.VTTCue) -> Swift.Bool
|
|
509
567
|
}
|
|
568
|
+
public struct VideoCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
569
|
+
public let id: Swift.String
|
|
570
|
+
public let videos: [ShortKitSDK.ContentItem]
|
|
571
|
+
public let title: Swift.String?
|
|
572
|
+
public let description: Swift.String?
|
|
573
|
+
public let author: Swift.String?
|
|
574
|
+
public let section: Swift.String?
|
|
575
|
+
public let articleUrl: Swift.String?
|
|
576
|
+
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)
|
|
577
|
+
public static func == (a: ShortKitSDK.VideoCarouselItem, b: ShortKitSDK.VideoCarouselItem) -> Swift.Bool
|
|
578
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
579
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
580
|
+
}
|
|
510
581
|
public protocol AdOverlay : AnyObject {
|
|
511
582
|
func configure(with content: ShortKitSDK.NativeAdContent)
|
|
512
583
|
func resetState()
|
|
@@ -515,12 +586,20 @@ public protocol CarouselOverlay : AnyObject {
|
|
|
515
586
|
var cachedImage: ((Swift.String) -> UIKit.UIImage?)? { get set }
|
|
516
587
|
func configure(with item: ShortKitSDK.ImageCarouselItem)
|
|
517
588
|
func resetState()
|
|
589
|
+
var wantsNativeImagePrefetch: Swift.Bool { get }
|
|
590
|
+
func activatePlayback()
|
|
591
|
+
func updateActiveImage(index: Swift.Int)
|
|
518
592
|
}
|
|
519
593
|
extension ShortKitSDK.CarouselOverlay {
|
|
520
594
|
public var cachedImage: ((Swift.String) -> UIKit.UIImage?)? {
|
|
521
595
|
get
|
|
522
596
|
set
|
|
523
597
|
}
|
|
598
|
+
public var wantsNativeImagePrefetch: Swift.Bool {
|
|
599
|
+
get
|
|
600
|
+
}
|
|
601
|
+
public func activatePlayback()
|
|
602
|
+
public func updateActiveImage(index: Swift.Int)
|
|
524
603
|
}
|
|
525
604
|
final public class CellContent : Combine.ObservableObject {
|
|
526
605
|
@Combine.Published @_projectedValueProperty($item) final public var item: ShortKitSDK.ContentItem? {
|
|
@@ -542,7 +621,6 @@ final public class CellContent : Combine.ObservableObject {
|
|
|
542
621
|
public protocol FeedOverlay : AnyObject {
|
|
543
622
|
func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
544
623
|
func configure(with item: ShortKitSDK.ContentItem)
|
|
545
|
-
func resetPlaybackProgress()
|
|
546
624
|
func activatePlayback()
|
|
547
625
|
}
|
|
548
626
|
public protocol SurveyOverlay : AnyObject {
|
|
@@ -551,6 +629,19 @@ public protocol SurveyOverlay : AnyObject {
|
|
|
551
629
|
func configure(with item: ShortKitSDK.SurveyItem)
|
|
552
630
|
func resetState()
|
|
553
631
|
}
|
|
632
|
+
public protocol VideoCarouselOverlay : AnyObject {
|
|
633
|
+
func configure(with item: ShortKitSDK.VideoCarouselItem)
|
|
634
|
+
func updateActiveVideo(index: Swift.Int, item: ShortKitSDK.ContentItem)
|
|
635
|
+
func resetState()
|
|
636
|
+
func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
637
|
+
func activatePlayback()
|
|
638
|
+
func deactivatePlayback()
|
|
639
|
+
}
|
|
640
|
+
extension ShortKitSDK.VideoCarouselOverlay {
|
|
641
|
+
public func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
642
|
+
public func activatePlayback()
|
|
643
|
+
public func deactivatePlayback()
|
|
644
|
+
}
|
|
554
645
|
public struct PlayerTime : Swift.Equatable, Swift.Sendable {
|
|
555
646
|
public let current: Swift.Double
|
|
556
647
|
public let duration: Swift.Double
|
|
@@ -662,9 +753,6 @@ public enum ContentSignal : Swift.Equatable, Swift.Sendable {
|
|
|
662
753
|
final public var remainingContentCount: Combine.AnyPublisher<Swift.Int, Swift.Never> {
|
|
663
754
|
get
|
|
664
755
|
}
|
|
665
|
-
final public var feedReady: Combine.AnyPublisher<Swift.Void, Swift.Never> {
|
|
666
|
-
get
|
|
667
|
-
}
|
|
668
756
|
final public var currentItemValue: ShortKitSDK.ContentItem? {
|
|
669
757
|
get
|
|
670
758
|
}
|
|
@@ -724,12 +812,13 @@ public enum ShortKitVersion {
|
|
|
724
812
|
final public class ShortKit {
|
|
725
813
|
final public let player: ShortKitSDK.ShortKitPlayer
|
|
726
814
|
weak final public var delegate: (any ShortKitSDK.ShortKitDelegate)?
|
|
727
|
-
public
|
|
728
|
-
|
|
815
|
+
final public var loadingViewProvider: (() -> UIKit.UIView)?
|
|
816
|
+
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)
|
|
817
|
+
final public func preloadFeed(filter: ShortKitSDK.FeedFilter? = nil, limit: Swift.Int = 10) -> ShortKitSDK.FeedPreload
|
|
818
|
+
final public func preloadFeed(items: [ShortKitSDK.FeedInput]) -> ShortKitSDK.FeedPreload
|
|
819
|
+
final public func fetchContent(limit: Swift.Int = 10, filter: ShortKitSDK.FeedFilter? = nil) async throws -> [ShortKitSDK.ContentItem]
|
|
729
820
|
final public func setUserId(_ id: Swift.String)
|
|
730
821
|
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
822
|
@_Concurrency.MainActor final public func setColdStartQueue(_ items: [ShortKitSDK.FeedInput])
|
|
734
823
|
final public func clearColdStartCache()
|
|
735
824
|
@objc deinit
|
|
@@ -808,6 +897,8 @@ public struct WidgetConfig {
|
|
|
808
897
|
}
|
|
809
898
|
extension ShortKitSDK.AdQuartile : Swift.Equatable {}
|
|
810
899
|
extension ShortKitSDK.AdQuartile : Swift.Hashable {}
|
|
900
|
+
extension ShortKitSDK.ScrollAxis : Swift.Hashable {}
|
|
901
|
+
extension ShortKitSDK.ScrollAxis : Swift.RawRepresentable {}
|
|
811
902
|
extension ShortKitSDK.FeedSource : Swift.Hashable {}
|
|
812
903
|
extension ShortKitSDK.FeedSource : Swift.RawRepresentable {}
|
|
813
904
|
extension ShortKitSDK.ShortKitFeedView : Swift.Sendable {}
|