@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.
- package/android/build.gradle.kts +13 -1
- package/android/src/main/java/com/shortkit/reactnative/ReactCarouselOverlayHost.kt +115 -55
- package/android/src/main/java/com/shortkit/reactnative/ReactOverlayHost.kt +67 -56
- package/android/src/main/java/com/shortkit/reactnative/ShortKitBridge.kt +71 -26
- package/android/src/main/java/com/shortkit/reactnative/ShortKitFeedView.kt +160 -35
- package/android/src/main/java/com/shortkit/reactnative/ShortKitFeedViewManager.kt +5 -0
- package/android/src/main/java/com/shortkit/reactnative/ShortKitModule.kt +43 -10
- package/android/src/main/java/com/shortkit/reactnative/ShortKitPlayerNativeView.kt +9 -0
- package/ios/ReactOverlayHost.swift +13 -27
- package/ios/ShortKitBridge.swift +36 -2
- package/ios/ShortKitFeedView.swift +24 -3
- package/ios/ShortKitModule.mm +4 -1
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +720 -144
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +19 -5
- 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 +19 -5
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +720 -144
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +19 -5
- 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 +19 -5
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/package.json +1 -1
- package/src/ShortKitContext.ts +2 -1
- package/src/ShortKitFeed.tsx +14 -0
- package/src/ShortKitOverlaySurface.tsx +153 -45
- package/src/ShortKitPlayer.tsx +25 -3
- package/src/ShortKitProvider.tsx +4 -2
- package/src/index.ts +4 -0
- package/src/serialization.ts +1 -0
- package/src/specs/NativeShortKitModule.ts +18 -1
- 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
|
/**
|