@tanstack/svelte-query 5.51.15 → 5.51.16

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/dist/HydrationBoundary.svelte +1 -1
  2. package/dist/QueryClientProvider.svelte +1 -1
  3. package/dist/createBaseQuery.d.ts +1 -1
  4. package/dist/createBaseQuery.js +3 -3
  5. package/dist/createInfiniteQuery.d.ts +1 -1
  6. package/dist/createInfiniteQuery.js +1 -1
  7. package/dist/createMutation.d.ts +1 -1
  8. package/dist/createMutation.js +2 -2
  9. package/dist/createQueries.d.ts +1 -1
  10. package/dist/createQueries.js +3 -3
  11. package/dist/createQuery.d.ts +2 -2
  12. package/dist/createQuery.js +1 -1
  13. package/dist/index.d.ts +16 -16
  14. package/dist/index.js +14 -14
  15. package/dist/infiniteQueryOptions.d.ts +1 -1
  16. package/dist/queryOptions.d.ts +1 -1
  17. package/dist/useHydrate.js +1 -1
  18. package/dist/useIsFetching.js +1 -1
  19. package/dist/useIsMutating.js +1 -1
  20. package/dist/useIsRestoring.js +1 -1
  21. package/dist/useMutationState.d.ts +1 -1
  22. package/dist/useMutationState.js +1 -1
  23. package/dist/useQueryClient.js +1 -1
  24. package/dist/utils.d.ts +1 -1
  25. package/package.json +6 -6
  26. package/src/HydrationBoundary.svelte +1 -1
  27. package/src/QueryClientProvider.svelte +1 -1
  28. package/src/createBaseQuery.ts +4 -4
  29. package/src/createInfiniteQuery.ts +2 -2
  30. package/src/createMutation.ts +3 -3
  31. package/src/createQueries.ts +4 -4
  32. package/src/createQuery.ts +3 -3
  33. package/src/index.ts +16 -16
  34. package/src/infiniteQueryOptions.ts +1 -1
  35. package/src/queryOptions.ts +1 -1
  36. package/src/useHydrate.ts +1 -1
  37. package/src/useIsFetching.ts +1 -1
  38. package/src/useIsMutating.ts +1 -1
  39. package/src/useIsRestoring.ts +1 -1
  40. package/src/useMutationState.ts +2 -2
  41. package/src/useQueryClient.ts +1 -1
  42. package/src/utils.ts +1 -1
@@ -1,4 +1,4 @@
1
- <script>import { useHydrate } from "./useHydrate";
1
+ <script>import { useHydrate } from "./useHydrate.js";
2
2
  export let state;
3
3
  export let options = void 0;
4
4
  export let queryClient = void 0;
@@ -1,6 +1,6 @@
1
1
  <script>import { onDestroy, onMount } from "svelte";
2
2
  import { QueryClient } from "@tanstack/query-core";
3
- import { setQueryClientContext } from "./context";
3
+ import { setQueryClientContext } from "./context.js";
4
4
  export let client = new QueryClient();
5
5
  onMount(() => {
6
6
  client.mount();
@@ -1,3 +1,3 @@
1
1
  import type { QueryClient, QueryKey, QueryObserver } from '@tanstack/query-core';
2
- import type { CreateBaseQueryOptions, CreateBaseQueryResult, StoreOrVal } from './types';
2
+ import type { CreateBaseQueryOptions, CreateBaseQueryResult, StoreOrVal } from './types.js';
3
3
  export declare function createBaseQuery<TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey>(options: StoreOrVal<CreateBaseQueryOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>>, Observer: typeof QueryObserver, queryClient?: QueryClient): CreateBaseQueryResult<TData, TError>;
@@ -1,8 +1,8 @@
1
1
  import { derived, get, readable } from 'svelte/store';
2
2
  import { notifyManager } from '@tanstack/query-core';
3
- import { useIsRestoring } from './useIsRestoring';
4
- import { useQueryClient } from './useQueryClient';
5
- import { isSvelteStore } from './utils';
3
+ import { useIsRestoring } from './useIsRestoring.js';
4
+ import { useQueryClient } from './useQueryClient.js';
5
+ import { isSvelteStore } from './utils.js';
6
6
  export function createBaseQuery(options, Observer, queryClient) {
7
7
  /** Load query client */
8
8
  const client = useQueryClient(queryClient);
@@ -1,3 +1,3 @@
1
1
  import type { DefaultError, InfiniteData, QueryClient, QueryKey } from '@tanstack/query-core';
2
- import type { CreateInfiniteQueryOptions, CreateInfiniteQueryResult, StoreOrVal } from './types';
2
+ import type { CreateInfiniteQueryOptions, CreateInfiniteQueryResult, StoreOrVal } from './types.js';
3
3
  export declare function createInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: StoreOrVal<CreateInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey, TPageParam>>, queryClient?: QueryClient): CreateInfiniteQueryResult<TData, TError>;
@@ -1,5 +1,5 @@
1
1
  import { InfiniteQueryObserver } from '@tanstack/query-core';
2
- import { createBaseQuery } from './createBaseQuery';
2
+ import { createBaseQuery } from './createBaseQuery.js';
3
3
  export function createInfiniteQuery(options, queryClient) {
4
4
  return createBaseQuery(options, InfiniteQueryObserver, queryClient);
5
5
  }
@@ -1,3 +1,3 @@
1
- import type { CreateMutationOptions, CreateMutationResult, StoreOrVal } from './types';
1
+ import type { CreateMutationOptions, CreateMutationResult, StoreOrVal } from './types.js';
2
2
  import type { DefaultError, QueryClient } from '@tanstack/query-core';
3
3
  export declare function createMutation<TData = unknown, TError = DefaultError, TVariables = void, TContext = unknown>(options: StoreOrVal<CreateMutationOptions<TData, TError, TVariables, TContext>>, queryClient?: QueryClient): CreateMutationResult<TData, TError, TVariables, TContext>;
@@ -1,7 +1,7 @@
1
1
  import { derived, get, readable } from 'svelte/store';
2
2
  import { MutationObserver, notifyManager } from '@tanstack/query-core';
3
- import { useQueryClient } from './useQueryClient';
4
- import { isSvelteStore, noop } from './utils';
3
+ import { useQueryClient } from './useQueryClient.js';
4
+ import { isSvelteStore, noop } from './utils.js';
5
5
  export function createMutation(options, queryClient) {
6
6
  const client = useQueryClient(queryClient);
7
7
  const optionsStore = isSvelteStore(options) ? options : readable(options);
@@ -1,6 +1,6 @@
1
1
  /// <reference types="svelte" />
2
2
  import type { Readable } from 'svelte/store';
3
- import type { StoreOrVal } from './types';
3
+ import type { StoreOrVal } from './types.js';
4
4
  import type { DefaultError, DefinedQueryObserverResult, OmitKeyof, QueriesPlaceholderDataFunction, QueryClient, QueryFunction, QueryKey, QueryObserverOptions, QueryObserverResult, ThrowOnError } from '@tanstack/query-core';
5
5
  type QueryObserverOptionsForCreateQueries<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = OmitKeyof<QueryObserverOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>, 'placeholderData'> & {
6
6
  placeholderData?: TQueryFnData | QueriesPlaceholderDataFunction<TQueryFnData>;
@@ -1,8 +1,8 @@
1
1
  import { QueriesObserver, notifyManager } from '@tanstack/query-core';
2
2
  import { derived, get, readable } from 'svelte/store';
3
- import { useIsRestoring } from './useIsRestoring';
4
- import { useQueryClient } from './useQueryClient';
5
- import { isSvelteStore } from './utils';
3
+ import { useIsRestoring } from './useIsRestoring.js';
4
+ import { useQueryClient } from './useQueryClient.js';
5
+ import { isSvelteStore } from './utils.js';
6
6
  export function createQueries({ queries, ...options }, queryClient) {
7
7
  const client = useQueryClient(queryClient);
8
8
  const isRestoring = useIsRestoring();
@@ -1,6 +1,6 @@
1
1
  import type { DefaultError, QueryClient, QueryKey } from '@tanstack/query-core';
2
- import type { CreateQueryOptions, CreateQueryResult, DefinedCreateQueryResult, StoreOrVal } from './types';
3
- import type { DefinedInitialDataOptions, UndefinedInitialDataOptions } from './queryOptions';
2
+ import type { CreateQueryOptions, CreateQueryResult, DefinedCreateQueryResult, StoreOrVal } from './types.js';
3
+ import type { DefinedInitialDataOptions, UndefinedInitialDataOptions } from './queryOptions.js';
4
4
  export declare function createQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: StoreOrVal<DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>>, queryClient?: QueryClient): DefinedCreateQueryResult<TData, TError>;
5
5
  export declare function createQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: StoreOrVal<UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>>, queryClient?: QueryClient): CreateQueryResult<TData, TError>;
6
6
  export declare function createQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: StoreOrVal<CreateQueryOptions<TQueryFnData, TError, TData, TQueryKey>>, queryClient?: QueryClient): CreateQueryResult<TData, TError>;
@@ -1,5 +1,5 @@
1
1
  import { QueryObserver } from '@tanstack/query-core';
2
- import { createBaseQuery } from './createBaseQuery';
2
+ import { createBaseQuery } from './createBaseQuery.js';
3
3
  export function createQuery(options, queryClient) {
4
4
  return createBaseQuery(options, QueryObserver, queryClient);
5
5
  }
package/dist/index.d.ts CHANGED
@@ -1,19 +1,19 @@
1
1
  export * from '@tanstack/query-core';
2
- export * from './types';
3
- export * from './context';
4
- export { createQuery } from './createQuery';
5
- export type { QueriesResults, QueriesOptions } from './createQueries';
6
- export type { DefinedInitialDataOptions, UndefinedInitialDataOptions, } from './queryOptions';
7
- export { queryOptions } from './queryOptions';
8
- export { createQueries } from './createQueries';
9
- export { createInfiniteQuery } from './createInfiniteQuery';
10
- export { infiniteQueryOptions } from './infiniteQueryOptions';
11
- export { createMutation } from './createMutation';
12
- export { useMutationState } from './useMutationState';
13
- export { useQueryClient } from './useQueryClient';
14
- export { useIsFetching } from './useIsFetching';
15
- export { useIsMutating } from './useIsMutating';
16
- export { useIsRestoring } from './useIsRestoring';
17
- export { useHydrate } from './useHydrate';
2
+ export * from './types.js';
3
+ export * from './context.js';
4
+ export { createQuery } from './createQuery.js';
5
+ export type { QueriesResults, QueriesOptions } from './createQueries.js';
6
+ export type { DefinedInitialDataOptions, UndefinedInitialDataOptions, } from './queryOptions.js';
7
+ export { queryOptions } from './queryOptions.js';
8
+ export { createQueries } from './createQueries.js';
9
+ export { createInfiniteQuery } from './createInfiniteQuery.js';
10
+ export { infiniteQueryOptions } from './infiniteQueryOptions.js';
11
+ export { createMutation } from './createMutation.js';
12
+ export { useMutationState } from './useMutationState.js';
13
+ export { useQueryClient } from './useQueryClient.js';
14
+ export { useIsFetching } from './useIsFetching.js';
15
+ export { useIsMutating } from './useIsMutating.js';
16
+ export { useIsRestoring } from './useIsRestoring.js';
17
+ export { useHydrate } from './useHydrate.js';
18
18
  export { default as HydrationBoundary } from './HydrationBoundary.svelte';
19
19
  export { default as QueryClientProvider } from './QueryClientProvider.svelte';
package/dist/index.js CHANGED
@@ -2,19 +2,19 @@
2
2
  // Re-export core
3
3
  export * from '@tanstack/query-core';
4
4
  // Svelte Query
5
- export * from './types';
6
- export * from './context';
7
- export { createQuery } from './createQuery';
8
- export { queryOptions } from './queryOptions';
9
- export { createQueries } from './createQueries';
10
- export { createInfiniteQuery } from './createInfiniteQuery';
11
- export { infiniteQueryOptions } from './infiniteQueryOptions';
12
- export { createMutation } from './createMutation';
13
- export { useMutationState } from './useMutationState';
14
- export { useQueryClient } from './useQueryClient';
15
- export { useIsFetching } from './useIsFetching';
16
- export { useIsMutating } from './useIsMutating';
17
- export { useIsRestoring } from './useIsRestoring';
18
- export { useHydrate } from './useHydrate';
5
+ export * from './types.js';
6
+ export * from './context.js';
7
+ export { createQuery } from './createQuery.js';
8
+ export { queryOptions } from './queryOptions.js';
9
+ export { createQueries } from './createQueries.js';
10
+ export { createInfiniteQuery } from './createInfiniteQuery.js';
11
+ export { infiniteQueryOptions } from './infiniteQueryOptions.js';
12
+ export { createMutation } from './createMutation.js';
13
+ export { useMutationState } from './useMutationState.js';
14
+ export { useQueryClient } from './useQueryClient.js';
15
+ export { useIsFetching } from './useIsFetching.js';
16
+ export { useIsMutating } from './useIsMutating.js';
17
+ export { useIsRestoring } from './useIsRestoring.js';
18
+ export { useHydrate } from './useHydrate.js';
19
19
  export { default as HydrationBoundary } from './HydrationBoundary.svelte';
20
20
  export { default as QueryClientProvider } from './QueryClientProvider.svelte';
@@ -1,3 +1,3 @@
1
1
  import type { DefaultError, InfiniteData, QueryKey } from '@tanstack/query-core';
2
- import type { CreateInfiniteQueryOptions } from './types';
2
+ import type { CreateInfiniteQueryOptions } from './types.js';
3
3
  export declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: CreateInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey, TPageParam>): CreateInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey, TPageParam>;
@@ -1,5 +1,5 @@
1
1
  import type { DataTag, DefaultError, QueryKey } from '@tanstack/query-core';
2
- import type { CreateQueryOptions } from './types';
2
+ import type { CreateQueryOptions } from './types.js';
3
3
  export type UndefinedInitialDataOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = CreateQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
4
4
  initialData?: undefined;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { hydrate, } from '@tanstack/query-core';
2
- import { useQueryClient } from './useQueryClient';
2
+ import { useQueryClient } from './useQueryClient.js';
3
3
  export function useHydrate(state, options, queryClient) {
4
4
  const client = useQueryClient(queryClient);
5
5
  if (state) {
@@ -1,6 +1,6 @@
1
1
  import { notifyManager, } from '@tanstack/query-core';
2
2
  import { readable } from 'svelte/store';
3
- import { useQueryClient } from './useQueryClient';
3
+ import { useQueryClient } from './useQueryClient.js';
4
4
  export function useIsFetching(filters, queryClient) {
5
5
  const client = useQueryClient(queryClient);
6
6
  const cache = client.getQueryCache();
@@ -1,6 +1,6 @@
1
1
  import { notifyManager, } from '@tanstack/query-core';
2
2
  import { readable } from 'svelte/store';
3
- import { useQueryClient } from './useQueryClient';
3
+ import { useQueryClient } from './useQueryClient.js';
4
4
  export function useIsMutating(filters, queryClient) {
5
5
  const client = useQueryClient(queryClient);
6
6
  const cache = client.getMutationCache();
@@ -1,4 +1,4 @@
1
- import { getIsRestoringContext } from './context';
1
+ import { getIsRestoringContext } from './context.js';
2
2
  export function useIsRestoring() {
3
3
  return getIsRestoringContext();
4
4
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="svelte" />
2
2
  import type { MutationState, QueryClient } from '@tanstack/query-core';
3
3
  import type { Readable } from 'svelte/store';
4
- import type { MutationStateOptions } from './types';
4
+ import type { MutationStateOptions } from './types.js';
5
5
  export declare function useMutationState<TResult = MutationState>(options?: MutationStateOptions<TResult>, queryClient?: QueryClient): Readable<Array<TResult>>;
@@ -1,6 +1,6 @@
1
1
  import { readable } from 'svelte/store';
2
2
  import { notifyManager, replaceEqualDeep } from '@tanstack/query-core';
3
- import { useQueryClient } from './useQueryClient';
3
+ import { useQueryClient } from './useQueryClient.js';
4
4
  function getResult(mutationCache, options) {
5
5
  return mutationCache
6
6
  .findAll(options.filters)
@@ -1,4 +1,4 @@
1
- import { getQueryClientContext } from './context';
1
+ import { getQueryClientContext } from './context.js';
2
2
  export function useQueryClient(queryClient) {
3
3
  if (queryClient)
4
4
  return queryClient;
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="svelte" />
2
2
  import type { Readable } from 'svelte/store';
3
- import type { StoreOrVal } from './types';
3
+ import type { StoreOrVal } from './types.js';
4
4
  export declare function isSvelteStore<T extends object>(obj: StoreOrVal<T>): obj is Readable<T>;
5
5
  export declare function noop(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/svelte-query",
3
- "version": "5.51.15",
3
+ "version": "5.51.16",
4
4
  "description": "Primitives for managing, caching and syncing asynchronous and remote data in Svelte",
5
5
  "author": "Lachlan Collins",
6
6
  "license": "MIT",
@@ -32,13 +32,13 @@
32
32
  "src"
33
33
  ],
34
34
  "dependencies": {
35
- "@tanstack/query-core": "5.51.15"
35
+ "@tanstack/query-core": "5.51.16"
36
36
  },
37
37
  "devDependencies": {
38
- "@sveltejs/package": "^2.3.1",
39
- "@sveltejs/vite-plugin-svelte": "^3.1.0",
40
- "@testing-library/svelte": "^5.1.0",
41
- "eslint-plugin-svelte": "^2.42.0",
38
+ "@sveltejs/package": "^2.3.2",
39
+ "@sveltejs/vite-plugin-svelte": "^3.1.1",
40
+ "@testing-library/svelte": "^5.2.1",
41
+ "eslint-plugin-svelte": "^2.43.0",
42
42
  "svelte": "^4.2.18",
43
43
  "svelte-check": "^3.8.4"
44
44
  },
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { useHydrate } from './useHydrate'
2
+ import { useHydrate } from './useHydrate.js'
3
3
  import type {
4
4
  DehydratedState,
5
5
  HydrateOptions,
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { onDestroy, onMount } from 'svelte'
3
3
  import { QueryClient } from '@tanstack/query-core'
4
- import { setQueryClientContext } from './context'
4
+ import { setQueryClientContext } from './context.js'
5
5
 
6
6
  export let client = new QueryClient()
7
7
 
@@ -1,8 +1,8 @@
1
1
  import { derived, get, readable } from 'svelte/store'
2
2
  import { notifyManager } from '@tanstack/query-core'
3
- import { useIsRestoring } from './useIsRestoring'
4
- import { useQueryClient } from './useQueryClient'
5
- import { isSvelteStore } from './utils'
3
+ import { useIsRestoring } from './useIsRestoring.js'
4
+ import { useQueryClient } from './useQueryClient.js'
5
+ import { isSvelteStore } from './utils.js'
6
6
  import type {
7
7
  QueryClient,
8
8
  QueryKey,
@@ -13,7 +13,7 @@ import type {
13
13
  CreateBaseQueryOptions,
14
14
  CreateBaseQueryResult,
15
15
  StoreOrVal,
16
- } from './types'
16
+ } from './types.js'
17
17
 
18
18
  export function createBaseQuery<
19
19
  TQueryFnData,
@@ -1,5 +1,5 @@
1
1
  import { InfiniteQueryObserver } from '@tanstack/query-core'
2
- import { createBaseQuery } from './createBaseQuery'
2
+ import { createBaseQuery } from './createBaseQuery.js'
3
3
  import type {
4
4
  DefaultError,
5
5
  InfiniteData,
@@ -11,7 +11,7 @@ import type {
11
11
  CreateInfiniteQueryOptions,
12
12
  CreateInfiniteQueryResult,
13
13
  StoreOrVal,
14
- } from './types'
14
+ } from './types.js'
15
15
 
16
16
  export function createInfiniteQuery<
17
17
  TQueryFnData,
@@ -1,13 +1,13 @@
1
1
  import { derived, get, readable } from 'svelte/store'
2
2
  import { MutationObserver, notifyManager } from '@tanstack/query-core'
3
- import { useQueryClient } from './useQueryClient'
4
- import { isSvelteStore, noop } from './utils'
3
+ import { useQueryClient } from './useQueryClient.js'
4
+ import { isSvelteStore, noop } from './utils.js'
5
5
  import type {
6
6
  CreateMutateFunction,
7
7
  CreateMutationOptions,
8
8
  CreateMutationResult,
9
9
  StoreOrVal,
10
- } from './types'
10
+ } from './types.js'
11
11
  import type { DefaultError, QueryClient } from '@tanstack/query-core'
12
12
 
13
13
  export function createMutation<
@@ -1,10 +1,10 @@
1
1
  import { QueriesObserver, notifyManager } from '@tanstack/query-core'
2
2
  import { derived, get, readable } from 'svelte/store'
3
- import { useIsRestoring } from './useIsRestoring'
4
- import { useQueryClient } from './useQueryClient'
5
- import { isSvelteStore } from './utils'
3
+ import { useIsRestoring } from './useIsRestoring.js'
4
+ import { useQueryClient } from './useQueryClient.js'
5
+ import { isSvelteStore } from './utils.js'
6
6
  import type { Readable } from 'svelte/store'
7
- import type { StoreOrVal } from './types'
7
+ import type { StoreOrVal } from './types.js'
8
8
  import type {
9
9
  DefaultError,
10
10
  DefinedQueryObserverResult,
@@ -1,16 +1,16 @@
1
1
  import { QueryObserver } from '@tanstack/query-core'
2
- import { createBaseQuery } from './createBaseQuery'
2
+ import { createBaseQuery } from './createBaseQuery.js'
3
3
  import type { DefaultError, QueryClient, QueryKey } from '@tanstack/query-core'
4
4
  import type {
5
5
  CreateQueryOptions,
6
6
  CreateQueryResult,
7
7
  DefinedCreateQueryResult,
8
8
  StoreOrVal,
9
- } from './types'
9
+ } from './types.js'
10
10
  import type {
11
11
  DefinedInitialDataOptions,
12
12
  UndefinedInitialDataOptions,
13
- } from './queryOptions'
13
+ } from './queryOptions.js'
14
14
 
15
15
  export function createQuery<
16
16
  TQueryFnData = unknown,
package/src/index.ts CHANGED
@@ -4,25 +4,25 @@
4
4
  export * from '@tanstack/query-core'
5
5
 
6
6
  // Svelte Query
7
- export * from './types'
8
- export * from './context'
7
+ export * from './types.js'
8
+ export * from './context.js'
9
9
 
10
- export { createQuery } from './createQuery'
11
- export type { QueriesResults, QueriesOptions } from './createQueries'
10
+ export { createQuery } from './createQuery.js'
11
+ export type { QueriesResults, QueriesOptions } from './createQueries.js'
12
12
  export type {
13
13
  DefinedInitialDataOptions,
14
14
  UndefinedInitialDataOptions,
15
- } from './queryOptions'
16
- export { queryOptions } from './queryOptions'
17
- export { createQueries } from './createQueries'
18
- export { createInfiniteQuery } from './createInfiniteQuery'
19
- export { infiniteQueryOptions } from './infiniteQueryOptions'
20
- export { createMutation } from './createMutation'
21
- export { useMutationState } from './useMutationState'
22
- export { useQueryClient } from './useQueryClient'
23
- export { useIsFetching } from './useIsFetching'
24
- export { useIsMutating } from './useIsMutating'
25
- export { useIsRestoring } from './useIsRestoring'
26
- export { useHydrate } from './useHydrate'
15
+ } from './queryOptions.js'
16
+ export { queryOptions } from './queryOptions.js'
17
+ export { createQueries } from './createQueries.js'
18
+ export { createInfiniteQuery } from './createInfiniteQuery.js'
19
+ export { infiniteQueryOptions } from './infiniteQueryOptions.js'
20
+ export { createMutation } from './createMutation.js'
21
+ export { useMutationState } from './useMutationState.js'
22
+ export { useQueryClient } from './useQueryClient.js'
23
+ export { useIsFetching } from './useIsFetching.js'
24
+ export { useIsMutating } from './useIsMutating.js'
25
+ export { useIsRestoring } from './useIsRestoring.js'
26
+ export { useHydrate } from './useHydrate.js'
27
27
  export { default as HydrationBoundary } from './HydrationBoundary.svelte'
28
28
  export { default as QueryClientProvider } from './QueryClientProvider.svelte'
@@ -1,5 +1,5 @@
1
1
  import type { DefaultError, InfiniteData, QueryKey } from '@tanstack/query-core'
2
- import type { CreateInfiniteQueryOptions } from './types'
2
+ import type { CreateInfiniteQueryOptions } from './types.js'
3
3
 
4
4
  export function infiniteQueryOptions<
5
5
  TQueryFnData,
@@ -1,5 +1,5 @@
1
1
  import type { DataTag, DefaultError, QueryKey } from '@tanstack/query-core'
2
- import type { CreateQueryOptions } from './types'
2
+ import type { CreateQueryOptions } from './types.js'
3
3
 
4
4
  export type UndefinedInitialDataOptions<
5
5
  TQueryFnData = unknown,
package/src/useHydrate.ts CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  type QueryClient,
4
4
  hydrate,
5
5
  } from '@tanstack/query-core'
6
- import { useQueryClient } from './useQueryClient'
6
+ import { useQueryClient } from './useQueryClient.js'
7
7
 
8
8
  export function useHydrate(
9
9
  state?: unknown,
@@ -4,7 +4,7 @@ import {
4
4
  notifyManager,
5
5
  } from '@tanstack/query-core'
6
6
  import { readable } from 'svelte/store'
7
- import { useQueryClient } from './useQueryClient'
7
+ import { useQueryClient } from './useQueryClient.js'
8
8
  import type { Readable } from 'svelte/store'
9
9
 
10
10
  export function useIsFetching(
@@ -4,7 +4,7 @@ import {
4
4
  notifyManager,
5
5
  } from '@tanstack/query-core'
6
6
  import { readable } from 'svelte/store'
7
- import { useQueryClient } from './useQueryClient'
7
+ import { useQueryClient } from './useQueryClient.js'
8
8
  import type { Readable } from 'svelte/store'
9
9
 
10
10
  export function useIsMutating(
@@ -1,4 +1,4 @@
1
- import { getIsRestoringContext } from './context'
1
+ import { getIsRestoringContext } from './context.js'
2
2
  import type { Readable } from 'svelte/store'
3
3
 
4
4
  export function useIsRestoring(): Readable<boolean> {
@@ -1,13 +1,13 @@
1
1
  import { readable } from 'svelte/store'
2
2
  import { notifyManager, replaceEqualDeep } from '@tanstack/query-core'
3
- import { useQueryClient } from './useQueryClient'
3
+ import { useQueryClient } from './useQueryClient.js'
4
4
  import type {
5
5
  MutationCache,
6
6
  MutationState,
7
7
  QueryClient,
8
8
  } from '@tanstack/query-core'
9
9
  import type { Readable } from 'svelte/store'
10
- import type { MutationStateOptions } from './types'
10
+ import type { MutationStateOptions } from './types.js'
11
11
 
12
12
  function getResult<TResult = MutationState>(
13
13
  mutationCache: MutationCache,
@@ -1,4 +1,4 @@
1
- import { getQueryClientContext } from './context'
1
+ import { getQueryClientContext } from './context.js'
2
2
  import type { QueryClient } from '@tanstack/query-core'
3
3
 
4
4
  export function useQueryClient(queryClient?: QueryClient): QueryClient {
package/src/utils.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Readable } from 'svelte/store'
2
- import type { StoreOrVal } from './types'
2
+ import type { StoreOrVal } from './types.js'
3
3
 
4
4
  export function isSvelteStore<T extends object>(
5
5
  obj: StoreOrVal<T>,