@umituz/react-native-ai-generation-content 1.89.21 → 1.89.22
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 +1 -1
- package/src/domains/creations/presentation/hooks/useGalleryState.ts +1 -2
- package/src/domains/generation/wizard/presentation/hooks/videoQueuePoller.ts +2 -1
- package/src/domains/result-preview/presentation/components/ResultPreviewScreen.tsx +0 -13
- package/src/presentation/components/result/SuccessRedirectionCard.tsx +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.89.
|
|
3
|
+
"version": "1.89.22",
|
|
4
4
|
"description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Manages the state for the gallery screen including selection and media URL handling
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { useState, useEffect,
|
|
6
|
+
import { useState, useEffect, useMemo } from "react";
|
|
7
7
|
import type { Creation } from "../../domain/entities/Creation";
|
|
8
8
|
import { getPreviewUrl } from "../../domain/utils";
|
|
9
9
|
|
|
@@ -27,7 +27,6 @@ export function useGalleryState(options: GalleryStateOptions): GalleryStateRetur
|
|
|
27
27
|
const { initialCreationId, creations } = options;
|
|
28
28
|
const [selectedCreation, setSelectedCreation] = useState<Creation | null>(null);
|
|
29
29
|
const [showRatingPicker, setShowRatingPicker] = useState(false);
|
|
30
|
-
const hasAutoSelectedRef = useRef(false);
|
|
31
30
|
|
|
32
31
|
// Auto-select creation when initialCreationId is provided
|
|
33
32
|
useEffect(() => {
|
|
@@ -2,6 +2,7 @@ import { providerRegistry } from "../../../../../infrastructure/services/provide
|
|
|
2
2
|
import { extractResultUrl, type GenerationUrls, type GenerationResult } from "./generation-result.utils";
|
|
3
3
|
import { QUEUE_STATUS } from "../../../../../domain/constants/queue-status.constants";
|
|
4
4
|
import { DEFAULT_MAX_CONSECUTIVE_ERRORS } from "../../../../../infrastructure/constants/polling.constants";
|
|
5
|
+
import type { AILogEntry } from "../../../../../domain/interfaces/ai-provider-status.types";
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -96,7 +97,7 @@ export const pollQueueStatus = async (params: PollParams): Promise<void> => {
|
|
|
96
97
|
} else {
|
|
97
98
|
// Try to extract error from FAL job logs (error-level log takes priority)
|
|
98
99
|
const logs = status.logs ?? [];
|
|
99
|
-
const errorLogs = logs.filter((l:
|
|
100
|
+
const errorLogs = logs.filter((l: AILogEntry) => l.level === "error");
|
|
100
101
|
const errorLog = errorLogs.length > 0 ? errorLogs[errorLogs.length - 1] : logs[logs.length - 1];
|
|
101
102
|
const failMessage =
|
|
102
103
|
errorLog?.message && errorLog.message !== "[object Object]"
|
|
@@ -5,7 +5,6 @@ import { NavigationHeader } from "@umituz/react-native-design-system/molecules";
|
|
|
5
5
|
import { ScreenLayout } from "@umituz/react-native-design-system/layouts";
|
|
6
6
|
import { useAppDesignTokens } from "@umituz/react-native-design-system/theme";
|
|
7
7
|
import { ResultImageCard } from "./ResultImageCard";
|
|
8
|
-
import { ResultActionBar } from "./ResultActionBar";
|
|
9
8
|
import { SuccessRedirectionCard } from "../../../../presentation/components/result/SuccessRedirectionCard";
|
|
10
9
|
import { RecentCreationsSection } from "./RecentCreationsSection";
|
|
11
10
|
import { VideoResultPlayer } from "../../../../presentation/components/display/VideoResultPlayer";
|
|
@@ -15,16 +14,7 @@ import { formatMediaUrl, shouldShowRecentCreations } from "./ResultPreviewScreen
|
|
|
15
14
|
export const ResultPreviewScreen: React.FC<ResultPreviewScreenProps> = ({
|
|
16
15
|
imageUrl,
|
|
17
16
|
videoUrl,
|
|
18
|
-
isSaving: _isSaving,
|
|
19
|
-
isSharing: _isSharing,
|
|
20
|
-
onDownload: _onDownload,
|
|
21
|
-
onShare: _onShare,
|
|
22
|
-
onTryAgain: _onTryAgain,
|
|
23
17
|
onNavigateBack,
|
|
24
|
-
onRate: _onRate,
|
|
25
|
-
onEdit: _onEdit,
|
|
26
|
-
onEditVideo: _onEditVideo,
|
|
27
|
-
onShareToFeed: _onShareToFeed,
|
|
28
18
|
recentCreations,
|
|
29
19
|
onViewAll,
|
|
30
20
|
onCreationPress,
|
|
@@ -32,9 +22,6 @@ export const ResultPreviewScreen: React.FC<ResultPreviewScreenProps> = ({
|
|
|
32
22
|
translations,
|
|
33
23
|
style,
|
|
34
24
|
hideLabel = false,
|
|
35
|
-
iconOnly: _iconOnly = false,
|
|
36
|
-
showTryAgain: _showTryAgain = true,
|
|
37
|
-
showRating: _showRating = false,
|
|
38
25
|
}) => {
|
|
39
26
|
const tokens = useAppDesignTokens();
|
|
40
27
|
const isVideo = Boolean(videoUrl);
|
|
@@ -3,6 +3,7 @@ import { View, TouchableOpacity, StyleSheet, StyleProp, ViewStyle } from "react-
|
|
|
3
3
|
import {
|
|
4
4
|
AtomicText,
|
|
5
5
|
AtomicIcon,
|
|
6
|
+
IconName,
|
|
6
7
|
} from "@umituz/react-native-design-system/atoms";
|
|
7
8
|
import { useAppDesignTokens } from "@umituz/react-native-design-system/theme";
|
|
8
9
|
|
|
@@ -46,7 +47,7 @@ export const SuccessRedirectionCard: React.FC<SuccessRedirectionCardProps> = ({
|
|
|
46
47
|
{ backgroundColor: tokens.colors.backgroundPrimary },
|
|
47
48
|
]}
|
|
48
49
|
>
|
|
49
|
-
<AtomicIcon name={iconName as
|
|
50
|
+
<AtomicIcon name={iconName as IconName} size="xl" color="primary" />
|
|
50
51
|
</View>
|
|
51
52
|
|
|
52
53
|
<AtomicText type="titleSmall" color="textPrimary" style={styles.title}>
|