@tanstack/react-query 5.0.0-alpha.68 → 5.0.0-alpha.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/QueryClientProvider.cjs +1 -1
- package/build/lib/QueryClientProvider.cjs.map +1 -1
- package/build/lib/QueryClientProvider.d.ts +1 -0
- package/build/lib/QueryClientProvider.d.ts.map +1 -1
- package/build/lib/QueryClientProvider.js +1 -1
- package/build/lib/QueryClientProvider.js.map +1 -1
- package/build/lib/QueryClientProvider.legacy.cjs +1 -1
- package/build/lib/QueryClientProvider.legacy.cjs.map +1 -1
- package/build/lib/QueryClientProvider.legacy.js +1 -1
- package/build/lib/QueryClientProvider.legacy.js.map +1 -1
- package/build/lib/QueryErrorResetBoundary.d.ts +1 -1
- package/build/lib/QueryErrorResetBoundary.d.ts.map +1 -1
- package/build/lib/__tests__/utils.d.ts +3 -3
- package/build/lib/__tests__/utils.d.ts.map +1 -1
- package/build/lib/useBaseQuery.cjs +1 -1
- package/build/lib/useBaseQuery.cjs.map +1 -1
- package/build/lib/useBaseQuery.d.ts +1 -0
- package/build/lib/useBaseQuery.d.ts.map +1 -1
- package/build/lib/useBaseQuery.js +1 -1
- package/build/lib/useBaseQuery.js.map +1 -1
- package/build/lib/useBaseQuery.legacy.cjs +1 -1
- package/build/lib/useBaseQuery.legacy.cjs.map +1 -1
- package/build/lib/useBaseQuery.legacy.js +1 -1
- package/build/lib/useBaseQuery.legacy.js.map +1 -1
- package/build/lib/useInfiniteQuery.cjs +1 -1
- package/build/lib/useInfiniteQuery.cjs.map +1 -1
- package/build/lib/useInfiniteQuery.d.ts +1 -0
- package/build/lib/useInfiniteQuery.d.ts.map +1 -1
- package/build/lib/useInfiniteQuery.js +1 -1
- package/build/lib/useInfiniteQuery.js.map +1 -1
- package/build/lib/useInfiniteQuery.legacy.cjs +1 -1
- package/build/lib/useInfiniteQuery.legacy.cjs.map +1 -1
- package/build/lib/useInfiniteQuery.legacy.js +1 -1
- package/build/lib/useInfiniteQuery.legacy.js.map +1 -1
- package/build/lib/useIsFetching.cjs +1 -1
- package/build/lib/useIsFetching.cjs.map +1 -1
- package/build/lib/useIsFetching.d.ts +1 -0
- package/build/lib/useIsFetching.d.ts.map +1 -1
- package/build/lib/useIsFetching.js +1 -1
- package/build/lib/useIsFetching.js.map +1 -1
- package/build/lib/useIsFetching.legacy.cjs +1 -1
- package/build/lib/useIsFetching.legacy.cjs.map +1 -1
- package/build/lib/useIsFetching.legacy.js +1 -1
- package/build/lib/useIsFetching.legacy.js.map +1 -1
- package/build/lib/useMutation.cjs +1 -1
- package/build/lib/useMutation.cjs.map +1 -1
- package/build/lib/useMutation.d.ts +1 -0
- package/build/lib/useMutation.d.ts.map +1 -1
- package/build/lib/useMutation.js +1 -1
- package/build/lib/useMutation.js.map +1 -1
- package/build/lib/useMutation.legacy.cjs +1 -1
- package/build/lib/useMutation.legacy.cjs.map +1 -1
- package/build/lib/useMutation.legacy.js +1 -1
- package/build/lib/useMutation.legacy.js.map +1 -1
- package/build/lib/useMutationState.cjs +1 -1
- package/build/lib/useMutationState.cjs.map +1 -1
- package/build/lib/useMutationState.d.ts +1 -0
- package/build/lib/useMutationState.d.ts.map +1 -1
- package/build/lib/useMutationState.js +1 -1
- package/build/lib/useMutationState.js.map +1 -1
- package/build/lib/useMutationState.legacy.cjs +1 -1
- package/build/lib/useMutationState.legacy.cjs.map +1 -1
- package/build/lib/useMutationState.legacy.js +1 -1
- package/build/lib/useMutationState.legacy.js.map +1 -1
- package/build/lib/useQueries.cjs +1 -1
- package/build/lib/useQueries.cjs.map +1 -1
- package/build/lib/useQueries.d.ts +1 -0
- package/build/lib/useQueries.d.ts.map +1 -1
- package/build/lib/useQueries.js +1 -1
- package/build/lib/useQueries.js.map +1 -1
- package/build/lib/useQueries.legacy.cjs +1 -1
- package/build/lib/useQueries.legacy.cjs.map +1 -1
- package/build/lib/useQueries.legacy.js +1 -1
- package/build/lib/useQueries.legacy.js.map +1 -1
- package/build/lib/useQuery.cjs +1 -1
- package/build/lib/useQuery.cjs.map +1 -1
- package/build/lib/useQuery.d.ts +1 -0
- package/build/lib/useQuery.d.ts.map +1 -1
- package/build/lib/useQuery.js +1 -1
- package/build/lib/useQuery.js.map +1 -1
- package/build/lib/useQuery.legacy.cjs +1 -1
- package/build/lib/useQuery.legacy.cjs.map +1 -1
- package/build/lib/useQuery.legacy.js +1 -1
- package/build/lib/useQuery.legacy.js.map +1 -1
- package/package.json +3 -2
- package/src/QueryClientProvider.tsx +1 -1
- package/src/useBaseQuery.ts +1 -1
- package/src/useInfiniteQuery.ts +1 -1
- package/src/useIsFetching.ts +1 -1
- package/src/useMutation.ts +1 -1
- package/src/useMutationState.ts +1 -1
- package/src/useQueries.ts +1 -1
- package/src/useQuery.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryClientProvider.cjs","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"QueryClientProvider.cjs","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["import 'client-only'\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","createElement","Provider","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAKO,MAAMA,kBAAkB,gBAAGC,gBAAK,CAACC,aAAa,CACnDC,SACF,EAAC;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,GAAGA,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;AAEZ,EAAA,oBACEL,gBAAA,CAAAa,aAAA,CAACd,kBAAkB,CAACe,QAAQ,EAAA;AAACC,IAAAA,KAAK,EAAEV,MAAAA;AAAO,GAAA,EACxCI,QAC0B,CAAC,CAAA;AAElC;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryClientProvider.d.ts","sourceRoot":"","sources":["../../src/QueryClientProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QueryClientProvider.d.ts","sourceRoot":"","sources":["../../src/QueryClientProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AACpB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEvD,eAAO,MAAM,kBAAkB,wCAE9B,CAAA;AAED,eAAO,MAAM,cAAc,iBAAkB,WAAW,gBAYvD,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,WAAW,CAAA;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,mBAAmB,0BAG7B,wBAAwB,KAAG,WAa7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryClientProvider.js","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"QueryClientProvider.js","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["import 'client-only'\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","createElement","Provider","value"],"mappings":";;;AAKO,MAAMA,kBAAkB,gBAAGC,KAAK,CAACC,aAAa,CACnDC,SACF,EAAC;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,GAAGA,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;AAEZ,EAAA,oBACEL,KAAA,CAAAa,aAAA,CAACd,kBAAkB,CAACe,QAAQ,EAAA;AAACC,IAAAA,KAAK,EAAEV,MAAAA;AAAO,GAAA,EACxCI,QAC0B,CAAC,CAAA;AAElC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryClientProvider.legacy.cjs","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"QueryClientProvider.legacy.cjs","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["import 'client-only'\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","createElement","Provider","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAKO,MAAMA,kBAAkB,gBAAGC,gBAAK,CAACC,aAAa,CACnDC,SACF,EAAC;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,GAAGA,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;AAEZ,EAAA,oBACEL,gBAAA,CAAAa,aAAA,CAACd,kBAAkB,CAACe,QAAQ,EAAA;AAACC,IAAAA,KAAK,EAAEV,MAAAA;AAAO,GAAA,EACxCI,QAC0B,CAAC,CAAA;AAElC;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryClientProvider.legacy.js","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"QueryClientProvider.legacy.js","sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["import 'client-only'\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","createElement","Provider","value"],"mappings":";;;AAKO,MAAMA,kBAAkB,gBAAGC,KAAK,CAACC,aAAa,CACnDC,SACF,EAAC;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,GAAGA,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;AAEZ,EAAA,oBACEL,KAAA,CAAAa,aAAA,CAACd,kBAAkB,CAACe,QAAQ,EAAA;AAACC,IAAAA,KAAK,EAAEV,MAAAA;AAAO,GAAA,EACxCI,QAC0B,CAAC,CAAA;AAElC;;;;"}
|
|
@@ -8,5 +8,5 @@ export declare const useQueryErrorResetBoundary: () => QueryErrorResetBoundaryVa
|
|
|
8
8
|
export interface QueryErrorResetBoundaryProps {
|
|
9
9
|
children: ((value: QueryErrorResetBoundaryValue) => React.ReactNode) | React.ReactNode;
|
|
10
10
|
}
|
|
11
|
-
export declare const QueryErrorResetBoundary: ({ children, }: QueryErrorResetBoundaryProps) =>
|
|
11
|
+
export declare const QueryErrorResetBoundary: ({ children, }: QueryErrorResetBoundaryProps) => JSX.Element;
|
|
12
12
|
//# sourceMappingURL=QueryErrorResetBoundary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryErrorResetBoundary.d.ts","sourceRoot":"","sources":["../../src/QueryErrorResetBoundary.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,OAAO,EAAE,MAAM,OAAO,CAAA;IACtB,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAqBD,eAAO,MAAM,0BAA0B,oCACW,CAAA;AAIlD,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EACJ,CAAC,CAAC,KAAK,EAAE,4BAA4B,KAAK,KAAK,CAAC,SAAS,CAAC,GAC1D,KAAK,CAAC,SAAS,CAAA;CACpB;AAED,eAAO,MAAM,uBAAuB,kBAEjC,4BAA4B,
|
|
1
|
+
{"version":3,"file":"QueryErrorResetBoundary.d.ts","sourceRoot":"","sources":["../../src/QueryErrorResetBoundary.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,OAAO,EAAE,MAAM,OAAO,CAAA;IACtB,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAqBD,eAAO,MAAM,0BAA0B,oCACW,CAAA;AAIlD,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EACJ,CAAC,CAAC,KAAK,EAAE,4BAA4B,KAAK,KAAK,CAAC,SAAS,CAAC,GAC1D,KAAK,CAAC,SAAS,CAAA;CACpB;AAED,eAAO,MAAM,uBAAuB,kBAEjC,4BAA4B,gBAS9B,CAAA"}
|
|
@@ -7,10 +7,10 @@ export declare function renderWithClient(client: QueryClient, ui: React.ReactEle
|
|
|
7
7
|
export declare const Blink: ({ duration, children, }: {
|
|
8
8
|
duration: number;
|
|
9
9
|
children: React.ReactNode;
|
|
10
|
-
}) =>
|
|
10
|
+
}) => JSX.Element;
|
|
11
11
|
export declare function createQueryClient(config?: QueryClientConfig): QueryClient;
|
|
12
|
-
export declare function mockVisibilityState(value: DocumentVisibilityState): import("vitest/dist/index-
|
|
13
|
-
export declare function mockNavigatorOnLine(value: boolean): import("vitest/dist/index-
|
|
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>;
|
|
14
14
|
export declare function queryKey(): Array<string>;
|
|
15
15
|
export declare function sleep(timeout: number): Promise<void>;
|
|
16
16
|
export declare function setActTimeout(fn: () => void, ms?: number): NodeJS.Timeout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/__tests__/utils.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,MAAM,EAAE,MAAM,wBAAwB,CAAA;AACp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EAAE,CAAC,GAAG,IAAI,CAExC;AAED,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,SAAS,CAC/D,CAAC,OACI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,GACtB,IAAI,GACJ,KAAK,CAAA;AAET,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,CAAA;AAEtC;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,IAAI,CAExE;AAID,wBAAgB,WAAW,CAAC,QAAQ,EAAE,OAAO,cAW5C;AAED,eAAO,MAAM,YAAY,UAAW,MAAM,IAAI,YAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBaseQuery.cjs","sources":["../../src/useBaseQuery.ts"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"useBaseQuery.cjs","sources":["../../src/useBaseQuery.ts"],"sourcesContent":["import 'client-only'\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 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 const unsubscribe = isRestoring\n ? () => undefined\n : observer.subscribe(notifyManager.batchCalls(onStoreChange))\n\n // Update result to make sure we did not miss any query updates\n // between creating the observer and subscribing to it.\n observer.updateResult()\n\n return unsubscribe\n },\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 throwOnError: defaultedOptions.throwOnError,\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","ensureStaleTime","ensurePreventErrorBoundaryRetry","useClearResetErrorBoundary","observer","React","useState","result","getOptimisticResult","useSyncExternalStore","useCallback","onStoreChange","unsubscribe","undefined","subscribe","notifyManager","batchCalls","updateResult","getCurrentResult","useEffect","setOptions","listeners","shouldSuspend","fetchOptimistic","getHasError","throwOnError","query","getCurrentQuery","error","notifyOnChangeProps","trackResult"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,SAASA,YAAYA,CAO1BC,OAMC,EACDC,QAA8B,EAC9BC,WAAyB,EACzB;AACA,EAAA,MAAMC,MAAM,GAAGC,kCAAc,CAACF,WAAW,CAAC,CAAA;AAC1C,EAAA,MAAMG,aAAW,GAAGC,0BAAc,EAAE,CAAA;AACpC,EAAA,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;EAEhBO,wBAAe,CAACH,gBAAgB,CAAC,CAAA;AACjCI,EAAAA,kDAA+B,CAACJ,gBAAgB,EAAEF,kBAAkB,CAAC,CAAA;EAErEO,6CAA0B,CAACP,kBAAkB,CAAC,CAAA;AAE9C,EAAA,MAAM,CAACQ,QAAQ,CAAC,GAAGC,gBAAK,CAACC,QAAQ,CAC/B,MACE,IAAIhB,QAAQ,CACVE,MAAM,EACNM,gBACF,CACJ,CAAC,CAAA;AAED,EAAA,MAAMS,MAAM,GAAGH,QAAQ,CAACI,mBAAmB,CAACV,gBAAgB,CAAC,CAAA;EAE7DO,gBAAK,CAACI,oBAAoB,CACxBJ,gBAAK,CAACK,WAAW,CACdC,aAAa,IAAK;AACjB,IAAA,MAAMC,WAAW,GAAGlB,aAAW,GAC3B,MAAMmB,SAAS,GACfT,QAAQ,CAACU,SAAS,CAACC,uBAAa,CAACC,UAAU,CAACL,aAAa,CAAC,CAAC,CAAA;;AAE/D;AACA;IACAP,QAAQ,CAACa,YAAY,EAAE,CAAA;AAEvB,IAAA,OAAOL,WAAW,CAAA;GACnB,EACD,CAACR,QAAQ,EAAEV,aAAW,CACxB,CAAC,EACD,MAAMU,QAAQ,CAACc,gBAAgB,EAAE,EACjC,MAAMd,QAAQ,CAACc,gBAAgB,EACjC,CAAC,CAAA;EAEDb,gBAAK,CAACc,SAAS,CAAC,MAAM;AACpB;AACA;AACAf,IAAAA,QAAQ,CAACgB,UAAU,CAACtB,gBAAgB,EAAE;AAAEuB,MAAAA,SAAS,EAAE,KAAA;AAAM,KAAC,CAAC,CAAA;AAC7D,GAAC,EAAE,CAACvB,gBAAgB,EAAEM,QAAQ,CAAC,CAAC,CAAA;;AAEhC;EACA,IAAIkB,sBAAa,CAACxB,gBAAgB,EAAES,MAAM,EAAEb,aAAW,CAAC,EAAE;AACxD,IAAA,MAAM6B,wBAAe,CAACzB,gBAAgB,EAAEM,QAAQ,EAAER,kBAAkB,CAAC,CAAA;AACvE,GAAA;;AAEA;AACA,EAAA,IACE4B,8BAAW,CAAC;IACVjB,MAAM;IACNX,kBAAkB;IAClB6B,YAAY,EAAE3B,gBAAgB,CAAC2B,YAAY;AAC3CC,IAAAA,KAAK,EAAEtB,QAAQ,CAACuB,eAAe,EAAC;AAClC,GAAC,CAAC,EACF;IACA,MAAMpB,MAAM,CAACqB,KAAK,CAAA;AACpB,GAAA;;AAEA;AACA,EAAA,OAAO,CAAC9B,gBAAgB,CAAC+B,mBAAmB,GACxCzB,QAAQ,CAAC0B,WAAW,CAACvB,MAAM,CAAC,GAC5BA,MAAM,CAAA;AACZ;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import 'client-only';
|
|
1
2
|
import type { QueryClient, QueryKey, QueryObserver } from '@tanstack/query-core';
|
|
2
3
|
import type { UseBaseQueryOptions } from './types';
|
|
3
4
|
export declare function useBaseQuery<TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey>(options: UseBaseQueryOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, Observer: typeof QueryObserver, queryClient?: QueryClient): import("@tanstack/query-core").QueryObserverResult<TData, TError>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBaseQuery.d.ts","sourceRoot":"","sources":["../../src/useBaseQuery.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useBaseQuery.d.ts","sourceRoot":"","sources":["../../src/useBaseQuery.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAGpB,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAIhF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AASlD,wBAAgB,YAAY,CAC1B,YAAY,EACZ,MAAM,EACN,KAAK,EACL,UAAU,EACV,SAAS,SAAS,QAAQ,EAE1B,OAAO,EAAE,mBAAmB,CAC1B,YAAY,EACZ,MAAM,EACN,KAAK,EACL,UAAU,EACV,SAAS,CACV,EACD,QAAQ,EAAE,OAAO,aAAa,EAC9B,WAAW,CAAC,EAAE,WAAW,qEAyE1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBaseQuery.js","sources":["../../src/useBaseQuery.ts"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"useBaseQuery.js","sources":["../../src/useBaseQuery.ts"],"sourcesContent":["import 'client-only'\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 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 const unsubscribe = isRestoring\n ? () => undefined\n : observer.subscribe(notifyManager.batchCalls(onStoreChange))\n\n // Update result to make sure we did not miss any query updates\n // between creating the observer and subscribing to it.\n observer.updateResult()\n\n return unsubscribe\n },\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 throwOnError: defaultedOptions.throwOnError,\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","ensureStaleTime","ensurePreventErrorBoundaryRetry","useClearResetErrorBoundary","observer","React","useState","result","getOptimisticResult","useSyncExternalStore","useCallback","onStoreChange","unsubscribe","undefined","subscribe","notifyManager","batchCalls","updateResult","getCurrentResult","useEffect","setOptions","listeners","shouldSuspend","fetchOptimistic","getHasError","throwOnError","query","getCurrentQuery","error","notifyOnChangeProps","trackResult"],"mappings":";;;;;;;;;AAgBO,SAASA,YAAYA,CAO1BC,OAMC,EACDC,QAA8B,EAC9BC,WAAyB,EACzB;AACA,EAAA,MAAMC,MAAM,GAAGC,cAAc,CAACF,WAAW,CAAC,CAAA;AAC1C,EAAA,MAAMG,WAAW,GAAGC,cAAc,EAAE,CAAA;AACpC,EAAA,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;EAEhBO,eAAe,CAACH,gBAAgB,CAAC,CAAA;AACjCI,EAAAA,+BAA+B,CAACJ,gBAAgB,EAAEF,kBAAkB,CAAC,CAAA;EAErEO,0BAA0B,CAACP,kBAAkB,CAAC,CAAA;AAE9C,EAAA,MAAM,CAACQ,QAAQ,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAC/B,MACE,IAAIhB,QAAQ,CACVE,MAAM,EACNM,gBACF,CACJ,CAAC,CAAA;AAED,EAAA,MAAMS,MAAM,GAAGH,QAAQ,CAACI,mBAAmB,CAACV,gBAAgB,CAAC,CAAA;EAE7DO,KAAK,CAACI,oBAAoB,CACxBJ,KAAK,CAACK,WAAW,CACdC,aAAa,IAAK;AACjB,IAAA,MAAMC,W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
|
|
1
|
+
{"version":3,"file":"useBaseQuery.legacy.cjs","sources":["../../src/useBaseQuery.ts"],"sourcesContent":["import 'client-only'\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 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 const unsubscribe = isRestoring\n ? () => undefined\n : observer.subscribe(notifyManager.batchCalls(onStoreChange))\n\n // Update result to make sure we did not miss any query updates\n // between creating the observer and subscribing to it.\n observer.updateResult()\n\n return unsubscribe\n },\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 throwOnError: defaultedOptions.throwOnError,\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","ensureStaleTime","ensurePreventErrorBoundaryRetry","useClearResetErrorBoundary","observer","React","useState","result","getOptimisticResult","useSyncExternalStore","useCallback","onStoreChange","unsubscribe","undefined","subscribe","notifyManager","batchCalls","updateResult","getCurrentResult","useEffect","setOptions","listeners","shouldSuspend","fetchOptimistic","getHasError","throwOnError","query","getCurrentQuery","error","notifyOnChangeProps","trackResult"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,SAASA,YAAYA,CAO1BC,OAMC,EACDC,QAA8B,EAC9BC,WAAyB,EACzB;AACA,EAAA,MAAMC,MAAM,GAAGC,kCAAc,CAACF,WAAW,CAAC,CAAA;AAC1C,EAAA,MAAMG,aAAW,GAAGC,0BAAc,EAAE,CAAA;AACpC,EAAA,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;EAEhBO,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B,8BAAW,CAAC;IACVjB,MAAM;IACNX,kBAAkB;IAClB6B,YAAY,EAAE3B,gBAAgB,CAAC2B,YAAY;AAC3CC,IAAAA,KAAK,EAAEtB,QAAQ,CAACuB,eAAe,EAAC;AAClC,GAAC,CAAC,EACF;IACA,MAAMpB,MAAM,CAACqB,KAAK,CAAA;AACpB,GAAA;;AAEA;AACA,EAAA,OAAO,CAAC9B,gBAAgB,CAAC+B,mBAAmB,GACxCzB,QAAQ,CAAC0B,WAAW,CAACvB,MAAM,CAAC,GAC5BA,MAAM,CAAA;AACZ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBaseQuery.legacy.js","sources":["../../src/useBaseQuery.ts"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"useBaseQuery.legacy.js","sources":["../../src/useBaseQuery.ts"],"sourcesContent":["import 'client-only'\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 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 const unsubscribe = isRestoring\n ? () => undefined\n : observer.subscribe(notifyManager.batchCalls(onStoreChange))\n\n // Update result to make sure we did not miss any query updates\n // between creating the observer and subscribing to it.\n observer.updateResult()\n\n return unsubscribe\n },\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 throwOnError: defaultedOptions.throwOnError,\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","ensureStaleTime","ensurePreventErrorBoundaryRetry","useClearResetErrorBoundary","observer","React","useState","result","getOptimisticResult","useSyncExternalStore","useCallback","onStoreChange","unsubscribe","undefined","subscribe","notifyManager","batchCalls","updateResult","getCurrentResult","useEffect","setOptions","listeners","shouldSuspend","fetchOptimistic","getHasError","throwOnError","query","getCurrentQuery","error","notifyOnChangeProps","trackResult"],"m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AAK,CAACc,SAAS,CAAC,MAAM;AACpB;AACA;AACAf,IAAAA,QAAQ,CAACgB,UAAU,CAACtB,gBAAgB,EAAE;AAAEuB,MAAAA,SAAS,EAAE,KAAA;AAAM,KAAC,CAAC,CAAA;AAC7D,GAAC,EAAE,CAACvB,gBAAgB,EAAEM,QAAQ,CAAC,CAAC,CAAA;;AAEhC;EACA,IAAIkB,aAAa,CAACxB,gBAAgB,EAAES,MAAM,EAAEb,WAAW,CAAC,EAAE;AACxD,IAAA,MAAM6B,eAAe,CAACzB,gBAAgB,EAAEM,QAAQ,EAAER,kBAAkB,CAAC,CAAA;AACvE,GAAA;;AAEA;AACA,EAAA,IACE4B,WAAW,CAAC;IACVjB,MAAM;IACNX,kBAAkB;IAClB6B,YAAY,EAAE3B,gBAAgB,CAAC2B,YAAY;AAC3CC,IAAAA,KAAK,EAAEtB,QAAQ,CAACuB,eAAe,EAAC;AAClC,GAAC,CAAC,EACF;IACA,MAAMpB,MAAM,CAACqB,KAAK,CAAA;AACpB,GAAA;;AAEA;AACA,EAAA,OAAO,CAAC9B,gBAAgB,CAAC+B,mBAAmB,GACxCzB,QAAQ,CAAC0B,WAAW,CAACvB,MAAM,CAAC,GAC5BA,MAAM,CAAA;AACZ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInfiniteQuery.cjs","sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"useInfiniteQuery.cjs","sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["import 'client-only'\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":["useInfiniteQuery","options","queryClient","useBaseQuery","InfiniteQueryObserver"],"mappings":";;;;;;AAYA;AACO,SAASA,gBAAgBA,CAO9BC,OAOC,EACDC,WAAyB,EACc;EACvC,OAAOC,yBAAY,CACjBF,OAAO;AACP;EACAG,+BAAqB,EACrBF,WACF,CAAC,CAAA;AACH;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import 'client-only';
|
|
1
2
|
import type { QueryKey, QueryClient, DefaultError, InfiniteData } from '@tanstack/query-core';
|
|
2
3
|
import type { UseInfiniteQueryOptions, UseInfiniteQueryResult } from './types';
|
|
3
4
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInfiniteQuery.d.ts","sourceRoot":"","sources":["../../src/useInfiniteQuery.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useInfiniteQuery.d.ts","sourceRoot":"","sources":["../../src/useInfiniteQuery.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AACpB,OAAO,KAAK,EAEV,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,YAAY,EACb,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAI9E,wBAAgB,gBAAgB,CAC9B,YAAY,EACZ,MAAM,GAAG,YAAY,EACrB,KAAK,GAAG,YAAY,CAAC,YAAY,CAAC,EAClC,SAAS,SAAS,QAAQ,GAAG,QAAQ,EACrC,UAAU,GAAG,OAAO,EAEpB,OAAO,EAAE,uBAAuB,CAC9B,YAAY,EACZ,MAAM,EACN,KAAK,EACL,YAAY,EACZ,SAAS,EACT,UAAU,CACX,EACD,WAAW,CAAC,EAAE,WAAW,GACxB,sBAAsB,CAAC,KAAK,EAAE,MAAM,CAAC,CAOvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInfiniteQuery.js","sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"useInfiniteQuery.js","sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["import 'client-only'\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":["useInfiniteQuery","options","queryClient","useBaseQuery","InfiniteQueryObserver"],"mappings":";;;;AAYA;AACO,SAASA,gBAAgBA,CAO9BC,OAOC,EACDC,WAAyB,EACc;EACvC,OAAOC,YAAY,CACjBF,OAAO;AACP;EACAG,qBAAqB,EACrBF,WACF,CAAC,CAAA;AACH;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInfiniteQuery.legacy.cjs","sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"useInfiniteQuery.legacy.cjs","sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["import 'client-only'\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":["useInfiniteQuery","options","queryClient","useBaseQuery","InfiniteQueryObserver"],"mappings":";;;;;;AAYA;AACO,SAASA,gBAAgBA,CAO9BC,OAOC,EACDC,WAAyB,EACc;EACvC,OAAOC,yBAAY,CACjBF,OAAO;AACP;EACAG,+BAAqB,EACrBF,WACF,CAAC,CAAA;AACH;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInfiniteQuery.legacy.js","sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"useInfiniteQuery.legacy.js","sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["import 'client-only'\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":["useInfiniteQuery","options","queryClient","useBaseQuery","InfiniteQueryObserver"],"mappings":";;;;AAYA;AACO,SAASA,gBAAgBA,CAO9BC,OAOC,EACDC,WAAyB,EACc;EACvC,OAAOC,YAAY,CACjBF,OAAO;AACP;EACAG,qBAAqB,EACrBF,WACF,CAAC,CAAA;AACH;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsFetching.cjs","sources":["../../src/useIsFetching.ts"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"useIsFetching.cjs","sources":["../../src/useIsFetching.ts"],"sourcesContent":["import 'client-only'\nimport * as React from 'react'\nimport type { QueryClient, QueryFilters } from '@tanstack/query-core'\nimport { notifyManager } from '@tanstack/query-core'\n\nimport { useQueryClient } from './QueryClientProvider'\n\nexport function useIsFetching(\n filters?: QueryFilters,\n queryClient?: QueryClient,\n): number {\n const client = useQueryClient(queryClient)\n const queryCache = client.getQueryCache()\n\n return React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n queryCache.subscribe(notifyManager.batchCalls(onStoreChange)),\n [queryCache],\n ),\n () => client.isFetching(filters),\n () => client.isFetching(filters),\n )\n}\n"],"names":["useIsFetching","filters","queryClient","client","useQueryClient","queryCache","getQueryCache","React","useSyncExternalStore","useCallback","onStoreChange","subscribe","notifyManager","batchCalls","isFetching"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,SAASA,aAAaA,CAC3BC,OAAsB,EACtBC,WAAyB,EACjB;AACR,EAAA,MAAMC,MAAM,GAAGC,kCAAc,CAACF,WAAW,CAAC,CAAA;AAC1C,EAAA,MAAMG,UAAU,GAAGF,MAAM,CAACG,aAAa,EAAE,CAAA;AAEzC,EAAA,OAAOC,gBAAK,CAACC,oBAAoB,CAC/BD,gBAAK,CAACE,WAAW,CACdC,aAAa,IACZL,UAAU,CAACM,SAAS,CAACC,uBAAa,CAACC,UAAU,CAACH,aAAa,CAAC,CAAC,EAC/D,CAACL,UAAU,CACb,CAAC,EACD,MAAMF,MAAM,CAACW,UAAU,CAACb,OAAO,CAAC,EAChC,MAAME,MAAM,CAACW,UAAU,CAACb,OAAO,CACjC,CAAC,CAAA;AACH;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsFetching.d.ts","sourceRoot":"","sources":["../../src/useIsFetching.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useIsFetching.d.ts","sourceRoot":"","sources":["../../src/useIsFetching.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAKrE,wBAAgB,aAAa,CAC3B,OAAO,CAAC,EAAE,YAAY,EACtB,WAAW,CAAC,EAAE,WAAW,GACxB,MAAM,CAaR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsFetching.js","sources":["../../src/useIsFetching.ts"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"useIsFetching.js","sources":["../../src/useIsFetching.ts"],"sourcesContent":["import 'client-only'\nimport * as React from 'react'\nimport type { QueryClient, QueryFilters } from '@tanstack/query-core'\nimport { notifyManager } from '@tanstack/query-core'\n\nimport { useQueryClient } from './QueryClientProvider'\n\nexport function useIsFetching(\n filters?: QueryFilters,\n queryClient?: QueryClient,\n): number {\n const client = useQueryClient(queryClient)\n const queryCache = client.getQueryCache()\n\n return React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n queryCache.subscribe(notifyManager.batchCalls(onStoreChange)),\n [queryCache],\n ),\n () => client.isFetching(filters),\n () => client.isFetching(filters),\n )\n}\n"],"names":["useIsFetching","filters","queryClient","client","useQueryClient","queryCache","getQueryCache","React","useSyncExternalStore","useCallback","onStoreChange","subscribe","notifyManager","batchCalls","isFetching"],"mappings":";;;;;AAOO,SAASA,aAAaA,CAC3BC,OAAsB,EACtBC,WAAyB,EACjB;AACR,EAAA,MAAMC,MAAM,GAAGC,cAAc,CAACF,WAAW,CAAC,CAAA;AAC1C,EAAA,MAAMG,UAAU,GAAGF,MAAM,CAACG,aAAa,EAAE,CAAA;AAEzC,EAAA,OAAOC,KAAK,CAACC,oBAAoB,CAC/BD,KAAK,CAACE,WAAW,CACdC,aAAa,IACZL,UAAU,CAACM,SAAS,CAACC,aAAa,CAACC,UAAU,CAACH,aAAa,CAAC,CAAC,EAC/D,CAACL,UAAU,CACb,CAAC,EACD,MAAMF,MAAM,CAACW,UAAU,CAACb,OAAO,CAAC,EAChC,MAAME,MAAM,CAACW,UAAU,CAACb,OAAO,CACjC,CAAC,CAAA;AACH;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsFetching.legacy.cjs","sources":["../../src/useIsFetching.ts"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"useIsFetching.legacy.cjs","sources":["../../src/useIsFetching.ts"],"sourcesContent":["import 'client-only'\nimport * as React from 'react'\nimport type { QueryClient, QueryFilters } from '@tanstack/query-core'\nimport { notifyManager } from '@tanstack/query-core'\n\nimport { useQueryClient } from './QueryClientProvider'\n\nexport function useIsFetching(\n filters?: QueryFilters,\n queryClient?: QueryClient,\n): number {\n const client = useQueryClient(queryClient)\n const queryCache = client.getQueryCache()\n\n return React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n queryCache.subscribe(notifyManager.batchCalls(onStoreChange)),\n [queryCache],\n ),\n () => client.isFetching(filters),\n () => client.isFetching(filters),\n )\n}\n"],"names":["useIsFetching","filters","queryClient","client","useQueryClient","queryCache","getQueryCache","React","useSyncExternalStore","useCallback","onStoreChange","subscribe","notifyManager","batchCalls","isFetching"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,SAASA,aAAaA,CAC3BC,OAAsB,EACtBC,WAAyB,EACjB;AACR,EAAA,MAAMC,MAAM,GAAGC,kCAAc,CAACF,WAAW,CAAC,CAAA;AAC1C,EAAA,MAAMG,UAAU,GAAGF,MAAM,CAACG,aAAa,EAAE,CAAA;AAEzC,EAAA,OAAOC,gBAAK,CAACC,oBAAoB,CAC/BD,gBAAK,CAACE,WAAW,CACdC,aAAa,IACZL,UAAU,CAACM,SAAS,CAACC,uBAAa,CAACC,UAAU,CAACH,aAAa,CAAC,CAAC,EAC/D,CAACL,UAAU,CACb,CAAC,EACD,MAAMF,MAAM,CAACW,UAAU,CAACb,OAAO,CAAC,EAChC,MAAME,MAAM,CAACW,UAAU,CAACb,OAAO,CACjC,CAAC,CAAA;AACH;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsFetching.legacy.js","sources":["../../src/useIsFetching.ts"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"useIsFetching.legacy.js","sources":["../../src/useIsFetching.ts"],"sourcesContent":["import 'client-only'\nimport * as React from 'react'\nimport type { QueryClient, QueryFilters } from '@tanstack/query-core'\nimport { notifyManager } from '@tanstack/query-core'\n\nimport { useQueryClient } from './QueryClientProvider'\n\nexport function useIsFetching(\n filters?: QueryFilters,\n queryClient?: QueryClient,\n): number {\n const client = useQueryClient(queryClient)\n const queryCache = client.getQueryCache()\n\n return React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n queryCache.subscribe(notifyManager.batchCalls(onStoreChange)),\n [queryCache],\n ),\n () => client.isFetching(filters),\n () => client.isFetching(filters),\n )\n}\n"],"names":["useIsFetching","filters","queryClient","client","useQueryClient","queryCache","getQueryCache","React","useSyncExternalStore","useCallback","onStoreChange","subscribe","notifyManager","batchCalls","isFetching"],"mappings":";;;;;AAOO,SAASA,aAAaA,CAC3BC,OAAsB,EACtBC,WAAyB,EACjB;AACR,EAAA,MAAMC,MAAM,GAAGC,cAAc,CAACF,WAAW,CAAC,CAAA;AAC1C,EAAA,MAAMG,UAAU,GAAGF,MAAM,CAACG,aAAa,EAAE,CAAA;AAEzC,EAAA,OAAOC,KAAK,CAACC,oBAAoB,CAC/BD,KAAK,CAACE,WAAW,CACdC,aAAa,IACZL,UAAU,CAACM,SAAS,CAACC,aAAa,CAACC,UAAU,CAACH,aAAa,CAAC,CAAC,EAC/D,CAACL,UAAU,CACb,CAAC,EACD,MAAMF,MAAM,CAACW,UAAU,CAACb,OAAO,CAAC,EAChC,MAAME,MAAM,CAACW,UAAU,CAACb,OAAO,CACjC,CAAC,CAAA;AACH;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMutation.cjs","sources":["../../src/useMutation.ts"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"useMutation.cjs","sources":["../../src/useMutation.ts"],"sourcesContent":["import 'client-only'\nimport * as React from 'react'\nimport type { QueryClient, DefaultError } from '@tanstack/query-core'\nimport { notifyManager, MutationObserver } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\nimport type {\n UseMutateFunction,\n UseMutationOptions,\n UseMutationResult,\n} from './types'\nimport { shouldThrowError } from './utils'\n\n// HOOK\n\nexport function useMutation<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TContext = unknown,\n>(\n options: UseMutationOptions<TData, TError, TVariables, TContext>,\n queryClient?: QueryClient,\n): UseMutationResult<TData, TError, TVariables, TContext> {\n const client = useQueryClient(queryClient)\n\n const [observer] = React.useState(\n () =>\n new MutationObserver<TData, TError, TVariables, TContext>(\n client,\n options,\n ),\n )\n\n React.useEffect(() => {\n observer.setOptions(options)\n }, [observer, options])\n\n const result = React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer],\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult(),\n )\n\n const mutate = React.useCallback<\n UseMutateFunction<TData, TError, TVariables, TContext>\n >(\n (variables, mutateOptions) => {\n observer.mutate(variables, mutateOptions).catch(noop)\n },\n [observer],\n )\n\n if (\n result.error &&\n shouldThrowError(observer.options.throwOnError, [result.error])\n ) {\n throw result.error\n }\n\n return { ...result, mutate, mutateAsync: result.mutate }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nfunction noop() {}\n"],"names":["useMutation","options","queryClient","client","useQueryClient","observer","React","useState","MutationObserver","useEffect","setOptions","result","useSyncExternalStore","useCallback","onStoreChange","subscribe","notifyManager","batchCalls","getCurrentResult","mutate","variables","mutateOptions","catch","noop","error","shouldThrowError","throwOnError","mutateAsync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA;;AAEO,SAASA,WAAWA,CAMzBC,OAAgE,EAChEC,WAAyB,EAC+B;AACxD,EAAA,MAAMC,MAAM,GAAGC,kCAAc,CAACF,WAAW,CAAC,CAAA;AAE1C,EAAA,MAAM,CAACG,QAAQ,CAAC,GAAGC,gBAAK,CAACC,QAAQ,CAC/B,MACE,IAAIC,0BAAgB,CAClBL,MAAM,EACNF,OACF,CACJ,CAAC,CAAA;EAEDK,gBAAK,CAACG,SAAS,CAAC,MAAM;AACpBJ,IAAAA,QAAQ,CAACK,UAAU,CAACT,OAAO,CAAC,CAAA;AAC9B,GAAC,EAAE,CAACI,QAAQ,EAAEJ,OAAO,CAAC,CAAC,CAAA;AAEvB,EAAA,MAAMU,MAAM,GAAGL,gBAAK,CAACM,oBAAoB,CACvCN,gBAAK,CAACO,WAAW,CACdC,aAAa,IACZT,QAAQ,CAACU,SAAS,CAACC,uBAAa,CAACC,UAAU,CAACH,aAAa,CAAC,CAAC,EAC7D,CAACT,QAAQ,CACX,CAAC,EACD,MAAMA,QAAQ,CAACa,gBAAgB,EAAE,EACjC,MAAMb,QAAQ,CAACa,gBAAgB,EACjC,CAAC,CAAA;EAED,MAAMC,MAAM,GAAGb,gBAAK,CAACO,WAAW,CAG9B,CAACO,SAAS,EAAEC,aAAa,KAAK;IAC5BhB,QAAQ,CAACc,MAAM,CAACC,SAAS,EAAEC,aAAa,CAAC,CAACC,KAAK,CAACC,IAAI,CAAC,CAAA;AACvD,GAAC,EACD,CAAClB,QAAQ,CACX,CAAC,CAAA;AAED,EAAA,IACEM,MAAM,CAACa,KAAK,IACZC,sBAAgB,CAACpB,QAAQ,CAACJ,OAAO,CAACyB,YAAY,EAAE,CAACf,MAAM,CAACa,KAAK,CAAC,CAAC,EAC/D;IACA,MAAMb,MAAM,CAACa,KAAK,CAAA;AACpB,GAAA;EAEA,OAAO;AAAE,IAAA,GAAGb,MAAM;IAAEQ,MAAM;IAAEQ,WAAW,EAAEhB,MAAM,CAACQ,MAAAA;GAAQ,CAAA;AAC1D,CAAA;;AAEA;AACA,SAASI,IAAIA,GAAG;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import 'client-only';
|
|
1
2
|
import type { QueryClient, DefaultError } from '@tanstack/query-core';
|
|
2
3
|
import type { UseMutationOptions, UseMutationResult } from './types';
|
|
3
4
|
export declare function useMutation<TData = unknown, TError = DefaultError, TVariables = void, TContext = unknown>(options: UseMutationOptions<TData, TError, TVariables, TContext>, queryClient?: QueryClient): UseMutationResult<TData, TError, TVariables, TContext>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMutation.d.ts","sourceRoot":"","sources":["../../src/useMutation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useMutation.d.ts","sourceRoot":"","sources":["../../src/useMutation.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGrE,OAAO,KAAK,EAEV,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,SAAS,CAAA;AAKhB,wBAAgB,WAAW,CACzB,KAAK,GAAG,OAAO,EACf,MAAM,GAAG,YAAY,EACrB,UAAU,GAAG,IAAI,EACjB,QAAQ,GAAG,OAAO,EAElB,OAAO,EAAE,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,EAChE,WAAW,CAAC,EAAE,WAAW,GACxB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,CA0CxD"}
|
package/build/lib/useMutation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMutation.js","sources":["../../src/useMutation.ts"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"useMutation.js","sources":["../../src/useMutation.ts"],"sourcesContent":["import 'client-only'\nimport * as React from 'react'\nimport type { QueryClient, DefaultError } from '@tanstack/query-core'\nimport { notifyManager, MutationObserver } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\nimport type {\n UseMutateFunction,\n UseMutationOptions,\n UseMutationResult,\n} from './types'\nimport { shouldThrowError } from './utils'\n\n// HOOK\n\nexport function useMutation<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TContext = unknown,\n>(\n options: UseMutationOptions<TData, TError, TVariables, TContext>,\n queryClient?: QueryClient,\n): UseMutationResult<TData, TError, TVariables, TContext> {\n const client = useQueryClient(queryClient)\n\n const [observer] = React.useState(\n () =>\n new MutationObserver<TData, TError, TVariables, TContext>(\n client,\n options,\n ),\n )\n\n React.useEffect(() => {\n observer.setOptions(options)\n }, [observer, options])\n\n const result = React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer],\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult(),\n )\n\n const mutate = React.useCallback<\n UseMutateFunction<TData, TError, TVariables, TContext>\n >(\n (variables, mutateOptions) => {\n observer.mutate(variables, mutateOptions).catch(noop)\n },\n [observer],\n )\n\n if (\n result.error &&\n shouldThrowError(observer.options.throwOnError, [result.error])\n ) {\n throw result.error\n }\n\n return { ...result, mutate, mutateAsync: result.mutate }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nfunction noop() {}\n"],"names":["useMutation","options","queryClient","client","useQueryClient","observer","React","useState","MutationObserver","useEffect","setOptions","result","useSyncExternalStore","useCallback","onStoreChange","subscribe","notifyManager","batchCalls","getCurrentResult","mutate","variables","mutateOptions","catch","noop","error","shouldThrowError","throwOnError","mutateAsync"],"mappings":";;;;;;AAYA;;AAEO,SAASA,WAAWA,CAMzBC,OAAgE,EAChEC,WAAyB,EAC+B;AACxD,EAAA,MAAMC,MAAM,GAAGC,cAAc,CAACF,WAAW,CAAC,CAAA;AAE1C,EAAA,MAAM,CAACG,QAAQ,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAC/B,MACE,IAAIC,gBAAgB,CAClBL,MAAM,EACNF,OACF,CACJ,CAAC,CAAA;EAEDK,KAAK,CAACG,SAAS,CAAC,MAAM;AACpBJ,IAAAA,QAAQ,CAACK,UAAU,CAACT,OAAO,CAAC,CAAA;AAC9B,GAAC,EAAE,CAACI,QAAQ,EAAEJ,OAAO,CAAC,CAAC,CAAA;AAEvB,EAAA,MAAMU,MAAM,GAAGL,KAAK,CAACM,oBAAoB,CACvCN,KAAK,CAACO,WAAW,CACdC,aAAa,IACZT,QAAQ,CAACU,SAAS,CAACC,aAAa,CAACC,UAAU,CAACH,aAAa,CAAC,CAAC,EAC7D,CAACT,QAAQ,CACX,CAAC,EACD,MAAMA,QAAQ,CAACa,gBAAgB,EAAE,EACjC,MAAMb,QAAQ,CAACa,gBAAgB,EACjC,CAAC,CAAA;EAED,MAAMC,MAAM,GAAGb,KAAK,CAACO,WAAW,CAG9B,CAACO,SAAS,EAAEC,aAAa,KAAK;IAC5BhB,QAAQ,CAACc,MAAM,CAACC,SAAS,EAAEC,aAAa,CAAC,CAACC,KAAK,CAACC,IAAI,CAAC,CAAA;AACvD,GAAC,EACD,CAAClB,QAAQ,CACX,CAAC,CAAA;AAED,EAAA,IACEM,MAAM,CAACa,KAAK,IACZC,gBAAgB,CAACpB,QAAQ,CAACJ,OAAO,CAACyB,YAAY,EAAE,CAACf,MAAM,CAACa,KAAK,CAAC,CAAC,EAC/D;IACA,MAAMb,MAAM,CAACa,KAAK,CAAA;AACpB,GAAA;EAEA,OAAO;AAAE,IAAA,GAAGb,MAAM;IAAEQ,MAAM;IAAEQ,WAAW,EAAEhB,MAAM,CAACQ,MAAAA;GAAQ,CAAA;AAC1D,CAAA;;AAEA;AACA,SAASI,IAAIA,GAAG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMutation.legacy.cjs","sources":["../../src/useMutation.ts"],"sourcesContent":["'
|
|
1
|
+
{"version":3,"file":"useMutation.legacy.cjs","sources":["../../src/useMutation.ts"],"sourcesContent":["import 'client-only'\nimport * as React from 'react'\nimport type { QueryClient, DefaultError } from '@tanstack/query-core'\nimport { notifyManager, MutationObserver } from '@tanstack/query-core'\nimport { useQueryClient } from './QueryClientProvider'\nimport type {\n UseMutateFunction,\n UseMutationOptions,\n UseMutationResult,\n} from './types'\nimport { shouldThrowError } from './utils'\n\n// HOOK\n\nexport function useMutation<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TContext = unknown,\n>(\n options: UseMutationOptions<TData, TError, TVariables, TContext>,\n queryClient?: QueryClient,\n): UseMutationResult<TData, TError, TVariables, TContext> {\n const client = useQueryClient(queryClient)\n\n const [observer] = React.useState(\n () =>\n new MutationObserver<TData, TError, TVariables, TContext>(\n client,\n options,\n ),\n )\n\n React.useEffect(() => {\n observer.setOptions(options)\n }, [observer, options])\n\n const result = React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) =>\n observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer],\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult(),\n )\n\n const mutate = React.useCallback<\n UseMutateFunction<TData, TError, TVariables, TContext>\n >(\n (variables, mutateOptions) => {\n observer.mutate(variables, mutateOptions).catch(noop)\n },\n [observer],\n )\n\n if (\n result.error &&\n shouldThrowError(observer.options.throwOnError, [result.error])\n ) {\n throw result.error\n }\n\n return { ...result, mutate, mutateAsync: result.mutate }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nfunction noop() {}\n"],"names":["useMutation","options","queryClient","client","useQueryClient","observer","React","useState","MutationObserver","useEffect","setOptions","result","useSyncExternalStore","useCallback","onStoreChange","subscribe","notifyManager","batchCalls","getCurrentResult","mutate","variables","mutateOptions","catch","noop","error","shouldThrowError","throwOnError","mutateAsync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA;;AAEO,SAASA,WAAWA,CAMzBC,OAAgE,EAChEC,WAAyB,EAC+B;AACxD,EAAA,MAAMC,MAAM,GAAGC,kCAAc,CAACF,WAAW,CAAC,CAAA;AAE1C,EAAA,MAAM,CAACG,QAAQ,CAAC,GAAGC,gBAAK,CAACC,QAAQ,CAC/B,MACE,IAAIC,0BAAgB,CAClBL,MAAM,EACNF,OACF,CACJ,CAAC,CAAA;EAEDK,gBAAK,CAACG,SAAS,CAAC,MAAM;AACpBJ,IAAAA,QAAQ,CAACK,UAAU,CAACT,OAAO,CAAC,CAAA;AAC9B,GAAC,EAAE,CAACI,QAAQ,EAAEJ,OAA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