@umituz/react-native-ai-generation-content 1.17.270 → 1.17.271

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.270",
3
+ "version": "1.17.271",
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",
@@ -1,4 +1,4 @@
1
- import React, { useState, useMemo, useCallback } from "react";
1
+ import React, { useMemo, useCallback } from "react";
2
2
  import { View, FlatList, RefreshControl, StyleSheet } from "react-native";
3
3
  import {
4
4
  useAppDesignTokens,
@@ -18,7 +18,6 @@ import { MEDIA_FILTER_OPTIONS, STATUS_FILTER_OPTIONS } from "../../domain/types/
18
18
  import type { Creation } from "../../domain/entities/Creation";
19
19
  import type { CreationsConfig } from "../../domain/value-objects/CreationsConfig";
20
20
  import type { ICreationsRepository } from "../../domain/repositories/ICreationsRepository";
21
- import { CreationDetailScreen } from "./CreationDetailScreen";
22
21
 
23
22
  interface CreationsGalleryScreenProps {
24
23
  readonly userId: string | null;
@@ -46,8 +45,6 @@ export function CreationsGalleryScreen({
46
45
  const { share } = useSharing();
47
46
  const alert = useAlert();
48
47
 
49
- const [selectedCreation, setSelectedCreation] = useState<Creation | null>(null);
50
-
51
48
  const { data: creations, isLoading, refetch } = useCreations({ userId, repository });
52
49
  const deleteMutation = useDeleteCreation({ userId, repository });
53
50
 
@@ -69,8 +66,7 @@ export function CreationsGalleryScreen({
69
66
  actions: [
70
67
  { id: "cancel", label: t("common.cancel"), onPress: () => {} },
71
68
  { id: "delete", label: t("common.delete"), style: "destructive", onPress: async () => {
72
- const success = await deleteMutation.mutateAsync(c.id);
73
- if (success) setSelectedCreation(null);
69
+ await deleteMutation.mutateAsync(c.id);
74
70
  }}
75
71
  ]
76
72
  });
@@ -111,13 +107,13 @@ export function CreationsGalleryScreen({
111
107
  <CreationCard
112
108
  creation={item}
113
109
  callbacks={{
114
- onPress: () => setSelectedCreation(item),
110
+ onPress: () => onViewResult?.(item),
115
111
  onShare: async () => handleShare(item),
116
112
  onDelete: () => handleDelete(item),
117
113
  onFavorite: () => handleFavorite(item, !item.isFavorite),
118
114
  }}
119
115
  />
120
- ), [handleShare, handleDelete, handleFavorite]);
116
+ ), [handleShare, handleDelete, handleFavorite, onViewResult]);
121
117
 
122
118
  const renderHeader = useMemo(() => {
123
119
  if ((!creations || creations.length === 0) && !isLoading) return null;
@@ -149,22 +145,6 @@ export function CreationsGalleryScreen({
149
145
  />
150
146
  ), [isLoading, creations, filters.isFiltered, tokens, t, config, emptyActionLabel, onEmptyAction, filters.clearAllFilters]);
151
147
 
152
- if (selectedCreation) {
153
- return (
154
- <CreationDetailScreen
155
- userId={userId}
156
- repository={repository}
157
- creation={selectedCreation}
158
- config={config}
159
- onClose={() => setSelectedCreation(null)}
160
- onShare={handleShare}
161
- onDelete={handleDelete}
162
- onViewResult={onViewResult}
163
- t={t}
164
- />
165
- );
166
- }
167
-
168
148
  return (
169
149
  <ScreenLayout>
170
150
  <FlatList