react-firebase-ql 2.0.8 → 2.1.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAIA,2CAAyB"}
@@ -0,0 +1,5 @@
1
+ export { useAuth } from '../client/useAuth';
2
+ export { useCount } from '../client/useCounter';
3
+ export { useFetch } from '../client/useFetch';
4
+ export { useStream } from '../client/useStream';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,12 @@
1
+ 'use client';
2
+ import { useEffect } from 'react';
3
+ import { onAuthStateChanged } from 'firebase/auth';
4
+ export function useAuth(auth, callback) {
5
+ useEffect(() => {
6
+ const unsubscribe = onAuthStateChanged(auth, async (authUser) => {
7
+ callback(authUser);
8
+ });
9
+ return () => unsubscribe();
10
+ }, []);
11
+ }
12
+ //# sourceMappingURL=useAuth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAuth.js","sourceRoot":"","sources":["../../src/client/useAuth.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAQ,kBAAkB,EAAQ,MAAM,eAAe,CAAC;AAG/D,MAAM,UAAU,OAAO,CAAC,IAAU,EAAE,QAAmC;IACrE,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,WAAW,GAAG,kBAAkB,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;YAC/D,QAAQ,CAAC,QAAQ,CAAC,CAAA;QACnB,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC;IAC7B,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
@@ -0,0 +1,30 @@
1
+ 'use client';
2
+ import { errorLogger } from "firebase-client-ql";
3
+ import { useCallback, useEffect, useState } from "react";
4
+ export const useCount = (param) => {
5
+ const [data, setData] = useState(0);
6
+ const [loading, setLoading] = useState(true);
7
+ const fetcher = useCallback(async () => {
8
+ if (!param.where)
9
+ return;
10
+ try {
11
+ const model = param.model;
12
+ const found = await model.countData(param.where);
13
+ setData(found);
14
+ }
15
+ catch (error) {
16
+ errorLogger("useCount: ", error);
17
+ }
18
+ finally {
19
+ setLoading(false);
20
+ }
21
+ }, [
22
+ JSON.stringify(param.where),
23
+ loading
24
+ ]);
25
+ useEffect(() => {
26
+ fetcher();
27
+ }, [fetcher]);
28
+ return [data, loading, setLoading];
29
+ };
30
+ //# sourceMappingURL=useCounter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCounter.js","sourceRoot":"","sources":["../../src/client/useCounter.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAa,WAAW,EAAe,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAA4B,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAIlF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAuB,KAG9C,EAAwD,EAAE;IAEvD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC,CAAC;IAC5C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE7C,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QACnC,IAAK,CAAC,KAAK,CAAC,KAAK;YAAE,OAAO;QAE1B,IAAI,CAAC;YACD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;YAC1B,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;YAChD,OAAO,CAAC,KAAK,CAAC,CAAC;QACnB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,WAAW,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACrC,CAAC;gBAAS,CAAC;YACP,UAAU,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;IACL,CAAC,EAAE;QACC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC;QAC3B,OAAO;KACV,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,OAAO,EAAE,CAAC;IACd,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AACvC,CAAC,CAAA"}
@@ -0,0 +1,45 @@
1
+ 'use client';
2
+ import { errorLogger } from "firebase-client-ql";
3
+ import { useCallback, useEffect, useState } from "react";
4
+ export const useFetch = (param) => {
5
+ const [data, setData] = useState();
6
+ const [loading, setLoading] = useState(true);
7
+ const fetcher = useCallback(async () => {
8
+ var _a, _b, _c, _d;
9
+ if (!param.reference && !param.where)
10
+ return;
11
+ try {
12
+ const model = param.model;
13
+ if (param.reference) {
14
+ const found = await model.find(param.reference);
15
+ if (found)
16
+ setData(model.data);
17
+ }
18
+ else if (param.where) {
19
+ const found = await model.findWhere({
20
+ wh: param.where,
21
+ lim: (_b = (_a = param.filter) === null || _a === void 0 ? void 0 : _a.limit) !== null && _b !== void 0 ? _b : 100,
22
+ order: (_c = param.filter) === null || _c === void 0 ? void 0 : _c.orderBy,
23
+ offset: (_d = param.filter) === null || _d === void 0 ? void 0 : _d.offset
24
+ });
25
+ setData(found);
26
+ }
27
+ }
28
+ catch (error) {
29
+ errorLogger("useFetch: ", error);
30
+ }
31
+ finally {
32
+ setLoading(false);
33
+ }
34
+ }, [
35
+ param.reference,
36
+ JSON.stringify(param.where),
37
+ JSON.stringify(param.filter),
38
+ loading
39
+ ]);
40
+ useEffect(() => {
41
+ fetcher();
42
+ }, [fetcher]);
43
+ return [data, loading, setLoading];
44
+ };
45
+ //# sourceMappingURL=useFetch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetch.js","sourceRoot":"","sources":["../../src/client/useFetch.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAa,WAAW,EAAe,MAAM,oBAAoB,CAAA;AACxE,OAAO,EAA4B,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAIlF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAuB,KAS9C,EAAyE,EAAE;IAExE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,EAAW,CAAC;IAC5C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE7C,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;;QACnC,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,KAAK;YAAE,OAAO;QAE7C,IAAI,CAAC;YACD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;YAE1B,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;gBAClB,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBAChD,IAAI,KAAK;oBAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACnC,CAAC;iBAAM,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;gBACrB,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC;oBAChC,EAAE,EAAE,KAAK,CAAC,KAAK;oBACf,GAAG,EAAE,MAAA,MAAA,KAAK,CAAC,MAAM,0CAAE,KAAK,mCAAI,GAAG;oBAC/B,KAAK,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,OAAO;oBAC5B,MAAM,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,MAAM;iBAC/B,CAAC,CAAC;gBACH,OAAO,CAAC,KAAK,CAAC,CAAC;YACnB,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,WAAW,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACrC,CAAC;gBAAS,CAAC;YACP,UAAU,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;IACL,CAAC,EAAE;QACC,KAAK,CAAC,SAAS;QACf,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC;QAC5B,OAAO;KACV,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,OAAO,EAAE,CAAC;IACd,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AACvC,CAAC,CAAA"}
@@ -0,0 +1,37 @@
1
+ 'use client';
2
+ import { errorLogger } from 'firebase-client-ql';
3
+ import { useEffect } from 'react';
4
+ export const useStream = (param, callback) => {
5
+ useEffect(() => {
6
+ let unsubscribe;
7
+ try {
8
+ const { model, reference, where, filter } = param;
9
+ if (reference) {
10
+ unsubscribe = model.stream((data) => {
11
+ if (data)
12
+ callback(data);
13
+ }, reference);
14
+ }
15
+ else if (where) {
16
+ const allInvalid = where.every((item) => item.value === undefined);
17
+ if (allInvalid) {
18
+ callback([]);
19
+ return;
20
+ }
21
+ unsubscribe = model.streamWhere(where, (data) => {
22
+ if (data)
23
+ callback(data);
24
+ }, 100, filter === null || filter === void 0 ? void 0 : filter.orderBy, filter === null || filter === void 0 ? void 0 : filter.offset);
25
+ }
26
+ }
27
+ catch (error) {
28
+ errorLogger('useStream error:', error);
29
+ }
30
+ return () => {
31
+ if (typeof unsubscribe === 'function') {
32
+ unsubscribe();
33
+ }
34
+ };
35
+ }, [JSON.stringify(param.where), JSON.stringify(param.filter), param.reference]);
36
+ };
37
+ //# sourceMappingURL=useStream.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStream.js","sourceRoot":"","sources":["../../src/client/useStream.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAa,WAAW,EAAe,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,KAQC,EACD,QAA6B,EACvB,EAAE;IACR,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,WAAqC,CAAC;QAE1C,IAAI,CAAC;YACH,MAAM,EAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;YAEjD,IAAI,SAAS,EAAE,CAAC;gBACd,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAS,EAAE,EAAE;oBACvC,IAAI,IAAI;wBAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;gBAC3B,CAAC,EAAE,SAAS,CAAC,CAAC;YAChB,CAAC;iBAAM,IAAI,KAAK,EAAE,CAAC;gBACjB,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;gBACnE,IAAI,UAAU,EAAE,CAAC;oBACf,QAAQ,CAAC,EAAE,CAAC,CAAC;oBACb,OAAO;gBACT,CAAC;gBAED,WAAW,GAAG,KAAK,CAAC,WAAW,CAC7B,KAAK,EACL,CAAC,IAAS,EAAE,EAAE;oBACZ,IAAI,IAAI;wBAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;gBAC3B,CAAC,EACD,GAAG,EACH,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,EACf,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CACf,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,WAAW,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;QACzC,CAAC;QAGD,OAAO,GAAG,EAAE;YACV,IAAI,OAAO,WAAW,KAAK,UAAU,EAAE,CAAC;gBACtC,WAAW,EAAE,CAAC;YAChB,CAAC;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AACnF,CAAC,CAAC"}
package/esm/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './client';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,40 +1,37 @@
1
1
  {
2
2
  "name": "react-firebase-ql",
3
- "version": "2.0.8",
3
+ "version": "2.1.0",
4
4
  "description": "A React helper library that simplifies using Firebase with side effects and live queries.",
5
- "main": "dist/index.cjs.js",
6
- "module": "dist/index.esm.js",
5
+ "main": "dist/index.js",
6
+ "module": "esm/index.js",
7
7
  "types": "dist/index.d.ts",
8
+ "files": ["dist", "esm", "src"],
8
9
  "private": false,
9
- "files": [
10
- "dist"
11
- ],
12
10
  "repository": {
13
11
  "type": "git",
14
12
  "url": "https://github.com/breedware/react-firebase-ql.git"
15
13
  },
16
14
  "keywords": [
17
- "react",
18
- "firebase",
19
- "hooks",
20
- "library",
21
- "firebase-ql",
22
- "firebase sql",
23
- "react-firebase"
15
+ "react", "firebase", "hooks", "library", "firebase-ql", "firebase sql", "react-firebase"
24
16
  ],
25
17
  "author": "Breedware Limited",
26
18
  "license": "MIT",
27
19
  "scripts": {
28
- "clean": "rimraf dist",
29
- "build": "tsup src/client/index.ts --dts --format esm,cjs --out-dir dist",
20
+ "clean": "rimraf dist esm",
21
+ "prebuild": "npm run clean",
22
+ "build:cjs": "tsc --module commonjs --outDir dist",
23
+ "build:esm": "tsc --module esnext --outDir esm",
24
+ "build": "npm run build:esm && npm run build:cjs",
30
25
  "prepublishOnly": "npm run build",
26
+ "prepare": "npm run build",
27
+ "preversion": "npm run build",
28
+ "postversion": "git push --follow-tags",
31
29
  "test": "vitest",
32
- "lint": "eslint . --ext .ts,.tsx,.js",
33
- "prepare": "npm run build"
30
+ "lint": "eslint . --ext .ts,.tsx,.js"
34
31
  },
35
32
  "peerDependencies": {
36
33
  "react": ">=18",
37
- "firebase-client-ql" : ">=4"
34
+ "firebase-client-ql": ">=4"
38
35
  },
39
36
  "devDependencies": {
40
37
  "@testing-library/react": "^16.3.0",
@@ -45,16 +42,12 @@
45
42
  "typescript": "^5.9.3",
46
43
  "vitest": "^0.30.1"
47
44
  },
48
-
49
45
  "sideEffects": false,
50
46
  "exports": {
51
47
  ".": {
52
- "browser": {
53
- "import": "./dist/index.esm.js",
54
- "require": "./dist/index.cjs.js"
55
- },
56
- "default": "./dist/index.esm.js"
48
+ "import": "./esm/index.js",
49
+ "require": "./dist/index.js",
50
+ "default": "./esm/index.js"
57
51
  }
58
52
  }
59
-
60
53
  }
@@ -0,0 +1,5 @@
1
+
2
+ export { useAuth } from '../client/useAuth';
3
+ export { useCount } from '../client/useCounter';
4
+ export { useFetch } from '../client/useFetch';
5
+ export { useStream } from '../client/useStream';
@@ -0,0 +1,14 @@
1
+ 'use client';
2
+ import { useEffect } from 'react';
3
+ import { Auth, onAuthStateChanged, User } from 'firebase/auth';
4
+
5
+
6
+ export function useAuth(auth: Auth, callback: (user: User | null)=>void) {
7
+ useEffect(() => {
8
+ const unsubscribe = onAuthStateChanged(auth, async (authUser) => {
9
+ callback(authUser)
10
+ });
11
+
12
+ return () => unsubscribe();
13
+ }, []);
14
+ }
@@ -0,0 +1,38 @@
1
+ 'use client'
2
+
3
+ import { BaseModel, errorLogger, whereClause } from "firebase-client-ql";
4
+ import { Dispatch, SetStateAction, useCallback, useEffect, useState } from "react"
5
+
6
+
7
+ // Count firestore data
8
+ export const useCount = <T extends BaseModel >(param: {
9
+ model: T | any,
10
+ where?: whereClause[],
11
+ }): [number, boolean, Dispatch<SetStateAction<boolean>>] => {
12
+
13
+ const [data, setData] = useState<number>(0);
14
+ const [loading, setLoading] = useState(true);
15
+
16
+ const fetcher = useCallback(async () => {
17
+ if ( !param.where) return;
18
+
19
+ try {
20
+ const model = param.model;
21
+ const found = await model.countData(param.where)
22
+ setData(found);
23
+ } catch (error) {
24
+ errorLogger("useCount: ", error);
25
+ } finally {
26
+ setLoading(false);
27
+ }
28
+ }, [
29
+ JSON.stringify(param.where),
30
+ loading
31
+ ]);
32
+
33
+ useEffect(() => {
34
+ fetcher();
35
+ }, [fetcher]);
36
+
37
+ return [data, loading, setLoading];
38
+ }
@@ -0,0 +1,57 @@
1
+ 'use client'
2
+
3
+ import { BaseModel, errorLogger, whereClause } from "firebase-client-ql"
4
+ import { Dispatch, SetStateAction, useCallback, useEffect, useState } from "react"
5
+
6
+
7
+ // 👇 Hook is now generic
8
+ export const useFetch = <T extends BaseModel >(param: {
9
+ model: T | any
10
+ where?: whereClause[],
11
+ reference?: string,
12
+ filter?: {
13
+ orderBy?: { parameter: string, direction?: 'asc' | 'desc' };
14
+ offset?: string;
15
+ limit?: number;
16
+ }
17
+ }): [typeof param.model.data, boolean, Dispatch<SetStateAction<boolean>>] => {
18
+
19
+ const [data, setData] = useState<unknown>();
20
+ const [loading, setLoading] = useState(true);
21
+
22
+ const fetcher = useCallback(async () => {
23
+ if (!param.reference && !param.where) return;
24
+
25
+ try {
26
+ const model = param.model;
27
+
28
+ if (param.reference) {
29
+ const found = await model.find(param.reference);
30
+ if (found) setData(model.data);
31
+ } else if (param.where) {
32
+ const found = await model.findWhere({
33
+ wh: param.where,
34
+ lim: param.filter?.limit ?? 100,
35
+ order: param.filter?.orderBy,
36
+ offset: param.filter?.offset
37
+ });
38
+ setData(found);
39
+ }
40
+ } catch (error) {
41
+ errorLogger("useFetch: ", error);
42
+ } finally {
43
+ setLoading(false);
44
+ }
45
+ }, [
46
+ param.reference,
47
+ JSON.stringify(param.where),
48
+ JSON.stringify(param.filter),
49
+ loading
50
+ ]);
51
+
52
+ useEffect(() => {
53
+ fetcher();
54
+ }, [fetcher]);
55
+
56
+ return [data, loading, setLoading];
57
+ }
@@ -0,0 +1,57 @@
1
+ 'use client';
2
+
3
+ import { BaseModel, errorLogger, whereClause } from 'firebase-client-ql';
4
+ import { useEffect } from 'react';
5
+
6
+
7
+ export const useStream = <T extends BaseModel>(
8
+ param: {
9
+ model: T | any;
10
+ where?: whereClause[];
11
+ reference?: string;
12
+ filter?: {
13
+ orderBy?: { parameter: string; direction?: 'asc' | 'desc' };
14
+ offset?: string;
15
+ };
16
+ },
17
+ callback: (data: any) => void
18
+ ): void => {
19
+ useEffect(() => {
20
+ let unsubscribe: (() => void) | undefined;
21
+
22
+ try {
23
+ const {model, reference, where, filter } = param;
24
+
25
+ if (reference) {
26
+ unsubscribe = model.stream((data: any) => {
27
+ if (data) callback(data);
28
+ }, reference);
29
+ } else if (where) {
30
+ const allInvalid = where.every((item) => item.value === undefined);
31
+ if (allInvalid) {
32
+ callback([]);
33
+ return;
34
+ }
35
+
36
+ unsubscribe = model.streamWhere(
37
+ where,
38
+ (data: any) => {
39
+ if (data) callback(data);
40
+ },
41
+ 100,
42
+ filter?.orderBy,
43
+ filter?.offset
44
+ );
45
+ }
46
+ } catch (error) {
47
+ errorLogger('useStream error:', error);
48
+ }
49
+
50
+ // Proper cleanup
51
+ return () => {
52
+ if (typeof unsubscribe === 'function') {
53
+ unsubscribe();
54
+ }
55
+ };
56
+ }, [JSON.stringify(param.where), JSON.stringify(param.filter), param.reference]);
57
+ };
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * ⚠️ Client-only exports
3
+ * These hooks must NOT be imported in Server Components
4
+ */
5
+ export * from './client';