@tanstack/svelte-query 4.24.9 → 5.0.0-alpha.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.
Files changed (42) hide show
  1. package/build/lib/{Hydrate.svelte → HydrationBoundary.svelte} +2 -1
  2. package/build/lib/HydrationBoundary.svelte.d.ts +21 -0
  3. package/build/lib/createBaseQuery.d.ts +2 -2
  4. package/build/lib/createBaseQuery.js +5 -5
  5. package/build/lib/createInfiniteQuery.d.ts +2 -4
  6. package/build/lib/createInfiniteQuery.js +3 -4
  7. package/build/lib/createMutation.d.ts +2 -5
  8. package/build/lib/createMutation.js +4 -5
  9. package/build/lib/createQueries.d.ts +11 -6
  10. package/build/lib/createQueries.js +2 -2
  11. package/build/lib/createQuery.d.ts +9 -21
  12. package/build/lib/createQuery.js +3 -5
  13. package/build/lib/index.d.ts +1 -1
  14. package/build/lib/index.js +1 -1
  15. package/build/lib/types.d.ts +14 -14
  16. package/build/lib/useHydrate.d.ts +2 -2
  17. package/build/lib/useHydrate.js +2 -2
  18. package/build/lib/useIsFetching.d.ts +2 -3
  19. package/build/lib/useIsFetching.js +3 -4
  20. package/build/lib/useIsMutating.d.ts +2 -3
  21. package/build/lib/useIsMutating.js +3 -4
  22. package/build/lib/useQueryClient.d.ts +1 -1
  23. package/build/lib/useQueryClient.js +6 -3
  24. package/package.json +2 -2
  25. package/src/HydrationBoundary.svelte +16 -0
  26. package/src/__tests__/CreateQueries.svelte +5 -3
  27. package/src/__tests__/CreateQuery.svelte +2 -2
  28. package/src/__tests__/createQueries.test.ts +26 -22
  29. package/src/__tests__/utils.ts +2 -34
  30. package/src/createBaseQuery.ts +6 -8
  31. package/src/createInfiniteQuery.ts +15 -81
  32. package/src/createMutation.ts +6 -67
  33. package/src/createQueries.ts +24 -15
  34. package/src/createQuery.ts +27 -108
  35. package/src/index.ts +1 -1
  36. package/src/types.ts +20 -15
  37. package/src/useHydrate.ts +6 -2
  38. package/src/useIsFetching.ts +2 -11
  39. package/src/useIsMutating.ts +3 -12
  40. package/src/useQueryClient.ts +8 -3
  41. package/build/lib/Hydrate.svelte.d.ts +0 -20
  42. package/src/Hydrate.svelte +0 -11
@@ -1,20 +0,0 @@
1
- import { SvelteComponentTyped } from "svelte";
2
- import type { DehydratedState, HydrateOptions } from '@tanstack/query-core';
3
- declare const __propDef: {
4
- props: {
5
- state: DehydratedState;
6
- options?: HydrateOptions | undefined;
7
- };
8
- events: {
9
- [evt: string]: CustomEvent<any>;
10
- };
11
- slots: {
12
- default: {};
13
- };
14
- };
15
- export declare type HydrateProps = typeof __propDef.props;
16
- export declare type HydrateEvents = typeof __propDef.events;
17
- export declare type HydrateSlots = typeof __propDef.slots;
18
- export default class Hydrate extends SvelteComponentTyped<HydrateProps, HydrateEvents, HydrateSlots> {
19
- }
20
- export {};
@@ -1,11 +0,0 @@
1
- <script lang="ts">
2
- import type { DehydratedState, HydrateOptions } from '@tanstack/query-core'
3
- import { useHydrate } from './useHydrate'
4
-
5
- export let state: DehydratedState
6
- export let options: HydrateOptions | undefined = undefined
7
-
8
- useHydrate(state, options)
9
- </script>
10
-
11
- <slot />