@umituz/react-native-ai-creations 1.2.16 → 1.3.0

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.16",
3
+ "version": "1.3.0",
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",
@@ -31,11 +31,11 @@
31
31
  "@umituz/react-native-alert": "latest"
32
32
  },
33
33
  "peerDependencies": {
34
+ "@react-navigation/native": ">=6.0.0",
34
35
  "@tanstack/react-query": ">=5.0.0",
35
36
  "@umituz/react-native-bottom-sheet": "latest",
36
37
  "@umituz/react-native-design-system": "latest",
37
38
  "@umituz/react-native-firebase": "latest",
38
- "@umituz/react-native-filter": "latest",
39
39
  "@umituz/react-native-image": "latest",
40
40
  "@umituz/react-native-sharing": "latest",
41
41
  "expo-linear-gradient": ">=14.0.0",
@@ -45,15 +45,15 @@
45
45
  "react-native-safe-area-context": ">=5.0.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@umituz/react-native-bottom-sheet": "latest",
49
- "@umituz/react-native-filter": "latest",
50
- "@umituz/react-native-image": "latest",
51
- "expo-linear-gradient": "^15.0.8",
48
+ "@react-navigation/native": "^7.1.26",
52
49
  "@tanstack/react-query": "^5.62.16",
53
50
  "@types/react": "^19.0.0",
51
+ "@umituz/react-native-bottom-sheet": "latest",
54
52
  "@umituz/react-native-design-system": "latest",
55
53
  "@umituz/react-native-firebase": "latest",
54
+ "@umituz/react-native-image": "latest",
56
55
  "@umituz/react-native-sharing": "latest",
56
+ "expo-linear-gradient": "^15.0.8",
57
57
  "firebase": "^11.0.0",
58
58
  "react": "19.1.0",
59
59
  "react-native": "0.81.5",
@@ -68,4 +68,4 @@
68
68
  "README.md",
69
69
  "LICENSE"
70
70
  ]
71
- }
71
+ }
@@ -41,7 +41,7 @@ export type PathBuilder = (userId: string) => string[];
41
41
  */
42
42
  export type DocumentMapper = (id: string, data: CreationDocument) => Creation;
43
43
 
44
- import type { FilterCategory } from "@umituz/react-native-filter";
44
+ import type { FilterCategory } from "@umituz/react-native-bottom-sheet";
45
45
 
46
46
  export interface CreationsConfig {
47
47
  readonly collectionName: string;
@@ -7,7 +7,7 @@ import { useQuery } from "@tanstack/react-query";
7
7
  import type { ICreationsRepository } from "../../domain/repositories/ICreationsRepository";
8
8
 
9
9
  const CACHE_CONFIG = {
10
- staleTime: 5 * 60 * 1000,
10
+ staleTime: 5 * 60 * 1000, // 5 minutes - use cache invalidation on mutations
11
11
  gcTime: 30 * 60 * 1000,
12
12
  };
13
13
 
@@ -8,7 +8,7 @@ import type { Creation } from "../../domain/entities/Creation";
8
8
 
9
9
  const ALL_FILTER = "all";
10
10
 
11
- import { FilterUtils } from "@umituz/react-native-filter";
11
+ import { FilterUtils } from "@umituz/react-native-bottom-sheet";
12
12
 
13
13
  interface UseCreationsFilterProps {
14
14
  readonly creations: Creation[] | undefined;
@@ -4,11 +4,12 @@ import { useAppDesignTokens } from "@umituz/react-native-design-system";
4
4
  import { useSharing } from "@umituz/react-native-sharing";
5
5
  import { ImageGallery } from "@umituz/react-native-image";
6
6
  import { useSafeAreaInsets } from "react-native-safe-area-context";
7
+ import { useFocusEffect } from "@react-navigation/native";
7
8
  import { useCreations } from "../hooks/useCreations";
8
9
  import { useDeleteCreation } from "../hooks/useDeleteCreation";
9
10
  import { useCreationsFilter } from "../hooks/useCreationsFilter";
10
11
  import { useAlert } from "@umituz/react-native-alert";
11
- import { FilterBottomSheet, type FilterCategory } from "@umituz/react-native-filter";
12
+ import { FilterBottomSheet, type FilterCategory } from "@umituz/react-native-bottom-sheet";
12
13
  import { BottomSheetModalRef } from "@umituz/react-native-bottom-sheet";
13
14
  import { GalleryHeader, EmptyState, CreationsGrid } from "../components";
14
15
  import type { Creation } from "../../domain/entities/Creation";
@@ -51,6 +52,13 @@ export function CreationsGalleryScreen({
51
52
  const deleteMutation = useDeleteCreation({ userId, repository });
52
53
  const { filtered, selectedIds, toggleFilter, clearFilters, isFiltered } = useCreationsFilter({ creations });
53
54
 
55
+ // Refetch creations when screen comes into focus
56
+ useFocusEffect(
57
+ useCallback(() => {
58
+ refetch();
59
+ }, [refetch])
60
+ );
61
+
54
62
  const allCategories = useMemo(() => {
55
63
  const categories: FilterCategory[] = [];
56
64
  if (config.types.length > 0) {