@umituz/react-native-ai-creations 1.2.9 → 1.2.10
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-creations",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.10",
|
|
4
4
|
"description": "AI-generated creations gallery with filtering, sharing, and management for React Native apps",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@umituz/react-native-filter": "latest",
|
|
32
32
|
"@umituz/react-native-image": "latest",
|
|
33
|
-
"@umituz/react-native-bottom-sheet": "latest"
|
|
33
|
+
"@umituz/react-native-bottom-sheet": "latest",
|
|
34
|
+
"@umituz/react-native-alert": "latest"
|
|
34
35
|
},
|
|
35
36
|
"peerDependencies": {
|
|
36
37
|
"@tanstack/react-query": ">=5.0.0",
|
|
@@ -22,6 +22,8 @@ import { BottomSheetModalRef } from "@umituz/react-native-bottom-sheet";
|
|
|
22
22
|
import { AtomicIcon, AtomicText } from "@umituz/react-native-design-system";
|
|
23
23
|
import { GalleryHeader } from "../components/GalleryHeader";
|
|
24
24
|
|
|
25
|
+
import { useAlert } from "@umituz/react-native-alert";
|
|
26
|
+
|
|
25
27
|
interface CreationsGalleryScreenProps {
|
|
26
28
|
readonly userId: string | null;
|
|
27
29
|
readonly repository: ICreationsRepository;
|
|
@@ -42,6 +44,7 @@ export function CreationsGalleryScreen({
|
|
|
42
44
|
const tokens = useAppDesignTokens();
|
|
43
45
|
const insets = useSafeAreaInsets();
|
|
44
46
|
const { share } = useSharing();
|
|
47
|
+
const alert = useAlert();
|
|
45
48
|
const [viewerVisible, setViewerVisible] = useState(false);
|
|
46
49
|
const [viewerIndex, setViewerIndex] = useState(0);
|
|
47
50
|
const filterSheetRef = React.useRef<BottomSheetModalRef>(null);
|
|
@@ -106,20 +109,28 @@ export function CreationsGalleryScreen({
|
|
|
106
109
|
|
|
107
110
|
const handleDelete = useCallback(
|
|
108
111
|
(creation: Creation) => {
|
|
109
|
-
|
|
110
|
-
t(config.translations.deleteTitle),
|
|
111
|
-
t(config.translations.deleteMessage),
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
alert.show({
|
|
113
|
+
title: t(config.translations.deleteTitle),
|
|
114
|
+
message: t(config.translations.deleteMessage),
|
|
115
|
+
type: 'warning' as any,
|
|
116
|
+
actions: [
|
|
117
|
+
{
|
|
118
|
+
id: 'cancel',
|
|
119
|
+
label: t("common.cancel"),
|
|
120
|
+
style: 'secondary',
|
|
121
|
+
onPress: () => { }
|
|
122
|
+
},
|
|
114
123
|
{
|
|
115
|
-
|
|
116
|
-
|
|
124
|
+
id: 'delete',
|
|
125
|
+
label: t("common.delete"),
|
|
126
|
+
style: 'destructive',
|
|
127
|
+
variant: 'danger',
|
|
117
128
|
onPress: () => deleteMutation.mutate(creation.id),
|
|
118
129
|
},
|
|
119
|
-
]
|
|
120
|
-
);
|
|
130
|
+
]
|
|
131
|
+
});
|
|
121
132
|
},
|
|
122
|
-
[t, config.translations, deleteMutation],
|
|
133
|
+
[t, config.translations, deleteMutation, alert],
|
|
123
134
|
);
|
|
124
135
|
|
|
125
136
|
const handleImageChange = useCallback(
|