@shortkitsdk/react-native 0.2.31 → 0.2.32
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/ios/ShortKitBridge.swift +77 -3
- package/ios/ShortKitModule.mm +5 -1
- 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 +1130 -142
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +35 -2
- 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 +35 -2
- 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 +1130 -142
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +35 -2
- 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 +35 -2
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +1130 -142
- package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +35 -2
- 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 +35 -2
- 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 +12 -2
- package/src/ShortKitContext.ts +7 -1
- package/src/specs/NativeShortKitModule.ts +2 -1
- package/src/types.ts +4 -0
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
import AVFoundation
|
|
6
6
|
import Combine
|
|
7
7
|
import CoreGraphics
|
|
8
|
+
import CoreImage
|
|
9
|
+
import CoreMedia
|
|
10
|
+
import CoreVideo
|
|
8
11
|
import Foundation
|
|
9
12
|
import Network
|
|
10
13
|
import QuartzCore
|
|
@@ -459,17 +462,29 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
459
462
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
460
463
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFetchContentItems items: [ShortKitSDK.ContentItem])
|
|
461
464
|
}
|
|
465
|
+
public enum DownloadPhase : Swift.String, Swift.Sendable {
|
|
466
|
+
case downloading
|
|
467
|
+
case compositing
|
|
468
|
+
case finalizing
|
|
469
|
+
public init?(rawValue: Swift.String)
|
|
470
|
+
public typealias RawValue = Swift.String
|
|
471
|
+
public var rawValue: Swift.String {
|
|
472
|
+
get
|
|
473
|
+
}
|
|
474
|
+
}
|
|
462
475
|
public protocol ShortKitDownloadDelegate : AnyObject {
|
|
463
476
|
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didStartDownload item: ShortKitSDK.ContentItem)
|
|
464
477
|
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didUpdateDownloadProgress item: ShortKitSDK.ContentItem, progress: Swift.Double)
|
|
465
478
|
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didCompleteDownload item: ShortKitSDK.ContentItem, fileURL: Foundation.URL)
|
|
466
479
|
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFailDownload item: ShortKitSDK.ContentItem, error: ShortKitSDK.ShortKitDownloadError)
|
|
480
|
+
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didUpdateDownloadProgress item: ShortKitSDK.ContentItem, progress: Swift.Double, phase: ShortKitSDK.DownloadPhase)
|
|
467
481
|
}
|
|
468
482
|
extension ShortKitSDK.ShortKitDownloadDelegate {
|
|
469
483
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didStartDownload item: ShortKitSDK.ContentItem)
|
|
470
484
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didUpdateDownloadProgress item: ShortKitSDK.ContentItem, progress: Swift.Double)
|
|
471
485
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didCompleteDownload item: ShortKitSDK.ContentItem, fileURL: Foundation.URL)
|
|
472
486
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFailDownload item: ShortKitSDK.ContentItem, error: ShortKitSDK.ShortKitDownloadError)
|
|
487
|
+
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didUpdateDownloadProgress item: ShortKitSDK.ContentItem, progress: Swift.Double, phase: ShortKitSDK.DownloadPhase)
|
|
473
488
|
}
|
|
474
489
|
public enum DownloadMode {
|
|
475
490
|
case nonInterruptive
|
|
@@ -480,12 +495,26 @@ public enum DownloadMode {
|
|
|
480
495
|
get
|
|
481
496
|
}
|
|
482
497
|
}
|
|
483
|
-
public enum
|
|
498
|
+
public enum DownloadOverlayMode {
|
|
499
|
+
case none
|
|
500
|
+
case staticSnapshot(source: any UIKit.UIView & ShortKitSDK.FeedOverlay)
|
|
501
|
+
}
|
|
502
|
+
public protocol ExportableFeedOverlay : AnyObject {
|
|
503
|
+
func prepareForExport(duration: Foundation.TimeInterval, size: CoreFoundation.CGSize) async
|
|
504
|
+
func snapshotAtTime(_ time: Foundation.TimeInterval) async -> UIKit.UIImage?
|
|
505
|
+
func tearDownAfterExport()
|
|
506
|
+
}
|
|
507
|
+
public enum ShortKitDownloadError : Swift.Error, Foundation.LocalizedError {
|
|
484
508
|
case downloadNotAvailable
|
|
485
509
|
case downloadInProgress
|
|
486
510
|
case networkError(any Swift.Error)
|
|
487
511
|
case httpError(statusCode: Swift.Int)
|
|
488
512
|
case cancelled
|
|
513
|
+
case exportFailed(underlying: any Swift.Error)
|
|
514
|
+
case overlayNotVisibleForSnapshot
|
|
515
|
+
public var errorDescription: Swift.String? {
|
|
516
|
+
get
|
|
517
|
+
}
|
|
489
518
|
}
|
|
490
519
|
@_hasMissingDesignatedInitializers final public class FeedPreload : @unchecked Swift.Sendable {
|
|
491
520
|
public init(immediateItems items: [ShortKitSDK.FeedInput])
|
|
@@ -553,6 +582,7 @@ public enum ShortKitFeedLifecycle {
|
|
|
553
582
|
@objc get
|
|
554
583
|
}
|
|
555
584
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func motionEnded(_ motion: UIKit.UIEvent.EventSubtype, with event: UIKit.UIEvent?)
|
|
585
|
+
@_Concurrency.MainActor @preconcurrency public func overlayView(forItemId itemId: Swift.String) -> (any UIKit.UIView & ShortKitSDK.FeedOverlay)?
|
|
556
586
|
}
|
|
557
587
|
extension ShortKitSDK.ShortKitFeedViewController : UIKit.UICollectionViewDelegate {
|
|
558
588
|
@_Concurrency.MainActor @preconcurrency @objc dynamic public func collectionView(_ collectionView: UIKit.UICollectionView, willDisplay cell: UIKit.UICollectionViewCell, forItemAt indexPath: Foundation.IndexPath)
|
|
@@ -1171,7 +1201,7 @@ final public class ShortKit {
|
|
|
1171
1201
|
final public func clearUserId()
|
|
1172
1202
|
@_Concurrency.MainActor final public func setColdStartQueue(_ items: [ShortKitSDK.FeedInput])
|
|
1173
1203
|
final public func clearColdStartCache()
|
|
1174
|
-
final public func downloadVideo(_ item: ShortKitSDK.ContentItem, mode: ShortKitSDK.DownloadMode = .nonInterruptive) async throws -> Foundation.URL
|
|
1204
|
+
final public func downloadVideo(_ item: ShortKitSDK.ContentItem, mode: ShortKitSDK.DownloadMode = .nonInterruptive, overlayMode: ShortKitSDK.DownloadOverlayMode = .none) async throws -> Foundation.URL
|
|
1175
1205
|
final public func cancelDownload()
|
|
1176
1206
|
@objc deinit
|
|
1177
1207
|
}
|
|
@@ -1274,6 +1304,9 @@ extension ShortKitSDK.DebugTimeControl : Swift.Hashable {}
|
|
|
1274
1304
|
extension ShortKitSDK.SwipeCurve : Swift.Equatable {}
|
|
1275
1305
|
extension ShortKitSDK.SwipeCurve : Swift.Hashable {}
|
|
1276
1306
|
extension ShortKitSDK.SwipeCurve : Swift.RawRepresentable {}
|
|
1307
|
+
extension ShortKitSDK.DownloadPhase : Swift.Equatable {}
|
|
1308
|
+
extension ShortKitSDK.DownloadPhase : Swift.Hashable {}
|
|
1309
|
+
extension ShortKitSDK.DownloadPhase : Swift.RawRepresentable {}
|
|
1277
1310
|
extension ShortKitSDK.DownloadMode : Swift.Equatable {}
|
|
1278
1311
|
extension ShortKitSDK.DownloadMode : Swift.Hashable {}
|
|
1279
1312
|
extension ShortKitSDK.ShortKitFeedView : Swift.Sendable {}
|
|
Binary file
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
import AVFoundation
|
|
6
6
|
import Combine
|
|
7
7
|
import CoreGraphics
|
|
8
|
+
import CoreImage
|
|
9
|
+
import CoreMedia
|
|
10
|
+
import CoreVideo
|
|
8
11
|
import Foundation
|
|
9
12
|
import Network
|
|
10
13
|
import QuartzCore
|
|
@@ -459,17 +462,29 @@ extension ShortKitSDK.ShortKitDelegate {
|
|
|
459
462
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
460
463
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFetchContentItems items: [ShortKitSDK.ContentItem])
|
|
461
464
|
}
|
|
465
|
+
public enum DownloadPhase : Swift.String, Swift.Sendable {
|
|
466
|
+
case downloading
|
|
467
|
+
case compositing
|
|
468
|
+
case finalizing
|
|
469
|
+
public init?(rawValue: Swift.String)
|
|
470
|
+
public typealias RawValue = Swift.String
|
|
471
|
+
public var rawValue: Swift.String {
|
|
472
|
+
get
|
|
473
|
+
}
|
|
474
|
+
}
|
|
462
475
|
public protocol ShortKitDownloadDelegate : AnyObject {
|
|
463
476
|
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didStartDownload item: ShortKitSDK.ContentItem)
|
|
464
477
|
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didUpdateDownloadProgress item: ShortKitSDK.ContentItem, progress: Swift.Double)
|
|
465
478
|
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didCompleteDownload item: ShortKitSDK.ContentItem, fileURL: Foundation.URL)
|
|
466
479
|
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFailDownload item: ShortKitSDK.ContentItem, error: ShortKitSDK.ShortKitDownloadError)
|
|
480
|
+
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didUpdateDownloadProgress item: ShortKitSDK.ContentItem, progress: Swift.Double, phase: ShortKitSDK.DownloadPhase)
|
|
467
481
|
}
|
|
468
482
|
extension ShortKitSDK.ShortKitDownloadDelegate {
|
|
469
483
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didStartDownload item: ShortKitSDK.ContentItem)
|
|
470
484
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didUpdateDownloadProgress item: ShortKitSDK.ContentItem, progress: Swift.Double)
|
|
471
485
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didCompleteDownload item: ShortKitSDK.ContentItem, fileURL: Foundation.URL)
|
|
472
486
|
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didFailDownload item: ShortKitSDK.ContentItem, error: ShortKitSDK.ShortKitDownloadError)
|
|
487
|
+
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didUpdateDownloadProgress item: ShortKitSDK.ContentItem, progress: Swift.Double, phase: ShortKitSDK.DownloadPhase)
|
|
473
488
|
}
|
|
474
489
|
public enum DownloadMode {
|
|
475
490
|
case nonInterruptive
|
|
@@ -480,12 +495,26 @@ public enum DownloadMode {
|
|
|
480
495
|
get
|
|
481
496
|
}
|
|
482
497
|
}
|
|
483
|
-
public enum
|
|
498
|
+
public enum DownloadOverlayMode {
|
|
499
|
+
case none
|
|
500
|
+
case staticSnapshot(source: any UIKit.UIView & ShortKitSDK.FeedOverlay)
|
|
501
|
+
}
|
|
502
|
+
public protocol ExportableFeedOverlay : AnyObject {
|
|
503
|
+
func prepareForExport(duration: Foundation.TimeInterval, size: CoreFoundation.CGSize) async
|
|
504
|
+
func snapshotAtTime(_ time: Foundation.TimeInterval) async -> UIKit.UIImage?
|
|
505
|
+
func tearDownAfterExport()
|
|
506
|
+
}
|
|
507
|
+
public enum ShortKitDownloadError : Swift.Error, Foundation.LocalizedError {
|
|
484
508
|
case downloadNotAvailable
|
|
485
509
|
case downloadInProgress
|
|
486
510
|
case networkError(any Swift.Error)
|
|
487
511
|
case httpError(statusCode: Swift.Int)
|
|
488
512
|
case cancelled
|
|
513
|
+
case exportFailed(underlying: any Swift.Error)
|
|
514
|
+
case overlayNotVisibleForSnapshot
|
|
515
|
+
public var errorDescription: Swift.String? {
|
|
516
|
+
get
|
|
517
|
+
}
|
|
489
518
|
}
|
|
490
519
|
@_hasMissingDesignatedInitializers final public class FeedPreload : @unchecked Swift.Sendable {
|
|
491
520
|
public init(immediateItems items: [ShortKitSDK.FeedInput])
|
|
@@ -553,6 +582,7 @@ public enum ShortKitFeedLifecycle {
|
|
|
553
582
|
@objc get
|
|
554
583
|
}
|
|
555
584
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func motionEnded(_ motion: UIKit.UIEvent.EventSubtype, with event: UIKit.UIEvent?)
|
|
585
|
+
@_Concurrency.MainActor @preconcurrency public func overlayView(forItemId itemId: Swift.String) -> (any UIKit.UIView & ShortKitSDK.FeedOverlay)?
|
|
556
586
|
}
|
|
557
587
|
extension ShortKitSDK.ShortKitFeedViewController : UIKit.UICollectionViewDelegate {
|
|
558
588
|
@_Concurrency.MainActor @preconcurrency @objc dynamic public func collectionView(_ collectionView: UIKit.UICollectionView, willDisplay cell: UIKit.UICollectionViewCell, forItemAt indexPath: Foundation.IndexPath)
|
|
@@ -1171,7 +1201,7 @@ final public class ShortKit {
|
|
|
1171
1201
|
final public func clearUserId()
|
|
1172
1202
|
@_Concurrency.MainActor final public func setColdStartQueue(_ items: [ShortKitSDK.FeedInput])
|
|
1173
1203
|
final public func clearColdStartCache()
|
|
1174
|
-
final public func downloadVideo(_ item: ShortKitSDK.ContentItem, mode: ShortKitSDK.DownloadMode = .nonInterruptive) async throws -> Foundation.URL
|
|
1204
|
+
final public func downloadVideo(_ item: ShortKitSDK.ContentItem, mode: ShortKitSDK.DownloadMode = .nonInterruptive, overlayMode: ShortKitSDK.DownloadOverlayMode = .none) async throws -> Foundation.URL
|
|
1175
1205
|
final public func cancelDownload()
|
|
1176
1206
|
@objc deinit
|
|
1177
1207
|
}
|
|
@@ -1274,6 +1304,9 @@ extension ShortKitSDK.DebugTimeControl : Swift.Hashable {}
|
|
|
1274
1304
|
extension ShortKitSDK.SwipeCurve : Swift.Equatable {}
|
|
1275
1305
|
extension ShortKitSDK.SwipeCurve : Swift.Hashable {}
|
|
1276
1306
|
extension ShortKitSDK.SwipeCurve : Swift.RawRepresentable {}
|
|
1307
|
+
extension ShortKitSDK.DownloadPhase : Swift.Equatable {}
|
|
1308
|
+
extension ShortKitSDK.DownloadPhase : Swift.Hashable {}
|
|
1309
|
+
extension ShortKitSDK.DownloadPhase : Swift.RawRepresentable {}
|
|
1277
1310
|
extension ShortKitSDK.DownloadMode : Swift.Equatable {}
|
|
1278
1311
|
extension ShortKitSDK.DownloadMode : Swift.Hashable {}
|
|
1279
1312
|
extension ShortKitSDK.ShortKitFeedView : Swift.Sendable {}
|