@shortkitsdk/react-native 0.2.22 → 0.2.24
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/libs/shortkit-release.aar +0 -0
- package/android/src/main/java/com/shortkit/reactnative/ShortKitBridge.kt +10 -7
- package/ios/ShortKitBridge.swift +97 -2
- package/ios/ShortKitModule.mm +25 -2
- package/ios/ShortKitSDK.xcframework/Info.plist +5 -5
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Info.plist +2 -2
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +4998 -2499
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +64 -1
- 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 +64 -1
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/_CodeSignature/CodeResources +9 -9
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Info.plist +2 -2
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +4998 -2499
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +64 -1
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +64 -1
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +4998 -2499
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +64 -1
- 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 +64 -1
- 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 +17 -17
- package/package.json +1 -1
- package/src/ShortKitCommands.ts +3 -0
- package/src/ShortKitContext.ts +6 -0
- package/src/ShortKitProvider.tsx +45 -1
- package/src/index.ts +2 -0
- package/src/specs/NativeShortKitModule.ts +29 -0
- package/src/types.ts +44 -1
|
@@ -337,6 +337,34 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
337
337
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
338
338
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFetchContentItems items: [ShortKitSDK.ContentItem])
|
|
339
339
|
}
|
|
340
|
+
public protocol ShortKitDownloadDelegate : AnyObject {
|
|
341
|
+
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didStartDownload item: ShortKitSDK.ContentItem)
|
|
342
|
+
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didUpdateDownloadProgress item: ShortKitSDK.ContentItem, progress: Swift.Double)
|
|
343
|
+
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didCompleteDownload item: ShortKitSDK.ContentItem, fileURL: Foundation.URL)
|
|
344
|
+
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFailDownload item: ShortKitSDK.ContentItem, error: ShortKitSDK.ShortKitDownloadError)
|
|
345
|
+
}
|
|
346
|
+
extension ShortKitSDK.ShortKitDownloadDelegate {
|
|
347
|
+
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didStartDownload item: ShortKitSDK.ContentItem)
|
|
348
|
+
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didUpdateDownloadProgress item: ShortKitSDK.ContentItem, progress: Swift.Double)
|
|
349
|
+
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didCompleteDownload item: ShortKitSDK.ContentItem, fileURL: Foundation.URL)
|
|
350
|
+
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFailDownload item: ShortKitSDK.ContentItem, error: ShortKitSDK.ShortKitDownloadError)
|
|
351
|
+
}
|
|
352
|
+
public enum DownloadMode {
|
|
353
|
+
case nonInterruptive
|
|
354
|
+
case interruptive
|
|
355
|
+
public static func == (a: ShortKitSDK.DownloadMode, b: ShortKitSDK.DownloadMode) -> Swift.Bool
|
|
356
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
357
|
+
public var hashValue: Swift.Int {
|
|
358
|
+
get
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
public enum ShortKitDownloadError : Swift.Error {
|
|
362
|
+
case downloadNotAvailable
|
|
363
|
+
case downloadInProgress
|
|
364
|
+
case networkError(any Swift.Error)
|
|
365
|
+
case httpError(statusCode: Swift.Int)
|
|
366
|
+
case cancelled
|
|
367
|
+
}
|
|
340
368
|
@_hasMissingDesignatedInitializers final public class FeedPreload : @unchecked Swift.Sendable {
|
|
341
369
|
@objc deinit
|
|
342
370
|
}
|
|
@@ -479,14 +507,21 @@ public struct ContentItem : Swift.Codable, Swift.Equatable, @unchecked Swift.Sen
|
|
|
479
507
|
public let articleUrl: Swift.String?
|
|
480
508
|
public let commentCount: Swift.Int?
|
|
481
509
|
public var fallbackUrl: Swift.String?
|
|
510
|
+
public var downloadUrl: Swift.String?
|
|
511
|
+
public init(id: Swift.String, playbackId: Swift.String? = nil, title: Swift.String, description: Swift.String? = nil, duration: Swift.Double, streamingUrl: Swift.String, thumbnailUrl: Swift.String, captionTracks: [ShortKitSDK.CaptionTrack] = [], customMetadata: [Swift.String : ShortKitSDK.JSONValue]? = nil, author: Swift.String? = nil, articleUrl: Swift.String? = nil, commentCount: Swift.Int? = nil, fallbackUrl: Swift.String? = nil, downloadUrl: Swift.String? = nil)
|
|
482
512
|
public static func == (a: ShortKitSDK.ContentItem, b: ShortKitSDK.ContentItem) -> Swift.Bool
|
|
483
513
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
484
514
|
public init(from decoder: any Swift.Decoder) throws
|
|
485
515
|
}
|
|
516
|
+
extension ShortKitSDK.ContentItem {
|
|
517
|
+
public var isDownloadable: Swift.Bool {
|
|
518
|
+
get
|
|
519
|
+
}
|
|
520
|
+
}
|
|
486
521
|
public enum FeedInput : Swift.Sendable {
|
|
487
522
|
case video(playbackId: Swift.String, fallbackUrl: Swift.String? = nil)
|
|
488
523
|
case imageCarousel(ShortKitSDK.ImageCarouselItem)
|
|
489
|
-
case videoCarousel(ShortKitSDK.
|
|
524
|
+
case videoCarousel(ShortKitSDK.VideoCarouselInput)
|
|
490
525
|
}
|
|
491
526
|
public enum FeedItem : Swift.Sendable {
|
|
492
527
|
case content(ShortKitSDK.ContentItem)
|
|
@@ -630,6 +665,19 @@ public struct VTTCue : Swift.Equatable, Swift.Sendable {
|
|
|
630
665
|
public init(startTime: Swift.Double, endTime: Swift.Double, text: Swift.String)
|
|
631
666
|
public static func == (a: ShortKitSDK.VTTCue, b: ShortKitSDK.VTTCue) -> Swift.Bool
|
|
632
667
|
}
|
|
668
|
+
public struct VideoCarouselInput : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
669
|
+
public let id: Swift.String
|
|
670
|
+
public let videos: [ShortKitSDK.VideoCarouselVideoInput]
|
|
671
|
+
public let title: Swift.String?
|
|
672
|
+
public let description: Swift.String?
|
|
673
|
+
public let author: Swift.String?
|
|
674
|
+
public let section: Swift.String?
|
|
675
|
+
public let articleUrl: Swift.String?
|
|
676
|
+
public init(id: Swift.String, videos: [ShortKitSDK.VideoCarouselVideoInput], title: Swift.String? = nil, description: Swift.String? = nil, author: Swift.String? = nil, section: Swift.String? = nil, articleUrl: Swift.String? = nil)
|
|
677
|
+
public static func == (a: ShortKitSDK.VideoCarouselInput, b: ShortKitSDK.VideoCarouselInput) -> Swift.Bool
|
|
678
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
679
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
680
|
+
}
|
|
633
681
|
public struct VideoCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
634
682
|
public let id: Swift.String
|
|
635
683
|
public let videos: [ShortKitSDK.ContentItem]
|
|
@@ -643,6 +691,14 @@ public struct VideoCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable
|
|
|
643
691
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
644
692
|
public init(from decoder: any Swift.Decoder) throws
|
|
645
693
|
}
|
|
694
|
+
public struct VideoCarouselVideoInput : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
695
|
+
public let playbackId: Swift.String
|
|
696
|
+
public let fallbackUrl: Swift.String?
|
|
697
|
+
public init(playbackId: Swift.String, fallbackUrl: Swift.String? = nil)
|
|
698
|
+
public static func == (a: ShortKitSDK.VideoCarouselVideoInput, b: ShortKitSDK.VideoCarouselVideoInput) -> Swift.Bool
|
|
699
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
700
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
701
|
+
}
|
|
646
702
|
public protocol AdOverlay : AnyObject {
|
|
647
703
|
func configure(with content: ShortKitSDK.NativeAdContent)
|
|
648
704
|
func resetState()
|
|
@@ -654,6 +710,7 @@ public protocol CarouselOverlay : AnyObject {
|
|
|
654
710
|
var wantsNativeImagePrefetch: Swift.Bool { get }
|
|
655
711
|
func activatePlayback()
|
|
656
712
|
func updateActiveImage(index: Swift.Int)
|
|
713
|
+
func resetToFirstImage()
|
|
657
714
|
}
|
|
658
715
|
extension ShortKitSDK.CarouselOverlay {
|
|
659
716
|
public var cachedImage: ((Swift.String) -> UIKit.UIImage?)? {
|
|
@@ -665,6 +722,7 @@ extension ShortKitSDK.CarouselOverlay {
|
|
|
665
722
|
}
|
|
666
723
|
public func activatePlayback()
|
|
667
724
|
public func updateActiveImage(index: Swift.Int)
|
|
725
|
+
public func resetToFirstImage()
|
|
668
726
|
}
|
|
669
727
|
final public class CellContent : Combine.ObservableObject {
|
|
670
728
|
@Combine.Published<ShortKitSDK.ContentItem?> @_projectedValueProperty($item) final public var item: ShortKitSDK.ContentItem? {
|
|
@@ -884,6 +942,7 @@ final public class ShortKit {
|
|
|
884
942
|
final public let player: ShortKitSDK.ShortKitPlayer
|
|
885
943
|
final public let debugPanelEnabled: Swift.Bool
|
|
886
944
|
weak final public var delegate: (any ShortKitSDK.ShortKitDelegate)?
|
|
945
|
+
weak final public var downloadDelegate: (any ShortKitSDK.ShortKitDownloadDelegate)?
|
|
887
946
|
final public var loadingViewProvider: (() -> UIKit.UIView)?
|
|
888
947
|
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, debugPanelEnabled: Swift.Bool = false)
|
|
889
948
|
final public func preloadFeed(filter: ShortKitSDK.FeedFilter? = nil, limit: Swift.Int = 10) -> ShortKitSDK.FeedPreload
|
|
@@ -893,6 +952,8 @@ final public class ShortKit {
|
|
|
893
952
|
final public func clearUserId()
|
|
894
953
|
@_Concurrency.MainActor final public func setColdStartQueue(_ items: [ShortKitSDK.FeedInput])
|
|
895
954
|
final public func clearColdStartCache()
|
|
955
|
+
final public func downloadVideo(_ item: ShortKitSDK.ContentItem, mode: ShortKitSDK.DownloadMode = .nonInterruptive) async throws -> Foundation.URL
|
|
956
|
+
final public func cancelDownload()
|
|
896
957
|
@objc deinit
|
|
897
958
|
}
|
|
898
959
|
public enum PlayerClickAction : Swift.Sendable {
|
|
@@ -984,6 +1045,8 @@ extension ShortKitSDK.FeedSource : Swift.RawRepresentable {}
|
|
|
984
1045
|
extension ShortKitSDK.SwipeCurve : Swift.Equatable {}
|
|
985
1046
|
extension ShortKitSDK.SwipeCurve : Swift.Hashable {}
|
|
986
1047
|
extension ShortKitSDK.SwipeCurve : Swift.RawRepresentable {}
|
|
1048
|
+
extension ShortKitSDK.DownloadMode : Swift.Equatable {}
|
|
1049
|
+
extension ShortKitSDK.DownloadMode : Swift.Hashable {}
|
|
987
1050
|
extension ShortKitSDK.ShortKitFeedView : Swift.Sendable {}
|
|
988
1051
|
extension ShortKitSDK.CaptionSource : Swift.Equatable {}
|
|
989
1052
|
extension ShortKitSDK.CaptionSource : Swift.Hashable {}
|
|
Binary file
|
|
@@ -337,6 +337,34 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
337
337
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
338
338
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFetchContentItems items: [ShortKitSDK.ContentItem])
|
|
339
339
|
}
|
|
340
|
+
public protocol ShortKitDownloadDelegate : AnyObject {
|
|
341
|
+
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didStartDownload item: ShortKitSDK.ContentItem)
|
|
342
|
+
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didUpdateDownloadProgress item: ShortKitSDK.ContentItem, progress: Swift.Double)
|
|
343
|
+
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didCompleteDownload item: ShortKitSDK.ContentItem, fileURL: Foundation.URL)
|
|
344
|
+
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFailDownload item: ShortKitSDK.ContentItem, error: ShortKitSDK.ShortKitDownloadError)
|
|
345
|
+
}
|
|
346
|
+
extension ShortKitSDK.ShortKitDownloadDelegate {
|
|
347
|
+
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didStartDownload item: ShortKitSDK.ContentItem)
|
|
348
|
+
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didUpdateDownloadProgress item: ShortKitSDK.ContentItem, progress: Swift.Double)
|
|
349
|
+
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didCompleteDownload item: ShortKitSDK.ContentItem, fileURL: Foundation.URL)
|
|
350
|
+
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFailDownload item: ShortKitSDK.ContentItem, error: ShortKitSDK.ShortKitDownloadError)
|
|
351
|
+
}
|
|
352
|
+
public enum DownloadMode {
|
|
353
|
+
case nonInterruptive
|
|
354
|
+
case interruptive
|
|
355
|
+
public static func == (a: ShortKitSDK.DownloadMode, b: ShortKitSDK.DownloadMode) -> Swift.Bool
|
|
356
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
357
|
+
public var hashValue: Swift.Int {
|
|
358
|
+
get
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
public enum ShortKitDownloadError : Swift.Error {
|
|
362
|
+
case downloadNotAvailable
|
|
363
|
+
case downloadInProgress
|
|
364
|
+
case networkError(any Swift.Error)
|
|
365
|
+
case httpError(statusCode: Swift.Int)
|
|
366
|
+
case cancelled
|
|
367
|
+
}
|
|
340
368
|
@_hasMissingDesignatedInitializers final public class FeedPreload : @unchecked Swift.Sendable {
|
|
341
369
|
@objc deinit
|
|
342
370
|
}
|
|
@@ -479,14 +507,21 @@ public struct ContentItem : Swift.Codable, Swift.Equatable, @unchecked Swift.Sen
|
|
|
479
507
|
public let articleUrl: Swift.String?
|
|
480
508
|
public let commentCount: Swift.Int?
|
|
481
509
|
public var fallbackUrl: Swift.String?
|
|
510
|
+
public var downloadUrl: Swift.String?
|
|
511
|
+
public init(id: Swift.String, playbackId: Swift.String? = nil, title: Swift.String, description: Swift.String? = nil, duration: Swift.Double, streamingUrl: Swift.String, thumbnailUrl: Swift.String, captionTracks: [ShortKitSDK.CaptionTrack] = [], customMetadata: [Swift.String : ShortKitSDK.JSONValue]? = nil, author: Swift.String? = nil, articleUrl: Swift.String? = nil, commentCount: Swift.Int? = nil, fallbackUrl: Swift.String? = nil, downloadUrl: Swift.String? = nil)
|
|
482
512
|
public static func == (a: ShortKitSDK.ContentItem, b: ShortKitSDK.ContentItem) -> Swift.Bool
|
|
483
513
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
484
514
|
public init(from decoder: any Swift.Decoder) throws
|
|
485
515
|
}
|
|
516
|
+
extension ShortKitSDK.ContentItem {
|
|
517
|
+
public var isDownloadable: Swift.Bool {
|
|
518
|
+
get
|
|
519
|
+
}
|
|
520
|
+
}
|
|
486
521
|
public enum FeedInput : Swift.Sendable {
|
|
487
522
|
case video(playbackId: Swift.String, fallbackUrl: Swift.String? = nil)
|
|
488
523
|
case imageCarousel(ShortKitSDK.ImageCarouselItem)
|
|
489
|
-
case videoCarousel(ShortKitSDK.
|
|
524
|
+
case videoCarousel(ShortKitSDK.VideoCarouselInput)
|
|
490
525
|
}
|
|
491
526
|
public enum FeedItem : Swift.Sendable {
|
|
492
527
|
case content(ShortKitSDK.ContentItem)
|
|
@@ -630,6 +665,19 @@ public struct VTTCue : Swift.Equatable, Swift.Sendable {
|
|
|
630
665
|
public init(startTime: Swift.Double, endTime: Swift.Double, text: Swift.String)
|
|
631
666
|
public static func == (a: ShortKitSDK.VTTCue, b: ShortKitSDK.VTTCue) -> Swift.Bool
|
|
632
667
|
}
|
|
668
|
+
public struct VideoCarouselInput : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
669
|
+
public let id: Swift.String
|
|
670
|
+
public let videos: [ShortKitSDK.VideoCarouselVideoInput]
|
|
671
|
+
public let title: Swift.String?
|
|
672
|
+
public let description: Swift.String?
|
|
673
|
+
public let author: Swift.String?
|
|
674
|
+
public let section: Swift.String?
|
|
675
|
+
public let articleUrl: Swift.String?
|
|
676
|
+
public init(id: Swift.String, videos: [ShortKitSDK.VideoCarouselVideoInput], title: Swift.String? = nil, description: Swift.String? = nil, author: Swift.String? = nil, section: Swift.String? = nil, articleUrl: Swift.String? = nil)
|
|
677
|
+
public static func == (a: ShortKitSDK.VideoCarouselInput, b: ShortKitSDK.VideoCarouselInput) -> Swift.Bool
|
|
678
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
679
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
680
|
+
}
|
|
633
681
|
public struct VideoCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
634
682
|
public let id: Swift.String
|
|
635
683
|
public let videos: [ShortKitSDK.ContentItem]
|
|
@@ -643,6 +691,14 @@ public struct VideoCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable
|
|
|
643
691
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
644
692
|
public init(from decoder: any Swift.Decoder) throws
|
|
645
693
|
}
|
|
694
|
+
public struct VideoCarouselVideoInput : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
695
|
+
public let playbackId: Swift.String
|
|
696
|
+
public let fallbackUrl: Swift.String?
|
|
697
|
+
public init(playbackId: Swift.String, fallbackUrl: Swift.String? = nil)
|
|
698
|
+
public static func == (a: ShortKitSDK.VideoCarouselVideoInput, b: ShortKitSDK.VideoCarouselVideoInput) -> Swift.Bool
|
|
699
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
700
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
701
|
+
}
|
|
646
702
|
public protocol AdOverlay : AnyObject {
|
|
647
703
|
func configure(with content: ShortKitSDK.NativeAdContent)
|
|
648
704
|
func resetState()
|
|
@@ -654,6 +710,7 @@ public protocol CarouselOverlay : AnyObject {
|
|
|
654
710
|
var wantsNativeImagePrefetch: Swift.Bool { get }
|
|
655
711
|
func activatePlayback()
|
|
656
712
|
func updateActiveImage(index: Swift.Int)
|
|
713
|
+
func resetToFirstImage()
|
|
657
714
|
}
|
|
658
715
|
extension ShortKitSDK.CarouselOverlay {
|
|
659
716
|
public var cachedImage: ((Swift.String) -> UIKit.UIImage?)? {
|
|
@@ -665,6 +722,7 @@ extension ShortKitSDK.CarouselOverlay {
|
|
|
665
722
|
}
|
|
666
723
|
public func activatePlayback()
|
|
667
724
|
public func updateActiveImage(index: Swift.Int)
|
|
725
|
+
public func resetToFirstImage()
|
|
668
726
|
}
|
|
669
727
|
final public class CellContent : Combine.ObservableObject {
|
|
670
728
|
@Combine.Published<ShortKitSDK.ContentItem?> @_projectedValueProperty($item) final public var item: ShortKitSDK.ContentItem? {
|
|
@@ -884,6 +942,7 @@ final public class ShortKit {
|
|
|
884
942
|
final public let player: ShortKitSDK.ShortKitPlayer
|
|
885
943
|
final public let debugPanelEnabled: Swift.Bool
|
|
886
944
|
weak final public var delegate: (any ShortKitSDK.ShortKitDelegate)?
|
|
945
|
+
weak final public var downloadDelegate: (any ShortKitSDK.ShortKitDownloadDelegate)?
|
|
887
946
|
final public var loadingViewProvider: (() -> UIKit.UIView)?
|
|
888
947
|
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, debugPanelEnabled: Swift.Bool = false)
|
|
889
948
|
final public func preloadFeed(filter: ShortKitSDK.FeedFilter? = nil, limit: Swift.Int = 10) -> ShortKitSDK.FeedPreload
|
|
@@ -893,6 +952,8 @@ final public class ShortKit {
|
|
|
893
952
|
final public func clearUserId()
|
|
894
953
|
@_Concurrency.MainActor final public func setColdStartQueue(_ items: [ShortKitSDK.FeedInput])
|
|
895
954
|
final public func clearColdStartCache()
|
|
955
|
+
final public func downloadVideo(_ item: ShortKitSDK.ContentItem, mode: ShortKitSDK.DownloadMode = .nonInterruptive) async throws -> Foundation.URL
|
|
956
|
+
final public func cancelDownload()
|
|
896
957
|
@objc deinit
|
|
897
958
|
}
|
|
898
959
|
public enum PlayerClickAction : Swift.Sendable {
|
|
@@ -984,6 +1045,8 @@ extension ShortKitSDK.FeedSource : Swift.RawRepresentable {}
|
|
|
984
1045
|
extension ShortKitSDK.SwipeCurve : Swift.Equatable {}
|
|
985
1046
|
extension ShortKitSDK.SwipeCurve : Swift.Hashable {}
|
|
986
1047
|
extension ShortKitSDK.SwipeCurve : Swift.RawRepresentable {}
|
|
1048
|
+
extension ShortKitSDK.DownloadMode : Swift.Equatable {}
|
|
1049
|
+
extension ShortKitSDK.DownloadMode : Swift.Hashable {}
|
|
987
1050
|
extension ShortKitSDK.ShortKitFeedView : Swift.Sendable {}
|
|
988
1051
|
extension ShortKitSDK.CaptionSource : Swift.Equatable {}
|
|
989
1052
|
extension ShortKitSDK.CaptionSource : Swift.Hashable {}
|