@shortkitsdk/react-native 0.2.46 → 0.2.47
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 +2 -4
- package/ios/ShortKitBridge.swift +74 -1
- package/ios/ShortKitModule.mm +10 -0
- package/ios/ShortKitPushHostViewController.swift +59 -0
- 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 +1296 -107
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +30 -9
- 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 +30 -9
- 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 +1296 -107
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +30 -9
- 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 +30 -9
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +1296 -107
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +30 -9
- 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 +30 -9
- 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 +39 -0
- package/src/index.ts +5 -0
- package/src/specs/NativeShortKitModule.ts +4 -0
|
@@ -252,7 +252,8 @@ public struct FeedConfig : Swift.Codable {
|
|
|
252
252
|
public var pullToRefreshEnabled: Swift.Bool
|
|
253
253
|
public var filter: ShortKitSDK.FeedFilter?
|
|
254
254
|
public var preload: ShortKitSDK.FeedPreload?
|
|
255
|
-
public
|
|
255
|
+
public var shouldExpandLiveRoom: ((ShortKitSDK.ContentItem) -> Swift.Bool)?
|
|
256
|
+
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, liveOverlay: ShortKitSDK.LiveOverlayMode = .default, liveEndedOverlay: ShortKitSDK.LiveEndedOverlayMode = .default, liveRoomMask: ShortKitSDK.LiveRoomMaskMode = .none, muteOnStart: Swift.Bool = true, autoplay: Swift.Bool = true, feedSource: ShortKitSDK.FeedSource = .algorithmic, coldStartEnabled: Swift.Bool = false, pullToRefreshEnabled: Swift.Bool = true, filter: ShortKitSDK.FeedFilter? = nil, preload: ShortKitSDK.FeedPreload? = nil, shouldExpandLiveRoom: ((ShortKitSDK.ContentItem) -> Swift.Bool)? = nil)
|
|
256
257
|
public init(from decoder: any Swift.Decoder) throws
|
|
257
258
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
258
259
|
}
|
|
@@ -532,7 +533,7 @@ public enum ShortKitDownloadError : Swift.Error, Foundation.LocalizedError {
|
|
|
532
533
|
}
|
|
533
534
|
}
|
|
534
535
|
@_hasMissingDesignatedInitializers final public class FeedPreload : @unchecked Swift.Sendable {
|
|
535
|
-
public init(immediateItems items: [ShortKitSDK.FeedInput])
|
|
536
|
+
public init(immediateItems items: [ShortKitSDK.FeedInput], isSeed: Swift.Bool = false)
|
|
536
537
|
@objc deinit
|
|
537
538
|
}
|
|
538
539
|
@_Concurrency.MainActor @preconcurrency public struct ShortKitFeedView : SwiftUI.UIViewControllerRepresentable {
|
|
@@ -757,7 +758,7 @@ public enum ContentOrigin : Swift.String, Swift.Codable, Swift.Sendable {
|
|
|
757
758
|
}
|
|
758
759
|
}
|
|
759
760
|
public enum FeedInput : Swift.Sendable {
|
|
760
|
-
case video(playbackId: Swift.String, origin: ShortKitSDK.ContentOrigin = .other, fallbackUrl: Swift.String? = nil)
|
|
761
|
+
case video(playbackId: Swift.String, origin: ShortKitSDK.ContentOrigin = .other, fallbackUrl: Swift.String? = nil, contentId: Swift.String? = nil)
|
|
761
762
|
case liveStream(playbackId: Swift.String)
|
|
762
763
|
case imageCarousel(ShortKitSDK.ImageCarouselItem)
|
|
763
764
|
case videoCarousel(ShortKitSDK.VideoCarouselInput)
|
|
@@ -1236,6 +1237,7 @@ final public class ShortKit {
|
|
|
1236
1237
|
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, serverTracingEnabled: Swift.Bool = false, consoleTracingEnabled: Swift.Bool = false, poolDebugEnabled: Swift.Bool = false)
|
|
1237
1238
|
final public func preloadFeed(filter: ShortKitSDK.FeedFilter? = nil, limit: Swift.Int = 10) -> ShortKitSDK.FeedPreload
|
|
1238
1239
|
final public func preloadFeed(items: [ShortKitSDK.FeedInput]) -> ShortKitSDK.FeedPreload
|
|
1240
|
+
final public func preloadFeed(seedItems: [ShortKitSDK.FeedInput]) -> ShortKitSDK.FeedPreload
|
|
1239
1241
|
final public func fetchContent(limit: Swift.Int = 10, filter: ShortKitSDK.FeedFilter? = nil) async throws -> [ShortKitSDK.ContentItem]
|
|
1240
1242
|
final public func setUserId(_ id: Swift.String)
|
|
1241
1243
|
final public func clearUserId()
|
|
@@ -1309,8 +1311,12 @@ extension ShortKitSDK.ShortKitPlayerViewController : UIKit.UIViewControllerTrans
|
|
|
1309
1311
|
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.WidgetConfig, items: [ShortKitSDK.WidgetInput] = [])
|
|
1310
1312
|
@_Concurrency.MainActor @preconcurrency final public func configure(with inputs: [ShortKitSDK.WidgetInput])
|
|
1311
1313
|
@_Concurrency.MainActor @preconcurrency final public func setFeedItems(_ inputs: [ShortKitSDK.FeedInput])
|
|
1314
|
+
@_Concurrency.MainActor @preconcurrency final public var onContentHeightChange: ((CoreFoundation.CGFloat) -> Swift.Void)?
|
|
1315
|
+
@_Concurrency.MainActor @preconcurrency final public func appendItems(_ inputs: [ShortKitSDK.WidgetInput])
|
|
1316
|
+
@_Concurrency.MainActor @preconcurrency final public func parentScrollViewDidScroll(_ scrollView: UIKit.UIScrollView)
|
|
1312
1317
|
@_Concurrency.MainActor @preconcurrency @objc override final public func viewDidLoad()
|
|
1313
1318
|
@_Concurrency.MainActor @preconcurrency @objc override final public func viewDidAppear(_ animated: Swift.Bool)
|
|
1319
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func viewDidLayoutSubviews()
|
|
1314
1320
|
@_Concurrency.MainActor @preconcurrency @objc override final public func viewWillDisappear(_ animated: Swift.Bool)
|
|
1315
1321
|
@objc deinit
|
|
1316
1322
|
}
|
|
@@ -1319,6 +1325,7 @@ extension ShortKitSDK.ShortKitWidgetViewController : UIKit.UICollectionViewDataS
|
|
|
1319
1325
|
@_Concurrency.MainActor @preconcurrency @objc final public func collectionView(_ collectionView: UIKit.UICollectionView, cellForItemAt indexPath: Foundation.IndexPath) -> UIKit.UICollectionViewCell
|
|
1320
1326
|
}
|
|
1321
1327
|
extension ShortKitSDK.ShortKitWidgetViewController : UIKit.UICollectionViewDelegate {
|
|
1328
|
+
@_Concurrency.MainActor @preconcurrency @objc final public func collectionView(_ collectionView: UIKit.UICollectionView, willDisplay cell: UIKit.UICollectionViewCell, forItemAt indexPath: Foundation.IndexPath)
|
|
1322
1329
|
@_Concurrency.MainActor @preconcurrency @objc final public func collectionView(_ collectionView: UIKit.UICollectionView, didSelectItemAt indexPath: Foundation.IndexPath)
|
|
1323
1330
|
}
|
|
1324
1331
|
extension ShortKitSDK.ShortKitWidgetViewController : UIKit.UIViewControllerTransitioningDelegate {
|
|
@@ -1326,15 +1333,26 @@ extension ShortKitSDK.ShortKitWidgetViewController : UIKit.UIViewControllerTrans
|
|
|
1326
1333
|
@_Concurrency.MainActor @preconcurrency @objc final public func animationController(forDismissed dismissed: UIKit.UIViewController) -> (any UIKit.UIViewControllerAnimatedTransitioning)?
|
|
1327
1334
|
@_Concurrency.MainActor @preconcurrency @objc final public func interactionControllerForDismissal(using animator: any UIKit.UIViewControllerAnimatedTransitioning) -> (any UIKit.UIViewControllerInteractiveTransitioning)?
|
|
1328
1335
|
}
|
|
1329
|
-
public enum
|
|
1330
|
-
case
|
|
1331
|
-
case
|
|
1332
|
-
public static func == (a: ShortKitSDK.
|
|
1336
|
+
public enum GridSide : Swift.Equatable, Swift.Sendable {
|
|
1337
|
+
case left
|
|
1338
|
+
case right
|
|
1339
|
+
public static func == (a: ShortKitSDK.GridSide, b: ShortKitSDK.GridSide) -> Swift.Bool
|
|
1333
1340
|
public func hash(into hasher: inout Swift.Hasher)
|
|
1334
1341
|
public var hashValue: Swift.Int {
|
|
1335
1342
|
get
|
|
1336
1343
|
}
|
|
1337
1344
|
}
|
|
1345
|
+
public enum WidgetPlaybackMode : Swift.Equatable, Swift.Sendable {
|
|
1346
|
+
case singleVisibleRotating
|
|
1347
|
+
case allVisibleSimultaneous
|
|
1348
|
+
case gridAlternating(startSide: ShortKitSDK.GridSide = .left)
|
|
1349
|
+
public static func == (a: ShortKitSDK.WidgetPlaybackMode, b: ShortKitSDK.WidgetPlaybackMode) -> Swift.Bool
|
|
1350
|
+
}
|
|
1351
|
+
public enum WidgetLayout : Swift.Equatable, Swift.Sendable {
|
|
1352
|
+
case carousel
|
|
1353
|
+
case grid(columns: Swift.Int, cellAspectRatio: CoreFoundation.CGFloat, scrollable: Swift.Bool = true)
|
|
1354
|
+
public static func == (a: ShortKitSDK.WidgetLayout, b: ShortKitSDK.WidgetLayout) -> Swift.Bool
|
|
1355
|
+
}
|
|
1338
1356
|
public struct WidgetConfig {
|
|
1339
1357
|
public var cardCount: Swift.Int
|
|
1340
1358
|
public var cardSpacing: CoreFoundation.CGFloat
|
|
@@ -1349,7 +1367,10 @@ public struct WidgetConfig {
|
|
|
1349
1367
|
public var filter: ShortKitSDK.FeedFilter?
|
|
1350
1368
|
public var playbackMode: ShortKitSDK.WidgetPlaybackMode
|
|
1351
1369
|
public var previewDuration: Foundation.TimeInterval
|
|
1352
|
-
public
|
|
1370
|
+
public var layout: ShortKitSDK.WidgetLayout
|
|
1371
|
+
public init(cardCount: Swift.Int = 3, cardSpacing: CoreFoundation.CGFloat = 8, cornerRadius: CoreFoundation.CGFloat = 12, autoplay: Swift.Bool = true, muteOnStart: Swift.Bool = true, loop: Swift.Bool = true, rotationInterval: Foundation.TimeInterval = 10, clickAction: ShortKitSDK.PlayerClickAction = .feed, cardOverlay: ShortKitSDK.VideoOverlayMode = .none, feedConfig: ShortKitSDK.FeedConfig = FeedConfig(), filter: ShortKitSDK.FeedFilter? = nil, playbackMode: ShortKitSDK.WidgetPlaybackMode = .singleVisibleRotating, previewDuration: Foundation.TimeInterval = 5.0, layout: ShortKitSDK.WidgetLayout = .carousel)
|
|
1372
|
+
public func gridCellHeight(forContainerWidth width: CoreFoundation.CGFloat) -> CoreFoundation.CGFloat?
|
|
1373
|
+
public func preferredGridHeight(forContainerWidth width: CoreFoundation.CGFloat, itemCount: Swift.Int) -> CoreFoundation.CGFloat?
|
|
1353
1374
|
public func resolvedFeedConfig() -> ShortKitSDK.FeedConfig
|
|
1354
1375
|
}
|
|
1355
1376
|
public enum WidgetInput : Swift.Sendable {
|
|
@@ -1397,4 +1418,4 @@ extension ShortKitSDK.ContentSignal : Swift.Hashable {}
|
|
|
1397
1418
|
extension ShortKitSDK.PlayerClickAction : Swift.Equatable {}
|
|
1398
1419
|
extension ShortKitSDK.PlayerClickAction : Swift.Hashable {}
|
|
1399
1420
|
extension ShortKitSDK.ShortKitPlayerView : Swift.Sendable {}
|
|
1400
|
-
extension ShortKitSDK.
|
|
1421
|
+
extension ShortKitSDK.GridSide : Swift.Hashable {}
|
|
Binary file
|
|
@@ -252,7 +252,8 @@ public struct FeedConfig : Swift.Codable {
|
|
|
252
252
|
public var pullToRefreshEnabled: Swift.Bool
|
|
253
253
|
public var filter: ShortKitSDK.FeedFilter?
|
|
254
254
|
public var preload: ShortKitSDK.FeedPreload?
|
|
255
|
-
public
|
|
255
|
+
public var shouldExpandLiveRoom: ((ShortKitSDK.ContentItem) -> Swift.Bool)?
|
|
256
|
+
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, liveOverlay: ShortKitSDK.LiveOverlayMode = .default, liveEndedOverlay: ShortKitSDK.LiveEndedOverlayMode = .default, liveRoomMask: ShortKitSDK.LiveRoomMaskMode = .none, muteOnStart: Swift.Bool = true, autoplay: Swift.Bool = true, feedSource: ShortKitSDK.FeedSource = .algorithmic, coldStartEnabled: Swift.Bool = false, pullToRefreshEnabled: Swift.Bool = true, filter: ShortKitSDK.FeedFilter? = nil, preload: ShortKitSDK.FeedPreload? = nil, shouldExpandLiveRoom: ((ShortKitSDK.ContentItem) -> Swift.Bool)? = nil)
|
|
256
257
|
public init(from decoder: any Swift.Decoder) throws
|
|
257
258
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
258
259
|
}
|
|
@@ -532,7 +533,7 @@ public enum ShortKitDownloadError : Swift.Error, Foundation.LocalizedError {
|
|
|
532
533
|
}
|
|
533
534
|
}
|
|
534
535
|
@_hasMissingDesignatedInitializers final public class FeedPreload : @unchecked Swift.Sendable {
|
|
535
|
-
public init(immediateItems items: [ShortKitSDK.FeedInput])
|
|
536
|
+
public init(immediateItems items: [ShortKitSDK.FeedInput], isSeed: Swift.Bool = false)
|
|
536
537
|
@objc deinit
|
|
537
538
|
}
|
|
538
539
|
@_Concurrency.MainActor @preconcurrency public struct ShortKitFeedView : SwiftUI.UIViewControllerRepresentable {
|
|
@@ -757,7 +758,7 @@ public enum ContentOrigin : Swift.String, Swift.Codable, Swift.Sendable {
|
|
|
757
758
|
}
|
|
758
759
|
}
|
|
759
760
|
public enum FeedInput : Swift.Sendable {
|
|
760
|
-
case video(playbackId: Swift.String, origin: ShortKitSDK.ContentOrigin = .other, fallbackUrl: Swift.String? = nil)
|
|
761
|
+
case video(playbackId: Swift.String, origin: ShortKitSDK.ContentOrigin = .other, fallbackUrl: Swift.String? = nil, contentId: Swift.String? = nil)
|
|
761
762
|
case liveStream(playbackId: Swift.String)
|
|
762
763
|
case imageCarousel(ShortKitSDK.ImageCarouselItem)
|
|
763
764
|
case videoCarousel(ShortKitSDK.VideoCarouselInput)
|
|
@@ -1236,6 +1237,7 @@ final public class ShortKit {
|
|
|
1236
1237
|
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, serverTracingEnabled: Swift.Bool = false, consoleTracingEnabled: Swift.Bool = false, poolDebugEnabled: Swift.Bool = false)
|
|
1237
1238
|
final public func preloadFeed(filter: ShortKitSDK.FeedFilter? = nil, limit: Swift.Int = 10) -> ShortKitSDK.FeedPreload
|
|
1238
1239
|
final public func preloadFeed(items: [ShortKitSDK.FeedInput]) -> ShortKitSDK.FeedPreload
|
|
1240
|
+
final public func preloadFeed(seedItems: [ShortKitSDK.FeedInput]) -> ShortKitSDK.FeedPreload
|
|
1239
1241
|
final public func fetchContent(limit: Swift.Int = 10, filter: ShortKitSDK.FeedFilter? = nil) async throws -> [ShortKitSDK.ContentItem]
|
|
1240
1242
|
final public func setUserId(_ id: Swift.String)
|
|
1241
1243
|
final public func clearUserId()
|
|
@@ -1309,8 +1311,12 @@ extension ShortKitSDK.ShortKitPlayerViewController : UIKit.UIViewControllerTrans
|
|
|
1309
1311
|
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.WidgetConfig, items: [ShortKitSDK.WidgetInput] = [])
|
|
1310
1312
|
@_Concurrency.MainActor @preconcurrency final public func configure(with inputs: [ShortKitSDK.WidgetInput])
|
|
1311
1313
|
@_Concurrency.MainActor @preconcurrency final public func setFeedItems(_ inputs: [ShortKitSDK.FeedInput])
|
|
1314
|
+
@_Concurrency.MainActor @preconcurrency final public var onContentHeightChange: ((CoreFoundation.CGFloat) -> Swift.Void)?
|
|
1315
|
+
@_Concurrency.MainActor @preconcurrency final public func appendItems(_ inputs: [ShortKitSDK.WidgetInput])
|
|
1316
|
+
@_Concurrency.MainActor @preconcurrency final public func parentScrollViewDidScroll(_ scrollView: UIKit.UIScrollView)
|
|
1312
1317
|
@_Concurrency.MainActor @preconcurrency @objc override final public func viewDidLoad()
|
|
1313
1318
|
@_Concurrency.MainActor @preconcurrency @objc override final public func viewDidAppear(_ animated: Swift.Bool)
|
|
1319
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func viewDidLayoutSubviews()
|
|
1314
1320
|
@_Concurrency.MainActor @preconcurrency @objc override final public func viewWillDisappear(_ animated: Swift.Bool)
|
|
1315
1321
|
@objc deinit
|
|
1316
1322
|
}
|
|
@@ -1319,6 +1325,7 @@ extension ShortKitSDK.ShortKitWidgetViewController : UIKit.UICollectionViewDataS
|
|
|
1319
1325
|
@_Concurrency.MainActor @preconcurrency @objc final public func collectionView(_ collectionView: UIKit.UICollectionView, cellForItemAt indexPath: Foundation.IndexPath) -> UIKit.UICollectionViewCell
|
|
1320
1326
|
}
|
|
1321
1327
|
extension ShortKitSDK.ShortKitWidgetViewController : UIKit.UICollectionViewDelegate {
|
|
1328
|
+
@_Concurrency.MainActor @preconcurrency @objc final public func collectionView(_ collectionView: UIKit.UICollectionView, willDisplay cell: UIKit.UICollectionViewCell, forItemAt indexPath: Foundation.IndexPath)
|
|
1322
1329
|
@_Concurrency.MainActor @preconcurrency @objc final public func collectionView(_ collectionView: UIKit.UICollectionView, didSelectItemAt indexPath: Foundation.IndexPath)
|
|
1323
1330
|
}
|
|
1324
1331
|
extension ShortKitSDK.ShortKitWidgetViewController : UIKit.UIViewControllerTransitioningDelegate {
|
|
@@ -1326,15 +1333,26 @@ extension ShortKitSDK.ShortKitWidgetViewController : UIKit.UIViewControllerTrans
|
|
|
1326
1333
|
@_Concurrency.MainActor @preconcurrency @objc final public func animationController(forDismissed dismissed: UIKit.UIViewController) -> (any UIKit.UIViewControllerAnimatedTransitioning)?
|
|
1327
1334
|
@_Concurrency.MainActor @preconcurrency @objc final public func interactionControllerForDismissal(using animator: any UIKit.UIViewControllerAnimatedTransitioning) -> (any UIKit.UIViewControllerInteractiveTransitioning)?
|
|
1328
1335
|
}
|
|
1329
|
-
public enum
|
|
1330
|
-
case
|
|
1331
|
-
case
|
|
1332
|
-
public static func == (a: ShortKitSDK.
|
|
1336
|
+
public enum GridSide : Swift.Equatable, Swift.Sendable {
|
|
1337
|
+
case left
|
|
1338
|
+
case right
|
|
1339
|
+
public static func == (a: ShortKitSDK.GridSide, b: ShortKitSDK.GridSide) -> Swift.Bool
|
|
1333
1340
|
public func hash(into hasher: inout Swift.Hasher)
|
|
1334
1341
|
public var hashValue: Swift.Int {
|
|
1335
1342
|
get
|
|
1336
1343
|
}
|
|
1337
1344
|
}
|
|
1345
|
+
public enum WidgetPlaybackMode : Swift.Equatable, Swift.Sendable {
|
|
1346
|
+
case singleVisibleRotating
|
|
1347
|
+
case allVisibleSimultaneous
|
|
1348
|
+
case gridAlternating(startSide: ShortKitSDK.GridSide = .left)
|
|
1349
|
+
public static func == (a: ShortKitSDK.WidgetPlaybackMode, b: ShortKitSDK.WidgetPlaybackMode) -> Swift.Bool
|
|
1350
|
+
}
|
|
1351
|
+
public enum WidgetLayout : Swift.Equatable, Swift.Sendable {
|
|
1352
|
+
case carousel
|
|
1353
|
+
case grid(columns: Swift.Int, cellAspectRatio: CoreFoundation.CGFloat, scrollable: Swift.Bool = true)
|
|
1354
|
+
public static func == (a: ShortKitSDK.WidgetLayout, b: ShortKitSDK.WidgetLayout) -> Swift.Bool
|
|
1355
|
+
}
|
|
1338
1356
|
public struct WidgetConfig {
|
|
1339
1357
|
public var cardCount: Swift.Int
|
|
1340
1358
|
public var cardSpacing: CoreFoundation.CGFloat
|
|
@@ -1349,7 +1367,10 @@ public struct WidgetConfig {
|
|
|
1349
1367
|
public var filter: ShortKitSDK.FeedFilter?
|
|
1350
1368
|
public var playbackMode: ShortKitSDK.WidgetPlaybackMode
|
|
1351
1369
|
public var previewDuration: Foundation.TimeInterval
|
|
1352
|
-
public
|
|
1370
|
+
public var layout: ShortKitSDK.WidgetLayout
|
|
1371
|
+
public init(cardCount: Swift.Int = 3, cardSpacing: CoreFoundation.CGFloat = 8, cornerRadius: CoreFoundation.CGFloat = 12, autoplay: Swift.Bool = true, muteOnStart: Swift.Bool = true, loop: Swift.Bool = true, rotationInterval: Foundation.TimeInterval = 10, clickAction: ShortKitSDK.PlayerClickAction = .feed, cardOverlay: ShortKitSDK.VideoOverlayMode = .none, feedConfig: ShortKitSDK.FeedConfig = FeedConfig(), filter: ShortKitSDK.FeedFilter? = nil, playbackMode: ShortKitSDK.WidgetPlaybackMode = .singleVisibleRotating, previewDuration: Foundation.TimeInterval = 5.0, layout: ShortKitSDK.WidgetLayout = .carousel)
|
|
1372
|
+
public func gridCellHeight(forContainerWidth width: CoreFoundation.CGFloat) -> CoreFoundation.CGFloat?
|
|
1373
|
+
public func preferredGridHeight(forContainerWidth width: CoreFoundation.CGFloat, itemCount: Swift.Int) -> CoreFoundation.CGFloat?
|
|
1353
1374
|
public func resolvedFeedConfig() -> ShortKitSDK.FeedConfig
|
|
1354
1375
|
}
|
|
1355
1376
|
public enum WidgetInput : Swift.Sendable {
|
|
@@ -1397,4 +1418,4 @@ extension ShortKitSDK.ContentSignal : Swift.Hashable {}
|
|
|
1397
1418
|
extension ShortKitSDK.PlayerClickAction : Swift.Equatable {}
|
|
1398
1419
|
extension ShortKitSDK.PlayerClickAction : Swift.Hashable {}
|
|
1399
1420
|
extension ShortKitSDK.ShortKitPlayerView : Swift.Sendable {}
|
|
1400
|
-
extension ShortKitSDK.
|
|
1421
|
+
extension ShortKitSDK.GridSide : Swift.Hashable {}
|
package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/ShortKitSDK
CHANGED
|
Binary file
|
|
@@ -10,39 +10,39 @@
|
|
|
10
10
|
</data>
|
|
11
11
|
<key>Info.plist</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
4WaRBBGBBRc4XhrxQBu2SFhI+xc=
|
|
14
14
|
</data>
|
|
15
15
|
<key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
an3rvkqTPZeLciqR2pkZcZPWM+w=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
+0RV20C+rRANsdpP+V1mZLsFuvw=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
5SAMVRYrOK+IFYs6Hu843Xb3VXw=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
+0RV20C+rRANsdpP+V1mZLsFuvw=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
an3rvkqTPZeLciqR2pkZcZPWM+w=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
K8WfRtIQSTA31RrU1KFJ6qwHA68=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
qhnBc0QnFnAXP5FEFWjxlJHTJUM=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
K8WfRtIQSTA31RrU1KFJ6qwHA68=
|
|
46
46
|
</data>
|
|
47
47
|
<key>Modules/module.modulemap</key>
|
|
48
48
|
<data>
|
|
@@ -66,56 +66,56 @@
|
|
|
66
66
|
<dict>
|
|
67
67
|
<key>hash2</key>
|
|
68
68
|
<data>
|
|
69
|
-
|
|
69
|
+
oiGKF61MCOLqiH9prPxCIJwY6kGrQF5SFZQnUdNMlfk=
|
|
70
70
|
</data>
|
|
71
71
|
</dict>
|
|
72
72
|
<key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
73
73
|
<dict>
|
|
74
74
|
<key>hash2</key>
|
|
75
75
|
<data>
|
|
76
|
-
|
|
76
|
+
dmx4DKe1c9UbFg/w7YSXGDu0Qumdpo4P9UVipvfv3Aw=
|
|
77
77
|
</data>
|
|
78
78
|
</dict>
|
|
79
79
|
<key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
80
80
|
<dict>
|
|
81
81
|
<key>hash2</key>
|
|
82
82
|
<data>
|
|
83
|
-
|
|
83
|
+
QYDPA36PcdAR3SoZ6cVPFinYcEaAkYIfkJj+894JN2U=
|
|
84
84
|
</data>
|
|
85
85
|
</dict>
|
|
86
86
|
<key>Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
87
87
|
<dict>
|
|
88
88
|
<key>hash2</key>
|
|
89
89
|
<data>
|
|
90
|
-
|
|
90
|
+
dmx4DKe1c9UbFg/w7YSXGDu0Qumdpo4P9UVipvfv3Aw=
|
|
91
91
|
</data>
|
|
92
92
|
</dict>
|
|
93
93
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
94
94
|
<dict>
|
|
95
95
|
<key>hash2</key>
|
|
96
96
|
<data>
|
|
97
|
-
|
|
97
|
+
oiGKF61MCOLqiH9prPxCIJwY6kGrQF5SFZQnUdNMlfk=
|
|
98
98
|
</data>
|
|
99
99
|
</dict>
|
|
100
100
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
101
101
|
<dict>
|
|
102
102
|
<key>hash2</key>
|
|
103
103
|
<data>
|
|
104
|
-
|
|
104
|
+
8YYsx8F5tk2WnvKQw4lBYCQZIKgw7ANeRK30vGPcMzU=
|
|
105
105
|
</data>
|
|
106
106
|
</dict>
|
|
107
107
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
108
108
|
<dict>
|
|
109
109
|
<key>hash2</key>
|
|
110
110
|
<data>
|
|
111
|
-
|
|
111
|
+
8yHerNJHawK5mdiDO7DW8yoKvg80D6EGYDr+CG4uV2g=
|
|
112
112
|
</data>
|
|
113
113
|
</dict>
|
|
114
114
|
<key>Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
115
115
|
<dict>
|
|
116
116
|
<key>hash2</key>
|
|
117
117
|
<data>
|
|
118
|
-
|
|
118
|
+
8YYsx8F5tk2WnvKQw4lBYCQZIKgw7ANeRK30vGPcMzU=
|
|
119
119
|
</data>
|
|
120
120
|
</dict>
|
|
121
121
|
<key>Modules/module.modulemap</key>
|
package/package.json
CHANGED
package/src/ShortKitCommands.ts
CHANGED
|
@@ -66,3 +66,42 @@ export const ShortKitCommands = {
|
|
|
66
66
|
},
|
|
67
67
|
cancelDownload: () => NativeShortKitModule?.cancelDownload(),
|
|
68
68
|
} as const;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Push a host-registered RN component onto the active feed's navigation
|
|
72
|
+
* controller with a native parallax-push animation.
|
|
73
|
+
*
|
|
74
|
+
* Only works when the feed was presented with a `feedMask` (the mask wraps
|
|
75
|
+
* the feed in a UINavigationController on iOS). Silently no-ops otherwise.
|
|
76
|
+
*
|
|
77
|
+
* Call this from an overlay component's author-tap or similar handler:
|
|
78
|
+
*
|
|
79
|
+
* ```tsx
|
|
80
|
+
* import { pushFeedScreen } from '@shortkitsdk/react-native';
|
|
81
|
+
*
|
|
82
|
+
* // In your overlay:
|
|
83
|
+
* pushFeedScreen('ProfileScreen', { author: item.author });
|
|
84
|
+
* ```
|
|
85
|
+
*
|
|
86
|
+
* The target component must be registered with AppRegistry:
|
|
87
|
+
* ```ts
|
|
88
|
+
* AppRegistry.registerComponent('ProfileScreen', () => ProfileScreen);
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
export function pushFeedScreen(
|
|
92
|
+
componentName: string,
|
|
93
|
+
props?: Record<string, unknown>
|
|
94
|
+
): void {
|
|
95
|
+
NativeShortKitModule?.pushFeedScreen(componentName, JSON.stringify(props ?? {}));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Pop the screen most recently pushed via `pushFeedScreen` from the feed
|
|
100
|
+
* modal's navigation stack with a native slide-back animation.
|
|
101
|
+
*
|
|
102
|
+
* Call this from within a component registered with AppRegistry and rendered
|
|
103
|
+
* via `pushFeedScreen` — typically wired to a back button or `navigation.goBack()`.
|
|
104
|
+
*/
|
|
105
|
+
export function popFeedScreen(): void {
|
|
106
|
+
NativeShortKitModule?.popFeedScreen();
|
|
107
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -53,6 +53,11 @@ export { registerOverlayComponent } from './ShortKitOverlaySurface';
|
|
|
53
53
|
export { registerCarouselOverlayComponent } from './ShortKitCarouselOverlaySurface';
|
|
54
54
|
export { registerVideoCarouselOverlayComponent } from './ShortKitVideoCarouselOverlaySurface';
|
|
55
55
|
export { registerFeedMaskComponent } from './ShortKitFeedMaskSurface';
|
|
56
|
+
export { pushFeedScreen, popFeedScreen } from './ShortKitCommands';
|
|
57
|
+
/** @internal Escape hatch — only use when ShortKitProvider is already initialized by the host app. */
|
|
58
|
+
export { ShortKitInitContext } from './ShortKitContext';
|
|
59
|
+
/** @internal Serialization helpers for use with NativeShortKitModule.preloadFeed in custom surface roots. */
|
|
60
|
+
export { serializeFeedConfig, serializeFeedInputs } from './serialization';
|
|
56
61
|
export type {
|
|
57
62
|
OverlayProps,
|
|
58
63
|
CarouselOverlayProps,
|
|
@@ -319,6 +319,10 @@ export interface Spec extends TurboModule {
|
|
|
319
319
|
downloadVideo(itemId: string, mode: string, overlayMode: string): Promise<string>;
|
|
320
320
|
cancelDownload(): void;
|
|
321
321
|
|
|
322
|
+
// --- Push navigation ---
|
|
323
|
+
pushFeedScreen(componentName: string, propsJSON: string): void;
|
|
324
|
+
popFeedScreen(): void;
|
|
325
|
+
|
|
322
326
|
// --- Carousel accessors ---
|
|
323
327
|
getCarouselActiveIndex(): Int32;
|
|
324
328
|
getCarouselVideoCount(): Int32;
|