@tanstack/react-query 5.0.0-alpha.1 → 5.0.0-alpha.12

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 (111) hide show
  1. package/build/lib/HydrationBoundary.esm.js +1 -0
  2. package/build/lib/HydrationBoundary.esm.js.map +1 -1
  3. package/build/lib/HydrationBoundary.js +1 -0
  4. package/build/lib/HydrationBoundary.js.map +1 -1
  5. package/build/lib/HydrationBoundary.mjs +1 -0
  6. package/build/lib/HydrationBoundary.mjs.map +1 -1
  7. package/build/lib/QueryClientProvider.esm.js +1 -0
  8. package/build/lib/QueryClientProvider.esm.js.map +1 -1
  9. package/build/lib/QueryClientProvider.js +1 -0
  10. package/build/lib/QueryClientProvider.js.map +1 -1
  11. package/build/lib/QueryClientProvider.mjs +1 -0
  12. package/build/lib/QueryClientProvider.mjs.map +1 -1
  13. package/build/lib/QueryErrorResetBoundary.esm.js +1 -0
  14. package/build/lib/QueryErrorResetBoundary.esm.js.map +1 -1
  15. package/build/lib/QueryErrorResetBoundary.js +1 -0
  16. package/build/lib/QueryErrorResetBoundary.js.map +1 -1
  17. package/build/lib/QueryErrorResetBoundary.mjs +1 -0
  18. package/build/lib/QueryErrorResetBoundary.mjs.map +1 -1
  19. package/build/lib/__tests__/ssr.test.d.ts +0 -3
  20. package/build/lib/__tests__/utils.d.ts +2 -3
  21. package/build/lib/errorBoundaryUtils.esm.js +1 -0
  22. package/build/lib/errorBoundaryUtils.esm.js.map +1 -1
  23. package/build/lib/errorBoundaryUtils.js +1 -0
  24. package/build/lib/errorBoundaryUtils.js.map +1 -1
  25. package/build/lib/errorBoundaryUtils.mjs +1 -0
  26. package/build/lib/errorBoundaryUtils.mjs.map +1 -1
  27. package/build/lib/isRestoring.esm.js +1 -0
  28. package/build/lib/isRestoring.esm.js.map +1 -1
  29. package/build/lib/isRestoring.js +1 -0
  30. package/build/lib/isRestoring.js.map +1 -1
  31. package/build/lib/isRestoring.mjs +1 -0
  32. package/build/lib/isRestoring.mjs.map +1 -1
  33. package/build/lib/suspense.esm.js +5 -5
  34. package/build/lib/suspense.esm.js.map +1 -1
  35. package/build/lib/suspense.js +5 -5
  36. package/build/lib/suspense.js.map +1 -1
  37. package/build/lib/types.d.ts +14 -14
  38. package/build/lib/useBaseQuery.esm.js +1 -0
  39. package/build/lib/useBaseQuery.esm.js.map +1 -1
  40. package/build/lib/useBaseQuery.js +1 -0
  41. package/build/lib/useBaseQuery.js.map +1 -1
  42. package/build/lib/useBaseQuery.mjs +1 -0
  43. package/build/lib/useBaseQuery.mjs.map +1 -1
  44. package/build/lib/useInfiniteQuery.d.ts +2 -2
  45. package/build/lib/useInfiniteQuery.esm.js +1 -0
  46. package/build/lib/useInfiniteQuery.esm.js.map +1 -1
  47. package/build/lib/useInfiniteQuery.js +1 -0
  48. package/build/lib/useInfiniteQuery.js.map +1 -1
  49. package/build/lib/useInfiniteQuery.mjs +1 -0
  50. package/build/lib/useInfiniteQuery.mjs.map +1 -1
  51. package/build/lib/useIsFetching.esm.js +1 -0
  52. package/build/lib/useIsFetching.esm.js.map +1 -1
  53. package/build/lib/useIsFetching.js +1 -0
  54. package/build/lib/useIsFetching.js.map +1 -1
  55. package/build/lib/useIsFetching.mjs +1 -0
  56. package/build/lib/useIsFetching.mjs.map +1 -1
  57. package/build/lib/useMutation.d.ts +2 -2
  58. package/build/lib/useMutation.esm.js +1 -0
  59. package/build/lib/useMutation.esm.js.map +1 -1
  60. package/build/lib/useMutation.js +1 -0
  61. package/build/lib/useMutation.js.map +1 -1
  62. package/build/lib/useMutation.mjs +1 -0
  63. package/build/lib/useMutation.mjs.map +1 -1
  64. package/build/lib/useMutationState.d.ts +4 -4
  65. package/build/lib/useMutationState.esm.js +1 -0
  66. package/build/lib/useMutationState.esm.js.map +1 -1
  67. package/build/lib/useMutationState.js +1 -0
  68. package/build/lib/useMutationState.js.map +1 -1
  69. package/build/lib/useMutationState.mjs +1 -0
  70. package/build/lib/useMutationState.mjs.map +1 -1
  71. package/build/lib/useQueries.d.ts +5 -6
  72. package/build/lib/useQueries.esm.js +13 -10
  73. package/build/lib/useQueries.esm.js.map +1 -1
  74. package/build/lib/useQueries.js +13 -10
  75. package/build/lib/useQueries.js.map +1 -1
  76. package/build/lib/useQueries.mjs +3 -3
  77. package/build/lib/useQueries.mjs.map +1 -1
  78. package/build/lib/useQuery.d.ts +5 -5
  79. package/build/lib/useQuery.esm.js +1 -0
  80. package/build/lib/useQuery.esm.js.map +1 -1
  81. package/build/lib/useQuery.js +1 -0
  82. package/build/lib/useQuery.js.map +1 -1
  83. package/build/lib/useQuery.mjs +1 -0
  84. package/build/lib/useQuery.mjs.map +1 -1
  85. package/build/umd/index.development.js +79 -79
  86. package/build/umd/index.development.js.map +1 -1
  87. package/build/umd/index.production.js +1 -1
  88. package/build/umd/index.production.js.map +1 -1
  89. package/package.json +3 -3
  90. package/src/__tests__/HydrationBoundary.test.tsx +4 -3
  91. package/src/__tests__/QueryClientProvider.test.tsx +2 -1
  92. package/src/__tests__/QueryResetErrorBoundary.test.tsx +12 -11
  93. package/src/__tests__/ssr-hydration.test.tsx +11 -10
  94. package/src/__tests__/ssr.test.tsx +4 -7
  95. package/src/__tests__/suspense.test.tsx +14 -13
  96. package/src/__tests__/useInfiniteQuery.test.tsx +18 -16
  97. package/src/__tests__/useInfiniteQuery.type.test.tsx +110 -2
  98. package/src/__tests__/useMutation.test.tsx +21 -20
  99. package/src/__tests__/useMutationState.test.tsx +24 -58
  100. package/src/__tests__/useQueries.test.tsx +23 -81
  101. package/src/__tests__/useQuery.test.tsx +30 -36
  102. package/src/__tests__/utils.tsx +3 -2
  103. package/src/errorBoundaryUtils.ts +1 -0
  104. package/src/types.ts +14 -14
  105. package/src/useBaseQuery.ts +1 -0
  106. package/src/useInfiniteQuery.ts +3 -2
  107. package/src/useIsFetching.ts +1 -0
  108. package/src/useMutation.ts +3 -2
  109. package/src/useMutationState.ts +7 -6
  110. package/src/useQueries.ts +12 -10
  111. package/src/useQuery.ts +7 -10
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
  import { hydrate } from '@tanstack/query-core';
3
4
  import { useQueryClient } from './QueryClientProvider.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"HydrationBoundary.esm.js","sources":["../../src/HydrationBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { HydrateOptions, QueryClient } from '@tanstack/query-core'\nimport { hydrate } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\n\nexport interface HydrationBoundaryProps {\n state?: unknown\n options?: HydrateOptions\n children?: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport const HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient,\n}: HydrationBoundaryProps) => {\n const client = useQueryClient(queryClient)\n\n const optionsRef = React.useRef(options)\n optionsRef.current = options\n\n // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n React.useMemo(() => {\n if (state) {\n hydrate(client, state, optionsRef.current)\n }\n }, [client, state])\n\n return children as React.ReactElement\n}\n"],"names":["HydrationBoundary","children","options","state","queryClient","client","useQueryClient","optionsRef","React","useRef","current","useMemo","hydrate"],"mappings":";;;;AAcO,MAAMA,iBAAiB,GAAG,CAAC;EAChCC,QAAQ;EACRC,OAAO,GAAG,EAAE;EACZC,KAAK;AACLC,EAAAA,WAAAA;AACsB,CAAC,KAAK;AAC5B,EAAA,MAAMC,MAAM,GAAGC,cAAc,CAACF,WAAW,CAAC,CAAA;AAE1C,EAAA,MAAMG,UAAU,GAAGC,KAAK,CAACC,MAAM,CAACP,OAAO,CAAC,CAAA;EACxCK,UAAU,CAACG,OAAO,GAAGR,OAAO,CAAA;;AAE5B;AACA;AACA;AACA;EACAM,KAAK,CAACG,OAAO,CAAC,MAAM;AAClB,IAAA,IAAIR,KAAK,EAAE;MACTS,OAAO,CAACP,MAAM,EAAEF,KAAK,EAAEI,UAAU,CAACG,OAAO,CAAC,CAAA;AAC5C,KAAA;AACF,GAAC,EAAE,CAACL,MAAM,EAAEF,KAAK,CAAC,CAAC,CAAA;AAEnB,EAAA,OAAOF,QAAQ,CAAA;AACjB;;;;"}
1
+ {"version":3,"file":"HydrationBoundary.esm.js","sources":["../../src/HydrationBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { HydrateOptions, QueryClient } from '@tanstack/query-core'\nimport { hydrate } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\n\nexport interface HydrationBoundaryProps {\n state?: unknown\n options?: HydrateOptions\n children?: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport const HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient,\n}: HydrationBoundaryProps) => {\n const client = useQueryClient(queryClient)\n\n const optionsRef = React.useRef(options)\n optionsRef.current = options\n\n // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n React.useMemo(() => {\n if (state) {\n hydrate(client, state, optionsRef.current)\n }\n }, [client, state])\n\n return children as React.ReactElement\n}\n"],"names":["queryClient"],"mappings":";;;;;AAcO;;;;AAILA;AACsB;AACtB;AAEA;;;AAGA;AACA;AACA;AACA;;AAEE;;AAEA;AACF;AAEA;AACF;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  'use strict';
2
3
 
3
4
  var React = require('react');
@@ -1 +1 @@
1
- {"version":3,"file":"HydrationBoundary.js","sources":["../../src/HydrationBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { HydrateOptions, QueryClient } from '@tanstack/query-core'\nimport { hydrate } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\n\nexport interface HydrationBoundaryProps {\n state?: unknown\n options?: HydrateOptions\n children?: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport const HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient,\n}: HydrationBoundaryProps) => {\n const client = useQueryClient(queryClient)\n\n const optionsRef = React.useRef(options)\n optionsRef.current = options\n\n // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n React.useMemo(() => {\n if (state) {\n hydrate(client, state, optionsRef.current)\n }\n }, [client, state])\n\n return children as React.ReactElement\n}\n"],"names":["HydrationBoundary","children","options","state","queryClient","client","useQueryClient","optionsRef","React","useRef","current","useMemo","hydrate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAcO,MAAMA,iBAAiB,GAAG,CAAC;EAChCC,QAAQ;EACRC,OAAO,GAAG,EAAE;EACZC,KAAK;AACLC,EAAAA,WAAAA;AACsB,CAAC,KAAK;AAC5B,EAAA,MAAMC,MAAM,GAAGC,kCAAc,CAACF,WAAW,CAAC,CAAA;AAE1C,EAAA,MAAMG,UAAU,GAAGC,gBAAK,CAACC,MAAM,CAACP,OAAO,CAAC,CAAA;EACxCK,UAAU,CAACG,OAAO,GAAGR,OAAO,CAAA;;AAE5B;AACA;AACA;AACA;EACAM,gBAAK,CAACG,OAAO,CAAC,MAAM;AAClB,IAAA,IAAIR,KAAK,EAAE;MACTS,iBAAO,CAACP,MAAM,EAAEF,KAAK,EAAEI,UAAU,CAACG,OAAO,CAAC,CAAA;AAC5C,KAAA;AACF,GAAC,EAAE,CAACL,MAAM,EAAEF,KAAK,CAAC,CAAC,CAAA;AAEnB,EAAA,OAAOF,QAAQ,CAAA;AACjB;;;;"}
1
+ {"version":3,"file":"HydrationBoundary.js","sources":["../../src/HydrationBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { HydrateOptions, QueryClient } from '@tanstack/query-core'\nimport { hydrate } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\n\nexport interface HydrationBoundaryProps {\n state?: unknown\n options?: HydrateOptions\n children?: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport const HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient,\n}: HydrationBoundaryProps) => {\n const client = useQueryClient(queryClient)\n\n const optionsRef = React.useRef(options)\n optionsRef.current = options\n\n // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n React.useMemo(() => {\n if (state) {\n hydrate(client, state, optionsRef.current)\n }\n }, [client, state])\n\n return children as React.ReactElement\n}\n"],"names":["queryClient"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAcO;;;;AAILA;AACsB;AACtB;AAEA;;;AAGA;AACA;AACA;AACA;;AAEE;;AAEA;AACF;AAEA;AACF;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
  import { hydrate } from '@tanstack/query-core';
3
4
  import { useQueryClient } from './QueryClientProvider.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"HydrationBoundary.mjs","sources":["../../src/HydrationBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { HydrateOptions, QueryClient } from '@tanstack/query-core'\nimport { hydrate } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\n\nexport interface HydrationBoundaryProps {\n state?: unknown\n options?: HydrateOptions\n children?: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport const HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient,\n}: HydrationBoundaryProps) => {\n const client = useQueryClient(queryClient)\n\n const optionsRef = React.useRef(options)\n optionsRef.current = options\n\n // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n React.useMemo(() => {\n if (state) {\n hydrate(client, state, optionsRef.current)\n }\n }, [client, state])\n\n return children as React.ReactElement\n}\n"],"names":["HydrationBoundary","children","options","state","queryClient","client","useQueryClient","optionsRef","React","useRef","current","useMemo","hydrate"],"mappings":";;;;AAcO,MAAMA,iBAAiB,GAAG,CAAC;EAChCC,QAAQ;EACRC,OAAO,GAAG,EAAE;EACZC,KAAK;AACLC,EAAAA,WAAAA;AACsB,CAAC,KAAK;AAC5B,EAAA,MAAMC,MAAM,GAAGC,cAAc,CAACF,WAAW,CAAC,CAAA;AAE1C,EAAA,MAAMG,UAAU,GAAGC,KAAK,CAACC,MAAM,CAACP,OAAO,CAAC,CAAA;EACxCK,UAAU,CAACG,OAAO,GAAGR,OAAO,CAAA;;AAE5B;AACA;AACA;AACA;EACAM,KAAK,CAACG,OAAO,CAAC,MAAM;AAClB,IAAA,IAAIR,KAAK,EAAE;MACTS,OAAO,CAACP,MAAM,EAAEF,KAAK,EAAEI,UAAU,CAACG,OAAO,CAAC,CAAA;AAC5C,KAAA;AACF,GAAC,EAAE,CAACL,MAAM,EAAEF,KAAK,CAAC,CAAC,CAAA;AAEnB,EAAA,OAAOF,QAAQ,CAAA;AACjB;;;;"}
1
+ {"version":3,"file":"HydrationBoundary.mjs","sources":["../../src/HydrationBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { HydrateOptions, QueryClient } from '@tanstack/query-core'\nimport { hydrate } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\n\nexport interface HydrationBoundaryProps {\n state?: unknown\n options?: HydrateOptions\n children?: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport const HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient,\n}: HydrationBoundaryProps) => {\n const client = useQueryClient(queryClient)\n\n const optionsRef = React.useRef(options)\n optionsRef.current = options\n\n // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n React.useMemo(() => {\n if (state) {\n hydrate(client, state, optionsRef.current)\n }\n }, [client, state])\n\n return children as React.ReactElement\n}\n"],"names":["queryClient"],"mappings":";;;;;AAcO;;;;AAILA;AACsB;AACtB;AAEA;;;AAGA;AACA;AACA;AACA;;AAEE;;AAEA;AACF;AAEA;AACF;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
 
3
4
  const QueryClientContext = /*#__PURE__*/React.createContext(undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"QueryClientProvider.esm.js","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["QueryClientContext","React","createContext","undefined","useQueryClient","queryClient","client","useContext","Error","QueryClientProvider","children","useEffect","mount","unmount"],"mappings":";;AAKO,MAAMA,kBAAkB,gBAAGC,KAAK,CAACC,aAAa,CACnDC,SAAS,EACV;AAEYC,MAAAA,cAAc,GAAIC,WAAyB,IAAK;AAC3D,EAAA,MAAMC,MAAM,GAAGL,KAAK,CAACM,UAAU,CAACP,kBAAkB,CAAC,CAAA;AAEnD,EAAA,IAAIK,WAAW,EAAE;AACf,IAAA,OAAOA,WAAW,CAAA;AACpB,GAAA;EAEA,IAAI,CAACC,MAAM,EAAE;AACX,IAAA,MAAM,IAAIE,KAAK,CAAC,wDAAwD,CAAC,CAAA;AAC3E,GAAA;AAEA,EAAA,OAAOF,MAAM,CAAA;AACf,EAAC;AAOM,MAAMG,mBAAmB,GAAG,CAAC;EAClCH,MAAM;AACNI,EAAAA,QAAAA;AACwB,CAAC,KAAkB;EAC3CT,KAAK,CAACU,SAAS,CAAC,MAAM;IACpBL,MAAM,CAACM,KAAK,EAAE,CAAA;AACd,IAAA,OAAO,MAAM;MACXN,MAAM,CAACO,OAAO,EAAE,CAAA;KACjB,CAAA;AACH,GAAC,EAAE,CAACP,MAAM,CAAC,CAAC,CAAA;EAEZ,oBACE,KAAA,CAAA,aAAA,CAAC,kBAAkB,CAAC,QAAQ,EAAA;AAAC,IAAA,KAAK,EAAEA,MAAAA;AAAO,GAAA,EACxCI,QAAQ,CACmB,CAAA;AAElC;;;;"}
1
+ {"version":3,"file":"QueryClientProvider.esm.js","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["useQueryClient","children"],"mappings":";;;AAKO;AAIMA;AACX;AAEA;AACE;AACF;;AAGE;AACF;AAEA;AACF;AAOO;;AAELC;AACwB;;;AAGtB;;;AAGF;;AAG+B;AAAc;AAI/C;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  'use strict';
2
3
 
3
4
  var React = require('react');
@@ -1 +1 @@
1
- {"version":3,"file":"QueryClientProvider.js","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["QueryClientContext","React","createContext","undefined","useQueryClient","queryClient","client","useContext","Error","QueryClientProvider","children","useEffect","mount","unmount"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAKO,MAAMA,kBAAkB,gBAAGC,gBAAK,CAACC,aAAa,CACnDC,SAAS,EACV;AAEYC,MAAAA,cAAc,GAAIC,WAAyB,IAAK;AAC3D,EAAA,MAAMC,MAAM,GAAGL,gBAAK,CAACM,UAAU,CAACP,kBAAkB,CAAC,CAAA;AAEnD,EAAA,IAAIK,WAAW,EAAE;AACf,IAAA,OAAOA,WAAW,CAAA;AACpB,GAAA;EAEA,IAAI,CAACC,MAAM,EAAE;AACX,IAAA,MAAM,IAAIE,KAAK,CAAC,wDAAwD,CAAC,CAAA;AAC3E,GAAA;AAEA,EAAA,OAAOF,MAAM,CAAA;AACf,EAAC;AAOM,MAAMG,mBAAmB,GAAG,CAAC;EAClCH,MAAM;AACNI,EAAAA,QAAAA;AACwB,CAAC,KAAkB;EAC3CT,gBAAK,CAACU,SAAS,CAAC,MAAM;IACpBL,MAAM,CAACM,KAAK,EAAE,CAAA;AACd,IAAA,OAAO,MAAM;MACXN,MAAM,CAACO,OAAO,EAAE,CAAA;KACjB,CAAA;AACH,GAAC,EAAE,CAACP,MAAM,CAAC,CAAC,CAAA;EAEZ,oBACEL,gBAAA,CAAA,aAAA,CAAC,kBAAkB,CAAC,QAAQ,EAAA;AAAC,IAAA,KAAK,EAAEK,MAAAA;AAAO,GAAA,EACxCI,QAAQ,CACmB,CAAA;AAElC;;;;;;"}
1
+ {"version":3,"file":"QueryClientProvider.js","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["useQueryClient","children"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAKO;AAIMA;AACX;AAEA;AACE;AACF;;AAGE;AACF;AAEA;AACF;AAOO;;AAELC;AACwB;;;AAGtB;;;AAGF;;AAG+B;AAAc;AAI/C;;;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
 
3
4
  const QueryClientContext = /*#__PURE__*/React.createContext(undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"QueryClientProvider.mjs","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["QueryClientContext","React","createContext","undefined","useQueryClient","queryClient","client","useContext","Error","QueryClientProvider","children","useEffect","mount","unmount"],"mappings":";;AAKO,MAAMA,kBAAkB,gBAAGC,KAAK,CAACC,aAAa,CACnDC,SAAS,EACV;AAEYC,MAAAA,cAAc,GAAIC,WAAyB,IAAK;AAC3D,EAAA,MAAMC,MAAM,GAAGL,KAAK,CAACM,UAAU,CAACP,kBAAkB,CAAC,CAAA;AAEnD,EAAA,IAAIK,WAAW,EAAE;AACf,IAAA,OAAOA,WAAW,CAAA;AACpB,GAAA;EAEA,IAAI,CAACC,MAAM,EAAE;AACX,IAAA,MAAM,IAAIE,KAAK,CAAC,wDAAwD,CAAC,CAAA;AAC3E,GAAA;AAEA,EAAA,OAAOF,MAAM,CAAA;AACf,EAAC;AAOM,MAAMG,mBAAmB,GAAG,CAAC;EAClCH,MAAM;AACNI,EAAAA,QAAAA;AACwB,CAAC,KAAkB;EAC3CT,KAAK,CAACU,SAAS,CAAC,MAAM;IACpBL,MAAM,CAACM,KAAK,EAAE,CAAA;AACd,IAAA,OAAO,MAAM;MACXN,MAAM,CAACO,OAAO,EAAE,CAAA;KACjB,CAAA;AACH,GAAC,EAAE,CAACP,MAAM,CAAC,CAAC,CAAA;EAEZ,oBACE,KAAA,CAAA,aAAA,CAAC,kBAAkB,CAAC,QAAQ,EAAA;AAAC,IAAA,KAAK,EAAEA,MAAAA;AAAO,GAAA,EACxCI,QAAQ,CACmB,CAAA;AAElC;;;;"}
1
+ {"version":3,"file":"QueryClientProvider.mjs","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"names":["useQueryClient","children"],"mappings":";;;AAKO;AAIMA;AACX;AAEA;AACE;AACF;;AAGE;AACF;AAEA;AACF;AAOO;;AAELC;AACwB;;;AAGtB;;;AAGF;;AAG+B;AAAc;AAI/C;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
 
3
4
  // CONTEXT
@@ -1 +1 @@
1
- {"version":3,"file":"QueryErrorResetBoundary.esm.js","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["createValue","isReset","clearReset","reset","QueryErrorResetBoundaryContext","React","createContext","useQueryErrorResetBoundary","useContext","QueryErrorResetBoundary","children","value","useState"],"mappings":";;AAGA;;AAQA,SAASA,WAAW,GAAiC;EACnD,IAAIC,OAAO,GAAG,KAAK,CAAA;EACnB,OAAO;AACLC,IAAAA,UAAU,EAAE,MAAM;AAChBD,MAAAA,OAAO,GAAG,KAAK,CAAA;KAChB;AACDE,IAAAA,KAAK,EAAE,MAAM;AACXF,MAAAA,OAAO,GAAG,IAAI,CAAA;KACf;AACDA,IAAAA,OAAO,EAAE,MAAM;AACb,MAAA,OAAOA,OAAO,CAAA;AAChB,KAAA;GACD,CAAA;AACH,CAAA;AAEA,MAAMG,8BAA8B,gBAAGC,KAAK,CAACC,aAAa,CAACN,WAAW,EAAE,CAAC,CAAA;;AAEzE;;AAEO,MAAMO,0BAA0B,GAAG,MACxCF,KAAK,CAACG,UAAU,CAACJ,8BAA8B,EAAC;;AAElD;;AAQO,MAAMK,uBAAuB,GAAG,CAAC;AACtCC,EAAAA,QAAAA;AAC4B,CAAC,KAAK;EAClC,MAAM,CAACC,KAAK,CAAC,GAAGN,KAAK,CAACO,QAAQ,CAAC,MAAMZ,WAAW,EAAE,CAAC,CAAA;EACnD,oBACE,KAAA,CAAA,aAAA,CAAC,8BAA8B,CAAC,QAAQ,EAAA;AAAC,IAAA,KAAK,EAAEW,KAAAA;GAC7C,EAAA,OAAOD,QAAQ,KAAK,UAAU,GAC1BA,QAAQ,CAAcC,KAAK,CAAC,GAC7BD,QAAQ,CAC4B,CAAA;AAE9C;;;;"}
1
+ {"version":3,"file":"QueryErrorResetBoundary.esm.js","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["clearReset","isReset","reset","children"],"mappings":";;;AAGA;;AAQA;;;AAGIA;AACEC;;AAEFC;AACED;;AAEFA;AACE;AACF;;AAEJ;AAEA;;AAEA;;AAEO;;AAGP;;AAQO;AACLE;AAC4B;;;AAGe;;AAM7C;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  'use strict';
2
3
 
3
4
  var React = require('react');
@@ -1 +1 @@
1
- {"version":3,"file":"QueryErrorResetBoundary.js","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["createValue","isReset","clearReset","reset","QueryErrorResetBoundaryContext","React","createContext","useQueryErrorResetBoundary","useContext","QueryErrorResetBoundary","children","value","useState"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA;;AAQA,SAASA,WAAW,GAAiC;EACnD,IAAIC,OAAO,GAAG,KAAK,CAAA;EACnB,OAAO;AACLC,IAAAA,UAAU,EAAE,MAAM;AAChBD,MAAAA,OAAO,GAAG,KAAK,CAAA;KAChB;AACDE,IAAAA,KAAK,EAAE,MAAM;AACXF,MAAAA,OAAO,GAAG,IAAI,CAAA;KACf;AACDA,IAAAA,OAAO,EAAE,MAAM;AACb,MAAA,OAAOA,OAAO,CAAA;AAChB,KAAA;GACD,CAAA;AACH,CAAA;AAEA,MAAMG,8BAA8B,gBAAGC,gBAAK,CAACC,aAAa,CAACN,WAAW,EAAE,CAAC,CAAA;;AAEzE;;AAEO,MAAMO,0BAA0B,GAAG,MACxCF,gBAAK,CAACG,UAAU,CAACJ,8BAA8B,EAAC;;AAElD;;AAQO,MAAMK,uBAAuB,GAAG,CAAC;AACtCC,EAAAA,QAAAA;AAC4B,CAAC,KAAK;EAClC,MAAM,CAACC,KAAK,CAAC,GAAGN,gBAAK,CAACO,QAAQ,CAAC,MAAMZ,WAAW,EAAE,CAAC,CAAA;EACnD,oBACEK,gBAAA,CAAA,aAAA,CAAC,8BAA8B,CAAC,QAAQ,EAAA;AAAC,IAAA,KAAK,EAAEM,KAAAA;GAC7C,EAAA,OAAOD,QAAQ,KAAK,UAAU,GAC1BA,QAAQ,CAAcC,KAAK,CAAC,GAC7BD,QAAQ,CAC4B,CAAA;AAE9C;;;;;"}
1
+ {"version":3,"file":"QueryErrorResetBoundary.js","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["clearReset","isReset","reset","children"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGA;;AAQA;;;AAGIA;AACEC;;AAEFC;AACED;;AAEFA;AACE;AACF;;AAEJ;AAEA;;AAEA;;AAEO;;AAGP;;AAQO;AACLE;AAC4B;;;AAGe;;AAM7C;;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
 
3
4
  // CONTEXT
@@ -1 +1 @@
1
- {"version":3,"file":"QueryErrorResetBoundary.mjs","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["createValue","isReset","clearReset","reset","QueryErrorResetBoundaryContext","React","createContext","useQueryErrorResetBoundary","useContext","QueryErrorResetBoundary","children","value","useState"],"mappings":";;AAGA;;AAQA,SAASA,WAAW,GAAiC;EACnD,IAAIC,OAAO,GAAG,KAAK,CAAA;EACnB,OAAO;AACLC,IAAAA,UAAU,EAAE,MAAM;AAChBD,MAAAA,OAAO,GAAG,KAAK,CAAA;KAChB;AACDE,IAAAA,KAAK,EAAE,MAAM;AACXF,MAAAA,OAAO,GAAG,IAAI,CAAA;KACf;AACDA,IAAAA,OAAO,EAAE,MAAM;AACb,MAAA,OAAOA,OAAO,CAAA;AAChB,KAAA;GACD,CAAA;AACH,CAAA;AAEA,MAAMG,8BAA8B,gBAAGC,KAAK,CAACC,aAAa,CAACN,WAAW,EAAE,CAAC,CAAA;;AAEzE;;AAEO,MAAMO,0BAA0B,GAAG,MACxCF,KAAK,CAACG,UAAU,CAACJ,8BAA8B,EAAC;;AAElD;;AAQO,MAAMK,uBAAuB,GAAG,CAAC;AACtCC,EAAAA,QAAAA;AAC4B,CAAC,KAAK;EAClC,MAAM,CAACC,KAAK,CAAC,GAAGN,KAAK,CAACO,QAAQ,CAAC,MAAMZ,WAAW,EAAE,CAAC,CAAA;EACnD,oBACE,KAAA,CAAA,aAAA,CAAC,8BAA8B,CAAC,QAAQ,EAAA;AAAC,IAAA,KAAK,EAAEW,KAAAA;GAC7C,EAAA,OAAOD,QAAQ,KAAK,UAAU,GAC1BA,QAAQ,CAAcC,KAAK,CAAC,GAC7BD,QAAQ,CAC4B,CAAA;AAE9C;;;;"}
1
+ {"version":3,"file":"QueryErrorResetBoundary.mjs","sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: () => void\n isReset: () => boolean\n reset: () => void\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport interface QueryErrorResetBoundaryProps {\n children:\n | ((value: QueryErrorResetBoundaryValue) => React.ReactNode)\n | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function'\n ? (children as Function)(value)\n : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"names":["clearReset","isReset","reset","children"],"mappings":";;;AAGA;;AAQA;;;AAGIA;AACEC;;AAEFC;AACED;;AAEFA;AACE;AACF;;AAEJ;AAEA;;AAEA;;AAEO;;AAGP;;AAQO;AACLE;AAC4B;;;AAGe;;AAM7C;;"}
@@ -1,4 +1 @@
1
- /**
2
- * @jest-environment node
3
- */
4
1
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="jest" />
2
1
  /// <reference types="node" />
3
2
  import * as React from 'react';
4
3
  import { render } from '@testing-library/react';
@@ -10,8 +9,8 @@ export declare const Blink: ({ duration, children, }: {
10
9
  children: React.ReactNode;
11
10
  }) => JSX.Element;
12
11
  export declare function createQueryClient(config?: QueryClientConfig): QueryClient;
13
- export declare function mockVisibilityState(value: DocumentVisibilityState): jest.SpyInstance<DocumentVisibilityState, [], any>;
14
- export declare function mockNavigatorOnLine(value: boolean): jest.SpyInstance<boolean, [], any>;
12
+ export declare function mockVisibilityState(value: DocumentVisibilityState): import("vitest/dist/index-1cfc7f58").S<[], DocumentVisibilityState>;
13
+ export declare function mockNavigatorOnLine(value: boolean): import("vitest/dist/index-1cfc7f58").S<[], boolean>;
15
14
  export declare function queryKey(): Array<string>;
16
15
  export declare function sleep(timeout: number): Promise<void>;
17
16
  export declare function setActTimeout(fn: () => void, ms?: number): NodeJS.Timeout;
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
  import { shouldThrowError } from './utils.esm.js';
3
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"errorBoundaryUtils.esm.js","sources":["../../src/errorBoundaryUtils.ts"],"sourcesContent":["import type {\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserverResult,\n ThrowErrors,\n} from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\nimport * as React from 'react'\nimport { shouldThrowError } from './utils'\n\nexport const ensurePreventErrorBoundaryRetry = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n if (options.suspense || options.throwErrors) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false\n }\n }\n}\n\nexport const useClearResetErrorBoundary = (\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n React.useEffect(() => {\n errorResetBoundary.clearReset()\n }, [errorResetBoundary])\n}\n\nexport const getHasError = <\n TData,\n TError,\n TQueryFnData,\n TQueryData,\n TQueryKey extends QueryKey,\n>({\n result,\n errorResetBoundary,\n throwErrors,\n query,\n}: {\n result: QueryObserverResult<TData, TError>\n errorResetBoundary: QueryErrorResetBoundaryValue\n throwErrors: ThrowErrors<TQueryFnData, TError, TQueryData, TQueryKey>\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>\n}) => {\n return (\n result.isError &&\n !errorResetBoundary.isReset() &&\n !result.isFetching &&\n shouldThrowError(throwErrors, [result.error, query])\n )\n}\n"],"names":["ensurePreventErrorBoundaryRetry","options","errorResetBoundary","suspense","throwErrors","isReset","retryOnMount","useClearResetErrorBoundary","React","useEffect","clearReset","getHasError","result","query","isError","isFetching","shouldThrowError","error"],"mappings":";;;MAWaA,+BAA+B,GAAG,CAO7CC,OAMC,EACDC,kBAAgD,KAC7C;AACH,EAAA,IAAID,OAAO,CAACE,QAAQ,IAAIF,OAAO,CAACG,WAAW,EAAE;AAC3C;AACA,IAAA,IAAI,CAACF,kBAAkB,CAACG,OAAO,EAAE,EAAE;MACjCJ,OAAO,CAACK,YAAY,GAAG,KAAK,CAAA;AAC9B,KAAA;AACF,GAAA;AACF,EAAC;AAEYC,MAAAA,0BAA0B,GACrCL,kBAAgD,IAC7C;EACHM,KAAK,CAACC,SAAS,CAAC,MAAM;IACpBP,kBAAkB,CAACQ,UAAU,EAAE,CAAA;AACjC,GAAC,EAAE,CAACR,kBAAkB,CAAC,CAAC,CAAA;AAC1B,EAAC;AAEM,MAAMS,WAAW,GAAG,CAMzB;EACAC,MAAM;EACNV,kBAAkB;EAClBE,WAAW;AACXS,EAAAA,KAAAA;AAMF,CAAC,KAAK;EACJ,OACED,MAAM,CAACE,OAAO,IACd,CAACZ,kBAAkB,CAACG,OAAO,EAAE,IAC7B,CAACO,MAAM,CAACG,UAAU,IAClBC,gBAAgB,CAACZ,WAAW,EAAE,CAACQ,MAAM,CAACK,KAAK,EAAEJ,KAAK,CAAC,CAAC,CAAA;AAExD;;;;"}
1
+ {"version":3,"file":"errorBoundaryUtils.esm.js","sources":["../../src/errorBoundaryUtils.ts"],"sourcesContent":["'use client'\nimport type {\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserverResult,\n ThrowErrors,\n} from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\nimport * as React from 'react'\nimport { shouldThrowError } from './utils'\n\nexport const ensurePreventErrorBoundaryRetry = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n if (options.suspense || options.throwErrors) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false\n }\n }\n}\n\nexport const useClearResetErrorBoundary = (\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n React.useEffect(() => {\n errorResetBoundary.clearReset()\n }, [errorResetBoundary])\n}\n\nexport const getHasError = <\n TData,\n TError,\n TQueryFnData,\n TQueryData,\n TQueryKey extends QueryKey,\n>({\n result,\n errorResetBoundary,\n throwErrors,\n query,\n}: {\n result: QueryObserverResult<TData, TError>\n errorResetBoundary: QueryErrorResetBoundaryValue\n throwErrors: ThrowErrors<TQueryFnData, TError, TQueryData, TQueryKey>\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>\n}) => {\n return (\n result.isError &&\n !errorResetBoundary.isReset() &&\n !result.isFetching &&\n shouldThrowError(throwErrors, [result.error, query])\n )\n}\n"],"names":["useClearResetErrorBoundary","query"],"mappings":";;;;;AA4BE;AACE;AACA;;AAEA;AACF;AACF;AAEaA;;;AAKX;AACF;AAEO;;;;AAULC;AAMF;;AAOA;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  'use strict';
2
3
 
3
4
  var React = require('react');
@@ -1 +1 @@
1
- {"version":3,"file":"errorBoundaryUtils.js","sources":["../../src/errorBoundaryUtils.ts"],"sourcesContent":["import type {\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserverResult,\n ThrowErrors,\n} from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\nimport * as React from 'react'\nimport { shouldThrowError } from './utils'\n\nexport const ensurePreventErrorBoundaryRetry = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n if (options.suspense || options.throwErrors) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false\n }\n }\n}\n\nexport const useClearResetErrorBoundary = (\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n React.useEffect(() => {\n errorResetBoundary.clearReset()\n }, [errorResetBoundary])\n}\n\nexport const getHasError = <\n TData,\n TError,\n TQueryFnData,\n TQueryData,\n TQueryKey extends QueryKey,\n>({\n result,\n errorResetBoundary,\n throwErrors,\n query,\n}: {\n result: QueryObserverResult<TData, TError>\n errorResetBoundary: QueryErrorResetBoundaryValue\n throwErrors: ThrowErrors<TQueryFnData, TError, TQueryData, TQueryKey>\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>\n}) => {\n return (\n result.isError &&\n !errorResetBoundary.isReset() &&\n !result.isFetching &&\n shouldThrowError(throwErrors, [result.error, query])\n )\n}\n"],"names":["ensurePreventErrorBoundaryRetry","options","errorResetBoundary","suspense","throwErrors","isReset","retryOnMount","useClearResetErrorBoundary","React","useEffect","clearReset","getHasError","result","query","isError","isFetching","shouldThrowError","error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;MAWaA,+BAA+B,GAAG,CAO7CC,OAMC,EACDC,kBAAgD,KAC7C;AACH,EAAA,IAAID,OAAO,CAACE,QAAQ,IAAIF,OAAO,CAACG,WAAW,EAAE;AAC3C;AACA,IAAA,IAAI,CAACF,kBAAkB,CAACG,OAAO,EAAE,EAAE;MACjCJ,OAAO,CAACK,YAAY,GAAG,KAAK,CAAA;AAC9B,KAAA;AACF,GAAA;AACF,EAAC;AAEYC,MAAAA,0BAA0B,GACrCL,kBAAgD,IAC7C;EACHM,gBAAK,CAACC,SAAS,CAAC,MAAM;IACpBP,kBAAkB,CAACQ,UAAU,EAAE,CAAA;AACjC,GAAC,EAAE,CAACR,kBAAkB,CAAC,CAAC,CAAA;AAC1B,EAAC;AAEM,MAAMS,WAAW,GAAG,CAMzB;EACAC,MAAM;EACNV,kBAAkB;EAClBE,WAAW;AACXS,EAAAA,KAAAA;AAMF,CAAC,KAAK;EACJ,OACED,MAAM,CAACE,OAAO,IACd,CAACZ,kBAAkB,CAACG,OAAO,EAAE,IAC7B,CAACO,MAAM,CAACG,UAAU,IAClBC,sBAAgB,CAACZ,WAAW,EAAE,CAACQ,MAAM,CAACK,KAAK,EAAEJ,KAAK,CAAC,CAAC,CAAA;AAExD;;;;;;"}
1
+ {"version":3,"file":"errorBoundaryUtils.js","sources":["../../src/errorBoundaryUtils.ts"],"sourcesContent":["'use client'\nimport type {\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserverResult,\n ThrowErrors,\n} from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\nimport * as React from 'react'\nimport { shouldThrowError } from './utils'\n\nexport const ensurePreventErrorBoundaryRetry = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n if (options.suspense || options.throwErrors) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false\n }\n }\n}\n\nexport const useClearResetErrorBoundary = (\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n React.useEffect(() => {\n errorResetBoundary.clearReset()\n }, [errorResetBoundary])\n}\n\nexport const getHasError = <\n TData,\n TError,\n TQueryFnData,\n TQueryData,\n TQueryKey extends QueryKey,\n>({\n result,\n errorResetBoundary,\n throwErrors,\n query,\n}: {\n result: QueryObserverResult<TData, TError>\n errorResetBoundary: QueryErrorResetBoundaryValue\n throwErrors: ThrowErrors<TQueryFnData, TError, TQueryData, TQueryKey>\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>\n}) => {\n return (\n result.isError &&\n !errorResetBoundary.isReset() &&\n !result.isFetching &&\n shouldThrowError(throwErrors, [result.error, query])\n )\n}\n"],"names":["useClearResetErrorBoundary","query"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA4BE;AACE;AACA;;AAEA;AACF;AACF;AAEaA;;;AAKX;AACF;AAEO;;;;AAULC;AAMF;;AAOA;;;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
  import { shouldThrowError } from './utils.mjs';
3
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"errorBoundaryUtils.mjs","sources":["../../src/errorBoundaryUtils.ts"],"sourcesContent":["import type {\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserverResult,\n ThrowErrors,\n} from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\nimport * as React from 'react'\nimport { shouldThrowError } from './utils'\n\nexport const ensurePreventErrorBoundaryRetry = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n if (options.suspense || options.throwErrors) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false\n }\n }\n}\n\nexport const useClearResetErrorBoundary = (\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n React.useEffect(() => {\n errorResetBoundary.clearReset()\n }, [errorResetBoundary])\n}\n\nexport const getHasError = <\n TData,\n TError,\n TQueryFnData,\n TQueryData,\n TQueryKey extends QueryKey,\n>({\n result,\n errorResetBoundary,\n throwErrors,\n query,\n}: {\n result: QueryObserverResult<TData, TError>\n errorResetBoundary: QueryErrorResetBoundaryValue\n throwErrors: ThrowErrors<TQueryFnData, TError, TQueryData, TQueryKey>\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>\n}) => {\n return (\n result.isError &&\n !errorResetBoundary.isReset() &&\n !result.isFetching &&\n shouldThrowError(throwErrors, [result.error, query])\n )\n}\n"],"names":["ensurePreventErrorBoundaryRetry","options","errorResetBoundary","suspense","throwErrors","isReset","retryOnMount","useClearResetErrorBoundary","React","useEffect","clearReset","getHasError","result","query","isError","isFetching","shouldThrowError","error"],"mappings":";;;MAWaA,+BAA+B,GAAG,CAO7CC,OAMC,EACDC,kBAAgD,KAC7C;AACH,EAAA,IAAID,OAAO,CAACE,QAAQ,IAAIF,OAAO,CAACG,WAAW,EAAE;AAC3C;AACA,IAAA,IAAI,CAACF,kBAAkB,CAACG,OAAO,EAAE,EAAE;MACjCJ,OAAO,CAACK,YAAY,GAAG,KAAK,CAAA;AAC9B,KAAA;AACF,GAAA;AACF,EAAC;AAEYC,MAAAA,0BAA0B,GACrCL,kBAAgD,IAC7C;EACHM,KAAK,CAACC,SAAS,CAAC,MAAM;IACpBP,kBAAkB,CAACQ,UAAU,EAAE,CAAA;AACjC,GAAC,EAAE,CAACR,kBAAkB,CAAC,CAAC,CAAA;AAC1B,EAAC;AAEM,MAAMS,WAAW,GAAG,CAMzB;EACAC,MAAM;EACNV,kBAAkB;EAClBE,WAAW;AACXS,EAAAA,KAAAA;AAMF,CAAC,KAAK;EACJ,OACED,MAAM,CAACE,OAAO,IACd,CAACZ,kBAAkB,CAACG,OAAO,EAAE,IAC7B,CAACO,MAAM,CAACG,UAAU,IAClBC,gBAAgB,CAACZ,WAAW,EAAE,CAACQ,MAAM,CAACK,KAAK,EAAEJ,KAAK,CAAC,CAAC,CAAA;AAExD;;;;"}
1
+ {"version":3,"file":"errorBoundaryUtils.mjs","sources":["../../src/errorBoundaryUtils.ts"],"sourcesContent":["'use client'\nimport type {\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserverResult,\n ThrowErrors,\n} from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\nimport * as React from 'react'\nimport { shouldThrowError } from './utils'\n\nexport const ensurePreventErrorBoundaryRetry = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n if (options.suspense || options.throwErrors) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false\n }\n }\n}\n\nexport const useClearResetErrorBoundary = (\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n React.useEffect(() => {\n errorResetBoundary.clearReset()\n }, [errorResetBoundary])\n}\n\nexport const getHasError = <\n TData,\n TError,\n TQueryFnData,\n TQueryData,\n TQueryKey extends QueryKey,\n>({\n result,\n errorResetBoundary,\n throwErrors,\n query,\n}: {\n result: QueryObserverResult<TData, TError>\n errorResetBoundary: QueryErrorResetBoundaryValue\n throwErrors: ThrowErrors<TQueryFnData, TError, TQueryData, TQueryKey>\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey>\n}) => {\n return (\n result.isError &&\n !errorResetBoundary.isReset() &&\n !result.isFetching &&\n shouldThrowError(throwErrors, [result.error, query])\n )\n}\n"],"names":["useClearResetErrorBoundary","query"],"mappings":";;;;;AA4BE;AACE;AACA;;AAEA;AACF;AACF;AAEaA;;;AAKX;AACF;AAEO;;;;AAULC;AAMF;;AAOA;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
 
3
4
  const IsRestoringContext = /*#__PURE__*/React.createContext(false);
@@ -1 +1 @@
1
- {"version":3,"file":"isRestoring.esm.js","sources":["../../src/isRestoring.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nconst IsRestoringContext = React.createContext(false)\n\nexport const useIsRestoring = () => React.useContext(IsRestoringContext)\nexport const IsRestoringProvider = IsRestoringContext.Provider\n"],"names":["IsRestoringContext","React","createContext","useIsRestoring","useContext","IsRestoringProvider","Provider"],"mappings":";;AAGA,MAAMA,kBAAkB,gBAAGC,KAAK,CAACC,aAAa,CAAC,KAAK,CAAC,CAAA;AAE9C,MAAMC,cAAc,GAAG,MAAMF,KAAK,CAACG,UAAU,CAACJ,kBAAkB,EAAC;AAC3DK,MAAAA,mBAAmB,GAAGL,kBAAkB,CAACM;;;;"}
1
+ {"version":3,"file":"isRestoring.esm.js","sources":["../../src/isRestoring.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nconst IsRestoringContext = React.createContext(false)\n\nexport const useIsRestoring = () => React.useContext(IsRestoringContext)\nexport const IsRestoringProvider = IsRestoringContext.Provider\n"],"names":["IsRestoringProvider"],"mappings":";;;AAGA;AAEO;AACMA;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  'use strict';
2
3
 
3
4
  var React = require('react');
@@ -1 +1 @@
1
- {"version":3,"file":"isRestoring.js","sources":["../../src/isRestoring.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nconst IsRestoringContext = React.createContext(false)\n\nexport const useIsRestoring = () => React.useContext(IsRestoringContext)\nexport const IsRestoringProvider = IsRestoringContext.Provider\n"],"names":["IsRestoringContext","React","createContext","useIsRestoring","useContext","IsRestoringProvider","Provider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAMA,kBAAkB,gBAAGC,gBAAK,CAACC,aAAa,CAAC,KAAK,CAAC,CAAA;AAE9C,MAAMC,cAAc,GAAG,MAAMF,gBAAK,CAACG,UAAU,CAACJ,kBAAkB,EAAC;AAC3DK,MAAAA,mBAAmB,GAAGL,kBAAkB,CAACM;;;;;"}
1
+ {"version":3,"file":"isRestoring.js","sources":["../../src/isRestoring.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nconst IsRestoringContext = React.createContext(false)\n\nexport const useIsRestoring = () => React.useContext(IsRestoringContext)\nexport const IsRestoringProvider = IsRestoringContext.Provider\n"],"names":["IsRestoringProvider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGA;AAEO;AACMA;;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
 
3
4
  const IsRestoringContext = /*#__PURE__*/React.createContext(false);
@@ -1 +1 @@
1
- {"version":3,"file":"isRestoring.mjs","sources":["../../src/isRestoring.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nconst IsRestoringContext = React.createContext(false)\n\nexport const useIsRestoring = () => React.useContext(IsRestoringContext)\nexport const IsRestoringProvider = IsRestoringContext.Provider\n"],"names":["IsRestoringContext","React","createContext","useIsRestoring","useContext","IsRestoringProvider","Provider"],"mappings":";;AAGA,MAAMA,kBAAkB,gBAAGC,KAAK,CAACC,aAAa,CAAC,KAAK,CAAC,CAAA;AAE9C,MAAMC,cAAc,GAAG,MAAMF,KAAK,CAACG,UAAU,CAACJ,kBAAkB,EAAC;AAC3DK,MAAAA,mBAAmB,GAAGL,kBAAkB,CAACM;;;;"}
1
+ {"version":3,"file":"isRestoring.mjs","sources":["../../src/isRestoring.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nconst IsRestoringContext = React.createContext(false)\n\nexport const useIsRestoring = () => React.useContext(IsRestoringContext)\nexport const IsRestoringProvider = IsRestoringContext.Provider\n"],"names":["IsRestoringProvider"],"mappings":";;;AAGA;AAEO;AACMA;;"}
@@ -8,16 +8,16 @@ const ensureStaleTime = defaultedOptions => {
8
8
  }
9
9
  };
10
10
  const willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
11
- const shouldSuspend = (defaultedOptions, result, isRestoring) => defaultedOptions?.suspense && willFetch(result, isRestoring);
11
+ const shouldSuspend = (defaultedOptions, result, isRestoring) => (defaultedOptions == null ? void 0 : defaultedOptions.suspense) && willFetch(result, isRestoring);
12
12
  const fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).then(({
13
13
  data
14
14
  }) => {
15
- defaultedOptions.onSuccess?.(data);
16
- defaultedOptions.onSettled?.(data, null);
15
+ defaultedOptions.onSuccess == null ? void 0 : defaultedOptions.onSuccess(data);
16
+ defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(data, null);
17
17
  }).catch(error => {
18
18
  errorResetBoundary.clearReset();
19
- defaultedOptions.onError?.(error);
20
- defaultedOptions.onSettled?.(undefined, error);
19
+ defaultedOptions.onError == null ? void 0 : defaultedOptions.onError(error);
20
+ defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(undefined, error);
21
21
  });
22
22
 
23
23
  export { ensureStaleTime, fetchOptimistic, shouldSuspend, willFetch };
@@ -1 +1 @@
1
- {"version":3,"file":"suspense.esm.js","sources":["../../src/suspense.ts"],"sourcesContent":["import type { DefaultedQueryObserverOptions } from '@tanstack/query-core'\nimport type { QueryObserver } from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\nimport type { QueryObserverResult } from '@tanstack/query-core'\nimport type { QueryKey } from '@tanstack/query-core'\n\nexport const ensureStaleTime = (\n defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any>,\n) => {\n if (defaultedOptions.suspense) {\n // Always set stale time when using suspense to prevent\n // fetching again when directly mounting after suspending\n if (typeof defaultedOptions.staleTime !== 'number') {\n defaultedOptions.staleTime = 1000\n }\n }\n}\n\nexport const willFetch = (\n result: QueryObserverResult<any, any>,\n isRestoring: boolean,\n) => result.isLoading && result.isFetching && !isRestoring\n\nexport const shouldSuspend = (\n defaultedOptions:\n | DefaultedQueryObserverOptions<any, any, any, any, any>\n | undefined,\n result: QueryObserverResult<any, any>,\n isRestoring: boolean,\n) => defaultedOptions?.suspense && willFetch(result, isRestoring)\n\nexport const fetchOptimistic = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n defaultedOptions: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n observer: QueryObserver<TQueryFnData, TError, TData, TQueryData, TQueryKey>,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) =>\n observer\n .fetchOptimistic(defaultedOptions)\n .then(({ data }) => {\n defaultedOptions.onSuccess?.(data as TData)\n defaultedOptions.onSettled?.(data, null)\n })\n .catch((error) => {\n errorResetBoundary.clearReset()\n defaultedOptions.onError?.(error)\n defaultedOptions.onSettled?.(undefined, error)\n })\n"],"names":["ensureStaleTime","defaultedOptions","suspense","staleTime","willFetch","result","isRestoring","isLoading","isFetching","shouldSuspend","fetchOptimistic","observer","errorResetBoundary","then","data","onSuccess","onSettled","catch","error","clearReset","onError","undefined"],"mappings":"AAMaA,MAAAA,eAAe,GAC1BC,gBAAwE,IACrE;EACH,IAAIA,gBAAgB,CAACC,QAAQ,EAAE;AAC7B;AACA;AACA,IAAA,IAAI,OAAOD,gBAAgB,CAACE,SAAS,KAAK,QAAQ,EAAE;MAClDF,gBAAgB,CAACE,SAAS,GAAG,IAAI,CAAA;AACnC,KAAA;AACF,GAAA;AACF,EAAC;MAEYC,SAAS,GAAG,CACvBC,MAAqC,EACrCC,WAAoB,KACjBD,MAAM,CAACE,SAAS,IAAIF,MAAM,CAACG,UAAU,IAAI,CAACF,YAAW;MAE7CG,aAAa,GAAG,CAC3BR,gBAEa,EACbI,MAAqC,EACrCC,WAAoB,KACjBL,gBAAgB,EAAEC,QAAQ,IAAIE,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAC;MAEpDI,eAAe,GAAG,CAO7BT,gBAMC,EACDU,QAA2E,EAC3EC,kBAAgD,KAEhDD,QAAQ,CACLD,eAAe,CAACT,gBAAgB,CAAC,CACjCY,IAAI,CAAC,CAAC;AAAEC,EAAAA,IAAAA;AAAK,CAAC,KAAK;AAClBb,EAAAA,gBAAgB,CAACc,SAAS,GAAGD,IAAI,CAAU,CAAA;AAC3Cb,EAAAA,gBAAgB,CAACe,SAAS,GAAGF,IAAI,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAC,CACDG,KAAK,CAAEC,KAAK,IAAK;EAChBN,kBAAkB,CAACO,UAAU,EAAE,CAAA;AAC/BlB,EAAAA,gBAAgB,CAACmB,OAAO,GAAGF,KAAK,CAAC,CAAA;AACjCjB,EAAAA,gBAAgB,CAACe,SAAS,GAAGK,SAAS,EAAEH,KAAK,CAAC,CAAA;AAChD,CAAC;;;;"}
1
+ {"version":3,"file":"suspense.esm.js","sources":["../../src/suspense.ts"],"sourcesContent":["import type { DefaultedQueryObserverOptions } from '@tanstack/query-core'\nimport type { QueryObserver } from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\nimport type { QueryObserverResult } from '@tanstack/query-core'\nimport type { QueryKey } from '@tanstack/query-core'\n\nexport const ensureStaleTime = (\n defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any>,\n) => {\n if (defaultedOptions.suspense) {\n // Always set stale time when using suspense to prevent\n // fetching again when directly mounting after suspending\n if (typeof defaultedOptions.staleTime !== 'number') {\n defaultedOptions.staleTime = 1000\n }\n }\n}\n\nexport const willFetch = (\n result: QueryObserverResult<any, any>,\n isRestoring: boolean,\n) => result.isLoading && result.isFetching && !isRestoring\n\nexport const shouldSuspend = (\n defaultedOptions:\n | DefaultedQueryObserverOptions<any, any, any, any, any>\n | undefined,\n result: QueryObserverResult<any, any>,\n isRestoring: boolean,\n) => defaultedOptions?.suspense && willFetch(result, isRestoring)\n\nexport const fetchOptimistic = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n defaultedOptions: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n observer: QueryObserver<TQueryFnData, TError, TData, TQueryData, TQueryKey>,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) =>\n observer\n .fetchOptimistic(defaultedOptions)\n .then(({ data }) => {\n defaultedOptions.onSuccess?.(data as TData)\n defaultedOptions.onSettled?.(data, null)\n })\n .catch((error) => {\n errorResetBoundary.clearReset()\n defaultedOptions.onError?.(error)\n defaultedOptions.onSettled?.(undefined, error)\n })\n"],"names":["ensureStaleTime","defaultedOptions","suspense","staleTime","willFetch","result","isRestoring","isLoading","isFetching","shouldSuspend","fetchOptimistic","observer","errorResetBoundary","then","data","onSuccess","onSettled","catch","error","clearReset","onError","undefined"],"mappings":"AAMaA,MAAAA,eAAe,GAC1BC,gBAAwE,IACrE;EACH,IAAIA,gBAAgB,CAACC,QAAQ,EAAE;AAC7B;AACA;AACA,IAAA,IAAI,OAAOD,gBAAgB,CAACE,SAAS,KAAK,QAAQ,EAAE;MAClDF,gBAAgB,CAACE,SAAS,GAAG,IAAI,CAAA;AACnC,KAAA;AACF,GAAA;AACF,EAAC;MAEYC,SAAS,GAAG,CACvBC,MAAqC,EACrCC,WAAoB,KACjBD,MAAM,CAACE,SAAS,IAAIF,MAAM,CAACG,UAAU,IAAI,CAACF,YAAW;AAEnD,MAAMG,aAAa,GAAG,CAC3BR,gBAEa,EACbI,MAAqC,EACrCC,WAAoB,KACjB,CAAAL,gBAAgB,IAAhBA,IAAAA,GAAAA,KAAAA,CAAAA,GAAAA,gBAAgB,CAAEC,QAAQ,KAAIE,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAC;MAEpDI,eAAe,GAAG,CAO7BT,gBAMC,EACDU,QAA2E,EAC3EC,kBAAgD,KAEhDD,QAAQ,CACLD,eAAe,CAACT,gBAAgB,CAAC,CACjCY,IAAI,CAAC,CAAC;AAAEC,EAAAA,IAAAA;AAAK,CAAC,KAAK;EAClBb,gBAAgB,CAACc,SAAS,IAA1Bd,IAAAA,GAAAA,KAAAA,CAAAA,GAAAA,gBAAgB,CAACc,SAAS,CAAGD,IAAI,CAAU,CAAA;EAC3Cb,gBAAgB,CAACe,SAAS,IAAA,IAAA,GAAA,KAAA,CAAA,GAA1Bf,gBAAgB,CAACe,SAAS,CAAGF,IAAI,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAC,CACDG,KAAK,CAAEC,KAAK,IAAK;EAChBN,kBAAkB,CAACO,UAAU,EAAE,CAAA;EAC/BlB,gBAAgB,CAACmB,OAAO,IAAxBnB,IAAAA,GAAAA,KAAAA,CAAAA,GAAAA,gBAAgB,CAACmB,OAAO,CAAGF,KAAK,CAAC,CAAA;EACjCjB,gBAAgB,CAACe,SAAS,IAAA,IAAA,GAAA,KAAA,CAAA,GAA1Bf,gBAAgB,CAACe,SAAS,CAAGK,SAAS,EAAEH,KAAK,CAAC,CAAA;AAChD,CAAC;;;;"}
@@ -10,16 +10,16 @@ const ensureStaleTime = defaultedOptions => {
10
10
  }
11
11
  };
12
12
  const willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
13
- const shouldSuspend = (defaultedOptions, result, isRestoring) => defaultedOptions?.suspense && willFetch(result, isRestoring);
13
+ const shouldSuspend = (defaultedOptions, result, isRestoring) => (defaultedOptions == null ? void 0 : defaultedOptions.suspense) && willFetch(result, isRestoring);
14
14
  const fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).then(({
15
15
  data
16
16
  }) => {
17
- defaultedOptions.onSuccess?.(data);
18
- defaultedOptions.onSettled?.(data, null);
17
+ defaultedOptions.onSuccess == null ? void 0 : defaultedOptions.onSuccess(data);
18
+ defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(data, null);
19
19
  }).catch(error => {
20
20
  errorResetBoundary.clearReset();
21
- defaultedOptions.onError?.(error);
22
- defaultedOptions.onSettled?.(undefined, error);
21
+ defaultedOptions.onError == null ? void 0 : defaultedOptions.onError(error);
22
+ defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(undefined, error);
23
23
  });
24
24
 
25
25
  exports.ensureStaleTime = ensureStaleTime;
@@ -1 +1 @@
1
- {"version":3,"file":"suspense.js","sources":["../../src/suspense.ts"],"sourcesContent":["import type { DefaultedQueryObserverOptions } from '@tanstack/query-core'\nimport type { QueryObserver } from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\nimport type { QueryObserverResult } from '@tanstack/query-core'\nimport type { QueryKey } from '@tanstack/query-core'\n\nexport const ensureStaleTime = (\n defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any>,\n) => {\n if (defaultedOptions.suspense) {\n // Always set stale time when using suspense to prevent\n // fetching again when directly mounting after suspending\n if (typeof defaultedOptions.staleTime !== 'number') {\n defaultedOptions.staleTime = 1000\n }\n }\n}\n\nexport const willFetch = (\n result: QueryObserverResult<any, any>,\n isRestoring: boolean,\n) => result.isLoading && result.isFetching && !isRestoring\n\nexport const shouldSuspend = (\n defaultedOptions:\n | DefaultedQueryObserverOptions<any, any, any, any, any>\n | undefined,\n result: QueryObserverResult<any, any>,\n isRestoring: boolean,\n) => defaultedOptions?.suspense && willFetch(result, isRestoring)\n\nexport const fetchOptimistic = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n defaultedOptions: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n observer: QueryObserver<TQueryFnData, TError, TData, TQueryData, TQueryKey>,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) =>\n observer\n .fetchOptimistic(defaultedOptions)\n .then(({ data }) => {\n defaultedOptions.onSuccess?.(data as TData)\n defaultedOptions.onSettled?.(data, null)\n })\n .catch((error) => {\n errorResetBoundary.clearReset()\n defaultedOptions.onError?.(error)\n defaultedOptions.onSettled?.(undefined, error)\n })\n"],"names":["ensureStaleTime","defaultedOptions","suspense","staleTime","willFetch","result","isRestoring","isLoading","isFetching","shouldSuspend","fetchOptimistic","observer","errorResetBoundary","then","data","onSuccess","onSettled","catch","error","clearReset","onError","undefined"],"mappings":";;AAMaA,MAAAA,eAAe,GAC1BC,gBAAwE,IACrE;EACH,IAAIA,gBAAgB,CAACC,QAAQ,EAAE;AAC7B;AACA;AACA,IAAA,IAAI,OAAOD,gBAAgB,CAACE,SAAS,KAAK,QAAQ,EAAE;MAClDF,gBAAgB,CAACE,SAAS,GAAG,IAAI,CAAA;AACnC,KAAA;AACF,GAAA;AACF,EAAC;MAEYC,SAAS,GAAG,CACvBC,MAAqC,EACrCC,WAAoB,KACjBD,MAAM,CAACE,SAAS,IAAIF,MAAM,CAACG,UAAU,IAAI,CAACF,YAAW;MAE7CG,aAAa,GAAG,CAC3BR,gBAEa,EACbI,MAAqC,EACrCC,WAAoB,KACjBL,gBAAgB,EAAEC,QAAQ,IAAIE,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAC;MAEpDI,eAAe,GAAG,CAO7BT,gBAMC,EACDU,QAA2E,EAC3EC,kBAAgD,KAEhDD,QAAQ,CACLD,eAAe,CAACT,gBAAgB,CAAC,CACjCY,IAAI,CAAC,CAAC;AAAEC,EAAAA,IAAAA;AAAK,CAAC,KAAK;AAClBb,EAAAA,gBAAgB,CAACc,SAAS,GAAGD,IAAI,CAAU,CAAA;AAC3Cb,EAAAA,gBAAgB,CAACe,SAAS,GAAGF,IAAI,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAC,CACDG,KAAK,CAAEC,KAAK,IAAK;EAChBN,kBAAkB,CAACO,UAAU,EAAE,CAAA;AAC/BlB,EAAAA,gBAAgB,CAACmB,OAAO,GAAGF,KAAK,CAAC,CAAA;AACjCjB,EAAAA,gBAAgB,CAACe,SAAS,GAAGK,SAAS,EAAEH,KAAK,CAAC,CAAA;AAChD,CAAC;;;;;;;"}
1
+ {"version":3,"file":"suspense.js","sources":["../../src/suspense.ts"],"sourcesContent":["import type { DefaultedQueryObserverOptions } from '@tanstack/query-core'\nimport type { QueryObserver } from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\nimport type { QueryObserverResult } from '@tanstack/query-core'\nimport type { QueryKey } from '@tanstack/query-core'\n\nexport const ensureStaleTime = (\n defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any>,\n) => {\n if (defaultedOptions.suspense) {\n // Always set stale time when using suspense to prevent\n // fetching again when directly mounting after suspending\n if (typeof defaultedOptions.staleTime !== 'number') {\n defaultedOptions.staleTime = 1000\n }\n }\n}\n\nexport const willFetch = (\n result: QueryObserverResult<any, any>,\n isRestoring: boolean,\n) => result.isLoading && result.isFetching && !isRestoring\n\nexport const shouldSuspend = (\n defaultedOptions:\n | DefaultedQueryObserverOptions<any, any, any, any, any>\n | undefined,\n result: QueryObserverResult<any, any>,\n isRestoring: boolean,\n) => defaultedOptions?.suspense && willFetch(result, isRestoring)\n\nexport const fetchOptimistic = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n defaultedOptions: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n observer: QueryObserver<TQueryFnData, TError, TData, TQueryData, TQueryKey>,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) =>\n observer\n .fetchOptimistic(defaultedOptions)\n .then(({ data }) => {\n defaultedOptions.onSuccess?.(data as TData)\n defaultedOptions.onSettled?.(data, null)\n })\n .catch((error) => {\n errorResetBoundary.clearReset()\n defaultedOptions.onError?.(error)\n defaultedOptions.onSettled?.(undefined, error)\n })\n"],"names":["ensureStaleTime","defaultedOptions","suspense","staleTime","willFetch","result","isRestoring","isLoading","isFetching","shouldSuspend","fetchOptimistic","observer","errorResetBoundary","then","data","onSuccess","onSettled","catch","error","clearReset","onError","undefined"],"mappings":";;AAMaA,MAAAA,eAAe,GAC1BC,gBAAwE,IACrE;EACH,IAAIA,gBAAgB,CAACC,QAAQ,EAAE;AAC7B;AACA;AACA,IAAA,IAAI,OAAOD,gBAAgB,CAACE,SAAS,KAAK,QAAQ,EAAE;MAClDF,gBAAgB,CAACE,SAAS,GAAG,IAAI,CAAA;AACnC,KAAA;AACF,GAAA;AACF,EAAC;MAEYC,SAAS,GAAG,CACvBC,MAAqC,EACrCC,WAAoB,KACjBD,MAAM,CAACE,SAAS,IAAIF,MAAM,CAACG,UAAU,IAAI,CAACF,YAAW;AAEnD,MAAMG,aAAa,GAAG,CAC3BR,gBAEa,EACbI,MAAqC,EACrCC,WAAoB,KACjB,CAAAL,gBAAgB,IAAhBA,IAAAA,GAAAA,KAAAA,CAAAA,GAAAA,gBAAgB,CAAEC,QAAQ,KAAIE,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAC;MAEpDI,eAAe,GAAG,CAO7BT,gBAMC,EACDU,QAA2E,EAC3EC,kBAAgD,KAEhDD,QAAQ,CACLD,eAAe,CAACT,gBAAgB,CAAC,CACjCY,IAAI,CAAC,CAAC;AAAEC,EAAAA,IAAAA;AAAK,CAAC,KAAK;EAClBb,gBAAgB,CAACc,SAAS,IAA1Bd,IAAAA,GAAAA,KAAAA,CAAAA,GAAAA,gBAAgB,CAACc,SAAS,CAAGD,IAAI,CAAU,CAAA;EAC3Cb,gBAAgB,CAACe,SAAS,IAAA,IAAA,GAAA,KAAA,CAAA,GAA1Bf,gBAAgB,CAACe,SAAS,CAAGF,IAAI,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAC,CACDG,KAAK,CAAEC,KAAK,IAAK;EAChBN,kBAAkB,CAACO,UAAU,EAAE,CAAA;EAC/BlB,gBAAgB,CAACmB,OAAO,IAAxBnB,IAAAA,GAAAA,KAAAA,CAAAA,GAAAA,gBAAgB,CAACmB,OAAO,CAAGF,KAAK,CAAC,CAAA;EACjCjB,gBAAgB,CAACe,SAAS,IAAA,IAAA,GAAA,KAAA,CAAA,GAA1Bf,gBAAgB,CAACe,SAAS,CAAGK,SAAS,EAAEH,KAAK,CAAC,CAAA;AAChD,CAAC;;;;;;;"}
@@ -1,25 +1,25 @@
1
- import type { InfiniteQueryObserverOptions, InfiniteQueryObserverResult, MutationObserverResult, QueryObserverOptions, QueryObserverResult, QueryKey, MutationObserverOptions, MutateFunction, DefinedQueryObserverResult, WithRequired, RegisteredError } from '@tanstack/query-core';
2
- export interface UseBaseQueryOptions<TQueryFnData = unknown, TError = RegisteredError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends WithRequired<QueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, 'queryKey'> {
1
+ import type { InfiniteQueryObserverOptions, InfiniteQueryObserverResult, MutationObserverResult, QueryObserverOptions, QueryObserverResult, QueryKey, MutationObserverOptions, MutateFunction, DefinedQueryObserverResult, WithRequired, DefaultError } from '@tanstack/query-core';
2
+ export interface UseBaseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends WithRequired<QueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, 'queryKey'> {
3
3
  }
4
- export interface UseQueryOptions<TQueryFnData = unknown, TError = RegisteredError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends WithRequired<UseBaseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>, 'queryKey'> {
4
+ export interface UseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends WithRequired<UseBaseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>, 'queryKey'> {
5
5
  }
6
- export interface UseInfiniteQueryOptions<TQueryFnData = unknown, TError = RegisteredError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends WithRequired<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey, TPageParam>, 'queryKey'> {
6
+ export interface UseInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends WithRequired<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey, TPageParam>, 'queryKey'> {
7
7
  }
8
- export declare type UseBaseQueryResult<TData = unknown, TError = RegisteredError> = QueryObserverResult<TData, TError>;
9
- export declare type UseQueryResult<TData = unknown, TError = RegisteredError> = UseBaseQueryResult<TData, TError>;
10
- export declare type DefinedUseBaseQueryResult<TData = unknown, TError = RegisteredError> = DefinedQueryObserverResult<TData, TError>;
11
- export declare type DefinedUseQueryResult<TData = unknown, TError = RegisteredError> = DefinedUseBaseQueryResult<TData, TError>;
12
- export declare type UseInfiniteQueryResult<TData = unknown, TError = RegisteredError> = InfiniteQueryObserverResult<TData, TError>;
13
- export interface UseMutationOptions<TData = unknown, TError = RegisteredError, TVariables = void, TContext = unknown> extends Omit<MutationObserverOptions<TData, TError, TVariables, TContext>, '_defaulted' | 'variables'> {
8
+ export declare type UseBaseQueryResult<TData = unknown, TError = DefaultError> = QueryObserverResult<TData, TError>;
9
+ export declare type UseQueryResult<TData = unknown, TError = DefaultError> = UseBaseQueryResult<TData, TError>;
10
+ export declare type DefinedUseBaseQueryResult<TData = unknown, TError = DefaultError> = DefinedQueryObserverResult<TData, TError>;
11
+ export declare type DefinedUseQueryResult<TData = unknown, TError = DefaultError> = DefinedUseBaseQueryResult<TData, TError>;
12
+ export declare type UseInfiniteQueryResult<TData = unknown, TError = DefaultError> = InfiniteQueryObserverResult<TData, TError>;
13
+ export interface UseMutationOptions<TData = unknown, TError = DefaultError, TVariables = void, TContext = unknown> extends Omit<MutationObserverOptions<TData, TError, TVariables, TContext>, '_defaulted' | 'variables'> {
14
14
  }
15
- export declare type UseMutateFunction<TData = unknown, TError = RegisteredError, TVariables = void, TContext = unknown> = (...args: Parameters<MutateFunction<TData, TError, TVariables, TContext>>) => void;
16
- export declare type UseMutateAsyncFunction<TData = unknown, TError = RegisteredError, TVariables = void, TContext = unknown> = MutateFunction<TData, TError, TVariables, TContext>;
17
- export declare type UseBaseMutationResult<TData = unknown, TError = RegisteredError, TVariables = unknown, TContext = unknown> = Override<MutationObserverResult<TData, TError, TVariables, TContext>, {
15
+ export declare type UseMutateFunction<TData = unknown, TError = DefaultError, TVariables = void, TContext = unknown> = (...args: Parameters<MutateFunction<TData, TError, TVariables, TContext>>) => void;
16
+ export declare type UseMutateAsyncFunction<TData = unknown, TError = DefaultError, TVariables = void, TContext = unknown> = MutateFunction<TData, TError, TVariables, TContext>;
17
+ export declare type UseBaseMutationResult<TData = unknown, TError = DefaultError, TVariables = unknown, TContext = unknown> = Override<MutationObserverResult<TData, TError, TVariables, TContext>, {
18
18
  mutate: UseMutateFunction<TData, TError, TVariables, TContext>;
19
19
  }> & {
20
20
  mutateAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
21
21
  };
22
- export declare type UseMutationResult<TData = unknown, TError = RegisteredError, TVariables = unknown, TContext = unknown> = UseBaseMutationResult<TData, TError, TVariables, TContext>;
22
+ export declare type UseMutationResult<TData = unknown, TError = DefaultError, TVariables = unknown, TContext = unknown> = UseBaseMutationResult<TData, TError, TVariables, TContext>;
23
23
  declare type Override<A, B> = {
24
24
  [K in keyof A]: K extends keyof B ? B[K] : A[K];
25
25
  };
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
  import { notifyManager } from '@tanstack/query-core';
3
4
  import { useQueryErrorResetBoundary } from './QueryErrorResetBoundary.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"useBaseQuery.esm.js","sources":["../../src/useBaseQuery.ts"],"sourcesContent":["import * as React from 'react'\n\nimport type { QueryClient, QueryKey, QueryObserver } from '@tanstack/query-core'\nimport { notifyManager } from '@tanstack/query-core'\nimport { useQueryErrorResetBoundary } from './QueryErrorResetBoundary'\nimport { useQueryClient } from './QueryClientProvider'\nimport type { UseBaseQueryOptions } from './types'\nimport { useIsRestoring } from './isRestoring'\nimport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary,\n} from './errorBoundaryUtils'\nimport { ensureStaleTime, shouldSuspend, fetchOptimistic } from './suspense'\n\nexport function useBaseQuery<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: UseBaseQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n Observer: typeof QueryObserver,\n queryClient?: QueryClient,\n) {\n const client = useQueryClient(queryClient)\n const isRestoring = useIsRestoring()\n const errorResetBoundary = useQueryErrorResetBoundary()\n const defaultedOptions = client.defaultQueryOptions(options)\n\n // Make sure results are optimistically set in fetching state before subscribing or updating options\n defaultedOptions._optimisticResults = isRestoring\n ? 'isRestoring'\n : 'optimistic'\n\n // Include callbacks in batch renders\n if (defaultedOptions.onError) {\n defaultedOptions.onError = notifyManager.batchCalls(\n defaultedOptions.onError,\n )\n }\n\n if (defaultedOptions.onSuccess) {\n defaultedOptions.onSuccess = notifyManager.batchCalls(\n defaultedOptions.onSuccess,\n )\n }\n\n if (defaultedOptions.onSettled) {\n defaultedOptions.onSettled = notifyManager.batchCalls(\n defaultedOptions.onSettled,\n )\n }\n\n ensureStaleTime(defaultedOptions)\n ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary)\n\n useClearResetErrorBoundary(errorResetBoundary)\n\n const [observer] = React.useState(\n () =>\n new Observer<TQueryFnData, TError, TData, TQueryData, TQueryKey>(\n client,\n defaultedOptions,\n ),\n )\n\n const result = observer.getOptimisticResult(defaultedOptions)\n\n React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n isRestoring\n ? () => undefined\n : observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer, isRestoring],\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult(),\n )\n\n React.useEffect(() => {\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, { listeners: false })\n }, [defaultedOptions, observer])\n\n // Handle suspense\n if (shouldSuspend(defaultedOptions, result, isRestoring)) {\n throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary)\n }\n\n // Handle error boundary\n if (\n getHasError({\n result,\n errorResetBoundary,\n throwErrors: defaultedOptions.throwErrors,\n query: observer.getCurrentQuery(),\n })\n ) {\n throw result.error\n }\n\n // Handle result property usage tracking\n return !defaultedOptions.notifyOnChangeProps\n ? observer.trackResult(result)\n : result\n}\n"],"names":["useBaseQuery","options","Observer","queryClient","client","useQueryClient","isRestoring","useIsRestoring","errorResetBoundary","useQueryErrorResetBoundary","defaultedOptions","defaultQueryOptions","_optimisticResults","onError","notifyManager","batchCalls","onSuccess","onSettled","ensureStaleTime","ensurePreventErrorBoundaryRetry","useClearResetErrorBoundary","observer","React","useState","result","getOptimisticResult","useSyncExternalStore","useCallback","onStoreChange","undefined","subscribe","getCurrentResult","useEffect","setOptions","listeners","shouldSuspend","fetchOptimistic","getHasError","throwErrors","query","getCurrentQuery","error","notifyOnChangeProps","trackResult"],"mappings":";;;;;;;;AAeO,SAASA,YAAY,CAO1BC,OAMC,EACDC,QAA8B,EAC9BC,WAAyB,EACzB;AACA,EAAA,MAAMC,MAAM,GAAGC,cAAc,CAACF,WAAW,CAAC,CAAA;EAC1C,MAAMG,WAAW,GAAGC,cAAc,EAAE,CAAA;EACpC,MAAMC,kBAAkB,GAAGC,0BAA0B,EAAE,CAAA;AACvD,EAAA,MAAMC,gBAAgB,GAAGN,MAAM,CAACO,mBAAmB,CAACV,OAAO,CAAC,CAAA;;AAE5D;AACAS,EAAAA,gBAAgB,CAACE,kBAAkB,GAAGN,WAAW,GAC7C,aAAa,GACb,YAAY,CAAA;;AAEhB;EACA,IAAII,gBAAgB,CAACG,OAAO,EAAE;IAC5BH,gBAAgB,CAACG,OAAO,GAAGC,aAAa,CAACC,UAAU,CACjDL,gBAAgB,CAACG,OAAO,CACzB,CAAA;AACH,GAAA;EAEA,IAAIH,gBAAgB,CAACM,SAAS,EAAE;IAC9BN,gBAAgB,CAACM,SAAS,GAAGF,aAAa,CAACC,UAAU,CACnDL,gBAAgB,CAACM,SAAS,CAC3B,CAAA;AACH,GAAA;EAEA,IAAIN,gBAAgB,CAACO,SAAS,EAAE;IAC9BP,gBAAgB,CAACO,SAAS,GAAGH,aAAa,CAACC,UAAU,CACnDL,gBAAgB,CAACO,SAAS,CAC3B,CAAA;AACH,GAAA;EAEAC,eAAe,CAACR,gBAAgB,CAAC,CAAA;AACjCS,EAAAA,+BAA+B,CAACT,gBAAgB,EAAEF,kBAAkB,CAAC,CAAA;EAErEY,0BAA0B,CAACZ,kBAAkB,CAAC,CAAA;AAE9C,EAAA,MAAM,CAACa,QAAQ,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAC/B,MACE,IAAIrB,QAAQ,CACVE,MAAM,EACNM,gBAAgB,CACjB,CACJ,CAAA;AAED,EAAA,MAAMc,MAAM,GAAGH,QAAQ,CAACI,mBAAmB,CAACf,gBAAgB,CAAC,CAAA;EAE7DY,KAAK,CAACI,oBAAoB,CACxBJ,KAAK,CAACK,WAAW,CACdC,aAAa,IACZtB,WAAW,GACP,MAAMuB,SAAS,GACfR,QAAQ,CAACS,SAAS,CAAChB,aAAa,CAACC,UAAU,CAACa,aAAa,CAAC,CAAC,EACjE,CAACP,QAAQ,EAAEf,WAAW,CAAC,CACxB,EACD,MAAMe,QAAQ,CAACU,gBAAgB,EAAE,EACjC,MAAMV,QAAQ,CAACU,gBAAgB,EAAE,CAClC,CAAA;EAEDT,KAAK,CAACU,SAAS,CAAC,MAAM;AACpB;AACA;AACAX,IAAAA,QAAQ,CAACY,UAAU,CAACvB,gBAAgB,EAAE;AAAEwB,MAAAA,SAAS,EAAE,KAAA;AAAM,KAAC,CAAC,CAAA;AAC7D,GAAC,EAAE,CAACxB,gBAAgB,EAAEW,QAAQ,CAAC,CAAC,CAAA;;AAEhC;EACA,IAAIc,aAAa,CAACzB,gBAAgB,EAAEc,MAAM,EAAElB,WAAW,CAAC,EAAE;AACxD,IAAA,MAAM8B,eAAe,CAAC1B,gBAAgB,EAAEW,QAAQ,EAAEb,kBAAkB,CAAC,CAAA;AACvE,GAAA;;AAEA;AACA,EAAA,IACE6B,WAAW,CAAC;IACVb,MAAM;IACNhB,kBAAkB;IAClB8B,WAAW,EAAE5B,gBAAgB,CAAC4B,WAAW;IACzCC,KAAK,EAAElB,QAAQ,CAACmB,eAAe,EAAA;AACjC,GAAC,CAAC,EACF;IACA,MAAMhB,MAAM,CAACiB,KAAK,CAAA;AACpB,GAAA;;AAEA;AACA,EAAA,OAAO,CAAC/B,gBAAgB,CAACgC,mBAAmB,GACxCrB,QAAQ,CAACsB,WAAW,CAACnB,MAAM,CAAC,GAC5BA,MAAM,CAAA;AACZ;;;;"}
1
+ {"version":3,"file":"useBaseQuery.esm.js","sources":["../../src/useBaseQuery.ts"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient, QueryKey, QueryObserver } from '@tanstack/query-core'\nimport { notifyManager } from '@tanstack/query-core'\nimport { useQueryErrorResetBoundary } from './QueryErrorResetBoundary'\nimport { useQueryClient } from './QueryClientProvider'\nimport type { UseBaseQueryOptions } from './types'\nimport { useIsRestoring } from './isRestoring'\nimport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary,\n} from './errorBoundaryUtils'\nimport { ensureStaleTime, shouldSuspend, fetchOptimistic } from './suspense'\n\nexport function useBaseQuery<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: UseBaseQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n Observer: typeof QueryObserver,\n queryClient?: QueryClient,\n) {\n const client = useQueryClient(queryClient)\n const isRestoring = useIsRestoring()\n const errorResetBoundary = useQueryErrorResetBoundary()\n const defaultedOptions = client.defaultQueryOptions(options)\n\n // Make sure results are optimistically set in fetching state before subscribing or updating options\n defaultedOptions._optimisticResults = isRestoring\n ? 'isRestoring'\n : 'optimistic'\n\n // Include callbacks in batch renders\n if (defaultedOptions.onError) {\n defaultedOptions.onError = notifyManager.batchCalls(\n defaultedOptions.onError,\n )\n }\n\n if (defaultedOptions.onSuccess) {\n defaultedOptions.onSuccess = notifyManager.batchCalls(\n defaultedOptions.onSuccess,\n )\n }\n\n if (defaultedOptions.onSettled) {\n defaultedOptions.onSettled = notifyManager.batchCalls(\n defaultedOptions.onSettled,\n )\n }\n\n ensureStaleTime(defaultedOptions)\n ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary)\n\n useClearResetErrorBoundary(errorResetBoundary)\n\n const [observer] = React.useState(\n () =>\n new Observer<TQueryFnData, TError, TData, TQueryData, TQueryKey>(\n client,\n defaultedOptions,\n ),\n )\n\n const result = observer.getOptimisticResult(defaultedOptions)\n\n React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n isRestoring\n ? () => undefined\n : observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer, isRestoring],\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult(),\n )\n\n React.useEffect(() => {\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, { listeners: false })\n }, [defaultedOptions, observer])\n\n // Handle suspense\n if (shouldSuspend(defaultedOptions, result, isRestoring)) {\n throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary)\n }\n\n // Handle error boundary\n if (\n getHasError({\n result,\n errorResetBoundary,\n throwErrors: defaultedOptions.throwErrors,\n query: observer.getCurrentQuery(),\n })\n ) {\n throw result.error\n }\n\n // Handle result property usage tracking\n return !defaultedOptions.notifyOnChangeProps\n ? observer.trackResult(result)\n : result\n}\n"],"names":["defaultedOptions","ensurePreventErrorBoundaryRetry","observer","listeners"],"mappings":";;;;;;;;;AAgBO;AAiBL;;;AAGA;;AAEA;AACAA;;AAIA;;;AAKA;;;AAMA;;;AAMA;;AAGAC;;AAIA;AAQA;;;AAeE;AACA;AACAC;AAAwCC;AAAiB;AAC3D;;AAEA;;AAEE;AACF;;AAEA;AACA;;;;;AAME;;AAGF;;AAEA;AACA;AAGF;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  'use strict';
2
3
 
3
4
  var React = require('react');
@@ -1 +1 @@
1
- {"version":3,"file":"useBaseQuery.js","sources":["../../src/useBaseQuery.ts"],"sourcesContent":["import * as React from 'react'\n\nimport type { QueryClient, QueryKey, QueryObserver } from '@tanstack/query-core'\nimport { notifyManager } from '@tanstack/query-core'\nimport { useQueryErrorResetBoundary } from './QueryErrorResetBoundary'\nimport { useQueryClient } from './QueryClientProvider'\nimport type { UseBaseQueryOptions } from './types'\nimport { useIsRestoring } from './isRestoring'\nimport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary,\n} from './errorBoundaryUtils'\nimport { ensureStaleTime, shouldSuspend, fetchOptimistic } from './suspense'\n\nexport function useBaseQuery<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: UseBaseQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n Observer: typeof QueryObserver,\n queryClient?: QueryClient,\n) {\n const client = useQueryClient(queryClient)\n const isRestoring = useIsRestoring()\n const errorResetBoundary = useQueryErrorResetBoundary()\n const defaultedOptions = client.defaultQueryOptions(options)\n\n // Make sure results are optimistically set in fetching state before subscribing or updating options\n defaultedOptions._optimisticResults = isRestoring\n ? 'isRestoring'\n : 'optimistic'\n\n // Include callbacks in batch renders\n if (defaultedOptions.onError) {\n defaultedOptions.onError = notifyManager.batchCalls(\n defaultedOptions.onError,\n )\n }\n\n if (defaultedOptions.onSuccess) {\n defaultedOptions.onSuccess = notifyManager.batchCalls(\n defaultedOptions.onSuccess,\n )\n }\n\n if (defaultedOptions.onSettled) {\n defaultedOptions.onSettled = notifyManager.batchCalls(\n defaultedOptions.onSettled,\n )\n }\n\n ensureStaleTime(defaultedOptions)\n ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary)\n\n useClearResetErrorBoundary(errorResetBoundary)\n\n const [observer] = React.useState(\n () =>\n new Observer<TQueryFnData, TError, TData, TQueryData, TQueryKey>(\n client,\n defaultedOptions,\n ),\n )\n\n const result = observer.getOptimisticResult(defaultedOptions)\n\n React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n isRestoring\n ? () => undefined\n : observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer, isRestoring],\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult(),\n )\n\n React.useEffect(() => {\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, { listeners: false })\n }, [defaultedOptions, observer])\n\n // Handle suspense\n if (shouldSuspend(defaultedOptions, result, isRestoring)) {\n throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary)\n }\n\n // Handle error boundary\n if (\n getHasError({\n result,\n errorResetBoundary,\n throwErrors: defaultedOptions.throwErrors,\n query: observer.getCurrentQuery(),\n })\n ) {\n throw result.error\n }\n\n // Handle result property usage tracking\n return !defaultedOptions.notifyOnChangeProps\n ? observer.trackResult(result)\n : result\n}\n"],"names":["useBaseQuery","options","Observer","queryClient","client","useQueryClient","isRestoring","useIsRestoring","errorResetBoundary","useQueryErrorResetBoundary","defaultedOptions","defaultQueryOptions","_optimisticResults","onError","notifyManager","batchCalls","onSuccess","onSettled","ensureStaleTime","ensurePreventErrorBoundaryRetry","useClearResetErrorBoundary","observer","React","useState","result","getOptimisticResult","useSyncExternalStore","useCallback","onStoreChange","undefined","subscribe","getCurrentResult","useEffect","setOptions","listeners","shouldSuspend","fetchOptimistic","getHasError","throwErrors","query","getCurrentQuery","error","notifyOnChangeProps","trackResult"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeO,SAASA,YAAY,CAO1BC,OAMC,EACDC,QAA8B,EAC9BC,WAAyB,EACzB;AACA,EAAA,MAAMC,MAAM,GAAGC,kCAAc,CAACF,WAAW,CAAC,CAAA;EAC1C,MAAMG,aAAW,GAAGC,0BAAc,EAAE,CAAA;EACpC,MAAMC,kBAAkB,GAAGC,kDAA0B,EAAE,CAAA;AACvD,EAAA,MAAMC,gBAAgB,GAAGN,MAAM,CAACO,mBAAmB,CAACV,OAAO,CAAC,CAAA;;AAE5D;AACAS,EAAAA,gBAAgB,CAACE,kBAAkB,GAAGN,aAAW,GAC7C,aAAa,GACb,YAAY,CAAA;;AAEhB;EACA,IAAII,gBAAgB,CAACG,OAAO,EAAE;IAC5BH,gBAAgB,CAACG,OAAO,GAAGC,uBAAa,CAACC,UAAU,CACjDL,gBAAgB,CAACG,OAAO,CACzB,CAAA;AACH,GAAA;EAEA,IAAIH,gBAAgB,CAACM,SAAS,EAAE;IAC9BN,gBAAgB,CAACM,SAAS,GAAGF,uBAAa,CAACC,UAAU,CACnDL,gBAAgB,CAACM,SAAS,CAC3B,CAAA;AACH,GAAA;EAEA,IAAIN,gBAAgB,CAACO,SAAS,EAAE;IAC9BP,gBAAgB,CAACO,SAAS,GAAGH,uBAAa,CAACC,UAAU,CACnDL,gBAAgB,CAACO,SAAS,CAC3B,CAAA;AACH,GAAA;EAEAC,wBAAe,CAACR,gBAAgB,CAAC,CAAA;AACjCS,EAAAA,kDAA+B,CAACT,gBAAgB,EAAEF,kBAAkB,CAAC,CAAA;EAErEY,6CAA0B,CAACZ,kBAAkB,CAAC,CAAA;AAE9C,EAAA,MAAM,CAACa,QAAQ,CAAC,GAAGC,gBAAK,CAACC,QAAQ,CAC/B,MACE,IAAIrB,QAAQ,CACVE,MAAM,EACNM,gBAAgB,CACjB,CACJ,CAAA;AAED,EAAA,MAAMc,MAAM,GAAGH,QAAQ,CAACI,mBAAmB,CAACf,gBAAgB,CAAC,CAAA;EAE7DY,gBAAK,CAACI,oBAAoB,CACxBJ,gBAAK,CAACK,WAAW,CACdC,aAAa,IACZtB,aAAW,GACP,MAAMuB,SAAS,GACfR,QAAQ,CAACS,SAAS,CAAChB,uBAAa,CAACC,UAAU,CAACa,aAAa,CAAC,CAAC,EACjE,CAACP,QAAQ,EAAEf,aAAW,CAAC,CACxB,EACD,MAAMe,QAAQ,CAACU,gBAAgB,EAAE,EACjC,MAAMV,QAAQ,CAACU,gBAAgB,EAAE,CAClC,CAAA;EAEDT,gBAAK,CAACU,SAAS,CAAC,MAAM;AACpB;AACA;AACAX,IAAAA,QAAQ,CAACY,UAAU,CAACvB,gBAAgB,EAAE;AAAEwB,MAAAA,SAAS,EAAE,KAAA;AAAM,KAAC,CAAC,CAAA;AAC7D,GAAC,EAAE,CAACxB,gBAAgB,EAAEW,QAAQ,CAAC,CAAC,CAAA;;AAEhC;EACA,IAAIc,sBAAa,CAACzB,gBAAgB,EAAEc,MAAM,EAAElB,aAAW,CAAC,EAAE;AACxD,IAAA,MAAM8B,wBAAe,CAAC1B,gBAAgB,EAAEW,QAAQ,EAAEb,kBAAkB,CAAC,CAAA;AACvE,GAAA;;AAEA;AACA,EAAA,IACE6B,8BAAW,CAAC;IACVb,MAAM;IACNhB,kBAAkB;IAClB8B,WAAW,EAAE5B,gBAAgB,CAAC4B,WAAW;IACzCC,KAAK,EAAElB,QAAQ,CAACmB,eAAe,EAAA;AACjC,GAAC,CAAC,EACF;IACA,MAAMhB,MAAM,CAACiB,KAAK,CAAA;AACpB,GAAA;;AAEA;AACA,EAAA,OAAO,CAAC/B,gBAAgB,CAACgC,mBAAmB,GACxCrB,QAAQ,CAACsB,WAAW,CAACnB,MAAM,CAAC,GAC5BA,MAAM,CAAA;AACZ;;;;"}
1
+ {"version":3,"file":"useBaseQuery.js","sources":["../../src/useBaseQuery.ts"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient, QueryKey, QueryObserver } from '@tanstack/query-core'\nimport { notifyManager } from '@tanstack/query-core'\nimport { useQueryErrorResetBoundary } from './QueryErrorResetBoundary'\nimport { useQueryClient } from './QueryClientProvider'\nimport type { UseBaseQueryOptions } from './types'\nimport { useIsRestoring } from './isRestoring'\nimport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary,\n} from './errorBoundaryUtils'\nimport { ensureStaleTime, shouldSuspend, fetchOptimistic } from './suspense'\n\nexport function useBaseQuery<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: UseBaseQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n Observer: typeof QueryObserver,\n queryClient?: QueryClient,\n) {\n const client = useQueryClient(queryClient)\n const isRestoring = useIsRestoring()\n const errorResetBoundary = useQueryErrorResetBoundary()\n const defaultedOptions = client.defaultQueryOptions(options)\n\n // Make sure results are optimistically set in fetching state before subscribing or updating options\n defaultedOptions._optimisticResults = isRestoring\n ? 'isRestoring'\n : 'optimistic'\n\n // Include callbacks in batch renders\n if (defaultedOptions.onError) {\n defaultedOptions.onError = notifyManager.batchCalls(\n defaultedOptions.onError,\n )\n }\n\n if (defaultedOptions.onSuccess) {\n defaultedOptions.onSuccess = notifyManager.batchCalls(\n defaultedOptions.onSuccess,\n )\n }\n\n if (defaultedOptions.onSettled) {\n defaultedOptions.onSettled = notifyManager.batchCalls(\n defaultedOptions.onSettled,\n )\n }\n\n ensureStaleTime(defaultedOptions)\n ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary)\n\n useClearResetErrorBoundary(errorResetBoundary)\n\n const [observer] = React.useState(\n () =>\n new Observer<TQueryFnData, TError, TData, TQueryData, TQueryKey>(\n client,\n defaultedOptions,\n ),\n )\n\n const result = observer.getOptimisticResult(defaultedOptions)\n\n React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n isRestoring\n ? () => undefined\n : observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer, isRestoring],\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult(),\n )\n\n React.useEffect(() => {\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, { listeners: false })\n }, [defaultedOptions, observer])\n\n // Handle suspense\n if (shouldSuspend(defaultedOptions, result, isRestoring)) {\n throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary)\n }\n\n // Handle error boundary\n if (\n getHasError({\n result,\n errorResetBoundary,\n throwErrors: defaultedOptions.throwErrors,\n query: observer.getCurrentQuery(),\n })\n ) {\n throw result.error\n }\n\n // Handle result property usage tracking\n return !defaultedOptions.notifyOnChangeProps\n ? observer.trackResult(result)\n : result\n}\n"],"names":["defaultedOptions","ensurePreventErrorBoundaryRetry","observer","listeners"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO;AAiBL;;;AAGA;;AAEA;AACAA;;AAIA;;;AAKA;;;AAMA;;;AAMA;;AAGAC;;AAIA;AAQA;;;AAeE;AACA;AACAC;AAAwCC;AAAiB;AAC3D;;AAEA;;AAEE;AACF;;AAEA;AACA;;;;;AAME;;AAGF;;AAEA;AACA;AAGF;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import * as React from 'react';
2
3
  import { notifyManager } from '@tanstack/query-core';
3
4
  import { useQueryErrorResetBoundary } from './QueryErrorResetBoundary.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"useBaseQuery.mjs","sources":["../../src/useBaseQuery.ts"],"sourcesContent":["import * as React from 'react'\n\nimport type { QueryClient, QueryKey, QueryObserver } from '@tanstack/query-core'\nimport { notifyManager } from '@tanstack/query-core'\nimport { useQueryErrorResetBoundary } from './QueryErrorResetBoundary'\nimport { useQueryClient } from './QueryClientProvider'\nimport type { UseBaseQueryOptions } from './types'\nimport { useIsRestoring } from './isRestoring'\nimport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary,\n} from './errorBoundaryUtils'\nimport { ensureStaleTime, shouldSuspend, fetchOptimistic } from './suspense'\n\nexport function useBaseQuery<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: UseBaseQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n Observer: typeof QueryObserver,\n queryClient?: QueryClient,\n) {\n const client = useQueryClient(queryClient)\n const isRestoring = useIsRestoring()\n const errorResetBoundary = useQueryErrorResetBoundary()\n const defaultedOptions = client.defaultQueryOptions(options)\n\n // Make sure results are optimistically set in fetching state before subscribing or updating options\n defaultedOptions._optimisticResults = isRestoring\n ? 'isRestoring'\n : 'optimistic'\n\n // Include callbacks in batch renders\n if (defaultedOptions.onError) {\n defaultedOptions.onError = notifyManager.batchCalls(\n defaultedOptions.onError,\n )\n }\n\n if (defaultedOptions.onSuccess) {\n defaultedOptions.onSuccess = notifyManager.batchCalls(\n defaultedOptions.onSuccess,\n )\n }\n\n if (defaultedOptions.onSettled) {\n defaultedOptions.onSettled = notifyManager.batchCalls(\n defaultedOptions.onSettled,\n )\n }\n\n ensureStaleTime(defaultedOptions)\n ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary)\n\n useClearResetErrorBoundary(errorResetBoundary)\n\n const [observer] = React.useState(\n () =>\n new Observer<TQueryFnData, TError, TData, TQueryData, TQueryKey>(\n client,\n defaultedOptions,\n ),\n )\n\n const result = observer.getOptimisticResult(defaultedOptions)\n\n React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n isRestoring\n ? () => undefined\n : observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer, isRestoring],\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult(),\n )\n\n React.useEffect(() => {\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, { listeners: false })\n }, [defaultedOptions, observer])\n\n // Handle suspense\n if (shouldSuspend(defaultedOptions, result, isRestoring)) {\n throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary)\n }\n\n // Handle error boundary\n if (\n getHasError({\n result,\n errorResetBoundary,\n throwErrors: defaultedOptions.throwErrors,\n query: observer.getCurrentQuery(),\n })\n ) {\n throw result.error\n }\n\n // Handle result property usage tracking\n return !defaultedOptions.notifyOnChangeProps\n ? observer.trackResult(result)\n : result\n}\n"],"names":["useBaseQuery","options","Observer","queryClient","client","useQueryClient","isRestoring","useIsRestoring","errorResetBoundary","useQueryErrorResetBoundary","defaultedOptions","defaultQueryOptions","_optimisticResults","onError","notifyManager","batchCalls","onSuccess","onSettled","ensureStaleTime","ensurePreventErrorBoundaryRetry","useClearResetErrorBoundary","observer","React","useState","result","getOptimisticResult","useSyncExternalStore","useCallback","onStoreChange","undefined","subscribe","getCurrentResult","useEffect","setOptions","listeners","shouldSuspend","fetchOptimistic","getHasError","throwErrors","query","getCurrentQuery","error","notifyOnChangeProps","trackResult"],"mappings":";;;;;;;;AAeO,SAASA,YAAY,CAO1BC,OAMC,EACDC,QAA8B,EAC9BC,WAAyB,EACzB;AACA,EAAA,MAAMC,MAAM,GAAGC,cAAc,CAACF,WAAW,CAAC,CAAA;EAC1C,MAAMG,WAAW,GAAGC,cAAc,EAAE,CAAA;EACpC,MAAMC,kBAAkB,GAAGC,0BAA0B,EAAE,CAAA;AACvD,EAAA,MAAMC,gBAAgB,GAAGN,MAAM,CAACO,mBAAmB,CAACV,OAAO,CAAC,CAAA;;AAE5D;AACAS,EAAAA,gBAAgB,CAACE,kBAAkB,GAAGN,WAAW,GAC7C,aAAa,GACb,YAAY,CAAA;;AAEhB;EACA,IAAII,gBAAgB,CAACG,OAAO,EAAE;IAC5BH,gBAAgB,CAACG,OAAO,GAAGC,aAAa,CAACC,UAAU,CACjDL,gBAAgB,CAACG,OAAO,CACzB,CAAA;AACH,GAAA;EAEA,IAAIH,gBAAgB,CAACM,SAAS,EAAE;IAC9BN,gBAAgB,CAACM,SAAS,GAAGF,aAAa,CAACC,UAAU,CACnDL,gBAAgB,CAACM,SAAS,CAC3B,CAAA;AACH,GAAA;EAEA,IAAIN,gBAAgB,CAACO,SAAS,EAAE;IAC9BP,gBAAgB,CAACO,SAAS,GAAGH,aAAa,CAACC,UAAU,CACnDL,gBAAgB,CAACO,SAAS,CAC3B,CAAA;AACH,GAAA;EAEAC,eAAe,CAACR,gBAAgB,CAAC,CAAA;AACjCS,EAAAA,+BAA+B,CAACT,gBAAgB,EAAEF,kBAAkB,CAAC,CAAA;EAErEY,0BAA0B,CAACZ,kBAAkB,CAAC,CAAA;AAE9C,EAAA,MAAM,CAACa,QAAQ,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAC/B,MACE,IAAIrB,QAAQ,CACVE,MAAM,EACNM,gBAAgB,CACjB,CACJ,CAAA;AAED,EAAA,MAAMc,MAAM,GAAGH,QAAQ,CAACI,mBAAmB,CAACf,gBAAgB,CAAC,CAAA;EAE7DY,KAAK,CAACI,oBAAoB,CACxBJ,KAAK,CAACK,WAAW,CACdC,aAAa,IACZtB,WAAW,GACP,MAAMuB,SAAS,GACfR,QAAQ,CAACS,SAAS,CAAChB,aAAa,CAACC,UAAU,CAACa,aAAa,CAAC,CAAC,EACjE,CAACP,QAAQ,EAAEf,WAAW,CAAC,CACxB,EACD,MAAMe,QAAQ,CAACU,gBAAgB,EAAE,EACjC,MAAMV,QAAQ,CAACU,gBAAgB,EAAE,CAClC,CAAA;EAEDT,KAAK,CAACU,SAAS,CAAC,MAAM;AACpB;AACA;AACAX,IAAAA,QAAQ,CAACY,UAAU,CAACvB,gBAAgB,EAAE;AAAEwB,MAAAA,SAAS,EAAE,KAAA;AAAM,KAAC,CAAC,CAAA;AAC7D,GAAC,EAAE,CAACxB,gBAAgB,EAAEW,QAAQ,CAAC,CAAC,CAAA;;AAEhC;EACA,IAAIc,aAAa,CAACzB,gBAAgB,EAAEc,MAAM,EAAElB,WAAW,CAAC,EAAE;AACxD,IAAA,MAAM8B,eAAe,CAAC1B,gBAAgB,EAAEW,QAAQ,EAAEb,kBAAkB,CAAC,CAAA;AACvE,GAAA;;AAEA;AACA,EAAA,IACE6B,WAAW,CAAC;IACVb,MAAM;IACNhB,kBAAkB;IAClB8B,WAAW,EAAE5B,gBAAgB,CAAC4B,WAAW;IACzCC,KAAK,EAAElB,QAAQ,CAACmB,eAAe,EAAA;AACjC,GAAC,CAAC,EACF;IACA,MAAMhB,MAAM,CAACiB,KAAK,CAAA;AACpB,GAAA;;AAEA;AACA,EAAA,OAAO,CAAC/B,gBAAgB,CAACgC,mBAAmB,GACxCrB,QAAQ,CAACsB,WAAW,CAACnB,MAAM,CAAC,GAC5BA,MAAM,CAAA;AACZ;;;;"}
1
+ {"version":3,"file":"useBaseQuery.mjs","sources":["../../src/useBaseQuery.ts"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient, QueryKey, QueryObserver } from '@tanstack/query-core'\nimport { notifyManager } from '@tanstack/query-core'\nimport { useQueryErrorResetBoundary } from './QueryErrorResetBoundary'\nimport { useQueryClient } from './QueryClientProvider'\nimport type { UseBaseQueryOptions } from './types'\nimport { useIsRestoring } from './isRestoring'\nimport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary,\n} from './errorBoundaryUtils'\nimport { ensureStaleTime, shouldSuspend, fetchOptimistic } from './suspense'\n\nexport function useBaseQuery<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: UseBaseQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n Observer: typeof QueryObserver,\n queryClient?: QueryClient,\n) {\n const client = useQueryClient(queryClient)\n const isRestoring = useIsRestoring()\n const errorResetBoundary = useQueryErrorResetBoundary()\n const defaultedOptions = client.defaultQueryOptions(options)\n\n // Make sure results are optimistically set in fetching state before subscribing or updating options\n defaultedOptions._optimisticResults = isRestoring\n ? 'isRestoring'\n : 'optimistic'\n\n // Include callbacks in batch renders\n if (defaultedOptions.onError) {\n defaultedOptions.onError = notifyManager.batchCalls(\n defaultedOptions.onError,\n )\n }\n\n if (defaultedOptions.onSuccess) {\n defaultedOptions.onSuccess = notifyManager.batchCalls(\n defaultedOptions.onSuccess,\n )\n }\n\n if (defaultedOptions.onSettled) {\n defaultedOptions.onSettled = notifyManager.batchCalls(\n defaultedOptions.onSettled,\n )\n }\n\n ensureStaleTime(defaultedOptions)\n ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary)\n\n useClearResetErrorBoundary(errorResetBoundary)\n\n const [observer] = React.useState(\n () =>\n new Observer<TQueryFnData, TError, TData, TQueryData, TQueryKey>(\n client,\n defaultedOptions,\n ),\n )\n\n const result = observer.getOptimisticResult(defaultedOptions)\n\n React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n isRestoring\n ? () => undefined\n : observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer, isRestoring],\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult(),\n )\n\n React.useEffect(() => {\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, { listeners: false })\n }, [defaultedOptions, observer])\n\n // Handle suspense\n if (shouldSuspend(defaultedOptions, result, isRestoring)) {\n throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary)\n }\n\n // Handle error boundary\n if (\n getHasError({\n result,\n errorResetBoundary,\n throwErrors: defaultedOptions.throwErrors,\n query: observer.getCurrentQuery(),\n })\n ) {\n throw result.error\n }\n\n // Handle result property usage tracking\n return !defaultedOptions.notifyOnChangeProps\n ? observer.trackResult(result)\n : result\n}\n"],"names":["defaultedOptions","ensurePreventErrorBoundaryRetry","observer","listeners"],"mappings":";;;;;;;;;AAgBO;AAiBL;;;AAGA;;AAEA;AACAA;;AAIA;;;AAKA;;;AAMA;;;AAMA;;AAGAC;;AAIA;AAQA;;;AAeE;AACA;AACAC;AAAwCC;AAAiB;AAC3D;;AAEA;;AAEE;AACF;;AAEA;AACA;;;;;AAME;;AAGF;;AAEA;AACA;AAGF;;"}
@@ -1,3 +1,3 @@
1
- import type { QueryKey, QueryClient, RegisteredError, InfiniteData } from '@tanstack/query-core';
1
+ import type { QueryKey, QueryClient, DefaultError, InfiniteData } from '@tanstack/query-core';
2
2
  import type { UseInfiniteQueryOptions, UseInfiniteQueryResult } from './types';
3
- export declare function useInfiniteQuery<TQueryFnData, TError = RegisteredError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey, TPageParam>, queryClient?: QueryClient): UseInfiniteQueryResult<TData, TError>;
3
+ export declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey, TPageParam>, queryClient?: QueryClient): UseInfiniteQueryResult<TData, TError>;
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import { InfiniteQueryObserver } from '@tanstack/query-core';
2
3
  import { useBaseQuery } from './useBaseQuery.esm.js';
3
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"useInfiniteQuery.esm.js","sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["import type {\n QueryObserver,\n QueryKey,\n QueryClient,\n RegisteredError,\n InfiniteData,\n} from '@tanstack/query-core'\nimport { InfiniteQueryObserver } from '@tanstack/query-core'\nimport type { UseInfiniteQueryOptions, UseInfiniteQueryResult } from './types'\nimport { useBaseQuery } from './useBaseQuery'\n\n// HOOK\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = RegisteredError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): UseInfiniteQueryResult<TData, TError> {\n return useBaseQuery(\n options,\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n InfiniteQueryObserver as typeof QueryObserver,\n queryClient,\n ) as UseInfiniteQueryResult<TData, TError>\n}\n"],"names":["useInfiniteQuery","options","queryClient","useBaseQuery","InfiniteQueryObserver"],"mappings":";;;AAWA;AACO,SAASA,gBAAgB,CAO9BC,OAOC,EACDC,WAAyB,EACc;EACvC,OAAOC,YAAY,CACjBF,OAAO;AACP;EACAG,qBAAqB,EACrBF,WAAW,CACZ,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"useInfiniteQuery.esm.js","sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["'use client'\nimport type {\n QueryObserver,\n QueryKey,\n QueryClient,\n DefaultError,\n InfiniteData,\n} from '@tanstack/query-core'\nimport { InfiniteQueryObserver } from '@tanstack/query-core'\nimport type { UseInfiniteQueryOptions, UseInfiniteQueryResult } from './types'\nimport { useBaseQuery } from './useBaseQuery'\n\n// HOOK\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): UseInfiniteQueryResult<TData, TError> {\n return useBaseQuery(\n options,\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n InfiniteQueryObserver as typeof QueryObserver,\n queryClient,\n ) as UseInfiniteQueryResult<TData, TError>\n}\n"],"names":[],"mappings":";;;;AAYA;AACO;;AAmBH;;AAIJ;;"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  'use strict';
2
3
 
3
4
  var queryCore = require('@tanstack/query-core');