@suspensive/react-query-4 3.5.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IsFetching-B4Vc2Gjq.cjs +19 -0
- package/dist/IsFetching-B4Vc2Gjq.cjs.map +1 -0
- package/dist/IsFetching-CdzjaqXq.js +13 -0
- package/dist/IsFetching-CdzjaqXq.js.map +1 -0
- package/dist/IsFetching-CkmGTPJN.d.ts +18 -0
- package/dist/IsFetching-CkmGTPJN.d.ts.map +1 -0
- package/dist/IsFetching-DLYjn25w.d.cts +18 -0
- package/dist/IsFetching-DLYjn25w.d.cts.map +1 -0
- package/dist/IsFetching.cjs +4 -0
- package/dist/IsFetching.d.cts +2 -0
- package/dist/IsFetching.d.ts +2 -0
- package/dist/IsFetching.js +4 -0
- package/dist/Mutation-Bce1dsN-.js +17 -0
- package/dist/Mutation-Bce1dsN-.js.map +1 -0
- package/dist/Mutation-DjJrlkHw.d.cts +16 -0
- package/dist/Mutation-DjJrlkHw.d.cts.map +1 -0
- package/dist/Mutation-PWvs-qF6.d.ts +16 -0
- package/dist/Mutation-PWvs-qF6.d.ts.map +1 -0
- package/dist/Mutation-lwzJrTh2.cjs +22 -0
- package/dist/Mutation-lwzJrTh2.cjs.map +1 -0
- package/dist/Mutation.cjs +3 -53
- package/dist/Mutation.d.cts +2 -9
- package/dist/Mutation.d.ts +2 -9
- package/dist/Mutation.js +4 -8
- package/dist/PrefetchInfiniteQuery-BLl2j9kS.d.ts +19 -0
- package/dist/PrefetchInfiniteQuery-BLl2j9kS.d.ts.map +1 -0
- package/dist/PrefetchInfiniteQuery-Ctpd2TL8.cjs +27 -0
- package/dist/PrefetchInfiniteQuery-Ctpd2TL8.cjs.map +1 -0
- package/dist/PrefetchInfiniteQuery-DcqKatgX.js +21 -0
- package/dist/PrefetchInfiniteQuery-DcqKatgX.js.map +1 -0
- package/dist/PrefetchInfiniteQuery-lOc2rYaO.d.cts +19 -0
- package/dist/PrefetchInfiniteQuery-lOc2rYaO.d.cts.map +1 -0
- package/dist/PrefetchInfiniteQuery.cjs +3 -45
- package/dist/PrefetchInfiniteQuery.d.cts +2 -14
- package/dist/PrefetchInfiniteQuery.d.ts +2 -14
- package/dist/PrefetchInfiniteQuery.js +4 -9
- package/dist/PrefetchQuery-Br-Y13Mx.js +21 -0
- package/dist/PrefetchQuery-Br-Y13Mx.js.map +1 -0
- package/dist/PrefetchQuery-DApNYnLE.d.cts +19 -0
- package/dist/PrefetchQuery-DApNYnLE.d.cts.map +1 -0
- package/dist/PrefetchQuery-DTerST7c.cjs +27 -0
- package/dist/PrefetchQuery-DTerST7c.cjs.map +1 -0
- package/dist/PrefetchQuery-DhDn6vW6.d.ts +19 -0
- package/dist/PrefetchQuery-DhDn6vW6.d.ts.map +1 -0
- package/dist/PrefetchQuery.cjs +3 -45
- package/dist/PrefetchQuery.d.cts +2 -14
- package/dist/PrefetchQuery.d.ts +2 -14
- package/dist/PrefetchQuery.js +4 -9
- package/dist/QueryClientConsumer-BJ2yggyM.cjs +21 -0
- package/dist/QueryClientConsumer-BJ2yggyM.cjs.map +1 -0
- package/dist/QueryClientConsumer-BZ9ow8xZ.js +15 -0
- package/dist/QueryClientConsumer-BZ9ow8xZ.js.map +1 -0
- package/dist/QueryClientConsumer-Cl9mOQiD.d.cts +20 -0
- package/dist/QueryClientConsumer-Cl9mOQiD.d.cts.map +1 -0
- package/dist/QueryClientConsumer-cgNZCPYt.d.ts +20 -0
- package/dist/QueryClientConsumer-cgNZCPYt.d.ts.map +1 -0
- package/dist/QueryClientConsumer.cjs +2 -37
- package/dist/QueryClientConsumer.d.cts +2 -13
- package/dist/QueryClientConsumer.d.ts +2 -13
- package/dist/QueryClientConsumer.js +3 -8
- package/dist/SuspenseInfiniteQuery-CHdMImSa.js +33 -0
- package/dist/SuspenseInfiniteQuery-CHdMImSa.js.map +1 -0
- package/dist/SuspenseInfiniteQuery-DIb9TV51.d.ts +34 -0
- package/dist/SuspenseInfiniteQuery-DIb9TV51.d.ts.map +1 -0
- package/dist/SuspenseInfiniteQuery-DRbAiSuZ.cjs +38 -0
- package/dist/SuspenseInfiniteQuery-DRbAiSuZ.cjs.map +1 -0
- package/dist/SuspenseInfiniteQuery-M1vK7xPf.d.cts +34 -0
- package/dist/SuspenseInfiniteQuery-M1vK7xPf.d.cts.map +1 -0
- package/dist/SuspenseInfiniteQuery.cjs +4 -80
- package/dist/SuspenseInfiniteQuery.d.cts +3 -26
- package/dist/SuspenseInfiniteQuery.d.ts +3 -26
- package/dist/SuspenseInfiniteQuery.js +5 -9
- package/dist/SuspenseQueries-BKJ1lHLF.js +27 -0
- package/dist/SuspenseQueries-BKJ1lHLF.js.map +1 -0
- package/dist/SuspenseQueries-BLHsE5sf.d.cts +32 -0
- package/dist/SuspenseQueries-BLHsE5sf.d.cts.map +1 -0
- package/dist/SuspenseQueries-BPYMn4lu.cjs +33 -0
- package/dist/SuspenseQueries-BPYMn4lu.cjs.map +1 -0
- package/dist/SuspenseQueries-DTk38b2y.d.ts +32 -0
- package/dist/SuspenseQueries-DTk38b2y.d.ts.map +1 -0
- package/dist/SuspenseQueries.cjs +2 -37
- package/dist/SuspenseQueries.d.cts +2 -25
- package/dist/SuspenseQueries.d.ts +2 -25
- package/dist/SuspenseQueries.js +3 -8
- package/dist/SuspenseQuery-C1StCWUZ.d.cts +33 -0
- package/dist/SuspenseQuery-C1StCWUZ.d.cts.map +1 -0
- package/dist/SuspenseQuery-DCFuSsXt.d.ts +33 -0
- package/dist/SuspenseQuery-DCFuSsXt.d.ts.map +1 -0
- package/dist/SuspenseQuery-DTw0lBlh.cjs +38 -0
- package/dist/SuspenseQuery-DTw0lBlh.cjs.map +1 -0
- package/dist/SuspenseQuery-vNfLZhoX.js +33 -0
- package/dist/SuspenseQuery-vNfLZhoX.js.map +1 -0
- package/dist/SuspenseQuery.cjs +3 -53
- package/dist/SuspenseQuery.d.cts +2 -25
- package/dist/SuspenseQuery.d.ts +2 -25
- package/dist/SuspenseQuery.js +4 -8
- package/dist/chunk-CeDO-pVn.cjs +40 -0
- package/dist/chunk-Ciq1R52r.js +28 -0
- package/dist/index.cjs +34 -207
- package/dist/index.d.cts +17 -18
- package/dist/index.d.ts +17 -18
- package/dist/index.js +19 -64
- package/dist/infiniteQueryOptions-D5UWCiQm.d.cts +23 -0
- package/dist/infiniteQueryOptions-D5UWCiQm.d.cts.map +1 -0
- package/dist/infiniteQueryOptions-DA5hdy3q.js +9 -0
- package/dist/infiniteQueryOptions-DA5hdy3q.js.map +1 -0
- package/dist/infiniteQueryOptions-F-YVOaXh.cjs +15 -0
- package/dist/infiniteQueryOptions-F-YVOaXh.cjs.map +1 -0
- package/dist/infiniteQueryOptions-QMOOTADl.d.ts +23 -0
- package/dist/infiniteQueryOptions-QMOOTADl.d.ts.map +1 -0
- package/dist/infiniteQueryOptions.cjs +2 -32
- package/dist/infiniteQueryOptions.d.cts +2 -18
- package/dist/infiniteQueryOptions.d.ts +2 -18
- package/dist/infiniteQueryOptions.js +3 -8
- package/dist/mutationOptions-B6s1IGC0.cjs +18 -0
- package/dist/mutationOptions-B6s1IGC0.cjs.map +1 -0
- package/dist/mutationOptions-BBuLYdHb.d.cts +13 -0
- package/dist/mutationOptions-BBuLYdHb.d.cts.map +1 -0
- package/dist/mutationOptions-BfyAhbas.d.ts +13 -0
- package/dist/mutationOptions-BfyAhbas.d.ts.map +1 -0
- package/dist/mutationOptions-DKoDr8UV.js +12 -0
- package/dist/mutationOptions-DKoDr8UV.js.map +1 -0
- package/dist/mutationOptions.cjs +2 -32
- package/dist/mutationOptions.d.cts +2 -8
- package/dist/mutationOptions.d.ts +2 -8
- package/dist/mutationOptions.js +3 -8
- package/dist/objectWithoutProperties-CInp4NfG.cjs +41 -0
- package/dist/objectWithoutProperties-CInp4NfG.cjs.map +1 -0
- package/dist/objectWithoutProperties-eYoVb7qd.js +36 -0
- package/dist/objectWithoutProperties-eYoVb7qd.js.map +1 -0
- package/dist/queryOptions-568K7C1k.js +18 -0
- package/dist/queryOptions-568K7C1k.js.map +1 -0
- package/dist/queryOptions-BONTWP7d.d.ts +31 -0
- package/dist/queryOptions-BONTWP7d.d.ts.map +1 -0
- package/dist/queryOptions-C6AUEXAN.cjs +24 -0
- package/dist/queryOptions-C6AUEXAN.cjs.map +1 -0
- package/dist/queryOptions-DF4PGGGo.d.cts +31 -0
- package/dist/queryOptions-DF4PGGGo.d.cts.map +1 -0
- package/dist/queryOptions.cjs +2 -31
- package/dist/queryOptions.d.cts +2 -26
- package/dist/queryOptions.d.ts +2 -26
- package/dist/queryOptions.js +3 -8
- package/dist/usePrefetchInfiniteQuery--CeoNSyw.cjs +22 -0
- package/dist/usePrefetchInfiniteQuery--CeoNSyw.cjs.map +1 -0
- package/dist/usePrefetchInfiniteQuery-BpEEls6I.d.ts +14 -0
- package/dist/usePrefetchInfiniteQuery-BpEEls6I.d.ts.map +1 -0
- package/dist/usePrefetchInfiniteQuery-CWHpolij.d.cts +14 -0
- package/dist/usePrefetchInfiniteQuery-CWHpolij.d.cts.map +1 -0
- package/dist/usePrefetchInfiniteQuery-Cou2p7ER.js +16 -0
- package/dist/usePrefetchInfiniteQuery-Cou2p7ER.js.map +1 -0
- package/dist/usePrefetchInfiniteQuery.cjs +2 -36
- package/dist/usePrefetchInfiniteQuery.d.cts +2 -9
- package/dist/usePrefetchInfiniteQuery.d.ts +2 -9
- package/dist/usePrefetchInfiniteQuery.js +3 -8
- package/dist/usePrefetchQuery-BCDBrR1l.cjs +22 -0
- package/dist/usePrefetchQuery-BCDBrR1l.cjs.map +1 -0
- package/dist/usePrefetchQuery-Cqm1mTr1.d.ts +14 -0
- package/dist/usePrefetchQuery-Cqm1mTr1.d.ts.map +1 -0
- package/dist/usePrefetchQuery-DHXHP7tg.js +16 -0
- package/dist/usePrefetchQuery-DHXHP7tg.js.map +1 -0
- package/dist/usePrefetchQuery-XkYUJflY.d.cts +14 -0
- package/dist/usePrefetchQuery-XkYUJflY.d.cts.map +1 -0
- package/dist/usePrefetchQuery.cjs +2 -36
- package/dist/usePrefetchQuery.d.cts +2 -9
- package/dist/usePrefetchQuery.d.ts +2 -9
- package/dist/usePrefetchQuery.js +3 -8
- package/dist/useSuspenseInfiniteQuery-AyXBWe-G.d.ts +18 -0
- package/dist/useSuspenseInfiniteQuery-AyXBWe-G.d.ts.map +1 -0
- package/dist/useSuspenseInfiniteQuery-CrCJEczg.js +108 -0
- package/dist/useSuspenseInfiniteQuery-CrCJEczg.js.map +1 -0
- package/dist/useSuspenseInfiniteQuery-DUGtZoX3.cjs +113 -0
- package/dist/useSuspenseInfiniteQuery-DUGtZoX3.cjs.map +1 -0
- package/dist/useSuspenseInfiniteQuery-DiZgECwT.d.cts +18 -0
- package/dist/useSuspenseInfiniteQuery-DiZgECwT.d.cts.map +1 -0
- package/dist/useSuspenseInfiniteQuery.cjs +2 -55
- package/dist/useSuspenseInfiniteQuery.d.cts +2 -14
- package/dist/useSuspenseInfiniteQuery.d.ts +2 -14
- package/dist/useSuspenseInfiniteQuery.js +3 -8
- package/dist/useSuspenseQueries-DAfmypXp.d.ts +38 -0
- package/dist/useSuspenseQueries-DAfmypXp.d.ts.map +1 -0
- package/dist/useSuspenseQueries-DQmk_OhC.cjs +24 -0
- package/dist/useSuspenseQueries-DQmk_OhC.cjs.map +1 -0
- package/dist/useSuspenseQueries-DWm4Q_i3.js +18 -0
- package/dist/useSuspenseQueries-DWm4Q_i3.js.map +1 -0
- package/dist/useSuspenseQueries-DxQ1F694.d.cts +38 -0
- package/dist/useSuspenseQueries-DxQ1F694.d.cts.map +1 -0
- package/dist/useSuspenseQueries.cjs +2 -31
- package/dist/useSuspenseQueries.d.cts +2 -34
- package/dist/useSuspenseQueries.d.ts +2 -34
- package/dist/useSuspenseQueries.js +3 -8
- package/dist/useSuspenseQuery-CHx6gtJR.js +18 -0
- package/dist/useSuspenseQuery-CHx6gtJR.js.map +1 -0
- package/dist/useSuspenseQuery-CqU_lFc3.d.ts +38 -0
- package/dist/useSuspenseQuery-CqU_lFc3.d.ts.map +1 -0
- package/dist/useSuspenseQuery-HgUxWHvv.d.cts +38 -0
- package/dist/useSuspenseQuery-HgUxWHvv.d.cts.map +1 -0
- package/dist/useSuspenseQuery-trCTkhXS.cjs +24 -0
- package/dist/useSuspenseQuery-trCTkhXS.cjs.map +1 -0
- package/dist/useSuspenseQuery.cjs +2 -31
- package/dist/useSuspenseQuery.d.cts +2 -34
- package/dist/useSuspenseQuery.d.ts +2 -34
- package/dist/useSuspenseQuery.js +3 -8
- package/package.json +3 -3
- package/src/IsFetching.test-d.tsx +22 -0
- package/src/IsFetching.tsx +11 -0
- package/src/index.ts +14 -13
- package/dist/Mutation.cjs.map +0 -1
- package/dist/Mutation.js.map +0 -1
- package/dist/PrefetchInfiniteQuery.cjs.map +0 -1
- package/dist/PrefetchInfiniteQuery.js.map +0 -1
- package/dist/PrefetchQuery.cjs.map +0 -1
- package/dist/PrefetchQuery.js.map +0 -1
- package/dist/QueryClientConsumer.cjs.map +0 -1
- package/dist/QueryClientConsumer.js.map +0 -1
- package/dist/SuspenseInfiniteQuery.cjs.map +0 -1
- package/dist/SuspenseInfiniteQuery.js.map +0 -1
- package/dist/SuspenseQueries.cjs.map +0 -1
- package/dist/SuspenseQueries.js.map +0 -1
- package/dist/SuspenseQuery.cjs.map +0 -1
- package/dist/SuspenseQuery.js.map +0 -1
- package/dist/chunk-34N4X5NK.js +0 -11
- package/dist/chunk-34N4X5NK.js.map +0 -1
- package/dist/chunk-7AETAPCD.js +0 -16
- package/dist/chunk-7AETAPCD.js.map +0 -1
- package/dist/chunk-A6D2XGKX.js +0 -12
- package/dist/chunk-A6D2XGKX.js.map +0 -1
- package/dist/chunk-BOUCJMBU.js +0 -23
- package/dist/chunk-BOUCJMBU.js.map +0 -1
- package/dist/chunk-CLWCIHTL.js +0 -23
- package/dist/chunk-CLWCIHTL.js.map +0 -1
- package/dist/chunk-IB2JQANE.js +0 -16
- package/dist/chunk-IB2JQANE.js.map +0 -1
- package/dist/chunk-IJFXQRYI.js +0 -11
- package/dist/chunk-IJFXQRYI.js.map +0 -1
- package/dist/chunk-OGTYZE7J.js +0 -16
- package/dist/chunk-OGTYZE7J.js.map +0 -1
- package/dist/chunk-QETBZSG5.js +0 -39
- package/dist/chunk-QETBZSG5.js.map +0 -1
- package/dist/chunk-QYGYB5UC.js +0 -23
- package/dist/chunk-QYGYB5UC.js.map +0 -1
- package/dist/chunk-SXV24QIX.js +0 -15
- package/dist/chunk-SXV24QIX.js.map +0 -1
- package/dist/chunk-V6B7UP6T.js +0 -15
- package/dist/chunk-V6B7UP6T.js.map +0 -1
- package/dist/chunk-WCKC4M3O.js +0 -12
- package/dist/chunk-WCKC4M3O.js.map +0 -1
- package/dist/chunk-WE3IMJ7D.js +0 -16
- package/dist/chunk-WE3IMJ7D.js.map +0 -1
- package/dist/chunk-X7BBVL5B.js +0 -21
- package/dist/chunk-X7BBVL5B.js.map +0 -1
- package/dist/chunk-YFVQ7O2B.js +0 -12
- package/dist/chunk-YFVQ7O2B.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/infiniteQueryOptions.cjs.map +0 -1
- package/dist/infiniteQueryOptions.js.map +0 -1
- package/dist/mutationOptions.cjs.map +0 -1
- package/dist/mutationOptions.js.map +0 -1
- package/dist/queryOptions.cjs.map +0 -1
- package/dist/queryOptions.js.map +0 -1
- package/dist/usePrefetchInfiniteQuery.cjs.map +0 -1
- package/dist/usePrefetchInfiniteQuery.js.map +0 -1
- package/dist/usePrefetchQuery.cjs.map +0 -1
- package/dist/usePrefetchQuery.js.map +0 -1
- package/dist/useSuspenseInfiniteQuery.cjs.map +0 -1
- package/dist/useSuspenseInfiniteQuery.js.map +0 -1
- package/dist/useSuspenseQueries.cjs.map +0 -1
- package/dist/useSuspenseQueries.js.map +0 -1
- package/dist/useSuspenseQuery.cjs.map +0 -1
- package/dist/useSuspenseQuery.js.map +0 -1
package/dist/PrefetchQuery.cjs
CHANGED
|
@@ -1,47 +1,5 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
2
|
+
require('./usePrefetchQuery-BCDBrR1l.cjs');
|
|
3
|
+
const require_PrefetchQuery = require('./PrefetchQuery-DTerST7c.cjs');
|
|
20
4
|
|
|
21
|
-
|
|
22
|
-
var PrefetchQuery_exports = {};
|
|
23
|
-
__export(PrefetchQuery_exports, {
|
|
24
|
-
PrefetchQuery: () => PrefetchQuery
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(PrefetchQuery_exports);
|
|
27
|
-
|
|
28
|
-
// src/usePrefetchQuery.ts
|
|
29
|
-
var import_react_query = require("@tanstack/react-query");
|
|
30
|
-
function usePrefetchQuery(options) {
|
|
31
|
-
const queryClient = (0, import_react_query.useQueryClient)();
|
|
32
|
-
if (typeof options.queryKey !== "undefined" && !queryClient.getQueryState(options.queryKey)) {
|
|
33
|
-
queryClient.prefetchQuery(options);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// src/PrefetchQuery.tsx
|
|
38
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
-
function PrefetchQuery(options) {
|
|
40
|
-
usePrefetchQuery(options);
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
|
|
42
|
-
}
|
|
43
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
-
0 && (module.exports = {
|
|
45
|
-
PrefetchQuery
|
|
46
|
-
});
|
|
47
|
-
//# sourceMappingURL=PrefetchQuery.cjs.map
|
|
5
|
+
exports.PrefetchQuery = require_PrefetchQuery.PrefetchQuery;
|
package/dist/PrefetchQuery.d.cts
CHANGED
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* A component that allows you to use usePrefetchQuery in JSX, avoiding the limitations of React hooks.
|
|
6
|
-
* @see {@link https://suspensive.org/docs/react-query/PrefetchQuery Suspensive Docs}
|
|
7
|
-
* @example
|
|
8
|
-
* ```tsx
|
|
9
|
-
* <PrefetchQuery queryKey={['queryKey']} queryFn={queryFn} />
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
declare function PrefetchQuery<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>): react_jsx_runtime.JSX.Element;
|
|
13
|
-
|
|
14
|
-
export { PrefetchQuery };
|
|
1
|
+
import { PrefetchQuery } from "./PrefetchQuery-DApNYnLE.cjs";
|
|
2
|
+
export { PrefetchQuery };
|
package/dist/PrefetchQuery.d.ts
CHANGED
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* A component that allows you to use usePrefetchQuery in JSX, avoiding the limitations of React hooks.
|
|
6
|
-
* @see {@link https://suspensive.org/docs/react-query/PrefetchQuery Suspensive Docs}
|
|
7
|
-
* @example
|
|
8
|
-
* ```tsx
|
|
9
|
-
* <PrefetchQuery queryKey={['queryKey']} queryFn={queryFn} />
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
declare function PrefetchQuery<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>): react_jsx_runtime.JSX.Element;
|
|
13
|
-
|
|
14
|
-
export { PrefetchQuery };
|
|
1
|
+
import { PrefetchQuery } from "./PrefetchQuery-DhDn6vW6.js";
|
|
2
|
+
export { PrefetchQuery };
|
package/dist/PrefetchQuery.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import "./chunk-QETBZSG5.js";
|
|
7
|
-
export {
|
|
8
|
-
PrefetchQuery
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=PrefetchQuery.js.map
|
|
2
|
+
import "./usePrefetchQuery-DHXHP7tg.js";
|
|
3
|
+
import { PrefetchQuery } from "./PrefetchQuery-Br-Y13Mx.js";
|
|
4
|
+
|
|
5
|
+
export { PrefetchQuery };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
const require_chunk = require('./chunk-CeDO-pVn.cjs');
|
|
3
|
+
const __tanstack_react_query = require_chunk.__toESM(require("@tanstack/react-query"));
|
|
4
|
+
const react_jsx_runtime = require_chunk.__toESM(require("react/jsx-runtime"));
|
|
5
|
+
|
|
6
|
+
//#region src/QueryClientConsumer.tsx
|
|
7
|
+
/**
|
|
8
|
+
* @experimental This is experimental feature.
|
|
9
|
+
*/
|
|
10
|
+
function QueryClientConsumer({ children, context }) {
|
|
11
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: children((0, __tanstack_react_query.useQueryClient)({ context })) });
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
Object.defineProperty(exports, 'QueryClientConsumer', {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () {
|
|
18
|
+
return QueryClientConsumer;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=QueryClientConsumer-BJ2yggyM.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryClientConsumer-BJ2yggyM.cjs","names":[],"sources":["../src/QueryClientConsumer.tsx"],"sourcesContent":["import { type QueryClient, useQueryClient } from '@tanstack/react-query'\nimport type { Context, ReactNode } from 'react'\n\n/**\n * @experimental This is experimental feature.\n */\nexport function QueryClientConsumer({\n children,\n context,\n}: {\n children: (queryClient: QueryClient) => ReactNode\n context?: Context<QueryClient | undefined>\n}) {\n return <>{children(useQueryClient({ context: context as any }))}</>\n}\n"],"mappings":";;;;;;;;;AAMA,SAAgB,oBAAoB,EAClC,UACA,SAID,EAAE;AACD,2FAAU,oDAAwB,EAAW,QAAgB,EAAC,CAAC,GAAI;AACpE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/QueryClientConsumer.tsx
|
|
6
|
+
/**
|
|
7
|
+
* @experimental This is experimental feature.
|
|
8
|
+
*/
|
|
9
|
+
function QueryClientConsumer({ children, context }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(Fragment, { children: children(useQueryClient({ context })) });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { QueryClientConsumer };
|
|
15
|
+
//# sourceMappingURL=QueryClientConsumer-BZ9ow8xZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryClientConsumer-BZ9ow8xZ.js","names":[],"sources":["../src/QueryClientConsumer.tsx"],"sourcesContent":["import { type QueryClient, useQueryClient } from '@tanstack/react-query'\nimport type { Context, ReactNode } from 'react'\n\n/**\n * @experimental This is experimental feature.\n */\nexport function QueryClientConsumer({\n children,\n context,\n}: {\n children: (queryClient: QueryClient) => ReactNode\n context?: Context<QueryClient | undefined>\n}) {\n return <>{children(useQueryClient({ context: context as any }))}</>\n}\n"],"mappings":";;;;;;;;AAMA,SAAgB,oBAAoB,EAClC,UACA,SAID,EAAE;AACD,kDAAU,SAAS,eAAe,EAAW,QAAgB,EAAC,CAAC,GAAI;AACpE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
2
|
+
import { QueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { Context, ReactNode } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/QueryClientConsumer.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* @experimental This is experimental feature.
|
|
8
|
+
*/
|
|
9
|
+
declare function QueryClientConsumer({
|
|
10
|
+
children,
|
|
11
|
+
context
|
|
12
|
+
}: {
|
|
13
|
+
children: (queryClient: QueryClient) => ReactNode;
|
|
14
|
+
context?: Context<QueryClient | undefined>;
|
|
15
|
+
}): react_jsx_runtime3.JSX.Element;
|
|
16
|
+
//# sourceMappingURL=QueryClientConsumer.d.ts.map
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { QueryClientConsumer };
|
|
20
|
+
//# sourceMappingURL=QueryClientConsumer-Cl9mOQiD.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryClientConsumer-Cl9mOQiD.d.cts","names":[],"sources":["../src/QueryClientConsumer.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAMgB,iBAAA,mBAAA,CAAmB;EAAA,QAAA;EAAA;CAAA,EAAA;EAAA,QAAA,EAAA,CAAA,WAAA,EAIT,WAJS,EAAA,GAIO,SAJP;EAAA,OACjC,CAAA,EAIU,OAJV,CAIkB,WAJlB,GAAA,SAAA,CAAA;CAAQ,CAAA,EAKT,kBAAA,CAAA,GAAA,CAAA,OAJC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { QueryClient } from "@tanstack/react-query";
|
|
2
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
3
|
+
import { Context, ReactNode } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/QueryClientConsumer.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* @experimental This is experimental feature.
|
|
8
|
+
*/
|
|
9
|
+
declare function QueryClientConsumer({
|
|
10
|
+
children,
|
|
11
|
+
context
|
|
12
|
+
}: {
|
|
13
|
+
children: (queryClient: QueryClient) => ReactNode;
|
|
14
|
+
context?: Context<QueryClient | undefined>;
|
|
15
|
+
}): react_jsx_runtime3.JSX.Element;
|
|
16
|
+
//# sourceMappingURL=QueryClientConsumer.d.ts.map
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { QueryClientConsumer };
|
|
20
|
+
//# sourceMappingURL=QueryClientConsumer-cgNZCPYt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryClientConsumer-cgNZCPYt.d.ts","names":[],"sources":["../src/QueryClientConsumer.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAMgB,iBAAA,mBAAA,CAAmB;EAAA,QAAA;EAAA;CAAA,EAAA;EAAA,QAAA,EAAA,CAAA,WAAA,EAIT,WAJS,EAAA,GAIO,SAJP;EAAA,OACjC,CAAA,EAIU,OAJV,CAIkB,WAJlB,GAAA,SAAA,CAAA;CAAQ,CAAA,EAKT,kBAAA,CAAA,GAAA,CAAA,OAJC"}
|
|
@@ -1,39 +1,4 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
2
|
+
const require_QueryClientConsumer = require('./QueryClientConsumer-BJ2yggyM.cjs');
|
|
20
3
|
|
|
21
|
-
|
|
22
|
-
var QueryClientConsumer_exports = {};
|
|
23
|
-
__export(QueryClientConsumer_exports, {
|
|
24
|
-
QueryClientConsumer: () => QueryClientConsumer
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(QueryClientConsumer_exports);
|
|
27
|
-
var import_react_query = require("@tanstack/react-query");
|
|
28
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
function QueryClientConsumer({
|
|
30
|
-
children,
|
|
31
|
-
context
|
|
32
|
-
}) {
|
|
33
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: children((0, import_react_query.useQueryClient)({ context })) });
|
|
34
|
-
}
|
|
35
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
-
0 && (module.exports = {
|
|
37
|
-
QueryClientConsumer
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=QueryClientConsumer.cjs.map
|
|
4
|
+
exports.QueryClientConsumer = require_QueryClientConsumer.QueryClientConsumer;
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { ReactNode, Context } from 'react';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @experimental This is experimental feature.
|
|
7
|
-
*/
|
|
8
|
-
declare function QueryClientConsumer({ children, context, }: {
|
|
9
|
-
children: (queryClient: QueryClient) => ReactNode;
|
|
10
|
-
context?: Context<QueryClient | undefined>;
|
|
11
|
-
}): react_jsx_runtime.JSX.Element;
|
|
12
|
-
|
|
13
|
-
export { QueryClientConsumer };
|
|
1
|
+
import { QueryClientConsumer } from "./QueryClientConsumer-Cl9mOQiD.cjs";
|
|
2
|
+
export { QueryClientConsumer };
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { ReactNode, Context } from 'react';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @experimental This is experimental feature.
|
|
7
|
-
*/
|
|
8
|
-
declare function QueryClientConsumer({ children, context, }: {
|
|
9
|
-
children: (queryClient: QueryClient) => ReactNode;
|
|
10
|
-
context?: Context<QueryClient | undefined>;
|
|
11
|
-
}): react_jsx_runtime.JSX.Element;
|
|
12
|
-
|
|
13
|
-
export { QueryClientConsumer };
|
|
1
|
+
import { QueryClientConsumer } from "./QueryClientConsumer-cgNZCPYt.js";
|
|
2
|
+
export { QueryClientConsumer };
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import "./chunk-QETBZSG5.js";
|
|
6
|
-
export {
|
|
7
|
-
QueryClientConsumer
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=QueryClientConsumer.js.map
|
|
2
|
+
import { QueryClientConsumer } from "./QueryClientConsumer-BZ9ow8xZ.js";
|
|
3
|
+
|
|
4
|
+
export { QueryClientConsumer };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { __toESM } from "./chunk-Ciq1R52r.js";
|
|
3
|
+
import { require_objectWithoutProperties } from "./objectWithoutProperties-eYoVb7qd.js";
|
|
4
|
+
import { useSuspenseInfiniteQuery } from "./useSuspenseInfiniteQuery-CrCJEczg.js";
|
|
5
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/SuspenseInfiniteQuery.tsx
|
|
8
|
+
var import_objectWithoutProperties = /* @__PURE__ */ __toESM(require_objectWithoutProperties());
|
|
9
|
+
const _excluded = ["children"];
|
|
10
|
+
/**
|
|
11
|
+
* We provide these components to clearly express what causes suspense at the same depth.
|
|
12
|
+
* `<SuspenseInfiniteQuery/>` serves to make `useSuspenseInfiniteQuery` easier to use in jsx.
|
|
13
|
+
* @see {@link https://suspensive.org/docs/react-query/SuspenseInfiniteQuery Suspensive Docs}
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* import { SuspenseInfiniteQuery } from '@suspensive/react-query'
|
|
17
|
+
*
|
|
18
|
+
* // You can use infiniteQueryOptions as props.
|
|
19
|
+
* <SuspenseInfiniteQuery {...infiniteQueryOptions()}>
|
|
20
|
+
* {({ data, fetchNextPage }) => {
|
|
21
|
+
* return <></>
|
|
22
|
+
* }}
|
|
23
|
+
* </SuspenseInfiniteQuery>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
const SuspenseInfiniteQuery = (_ref) => {
|
|
27
|
+
let { children } = _ref, options = (0, import_objectWithoutProperties.default)(_ref, _excluded);
|
|
28
|
+
return /* @__PURE__ */ jsx(Fragment, { children: children(useSuspenseInfiniteQuery(options)) });
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { SuspenseInfiniteQuery };
|
|
33
|
+
//# sourceMappingURL=SuspenseInfiniteQuery-CHdMImSa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuspenseInfiniteQuery-CHdMImSa.js","names":[],"sources":["../src/SuspenseInfiniteQuery.tsx"],"sourcesContent":["import type { QueryKey } from '@tanstack/react-query'\nimport type { ReactNode } from 'react'\nimport {\n type UseSuspenseInfiniteQueryOptions,\n type UseSuspenseInfiniteQueryResult,\n useSuspenseInfiniteQuery,\n} from './useSuspenseInfiniteQuery'\n\n/**\n * We provide these components to clearly express what causes suspense at the same depth.\n * `<SuspenseInfiniteQuery/>` serves to make `useSuspenseInfiniteQuery` easier to use in jsx.\n * @see {@link https://suspensive.org/docs/react-query/SuspenseInfiniteQuery Suspensive Docs}\n * @example\n * ```tsx\n * import { SuspenseInfiniteQuery } from '@suspensive/react-query'\n *\n * // You can use infiniteQueryOptions as props.\n * <SuspenseInfiniteQuery {...infiniteQueryOptions()}>\n * {({ data, fetchNextPage }) => {\n * return <></>\n * }}\n * </SuspenseInfiniteQuery>\n * ```\n */\nexport const SuspenseInfiniteQuery = <\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>({\n children,\n ...options\n}: UseSuspenseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {\n children: (query: UseSuspenseInfiniteQueryResult<TData, TError>) => ReactNode\n}) => <>{children(useSuspenseInfiniteQuery(options))}</>\n"],"mappings":";;;;;;;;mBA8BE;;;;;;;;;;;;;;;;;AANF,MAAa,wBAAwB,UAU/B;KALJ,EACA,UAID,SAHI;AAGC,kDAAG,SAAS,yBAAyB,QAAQ,CAAC,GAAI"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { UseSuspenseInfiniteQueryOptions, UseSuspenseInfiniteQueryResult } from "./useSuspenseInfiniteQuery-AyXBWe-G.js";
|
|
2
|
+
import { QueryKey } from "@tanstack/react-query";
|
|
3
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/SuspenseInfiniteQuery.d.ts
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* We provide these components to clearly express what causes suspense at the same depth.
|
|
10
|
+
* `<SuspenseInfiniteQuery/>` serves to make `useSuspenseInfiniteQuery` easier to use in jsx.
|
|
11
|
+
* @see {@link https://suspensive.org/docs/react-query/SuspenseInfiniteQuery Suspensive Docs}
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* import { SuspenseInfiniteQuery } from '@suspensive/react-query'
|
|
15
|
+
*
|
|
16
|
+
* // You can use infiniteQueryOptions as props.
|
|
17
|
+
* <SuspenseInfiniteQuery {...infiniteQueryOptions()}>
|
|
18
|
+
* {({ data, fetchNextPage }) => {
|
|
19
|
+
* return <></>
|
|
20
|
+
* }}
|
|
21
|
+
* </SuspenseInfiniteQuery>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare const SuspenseInfiniteQuery: <TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>({
|
|
25
|
+
children,
|
|
26
|
+
...options
|
|
27
|
+
}: UseSuspenseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
|
28
|
+
children: (query: UseSuspenseInfiniteQueryResult<TData, TError>) => ReactNode;
|
|
29
|
+
}) => react_jsx_runtime4.JSX.Element;
|
|
30
|
+
//# sourceMappingURL=SuspenseInfiniteQuery.d.ts.map
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { SuspenseInfiniteQuery };
|
|
34
|
+
//# sourceMappingURL=SuspenseInfiniteQuery-DIb9TV51.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuspenseInfiniteQuery-DIb9TV51.d.ts","names":[],"sources":["../src/SuspenseInfiniteQuery.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;AAwBA;;;;;;;;;;;;;AASoB,cATP,qBASO,EAAA,CAAA,eAAA,OAAA,EAAA,SAAA,OAAA,EAAA,QANV,YAMU,EAAA,kBALA,QAKA,GALW,QAKX,CAAA,CAAA;EAAA,QAAA;EAAA,GAAA;CAAA,EADjB,+BACiB,CADe,YACf,EAD6B,MAC7B,EADqC,KACrC,EAD4C,SAC5C,CAAA,GAAA;EAA8B,QAAoB,EAAA,CAAA,KAAA,EAAlD,8BAAkD,CAAnB,KAAmB,EAAZ,MAAY,CAAA,EAAA,GAAA,SAAA;CAAS,EAAA,GAC9E,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAuD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
const require_chunk = require('./chunk-CeDO-pVn.cjs');
|
|
3
|
+
const require_objectWithoutProperties$1 = require('./objectWithoutProperties-CInp4NfG.cjs');
|
|
4
|
+
const require_useSuspenseInfiniteQuery = require('./useSuspenseInfiniteQuery-DUGtZoX3.cjs');
|
|
5
|
+
const react_jsx_runtime = require_chunk.__toESM(require("react/jsx-runtime"));
|
|
6
|
+
|
|
7
|
+
//#region src/SuspenseInfiniteQuery.tsx
|
|
8
|
+
var import_objectWithoutProperties = /* @__PURE__ */ require_chunk.__toESM(require_objectWithoutProperties$1.require_objectWithoutProperties());
|
|
9
|
+
const _excluded = ["children"];
|
|
10
|
+
/**
|
|
11
|
+
* We provide these components to clearly express what causes suspense at the same depth.
|
|
12
|
+
* `<SuspenseInfiniteQuery/>` serves to make `useSuspenseInfiniteQuery` easier to use in jsx.
|
|
13
|
+
* @see {@link https://suspensive.org/docs/react-query/SuspenseInfiniteQuery Suspensive Docs}
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* import { SuspenseInfiniteQuery } from '@suspensive/react-query'
|
|
17
|
+
*
|
|
18
|
+
* // You can use infiniteQueryOptions as props.
|
|
19
|
+
* <SuspenseInfiniteQuery {...infiniteQueryOptions()}>
|
|
20
|
+
* {({ data, fetchNextPage }) => {
|
|
21
|
+
* return <></>
|
|
22
|
+
* }}
|
|
23
|
+
* </SuspenseInfiniteQuery>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
const SuspenseInfiniteQuery = (_ref) => {
|
|
27
|
+
let { children } = _ref, options = (0, import_objectWithoutProperties.default)(_ref, _excluded);
|
|
28
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: children(require_useSuspenseInfiniteQuery.useSuspenseInfiniteQuery(options)) });
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
Object.defineProperty(exports, 'SuspenseInfiniteQuery', {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return SuspenseInfiniteQuery;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=SuspenseInfiniteQuery-DRbAiSuZ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuspenseInfiniteQuery-DRbAiSuZ.cjs","names":["useSuspenseInfiniteQuery"],"sources":["../src/SuspenseInfiniteQuery.tsx"],"sourcesContent":["import type { QueryKey } from '@tanstack/react-query'\nimport type { ReactNode } from 'react'\nimport {\n type UseSuspenseInfiniteQueryOptions,\n type UseSuspenseInfiniteQueryResult,\n useSuspenseInfiniteQuery,\n} from './useSuspenseInfiniteQuery'\n\n/**\n * We provide these components to clearly express what causes suspense at the same depth.\n * `<SuspenseInfiniteQuery/>` serves to make `useSuspenseInfiniteQuery` easier to use in jsx.\n * @see {@link https://suspensive.org/docs/react-query/SuspenseInfiniteQuery Suspensive Docs}\n * @example\n * ```tsx\n * import { SuspenseInfiniteQuery } from '@suspensive/react-query'\n *\n * // You can use infiniteQueryOptions as props.\n * <SuspenseInfiniteQuery {...infiniteQueryOptions()}>\n * {({ data, fetchNextPage }) => {\n * return <></>\n * }}\n * </SuspenseInfiniteQuery>\n * ```\n */\nexport const SuspenseInfiniteQuery = <\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>({\n children,\n ...options\n}: UseSuspenseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {\n children: (query: UseSuspenseInfiniteQueryResult<TData, TError>) => ReactNode\n}) => <>{children(useSuspenseInfiniteQuery(options))}</>\n"],"mappings":";;;;;;;;mBA8BE;;;;;;;;;;;;;;;;;AANF,MAAa,wBAAwB,UAU/B;KALJ,EACA,UAID,SAHI;AAGC,2FAAG,SAASA,0DAAyB,QAAQ,CAAC,GAAI"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { UseSuspenseInfiniteQueryOptions, UseSuspenseInfiniteQueryResult } from "./useSuspenseInfiniteQuery-DiZgECwT.cjs";
|
|
2
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
3
|
+
import { QueryKey } from "@tanstack/react-query";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/SuspenseInfiniteQuery.d.ts
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* We provide these components to clearly express what causes suspense at the same depth.
|
|
10
|
+
* `<SuspenseInfiniteQuery/>` serves to make `useSuspenseInfiniteQuery` easier to use in jsx.
|
|
11
|
+
* @see {@link https://suspensive.org/docs/react-query/SuspenseInfiniteQuery Suspensive Docs}
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* import { SuspenseInfiniteQuery } from '@suspensive/react-query'
|
|
15
|
+
*
|
|
16
|
+
* // You can use infiniteQueryOptions as props.
|
|
17
|
+
* <SuspenseInfiniteQuery {...infiniteQueryOptions()}>
|
|
18
|
+
* {({ data, fetchNextPage }) => {
|
|
19
|
+
* return <></>
|
|
20
|
+
* }}
|
|
21
|
+
* </SuspenseInfiniteQuery>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare const SuspenseInfiniteQuery: <TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>({
|
|
25
|
+
children,
|
|
26
|
+
...options
|
|
27
|
+
}: UseSuspenseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
|
28
|
+
children: (query: UseSuspenseInfiniteQueryResult<TData, TError>) => ReactNode;
|
|
29
|
+
}) => react_jsx_runtime4.JSX.Element;
|
|
30
|
+
//# sourceMappingURL=SuspenseInfiniteQuery.d.ts.map
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { SuspenseInfiniteQuery };
|
|
34
|
+
//# sourceMappingURL=SuspenseInfiniteQuery-M1vK7xPf.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuspenseInfiniteQuery-M1vK7xPf.d.cts","names":[],"sources":["../src/SuspenseInfiniteQuery.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;AAwBA;;;;;;;;;;;;;AASoB,cATP,qBASO,EAAA,CAAA,eAAA,OAAA,EAAA,SAAA,OAAA,EAAA,QANV,YAMU,EAAA,kBALA,QAKA,GALW,QAKX,CAAA,CAAA;EAAA,QAAA;EAAA,GAAA;CAAA,EADjB,+BACiB,CADe,YACf,EAD6B,MAC7B,EADqC,KACrC,EAD4C,SAC5C,CAAA,GAAA;EAA8B,QAAoB,EAAA,CAAA,KAAA,EAAlD,8BAAkD,CAAnB,KAAmB,EAAZ,MAAY,CAAA,EAAA,GAAA,SAAA;CAAS,EAAA,GAC9E,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAuD"}
|
|
@@ -1,82 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __objRest = (source, exclude) => {
|
|
25
|
-
var target = {};
|
|
26
|
-
for (var prop in source)
|
|
27
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
if (source != null && __getOwnPropSymbols)
|
|
30
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
-
target[prop] = source[prop];
|
|
33
|
-
}
|
|
34
|
-
return target;
|
|
35
|
-
};
|
|
36
|
-
var __export = (target, all) => {
|
|
37
|
-
for (var name in all)
|
|
38
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
39
|
-
};
|
|
40
|
-
var __copyProps = (to, from, except, desc) => {
|
|
41
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
42
|
-
for (let key of __getOwnPropNames(from))
|
|
43
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
44
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
45
|
-
}
|
|
46
|
-
return to;
|
|
47
|
-
};
|
|
48
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
2
|
+
require('./objectWithoutProperties-CInp4NfG.cjs');
|
|
3
|
+
require('./useSuspenseInfiniteQuery-DUGtZoX3.cjs');
|
|
4
|
+
const require_SuspenseInfiniteQuery = require('./SuspenseInfiniteQuery-DRbAiSuZ.cjs');
|
|
49
5
|
|
|
50
|
-
|
|
51
|
-
var SuspenseInfiniteQuery_exports = {};
|
|
52
|
-
__export(SuspenseInfiniteQuery_exports, {
|
|
53
|
-
SuspenseInfiniteQuery: () => SuspenseInfiniteQuery
|
|
54
|
-
});
|
|
55
|
-
module.exports = __toCommonJS(SuspenseInfiniteQuery_exports);
|
|
56
|
-
|
|
57
|
-
// src/useSuspenseInfiniteQuery.ts
|
|
58
|
-
var import_react_query = require("@tanstack/react-query");
|
|
59
|
-
function useSuspenseInfiniteQuery(options) {
|
|
60
|
-
return (0, import_react_query.useInfiniteQuery)(__spreadProps(__spreadValues({}, options), {
|
|
61
|
-
enabled: true,
|
|
62
|
-
suspense: true,
|
|
63
|
-
useErrorBoundary: true,
|
|
64
|
-
networkMode: "always"
|
|
65
|
-
}));
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// src/SuspenseInfiniteQuery.tsx
|
|
69
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
70
|
-
var SuspenseInfiniteQuery = (_a) => {
|
|
71
|
-
var _b = _a, {
|
|
72
|
-
children
|
|
73
|
-
} = _b, options = __objRest(_b, [
|
|
74
|
-
"children"
|
|
75
|
-
]);
|
|
76
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: children(useSuspenseInfiniteQuery(options)) });
|
|
77
|
-
};
|
|
78
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
79
|
-
0 && (module.exports = {
|
|
80
|
-
SuspenseInfiniteQuery
|
|
81
|
-
});
|
|
82
|
-
//# sourceMappingURL=SuspenseInfiniteQuery.cjs.map
|
|
6
|
+
exports.SuspenseInfiniteQuery = require_SuspenseInfiniteQuery.SuspenseInfiniteQuery;
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { UseSuspenseInfiniteQueryOptions, UseSuspenseInfiniteQueryResult } from './useSuspenseInfiniteQuery.cjs';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* We provide these components to clearly express what causes suspense at the same depth.
|
|
8
|
-
* `<SuspenseInfiniteQuery/>` serves to make `useSuspenseInfiniteQuery` easier to use in jsx.
|
|
9
|
-
* @see {@link https://suspensive.org/docs/react-query/SuspenseInfiniteQuery Suspensive Docs}
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* import { SuspenseInfiniteQuery } from '@suspensive/react-query'
|
|
13
|
-
*
|
|
14
|
-
* // You can use infiniteQueryOptions as props.
|
|
15
|
-
* <SuspenseInfiniteQuery {...infiniteQueryOptions()}>
|
|
16
|
-
* {({ data, fetchNextPage }) => {
|
|
17
|
-
* return <></>
|
|
18
|
-
* }}
|
|
19
|
-
* </SuspenseInfiniteQuery>
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
declare const SuspenseInfiniteQuery: <TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>({ children, ...options }: UseSuspenseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
|
23
|
-
children: (query: UseSuspenseInfiniteQueryResult<TData, TError>) => ReactNode;
|
|
24
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
25
|
-
|
|
26
|
-
export { SuspenseInfiniteQuery };
|
|
1
|
+
import "./useSuspenseInfiniteQuery-DiZgECwT.cjs";
|
|
2
|
+
import { SuspenseInfiniteQuery } from "./SuspenseInfiniteQuery-M1vK7xPf.cjs";
|
|
3
|
+
export { SuspenseInfiniteQuery };
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { UseSuspenseInfiniteQueryOptions, UseSuspenseInfiniteQueryResult } from './useSuspenseInfiniteQuery.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* We provide these components to clearly express what causes suspense at the same depth.
|
|
8
|
-
* `<SuspenseInfiniteQuery/>` serves to make `useSuspenseInfiniteQuery` easier to use in jsx.
|
|
9
|
-
* @see {@link https://suspensive.org/docs/react-query/SuspenseInfiniteQuery Suspensive Docs}
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* import { SuspenseInfiniteQuery } from '@suspensive/react-query'
|
|
13
|
-
*
|
|
14
|
-
* // You can use infiniteQueryOptions as props.
|
|
15
|
-
* <SuspenseInfiniteQuery {...infiniteQueryOptions()}>
|
|
16
|
-
* {({ data, fetchNextPage }) => {
|
|
17
|
-
* return <></>
|
|
18
|
-
* }}
|
|
19
|
-
* </SuspenseInfiniteQuery>
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
declare const SuspenseInfiniteQuery: <TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>({ children, ...options }: UseSuspenseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
|
23
|
-
children: (query: UseSuspenseInfiniteQueryResult<TData, TError>) => ReactNode;
|
|
24
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
25
|
-
|
|
26
|
-
export { SuspenseInfiniteQuery };
|
|
1
|
+
import "./useSuspenseInfiniteQuery-AyXBWe-G.js";
|
|
2
|
+
import { SuspenseInfiniteQuery } from "./SuspenseInfiniteQuery-DIb9TV51.js";
|
|
3
|
+
export { SuspenseInfiniteQuery };
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
} from "./
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
SuspenseInfiniteQuery
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=SuspenseInfiniteQuery.js.map
|
|
2
|
+
import "./objectWithoutProperties-eYoVb7qd.js";
|
|
3
|
+
import "./useSuspenseInfiniteQuery-CrCJEczg.js";
|
|
4
|
+
import { SuspenseInfiniteQuery } from "./SuspenseInfiniteQuery-CHdMImSa.js";
|
|
5
|
+
|
|
6
|
+
export { SuspenseInfiniteQuery };
|