@shortkitsdk/react-native 0.2.11 → 0.2.14

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.
Files changed (57) hide show
  1. package/android/build.gradle.kts +13 -1
  2. package/android/src/main/java/com/shortkit/reactnative/ReactCarouselOverlayHost.kt +157 -54
  3. package/android/src/main/java/com/shortkit/reactnative/ReactOverlayHost.kt +67 -56
  4. package/android/src/main/java/com/shortkit/reactnative/ReactVideoCarouselOverlayHost.kt +431 -0
  5. package/android/src/main/java/com/shortkit/reactnative/ShortKitBridge.kt +154 -26
  6. package/android/src/main/java/com/shortkit/reactnative/ShortKitFeedView.kt +160 -35
  7. package/android/src/main/java/com/shortkit/reactnative/ShortKitFeedViewManager.kt +5 -0
  8. package/android/src/main/java/com/shortkit/reactnative/ShortKitModule.kt +45 -10
  9. package/android/src/main/java/com/shortkit/reactnative/ShortKitPlayerNativeView.kt +9 -0
  10. package/ios/ReactCarouselOverlayHost.swift +37 -17
  11. package/ios/ReactOverlayHost.swift +33 -35
  12. package/ios/ReactVideoCarouselOverlayHost.swift +283 -0
  13. package/ios/ShortKitBridge.swift +78 -2
  14. package/ios/ShortKitFeedView.swift +24 -3
  15. package/ios/ShortKitModule.mm +6 -2
  16. package/ios/ShortKitSDK.xcframework/Info.plist +4 -4
  17. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +2597 -389
  18. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +69 -5
  19. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  20. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftinterface +69 -5
  21. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
  22. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/_CodeSignature/CodeResources +168 -0
  23. package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +2597 -389
  24. package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +69 -5
  25. package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  26. package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +69 -5
  27. package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
  28. package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/_CodeSignature/CodeResources +168 -0
  29. package/ios/ShortKitSDK.xcframework.bak2/Info.plist +43 -0
  30. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64/ShortKitSDK.framework/Headers/ShortKitSDK-Swift.h +418 -0
  31. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64/ShortKitSDK.framework/Info.plist +16 -0
  32. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +31351 -0
  33. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +865 -0
  34. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  35. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftinterface +865 -0
  36. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64/ShortKitSDK.framework/Modules/module.modulemap +4 -0
  37. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
  38. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64-simulator/ShortKitSDK.framework/Headers/ShortKitSDK-Swift.h +418 -0
  39. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64-simulator/ShortKitSDK.framework/Info.plist +16 -0
  40. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +31351 -0
  41. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +865 -0
  42. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  43. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +865 -0
  44. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64-simulator/ShortKitSDK.framework/Modules/module.modulemap +4 -0
  45. package/ios/ShortKitSDK.xcframework.bak2/ios-arm64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
  46. package/package.json +1 -1
  47. package/src/ShortKitCarouselOverlaySurface.tsx +57 -2
  48. package/src/ShortKitContext.ts +2 -1
  49. package/src/ShortKitFeed.tsx +19 -1
  50. package/src/ShortKitOverlaySurface.tsx +148 -41
  51. package/src/ShortKitPlayer.tsx +25 -3
  52. package/src/ShortKitProvider.tsx +4 -2
  53. package/src/ShortKitVideoCarouselOverlaySurface.tsx +156 -0
  54. package/src/index.ts +8 -1
  55. package/src/serialization.ts +8 -0
  56. package/src/specs/NativeShortKitModule.ts +31 -1
  57. package/src/types.ts +45 -1
@@ -169,6 +169,15 @@ public enum FeedHeight : Swift.Codable, Swift.Equatable, Swift.Sendable {
169
169
  public func encode(to encoder: any Swift.Encoder) throws
170
170
  public init(from decoder: any Swift.Decoder) throws
171
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
+ }
172
181
  public enum FeedSource : Swift.String, Swift.Codable, Swift.Equatable, Swift.Sendable {
173
182
  case algorithmic
174
183
  case custom
@@ -191,8 +200,10 @@ public struct FeedFilter : Swift.Codable, Swift.Equatable, Swift.Sendable {
191
200
  }
192
201
  public struct FeedConfig : Swift.Codable {
193
202
  public var feedHeight: ShortKitSDK.FeedHeight
203
+ public var scrollAxis: ShortKitSDK.ScrollAxis
194
204
  public var videoOverlay: ShortKitSDK.VideoOverlayMode
195
205
  public var carouselOverlay: ShortKitSDK.CarouselOverlayMode
206
+ public var videoCarouselOverlay: ShortKitSDK.VideoCarouselOverlayMode
196
207
  public var surveyOverlay: ShortKitSDK.SurveyOverlayMode
197
208
  public var adOverlay: ShortKitSDK.AdOverlayMode
198
209
  public var muteOnStart: Swift.Bool
@@ -201,7 +212,7 @@ public struct FeedConfig : Swift.Codable {
201
212
  public var coldStartEnabled: Swift.Bool
202
213
  public var filter: ShortKitSDK.FeedFilter?
203
214
  public var preload: ShortKitSDK.FeedPreload?
204
- public init(feedHeight: ShortKitSDK.FeedHeight = .fullscreen, videoOverlay: ShortKitSDK.VideoOverlayMode = .none, carouselOverlay: ShortKitSDK.CarouselOverlayMode = .none, surveyOverlay: ShortKitSDK.SurveyOverlayMode = .none, adOverlay: ShortKitSDK.AdOverlayMode = .none, muteOnStart: Swift.Bool = true, autoplay: Swift.Bool = true, feedSource: ShortKitSDK.FeedSource = .algorithmic, coldStartEnabled: Swift.Bool = false, filter: ShortKitSDK.FeedFilter? = nil, preload: ShortKitSDK.FeedPreload? = nil)
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)
205
216
  public func encode(to encoder: any Swift.Encoder) throws
206
217
  public init(from decoder: any Swift.Decoder) throws
207
218
  }
@@ -230,6 +241,17 @@ extension ShortKitSDK.CarouselOverlayMode : Swift.Codable {
230
241
  public init(from decoder: any Swift.Decoder) throws
231
242
  public func encode(to encoder: any Swift.Encoder) throws
232
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
+ }
233
255
  public enum SurveyOverlayMode {
234
256
  case none
235
257
  case custom(@Sendable () -> any UIKit.UIView & ShortKitSDK.SurveyOverlay)
@@ -266,7 +288,7 @@ extension ShortKitSDK.ShortKitDelegate {
266
288
  @objc deinit
267
289
  }
268
290
  @_Concurrency.MainActor @preconcurrency public struct ShortKitFeedView : SwiftUI.UIViewControllerRepresentable {
269
- @_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig)
291
+ @_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig = FeedConfig(), onFeedReady: (() -> Swift.Void)? = nil)
270
292
  @_Concurrency.MainActor @preconcurrency public func makeCoordinator() -> ShortKitSDK.ShortKitFeedView.Coordinator
271
293
  @_Concurrency.MainActor @preconcurrency public func makeUIViewController(context: ShortKitSDK.ShortKitFeedView.Context) -> ShortKitSDK.ShortKitFeedViewController
272
294
  @_Concurrency.MainActor @preconcurrency public func updateUIViewController(_ uiViewController: ShortKitSDK.ShortKitFeedViewController, context: ShortKitSDK.ShortKitFeedView.Context)
@@ -280,6 +302,7 @@ extension ShortKitSDK.ShortKitDelegate {
280
302
  @objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class ShortKitFeedViewController : UIKit.UIViewController {
281
303
  @_Concurrency.MainActor @preconcurrency public var onDismiss: (() -> Swift.Void)?
282
304
  @_Concurrency.MainActor @preconcurrency public var onRemainingContentCountChange: ((Swift.Int) -> Swift.Void)?
305
+ @_Concurrency.MainActor @preconcurrency public var onFeedReady: (() -> Swift.Void)?
283
306
  @_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig, startAtItemId: Swift.String? = nil)
284
307
  @_Concurrency.MainActor public func setFeedItems(_ items: [ShortKitSDK.FeedInput])
285
308
  @_Concurrency.MainActor public func appendFeedItems(_ items: [ShortKitSDK.FeedInput])
@@ -289,6 +312,9 @@ extension ShortKitSDK.ShortKitDelegate {
289
312
  @_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillAppear(_ animated: Swift.Bool)
290
313
  @_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidAppear(_ animated: Swift.Bool)
291
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()
292
318
  @_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidDisappear(_ animated: Swift.Bool)
293
319
  @_Concurrency.MainActor @preconcurrency @objc override dynamic public var supportedInterfaceOrientations: UIKit.UIInterfaceOrientationMask {
294
320
  @objc get
@@ -395,12 +421,14 @@ public struct ContentItem : Swift.Codable, Swift.Equatable, @unchecked Swift.Sen
395
421
  public enum FeedInput : Swift.Sendable {
396
422
  case video(playbackId: Swift.String, fallbackUrl: Swift.String? = nil)
397
423
  case imageCarousel(ShortKitSDK.ImageCarouselItem)
424
+ case videoCarousel(ShortKitSDK.VideoCarouselItem)
398
425
  }
399
426
  public enum FeedItem : Swift.Sendable {
400
427
  case content(ShortKitSDK.ContentItem)
401
428
  case adSlot(ShortKitSDK.AdSlot)
402
429
  case imageCarousel(ShortKitSDK.ImageCarouselItem)
403
430
  case survey(ShortKitSDK.SurveyItem)
431
+ case videoCarousel(ShortKitSDK.VideoCarouselItem)
404
432
  public var isContent: Swift.Bool {
405
433
  get
406
434
  }
@@ -413,6 +441,9 @@ public enum FeedItem : Swift.Sendable {
413
441
  public var isSurvey: Swift.Bool {
414
442
  get
415
443
  }
444
+ public var isVideoCarousel: Swift.Bool {
445
+ get
446
+ }
416
447
  public var isNonVideo: Swift.Bool {
417
448
  get
418
449
  }
@@ -428,6 +459,9 @@ public enum FeedItem : Swift.Sendable {
428
459
  public var surveyItem: ShortKitSDK.SurveyItem? {
429
460
  get
430
461
  }
462
+ public var videoCarouselItem: ShortKitSDK.VideoCarouselItem? {
463
+ get
464
+ }
431
465
  public var id: Swift.String {
432
466
  get
433
467
  }
@@ -531,6 +565,19 @@ public struct VTTCue : Swift.Equatable, Swift.Sendable {
531
565
  public init(startTime: Swift.Double, endTime: Swift.Double, text: Swift.String)
532
566
  public static func == (a: ShortKitSDK.VTTCue, b: ShortKitSDK.VTTCue) -> Swift.Bool
533
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
+ }
534
581
  public protocol AdOverlay : AnyObject {
535
582
  func configure(with content: ShortKitSDK.NativeAdContent)
536
583
  func resetState()
@@ -540,6 +587,8 @@ public protocol CarouselOverlay : AnyObject {
540
587
  func configure(with item: ShortKitSDK.ImageCarouselItem)
541
588
  func resetState()
542
589
  var wantsNativeImagePrefetch: Swift.Bool { get }
590
+ func activatePlayback()
591
+ func updateActiveImage(index: Swift.Int)
543
592
  }
544
593
  extension ShortKitSDK.CarouselOverlay {
545
594
  public var cachedImage: ((Swift.String) -> UIKit.UIImage?)? {
@@ -549,6 +598,8 @@ extension ShortKitSDK.CarouselOverlay {
549
598
  public var wantsNativeImagePrefetch: Swift.Bool {
550
599
  get
551
600
  }
601
+ public func activatePlayback()
602
+ public func updateActiveImage(index: Swift.Int)
552
603
  }
553
604
  final public class CellContent : Combine.ObservableObject {
554
605
  @Combine.Published @_projectedValueProperty($item) final public var item: ShortKitSDK.ContentItem? {
@@ -578,6 +629,19 @@ public protocol SurveyOverlay : AnyObject {
578
629
  func configure(with item: ShortKitSDK.SurveyItem)
579
630
  func resetState()
580
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
+ }
581
645
  public struct PlayerTime : Swift.Equatable, Swift.Sendable {
582
646
  public let current: Swift.Double
583
647
  public let duration: Swift.Double
@@ -689,9 +753,6 @@ public enum ContentSignal : Swift.Equatable, Swift.Sendable {
689
753
  final public var remainingContentCount: Combine.AnyPublisher<Swift.Int, Swift.Never> {
690
754
  get
691
755
  }
692
- final public var feedReady: Combine.AnyPublisher<Swift.Void, Swift.Never> {
693
- get
694
- }
695
756
  final public var currentItemValue: ShortKitSDK.ContentItem? {
696
757
  get
697
758
  }
@@ -754,6 +815,7 @@ final public class ShortKit {
754
815
  final public var loadingViewProvider: (() -> UIKit.UIView)?
755
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)
756
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
757
819
  final public func fetchContent(limit: Swift.Int = 10, filter: ShortKitSDK.FeedFilter? = nil) async throws -> [ShortKitSDK.ContentItem]
758
820
  final public func setUserId(_ id: Swift.String)
759
821
  final public func clearUserId()
@@ -835,6 +897,8 @@ public struct WidgetConfig {
835
897
  }
836
898
  extension ShortKitSDK.AdQuartile : Swift.Equatable {}
837
899
  extension ShortKitSDK.AdQuartile : Swift.Hashable {}
900
+ extension ShortKitSDK.ScrollAxis : Swift.Hashable {}
901
+ extension ShortKitSDK.ScrollAxis : Swift.RawRepresentable {}
838
902
  extension ShortKitSDK.FeedSource : Swift.Hashable {}
839
903
  extension ShortKitSDK.FeedSource : Swift.RawRepresentable {}
840
904
  extension ShortKitSDK.ShortKitFeedView : Swift.Sendable {}
@@ -169,6 +169,15 @@ public enum FeedHeight : Swift.Codable, Swift.Equatable, Swift.Sendable {
169
169
  public func encode(to encoder: any Swift.Encoder) throws
170
170
  public init(from decoder: any Swift.Decoder) throws
171
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
+ }
172
181
  public enum FeedSource : Swift.String, Swift.Codable, Swift.Equatable, Swift.Sendable {
173
182
  case algorithmic
174
183
  case custom
@@ -191,8 +200,10 @@ public struct FeedFilter : Swift.Codable, Swift.Equatable, Swift.Sendable {
191
200
  }
192
201
  public struct FeedConfig : Swift.Codable {
193
202
  public var feedHeight: ShortKitSDK.FeedHeight
203
+ public var scrollAxis: ShortKitSDK.ScrollAxis
194
204
  public var videoOverlay: ShortKitSDK.VideoOverlayMode
195
205
  public var carouselOverlay: ShortKitSDK.CarouselOverlayMode
206
+ public var videoCarouselOverlay: ShortKitSDK.VideoCarouselOverlayMode
196
207
  public var surveyOverlay: ShortKitSDK.SurveyOverlayMode
197
208
  public var adOverlay: ShortKitSDK.AdOverlayMode
198
209
  public var muteOnStart: Swift.Bool
@@ -201,7 +212,7 @@ public struct FeedConfig : Swift.Codable {
201
212
  public var coldStartEnabled: Swift.Bool
202
213
  public var filter: ShortKitSDK.FeedFilter?
203
214
  public var preload: ShortKitSDK.FeedPreload?
204
- public init(feedHeight: ShortKitSDK.FeedHeight = .fullscreen, videoOverlay: ShortKitSDK.VideoOverlayMode = .none, carouselOverlay: ShortKitSDK.CarouselOverlayMode = .none, surveyOverlay: ShortKitSDK.SurveyOverlayMode = .none, adOverlay: ShortKitSDK.AdOverlayMode = .none, muteOnStart: Swift.Bool = true, autoplay: Swift.Bool = true, feedSource: ShortKitSDK.FeedSource = .algorithmic, coldStartEnabled: Swift.Bool = false, filter: ShortKitSDK.FeedFilter? = nil, preload: ShortKitSDK.FeedPreload? = nil)
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)
205
216
  public func encode(to encoder: any Swift.Encoder) throws
206
217
  public init(from decoder: any Swift.Decoder) throws
207
218
  }
@@ -230,6 +241,17 @@ extension ShortKitSDK.CarouselOverlayMode : Swift.Codable {
230
241
  public init(from decoder: any Swift.Decoder) throws
231
242
  public func encode(to encoder: any Swift.Encoder) throws
232
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
+ }
233
255
  public enum SurveyOverlayMode {
234
256
  case none
235
257
  case custom(@Sendable () -> any UIKit.UIView & ShortKitSDK.SurveyOverlay)
@@ -266,7 +288,7 @@ extension ShortKitSDK.ShortKitDelegate {
266
288
  @objc deinit
267
289
  }
268
290
  @_Concurrency.MainActor @preconcurrency public struct ShortKitFeedView : SwiftUI.UIViewControllerRepresentable {
269
- @_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig)
291
+ @_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig = FeedConfig(), onFeedReady: (() -> Swift.Void)? = nil)
270
292
  @_Concurrency.MainActor @preconcurrency public func makeCoordinator() -> ShortKitSDK.ShortKitFeedView.Coordinator
271
293
  @_Concurrency.MainActor @preconcurrency public func makeUIViewController(context: ShortKitSDK.ShortKitFeedView.Context) -> ShortKitSDK.ShortKitFeedViewController
272
294
  @_Concurrency.MainActor @preconcurrency public func updateUIViewController(_ uiViewController: ShortKitSDK.ShortKitFeedViewController, context: ShortKitSDK.ShortKitFeedView.Context)
@@ -280,6 +302,7 @@ extension ShortKitSDK.ShortKitDelegate {
280
302
  @objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class ShortKitFeedViewController : UIKit.UIViewController {
281
303
  @_Concurrency.MainActor @preconcurrency public var onDismiss: (() -> Swift.Void)?
282
304
  @_Concurrency.MainActor @preconcurrency public var onRemainingContentCountChange: ((Swift.Int) -> Swift.Void)?
305
+ @_Concurrency.MainActor @preconcurrency public var onFeedReady: (() -> Swift.Void)?
283
306
  @_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig, startAtItemId: Swift.String? = nil)
284
307
  @_Concurrency.MainActor public func setFeedItems(_ items: [ShortKitSDK.FeedInput])
285
308
  @_Concurrency.MainActor public func appendFeedItems(_ items: [ShortKitSDK.FeedInput])
@@ -289,6 +312,9 @@ extension ShortKitSDK.ShortKitDelegate {
289
312
  @_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillAppear(_ animated: Swift.Bool)
290
313
  @_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidAppear(_ animated: Swift.Bool)
291
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()
292
318
  @_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidDisappear(_ animated: Swift.Bool)
293
319
  @_Concurrency.MainActor @preconcurrency @objc override dynamic public var supportedInterfaceOrientations: UIKit.UIInterfaceOrientationMask {
294
320
  @objc get
@@ -395,12 +421,14 @@ public struct ContentItem : Swift.Codable, Swift.Equatable, @unchecked Swift.Sen
395
421
  public enum FeedInput : Swift.Sendable {
396
422
  case video(playbackId: Swift.String, fallbackUrl: Swift.String? = nil)
397
423
  case imageCarousel(ShortKitSDK.ImageCarouselItem)
424
+ case videoCarousel(ShortKitSDK.VideoCarouselItem)
398
425
  }
399
426
  public enum FeedItem : Swift.Sendable {
400
427
  case content(ShortKitSDK.ContentItem)
401
428
  case adSlot(ShortKitSDK.AdSlot)
402
429
  case imageCarousel(ShortKitSDK.ImageCarouselItem)
403
430
  case survey(ShortKitSDK.SurveyItem)
431
+ case videoCarousel(ShortKitSDK.VideoCarouselItem)
404
432
  public var isContent: Swift.Bool {
405
433
  get
406
434
  }
@@ -413,6 +441,9 @@ public enum FeedItem : Swift.Sendable {
413
441
  public var isSurvey: Swift.Bool {
414
442
  get
415
443
  }
444
+ public var isVideoCarousel: Swift.Bool {
445
+ get
446
+ }
416
447
  public var isNonVideo: Swift.Bool {
417
448
  get
418
449
  }
@@ -428,6 +459,9 @@ public enum FeedItem : Swift.Sendable {
428
459
  public var surveyItem: ShortKitSDK.SurveyItem? {
429
460
  get
430
461
  }
462
+ public var videoCarouselItem: ShortKitSDK.VideoCarouselItem? {
463
+ get
464
+ }
431
465
  public var id: Swift.String {
432
466
  get
433
467
  }
@@ -531,6 +565,19 @@ public struct VTTCue : Swift.Equatable, Swift.Sendable {
531
565
  public init(startTime: Swift.Double, endTime: Swift.Double, text: Swift.String)
532
566
  public static func == (a: ShortKitSDK.VTTCue, b: ShortKitSDK.VTTCue) -> Swift.Bool
533
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
+ }
534
581
  public protocol AdOverlay : AnyObject {
535
582
  func configure(with content: ShortKitSDK.NativeAdContent)
536
583
  func resetState()
@@ -540,6 +587,8 @@ public protocol CarouselOverlay : AnyObject {
540
587
  func configure(with item: ShortKitSDK.ImageCarouselItem)
541
588
  func resetState()
542
589
  var wantsNativeImagePrefetch: Swift.Bool { get }
590
+ func activatePlayback()
591
+ func updateActiveImage(index: Swift.Int)
543
592
  }
544
593
  extension ShortKitSDK.CarouselOverlay {
545
594
  public var cachedImage: ((Swift.String) -> UIKit.UIImage?)? {
@@ -549,6 +598,8 @@ extension ShortKitSDK.CarouselOverlay {
549
598
  public var wantsNativeImagePrefetch: Swift.Bool {
550
599
  get
551
600
  }
601
+ public func activatePlayback()
602
+ public func updateActiveImage(index: Swift.Int)
552
603
  }
553
604
  final public class CellContent : Combine.ObservableObject {
554
605
  @Combine.Published @_projectedValueProperty($item) final public var item: ShortKitSDK.ContentItem? {
@@ -578,6 +629,19 @@ public protocol SurveyOverlay : AnyObject {
578
629
  func configure(with item: ShortKitSDK.SurveyItem)
579
630
  func resetState()
580
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
+ }
581
645
  public struct PlayerTime : Swift.Equatable, Swift.Sendable {
582
646
  public let current: Swift.Double
583
647
  public let duration: Swift.Double
@@ -689,9 +753,6 @@ public enum ContentSignal : Swift.Equatable, Swift.Sendable {
689
753
  final public var remainingContentCount: Combine.AnyPublisher<Swift.Int, Swift.Never> {
690
754
  get
691
755
  }
692
- final public var feedReady: Combine.AnyPublisher<Swift.Void, Swift.Never> {
693
- get
694
- }
695
756
  final public var currentItemValue: ShortKitSDK.ContentItem? {
696
757
  get
697
758
  }
@@ -754,6 +815,7 @@ final public class ShortKit {
754
815
  final public var loadingViewProvider: (() -> UIKit.UIView)?
755
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)
756
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
757
819
  final public func fetchContent(limit: Swift.Int = 10, filter: ShortKitSDK.FeedFilter? = nil) async throws -> [ShortKitSDK.ContentItem]
758
820
  final public func setUserId(_ id: Swift.String)
759
821
  final public func clearUserId()
@@ -835,6 +897,8 @@ public struct WidgetConfig {
835
897
  }
836
898
  extension ShortKitSDK.AdQuartile : Swift.Equatable {}
837
899
  extension ShortKitSDK.AdQuartile : Swift.Hashable {}
900
+ extension ShortKitSDK.ScrollAxis : Swift.Hashable {}
901
+ extension ShortKitSDK.ScrollAxis : Swift.RawRepresentable {}
838
902
  extension ShortKitSDK.FeedSource : Swift.Hashable {}
839
903
  extension ShortKitSDK.FeedSource : Swift.RawRepresentable {}
840
904
  extension ShortKitSDK.ShortKitFeedView : Swift.Sendable {}
@@ -0,0 +1,168 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>files</key>
6
+ <dict>
7
+ <key>Headers/ShortKitSDK-Swift.h</key>
8
+ <data>
9
+ 3bbpoSImjQOVLQbSfh6sAEp9NqY=
10
+ </data>
11
+ <key>Info.plist</key>
12
+ <data>
13
+ Ley678FJu8DKkhiCwrDCSa/fREc=
14
+ </data>
15
+ <key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
16
+ <data>
17
+ oLYAaT0wh75tK9p8jfDAlvgS+aw=
18
+ </data>
19
+ <key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
20
+ <data>
21
+ yxz4ANQUVWM4+pNexcbMhEtvg30=
22
+ </data>
23
+ <key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
24
+ <data>
25
+ DK7MvgzrcSHBHViTj0Ef3+LnBmc=
26
+ </data>
27
+ <key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
28
+ <data>
29
+ yxz4ANQUVWM4+pNexcbMhEtvg30=
30
+ </data>
31
+ <key>Modules/module.modulemap</key>
32
+ <data>
33
+ QthRxkVp/MRBzYVNLtX05t2Csso=
34
+ </data>
35
+ </dict>
36
+ <key>files2</key>
37
+ <dict>
38
+ <key>Headers/ShortKitSDK-Swift.h</key>
39
+ <dict>
40
+ <key>hash2</key>
41
+ <data>
42
+ V+jQ2eNebJRtNpq31u6WQqjInnpmCU26LytMq5YTXJk=
43
+ </data>
44
+ </dict>
45
+ <key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
46
+ <dict>
47
+ <key>hash2</key>
48
+ <data>
49
+ I7r2mLLBdaipFikHq2yeqRsHg5gDYEG5wVFF4xWtayM=
50
+ </data>
51
+ </dict>
52
+ <key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
53
+ <dict>
54
+ <key>hash2</key>
55
+ <data>
56
+ 9qbyNESX9aF8c95D7gm8GHd/uU6E3/oxbLjeUhcWqYg=
57
+ </data>
58
+ </dict>
59
+ <key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
60
+ <dict>
61
+ <key>hash2</key>
62
+ <data>
63
+ UyIgXF6hWtTcHaIdLiGNttWuQWMuQqJ9FVoBTa0cDds=
64
+ </data>
65
+ </dict>
66
+ <key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
67
+ <dict>
68
+ <key>hash2</key>
69
+ <data>
70
+ 9qbyNESX9aF8c95D7gm8GHd/uU6E3/oxbLjeUhcWqYg=
71
+ </data>
72
+ </dict>
73
+ <key>Modules/module.modulemap</key>
74
+ <dict>
75
+ <key>hash2</key>
76
+ <data>
77
+ K4gZcRkdlvQBo5cnduiRMooPuUS6dWAP1E7dBJRuHL4=
78
+ </data>
79
+ </dict>
80
+ </dict>
81
+ <key>rules</key>
82
+ <dict>
83
+ <key>^.*</key>
84
+ <true/>
85
+ <key>^.*\.lproj/</key>
86
+ <dict>
87
+ <key>optional</key>
88
+ <true/>
89
+ <key>weight</key>
90
+ <real>1000</real>
91
+ </dict>
92
+ <key>^.*\.lproj/locversion.plist$</key>
93
+ <dict>
94
+ <key>omit</key>
95
+ <true/>
96
+ <key>weight</key>
97
+ <real>1100</real>
98
+ </dict>
99
+ <key>^Base\.lproj/</key>
100
+ <dict>
101
+ <key>weight</key>
102
+ <real>1010</real>
103
+ </dict>
104
+ <key>^version.plist$</key>
105
+ <true/>
106
+ </dict>
107
+ <key>rules2</key>
108
+ <dict>
109
+ <key>.*\.dSYM($|/)</key>
110
+ <dict>
111
+ <key>weight</key>
112
+ <real>11</real>
113
+ </dict>
114
+ <key>^(.*/)?\.DS_Store$</key>
115
+ <dict>
116
+ <key>omit</key>
117
+ <true/>
118
+ <key>weight</key>
119
+ <real>2000</real>
120
+ </dict>
121
+ <key>^.*</key>
122
+ <true/>
123
+ <key>^.*\.lproj/</key>
124
+ <dict>
125
+ <key>optional</key>
126
+ <true/>
127
+ <key>weight</key>
128
+ <real>1000</real>
129
+ </dict>
130
+ <key>^.*\.lproj/locversion.plist$</key>
131
+ <dict>
132
+ <key>omit</key>
133
+ <true/>
134
+ <key>weight</key>
135
+ <real>1100</real>
136
+ </dict>
137
+ <key>^Base\.lproj/</key>
138
+ <dict>
139
+ <key>weight</key>
140
+ <real>1010</real>
141
+ </dict>
142
+ <key>^Info\.plist$</key>
143
+ <dict>
144
+ <key>omit</key>
145
+ <true/>
146
+ <key>weight</key>
147
+ <real>20</real>
148
+ </dict>
149
+ <key>^PkgInfo$</key>
150
+ <dict>
151
+ <key>omit</key>
152
+ <true/>
153
+ <key>weight</key>
154
+ <real>20</real>
155
+ </dict>
156
+ <key>^embedded\.provisionprofile$</key>
157
+ <dict>
158
+ <key>weight</key>
159
+ <real>20</real>
160
+ </dict>
161
+ <key>^version\.plist$</key>
162
+ <dict>
163
+ <key>weight</key>
164
+ <real>20</real>
165
+ </dict>
166
+ </dict>
167
+ </dict>
168
+ </plist>
@@ -0,0 +1,43 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>AvailableLibraries</key>
6
+ <array>
7
+ <dict>
8
+ <key>BinaryPath</key>
9
+ <string>ShortKitSDK.framework/ShortKitSDK</string>
10
+ <key>LibraryIdentifier</key>
11
+ <string>ios-arm64-simulator</string>
12
+ <key>LibraryPath</key>
13
+ <string>ShortKitSDK.framework</string>
14
+ <key>SupportedArchitectures</key>
15
+ <array>
16
+ <string>arm64</string>
17
+ </array>
18
+ <key>SupportedPlatform</key>
19
+ <string>ios</string>
20
+ <key>SupportedPlatformVariant</key>
21
+ <string>simulator</string>
22
+ </dict>
23
+ <dict>
24
+ <key>BinaryPath</key>
25
+ <string>ShortKitSDK.framework/ShortKitSDK</string>
26
+ <key>LibraryIdentifier</key>
27
+ <string>ios-arm64</string>
28
+ <key>LibraryPath</key>
29
+ <string>ShortKitSDK.framework</string>
30
+ <key>SupportedArchitectures</key>
31
+ <array>
32
+ <string>arm64</string>
33
+ </array>
34
+ <key>SupportedPlatform</key>
35
+ <string>ios</string>
36
+ </dict>
37
+ </array>
38
+ <key>CFBundlePackageType</key>
39
+ <string>XFWK</string>
40
+ <key>XCFrameworkFormatVersion</key>
41
+ <string>1.0</string>
42
+ </dict>
43
+ </plist>