@shortkitsdk/react-native 0.2.5 → 0.2.6
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/src/main/java/com/shortkit/reactnative/ShortKitModule.kt +49 -11
- package/ios/ShortKitBridge.swift +85 -7
- package/ios/ShortKitCarouselOverlayBridge.swift +177 -12
- package/ios/ShortKitFeedView.swift +48 -25
- package/ios/ShortKitModule.mm +29 -4
- package/ios/ShortKitOverlayBridge.swift +2 -4
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Headers/ShortKitSDK-Swift.h +1 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +1635 -457
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +50 -16
- 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 +50 -16
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Headers/ShortKitSDK-Swift.h +1 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +1635 -457
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +50 -16
- 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 +50 -16
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/package.json +1 -1
- package/src/CarouselOverlayManager.tsx +0 -1
- package/src/OverlayManager.tsx +1 -1
- package/src/ShortKitContext.ts +11 -6
- package/src/ShortKitProvider.tsx +140 -66
- package/src/index.ts +4 -1
- package/src/serialization.ts +3 -3
- package/src/specs/NativeShortKitModule.ts +18 -16
- package/src/types.ts +26 -3
- package/src/useShortKitCarousel.ts +2 -2
- package/src/useShortKitPlayer.ts +0 -1
package/ios/ShortKitModule.mm
CHANGED
|
@@ -54,6 +54,7 @@ RCT_EXPORT_MODULE(ShortKitModule)
|
|
|
54
54
|
@"onActiveCueChanged",
|
|
55
55
|
@"onDidLoop",
|
|
56
56
|
@"onFeedTransition",
|
|
57
|
+
@"onFeedScrollPhase",
|
|
57
58
|
@"onFormatChange",
|
|
58
59
|
@"onPrefetchedAheadCountChanged",
|
|
59
60
|
@"onRemainingContentCountChanged",
|
|
@@ -63,11 +64,13 @@ RCT_EXPORT_MODULE(ShortKitModule)
|
|
|
63
64
|
@"onOverlayConfigure",
|
|
64
65
|
@"onOverlayActivate",
|
|
65
66
|
@"onOverlayReset",
|
|
66
|
-
@"onOverlayFadeOut",
|
|
67
|
-
@"onOverlayRestore",
|
|
68
67
|
@"onOverlayTap",
|
|
69
68
|
@"onOverlayDoubleTap",
|
|
70
69
|
@"onContentTapped",
|
|
70
|
+
@"onCarouselOverlayConfigure",
|
|
71
|
+
@"onCarouselOverlayActivate",
|
|
72
|
+
@"onCarouselOverlayReset",
|
|
73
|
+
@"onCarouselPageChanged",
|
|
71
74
|
];
|
|
72
75
|
}
|
|
73
76
|
|
|
@@ -106,7 +109,6 @@ RCT_EXPORT_MODULE(ShortKitModule)
|
|
|
106
109
|
|
|
107
110
|
RCT_EXPORT_METHOD(initialize:(NSString *)apiKey
|
|
108
111
|
config:(NSString *)config
|
|
109
|
-
embedId:(NSString *)embedId
|
|
110
112
|
clientAppName:(NSString *)clientAppName
|
|
111
113
|
clientAppVersion:(NSString *)clientAppVersion
|
|
112
114
|
customDimensions:(NSString *)customDimensions) {
|
|
@@ -115,7 +117,6 @@ RCT_EXPORT_METHOD(initialize:(NSString *)apiKey
|
|
|
115
117
|
|
|
116
118
|
_shortKitBridge = [[ShortKitBridge alloc] initWithApiKey:apiKey
|
|
117
119
|
config:config
|
|
118
|
-
embedId:embedId
|
|
119
120
|
clientAppName:clientAppName
|
|
120
121
|
clientAppVersion:clientAppVersion
|
|
121
122
|
customDimensions:customDimensions
|
|
@@ -229,6 +230,30 @@ RCT_EXPORT_METHOD(fetchContent:(NSInteger)limit
|
|
|
229
230
|
}];
|
|
230
231
|
}
|
|
231
232
|
|
|
233
|
+
// MARK: - Storyboard / Seek Thumbnails
|
|
234
|
+
|
|
235
|
+
RCT_EXPORT_METHOD(prefetchStoryboard:(NSString *)playbackId) {
|
|
236
|
+
[_shortKitBridge prefetchStoryboard:playbackId];
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
RCT_EXPORT_METHOD(getStoryboardData:(NSString *)playbackId
|
|
240
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
241
|
+
reject:(RCTPromiseRejectBlock)reject) {
|
|
242
|
+
[_shortKitBridge getStoryboardData:playbackId completion:^(NSString *json) {
|
|
243
|
+
if (json) {
|
|
244
|
+
resolve(json);
|
|
245
|
+
} else {
|
|
246
|
+
resolve([NSNull null]);
|
|
247
|
+
}
|
|
248
|
+
}];
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// MARK: - Overlay Lifecycle
|
|
252
|
+
|
|
253
|
+
RCT_EXPORT_METHOD(notifyOverlayReady) {
|
|
254
|
+
[_shortKitBridge notifyOverlayReady];
|
|
255
|
+
}
|
|
256
|
+
|
|
232
257
|
// MARK: - New Architecture (TurboModule)
|
|
233
258
|
|
|
234
259
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
@@ -102,12 +102,10 @@ import ShortKitSDK
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
public func fadeOutForTransition() {
|
|
105
|
-
|
|
106
|
-
bridge?.emitOverlayEvent("onOverlayFadeOut", item: item)
|
|
105
|
+
// No-op: JS overlays handle fading via feedScrollPhase
|
|
107
106
|
}
|
|
108
107
|
|
|
109
108
|
public func restoreFromTransition() {
|
|
110
|
-
|
|
111
|
-
bridge?.emitOverlayEvent("onOverlayRestore", item: item)
|
|
109
|
+
// No-op: JS overlays handle fading via feedScrollPhase
|
|
112
110
|
}
|
|
113
111
|
}
|
package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Headers/ShortKitSDK-Swift.h
CHANGED
|
@@ -337,6 +337,7 @@ SWIFT_CLASS("_TtC11ShortKitSDK26ShortKitFeedViewController")
|
|
|
337
337
|
@interface ShortKitFeedViewController : UIViewController
|
|
338
338
|
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
339
339
|
- (void)viewDidLoad;
|
|
340
|
+
- (void)viewDidLayoutSubviews;
|
|
340
341
|
- (void)viewWillAppear:(BOOL)animated;
|
|
341
342
|
- (void)viewDidAppear:(BOOL)animated;
|
|
342
343
|
- (void)viewWillDisappear:(BOOL)animated;
|