@triplit/svelte 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +6 -0
- package/dist/index.svelte.d.ts +1 -1
- package/dist/index.svelte.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.svelte.d.ts
CHANGED
@@ -7,5 +7,5 @@ export declare function useQuery<M extends Models<any, any> | undefined, CN exte
|
|
7
7
|
updateQuery: (query: ClientQueryBuilder<M, CN>) => void;
|
8
8
|
};
|
9
9
|
export declare function useConnectionStatus(client: TriplitClient<any>): {
|
10
|
-
readonly status:
|
10
|
+
readonly status: string;
|
11
11
|
};
|
package/dist/index.svelte.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
export function useQuery(client, query, options) {
|
3
3
|
let results = $state(undefined);
|
4
4
|
let fetching = $state(false);
|
5
|
-
let fetchingRemote = $state(client.syncEngine.connectionStatus
|
5
|
+
let fetchingRemote = $state(client.syncEngine.connectionStatus !== 'CLOSED');
|
6
6
|
let error = $state(undefined);
|
7
7
|
let hasResponseFromServer = false;
|
8
8
|
let builtQuery = $state(query && query.build());
|
@@ -63,7 +63,7 @@ export function useQuery(client, query, options) {
|
|
63
63
|
};
|
64
64
|
}
|
65
65
|
export function useConnectionStatus(client) {
|
66
|
-
let status = $state(
|
66
|
+
let status = $state('CONNECTING');
|
67
67
|
$effect(() => {
|
68
68
|
const unsub = client.syncEngine.onConnectionStatusChange((newStatus) => {
|
69
69
|
status = newStatus;
|