@umituz/react-native-ai-generation-content 1.61.10 → 1.61.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/package.json +1 -1
- package/src/domains/creations/presentation/components/CreationActions.tsx +3 -0
- package/src/domains/creations/presentation/components/useCreationCardActions.ts +5 -1
- package/src/domains/creations/presentation/screens/CreationsGalleryScreen.tsx +28 -2
- package/src/domains/creations/presentation/screens/creations-gallery.styles.ts +16 -0
- package/src/domains/creations/presentation/screens/creations-gallery.types.ts +2 -0
- package/src/infrastructure/services/video-feature-executor.service.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.61.
|
|
3
|
+
"version": "1.61.12",
|
|
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",
|
|
@@ -28,6 +28,8 @@ export interface CreationAction {
|
|
|
28
28
|
disabled?: boolean;
|
|
29
29
|
/** Use filled background (primary color) */
|
|
30
30
|
filled?: boolean;
|
|
31
|
+
/** Custom hex color or token color */
|
|
32
|
+
customColor?: string;
|
|
31
33
|
/** Action handler */
|
|
32
34
|
onPress: () => void;
|
|
33
35
|
}
|
|
@@ -114,6 +116,7 @@ export function CreationActions({
|
|
|
114
116
|
name={action.icon}
|
|
115
117
|
size={sizeConfig.icon}
|
|
116
118
|
color={action.color || (action.filled ? "textInverse" : "primary")}
|
|
119
|
+
customColor={action.customColor}
|
|
117
120
|
/>
|
|
118
121
|
)}
|
|
119
122
|
</TouchableOpacity>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { useMemo } from "react";
|
|
7
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
7
8
|
import type { CreationCardData, CreationCardCallbacks } from "./CreationCard.types";
|
|
8
9
|
import type { CreationAction } from "./CreationActions";
|
|
9
10
|
|
|
@@ -22,6 +23,8 @@ export function useCreationCardActions({
|
|
|
22
23
|
isDownloadAvailable,
|
|
23
24
|
canPostToFeed,
|
|
24
25
|
}: UseCreationCardActionsParams): CreationAction[] {
|
|
26
|
+
const tokens = useAppDesignTokens();
|
|
27
|
+
|
|
25
28
|
return useMemo<CreationAction[]>(() => {
|
|
26
29
|
const result: CreationAction[] = [];
|
|
27
30
|
|
|
@@ -47,6 +50,7 @@ export function useCreationCardActions({
|
|
|
47
50
|
id: "favorite",
|
|
48
51
|
icon: creation.isFavorite ? "heart" : "heart-outline",
|
|
49
52
|
color: creation.isFavorite ? "error" : undefined,
|
|
53
|
+
customColor: !creation.isFavorite ? tokens.colors.textSecondary : undefined,
|
|
50
54
|
onPress: () => callbacks.onFavorite?.(creation),
|
|
51
55
|
});
|
|
52
56
|
}
|
|
@@ -70,5 +74,5 @@ export function useCreationCardActions({
|
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
return result;
|
|
73
|
-
}, [callbacks, creation, isSharing, isDownloadAvailable, canPostToFeed]);
|
|
77
|
+
}, [callbacks, creation, isSharing, isDownloadAvailable, canPostToFeed, tokens]);
|
|
74
78
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { useState, useMemo, useCallback, useEffect, useRef } from "react";
|
|
2
|
-
import { View, FlatList, RefreshControl } from "react-native";
|
|
2
|
+
import { View, FlatList, RefreshControl, TouchableOpacity } from "react-native";
|
|
3
3
|
import {
|
|
4
4
|
useAppDesignTokens,
|
|
5
5
|
FilterSheet,
|
|
6
6
|
ScreenLayout,
|
|
7
7
|
useAppFocusEffect,
|
|
8
|
+
AtomicIcon,
|
|
9
|
+
AtomicText,
|
|
8
10
|
} from "@umituz/react-native-design-system";
|
|
9
11
|
import { useCreations } from "../hooks/useCreations";
|
|
10
12
|
import { useDeleteCreation } from "../hooks/useDeleteCreation";
|
|
@@ -30,6 +32,7 @@ export function CreationsGalleryScreen({
|
|
|
30
32
|
onEmptyAction,
|
|
31
33
|
emptyActionLabel,
|
|
32
34
|
showFilter = config.showFilter ?? true,
|
|
35
|
+
onBack,
|
|
33
36
|
}: CreationsGalleryScreenProps) {
|
|
34
37
|
const tokens = useAppDesignTokens();
|
|
35
38
|
const [selectedCreation, setSelectedCreation] = useState<Creation | null>(null);
|
|
@@ -170,9 +173,32 @@ export function CreationsGalleryScreen({
|
|
|
170
173
|
/>
|
|
171
174
|
);
|
|
172
175
|
}
|
|
176
|
+
|
|
177
|
+
const screenHeader = useMemo(() => {
|
|
178
|
+
if (!onBack) return undefined;
|
|
179
|
+
|
|
180
|
+
return (
|
|
181
|
+
<View style={styles.screenHeader}>
|
|
182
|
+
<TouchableOpacity onPress={onBack} style={styles.backButton}>
|
|
183
|
+
<AtomicIcon
|
|
184
|
+
name="chevron-left"
|
|
185
|
+
customSize={28}
|
|
186
|
+
customColor={tokens.colors.textPrimary}
|
|
187
|
+
/>
|
|
188
|
+
</TouchableOpacity>
|
|
189
|
+
<AtomicText
|
|
190
|
+
type="titleLarge"
|
|
191
|
+
style={{ color: tokens.colors.textPrimary }}
|
|
192
|
+
>
|
|
193
|
+
{t(config.translations.title)}
|
|
194
|
+
</AtomicText>
|
|
195
|
+
<View style={styles.placeholder} />
|
|
196
|
+
</View>
|
|
197
|
+
);
|
|
198
|
+
}, [onBack, tokens, t, config]);
|
|
173
199
|
|
|
174
200
|
return (
|
|
175
|
-
<ScreenLayout scrollable={false}>
|
|
201
|
+
<ScreenLayout scrollable={false} header={screenHeader}>
|
|
176
202
|
<FlatList
|
|
177
203
|
data={filters.filtered}
|
|
178
204
|
renderItem={renderItem}
|
|
@@ -8,4 +8,20 @@ export const creationsGalleryStyles = StyleSheet.create({
|
|
|
8
8
|
header: { borderBottomWidth: 1 },
|
|
9
9
|
listContent: { paddingHorizontal: 16, paddingTop: 16 },
|
|
10
10
|
emptyContent: { flexGrow: 1 },
|
|
11
|
+
screenHeader: {
|
|
12
|
+
flexDirection: "row",
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
justifyContent: "space-between",
|
|
15
|
+
paddingHorizontal: 16,
|
|
16
|
+
height: 56,
|
|
17
|
+
},
|
|
18
|
+
backButton: {
|
|
19
|
+
width: 40,
|
|
20
|
+
height: 40,
|
|
21
|
+
justifyContent: "center",
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
},
|
|
24
|
+
placeholder: {
|
|
25
|
+
width: 40,
|
|
26
|
+
},
|
|
11
27
|
});
|
|
@@ -14,4 +14,6 @@ export interface CreationsGalleryScreenProps {
|
|
|
14
14
|
readonly onEmptyAction?: () => void;
|
|
15
15
|
readonly emptyActionLabel?: string;
|
|
16
16
|
readonly showFilter?: boolean;
|
|
17
|
+
/** Callback for back navigation - if provided, shows back button in header */
|
|
18
|
+
readonly onBack?: () => void;
|
|
17
19
|
}
|
|
@@ -10,7 +10,6 @@ import { VIDEO_TIMEOUT_MS } from "../constants";
|
|
|
10
10
|
import type { VideoFeatureType } from "../../domain/interfaces";
|
|
11
11
|
import type { ExecuteVideoFeatureOptions, VideoFeatureResult, VideoFeatureRequest } from "./video-feature-executor.types";
|
|
12
12
|
|
|
13
|
-
declare const __DEV__: boolean;
|
|
14
13
|
|
|
15
14
|
/**
|
|
16
15
|
* Execute any video feature using the active provider
|