@shortkitsdk/react-native 0.2.24 → 0.2.26

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.
Files changed (43) hide show
  1. package/README.md +151 -0
  2. package/android/libs/shortkit-release.aar +0 -0
  3. package/android/src/main/java/com/shortkit/reactnative/ReactOverlayHost.kt +19 -1
  4. package/android/src/main/java/com/shortkit/reactnative/ShortKitModule.kt +43 -0
  5. package/ios/ReactCarouselOverlayHost.swift +51 -3
  6. package/ios/ReactOverlayHost.swift +67 -7
  7. package/ios/ReactVideoCarouselOverlayHost.swift +181 -19
  8. package/ios/SKFabricSurfaceWrapper.mm +7 -1
  9. package/ios/ShortKitBridge.swift +85 -5
  10. package/ios/ShortKitFeedView.swift +70 -4
  11. package/ios/ShortKitFeedViewManager.mm +3 -0
  12. package/ios/ShortKitModule.mm +46 -3
  13. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Info.plist +2 -2
  14. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +5273 -337
  15. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +151 -7
  16. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  17. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftinterface +151 -7
  18. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
  19. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/_CodeSignature/CodeResources +9 -9
  20. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Info.plist +2 -2
  21. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +5273 -337
  22. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +151 -7
  23. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  24. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +151 -7
  25. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +5273 -337
  26. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +151 -7
  27. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  28. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +151 -7
  29. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
  30. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/_CodeSignature/CodeResources +17 -17
  31. package/package.json +1 -1
  32. package/src/ShortKitCarouselOverlaySurface.tsx +38 -10
  33. package/src/ShortKitCommands.ts +4 -0
  34. package/src/ShortKitFeed.tsx +65 -10
  35. package/src/ShortKitOverlaySurface.tsx +59 -23
  36. package/src/ShortKitProvider.tsx +2 -1
  37. package/src/ShortKitVideoCarouselOverlaySurface.tsx +51 -5
  38. package/src/index.ts +2 -0
  39. package/src/serialization.ts +37 -1
  40. package/src/specs/NativeShortKitModule.ts +68 -3
  41. package/src/specs/ShortKitFeedViewNativeComponent.ts +11 -0
  42. package/src/types.ts +85 -3
  43. package/src/useShortKitCarousel.ts +80 -0
@@ -71,7 +71,9 @@ RCT_EXPORT_MODULE(ShortKitModule)
71
71
  @"onContentTapped",
72
72
  @"onDismiss",
73
73
  @"onFeedReady",
74
+ @"onVideoCarouselCellTap",
74
75
  @"onRefreshStateChanged",
76
+ @"onRefreshStateChangedPerFeed",
75
77
  @"onDidFetchContentItems",
76
78
  @"onOverlayActiveChanged",
77
79
  @"onOverlayPlayerStateChanged",
@@ -82,8 +84,12 @@ RCT_EXPORT_MODULE(ShortKitModule)
82
84
  @"onOverlayFeedScrollPhaseChanged",
83
85
  @"onOverlayTimeUpdate",
84
86
  @"onOverlayFullState",
87
+ @"onOverlayItemChanged",
85
88
  @"onCarouselActiveImageChanged",
89
+ @"onCarouselItemChanged",
86
90
  @"onVideoCarouselActiveVideoChanged",
91
+ @"onVideoCarouselItemChanged",
92
+ @"onCarouselActiveVideoCompleted",
87
93
  @"onDownloadStarted",
88
94
  @"onDownloadProgress",
89
95
  @"onDownloadCompleted",
@@ -197,6 +203,35 @@ RCT_EXPORT_METHOD(skipToPrevious) {
197
203
  [_shortKitBridge skipToPrevious];
198
204
  }
199
205
 
206
+ // MARK: - Carousel Commands
207
+
208
+ RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSNumber *, carouselNext)
209
+ {
210
+ return [_shortKitBridge carouselNext];
211
+ }
212
+
213
+ RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSNumber *, carouselPrevious)
214
+ {
215
+ return [_shortKitBridge carouselPrevious];
216
+ }
217
+
218
+ RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSNumber *, carouselSetActiveIndex:(NSInteger)index)
219
+ {
220
+ return [_shortKitBridge carouselSetActiveIndex:index];
221
+ }
222
+
223
+ // MARK: - Carousel Accessors
224
+
225
+ RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSNumber *, getCarouselActiveIndex)
226
+ {
227
+ return [_shortKitBridge getCarouselActiveIndex];
228
+ }
229
+
230
+ RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSNumber *, getCarouselVideoCount)
231
+ {
232
+ return [_shortKitBridge getCarouselVideoCount];
233
+ }
234
+
200
235
  RCT_EXPORT_METHOD(setMuted:(BOOL)muted) {
201
236
  [_shortKitBridge setMuted:muted];
202
237
  }
@@ -223,17 +258,25 @@ RCT_EXPORT_METHOD(setMaxBitrate:(double)bitrate) {
223
258
 
224
259
  // MARK: - Custom Feed
225
260
 
226
- RCT_EXPORT_METHOD(setFeedItems:(NSString *)feedId items:(NSString *)items) {
261
+ RCT_EXPORT_METHOD(setFeedItems:(NSString *)feedId
262
+ items:(NSString *)json
263
+ startAtId:(NSString *)startAtId) {
227
264
  if (_shortKitBridge) {
228
- [_shortKitBridge setFeedItems:feedId items:items];
265
+ [_shortKitBridge setFeedItems:feedId items:json startAtId:startAtId];
229
266
  } else {
230
267
  if (!_pendingBridgeOps) _pendingBridgeOps = [NSMutableArray new];
231
268
  [_pendingBridgeOps addObject:^{
232
- [self->_shortKitBridge setFeedItems:feedId items:items];
269
+ [self->_shortKitBridge setFeedItems:feedId items:json startAtId:startAtId];
233
270
  }];
234
271
  }
235
272
  }
236
273
 
274
+ RCT_EXPORT_METHOD(scrollFeedToItem:(NSString *)feedId
275
+ id:(NSString *)itemId
276
+ animated:(BOOL)animated) {
277
+ [_shortKitBridge scrollFeedToItem:feedId id:itemId animated:animated];
278
+ }
279
+
237
280
  RCT_EXPORT_METHOD(appendFeedItems:(NSString *)feedId items:(NSString *)items) {
238
281
  if (_shortKitBridge) {
239
282
  [_shortKitBridge appendFeedItems:feedId items:items];
@@ -11,9 +11,9 @@
11
11
  <key>CFBundlePackageType</key>
12
12
  <string>FMWK</string>
13
13
  <key>CFBundleVersion</key>
14
- <string>0.2.24</string>
14
+ <string>0.2.26</string>
15
15
  <key>CFBundleShortVersionString</key>
16
- <string>0.2.24</string>
16
+ <string>0.2.26</string>
17
17
  <key>MinimumOSVersion</key>
18
18
  <string>16.0</string>
19
19
  </dict>