@umituz/react-native-ai-generation-content 1.17.77 → 1.17.78

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-generation-content",
3
- "version": "1.17.77",
3
+ "version": "1.17.78",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -8,6 +8,11 @@
8
8
  */
9
9
  export type VideoAlertFunction = (title: string, message: string) => void;
10
10
 
11
+ /**
12
+ * Navigation function type for success actions
13
+ */
14
+ export type VideoNavigationFunction = () => void;
15
+
11
16
  /**
12
17
  * Default no-op alert function
13
18
  */
@@ -17,14 +22,28 @@ const noOpAlert: VideoAlertFunction = () => {
17
22
 
18
23
  /**
19
24
  * Show video generation success
25
+ * Supports both alert-based and navigation-based success handling
20
26
  */
21
27
  export function showVideoGenerationSuccess(
22
- showAlert: VideoAlertFunction = noOpAlert
28
+ onViewProjects?: VideoNavigationFunction | VideoAlertFunction,
29
+ onEditVideo?: VideoNavigationFunction,
23
30
  ): void {
24
31
  if (typeof __DEV__ !== "undefined" && __DEV__) {
25
32
  console.log("[VideoGeneration] Success");
26
33
  }
27
- showAlert("Success", "Your video has been generated successfully!");
34
+
35
+ // If both callbacks are provided, they're navigation functions
36
+ if (onViewProjects && onEditVideo) {
37
+ // This is the navigation pattern - no alert needed
38
+ // The app will handle navigation
39
+ return;
40
+ }
41
+
42
+ // If only one callback is provided, treat it as an alert function
43
+ if (onViewProjects && typeof onViewProjects === "function") {
44
+ const showAlert = onViewProjects as VideoAlertFunction;
45
+ showAlert("Success", "Your video has been generated successfully!");
46
+ }
28
47
  }
29
48
 
30
49
  /**