@tanstack/preact-query-persist-client 5.107.1 → 5.108.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.
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- let preact_hooks = require("preact/hooks");
3
- let _tanstack_query_persist_client_core = require("@tanstack/query-persist-client-core");
4
2
  let _tanstack_preact_query = require("@tanstack/preact-query");
3
+ let _tanstack_query_persist_client_core = require("@tanstack/query-persist-client-core");
4
+ let preact_hooks = require("preact/hooks");
5
5
  let preact_jsx_runtime = require("preact/jsx-runtime");
6
6
  // src/PersistQueryClientProvider.tsx
7
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PersistQueryClientProvider.cjs","names":["useState","useRef","persistQueryClientSubscribe","QueryClientProvider","IsRestoringProvider"],"sources":["../../src/PersistQueryClientProvider.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'preact/hooks'\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 { VNode } from 'preact'\nimport type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'\nimport type {\n OmitKeyof,\n QueryClientProviderProps,\n} from '@tanstack/preact-query'\n\n/**\n * The props of `PersistQueryClientProvider`: the props of `QueryClientProvider`, plus the\n * `persistOptions` and callbacks for when restoring succeeds or fails.\n */\nexport type PersistQueryClientProviderProps = QueryClientProviderProps & {\n persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>\n onSuccess?: () => Promise<unknown> | unknown\n onError?: () => Promise<unknown> | unknown\n}\n\n/**\n * Provides the `QueryClient` like `QueryClientProvider`, and restores the persisted client first:\n * while restoring, `useIsRestoring` returns `true` and queries wait for the restore to finish\n * before subscribing. Once restored, the client is saved with the persister whenever the cache\n * changes.\n * @param props - The `QueryClientProvider` props, the `persistOptions`, and the `onSuccess` and\n * `onError` callbacks. `onSuccess` is called once restoring finishes, even if nothing was restored\n * (e.g. because the persisted client expired), and `onError` if restoring or `onSuccess` throws.\n * @returns The `QueryClientProvider` wrapping the children.\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 optionsRef = useRef({ persistOptions, onSuccess, onError })\n const didRestoreRef = useRef(false)\n\n useEffect(() => {\n optionsRef.current = { persistOptions, onSuccess, onError }\n })\n\n useEffect(() => {\n const options = {\n ...optionsRef.current.persistOptions,\n queryClient: props.client,\n }\n if (!didRestoreRef.current) {\n didRestoreRef.current = true\n persistQueryClientRestore(options)\n .then(() => optionsRef.current.onSuccess?.())\n .catch(() => optionsRef.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":";;;;;;;;;;;;;;;;AAqCA,MAAa,8BAA8B,EACzC,UACA,gBACA,WACA,SACA,GAAG,YACyC;CAC5C,MAAM,CAAC,aAAa,mBAAA,GAAkBA,aAAAA,SAAAA,CAAS,IAAI;CACnD,MAAM,cAAA,GAAaC,aAAAA,OAAAA,CAAO;EAAE;EAAgB;EAAW;CAAQ,CAAC;CAChE,MAAM,iBAAA,GAAgBA,aAAAA,OAAAA,CAAO,KAAK;CAElC,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,WAAW,UAAU;GAAE;GAAgB;GAAW;EAAQ;CAC5D,CAAC;CAED,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,MAAM,UAAU;GACd,GAAG,WAAW,QAAQ;GACtB,aAAa,MAAM;EACrB;EACA,IAAI,CAAC,cAAc,SAAS;GAC1B,cAAc,UAAU;GACxB,CAAA,GAAA,oCAAA,0BAAA,CAA0B,OAAO,CAAC,CAC/B,WAAW;;IAAW,QAAA,yBAAA,sBAAA,WAAA,QAAA,CAAQ,eAAA,QAAA,0BAAA,KAAA,IAAA,KAAA,IAAA,sBAAA,KAAA,mBAAY;GAAC,CAAA,CAAC,CAC5C,YAAY;;IAAW,QAAA,0BAAA,uBAAA,WAAA,QAAA,CAAQ,aAAA,QAAA,2BAAA,KAAA,IAAA,KAAA,IAAA,uBAAA,KAAA,oBAAU;GAAC,CAAA,CAAC,CAC3C,cAAc;IACb,eAAe,KAAK;GACtB,CAAC;EACL;EACA,OAAO,cAAc,KAAA,KAAA,GAAYC,oCAAAA,4BAAAA,CAA4B,OAAO;CACtE,GAAG,CAAC,MAAM,QAAQ,WAAW,CAAC;CAE9B,OACE,iBAAA,GAAA,mBAAA,IAAA,CAACC,uBAAAA,qBAAD;EAAqB,GAAI;EACvB,UAAA,iBAAA,GAAA,mBAAA,IAAA,CAACC,uBAAAA,qBAAD;GAAqB,OAAO;GAAc;EAA8B,CAAA;CACrD,CAAA;AAEzB"}
1
+ {"version":3,"file":"PersistQueryClientProvider.cjs","names":["useState","useRef","persistQueryClientSubscribe","QueryClientProvider","IsRestoringProvider"],"sources":["../../src/PersistQueryClientProvider.tsx"],"sourcesContent":["import {\n IsRestoringProvider,\n QueryClientProvider,\n} from '@tanstack/preact-query'\nimport {\n persistQueryClientRestore,\n persistQueryClientSubscribe,\n} from '@tanstack/query-persist-client-core'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport type {\n OmitKeyof,\n QueryClientProviderProps,\n} from '@tanstack/preact-query'\nimport type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'\nimport type { VNode } from 'preact'\n\n/**\n * The props of `PersistQueryClientProvider`: the props of `QueryClientProvider`, plus the\n * `persistOptions` and callbacks for when restoring succeeds or fails.\n */\nexport type PersistQueryClientProviderProps = QueryClientProviderProps & {\n persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>\n onSuccess?: () => Promise<unknown> | unknown\n onError?: () => Promise<unknown> | unknown\n}\n\n/**\n * Provides the `QueryClient` like `QueryClientProvider`, and restores the persisted client first:\n * while restoring, `useIsRestoring` returns `true` and queries wait for the restore to finish\n * before subscribing. Once restored, the client is saved with the persister whenever the cache\n * changes.\n * @param props - The `QueryClientProvider` props, the `persistOptions`, and the `onSuccess` and\n * `onError` callbacks. `onSuccess` is called once restoring finishes, even if nothing was restored\n * (e.g. because the persisted client expired), and `onError` if restoring or `onSuccess` throws.\n * @returns The `QueryClientProvider` wrapping the children.\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 optionsRef = useRef({ persistOptions, onSuccess, onError })\n const didRestoreRef = useRef(false)\n\n useEffect(() => {\n optionsRef.current = { persistOptions, onSuccess, onError }\n })\n\n useEffect(() => {\n const options = {\n ...optionsRef.current.persistOptions,\n queryClient: props.client,\n }\n if (!didRestoreRef.current) {\n didRestoreRef.current = true\n persistQueryClientRestore(options)\n .then(() => optionsRef.current.onSuccess?.())\n .catch(() => optionsRef.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":";;;;;;;;;;;;;;;;AAoCA,MAAa,8BAA8B,EACzC,UACA,gBACA,WACA,SACA,GAAG,YACyC;CAC5C,MAAM,CAAC,aAAa,mBAAA,GAAkBA,aAAAA,SAAAA,CAAS,IAAI;CACnD,MAAM,cAAA,GAAaC,aAAAA,OAAAA,CAAO;EAAE;EAAgB;EAAW;CAAQ,CAAC;CAChE,MAAM,iBAAA,GAAgBA,aAAAA,OAAAA,CAAO,KAAK;CAElC,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,WAAW,UAAU;GAAE;GAAgB;GAAW;EAAQ;CAC5D,CAAC;CAED,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,MAAM,UAAU;GACd,GAAG,WAAW,QAAQ;GACtB,aAAa,MAAM;EACrB;EACA,IAAI,CAAC,cAAc,SAAS;GAC1B,cAAc,UAAU;GACxB,CAAA,GAAA,oCAAA,0BAAA,CAA0B,OAAO,CAAC,CAC/B,WAAW;;IAAW,QAAA,yBAAA,sBAAA,WAAA,QAAA,CAAQ,eAAA,QAAA,0BAAA,KAAA,IAAA,KAAA,IAAA,sBAAA,KAAA,mBAAY;GAAC,CAAA,CAAC,CAC5C,YAAY;;IAAW,QAAA,0BAAA,uBAAA,WAAA,QAAA,CAAQ,aAAA,QAAA,2BAAA,KAAA,IAAA,KAAA,IAAA,uBAAA,KAAA,oBAAU;GAAC,CAAA,CAAC,CAC3C,cAAc;IACb,eAAe,KAAK;GACtB,CAAC;EACL;EACA,OAAO,cAAc,KAAA,KAAA,GAAYC,oCAAAA,4BAAAA,CAA4B,OAAO;CACtE,GAAG,CAAC,MAAM,QAAQ,WAAW,CAAC;CAE9B,OACE,iBAAA,GAAA,mBAAA,IAAA,CAACC,uBAAAA,qBAAD;EAAqB,GAAI;EACvB,UAAA,iBAAA,GAAA,mBAAA,IAAA,CAACC,uBAAAA,qBAAD;GAAqB,OAAO;GAAc;EAA8B,CAAA;CACrD,CAAA;AAEzB"}
@@ -1,6 +1,6 @@
1
- import { VNode } from "preact";
2
- import { PersistQueryClientOptions } from "@tanstack/query-persist-client-core";
3
1
  import { OmitKeyof, QueryClientProviderProps } from "@tanstack/preact-query";
2
+ import { PersistQueryClientOptions } from "@tanstack/query-persist-client-core";
3
+ import { VNode } from "preact";
4
4
  /**
5
5
  * The props of `PersistQueryClientProvider`: the props of `QueryClientProvider`, plus the
6
6
  * `persistOptions` and callbacks for when restoring succeeds or fails.
@@ -1 +1 @@
1
- {"version":3,"file":"PersistQueryClientProvider.d.cts","names":[],"sources":["../../src/PersistQueryClientProvider.tsx"],"mappings":";;;;;;;YAqBY,kCAAkC;EAC5C,gBAAgB,UAAU;EAC1B,kBAAkB;EAClB,gBAAgB;;;;;;;;;;;;qBAaL,+BAA8B,UAAA,gBAAA,WAAA,YAAA,SAMxC,oCAAkC"}
1
+ {"version":3,"file":"PersistQueryClientProvider.d.cts","names":[],"sources":["../../src/PersistQueryClientProvider.tsx"],"mappings":";;;;;;;YAoBY,kCAAkC;EAC5C,gBAAgB,UAAU;EAC1B,kBAAkB;EAClB,gBAAgB;;;;;;;;;;;;qBAaL,+BAA8B,UAAA,gBAAA,WAAA,YAAA,SAMxC,oCAAkC"}
@@ -1,5 +1,5 @@
1
- import { PersistQueryClientOptions } from "@tanstack/query-persist-client-core";
2
1
  import { OmitKeyof, QueryClientProviderProps } from "@tanstack/preact-query";
2
+ import { PersistQueryClientOptions } from "@tanstack/query-persist-client-core";
3
3
  import { VNode } from "preact";
4
4
  /**
5
5
  * The props of `PersistQueryClientProvider`: the props of `QueryClientProvider`, plus the
@@ -1 +1 @@
1
- {"version":3,"file":"PersistQueryClientProvider.d.ts","names":[],"sources":["../../src/PersistQueryClientProvider.tsx"],"mappings":";;;;;;;YAqBY,kCAAkC;EAC5C,gBAAgB,UAAU;EAC1B,kBAAkB;EAClB,gBAAgB;;;;;;;;;;;;qBAaL,+BAA8B,UAAA,gBAAA,WAAA,YAAA,SAMxC,oCAAkC"}
1
+ {"version":3,"file":"PersistQueryClientProvider.d.ts","names":[],"sources":["../../src/PersistQueryClientProvider.tsx"],"mappings":";;;;;;;YAoBY,kCAAkC;EAC5C,gBAAgB,UAAU;EAC1B,kBAAkB;EAClB,gBAAgB;;;;;;;;;;;;qBAaL,+BAA8B,UAAA,gBAAA,WAAA,YAAA,SAMxC,oCAAkC"}
@@ -1,6 +1,6 @@
1
- import { useEffect, useRef, useState } from "preact/hooks";
2
- import { persistQueryClientRestore, persistQueryClientSubscribe } from "@tanstack/query-persist-client-core";
3
1
  import { IsRestoringProvider, QueryClientProvider } from "@tanstack/preact-query";
2
+ import { persistQueryClientRestore, persistQueryClientSubscribe } from "@tanstack/query-persist-client-core";
3
+ import { useEffect, useRef, useState } from "preact/hooks";
4
4
  import { jsx } from "preact/jsx-runtime";
5
5
  // src/PersistQueryClientProvider.tsx
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PersistQueryClientProvider.js","names":[],"sources":["../../src/PersistQueryClientProvider.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'preact/hooks'\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 { VNode } from 'preact'\nimport type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'\nimport type {\n OmitKeyof,\n QueryClientProviderProps,\n} from '@tanstack/preact-query'\n\n/**\n * The props of `PersistQueryClientProvider`: the props of `QueryClientProvider`, plus the\n * `persistOptions` and callbacks for when restoring succeeds or fails.\n */\nexport type PersistQueryClientProviderProps = QueryClientProviderProps & {\n persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>\n onSuccess?: () => Promise<unknown> | unknown\n onError?: () => Promise<unknown> | unknown\n}\n\n/**\n * Provides the `QueryClient` like `QueryClientProvider`, and restores the persisted client first:\n * while restoring, `useIsRestoring` returns `true` and queries wait for the restore to finish\n * before subscribing. Once restored, the client is saved with the persister whenever the cache\n * changes.\n * @param props - The `QueryClientProvider` props, the `persistOptions`, and the `onSuccess` and\n * `onError` callbacks. `onSuccess` is called once restoring finishes, even if nothing was restored\n * (e.g. because the persisted client expired), and `onError` if restoring or `onSuccess` throws.\n * @returns The `QueryClientProvider` wrapping the children.\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 optionsRef = useRef({ persistOptions, onSuccess, onError })\n const didRestoreRef = useRef(false)\n\n useEffect(() => {\n optionsRef.current = { persistOptions, onSuccess, onError }\n })\n\n useEffect(() => {\n const options = {\n ...optionsRef.current.persistOptions,\n queryClient: props.client,\n }\n if (!didRestoreRef.current) {\n didRestoreRef.current = true\n persistQueryClientRestore(options)\n .then(() => optionsRef.current.onSuccess?.())\n .catch(() => optionsRef.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":";;;;;;;;;;;;;;;AAqCA,MAAa,8BAA8B,EACzC,UACA,gBACA,WACA,SACA,GAAG,YACyC;CAC5C,MAAM,CAAC,aAAa,kBAAkB,SAAS,IAAI;CACnD,MAAM,aAAa,OAAO;EAAE;EAAgB;EAAW;CAAQ,CAAC;CAChE,MAAM,gBAAgB,OAAO,KAAK;CAElC,gBAAgB;EACd,WAAW,UAAU;GAAE;GAAgB;GAAW;EAAQ;CAC5D,CAAC;CAED,gBAAgB;EACd,MAAM,UAAU;GACd,GAAG,WAAW,QAAQ;GACtB,aAAa,MAAM;EACrB;EACA,IAAI,CAAC,cAAc,SAAS;GAC1B,cAAc,UAAU;GACxB,0BAA0B,OAAO,CAAC,CAC/B,WAAW;;IAAW,QAAA,yBAAA,sBAAA,WAAA,QAAA,CAAQ,eAAA,QAAA,0BAAA,KAAA,IAAA,KAAA,IAAA,sBAAA,KAAA,mBAAY;GAAC,CAAA,CAAC,CAC5C,YAAY;;IAAW,QAAA,0BAAA,uBAAA,WAAA,QAAA,CAAQ,aAAA,QAAA,2BAAA,KAAA,IAAA,KAAA,IAAA,uBAAA,KAAA,oBAAU;GAAC,CAAA,CAAC,CAC3C,cAAc;IACb,eAAe,KAAK;GACtB,CAAC;EACL;EACA,OAAO,cAAc,KAAA,IAAY,4BAA4B,OAAO;CACtE,GAAG,CAAC,MAAM,QAAQ,WAAW,CAAC;CAE9B,OACE,oBAAC,qBAAD;EAAqB,GAAI;EACvB,UAAA,oBAAC,qBAAD;GAAqB,OAAO;GAAc;EAA8B,CAAA;CACrD,CAAA;AAEzB"}
1
+ {"version":3,"file":"PersistQueryClientProvider.js","names":[],"sources":["../../src/PersistQueryClientProvider.tsx"],"sourcesContent":["import {\n IsRestoringProvider,\n QueryClientProvider,\n} from '@tanstack/preact-query'\nimport {\n persistQueryClientRestore,\n persistQueryClientSubscribe,\n} from '@tanstack/query-persist-client-core'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport type {\n OmitKeyof,\n QueryClientProviderProps,\n} from '@tanstack/preact-query'\nimport type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'\nimport type { VNode } from 'preact'\n\n/**\n * The props of `PersistQueryClientProvider`: the props of `QueryClientProvider`, plus the\n * `persistOptions` and callbacks for when restoring succeeds or fails.\n */\nexport type PersistQueryClientProviderProps = QueryClientProviderProps & {\n persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>\n onSuccess?: () => Promise<unknown> | unknown\n onError?: () => Promise<unknown> | unknown\n}\n\n/**\n * Provides the `QueryClient` like `QueryClientProvider`, and restores the persisted client first:\n * while restoring, `useIsRestoring` returns `true` and queries wait for the restore to finish\n * before subscribing. Once restored, the client is saved with the persister whenever the cache\n * changes.\n * @param props - The `QueryClientProvider` props, the `persistOptions`, and the `onSuccess` and\n * `onError` callbacks. `onSuccess` is called once restoring finishes, even if nothing was restored\n * (e.g. because the persisted client expired), and `onError` if restoring or `onSuccess` throws.\n * @returns The `QueryClientProvider` wrapping the children.\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 optionsRef = useRef({ persistOptions, onSuccess, onError })\n const didRestoreRef = useRef(false)\n\n useEffect(() => {\n optionsRef.current = { persistOptions, onSuccess, onError }\n })\n\n useEffect(() => {\n const options = {\n ...optionsRef.current.persistOptions,\n queryClient: props.client,\n }\n if (!didRestoreRef.current) {\n didRestoreRef.current = true\n persistQueryClientRestore(options)\n .then(() => optionsRef.current.onSuccess?.())\n .catch(() => optionsRef.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":";;;;;;;;;;;;;;;AAoCA,MAAa,8BAA8B,EACzC,UACA,gBACA,WACA,SACA,GAAG,YACyC;CAC5C,MAAM,CAAC,aAAa,kBAAkB,SAAS,IAAI;CACnD,MAAM,aAAa,OAAO;EAAE;EAAgB;EAAW;CAAQ,CAAC;CAChE,MAAM,gBAAgB,OAAO,KAAK;CAElC,gBAAgB;EACd,WAAW,UAAU;GAAE;GAAgB;GAAW;EAAQ;CAC5D,CAAC;CAED,gBAAgB;EACd,MAAM,UAAU;GACd,GAAG,WAAW,QAAQ;GACtB,aAAa,MAAM;EACrB;EACA,IAAI,CAAC,cAAc,SAAS;GAC1B,cAAc,UAAU;GACxB,0BAA0B,OAAO,CAAC,CAC/B,WAAW;;IAAW,QAAA,yBAAA,sBAAA,WAAA,QAAA,CAAQ,eAAA,QAAA,0BAAA,KAAA,IAAA,KAAA,IAAA,sBAAA,KAAA,mBAAY;GAAC,CAAA,CAAC,CAC5C,YAAY;;IAAW,QAAA,0BAAA,uBAAA,WAAA,QAAA,CAAQ,aAAA,QAAA,2BAAA,KAAA,IAAA,KAAA,IAAA,uBAAA,KAAA,oBAAU;GAAC,CAAA,CAAC,CAC3C,cAAc;IACb,eAAe,KAAK;GACtB,CAAC;EACL;EACA,OAAO,cAAc,KAAA,IAAY,4BAA4B,OAAO;CACtE,GAAG,CAAC,MAAM,QAAQ,WAAW,CAAC;CAE9B,OACE,oBAAC,qBAAD;EAAqB,GAAI;EACvB,UAAA,oBAAC,qBAAD;GAAqB,OAAO;GAAc;EAA8B,CAAA;CACrD,CAAA;AAEzB"}
@@ -1,3 +1,3 @@
1
1
  import { PersistQueryClientProvider, PersistQueryClientProviderProps } from "./PersistQueryClientProvider.cjs";
2
2
  export * from "@tanstack/query-persist-client-core";
3
- export { PersistQueryClientProvider, PersistQueryClientProviderProps };
3
+ export { PersistQueryClientProvider, type PersistQueryClientProviderProps };
@@ -1,3 +1,3 @@
1
1
  import { PersistQueryClientProvider, PersistQueryClientProviderProps } from "./PersistQueryClientProvider.js";
2
2
  export * from "@tanstack/query-persist-client-core";
3
- export { PersistQueryClientProvider, PersistQueryClientProviderProps };
3
+ export { PersistQueryClientProvider, type PersistQueryClientProviderProps };
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- let preact_hooks = require("preact/hooks");
3
- let _tanstack_query_persist_client_core = require("@tanstack/query-persist-client-core");
4
2
  let _tanstack_preact_query = require("@tanstack/preact-query");
3
+ let _tanstack_query_persist_client_core = require("@tanstack/query-persist-client-core");
4
+ let preact_hooks = require("preact/hooks");
5
5
  let preact_jsx_runtime = require("preact/jsx-runtime");
6
6
  // src/PersistQueryClientProvider.tsx
7
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PersistQueryClientProvider.cjs","names":["useState","useRef","persistQueryClientSubscribe","QueryClientProvider","IsRestoringProvider"],"sources":["../../src/PersistQueryClientProvider.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'preact/hooks'\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 { VNode } from 'preact'\nimport type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'\nimport type {\n OmitKeyof,\n QueryClientProviderProps,\n} from '@tanstack/preact-query'\n\n/**\n * The props of `PersistQueryClientProvider`: the props of `QueryClientProvider`, plus the\n * `persistOptions` and callbacks for when restoring succeeds or fails.\n */\nexport type PersistQueryClientProviderProps = QueryClientProviderProps & {\n persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>\n onSuccess?: () => Promise<unknown> | unknown\n onError?: () => Promise<unknown> | unknown\n}\n\n/**\n * Provides the `QueryClient` like `QueryClientProvider`, and restores the persisted client first:\n * while restoring, `useIsRestoring` returns `true` and queries wait for the restore to finish\n * before subscribing. Once restored, the client is saved with the persister whenever the cache\n * changes.\n * @param props - The `QueryClientProvider` props, the `persistOptions`, and the `onSuccess` and\n * `onError` callbacks. `onSuccess` is called once restoring finishes, even if nothing was restored\n * (e.g. because the persisted client expired), and `onError` if restoring or `onSuccess` throws.\n * @returns The `QueryClientProvider` wrapping the children.\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 optionsRef = useRef({ persistOptions, onSuccess, onError })\n const didRestoreRef = useRef(false)\n\n useEffect(() => {\n optionsRef.current = { persistOptions, onSuccess, onError }\n })\n\n useEffect(() => {\n const options = {\n ...optionsRef.current.persistOptions,\n queryClient: props.client,\n }\n if (!didRestoreRef.current) {\n didRestoreRef.current = true\n persistQueryClientRestore(options)\n .then(() => optionsRef.current.onSuccess?.())\n .catch(() => optionsRef.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":";;;;;;;;;;;;;;;;AAqCA,MAAa,8BAA8B,EACzC,UACA,gBACA,WACA,SACA,GAAG,YACyC;CAC5C,MAAM,CAAC,aAAa,mBAAA,GAAkBA,aAAAA,SAAAA,CAAS,IAAI;CACnD,MAAM,cAAA,GAAaC,aAAAA,OAAAA,CAAO;EAAE;EAAgB;EAAW;CAAQ,CAAC;CAChE,MAAM,iBAAA,GAAgBA,aAAAA,OAAAA,CAAO,KAAK;CAElC,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,WAAW,UAAU;GAAE;GAAgB;GAAW;EAAQ;CAC5D,CAAC;CAED,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,MAAM,UAAU;GACd,GAAG,WAAW,QAAQ;GACtB,aAAa,MAAM;EACrB;EACA,IAAI,CAAC,cAAc,SAAS;GAC1B,cAAc,UAAU;GACxB,CAAA,GAAA,oCAAA,0BAAA,CAA0B,OAAO,CAAC,CAC/B,WAAW,WAAW,QAAQ,YAAY,CAAC,CAAC,CAC5C,YAAY,WAAW,QAAQ,UAAU,CAAC,CAAC,CAC3C,cAAc;IACb,eAAe,KAAK;GACtB,CAAC;EACL;EACA,OAAO,cAAc,KAAA,KAAA,GAAYC,oCAAAA,4BAAAA,CAA4B,OAAO;CACtE,GAAG,CAAC,MAAM,QAAQ,WAAW,CAAC;CAE9B,OACE,iBAAA,GAAA,mBAAA,IAAA,CAACC,uBAAAA,qBAAD;EAAqB,GAAI;EACvB,UAAA,iBAAA,GAAA,mBAAA,IAAA,CAACC,uBAAAA,qBAAD;GAAqB,OAAO;GAAc;EAA8B,CAAA;CACrD,CAAA;AAEzB"}
1
+ {"version":3,"file":"PersistQueryClientProvider.cjs","names":["useState","useRef","persistQueryClientSubscribe","QueryClientProvider","IsRestoringProvider"],"sources":["../../src/PersistQueryClientProvider.tsx"],"sourcesContent":["import {\n IsRestoringProvider,\n QueryClientProvider,\n} from '@tanstack/preact-query'\nimport {\n persistQueryClientRestore,\n persistQueryClientSubscribe,\n} from '@tanstack/query-persist-client-core'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport type {\n OmitKeyof,\n QueryClientProviderProps,\n} from '@tanstack/preact-query'\nimport type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'\nimport type { VNode } from 'preact'\n\n/**\n * The props of `PersistQueryClientProvider`: the props of `QueryClientProvider`, plus the\n * `persistOptions` and callbacks for when restoring succeeds or fails.\n */\nexport type PersistQueryClientProviderProps = QueryClientProviderProps & {\n persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>\n onSuccess?: () => Promise<unknown> | unknown\n onError?: () => Promise<unknown> | unknown\n}\n\n/**\n * Provides the `QueryClient` like `QueryClientProvider`, and restores the persisted client first:\n * while restoring, `useIsRestoring` returns `true` and queries wait for the restore to finish\n * before subscribing. Once restored, the client is saved with the persister whenever the cache\n * changes.\n * @param props - The `QueryClientProvider` props, the `persistOptions`, and the `onSuccess` and\n * `onError` callbacks. `onSuccess` is called once restoring finishes, even if nothing was restored\n * (e.g. because the persisted client expired), and `onError` if restoring or `onSuccess` throws.\n * @returns The `QueryClientProvider` wrapping the children.\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 optionsRef = useRef({ persistOptions, onSuccess, onError })\n const didRestoreRef = useRef(false)\n\n useEffect(() => {\n optionsRef.current = { persistOptions, onSuccess, onError }\n })\n\n useEffect(() => {\n const options = {\n ...optionsRef.current.persistOptions,\n queryClient: props.client,\n }\n if (!didRestoreRef.current) {\n didRestoreRef.current = true\n persistQueryClientRestore(options)\n .then(() => optionsRef.current.onSuccess?.())\n .catch(() => optionsRef.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":";;;;;;;;;;;;;;;;AAoCA,MAAa,8BAA8B,EACzC,UACA,gBACA,WACA,SACA,GAAG,YACyC;CAC5C,MAAM,CAAC,aAAa,mBAAA,GAAkBA,aAAAA,SAAAA,CAAS,IAAI;CACnD,MAAM,cAAA,GAAaC,aAAAA,OAAAA,CAAO;EAAE;EAAgB;EAAW;CAAQ,CAAC;CAChE,MAAM,iBAAA,GAAgBA,aAAAA,OAAAA,CAAO,KAAK;CAElC,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,WAAW,UAAU;GAAE;GAAgB;GAAW;EAAQ;CAC5D,CAAC;CAED,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,MAAM,UAAU;GACd,GAAG,WAAW,QAAQ;GACtB,aAAa,MAAM;EACrB;EACA,IAAI,CAAC,cAAc,SAAS;GAC1B,cAAc,UAAU;GACxB,CAAA,GAAA,oCAAA,0BAAA,CAA0B,OAAO,CAAC,CAC/B,WAAW,WAAW,QAAQ,YAAY,CAAC,CAAC,CAC5C,YAAY,WAAW,QAAQ,UAAU,CAAC,CAAC,CAC3C,cAAc;IACb,eAAe,KAAK;GACtB,CAAC;EACL;EACA,OAAO,cAAc,KAAA,KAAA,GAAYC,oCAAAA,4BAAAA,CAA4B,OAAO;CACtE,GAAG,CAAC,MAAM,QAAQ,WAAW,CAAC;CAE9B,OACE,iBAAA,GAAA,mBAAA,IAAA,CAACC,uBAAAA,qBAAD;EAAqB,GAAI;EACvB,UAAA,iBAAA,GAAA,mBAAA,IAAA,CAACC,uBAAAA,qBAAD;GAAqB,OAAO;GAAc;EAA8B,CAAA;CACrD,CAAA;AAEzB"}
@@ -1,6 +1,6 @@
1
- import { VNode } from "preact";
2
- import { PersistQueryClientOptions } from "@tanstack/query-persist-client-core";
3
1
  import { OmitKeyof, QueryClientProviderProps } from "@tanstack/preact-query";
2
+ import { PersistQueryClientOptions } from "@tanstack/query-persist-client-core";
3
+ import { VNode } from "preact";
4
4
  /**
5
5
  * The props of `PersistQueryClientProvider`: the props of `QueryClientProvider`, plus the
6
6
  * `persistOptions` and callbacks for when restoring succeeds or fails.
@@ -1 +1 @@
1
- {"version":3,"file":"PersistQueryClientProvider.d.cts","names":[],"sources":["../../src/PersistQueryClientProvider.tsx"],"mappings":";;;;;;;YAqBY,kCAAkC;EAC5C,gBAAgB,UAAU;EAC1B,kBAAkB;EAClB,gBAAgB;;;;;;;;;;;;qBAaL,+BAA8B,UAAA,gBAAA,WAAA,YAAA,SAMxC,oCAAkC"}
1
+ {"version":3,"file":"PersistQueryClientProvider.d.cts","names":[],"sources":["../../src/PersistQueryClientProvider.tsx"],"mappings":";;;;;;;YAoBY,kCAAkC;EAC5C,gBAAgB,UAAU;EAC1B,kBAAkB;EAClB,gBAAgB;;;;;;;;;;;;qBAaL,+BAA8B,UAAA,gBAAA,WAAA,YAAA,SAMxC,oCAAkC"}
@@ -1,5 +1,5 @@
1
- import { PersistQueryClientOptions } from "@tanstack/query-persist-client-core";
2
1
  import { OmitKeyof, QueryClientProviderProps } from "@tanstack/preact-query";
2
+ import { PersistQueryClientOptions } from "@tanstack/query-persist-client-core";
3
3
  import { VNode } from "preact";
4
4
  /**
5
5
  * The props of `PersistQueryClientProvider`: the props of `QueryClientProvider`, plus the
@@ -1 +1 @@
1
- {"version":3,"file":"PersistQueryClientProvider.d.ts","names":[],"sources":["../../src/PersistQueryClientProvider.tsx"],"mappings":";;;;;;;YAqBY,kCAAkC;EAC5C,gBAAgB,UAAU;EAC1B,kBAAkB;EAClB,gBAAgB;;;;;;;;;;;;qBAaL,+BAA8B,UAAA,gBAAA,WAAA,YAAA,SAMxC,oCAAkC"}
1
+ {"version":3,"file":"PersistQueryClientProvider.d.ts","names":[],"sources":["../../src/PersistQueryClientProvider.tsx"],"mappings":";;;;;;;YAoBY,kCAAkC;EAC5C,gBAAgB,UAAU;EAC1B,kBAAkB;EAClB,gBAAgB;;;;;;;;;;;;qBAaL,+BAA8B,UAAA,gBAAA,WAAA,YAAA,SAMxC,oCAAkC"}
@@ -1,6 +1,6 @@
1
- import { useEffect, useRef, useState } from "preact/hooks";
2
- import { persistQueryClientRestore, persistQueryClientSubscribe } from "@tanstack/query-persist-client-core";
3
1
  import { IsRestoringProvider, QueryClientProvider } from "@tanstack/preact-query";
2
+ import { persistQueryClientRestore, persistQueryClientSubscribe } from "@tanstack/query-persist-client-core";
3
+ import { useEffect, useRef, useState } from "preact/hooks";
4
4
  import { jsx } from "preact/jsx-runtime";
5
5
  // src/PersistQueryClientProvider.tsx
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PersistQueryClientProvider.js","names":[],"sources":["../../src/PersistQueryClientProvider.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'preact/hooks'\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 { VNode } from 'preact'\nimport type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'\nimport type {\n OmitKeyof,\n QueryClientProviderProps,\n} from '@tanstack/preact-query'\n\n/**\n * The props of `PersistQueryClientProvider`: the props of `QueryClientProvider`, plus the\n * `persistOptions` and callbacks for when restoring succeeds or fails.\n */\nexport type PersistQueryClientProviderProps = QueryClientProviderProps & {\n persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>\n onSuccess?: () => Promise<unknown> | unknown\n onError?: () => Promise<unknown> | unknown\n}\n\n/**\n * Provides the `QueryClient` like `QueryClientProvider`, and restores the persisted client first:\n * while restoring, `useIsRestoring` returns `true` and queries wait for the restore to finish\n * before subscribing. Once restored, the client is saved with the persister whenever the cache\n * changes.\n * @param props - The `QueryClientProvider` props, the `persistOptions`, and the `onSuccess` and\n * `onError` callbacks. `onSuccess` is called once restoring finishes, even if nothing was restored\n * (e.g. because the persisted client expired), and `onError` if restoring or `onSuccess` throws.\n * @returns The `QueryClientProvider` wrapping the children.\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 optionsRef = useRef({ persistOptions, onSuccess, onError })\n const didRestoreRef = useRef(false)\n\n useEffect(() => {\n optionsRef.current = { persistOptions, onSuccess, onError }\n })\n\n useEffect(() => {\n const options = {\n ...optionsRef.current.persistOptions,\n queryClient: props.client,\n }\n if (!didRestoreRef.current) {\n didRestoreRef.current = true\n persistQueryClientRestore(options)\n .then(() => optionsRef.current.onSuccess?.())\n .catch(() => optionsRef.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":";;;;;;;;;;;;;;;AAqCA,MAAa,8BAA8B,EACzC,UACA,gBACA,WACA,SACA,GAAG,YACyC;CAC5C,MAAM,CAAC,aAAa,kBAAkB,SAAS,IAAI;CACnD,MAAM,aAAa,OAAO;EAAE;EAAgB;EAAW;CAAQ,CAAC;CAChE,MAAM,gBAAgB,OAAO,KAAK;CAElC,gBAAgB;EACd,WAAW,UAAU;GAAE;GAAgB;GAAW;EAAQ;CAC5D,CAAC;CAED,gBAAgB;EACd,MAAM,UAAU;GACd,GAAG,WAAW,QAAQ;GACtB,aAAa,MAAM;EACrB;EACA,IAAI,CAAC,cAAc,SAAS;GAC1B,cAAc,UAAU;GACxB,0BAA0B,OAAO,CAAC,CAC/B,WAAW,WAAW,QAAQ,YAAY,CAAC,CAAC,CAC5C,YAAY,WAAW,QAAQ,UAAU,CAAC,CAAC,CAC3C,cAAc;IACb,eAAe,KAAK;GACtB,CAAC;EACL;EACA,OAAO,cAAc,KAAA,IAAY,4BAA4B,OAAO;CACtE,GAAG,CAAC,MAAM,QAAQ,WAAW,CAAC;CAE9B,OACE,oBAAC,qBAAD;EAAqB,GAAI;EACvB,UAAA,oBAAC,qBAAD;GAAqB,OAAO;GAAc;EAA8B,CAAA;CACrD,CAAA;AAEzB"}
1
+ {"version":3,"file":"PersistQueryClientProvider.js","names":[],"sources":["../../src/PersistQueryClientProvider.tsx"],"sourcesContent":["import {\n IsRestoringProvider,\n QueryClientProvider,\n} from '@tanstack/preact-query'\nimport {\n persistQueryClientRestore,\n persistQueryClientSubscribe,\n} from '@tanstack/query-persist-client-core'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport type {\n OmitKeyof,\n QueryClientProviderProps,\n} from '@tanstack/preact-query'\nimport type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'\nimport type { VNode } from 'preact'\n\n/**\n * The props of `PersistQueryClientProvider`: the props of `QueryClientProvider`, plus the\n * `persistOptions` and callbacks for when restoring succeeds or fails.\n */\nexport type PersistQueryClientProviderProps = QueryClientProviderProps & {\n persistOptions: OmitKeyof<PersistQueryClientOptions, 'queryClient'>\n onSuccess?: () => Promise<unknown> | unknown\n onError?: () => Promise<unknown> | unknown\n}\n\n/**\n * Provides the `QueryClient` like `QueryClientProvider`, and restores the persisted client first:\n * while restoring, `useIsRestoring` returns `true` and queries wait for the restore to finish\n * before subscribing. Once restored, the client is saved with the persister whenever the cache\n * changes.\n * @param props - The `QueryClientProvider` props, the `persistOptions`, and the `onSuccess` and\n * `onError` callbacks. `onSuccess` is called once restoring finishes, even if nothing was restored\n * (e.g. because the persisted client expired), and `onError` if restoring or `onSuccess` throws.\n * @returns The `QueryClientProvider` wrapping the children.\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 optionsRef = useRef({ persistOptions, onSuccess, onError })\n const didRestoreRef = useRef(false)\n\n useEffect(() => {\n optionsRef.current = { persistOptions, onSuccess, onError }\n })\n\n useEffect(() => {\n const options = {\n ...optionsRef.current.persistOptions,\n queryClient: props.client,\n }\n if (!didRestoreRef.current) {\n didRestoreRef.current = true\n persistQueryClientRestore(options)\n .then(() => optionsRef.current.onSuccess?.())\n .catch(() => optionsRef.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":";;;;;;;;;;;;;;;AAoCA,MAAa,8BAA8B,EACzC,UACA,gBACA,WACA,SACA,GAAG,YACyC;CAC5C,MAAM,CAAC,aAAa,kBAAkB,SAAS,IAAI;CACnD,MAAM,aAAa,OAAO;EAAE;EAAgB;EAAW;CAAQ,CAAC;CAChE,MAAM,gBAAgB,OAAO,KAAK;CAElC,gBAAgB;EACd,WAAW,UAAU;GAAE;GAAgB;GAAW;EAAQ;CAC5D,CAAC;CAED,gBAAgB;EACd,MAAM,UAAU;GACd,GAAG,WAAW,QAAQ;GACtB,aAAa,MAAM;EACrB;EACA,IAAI,CAAC,cAAc,SAAS;GAC1B,cAAc,UAAU;GACxB,0BAA0B,OAAO,CAAC,CAC/B,WAAW,WAAW,QAAQ,YAAY,CAAC,CAAC,CAC5C,YAAY,WAAW,QAAQ,UAAU,CAAC,CAAC,CAC3C,cAAc;IACb,eAAe,KAAK;GACtB,CAAC;EACL;EACA,OAAO,cAAc,KAAA,IAAY,4BAA4B,OAAO;CACtE,GAAG,CAAC,MAAM,QAAQ,WAAW,CAAC;CAE9B,OACE,oBAAC,qBAAD;EAAqB,GAAI;EACvB,UAAA,oBAAC,qBAAD;GAAqB,OAAO;GAAc;EAA8B,CAAA;CACrD,CAAA;AAEzB"}
@@ -1,3 +1,3 @@
1
1
  import { PersistQueryClientProvider, PersistQueryClientProviderProps } from "./PersistQueryClientProvider.cjs";
2
2
  export * from "@tanstack/query-persist-client-core";
3
- export { PersistQueryClientProvider, PersistQueryClientProviderProps };
3
+ export { PersistQueryClientProvider, type PersistQueryClientProviderProps };
@@ -1,3 +1,3 @@
1
1
  import { PersistQueryClientProvider, PersistQueryClientProviderProps } from "./PersistQueryClientProvider.js";
2
2
  export * from "@tanstack/query-persist-client-core";
3
- export { PersistQueryClientProvider, PersistQueryClientProviderProps };
3
+ export { PersistQueryClientProvider, type PersistQueryClientProviderProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/preact-query-persist-client",
3
- "version": "5.107.1",
3
+ "version": "5.108.0",
4
4
  "description": "Preact bindings to work with persisters in TanStack/preact-query",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -39,18 +39,18 @@
39
39
  "!src/__tests__"
40
40
  ],
41
41
  "dependencies": {
42
- "@tanstack/query-persist-client-core": "5.107.1"
42
+ "@tanstack/query-persist-client-core": "5.108.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@preact/preset-vite": "^2.10.6",
46
- "@tanstack/preact-query": "5.107.1",
46
+ "@tanstack/preact-query": "5.108.0",
47
47
  "@tanstack/query-test-utils": "0.0.0",
48
48
  "@testing-library/preact": "^3.2.4",
49
49
  "preact": "^11.0.1",
50
50
  "typescript": "6.0.3"
51
51
  },
52
52
  "peerDependencies": {
53
- "@tanstack/preact-query": "^5.107.1",
53
+ "@tanstack/preact-query": "^5.108.0",
54
54
  "preact": "^10.0.0 || ^11.0.0-0"
55
55
  },
56
56
  "scripts": {
@@ -1,19 +1,18 @@
1
- import { useEffect, useRef, useState } from 'preact/hooks'
2
-
3
- import {
4
- persistQueryClientRestore,
5
- persistQueryClientSubscribe,
6
- } from '@tanstack/query-persist-client-core'
7
1
  import {
8
2
  IsRestoringProvider,
9
3
  QueryClientProvider,
10
4
  } from '@tanstack/preact-query'
11
- import type { VNode } from 'preact'
12
- import type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'
5
+ import {
6
+ persistQueryClientRestore,
7
+ persistQueryClientSubscribe,
8
+ } from '@tanstack/query-persist-client-core'
9
+ import { useEffect, useRef, useState } from 'preact/hooks'
13
10
  import type {
14
11
  OmitKeyof,
15
12
  QueryClientProviderProps,
16
13
  } from '@tanstack/preact-query'
14
+ import type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'
15
+ import type { VNode } from 'preact'
17
16
 
18
17
  /**
19
18
  * The props of `PersistQueryClientProvider`: the props of `QueryClientProvider`, plus the
package/src/index.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  // Re-export core
2
+ // oxlint-disable-next-line tanstack-query/no-restricted-syntax
2
3
  export * from '@tanstack/query-persist-client-core'
3
4
 
4
- export * from './PersistQueryClientProvider'
5
+ export { PersistQueryClientProvider } from './PersistQueryClientProvider'
6
+ export type { PersistQueryClientProviderProps } from './PersistQueryClientProvider'