@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.
Files changed (32) hide show
  1. package/android/build.gradle.kts +13 -1
  2. package/android/src/main/java/com/shortkit/reactnative/ReactCarouselOverlayHost.kt +115 -55
  3. package/android/src/main/java/com/shortkit/reactnative/ReactOverlayHost.kt +67 -56
  4. package/android/src/main/java/com/shortkit/reactnative/ShortKitBridge.kt +71 -26
  5. package/android/src/main/java/com/shortkit/reactnative/ShortKitFeedView.kt +160 -35
  6. package/android/src/main/java/com/shortkit/reactnative/ShortKitFeedViewManager.kt +5 -0
  7. package/android/src/main/java/com/shortkit/reactnative/ShortKitModule.kt +43 -10
  8. package/android/src/main/java/com/shortkit/reactnative/ShortKitPlayerNativeView.kt +9 -0
  9. package/ios/ReactOverlayHost.swift +13 -27
  10. package/ios/ShortKitBridge.swift +36 -2
  11. package/ios/ShortKitFeedView.swift +24 -3
  12. package/ios/ShortKitModule.mm +4 -1
  13. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +720 -144
  14. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +19 -5
  15. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  16. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftinterface +19 -5
  17. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
  18. package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +720 -144
  19. package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +19 -5
  20. package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  21. package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +19 -5
  22. package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
  23. package/package.json +1 -1
  24. package/src/ShortKitContext.ts +2 -1
  25. package/src/ShortKitFeed.tsx +14 -0
  26. package/src/ShortKitOverlaySurface.tsx +153 -45
  27. package/src/ShortKitPlayer.tsx +25 -3
  28. package/src/ShortKitProvider.tsx +4 -2
  29. package/src/index.ts +4 -0
  30. package/src/serialization.ts +1 -0
  31. package/src/specs/NativeShortKitModule.ts +18 -1
  32. package/src/types.ts +6 -0
package/src/types.ts CHANGED
@@ -17,6 +17,7 @@ export type CaptionSource = 'embedded' | 'external' | 'generated';
17
17
 
18
18
  export interface FeedConfig {
19
19
  feedHeight?: FeedHeight;
20
+ scrollAxis?: ScrollAxis;
20
21
  overlay?: OverlayConfig;
21
22
  carouselOverlay?: CarouselOverlayConfig;
22
23
  surveyMode?: SurveyMode;
@@ -30,6 +31,8 @@ export type FeedHeight =
30
31
  | { type: 'fullscreen' }
31
32
  | { type: 'percentage'; value: number };
32
33
 
34
+ export type ScrollAxis = 'vertical' | 'horizontal';
35
+
33
36
  export type OverlayConfig =
34
37
  | 'none'
35
38
  | { type: 'custom'; name: string; component: React.ComponentType<OverlayProps> };
@@ -231,6 +234,9 @@ export interface ShortKitFeedProps {
231
234
  onDidFetchContentItems?: (items: ContentItem[]) => void;
232
235
  /** Called when the number of remaining items in this feed changes. */
233
236
  onRemainingContentCountChange?: (count: number) => void;
237
+ /** Called once when this feed has loaded content and assigned a player
238
+ * to the first cell. Use to dismiss a splash screen or loading overlay. */
239
+ onFeedReady?: () => void;
234
240
  }
235
241
 
236
242
  /**