@umituz/react-native-ai-generation-content 1.83.12 → 1.83.13

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.83.12",
3
+ "version": "1.83.13",
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",
@@ -4,7 +4,7 @@
4
4
  * Single Responsibility: Firestore query operations
5
5
  */
6
6
 
7
- import { getDocs, getDoc, query, orderBy, where } from "firebase/firestore";
7
+ import { getDocs, getDoc, query, orderBy } from "firebase/firestore";
8
8
  import type { IPathResolver } from "@umituz/react-native-firebase";
9
9
  import type { DocumentMapper } from "../../domain/value-objects/CreationsConfig";
10
10
  import type { Creation, CreationDocument } from "../../domain/entities/Creation";
@@ -28,20 +28,20 @@ export class CreationsQuery {
28
28
  try {
29
29
  const q = query(
30
30
  userCollection,
31
- where(CREATION_FIELDS.DELETED_AT, "==", null),
32
31
  orderBy(CREATION_FIELDS.CREATED_AT, "desc")
33
32
  );
34
33
  const snapshot = await getDocs(q);
35
34
 
36
- const creations = snapshot.docs.map((docSnap) => {
37
- const data = docSnap.data() as CreationDocument;
38
- return this.documentMapper(docSnap.id, data);
39
- });
35
+ const creations = snapshot.docs
36
+ .map((docSnap) => {
37
+ const data = docSnap.data() as CreationDocument;
38
+ return this.documentMapper(docSnap.id, data);
39
+ })
40
+ .filter((c) => c.deletedAt == null);
40
41
 
41
42
  if (__DEV__) {
42
43
  console.log("[CreationsQuery] Fetched creations:", {
43
44
  count: creations.length,
44
- hasDeletedFilter: true,
45
45
  });
46
46
  }
47
47
 
@@ -4,7 +4,7 @@
4
4
  * Single Responsibility: Firestore realtime listeners
5
5
  */
6
6
 
7
- import { query, orderBy, onSnapshot, where } from "firebase/firestore";
7
+ import { query, orderBy, onSnapshot } from "firebase/firestore";
8
8
  import type { IPathResolver } from "@umituz/react-native-firebase";
9
9
  import type { DocumentMapper } from "../../domain/value-objects/CreationsConfig";
10
10
  import type { CreationDocument } from "../../domain/entities/Creation";
@@ -35,7 +35,6 @@ export class CreationsSubscription {
35
35
 
36
36
  const q = query(
37
37
  userCollection,
38
- where(CREATION_FIELDS.DELETED_AT, "==", null),
39
38
  orderBy(CREATION_FIELDS.CREATED_AT, "desc")
40
39
  );
41
40
 
@@ -43,10 +42,12 @@ export class CreationsSubscription {
43
42
  q,
44
43
  { includeMetadataChanges: false },
45
44
  (snapshot) => {
46
- const creations = snapshot.docs.map((docSnap) => {
47
- const data = docSnap.data() as CreationDocument;
48
- return this.documentMapper(docSnap.id, data);
49
- });
45
+ const creations = snapshot.docs
46
+ .map((docSnap) => {
47
+ const data = docSnap.data() as CreationDocument;
48
+ return this.documentMapper(docSnap.id, data);
49
+ })
50
+ .filter((c) => c.deletedAt == null);
50
51
 
51
52
  if (__DEV__) {
52
53
  console.log("[CreationsSubscription] Sync:", creations.length, "items");
@@ -76,7 +76,7 @@ export function useCreations({
76
76
  }
77
77
  unsubscribe();
78
78
  };
79
- }, [userId, repository, enabled, onDataCallback, onErrorCallback]);
79
+ }, [userId, repository, enabled]); // onDataCallback/onErrorCallback intentionally omitted - stable memoized refs
80
80
 
81
81
  return { data, isLoading, error, refetch };
82
82
  }