@triplit/svelte 0.1.69 → 0.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @triplit/svelte
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f894e435: update query return type to array
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [0a09013b]
12
+ - Updated dependencies [f894e435]
13
+ - Updated dependencies [abe8bea8]
14
+ - Updated dependencies [38746526]
15
+ - Updated dependencies [abe8bea8]
16
+ - @triplit/client@0.5.0
17
+
18
+ ## 0.1.70
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [3c7fd004]
23
+ - @triplit/client@0.4.13
24
+
3
25
  ## 0.1.69
4
26
 
5
27
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import type { ClientFetchResult, ClientQuery, ClientQueryBuilder, CollectionNameFromModels, Models, SubscriptionOptions, TriplitClient, Unalias } from '@triplit/client';
1
+ import type { ClientQuery, ClientQueryBuilder, CollectionNameFromModels, FetchResult, Models, SubscriptionOptions, TriplitClient, Unalias } from '@triplit/client';
2
2
  import { WorkerClient } from '@triplit/client/worker-client';
3
3
  /**
4
4
  * A hook that subscribes to a query
@@ -14,7 +14,7 @@ export declare function useQuery<M extends Models, CN extends CollectionNameFrom
14
14
  fetching: boolean;
15
15
  fetchingLocal: boolean;
16
16
  fetchingRemote: boolean;
17
- results: Unalias<ClientFetchResult<M, Q>> | undefined;
17
+ results: Unalias<FetchResult<M, Q>> | undefined;
18
18
  error: any;
19
19
  updateQuery: (query: ClientQueryBuilder<M, CN, Q>) => void;
20
20
  };
@@ -48,7 +48,7 @@ export function useQuery(client, query, options) {
48
48
  const unsubscribe = client.subscribe($state.snapshot(builtQuery), (localResults) => {
49
49
  fetchingLocal = false;
50
50
  error = undefined;
51
- results = new Map(localResults);
51
+ results = localResults;
52
52
  }, (error) => {
53
53
  fetchingLocal = false;
54
54
  error = error;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@triplit/svelte",
3
3
  "packageManager": "yarn@3.4.1",
4
- "version": "0.1.69",
4
+ "version": "0.2.0",
5
5
  "source": "./src/index.svelte.ts",
6
6
  "main": "./dist/index.svelte.js",
7
7
  "module": "./dist/index.svelte.js",
@@ -29,17 +29,17 @@
29
29
  "/dist"
30
30
  ],
31
31
  "dependencies": {
32
- "@triplit/client": "^0.4.12"
32
+ "@triplit/client": "^0.5.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@sveltejs/package": "^2.3.0",
35
+ "@sveltejs/package": "^2.3.5",
36
36
  "@tsconfig/svelte": "^5.0.2",
37
- "svelte": "^5.0.0-next.137",
38
- "svelte-check": "^3.6.7",
37
+ "svelte": "^5.0.0-next.255",
38
+ "svelte-check": "^4.0.2",
39
39
  "tslib": "^2.6.2",
40
40
  "typescript": "^5.2.2"
41
41
  },
42
42
  "peerDependencies": {
43
- "svelte": "^5.0.0-next.137"
43
+ "svelte": "*"
44
44
  }
45
45
  }