@shortkitsdk/react-native 0.2.11 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle.kts +13 -1
- package/android/src/main/java/com/shortkit/reactnative/ReactCarouselOverlayHost.kt +115 -55
- package/android/src/main/java/com/shortkit/reactnative/ReactOverlayHost.kt +67 -56
- package/android/src/main/java/com/shortkit/reactnative/ShortKitBridge.kt +71 -26
- package/android/src/main/java/com/shortkit/reactnative/ShortKitFeedView.kt +160 -35
- package/android/src/main/java/com/shortkit/reactnative/ShortKitFeedViewManager.kt +5 -0
- package/android/src/main/java/com/shortkit/reactnative/ShortKitModule.kt +43 -10
- package/android/src/main/java/com/shortkit/reactnative/ShortKitPlayerNativeView.kt +9 -0
- package/ios/ReactOverlayHost.swift +13 -27
- package/ios/ShortKitBridge.swift +36 -2
- package/ios/ShortKitFeedView.swift +24 -3
- package/ios/ShortKitModule.mm +4 -1
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +720 -144
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +19 -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 +19 -5
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +720 -144
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +19 -5
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +19 -5
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/package.json +1 -1
- package/src/ShortKitContext.ts +2 -1
- package/src/ShortKitFeed.tsx +14 -0
- package/src/ShortKitOverlaySurface.tsx +153 -45
- package/src/ShortKitPlayer.tsx +25 -3
- package/src/ShortKitProvider.tsx +4 -2
- package/src/index.ts +4 -0
- package/src/serialization.ts +1 -0
- package/src/specs/NativeShortKitModule.ts +18 -1
- package/src/types.ts +6 -0
|
@@ -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,6 +200,7 @@ 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
|
|
196
206
|
public var surveyOverlay: ShortKitSDK.SurveyOverlayMode
|
|
@@ -201,7 +211,7 @@ public struct FeedConfig : Swift.Codable {
|
|
|
201
211
|
public var coldStartEnabled: Swift.Bool
|
|
202
212
|
public var filter: ShortKitSDK.FeedFilter?
|
|
203
213
|
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)
|
|
214
|
+
public init(feedHeight: ShortKitSDK.FeedHeight = .fullscreen, scrollAxis: ShortKitSDK.ScrollAxis = .vertical, videoOverlay: ShortKitSDK.VideoOverlayMode = .none, carouselOverlay: ShortKitSDK.CarouselOverlayMode = .none, surveyOverlay: ShortKitSDK.SurveyOverlayMode = .none, adOverlay: ShortKitSDK.AdOverlayMode = .none, muteOnStart: Swift.Bool = true, autoplay: Swift.Bool = true, feedSource: ShortKitSDK.FeedSource = .algorithmic, coldStartEnabled: Swift.Bool = false, filter: ShortKitSDK.FeedFilter? = nil, preload: ShortKitSDK.FeedPreload? = nil)
|
|
205
215
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
206
216
|
public init(from decoder: any Swift.Decoder) throws
|
|
207
217
|
}
|
|
@@ -266,7 +276,7 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
266
276
|
@objc deinit
|
|
267
277
|
}
|
|
268
278
|
@_Concurrency.MainActor @preconcurrency public struct ShortKitFeedView : SwiftUI.UIViewControllerRepresentable {
|
|
269
|
-
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig)
|
|
279
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig = FeedConfig(), onFeedReady: (() -> Swift.Void)? = nil)
|
|
270
280
|
@_Concurrency.MainActor @preconcurrency public func makeCoordinator() -> ShortKitSDK.ShortKitFeedView.Coordinator
|
|
271
281
|
@_Concurrency.MainActor @preconcurrency public func makeUIViewController(context: ShortKitSDK.ShortKitFeedView.Context) -> ShortKitSDK.ShortKitFeedViewController
|
|
272
282
|
@_Concurrency.MainActor @preconcurrency public func updateUIViewController(_ uiViewController: ShortKitSDK.ShortKitFeedViewController, context: ShortKitSDK.ShortKitFeedView.Context)
|
|
@@ -280,6 +290,7 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
280
290
|
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class ShortKitFeedViewController : UIKit.UIViewController {
|
|
281
291
|
@_Concurrency.MainActor @preconcurrency public var onDismiss: (() -> Swift.Void)?
|
|
282
292
|
@_Concurrency.MainActor @preconcurrency public var onRemainingContentCountChange: ((Swift.Int) -> Swift.Void)?
|
|
293
|
+
@_Concurrency.MainActor @preconcurrency public var onFeedReady: (() -> Swift.Void)?
|
|
283
294
|
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig, startAtItemId: Swift.String? = nil)
|
|
284
295
|
@_Concurrency.MainActor public func setFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
285
296
|
@_Concurrency.MainActor public func appendFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
@@ -289,6 +300,9 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
289
300
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillAppear(_ animated: Swift.Bool)
|
|
290
301
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidAppear(_ animated: Swift.Bool)
|
|
291
302
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillDisappear(_ animated: Swift.Bool)
|
|
303
|
+
@_Concurrency.MainActor @preconcurrency public func setBridgeManaged()
|
|
304
|
+
@_Concurrency.MainActor @preconcurrency public func activate()
|
|
305
|
+
@_Concurrency.MainActor @preconcurrency public func deactivate()
|
|
292
306
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidDisappear(_ animated: Swift.Bool)
|
|
293
307
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public var supportedInterfaceOrientations: UIKit.UIInterfaceOrientationMask {
|
|
294
308
|
@objc get
|
|
@@ -689,9 +703,6 @@ public enum ContentSignal : Swift.Equatable, Swift.Sendable {
|
|
|
689
703
|
final public var remainingContentCount: Combine.AnyPublisher<Swift.Int, Swift.Never> {
|
|
690
704
|
get
|
|
691
705
|
}
|
|
692
|
-
final public var feedReady: Combine.AnyPublisher<Swift.Void, Swift.Never> {
|
|
693
|
-
get
|
|
694
|
-
}
|
|
695
706
|
final public var currentItemValue: ShortKitSDK.ContentItem? {
|
|
696
707
|
get
|
|
697
708
|
}
|
|
@@ -754,6 +765,7 @@ final public class ShortKit {
|
|
|
754
765
|
final public var loadingViewProvider: (() -> UIKit.UIView)?
|
|
755
766
|
public init(apiKey: Swift.String, userId: Swift.String? = nil, adProvider: (any ShortKitSDK.ShortKitAdProvider)? = nil, clientAppName: Swift.String? = nil, clientAppVersion: Swift.String? = nil, customDimensions: [Swift.String : Swift.String]? = nil, loadingViewProvider: (() -> UIKit.UIView)? = nil)
|
|
756
767
|
final public func preloadFeed(filter: ShortKitSDK.FeedFilter? = nil, limit: Swift.Int = 10) -> ShortKitSDK.FeedPreload
|
|
768
|
+
final public func preloadFeed(items: [ShortKitSDK.FeedInput]) -> ShortKitSDK.FeedPreload
|
|
757
769
|
final public func fetchContent(limit: Swift.Int = 10, filter: ShortKitSDK.FeedFilter? = nil) async throws -> [ShortKitSDK.ContentItem]
|
|
758
770
|
final public func setUserId(_ id: Swift.String)
|
|
759
771
|
final public func clearUserId()
|
|
@@ -835,6 +847,8 @@ public struct WidgetConfig {
|
|
|
835
847
|
}
|
|
836
848
|
extension ShortKitSDK.AdQuartile : Swift.Equatable {}
|
|
837
849
|
extension ShortKitSDK.AdQuartile : Swift.Hashable {}
|
|
850
|
+
extension ShortKitSDK.ScrollAxis : Swift.Hashable {}
|
|
851
|
+
extension ShortKitSDK.ScrollAxis : Swift.RawRepresentable {}
|
|
838
852
|
extension ShortKitSDK.FeedSource : Swift.Hashable {}
|
|
839
853
|
extension ShortKitSDK.FeedSource : Swift.RawRepresentable {}
|
|
840
854
|
extension ShortKitSDK.ShortKitFeedView : Swift.Sendable {}
|
|
Binary file
|
|
@@ -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,6 +200,7 @@ 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
|
|
196
206
|
public var surveyOverlay: ShortKitSDK.SurveyOverlayMode
|
|
@@ -201,7 +211,7 @@ public struct FeedConfig : Swift.Codable {
|
|
|
201
211
|
public var coldStartEnabled: Swift.Bool
|
|
202
212
|
public var filter: ShortKitSDK.FeedFilter?
|
|
203
213
|
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)
|
|
214
|
+
public init(feedHeight: ShortKitSDK.FeedHeight = .fullscreen, scrollAxis: ShortKitSDK.ScrollAxis = .vertical, videoOverlay: ShortKitSDK.VideoOverlayMode = .none, carouselOverlay: ShortKitSDK.CarouselOverlayMode = .none, surveyOverlay: ShortKitSDK.SurveyOverlayMode = .none, adOverlay: ShortKitSDK.AdOverlayMode = .none, muteOnStart: Swift.Bool = true, autoplay: Swift.Bool = true, feedSource: ShortKitSDK.FeedSource = .algorithmic, coldStartEnabled: Swift.Bool = false, filter: ShortKitSDK.FeedFilter? = nil, preload: ShortKitSDK.FeedPreload? = nil)
|
|
205
215
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
206
216
|
public init(from decoder: any Swift.Decoder) throws
|
|
207
217
|
}
|
|
@@ -266,7 +276,7 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
266
276
|
@objc deinit
|
|
267
277
|
}
|
|
268
278
|
@_Concurrency.MainActor @preconcurrency public struct ShortKitFeedView : SwiftUI.UIViewControllerRepresentable {
|
|
269
|
-
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig)
|
|
279
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig = FeedConfig(), onFeedReady: (() -> Swift.Void)? = nil)
|
|
270
280
|
@_Concurrency.MainActor @preconcurrency public func makeCoordinator() -> ShortKitSDK.ShortKitFeedView.Coordinator
|
|
271
281
|
@_Concurrency.MainActor @preconcurrency public func makeUIViewController(context: ShortKitSDK.ShortKitFeedView.Context) -> ShortKitSDK.ShortKitFeedViewController
|
|
272
282
|
@_Concurrency.MainActor @preconcurrency public func updateUIViewController(_ uiViewController: ShortKitSDK.ShortKitFeedViewController, context: ShortKitSDK.ShortKitFeedView.Context)
|
|
@@ -280,6 +290,7 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
280
290
|
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class ShortKitFeedViewController : UIKit.UIViewController {
|
|
281
291
|
@_Concurrency.MainActor @preconcurrency public var onDismiss: (() -> Swift.Void)?
|
|
282
292
|
@_Concurrency.MainActor @preconcurrency public var onRemainingContentCountChange: ((Swift.Int) -> Swift.Void)?
|
|
293
|
+
@_Concurrency.MainActor @preconcurrency public var onFeedReady: (() -> Swift.Void)?
|
|
283
294
|
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.FeedConfig, startAtItemId: Swift.String? = nil)
|
|
284
295
|
@_Concurrency.MainActor public func setFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
285
296
|
@_Concurrency.MainActor public func appendFeedItems(_ items: [ShortKitSDK.FeedInput])
|
|
@@ -289,6 +300,9 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
289
300
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillAppear(_ animated: Swift.Bool)
|
|
290
301
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidAppear(_ animated: Swift.Bool)
|
|
291
302
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillDisappear(_ animated: Swift.Bool)
|
|
303
|
+
@_Concurrency.MainActor @preconcurrency public func setBridgeManaged()
|
|
304
|
+
@_Concurrency.MainActor @preconcurrency public func activate()
|
|
305
|
+
@_Concurrency.MainActor @preconcurrency public func deactivate()
|
|
292
306
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidDisappear(_ animated: Swift.Bool)
|
|
293
307
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public var supportedInterfaceOrientations: UIKit.UIInterfaceOrientationMask {
|
|
294
308
|
@objc get
|
|
@@ -689,9 +703,6 @@ public enum ContentSignal : Swift.Equatable, Swift.Sendable {
|
|
|
689
703
|
final public var remainingContentCount: Combine.AnyPublisher<Swift.Int, Swift.Never> {
|
|
690
704
|
get
|
|
691
705
|
}
|
|
692
|
-
final public var feedReady: Combine.AnyPublisher<Swift.Void, Swift.Never> {
|
|
693
|
-
get
|
|
694
|
-
}
|
|
695
706
|
final public var currentItemValue: ShortKitSDK.ContentItem? {
|
|
696
707
|
get
|
|
697
708
|
}
|
|
@@ -754,6 +765,7 @@ final public class ShortKit {
|
|
|
754
765
|
final public var loadingViewProvider: (() -> UIKit.UIView)?
|
|
755
766
|
public init(apiKey: Swift.String, userId: Swift.String? = nil, adProvider: (any ShortKitSDK.ShortKitAdProvider)? = nil, clientAppName: Swift.String? = nil, clientAppVersion: Swift.String? = nil, customDimensions: [Swift.String : Swift.String]? = nil, loadingViewProvider: (() -> UIKit.UIView)? = nil)
|
|
756
767
|
final public func preloadFeed(filter: ShortKitSDK.FeedFilter? = nil, limit: Swift.Int = 10) -> ShortKitSDK.FeedPreload
|
|
768
|
+
final public func preloadFeed(items: [ShortKitSDK.FeedInput]) -> ShortKitSDK.FeedPreload
|
|
757
769
|
final public func fetchContent(limit: Swift.Int = 10, filter: ShortKitSDK.FeedFilter? = nil) async throws -> [ShortKitSDK.ContentItem]
|
|
758
770
|
final public func setUserId(_ id: Swift.String)
|
|
759
771
|
final public func clearUserId()
|
|
@@ -835,6 +847,8 @@ public struct WidgetConfig {
|
|
|
835
847
|
}
|
|
836
848
|
extension ShortKitSDK.AdQuartile : Swift.Equatable {}
|
|
837
849
|
extension ShortKitSDK.AdQuartile : Swift.Hashable {}
|
|
850
|
+
extension ShortKitSDK.ScrollAxis : Swift.Hashable {}
|
|
851
|
+
extension ShortKitSDK.ScrollAxis : Swift.RawRepresentable {}
|
|
838
852
|
extension ShortKitSDK.FeedSource : Swift.Hashable {}
|
|
839
853
|
extension ShortKitSDK.FeedSource : Swift.RawRepresentable {}
|
|
840
854
|
extension ShortKitSDK.ShortKitFeedView : Swift.Sendable {}
|
|
Binary file
|