@tanstack/solid-query-persist-client 5.104.5 → 5.105.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/dev.cjs CHANGED
@@ -3,7 +3,7 @@ let _tanstack_query_persist_client_core = require("@tanstack/query-persist-clien
3
3
  let solid_js_web = require("solid-js/web");
4
4
  let solid_js = require("solid-js");
5
5
  let _tanstack_solid_query = require("@tanstack/solid-query");
6
- //#region src/PersistQueryClientProvider.tsx
6
+ // src/PersistQueryClientProvider.tsx
7
7
  /**
8
8
  * Provides the `QueryClient` like `QueryClientProvider`, and restores the persisted client first:
9
9
  * while restoring, `useIsRestoring` returns `true` and queries wait for the restore to finish
@@ -45,7 +45,6 @@ const PersistQueryClientProvider = (props) => {
45
45
  }
46
46
  });
47
47
  };
48
- //#endregion
49
48
  exports.PersistQueryClientProvider = PersistQueryClientProvider;
50
49
  Object.keys(_tanstack_query_persist_client_core).forEach(function(k) {
51
50
  if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
package/build/dev.js CHANGED
@@ -3,7 +3,7 @@ import { createComponent } from "solid-js/web";
3
3
  import { createEffect, createMemo, createSignal, onCleanup } from "solid-js";
4
4
  import { IsRestoringProvider, QueryClientProvider } from "@tanstack/solid-query";
5
5
  export * from "@tanstack/query-persist-client-core";
6
- //#region src/PersistQueryClientProvider.tsx
6
+ // src/PersistQueryClientProvider.tsx
7
7
  /**
8
8
  * Provides the `QueryClient` like `QueryClientProvider`, and restores the persisted client first:
9
9
  * while restoring, `useIsRestoring` returns `true` and queries wait for the restore to finish
@@ -45,5 +45,4 @@ const PersistQueryClientProvider = (props) => {
45
45
  }
46
46
  });
47
47
  };
48
- //#endregion
49
48
  export { PersistQueryClientProvider };
package/build/index.d.cts CHANGED
@@ -2,7 +2,6 @@ import { PersistQueryClientOptions } from "@tanstack/query-persist-client-core";
2
2
  import { OmitKeyof, QueryClientProviderProps } from "@tanstack/solid-query";
3
3
  import { JSX } from "solid-js";
4
4
  export * from "@tanstack/query-persist-client-core";
5
- //#region src/PersistQueryClientProvider.d.ts
6
5
  /**
7
6
  * The props of `PersistQueryClientProvider`: the props of `QueryClientProvider`, plus the
8
7
  * `persistOptions` and callbacks for when restoring succeeds or fails.
@@ -23,5 +22,4 @@ export type PersistQueryClientProviderProps = QueryClientProviderProps & {
23
22
  * @returns The `QueryClientProvider` wrapping the children.
24
23
  */
25
24
  export declare const PersistQueryClientProvider: (props: PersistQueryClientProviderProps) => JSX.Element;
26
- //#endregion
27
25
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/PersistQueryClientProvider.tsx"],"mappings":";;;;;;;;;YAcY,kCAAkC;EAC5C,gBAAgB,UAAU;EAC1B;EACA;;;;;;;;;;;;qBAaW,6BACX,OAAO,oCACN,IAAI"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/PersistQueryClientProvider.tsx"],"mappings":";;;;;;;;YAcY,kCAAkC;EAC5C,gBAAgB,UAAU;EAC1B;EACA;;;;;;;;;;;;qBAaW,6BACX,OAAO,oCACN,IAAI"}
package/build/index.d.ts CHANGED
@@ -2,7 +2,6 @@ import { PersistQueryClientOptions } from "@tanstack/query-persist-client-core";
2
2
  import { JSX } from "solid-js";
3
3
  import { OmitKeyof, QueryClientProviderProps } from "@tanstack/solid-query";
4
4
  export * from "@tanstack/query-persist-client-core";
5
- //#region src/PersistQueryClientProvider.d.ts
6
5
  /**
7
6
  * The props of `PersistQueryClientProvider`: the props of `QueryClientProvider`, plus the
8
7
  * `persistOptions` and callbacks for when restoring succeeds or fails.
@@ -23,5 +22,4 @@ export type PersistQueryClientProviderProps = QueryClientProviderProps & {
23
22
  * @returns The `QueryClientProvider` wrapping the children.
24
23
  */
25
24
  export declare const PersistQueryClientProvider: (props: PersistQueryClientProviderProps) => JSX.Element;
26
- //#endregion
27
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/PersistQueryClientProvider.tsx"],"mappings":";;;;;;;;;YAcY,kCAAkC;EAC5C,gBAAgB,UAAU;EAC1B;EACA;;;;;;;;;;;;qBAaW,6BACX,OAAO,oCACN,IAAI"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/PersistQueryClientProvider.tsx"],"mappings":";;;;;;;;YAcY,kCAAkC;EAC5C,gBAAgB,UAAU;EAC1B;EACA;;;;;;;;;;;;qBAaW,6BACX,OAAO,oCACN,IAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["persistQueryClientRestore","persistQueryClientSubscribe","createEffect","createMemo","createSignal","onCleanup","IsRestoringProvider","QueryClientProvider","PersistQueryClientOptions","OmitKeyof","QueryClientProviderProps","JSX","PersistQueryClientProviderProps","persistOptions","onSuccess","onError","PersistQueryClientProvider","props","Element","isRestoring","setIsRestoring","options","queryClient","client","then","catch","finally","unsubscribe","_$createComponent","children","value","_$createComponent","PersistQueryClientProvider","isRestoring","setIsRestoring","createSignal","options","createMemo","props","createEffect","persistQueryClientRestore","unsubscribe","persistQueryClientSubscribe","onCleanup","createComponent","QueryClientProvider","IsRestoringProvider"],"sources":["../src/PersistQueryClientProvider.tsx"],"sourcesContent":["import {\n persistQueryClientRestore,\n persistQueryClientSubscribe,\n} from '@tanstack/query-persist-client-core'\nimport { createEffect, createMemo, createSignal, onCleanup } from 'solid-js'\nimport { IsRestoringProvider, QueryClientProvider } from '@tanstack/solid-query'\nimport type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'\nimport type { OmitKeyof, QueryClientProviderProps } from '@tanstack/solid-query'\nimport type { JSX } from 'solid-js'\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?: () => void\n onError?: () => void\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 props: PersistQueryClientProviderProps,\n): JSX.Element => {\n const [isRestoring, setIsRestoring] = createSignal(true)\n\n const options = createMemo(() => ({\n ...props.persistOptions,\n queryClient: props.client,\n }))\n\n createEffect(() => {\n setIsRestoring(true)\n persistQueryClientRestore(options())\n .then(() => props.onSuccess?.())\n .catch(() => props.onError?.())\n .finally(() => {\n setIsRestoring(false)\n })\n })\n\n createEffect(() => {\n let unsubscribe = () => {}\n if (!isRestoring()) {\n unsubscribe = persistQueryClientSubscribe(options())\n }\n onCleanup(() => unsubscribe())\n })\n\n return (\n <QueryClientProvider client={props.client}>\n <IsRestoringProvider value={isRestoring}>\n {props.children}\n </IsRestoringProvider>\n </QueryClientProvider>\n )\n}\n"],"mappings":"+XA8BA,MAAagB,EACXC,GACgB,CAChB,GAAM,CAACE,EAAaC,GAAkBhB,EAAa,EAAI,EAEjDiB,EAAUlB,OAAkB,CAChC,GAAGc,EAAMJ,eACTS,YAAaL,EAAMM,MACrB,EAAE,EAoBF,OAlBArB,MAAmB,CACjBkB,EAAe,EAAI,EACnBpB,EAA0BqB,EAAQ,CAAC,CAAC,CACjCG,SAAWP,EAAMH,YAAY,CAAC,CAAC,CAC/BW,UAAYR,EAAMF,UAAU,CAAC,CAAC,CAC9BW,YAAc,CACbN,EAAe,EAAK,CACtB,CAAC,CACL,CAAC,EAEDlB,MAAmB,CACjB,IAAIyB,MAAoB,CAAC,EACpBR,EAAY,IACfQ,EAAc1B,EAA4BoB,EAAQ,CAAC,GAErDhB,MAAgBsB,EAAY,CAAC,CAC/B,CAAC,EAEDC,EACGrB,EAAmB,CAAA,IAACgB,QAAM,CAAA,OAAEN,EAAMM,MAAM,EAAA,IAAAM,UAAA,CAAA,OAAAD,EACtCtB,EAAmB,CAACwB,MAAOX,EAAW,IAAAU,UAAA,CAAA,OACpCZ,EAAMY,QAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAIvB"}
1
+ {"version":3,"file":"index.js","names":["persistQueryClientRestore","persistQueryClientSubscribe","createEffect","createMemo","createSignal","onCleanup","IsRestoringProvider","QueryClientProvider","PersistQueryClientOptions","OmitKeyof","QueryClientProviderProps","JSX","PersistQueryClientProviderProps","persistOptions","onSuccess","onError","PersistQueryClientProvider","props","Element","isRestoring","setIsRestoring","options","queryClient","client","then","catch","finally","unsubscribe","_$createComponent","children","value","_$createComponent","PersistQueryClientProvider","isRestoring","setIsRestoring","createSignal","options","createMemo","props","createEffect","persistQueryClientRestore","unsubscribe","persistQueryClientSubscribe","onCleanup","createComponent","QueryClientProvider","IsRestoringProvider"],"sources":["../src/PersistQueryClientProvider.tsx"],"sourcesContent":["import {\n persistQueryClientRestore,\n persistQueryClientSubscribe,\n} from '@tanstack/query-persist-client-core'\nimport { createEffect, createMemo, createSignal, onCleanup } from 'solid-js'\nimport { IsRestoringProvider, QueryClientProvider } from '@tanstack/solid-query'\nimport type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core'\nimport type { OmitKeyof, QueryClientProviderProps } from '@tanstack/solid-query'\nimport type { JSX } from 'solid-js'\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?: () => void\n onError?: () => void\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 props: PersistQueryClientProviderProps,\n): JSX.Element => {\n const [isRestoring, setIsRestoring] = createSignal(true)\n\n const options = createMemo(() => ({\n ...props.persistOptions,\n queryClient: props.client,\n }))\n\n createEffect(() => {\n setIsRestoring(true)\n persistQueryClientRestore(options())\n .then(() => props.onSuccess?.())\n .catch(() => props.onError?.())\n .finally(() => {\n setIsRestoring(false)\n })\n })\n\n createEffect(() => {\n let unsubscribe = () => {}\n if (!isRestoring()) {\n unsubscribe = persistQueryClientSubscribe(options())\n }\n onCleanup(() => unsubscribe())\n })\n\n return (\n <QueryClientProvider client={props.client}>\n <IsRestoringProvider value={isRestoring}>\n {props.children}\n </IsRestoringProvider>\n </QueryClientProvider>\n )\n}\n"],"mappings":"A,+XA8BA,MAAagB,EACXC,GACgB,CAChB,GAAM,CAACE,EAAaC,GAAkBhB,EAAa,EAAI,EAEjDiB,EAAUlB,OAAkB,CAChC,GAAGc,EAAMJ,eACTS,YAAaL,EAAMM,MACrB,EAAE,EAoBF,OAlBArB,MAAmB,CACjBkB,EAAe,EAAI,EACnBpB,EAA0BqB,EAAQ,CAAC,CAAC,CACjCG,SAAWP,EAAMH,YAAY,CAAC,CAAC,CAC/BW,UAAYR,EAAMF,UAAU,CAAC,CAAC,CAC9BW,YAAc,CACbN,EAAe,EAAK,CACtB,CAAC,CACL,CAAC,EAEDlB,MAAmB,CACjB,IAAIyB,MAAoB,CAAC,EACpBR,EAAY,IACfQ,EAAc1B,EAA4BoB,EAAQ,CAAC,GAErDhB,MAAgBsB,EAAY,CAAC,CAC/B,CAAC,EAEDC,EACGrB,EAAmB,CAAA,IAACgB,QAAM,CAAA,OAAEN,EAAMM,MAAM,EAAA,IAAAM,UAAA,CAAA,OAAAD,EACtCtB,EAAmB,CAACwB,MAAOX,EAAW,IAAAU,UAAA,CAAA,OACpCZ,EAAMY,QAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAIvB,E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/solid-query-persist-client",
3
- "version": "5.104.5",
3
+ "version": "5.105.1",
4
4
  "description": "Solid.js bindings to work with persisters in TanStack/solid-query",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -46,12 +46,12 @@
46
46
  "!src/__tests__"
47
47
  ],
48
48
  "dependencies": {
49
- "@tanstack/query-persist-client-core": "5.104.5"
49
+ "@tanstack/query-persist-client-core": "5.105.1"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@solidjs/testing-library": "^0.8.10",
53
53
  "@tanstack/query-test-utils": "0.0.0",
54
- "@tanstack/solid-query": "5.104.5",
54
+ "@tanstack/solid-query": "5.105.1",
55
55
  "eslint-plugin-solid": "^0.18.1",
56
56
  "solid-js": "^1.9.15",
57
57
  "typescript": "6.0.3",
@@ -59,7 +59,7 @@
59
59
  "vite-plugin-solid": "^2.11.14"
60
60
  },
61
61
  "peerDependencies": {
62
- "@tanstack/solid-query": "^5.104.5",
62
+ "@tanstack/solid-query": "^5.105.1",
63
63
  "solid-js": "^1.6.0"
64
64
  },
65
65
  "scripts": {