@tanstack/preact-query-persist-client 5.92.3 → 5.94.4
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/package.json +4 -4
- package/build/legacy/PersistQueryClientProvider.cjs +0 -68
- package/build/legacy/PersistQueryClientProvider.cjs.map +0 -1
- package/build/legacy/PersistQueryClientProvider.d.cts +0 -2
- package/build/legacy/PersistQueryClientProvider.d.ts +0 -2
- package/build/legacy/PersistQueryClientProvider.js +0 -49
- package/build/legacy/PersistQueryClientProvider.js.map +0 -1
- package/build/legacy/_tsup-dts-rollup.d.cts +0 -114
- package/build/legacy/_tsup-dts-rollup.d.ts +0 -114
- package/build/legacy/index.cjs +0 -27
- package/build/legacy/index.cjs.map +0 -1
- package/build/legacy/index.d.cts +0 -21
- package/build/legacy/index.d.ts +0 -21
- package/build/legacy/index.js +0 -4
- package/build/legacy/index.js.map +0 -1
- package/build/modern/PersistQueryClientProvider.cjs +0 -62
- package/build/modern/PersistQueryClientProvider.cjs.map +0 -1
- package/build/modern/PersistQueryClientProvider.d.cts +0 -2
- package/build/modern/PersistQueryClientProvider.d.ts +0 -2
- package/build/modern/PersistQueryClientProvider.js +0 -43
- package/build/modern/PersistQueryClientProvider.js.map +0 -1
- package/build/modern/_tsup-dts-rollup.d.cts +0 -114
- package/build/modern/_tsup-dts-rollup.d.ts +0 -114
- package/build/modern/index.cjs +0 -27
- package/build/modern/index.cjs.map +0 -1
- package/build/modern/index.d.cts +0 -21
- package/build/modern/index.d.ts +0 -21
- package/build/modern/index.js +0 -4
- package/build/modern/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/preact-query-persist-client",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.94.4",
|
|
4
4
|
"description": "Preact bindings to work with persisters in TanStack/preact-query",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"!src/__tests__"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@tanstack/query-persist-client-core": "5.
|
|
42
|
+
"@tanstack/query-persist-client-core": "5.94.4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@preact/preset-vite": "^2.10.2",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"preact": "^10.28.0",
|
|
50
50
|
"typescript": "5.9.3",
|
|
51
51
|
"typescript-eslint": "^8.54.0",
|
|
52
|
-
"@tanstack/preact-query": "5.94.
|
|
52
|
+
"@tanstack/preact-query": "5.94.4",
|
|
53
53
|
"@tanstack/query-test-utils": "0.0.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"preact": "^10.0.0",
|
|
57
|
-
"@tanstack/preact-query": "^5.94.
|
|
57
|
+
"@tanstack/preact-query": "^5.94.4"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"clean": "premove ./build ./coverage ./dist-ts",
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/PersistQueryClientProvider.tsx
|
|
21
|
-
var PersistQueryClientProvider_exports = {};
|
|
22
|
-
__export(PersistQueryClientProvider_exports, {
|
|
23
|
-
PersistQueryClientProvider: () => PersistQueryClientProvider
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(PersistQueryClientProvider_exports);
|
|
26
|
-
var import_hooks = require("preact/hooks");
|
|
27
|
-
var import_query_persist_client_core = require("@tanstack/query-persist-client-core");
|
|
28
|
-
var import_preact_query = require("@tanstack/preact-query");
|
|
29
|
-
var import_jsx_runtime = require("preact/jsx-runtime");
|
|
30
|
-
var PersistQueryClientProvider = ({
|
|
31
|
-
children,
|
|
32
|
-
persistOptions,
|
|
33
|
-
onSuccess,
|
|
34
|
-
onError,
|
|
35
|
-
...props
|
|
36
|
-
}) => {
|
|
37
|
-
const [isRestoring, setIsRestoring] = (0, import_hooks.useState)(true);
|
|
38
|
-
const refs = (0, import_hooks.useRef)({ persistOptions, onSuccess, onError });
|
|
39
|
-
const didRestore = (0, import_hooks.useRef)(false);
|
|
40
|
-
(0, import_hooks.useEffect)(() => {
|
|
41
|
-
refs.current = { persistOptions, onSuccess, onError };
|
|
42
|
-
});
|
|
43
|
-
(0, import_hooks.useEffect)(() => {
|
|
44
|
-
const options = {
|
|
45
|
-
...refs.current.persistOptions,
|
|
46
|
-
queryClient: props.client
|
|
47
|
-
};
|
|
48
|
-
if (!didRestore.current) {
|
|
49
|
-
didRestore.current = true;
|
|
50
|
-
(0, import_query_persist_client_core.persistQueryClientRestore)(options).then(() => {
|
|
51
|
-
var _a, _b;
|
|
52
|
-
return (_b = (_a = refs.current).onSuccess) == null ? void 0 : _b.call(_a);
|
|
53
|
-
}).catch(() => {
|
|
54
|
-
var _a, _b;
|
|
55
|
-
return (_b = (_a = refs.current).onError) == null ? void 0 : _b.call(_a);
|
|
56
|
-
}).finally(() => {
|
|
57
|
-
setIsRestoring(false);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
return isRestoring ? void 0 : (0, import_query_persist_client_core.persistQueryClientSubscribe)(options);
|
|
61
|
-
}, [props.client, isRestoring]);
|
|
62
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_preact_query.QueryClientProvider, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_preact_query.IsRestoringProvider, { value: isRestoring, children }) });
|
|
63
|
-
};
|
|
64
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
-
0 && (module.exports = {
|
|
66
|
-
PersistQueryClientProvider
|
|
67
|
-
});
|
|
68
|
-
//# sourceMappingURL=PersistQueryClientProvider.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/PersistQueryClientProvider.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'preact/hooks'\nimport type { VNode } from 'preact'\n\nimport {\n persistQueryClientRestore,\n persistQueryClientSubscribe,\n} from '@tanstack/query-persist-client-core'\nimport {\n IsRestoringProvider,\n QueryClientProvider,\n} from '@tanstack/preact-query'\nimport type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'\nimport type {\n OmitKeyof,\n QueryClientProviderProps,\n} from '@tanstack/preact-query'\n\nexport type PersistQueryClientProviderProps = QueryClientProviderProps & {\n persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>\n onSuccess?: () => Promise<unknown> | unknown\n onError?: () => Promise<unknown> | unknown\n}\n\nexport const PersistQueryClientProvider = ({\n children,\n persistOptions,\n onSuccess,\n onError,\n ...props\n}: PersistQueryClientProviderProps): VNode => {\n const [isRestoring, setIsRestoring] = useState(true)\n const refs = useRef({ persistOptions, onSuccess, onError })\n const didRestore = useRef(false)\n\n useEffect(() => {\n refs.current = { persistOptions, onSuccess, onError }\n })\n\n useEffect(() => {\n const options = {\n ...refs.current.persistOptions,\n queryClient: props.client,\n }\n if (!didRestore.current) {\n didRestore.current = true\n persistQueryClientRestore(options)\n .then(() => refs.current.onSuccess?.())\n .catch(() => refs.current.onError?.())\n .finally(() => {\n setIsRestoring(false)\n })\n }\n return isRestoring ? undefined : persistQueryClientSubscribe(options)\n }, [props.client, isRestoring])\n\n return (\n <QueryClientProvider {...props}>\n <IsRestoringProvider value={isRestoring}>{children}</IsRestoringProvider>\n </QueryClientProvider>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA4C;AAG5C,uCAGO;AACP,0BAGO;AA+CD;AAlCC,IAAM,6BAA6B,CAAC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA8C;AAC5C,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,IAAI;AACnD,QAAM,WAAO,qBAAO,EAAE,gBAAgB,WAAW,QAAQ,CAAC;AAC1D,QAAM,iBAAa,qBAAO,KAAK;AAE/B,8BAAU,MAAM;AACd,SAAK,UAAU,EAAE,gBAAgB,WAAW,QAAQ;AAAA,EACtD,CAAC;AAED,8BAAU,MAAM;AACd,UAAM,UAAU;AAAA,MACd,GAAG,KAAK,QAAQ;AAAA,MAChB,aAAa,MAAM;AAAA,IACrB;AACA,QAAI,CAAC,WAAW,SAAS;AACvB,iBAAW,UAAU;AACrB,sEAA0B,OAAO,EAC9B,KAAK,MAAG;AA9CjB;AA8CoB,gCAAK,SAAQ,cAAb;AAAA,OAA0B,EACrC,MAAM,MAAG;AA/ClB;AA+CqB,gCAAK,SAAQ,YAAb;AAAA,OAAwB,EACpC,QAAQ,MAAM;AACb,uBAAe,KAAK;AAAA,MACtB,CAAC;AAAA,IACL;AACA,WAAO,cAAc,aAAY,8DAA4B,OAAO;AAAA,EACtE,GAAG,CAAC,MAAM,QAAQ,WAAW,CAAC;AAE9B,SACE,4CAAC,2CAAqB,GAAG,OACvB,sDAAC,2CAAoB,OAAO,aAAc,UAAS,GACrD;AAEJ;","names":[]}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// src/PersistQueryClientProvider.tsx
|
|
2
|
-
import { useEffect, useRef, useState } from "preact/hooks";
|
|
3
|
-
import {
|
|
4
|
-
persistQueryClientRestore,
|
|
5
|
-
persistQueryClientSubscribe
|
|
6
|
-
} from "@tanstack/query-persist-client-core";
|
|
7
|
-
import {
|
|
8
|
-
IsRestoringProvider,
|
|
9
|
-
QueryClientProvider
|
|
10
|
-
} from "@tanstack/preact-query";
|
|
11
|
-
import { jsx } from "preact/jsx-runtime";
|
|
12
|
-
var PersistQueryClientProvider = ({
|
|
13
|
-
children,
|
|
14
|
-
persistOptions,
|
|
15
|
-
onSuccess,
|
|
16
|
-
onError,
|
|
17
|
-
...props
|
|
18
|
-
}) => {
|
|
19
|
-
const [isRestoring, setIsRestoring] = useState(true);
|
|
20
|
-
const refs = useRef({ persistOptions, onSuccess, onError });
|
|
21
|
-
const didRestore = useRef(false);
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
refs.current = { persistOptions, onSuccess, onError };
|
|
24
|
-
});
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
const options = {
|
|
27
|
-
...refs.current.persistOptions,
|
|
28
|
-
queryClient: props.client
|
|
29
|
-
};
|
|
30
|
-
if (!didRestore.current) {
|
|
31
|
-
didRestore.current = true;
|
|
32
|
-
persistQueryClientRestore(options).then(() => {
|
|
33
|
-
var _a, _b;
|
|
34
|
-
return (_b = (_a = refs.current).onSuccess) == null ? void 0 : _b.call(_a);
|
|
35
|
-
}).catch(() => {
|
|
36
|
-
var _a, _b;
|
|
37
|
-
return (_b = (_a = refs.current).onError) == null ? void 0 : _b.call(_a);
|
|
38
|
-
}).finally(() => {
|
|
39
|
-
setIsRestoring(false);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
return isRestoring ? void 0 : persistQueryClientSubscribe(options);
|
|
43
|
-
}, [props.client, isRestoring]);
|
|
44
|
-
return /* @__PURE__ */ jsx(QueryClientProvider, { ...props, children: /* @__PURE__ */ jsx(IsRestoringProvider, { value: isRestoring, children }) });
|
|
45
|
-
};
|
|
46
|
-
export {
|
|
47
|
-
PersistQueryClientProvider
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=PersistQueryClientProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/PersistQueryClientProvider.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'preact/hooks'\nimport type { VNode } from 'preact'\n\nimport {\n persistQueryClientRestore,\n persistQueryClientSubscribe,\n} from '@tanstack/query-persist-client-core'\nimport {\n IsRestoringProvider,\n QueryClientProvider,\n} from '@tanstack/preact-query'\nimport type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'\nimport type {\n OmitKeyof,\n QueryClientProviderProps,\n} from '@tanstack/preact-query'\n\nexport type PersistQueryClientProviderProps = QueryClientProviderProps & {\n persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>\n onSuccess?: () => Promise<unknown> | unknown\n onError?: () => Promise<unknown> | unknown\n}\n\nexport const PersistQueryClientProvider = ({\n children,\n persistOptions,\n onSuccess,\n onError,\n ...props\n}: PersistQueryClientProviderProps): VNode => {\n const [isRestoring, setIsRestoring] = useState(true)\n const refs = useRef({ persistOptions, onSuccess, onError })\n const didRestore = useRef(false)\n\n useEffect(() => {\n refs.current = { persistOptions, onSuccess, onError }\n })\n\n useEffect(() => {\n const options = {\n ...refs.current.persistOptions,\n queryClient: props.client,\n }\n if (!didRestore.current) {\n didRestore.current = true\n persistQueryClientRestore(options)\n .then(() => refs.current.onSuccess?.())\n .catch(() => refs.current.onError?.())\n .finally(() => {\n setIsRestoring(false)\n })\n }\n return isRestoring ? undefined : persistQueryClientSubscribe(options)\n }, [props.client, isRestoring])\n\n return (\n <QueryClientProvider {...props}>\n <IsRestoringProvider value={isRestoring}>{children}</IsRestoringProvider>\n </QueryClientProvider>\n )\n}\n"],"mappings":";AAAA,SAAS,WAAW,QAAQ,gBAAgB;AAG5C;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA+CD;AAlCC,IAAM,6BAA6B,CAAC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA8C;AAC5C,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,IAAI;AACnD,QAAM,OAAO,OAAO,EAAE,gBAAgB,WAAW,QAAQ,CAAC;AAC1D,QAAM,aAAa,OAAO,KAAK;AAE/B,YAAU,MAAM;AACd,SAAK,UAAU,EAAE,gBAAgB,WAAW,QAAQ;AAAA,EACtD,CAAC;AAED,YAAU,MAAM;AACd,UAAM,UAAU;AAAA,MACd,GAAG,KAAK,QAAQ;AAAA,MAChB,aAAa,MAAM;AAAA,IACrB;AACA,QAAI,CAAC,WAAW,SAAS;AACvB,iBAAW,UAAU;AACrB,gCAA0B,OAAO,EAC9B,KAAK,MAAG;AA9CjB;AA8CoB,gCAAK,SAAQ,cAAb;AAAA,OAA0B,EACrC,MAAM,MAAG;AA/ClB;AA+CqB,gCAAK,SAAQ,YAAb;AAAA,OAAwB,EACpC,QAAQ,MAAM;AACb,uBAAe,KAAK;AAAA,MACtB,CAAC;AAAA,IACL;AACA,WAAO,cAAc,SAAY,4BAA4B,OAAO;AAAA,EACtE,GAAG,CAAC,MAAM,QAAQ,WAAW,CAAC;AAE9B,SACE,oBAAC,uBAAqB,GAAG,OACvB,8BAAC,uBAAoB,OAAO,aAAc,UAAS,GACrD;AAEJ;","names":[]}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { AsyncStorage } from '@tanstack/query-persist-client-core';
|
|
2
|
-
import type { ComponentChildren } from 'preact';
|
|
3
|
-
import { experimental_createQueryPersister } from '@tanstack/query-persist-client-core';
|
|
4
|
-
import { JSX } from 'preact';
|
|
5
|
-
import { MaybePromise } from '@tanstack/query-persist-client-core';
|
|
6
|
-
import type { OmitKeyof } from '@tanstack/preact-query';
|
|
7
|
-
import { Options } from 'tsup';
|
|
8
|
-
import { PersistedClient } from '@tanstack/query-persist-client-core';
|
|
9
|
-
import { PersistedQuery } from '@tanstack/query-persist-client-core';
|
|
10
|
-
import { PersistedQueryClientRestoreOptions } from '@tanstack/query-persist-client-core';
|
|
11
|
-
import { PersistedQueryClientSaveOptions } from '@tanstack/query-persist-client-core';
|
|
12
|
-
import { Persister } from '@tanstack/query-persist-client-core';
|
|
13
|
-
import { PERSISTER_KEY_PREFIX } from '@tanstack/query-persist-client-core';
|
|
14
|
-
import { persistQueryClient } from '@tanstack/query-persist-client-core';
|
|
15
|
-
import { PersistQueryClientOptions } from '@tanstack/query-persist-client-core';
|
|
16
|
-
import { persistQueryClientRestore } from '@tanstack/query-persist-client-core';
|
|
17
|
-
import { PersistQueryClientRootOptions } from '@tanstack/query-persist-client-core';
|
|
18
|
-
import { persistQueryClientSave } from '@tanstack/query-persist-client-core';
|
|
19
|
-
import { persistQueryClientSubscribe } from '@tanstack/query-persist-client-core';
|
|
20
|
-
import { PersistRetryer } from '@tanstack/query-persist-client-core';
|
|
21
|
-
import { Promisable } from '@tanstack/query-persist-client-core';
|
|
22
|
-
import type { QueryClientProviderProps } from '@tanstack/preact-query';
|
|
23
|
-
import { removeOldestQuery } from '@tanstack/query-persist-client-core';
|
|
24
|
-
import { StoragePersisterOptions } from '@tanstack/query-persist-client-core';
|
|
25
|
-
import type { UserConfig } from 'vite';
|
|
26
|
-
import type { VNode } from 'preact';
|
|
27
|
-
|
|
28
|
-
export { AsyncStorage }
|
|
29
|
-
|
|
30
|
-
export declare const default_alias: any[];
|
|
31
|
-
|
|
32
|
-
export declare const default_alias_1: any[];
|
|
33
|
-
|
|
34
|
-
export declare const default_alias_2: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
|
35
|
-
|
|
36
|
-
export declare const default_alias_3: UserConfig;
|
|
37
|
-
|
|
38
|
-
export { experimental_createQueryPersister }
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @param {Object} opts - Options for building configurations.
|
|
42
|
-
* @param {string[]} opts.entry - The entry array.
|
|
43
|
-
* @returns {import('tsup').Options}
|
|
44
|
-
*/
|
|
45
|
-
export declare function legacyConfig(opts: {
|
|
46
|
-
entry: string[];
|
|
47
|
-
}): Options;
|
|
48
|
-
|
|
49
|
-
export { MaybePromise }
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* @param {Object} opts - Options for building configurations.
|
|
53
|
-
* @param {string[]} opts.entry - The entry array.
|
|
54
|
-
* @returns {import('tsup').Options}
|
|
55
|
-
*/
|
|
56
|
-
export declare function modernConfig(opts: {
|
|
57
|
-
entry: string[];
|
|
58
|
-
}): Options;
|
|
59
|
-
|
|
60
|
-
export { PersistedClient }
|
|
61
|
-
|
|
62
|
-
export { PersistedQuery }
|
|
63
|
-
|
|
64
|
-
export { PersistedQueryClientRestoreOptions }
|
|
65
|
-
|
|
66
|
-
export { PersistedQueryClientSaveOptions }
|
|
67
|
-
|
|
68
|
-
export { Persister }
|
|
69
|
-
|
|
70
|
-
export { PERSISTER_KEY_PREFIX }
|
|
71
|
-
|
|
72
|
-
export { persistQueryClient }
|
|
73
|
-
|
|
74
|
-
export { PersistQueryClientOptions }
|
|
75
|
-
|
|
76
|
-
declare const PersistQueryClientProvider: ({ children, persistOptions, onSuccess, onError, ...props }: PersistQueryClientProviderProps) => VNode;
|
|
77
|
-
export { PersistQueryClientProvider }
|
|
78
|
-
export { PersistQueryClientProvider as PersistQueryClientProvider_alias_1 }
|
|
79
|
-
|
|
80
|
-
export declare function PersistQueryClientProvider_alias_2({ children, persistOptions, onSuccess, onError, ...props }: Props): JSX.Element;
|
|
81
|
-
|
|
82
|
-
declare type PersistQueryClientProviderProps = QueryClientProviderProps & {
|
|
83
|
-
persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>;
|
|
84
|
-
onSuccess?: () => Promise<unknown> | unknown;
|
|
85
|
-
onError?: () => Promise<unknown> | unknown;
|
|
86
|
-
};
|
|
87
|
-
export { PersistQueryClientProviderProps }
|
|
88
|
-
export { PersistQueryClientProviderProps as PersistQueryClientProviderProps_alias_1 }
|
|
89
|
-
|
|
90
|
-
export { persistQueryClientRestore }
|
|
91
|
-
|
|
92
|
-
export { PersistQueryClientRootOptions }
|
|
93
|
-
|
|
94
|
-
export { persistQueryClientSave }
|
|
95
|
-
|
|
96
|
-
export { persistQueryClientSubscribe }
|
|
97
|
-
|
|
98
|
-
export { PersistRetryer }
|
|
99
|
-
|
|
100
|
-
export { Promisable }
|
|
101
|
-
|
|
102
|
-
declare type Props = {
|
|
103
|
-
children?: ComponentChildren;
|
|
104
|
-
client: any;
|
|
105
|
-
persistOptions: any;
|
|
106
|
-
onSuccess?: () => void | Promise<void>;
|
|
107
|
-
onError?: () => void;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export { removeOldestQuery }
|
|
111
|
-
|
|
112
|
-
export { StoragePersisterOptions }
|
|
113
|
-
|
|
114
|
-
export { }
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { AsyncStorage } from '@tanstack/query-persist-client-core';
|
|
2
|
-
import type { ComponentChildren } from 'preact';
|
|
3
|
-
import { experimental_createQueryPersister } from '@tanstack/query-persist-client-core';
|
|
4
|
-
import { JSX } from 'preact';
|
|
5
|
-
import { MaybePromise } from '@tanstack/query-persist-client-core';
|
|
6
|
-
import type { OmitKeyof } from '@tanstack/preact-query';
|
|
7
|
-
import { Options } from 'tsup';
|
|
8
|
-
import { PersistedClient } from '@tanstack/query-persist-client-core';
|
|
9
|
-
import { PersistedQuery } from '@tanstack/query-persist-client-core';
|
|
10
|
-
import { PersistedQueryClientRestoreOptions } from '@tanstack/query-persist-client-core';
|
|
11
|
-
import { PersistedQueryClientSaveOptions } from '@tanstack/query-persist-client-core';
|
|
12
|
-
import { Persister } from '@tanstack/query-persist-client-core';
|
|
13
|
-
import { PERSISTER_KEY_PREFIX } from '@tanstack/query-persist-client-core';
|
|
14
|
-
import { persistQueryClient } from '@tanstack/query-persist-client-core';
|
|
15
|
-
import { PersistQueryClientOptions } from '@tanstack/query-persist-client-core';
|
|
16
|
-
import { persistQueryClientRestore } from '@tanstack/query-persist-client-core';
|
|
17
|
-
import { PersistQueryClientRootOptions } from '@tanstack/query-persist-client-core';
|
|
18
|
-
import { persistQueryClientSave } from '@tanstack/query-persist-client-core';
|
|
19
|
-
import { persistQueryClientSubscribe } from '@tanstack/query-persist-client-core';
|
|
20
|
-
import { PersistRetryer } from '@tanstack/query-persist-client-core';
|
|
21
|
-
import { Promisable } from '@tanstack/query-persist-client-core';
|
|
22
|
-
import type { QueryClientProviderProps } from '@tanstack/preact-query';
|
|
23
|
-
import { removeOldestQuery } from '@tanstack/query-persist-client-core';
|
|
24
|
-
import { StoragePersisterOptions } from '@tanstack/query-persist-client-core';
|
|
25
|
-
import type { UserConfig } from 'vite';
|
|
26
|
-
import type { VNode } from 'preact';
|
|
27
|
-
|
|
28
|
-
export { AsyncStorage }
|
|
29
|
-
|
|
30
|
-
export declare const default_alias: any[];
|
|
31
|
-
|
|
32
|
-
export declare const default_alias_1: any[];
|
|
33
|
-
|
|
34
|
-
export declare const default_alias_2: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
|
35
|
-
|
|
36
|
-
export declare const default_alias_3: UserConfig;
|
|
37
|
-
|
|
38
|
-
export { experimental_createQueryPersister }
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @param {Object} opts - Options for building configurations.
|
|
42
|
-
* @param {string[]} opts.entry - The entry array.
|
|
43
|
-
* @returns {import('tsup').Options}
|
|
44
|
-
*/
|
|
45
|
-
export declare function legacyConfig(opts: {
|
|
46
|
-
entry: string[];
|
|
47
|
-
}): Options;
|
|
48
|
-
|
|
49
|
-
export { MaybePromise }
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* @param {Object} opts - Options for building configurations.
|
|
53
|
-
* @param {string[]} opts.entry - The entry array.
|
|
54
|
-
* @returns {import('tsup').Options}
|
|
55
|
-
*/
|
|
56
|
-
export declare function modernConfig(opts: {
|
|
57
|
-
entry: string[];
|
|
58
|
-
}): Options;
|
|
59
|
-
|
|
60
|
-
export { PersistedClient }
|
|
61
|
-
|
|
62
|
-
export { PersistedQuery }
|
|
63
|
-
|
|
64
|
-
export { PersistedQueryClientRestoreOptions }
|
|
65
|
-
|
|
66
|
-
export { PersistedQueryClientSaveOptions }
|
|
67
|
-
|
|
68
|
-
export { Persister }
|
|
69
|
-
|
|
70
|
-
export { PERSISTER_KEY_PREFIX }
|
|
71
|
-
|
|
72
|
-
export { persistQueryClient }
|
|
73
|
-
|
|
74
|
-
export { PersistQueryClientOptions }
|
|
75
|
-
|
|
76
|
-
declare const PersistQueryClientProvider: ({ children, persistOptions, onSuccess, onError, ...props }: PersistQueryClientProviderProps) => VNode;
|
|
77
|
-
export { PersistQueryClientProvider }
|
|
78
|
-
export { PersistQueryClientProvider as PersistQueryClientProvider_alias_1 }
|
|
79
|
-
|
|
80
|
-
export declare function PersistQueryClientProvider_alias_2({ children, persistOptions, onSuccess, onError, ...props }: Props): JSX.Element;
|
|
81
|
-
|
|
82
|
-
declare type PersistQueryClientProviderProps = QueryClientProviderProps & {
|
|
83
|
-
persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>;
|
|
84
|
-
onSuccess?: () => Promise<unknown> | unknown;
|
|
85
|
-
onError?: () => Promise<unknown> | unknown;
|
|
86
|
-
};
|
|
87
|
-
export { PersistQueryClientProviderProps }
|
|
88
|
-
export { PersistQueryClientProviderProps as PersistQueryClientProviderProps_alias_1 }
|
|
89
|
-
|
|
90
|
-
export { persistQueryClientRestore }
|
|
91
|
-
|
|
92
|
-
export { PersistQueryClientRootOptions }
|
|
93
|
-
|
|
94
|
-
export { persistQueryClientSave }
|
|
95
|
-
|
|
96
|
-
export { persistQueryClientSubscribe }
|
|
97
|
-
|
|
98
|
-
export { PersistRetryer }
|
|
99
|
-
|
|
100
|
-
export { Promisable }
|
|
101
|
-
|
|
102
|
-
declare type Props = {
|
|
103
|
-
children?: ComponentChildren;
|
|
104
|
-
client: any;
|
|
105
|
-
persistOptions: any;
|
|
106
|
-
onSuccess?: () => void | Promise<void>;
|
|
107
|
-
onError?: () => void;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export { removeOldestQuery }
|
|
111
|
-
|
|
112
|
-
export { StoragePersisterOptions }
|
|
113
|
-
|
|
114
|
-
export { }
|
package/build/legacy/index.cjs
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
|
|
17
|
-
// src/index.ts
|
|
18
|
-
var index_exports = {};
|
|
19
|
-
module.exports = __toCommonJS(index_exports);
|
|
20
|
-
__reExport(index_exports, require("@tanstack/query-persist-client-core"), module.exports);
|
|
21
|
-
__reExport(index_exports, require("./PersistQueryClientProvider.cjs"), module.exports);
|
|
22
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
23
|
-
0 && (module.exports = {
|
|
24
|
-
...require("@tanstack/query-persist-client-core"),
|
|
25
|
-
...require("./PersistQueryClientProvider.cjs")
|
|
26
|
-
});
|
|
27
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["// Re-export core\nexport * from '@tanstack/query-persist-client-core'\n\nexport * from './PersistQueryClientProvider'\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AACA,0BAAc,gDADd;AAGA,0BAAc,6CAHd;","names":[]}
|
package/build/legacy/index.d.cts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export { persistQueryClientRestore } from './_tsup-dts-rollup.cjs';
|
|
2
|
-
export { persistQueryClientSave } from './_tsup-dts-rollup.cjs';
|
|
3
|
-
export { persistQueryClientSubscribe } from './_tsup-dts-rollup.cjs';
|
|
4
|
-
export { persistQueryClient } from './_tsup-dts-rollup.cjs';
|
|
5
|
-
export { Promisable } from './_tsup-dts-rollup.cjs';
|
|
6
|
-
export { Persister } from './_tsup-dts-rollup.cjs';
|
|
7
|
-
export { PersistedClient } from './_tsup-dts-rollup.cjs';
|
|
8
|
-
export { PersistQueryClientRootOptions } from './_tsup-dts-rollup.cjs';
|
|
9
|
-
export { PersistedQueryClientRestoreOptions } from './_tsup-dts-rollup.cjs';
|
|
10
|
-
export { PersistedQueryClientSaveOptions } from './_tsup-dts-rollup.cjs';
|
|
11
|
-
export { PersistQueryClientOptions } from './_tsup-dts-rollup.cjs';
|
|
12
|
-
export { PersistRetryer } from './_tsup-dts-rollup.cjs';
|
|
13
|
-
export { removeOldestQuery } from './_tsup-dts-rollup.cjs';
|
|
14
|
-
export { experimental_createQueryPersister } from './_tsup-dts-rollup.cjs';
|
|
15
|
-
export { PersistedQuery } from './_tsup-dts-rollup.cjs';
|
|
16
|
-
export { MaybePromise } from './_tsup-dts-rollup.cjs';
|
|
17
|
-
export { AsyncStorage } from './_tsup-dts-rollup.cjs';
|
|
18
|
-
export { StoragePersisterOptions } from './_tsup-dts-rollup.cjs';
|
|
19
|
-
export { PERSISTER_KEY_PREFIX } from './_tsup-dts-rollup.cjs';
|
|
20
|
-
export { PersistQueryClientProviderProps_alias_1 as PersistQueryClientProviderProps } from './_tsup-dts-rollup.cjs';
|
|
21
|
-
export { PersistQueryClientProvider_alias_1 as PersistQueryClientProvider } from './_tsup-dts-rollup.cjs';
|
package/build/legacy/index.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export { persistQueryClientRestore } from './_tsup-dts-rollup.js';
|
|
2
|
-
export { persistQueryClientSave } from './_tsup-dts-rollup.js';
|
|
3
|
-
export { persistQueryClientSubscribe } from './_tsup-dts-rollup.js';
|
|
4
|
-
export { persistQueryClient } from './_tsup-dts-rollup.js';
|
|
5
|
-
export { Promisable } from './_tsup-dts-rollup.js';
|
|
6
|
-
export { Persister } from './_tsup-dts-rollup.js';
|
|
7
|
-
export { PersistedClient } from './_tsup-dts-rollup.js';
|
|
8
|
-
export { PersistQueryClientRootOptions } from './_tsup-dts-rollup.js';
|
|
9
|
-
export { PersistedQueryClientRestoreOptions } from './_tsup-dts-rollup.js';
|
|
10
|
-
export { PersistedQueryClientSaveOptions } from './_tsup-dts-rollup.js';
|
|
11
|
-
export { PersistQueryClientOptions } from './_tsup-dts-rollup.js';
|
|
12
|
-
export { PersistRetryer } from './_tsup-dts-rollup.js';
|
|
13
|
-
export { removeOldestQuery } from './_tsup-dts-rollup.js';
|
|
14
|
-
export { experimental_createQueryPersister } from './_tsup-dts-rollup.js';
|
|
15
|
-
export { PersistedQuery } from './_tsup-dts-rollup.js';
|
|
16
|
-
export { MaybePromise } from './_tsup-dts-rollup.js';
|
|
17
|
-
export { AsyncStorage } from './_tsup-dts-rollup.js';
|
|
18
|
-
export { StoragePersisterOptions } from './_tsup-dts-rollup.js';
|
|
19
|
-
export { PERSISTER_KEY_PREFIX } from './_tsup-dts-rollup.js';
|
|
20
|
-
export { PersistQueryClientProviderProps_alias_1 as PersistQueryClientProviderProps } from './_tsup-dts-rollup.js';
|
|
21
|
-
export { PersistQueryClientProvider_alias_1 as PersistQueryClientProvider } from './_tsup-dts-rollup.js';
|
package/build/legacy/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["// Re-export core\nexport * from '@tanstack/query-persist-client-core'\n\nexport * from './PersistQueryClientProvider'\n"],"mappings":";AACA,cAAc;AAEd,cAAc;","names":[]}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/PersistQueryClientProvider.tsx
|
|
21
|
-
var PersistQueryClientProvider_exports = {};
|
|
22
|
-
__export(PersistQueryClientProvider_exports, {
|
|
23
|
-
PersistQueryClientProvider: () => PersistQueryClientProvider
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(PersistQueryClientProvider_exports);
|
|
26
|
-
var import_hooks = require("preact/hooks");
|
|
27
|
-
var import_query_persist_client_core = require("@tanstack/query-persist-client-core");
|
|
28
|
-
var import_preact_query = require("@tanstack/preact-query");
|
|
29
|
-
var import_jsx_runtime = require("preact/jsx-runtime");
|
|
30
|
-
var PersistQueryClientProvider = ({
|
|
31
|
-
children,
|
|
32
|
-
persistOptions,
|
|
33
|
-
onSuccess,
|
|
34
|
-
onError,
|
|
35
|
-
...props
|
|
36
|
-
}) => {
|
|
37
|
-
const [isRestoring, setIsRestoring] = (0, import_hooks.useState)(true);
|
|
38
|
-
const refs = (0, import_hooks.useRef)({ persistOptions, onSuccess, onError });
|
|
39
|
-
const didRestore = (0, import_hooks.useRef)(false);
|
|
40
|
-
(0, import_hooks.useEffect)(() => {
|
|
41
|
-
refs.current = { persistOptions, onSuccess, onError };
|
|
42
|
-
});
|
|
43
|
-
(0, import_hooks.useEffect)(() => {
|
|
44
|
-
const options = {
|
|
45
|
-
...refs.current.persistOptions,
|
|
46
|
-
queryClient: props.client
|
|
47
|
-
};
|
|
48
|
-
if (!didRestore.current) {
|
|
49
|
-
didRestore.current = true;
|
|
50
|
-
(0, import_query_persist_client_core.persistQueryClientRestore)(options).then(() => refs.current.onSuccess?.()).catch(() => refs.current.onError?.()).finally(() => {
|
|
51
|
-
setIsRestoring(false);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
return isRestoring ? void 0 : (0, import_query_persist_client_core.persistQueryClientSubscribe)(options);
|
|
55
|
-
}, [props.client, isRestoring]);
|
|
56
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_preact_query.QueryClientProvider, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_preact_query.IsRestoringProvider, { value: isRestoring, children }) });
|
|
57
|
-
};
|
|
58
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
-
0 && (module.exports = {
|
|
60
|
-
PersistQueryClientProvider
|
|
61
|
-
});
|
|
62
|
-
//# sourceMappingURL=PersistQueryClientProvider.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/PersistQueryClientProvider.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'preact/hooks'\nimport type { VNode } from 'preact'\n\nimport {\n persistQueryClientRestore,\n persistQueryClientSubscribe,\n} from '@tanstack/query-persist-client-core'\nimport {\n IsRestoringProvider,\n QueryClientProvider,\n} from '@tanstack/preact-query'\nimport type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'\nimport type {\n OmitKeyof,\n QueryClientProviderProps,\n} from '@tanstack/preact-query'\n\nexport type PersistQueryClientProviderProps = QueryClientProviderProps & {\n persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>\n onSuccess?: () => Promise<unknown> | unknown\n onError?: () => Promise<unknown> | unknown\n}\n\nexport const PersistQueryClientProvider = ({\n children,\n persistOptions,\n onSuccess,\n onError,\n ...props\n}: PersistQueryClientProviderProps): VNode => {\n const [isRestoring, setIsRestoring] = useState(true)\n const refs = useRef({ persistOptions, onSuccess, onError })\n const didRestore = useRef(false)\n\n useEffect(() => {\n refs.current = { persistOptions, onSuccess, onError }\n })\n\n useEffect(() => {\n const options = {\n ...refs.current.persistOptions,\n queryClient: props.client,\n }\n if (!didRestore.current) {\n didRestore.current = true\n persistQueryClientRestore(options)\n .then(() => refs.current.onSuccess?.())\n .catch(() => refs.current.onError?.())\n .finally(() => {\n setIsRestoring(false)\n })\n }\n return isRestoring ? undefined : persistQueryClientSubscribe(options)\n }, [props.client, isRestoring])\n\n return (\n <QueryClientProvider {...props}>\n <IsRestoringProvider value={isRestoring}>{children}</IsRestoringProvider>\n </QueryClientProvider>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA4C;AAG5C,uCAGO;AACP,0BAGO;AA+CD;AAlCC,IAAM,6BAA6B,CAAC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA8C;AAC5C,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,IAAI;AACnD,QAAM,WAAO,qBAAO,EAAE,gBAAgB,WAAW,QAAQ,CAAC;AAC1D,QAAM,iBAAa,qBAAO,KAAK;AAE/B,8BAAU,MAAM;AACd,SAAK,UAAU,EAAE,gBAAgB,WAAW,QAAQ;AAAA,EACtD,CAAC;AAED,8BAAU,MAAM;AACd,UAAM,UAAU;AAAA,MACd,GAAG,KAAK,QAAQ;AAAA,MAChB,aAAa,MAAM;AAAA,IACrB;AACA,QAAI,CAAC,WAAW,SAAS;AACvB,iBAAW,UAAU;AACrB,sEAA0B,OAAO,EAC9B,KAAK,MAAM,KAAK,QAAQ,YAAY,CAAC,EACrC,MAAM,MAAM,KAAK,QAAQ,UAAU,CAAC,EACpC,QAAQ,MAAM;AACb,uBAAe,KAAK;AAAA,MACtB,CAAC;AAAA,IACL;AACA,WAAO,cAAc,aAAY,8DAA4B,OAAO;AAAA,EACtE,GAAG,CAAC,MAAM,QAAQ,WAAW,CAAC;AAE9B,SACE,4CAAC,2CAAqB,GAAG,OACvB,sDAAC,2CAAoB,OAAO,aAAc,UAAS,GACrD;AAEJ;","names":[]}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// src/PersistQueryClientProvider.tsx
|
|
2
|
-
import { useEffect, useRef, useState } from "preact/hooks";
|
|
3
|
-
import {
|
|
4
|
-
persistQueryClientRestore,
|
|
5
|
-
persistQueryClientSubscribe
|
|
6
|
-
} from "@tanstack/query-persist-client-core";
|
|
7
|
-
import {
|
|
8
|
-
IsRestoringProvider,
|
|
9
|
-
QueryClientProvider
|
|
10
|
-
} from "@tanstack/preact-query";
|
|
11
|
-
import { jsx } from "preact/jsx-runtime";
|
|
12
|
-
var PersistQueryClientProvider = ({
|
|
13
|
-
children,
|
|
14
|
-
persistOptions,
|
|
15
|
-
onSuccess,
|
|
16
|
-
onError,
|
|
17
|
-
...props
|
|
18
|
-
}) => {
|
|
19
|
-
const [isRestoring, setIsRestoring] = useState(true);
|
|
20
|
-
const refs = useRef({ persistOptions, onSuccess, onError });
|
|
21
|
-
const didRestore = useRef(false);
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
refs.current = { persistOptions, onSuccess, onError };
|
|
24
|
-
});
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
const options = {
|
|
27
|
-
...refs.current.persistOptions,
|
|
28
|
-
queryClient: props.client
|
|
29
|
-
};
|
|
30
|
-
if (!didRestore.current) {
|
|
31
|
-
didRestore.current = true;
|
|
32
|
-
persistQueryClientRestore(options).then(() => refs.current.onSuccess?.()).catch(() => refs.current.onError?.()).finally(() => {
|
|
33
|
-
setIsRestoring(false);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
return isRestoring ? void 0 : persistQueryClientSubscribe(options);
|
|
37
|
-
}, [props.client, isRestoring]);
|
|
38
|
-
return /* @__PURE__ */ jsx(QueryClientProvider, { ...props, children: /* @__PURE__ */ jsx(IsRestoringProvider, { value: isRestoring, children }) });
|
|
39
|
-
};
|
|
40
|
-
export {
|
|
41
|
-
PersistQueryClientProvider
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=PersistQueryClientProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/PersistQueryClientProvider.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'preact/hooks'\nimport type { VNode } from 'preact'\n\nimport {\n persistQueryClientRestore,\n persistQueryClientSubscribe,\n} from '@tanstack/query-persist-client-core'\nimport {\n IsRestoringProvider,\n QueryClientProvider,\n} from '@tanstack/preact-query'\nimport type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'\nimport type {\n OmitKeyof,\n QueryClientProviderProps,\n} from '@tanstack/preact-query'\n\nexport type PersistQueryClientProviderProps = QueryClientProviderProps & {\n persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>\n onSuccess?: () => Promise<unknown> | unknown\n onError?: () => Promise<unknown> | unknown\n}\n\nexport const PersistQueryClientProvider = ({\n children,\n persistOptions,\n onSuccess,\n onError,\n ...props\n}: PersistQueryClientProviderProps): VNode => {\n const [isRestoring, setIsRestoring] = useState(true)\n const refs = useRef({ persistOptions, onSuccess, onError })\n const didRestore = useRef(false)\n\n useEffect(() => {\n refs.current = { persistOptions, onSuccess, onError }\n })\n\n useEffect(() => {\n const options = {\n ...refs.current.persistOptions,\n queryClient: props.client,\n }\n if (!didRestore.current) {\n didRestore.current = true\n persistQueryClientRestore(options)\n .then(() => refs.current.onSuccess?.())\n .catch(() => refs.current.onError?.())\n .finally(() => {\n setIsRestoring(false)\n })\n }\n return isRestoring ? undefined : persistQueryClientSubscribe(options)\n }, [props.client, isRestoring])\n\n return (\n <QueryClientProvider {...props}>\n <IsRestoringProvider value={isRestoring}>{children}</IsRestoringProvider>\n </QueryClientProvider>\n )\n}\n"],"mappings":";AAAA,SAAS,WAAW,QAAQ,gBAAgB;AAG5C;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA+CD;AAlCC,IAAM,6BAA6B,CAAC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA8C;AAC5C,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,IAAI;AACnD,QAAM,OAAO,OAAO,EAAE,gBAAgB,WAAW,QAAQ,CAAC;AAC1D,QAAM,aAAa,OAAO,KAAK;AAE/B,YAAU,MAAM;AACd,SAAK,UAAU,EAAE,gBAAgB,WAAW,QAAQ;AAAA,EACtD,CAAC;AAED,YAAU,MAAM;AACd,UAAM,UAAU;AAAA,MACd,GAAG,KAAK,QAAQ;AAAA,MAChB,aAAa,MAAM;AAAA,IACrB;AACA,QAAI,CAAC,WAAW,SAAS;AACvB,iBAAW,UAAU;AACrB,gCAA0B,OAAO,EAC9B,KAAK,MAAM,KAAK,QAAQ,YAAY,CAAC,EACrC,MAAM,MAAM,KAAK,QAAQ,UAAU,CAAC,EACpC,QAAQ,MAAM;AACb,uBAAe,KAAK;AAAA,MACtB,CAAC;AAAA,IACL;AACA,WAAO,cAAc,SAAY,4BAA4B,OAAO;AAAA,EACtE,GAAG,CAAC,MAAM,QAAQ,WAAW,CAAC;AAE9B,SACE,oBAAC,uBAAqB,GAAG,OACvB,8BAAC,uBAAoB,OAAO,aAAc,UAAS,GACrD;AAEJ;","names":[]}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { AsyncStorage } from '@tanstack/query-persist-client-core';
|
|
2
|
-
import type { ComponentChildren } from 'preact';
|
|
3
|
-
import { experimental_createQueryPersister } from '@tanstack/query-persist-client-core';
|
|
4
|
-
import { JSX } from 'preact';
|
|
5
|
-
import { MaybePromise } from '@tanstack/query-persist-client-core';
|
|
6
|
-
import type { OmitKeyof } from '@tanstack/preact-query';
|
|
7
|
-
import { Options } from 'tsup';
|
|
8
|
-
import { PersistedClient } from '@tanstack/query-persist-client-core';
|
|
9
|
-
import { PersistedQuery } from '@tanstack/query-persist-client-core';
|
|
10
|
-
import { PersistedQueryClientRestoreOptions } from '@tanstack/query-persist-client-core';
|
|
11
|
-
import { PersistedQueryClientSaveOptions } from '@tanstack/query-persist-client-core';
|
|
12
|
-
import { Persister } from '@tanstack/query-persist-client-core';
|
|
13
|
-
import { PERSISTER_KEY_PREFIX } from '@tanstack/query-persist-client-core';
|
|
14
|
-
import { persistQueryClient } from '@tanstack/query-persist-client-core';
|
|
15
|
-
import { PersistQueryClientOptions } from '@tanstack/query-persist-client-core';
|
|
16
|
-
import { persistQueryClientRestore } from '@tanstack/query-persist-client-core';
|
|
17
|
-
import { PersistQueryClientRootOptions } from '@tanstack/query-persist-client-core';
|
|
18
|
-
import { persistQueryClientSave } from '@tanstack/query-persist-client-core';
|
|
19
|
-
import { persistQueryClientSubscribe } from '@tanstack/query-persist-client-core';
|
|
20
|
-
import { PersistRetryer } from '@tanstack/query-persist-client-core';
|
|
21
|
-
import { Promisable } from '@tanstack/query-persist-client-core';
|
|
22
|
-
import type { QueryClientProviderProps } from '@tanstack/preact-query';
|
|
23
|
-
import { removeOldestQuery } from '@tanstack/query-persist-client-core';
|
|
24
|
-
import { StoragePersisterOptions } from '@tanstack/query-persist-client-core';
|
|
25
|
-
import type { UserConfig } from 'vite';
|
|
26
|
-
import type { VNode } from 'preact';
|
|
27
|
-
|
|
28
|
-
export { AsyncStorage }
|
|
29
|
-
|
|
30
|
-
export declare const default_alias: any[];
|
|
31
|
-
|
|
32
|
-
export declare const default_alias_1: any[];
|
|
33
|
-
|
|
34
|
-
export declare const default_alias_2: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
|
35
|
-
|
|
36
|
-
export declare const default_alias_3: UserConfig;
|
|
37
|
-
|
|
38
|
-
export { experimental_createQueryPersister }
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @param {Object} opts - Options for building configurations.
|
|
42
|
-
* @param {string[]} opts.entry - The entry array.
|
|
43
|
-
* @returns {import('tsup').Options}
|
|
44
|
-
*/
|
|
45
|
-
export declare function legacyConfig(opts: {
|
|
46
|
-
entry: string[];
|
|
47
|
-
}): Options;
|
|
48
|
-
|
|
49
|
-
export { MaybePromise }
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* @param {Object} opts - Options for building configurations.
|
|
53
|
-
* @param {string[]} opts.entry - The entry array.
|
|
54
|
-
* @returns {import('tsup').Options}
|
|
55
|
-
*/
|
|
56
|
-
export declare function modernConfig(opts: {
|
|
57
|
-
entry: string[];
|
|
58
|
-
}): Options;
|
|
59
|
-
|
|
60
|
-
export { PersistedClient }
|
|
61
|
-
|
|
62
|
-
export { PersistedQuery }
|
|
63
|
-
|
|
64
|
-
export { PersistedQueryClientRestoreOptions }
|
|
65
|
-
|
|
66
|
-
export { PersistedQueryClientSaveOptions }
|
|
67
|
-
|
|
68
|
-
export { Persister }
|
|
69
|
-
|
|
70
|
-
export { PERSISTER_KEY_PREFIX }
|
|
71
|
-
|
|
72
|
-
export { persistQueryClient }
|
|
73
|
-
|
|
74
|
-
export { PersistQueryClientOptions }
|
|
75
|
-
|
|
76
|
-
declare const PersistQueryClientProvider: ({ children, persistOptions, onSuccess, onError, ...props }: PersistQueryClientProviderProps) => VNode;
|
|
77
|
-
export { PersistQueryClientProvider }
|
|
78
|
-
export { PersistQueryClientProvider as PersistQueryClientProvider_alias_1 }
|
|
79
|
-
|
|
80
|
-
export declare function PersistQueryClientProvider_alias_2({ children, persistOptions, onSuccess, onError, ...props }: Props): JSX.Element;
|
|
81
|
-
|
|
82
|
-
declare type PersistQueryClientProviderProps = QueryClientProviderProps & {
|
|
83
|
-
persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>;
|
|
84
|
-
onSuccess?: () => Promise<unknown> | unknown;
|
|
85
|
-
onError?: () => Promise<unknown> | unknown;
|
|
86
|
-
};
|
|
87
|
-
export { PersistQueryClientProviderProps }
|
|
88
|
-
export { PersistQueryClientProviderProps as PersistQueryClientProviderProps_alias_1 }
|
|
89
|
-
|
|
90
|
-
export { persistQueryClientRestore }
|
|
91
|
-
|
|
92
|
-
export { PersistQueryClientRootOptions }
|
|
93
|
-
|
|
94
|
-
export { persistQueryClientSave }
|
|
95
|
-
|
|
96
|
-
export { persistQueryClientSubscribe }
|
|
97
|
-
|
|
98
|
-
export { PersistRetryer }
|
|
99
|
-
|
|
100
|
-
export { Promisable }
|
|
101
|
-
|
|
102
|
-
declare type Props = {
|
|
103
|
-
children?: ComponentChildren;
|
|
104
|
-
client: any;
|
|
105
|
-
persistOptions: any;
|
|
106
|
-
onSuccess?: () => void | Promise<void>;
|
|
107
|
-
onError?: () => void;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export { removeOldestQuery }
|
|
111
|
-
|
|
112
|
-
export { StoragePersisterOptions }
|
|
113
|
-
|
|
114
|
-
export { }
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { AsyncStorage } from '@tanstack/query-persist-client-core';
|
|
2
|
-
import type { ComponentChildren } from 'preact';
|
|
3
|
-
import { experimental_createQueryPersister } from '@tanstack/query-persist-client-core';
|
|
4
|
-
import { JSX } from 'preact';
|
|
5
|
-
import { MaybePromise } from '@tanstack/query-persist-client-core';
|
|
6
|
-
import type { OmitKeyof } from '@tanstack/preact-query';
|
|
7
|
-
import { Options } from 'tsup';
|
|
8
|
-
import { PersistedClient } from '@tanstack/query-persist-client-core';
|
|
9
|
-
import { PersistedQuery } from '@tanstack/query-persist-client-core';
|
|
10
|
-
import { PersistedQueryClientRestoreOptions } from '@tanstack/query-persist-client-core';
|
|
11
|
-
import { PersistedQueryClientSaveOptions } from '@tanstack/query-persist-client-core';
|
|
12
|
-
import { Persister } from '@tanstack/query-persist-client-core';
|
|
13
|
-
import { PERSISTER_KEY_PREFIX } from '@tanstack/query-persist-client-core';
|
|
14
|
-
import { persistQueryClient } from '@tanstack/query-persist-client-core';
|
|
15
|
-
import { PersistQueryClientOptions } from '@tanstack/query-persist-client-core';
|
|
16
|
-
import { persistQueryClientRestore } from '@tanstack/query-persist-client-core';
|
|
17
|
-
import { PersistQueryClientRootOptions } from '@tanstack/query-persist-client-core';
|
|
18
|
-
import { persistQueryClientSave } from '@tanstack/query-persist-client-core';
|
|
19
|
-
import { persistQueryClientSubscribe } from '@tanstack/query-persist-client-core';
|
|
20
|
-
import { PersistRetryer } from '@tanstack/query-persist-client-core';
|
|
21
|
-
import { Promisable } from '@tanstack/query-persist-client-core';
|
|
22
|
-
import type { QueryClientProviderProps } from '@tanstack/preact-query';
|
|
23
|
-
import { removeOldestQuery } from '@tanstack/query-persist-client-core';
|
|
24
|
-
import { StoragePersisterOptions } from '@tanstack/query-persist-client-core';
|
|
25
|
-
import type { UserConfig } from 'vite';
|
|
26
|
-
import type { VNode } from 'preact';
|
|
27
|
-
|
|
28
|
-
export { AsyncStorage }
|
|
29
|
-
|
|
30
|
-
export declare const default_alias: any[];
|
|
31
|
-
|
|
32
|
-
export declare const default_alias_1: any[];
|
|
33
|
-
|
|
34
|
-
export declare const default_alias_2: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
|
35
|
-
|
|
36
|
-
export declare const default_alias_3: UserConfig;
|
|
37
|
-
|
|
38
|
-
export { experimental_createQueryPersister }
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @param {Object} opts - Options for building configurations.
|
|
42
|
-
* @param {string[]} opts.entry - The entry array.
|
|
43
|
-
* @returns {import('tsup').Options}
|
|
44
|
-
*/
|
|
45
|
-
export declare function legacyConfig(opts: {
|
|
46
|
-
entry: string[];
|
|
47
|
-
}): Options;
|
|
48
|
-
|
|
49
|
-
export { MaybePromise }
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* @param {Object} opts - Options for building configurations.
|
|
53
|
-
* @param {string[]} opts.entry - The entry array.
|
|
54
|
-
* @returns {import('tsup').Options}
|
|
55
|
-
*/
|
|
56
|
-
export declare function modernConfig(opts: {
|
|
57
|
-
entry: string[];
|
|
58
|
-
}): Options;
|
|
59
|
-
|
|
60
|
-
export { PersistedClient }
|
|
61
|
-
|
|
62
|
-
export { PersistedQuery }
|
|
63
|
-
|
|
64
|
-
export { PersistedQueryClientRestoreOptions }
|
|
65
|
-
|
|
66
|
-
export { PersistedQueryClientSaveOptions }
|
|
67
|
-
|
|
68
|
-
export { Persister }
|
|
69
|
-
|
|
70
|
-
export { PERSISTER_KEY_PREFIX }
|
|
71
|
-
|
|
72
|
-
export { persistQueryClient }
|
|
73
|
-
|
|
74
|
-
export { PersistQueryClientOptions }
|
|
75
|
-
|
|
76
|
-
declare const PersistQueryClientProvider: ({ children, persistOptions, onSuccess, onError, ...props }: PersistQueryClientProviderProps) => VNode;
|
|
77
|
-
export { PersistQueryClientProvider }
|
|
78
|
-
export { PersistQueryClientProvider as PersistQueryClientProvider_alias_1 }
|
|
79
|
-
|
|
80
|
-
export declare function PersistQueryClientProvider_alias_2({ children, persistOptions, onSuccess, onError, ...props }: Props): JSX.Element;
|
|
81
|
-
|
|
82
|
-
declare type PersistQueryClientProviderProps = QueryClientProviderProps & {
|
|
83
|
-
persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>;
|
|
84
|
-
onSuccess?: () => Promise<unknown> | unknown;
|
|
85
|
-
onError?: () => Promise<unknown> | unknown;
|
|
86
|
-
};
|
|
87
|
-
export { PersistQueryClientProviderProps }
|
|
88
|
-
export { PersistQueryClientProviderProps as PersistQueryClientProviderProps_alias_1 }
|
|
89
|
-
|
|
90
|
-
export { persistQueryClientRestore }
|
|
91
|
-
|
|
92
|
-
export { PersistQueryClientRootOptions }
|
|
93
|
-
|
|
94
|
-
export { persistQueryClientSave }
|
|
95
|
-
|
|
96
|
-
export { persistQueryClientSubscribe }
|
|
97
|
-
|
|
98
|
-
export { PersistRetryer }
|
|
99
|
-
|
|
100
|
-
export { Promisable }
|
|
101
|
-
|
|
102
|
-
declare type Props = {
|
|
103
|
-
children?: ComponentChildren;
|
|
104
|
-
client: any;
|
|
105
|
-
persistOptions: any;
|
|
106
|
-
onSuccess?: () => void | Promise<void>;
|
|
107
|
-
onError?: () => void;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export { removeOldestQuery }
|
|
111
|
-
|
|
112
|
-
export { StoragePersisterOptions }
|
|
113
|
-
|
|
114
|
-
export { }
|
package/build/modern/index.cjs
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
|
|
17
|
-
// src/index.ts
|
|
18
|
-
var index_exports = {};
|
|
19
|
-
module.exports = __toCommonJS(index_exports);
|
|
20
|
-
__reExport(index_exports, require("@tanstack/query-persist-client-core"), module.exports);
|
|
21
|
-
__reExport(index_exports, require("./PersistQueryClientProvider.cjs"), module.exports);
|
|
22
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
23
|
-
0 && (module.exports = {
|
|
24
|
-
...require("@tanstack/query-persist-client-core"),
|
|
25
|
-
...require("./PersistQueryClientProvider.cjs")
|
|
26
|
-
});
|
|
27
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["// Re-export core\nexport * from '@tanstack/query-persist-client-core'\n\nexport * from './PersistQueryClientProvider'\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AACA,0BAAc,gDADd;AAGA,0BAAc,6CAHd;","names":[]}
|
package/build/modern/index.d.cts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export { persistQueryClientRestore } from './_tsup-dts-rollup.cjs';
|
|
2
|
-
export { persistQueryClientSave } from './_tsup-dts-rollup.cjs';
|
|
3
|
-
export { persistQueryClientSubscribe } from './_tsup-dts-rollup.cjs';
|
|
4
|
-
export { persistQueryClient } from './_tsup-dts-rollup.cjs';
|
|
5
|
-
export { Promisable } from './_tsup-dts-rollup.cjs';
|
|
6
|
-
export { Persister } from './_tsup-dts-rollup.cjs';
|
|
7
|
-
export { PersistedClient } from './_tsup-dts-rollup.cjs';
|
|
8
|
-
export { PersistQueryClientRootOptions } from './_tsup-dts-rollup.cjs';
|
|
9
|
-
export { PersistedQueryClientRestoreOptions } from './_tsup-dts-rollup.cjs';
|
|
10
|
-
export { PersistedQueryClientSaveOptions } from './_tsup-dts-rollup.cjs';
|
|
11
|
-
export { PersistQueryClientOptions } from './_tsup-dts-rollup.cjs';
|
|
12
|
-
export { PersistRetryer } from './_tsup-dts-rollup.cjs';
|
|
13
|
-
export { removeOldestQuery } from './_tsup-dts-rollup.cjs';
|
|
14
|
-
export { experimental_createQueryPersister } from './_tsup-dts-rollup.cjs';
|
|
15
|
-
export { PersistedQuery } from './_tsup-dts-rollup.cjs';
|
|
16
|
-
export { MaybePromise } from './_tsup-dts-rollup.cjs';
|
|
17
|
-
export { AsyncStorage } from './_tsup-dts-rollup.cjs';
|
|
18
|
-
export { StoragePersisterOptions } from './_tsup-dts-rollup.cjs';
|
|
19
|
-
export { PERSISTER_KEY_PREFIX } from './_tsup-dts-rollup.cjs';
|
|
20
|
-
export { PersistQueryClientProviderProps_alias_1 as PersistQueryClientProviderProps } from './_tsup-dts-rollup.cjs';
|
|
21
|
-
export { PersistQueryClientProvider_alias_1 as PersistQueryClientProvider } from './_tsup-dts-rollup.cjs';
|
package/build/modern/index.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export { persistQueryClientRestore } from './_tsup-dts-rollup.js';
|
|
2
|
-
export { persistQueryClientSave } from './_tsup-dts-rollup.js';
|
|
3
|
-
export { persistQueryClientSubscribe } from './_tsup-dts-rollup.js';
|
|
4
|
-
export { persistQueryClient } from './_tsup-dts-rollup.js';
|
|
5
|
-
export { Promisable } from './_tsup-dts-rollup.js';
|
|
6
|
-
export { Persister } from './_tsup-dts-rollup.js';
|
|
7
|
-
export { PersistedClient } from './_tsup-dts-rollup.js';
|
|
8
|
-
export { PersistQueryClientRootOptions } from './_tsup-dts-rollup.js';
|
|
9
|
-
export { PersistedQueryClientRestoreOptions } from './_tsup-dts-rollup.js';
|
|
10
|
-
export { PersistedQueryClientSaveOptions } from './_tsup-dts-rollup.js';
|
|
11
|
-
export { PersistQueryClientOptions } from './_tsup-dts-rollup.js';
|
|
12
|
-
export { PersistRetryer } from './_tsup-dts-rollup.js';
|
|
13
|
-
export { removeOldestQuery } from './_tsup-dts-rollup.js';
|
|
14
|
-
export { experimental_createQueryPersister } from './_tsup-dts-rollup.js';
|
|
15
|
-
export { PersistedQuery } from './_tsup-dts-rollup.js';
|
|
16
|
-
export { MaybePromise } from './_tsup-dts-rollup.js';
|
|
17
|
-
export { AsyncStorage } from './_tsup-dts-rollup.js';
|
|
18
|
-
export { StoragePersisterOptions } from './_tsup-dts-rollup.js';
|
|
19
|
-
export { PERSISTER_KEY_PREFIX } from './_tsup-dts-rollup.js';
|
|
20
|
-
export { PersistQueryClientProviderProps_alias_1 as PersistQueryClientProviderProps } from './_tsup-dts-rollup.js';
|
|
21
|
-
export { PersistQueryClientProvider_alias_1 as PersistQueryClientProvider } from './_tsup-dts-rollup.js';
|
package/build/modern/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["// Re-export core\nexport * from '@tanstack/query-persist-client-core'\n\nexport * from './PersistQueryClientProvider'\n"],"mappings":";AACA,cAAc;AAEd,cAAc;","names":[]}
|