@pol-studios/db 1.0.50 → 1.0.52
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/dist/{DataLayerContext--jqUiEMX.d.ts → DataLayerContext-C7cJtiO8.d.ts} +3 -3
- package/dist/auth/context.js +2 -2
- package/dist/auth/hooks.js +3 -3
- package/dist/auth/index.js +3 -3
- package/dist/{chunk-RJIVXO4U.js → chunk-3Q74DK5K.js} +44 -48
- package/dist/chunk-3Q74DK5K.js.map +1 -0
- package/dist/{chunk-DKUF2FKB.js → chunk-DP3YEVSX.js} +2 -2
- package/dist/{chunk-7CLN4ORU.js → chunk-EOJGUOJR.js} +681 -693
- package/dist/chunk-EOJGUOJR.js.map +1 -0
- package/dist/{chunk-GY7HDOBA.js → chunk-FIAXWEBK.js} +4 -4
- package/dist/{chunk-FLGHJCW3.js → chunk-FMYXG4VN.js} +2 -2
- package/dist/{chunk-WBMZDH2U.js → chunk-GSORUAS7.js} +19 -6
- package/dist/chunk-GSORUAS7.js.map +1 -0
- package/dist/{chunk-AIYPSXIO.js → chunk-WQLIGVQR.js} +15 -13
- package/dist/{chunk-AIYPSXIO.js.map → chunk-WQLIGVQR.js.map} +1 -1
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +2 -2
- package/dist/{index-CJ8GAb_-.d.ts → index-jVYdTeWx.d.ts} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7 -7
- package/dist/index.native.d.ts +5 -5
- package/dist/index.native.js +7 -7
- package/dist/index.web.d.ts +6 -6
- package/dist/index.web.js +6 -6
- package/dist/types/index.d.ts +2 -2
- package/dist/{useDbCount-DeXtNH0E.d.ts → useDbCount-DHLJzmkO.d.ts} +1 -1
- package/dist/{useResolveFeedback-HTdDM4AQ.d.ts → useResolveFeedback-B0UcYWVI.d.ts} +3 -3
- package/dist/with-auth/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-7CLN4ORU.js.map +0 -1
- package/dist/chunk-RJIVXO4U.js.map +0 -1
- package/dist/chunk-WBMZDH2U.js.map +0 -1
- /package/dist/{chunk-DKUF2FKB.js.map → chunk-DP3YEVSX.js.map} +0 -0
- /package/dist/{chunk-GY7HDOBA.js.map → chunk-FIAXWEBK.js.map} +0 -0
- /package/dist/{chunk-FLGHJCW3.js.map → chunk-FMYXG4VN.js.map} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useDbUpsert
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3Q74DK5K.js";
|
|
4
4
|
import {
|
|
5
5
|
UserMetadata
|
|
6
6
|
} from "./chunk-SM73S2DY.js";
|
|
7
7
|
import {
|
|
8
8
|
useSetupAuth
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FMYXG4VN.js";
|
|
10
10
|
import {
|
|
11
11
|
useDbQuery
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DP3YEVSX.js";
|
|
13
13
|
import {
|
|
14
14
|
useSupabase
|
|
15
15
|
} from "./chunk-DMVUEJG2.js";
|
|
@@ -467,4 +467,4 @@ export {
|
|
|
467
467
|
useSetUserMetadata,
|
|
468
468
|
useUserMetadataState
|
|
469
469
|
};
|
|
470
|
-
//# sourceMappingURL=chunk-
|
|
470
|
+
//# sourceMappingURL=chunk-FIAXWEBK.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
permissionContext,
|
|
3
3
|
setupAuthContext
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DP3YEVSX.js";
|
|
5
5
|
|
|
6
6
|
// src/auth/hooks/useAuth.ts
|
|
7
7
|
import { isUsable } from "@pol-studios/utils";
|
|
@@ -205,4 +205,4 @@ export {
|
|
|
205
205
|
useInvalidatePermission,
|
|
206
206
|
usePermissionLoading
|
|
207
207
|
};
|
|
208
|
-
//# sourceMappingURL=chunk-
|
|
208
|
+
//# sourceMappingURL=chunk-FMYXG4VN.js.map
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
createAdapterRegistry,
|
|
4
4
|
createSupabaseAdapter,
|
|
5
5
|
stripSchemaPrefix
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EOJGUOJR.js";
|
|
7
7
|
import {
|
|
8
8
|
DataLayerContext,
|
|
9
9
|
DataLayerCoreContext,
|
|
10
10
|
DataLayerStatusContext
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WQLIGVQR.js";
|
|
12
12
|
import {
|
|
13
13
|
QueryExecutor,
|
|
14
14
|
extractRelationNames,
|
|
@@ -1572,8 +1572,12 @@ function DataLayerProvider({
|
|
|
1572
1572
|
return unsubscribe;
|
|
1573
1573
|
}, [autoDetector]);
|
|
1574
1574
|
useEffect(() => {
|
|
1575
|
-
|
|
1576
|
-
|
|
1575
|
+
const currentDetector = registry.getAutoDetector();
|
|
1576
|
+
if (!currentDetector) return;
|
|
1577
|
+
if (powerSyncInstance && currentDetector.getPowerSync() !== powerSyncInstance) {
|
|
1578
|
+
currentDetector.setPowerSyncDb(powerSyncInstance);
|
|
1579
|
+
}
|
|
1580
|
+
currentDetector.updateSyncStatus(powerSyncSyncStatus ?? null);
|
|
1577
1581
|
setStatus((prev) => {
|
|
1578
1582
|
const newHasSynced = powerSyncSyncStatus?.hasSynced ?? false;
|
|
1579
1583
|
const newIsOnline = powerSyncSyncStatus?.isOnline;
|
|
@@ -1590,7 +1594,16 @@ function DataLayerProvider({
|
|
|
1590
1594
|
}
|
|
1591
1595
|
};
|
|
1592
1596
|
});
|
|
1593
|
-
}, [
|
|
1597
|
+
}, [
|
|
1598
|
+
// Note: We use registry.getAutoDetector() instead of autoDetector state
|
|
1599
|
+
// to avoid race conditions. The registry is stable and always has the latest detector.
|
|
1600
|
+
registry,
|
|
1601
|
+
powerSyncInstance,
|
|
1602
|
+
powerSyncSyncStatus?.hasSynced,
|
|
1603
|
+
powerSyncSyncStatus?.connected,
|
|
1604
|
+
powerSyncSyncStatus?.connecting,
|
|
1605
|
+
powerSyncSyncStatus?.isOnline
|
|
1606
|
+
]);
|
|
1594
1607
|
useEffect(() => {
|
|
1595
1608
|
if (registry) {
|
|
1596
1609
|
registry.setSyncTracker({
|
|
@@ -4955,4 +4968,4 @@ object-assign/index.js:
|
|
|
4955
4968
|
@license MIT
|
|
4956
4969
|
*)
|
|
4957
4970
|
*/
|
|
4958
|
-
//# sourceMappingURL=chunk-
|
|
4971
|
+
//# sourceMappingURL=chunk-GSORUAS7.js.map
|