@tanstack/solid-query-devtools 5.80.5 → 5.80.7

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
@@ -18,7 +18,6 @@ var __export = (target, all) => {
18
18
  // src/devtools.tsx
19
19
  var devtools_exports = {};
20
20
  __export(devtools_exports, {
21
- clientOnly: () => clientOnly,
22
21
  default: () => SolidQueryDevtools
23
22
  });
24
23
  function SolidQueryDevtools(props) {
@@ -69,6 +68,12 @@ function SolidQueryDevtools(props) {
69
68
  return _el$;
70
69
  })();
71
70
  }
71
+ var _tmpl$;
72
+ var init_devtools = __esm({
73
+ "src/devtools.tsx"() {
74
+ _tmpl$ = /* @__PURE__ */ web.template(`<div class=tsqd-parent-container>`);
75
+ }
76
+ });
72
77
  function clientOnly(fn) {
73
78
  if (web.isServer) return (props) => props.fallback;
74
79
  const [comp, setComp] = solidJs.createSignal();
@@ -83,15 +88,8 @@ function clientOnly(fn) {
83
88
  return solidJs.createMemo(() => (Comp = comp(), m = mounted(), solidJs.untrack(() => Comp && m ? Comp(rest) : props.fallback)));
84
89
  };
85
90
  }
86
- var _tmpl$;
87
- var init_devtools = __esm({
88
- "src/devtools.tsx"() {
89
- _tmpl$ = /* @__PURE__ */ web.template(`<div class=tsqd-parent-container>`);
90
- }
91
- });
92
91
 
93
92
  // src/index.tsx
94
- init_devtools();
95
93
  exports.SolidQueryDevtools = web.isDev ? clientOnly(() => Promise.resolve().then(() => (init_devtools(), devtools_exports))) : function() {
96
94
  return null;
97
95
  };
package/build/dev.js CHANGED
@@ -1,7 +1,24 @@
1
- import { clientOnly } from './chunk/PQQXEPYU.js';
2
- import { isDev } from 'solid-js/web';
1
+ import { isDev, isServer } from 'solid-js/web';
2
+ import { createSignal, splitProps, sharedConfig, onMount, createMemo, untrack } from 'solid-js';
3
3
 
4
- var SolidQueryDevtools = isDev ? clientOnly(() => import('./devtools/C4J3FRGT.js')) : function() {
4
+ // src/index.tsx
5
+ function clientOnly(fn) {
6
+ if (isServer) return (props) => props.fallback;
7
+ const [comp, setComp] = createSignal();
8
+ fn().then((m) => setComp(() => m.default));
9
+ return (props) => {
10
+ let Comp;
11
+ let m;
12
+ const [, rest] = splitProps(props, ["fallback"]);
13
+ if ((Comp = comp()) && !sharedConfig.context) return Comp(rest);
14
+ const [mounted, setMounted] = createSignal(!sharedConfig.context);
15
+ onMount(() => setMounted(true));
16
+ return createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
17
+ };
18
+ }
19
+
20
+ // src/index.tsx
21
+ var SolidQueryDevtools = isDev ? clientOnly(() => import('./devtools/LBUQ2A5B.js')) : function() {
5
22
  return null;
6
23
  };
7
24
 
package/build/dev.jsx CHANGED
@@ -1,10 +1,36 @@
1
+ // src/index.tsx
2
+ import { isDev } from "solid-js/web";
3
+
4
+ // src/clientOnly.tsx
1
5
  import {
2
- clientOnly
3
- } from "./chunk/AU5TFTIU.jsx";
6
+ createMemo,
7
+ createSignal,
8
+ onMount,
9
+ sharedConfig,
10
+ splitProps,
11
+ untrack
12
+ } from "solid-js";
13
+ import { isServer } from "solid-js/web";
14
+ function clientOnly(fn) {
15
+ if (isServer)
16
+ return (props) => props.fallback;
17
+ const [comp, setComp] = createSignal();
18
+ fn().then((m) => setComp(() => m.default));
19
+ return (props) => {
20
+ let Comp;
21
+ let m;
22
+ const [, rest] = splitProps(props, ["fallback"]);
23
+ if ((Comp = comp()) && !sharedConfig.context) return Comp(rest);
24
+ const [mounted, setMounted] = createSignal(!sharedConfig.context);
25
+ onMount(() => setMounted(true));
26
+ return createMemo(
27
+ () => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback))
28
+ );
29
+ };
30
+ }
4
31
 
5
32
  // src/index.tsx
6
- import { isDev } from "solid-js/web";
7
- var SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools/IXR2SZ26.jsx")) : function() {
33
+ var SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools/O4DODHQV.jsx")) : function() {
8
34
  return null;
9
35
  };
10
36
  export {
@@ -1,5 +1,5 @@
1
- import { template, use, isServer } from 'solid-js/web';
2
- import { createMemo, createEffect, onMount, onCleanup, createSignal, splitProps, sharedConfig, untrack } from 'solid-js';
1
+ import { template, use } from 'solid-js/web';
2
+ import { createMemo, createEffect, onMount, onCleanup } from 'solid-js';
3
3
  import { useQueryClient, onlineManager } from '@tanstack/solid-query';
4
4
  import { TanstackQueryDevtools } from '@tanstack/query-devtools';
5
5
 
@@ -53,19 +53,5 @@ function SolidQueryDevtools(props) {
53
53
  return _el$;
54
54
  })();
55
55
  }
56
- function clientOnly(fn) {
57
- if (isServer) return (props) => props.fallback;
58
- const [comp, setComp] = createSignal();
59
- fn().then((m) => setComp(() => m.default));
60
- return (props) => {
61
- let Comp;
62
- let m;
63
- const [, rest] = splitProps(props, ["fallback"]);
64
- if ((Comp = comp()) && !sharedConfig.context) return Comp(rest);
65
- const [mounted, setMounted] = createSignal(!sharedConfig.context);
66
- onMount(() => setMounted(true));
67
- return createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
68
- };
69
- }
70
56
 
71
- export { SolidQueryDevtools, clientOnly };
57
+ export { SolidQueryDevtools as default };
@@ -1,16 +1,6 @@
1
1
  // src/devtools.tsx
2
- import {
3
- createEffect,
4
- createMemo,
5
- createSignal,
6
- onCleanup,
7
- onMount,
8
- sharedConfig,
9
- splitProps,
10
- untrack
11
- } from "solid-js";
2
+ import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
12
3
  import { onlineManager, useQueryClient } from "@tanstack/solid-query";
13
- import { isServer } from "solid-js/web";
14
4
  import { TanstackQueryDevtools } from "@tanstack/query-devtools";
15
5
  function SolidQueryDevtools(props) {
16
6
  const queryClient = useQueryClient();
@@ -55,25 +45,6 @@ function SolidQueryDevtools(props) {
55
45
  });
56
46
  return <div class="tsqd-parent-container" ref={ref} />;
57
47
  }
58
- function clientOnly(fn) {
59
- if (isServer)
60
- return (props) => props.fallback;
61
- const [comp, setComp] = createSignal();
62
- fn().then((m) => setComp(() => m.default));
63
- return (props) => {
64
- let Comp;
65
- let m;
66
- const [, rest] = splitProps(props, ["fallback"]);
67
- if ((Comp = comp()) && !sharedConfig.context) return Comp(rest);
68
- const [mounted, setMounted] = createSignal(!sharedConfig.context);
69
- onMount(() => setMounted(true));
70
- return createMemo(
71
- () => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback))
72
- );
73
- };
74
- }
75
-
76
48
  export {
77
- SolidQueryDevtools,
78
- clientOnly
49
+ SolidQueryDevtools as default
79
50
  };
package/build/index.cjs CHANGED
@@ -18,7 +18,6 @@ var __export = (target, all) => {
18
18
  // src/devtools.tsx
19
19
  var devtools_exports = {};
20
20
  __export(devtools_exports, {
21
- clientOnly: () => clientOnly,
22
21
  default: () => SolidQueryDevtools
23
22
  });
24
23
  function SolidQueryDevtools(props) {
@@ -69,6 +68,12 @@ function SolidQueryDevtools(props) {
69
68
  return _el$;
70
69
  })();
71
70
  }
71
+ var _tmpl$;
72
+ var init_devtools = __esm({
73
+ "src/devtools.tsx"() {
74
+ _tmpl$ = /* @__PURE__ */ web.template(`<div class=tsqd-parent-container>`);
75
+ }
76
+ });
72
77
  function clientOnly(fn) {
73
78
  if (web.isServer) return (props) => props.fallback;
74
79
  const [comp, setComp] = solidJs.createSignal();
@@ -83,15 +88,8 @@ function clientOnly(fn) {
83
88
  return solidJs.createMemo(() => (Comp = comp(), m = mounted(), solidJs.untrack(() => Comp && m ? Comp(rest) : props.fallback)));
84
89
  };
85
90
  }
86
- var _tmpl$;
87
- var init_devtools = __esm({
88
- "src/devtools.tsx"() {
89
- _tmpl$ = /* @__PURE__ */ web.template(`<div class=tsqd-parent-container>`);
90
- }
91
- });
92
91
 
93
92
  // src/index.tsx
94
- init_devtools();
95
93
  exports.SolidQueryDevtools = web.isDev ? clientOnly(() => Promise.resolve().then(() => (init_devtools(), devtools_exports))) : function() {
96
94
  return null;
97
95
  };
package/build/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
+ import * as solid_js from 'solid-js';
1
2
  import { DevtoolsButtonPosition, DevtoolsPosition, DevtoolsErrorType } from '@tanstack/query-devtools';
2
3
  import { QueryClient } from '@tanstack/solid-query';
3
- import { JSX } from 'solid-js';
4
4
 
5
5
  interface DevtoolsOptions {
6
6
  /**
@@ -36,7 +36,7 @@ interface DevtoolsOptions {
36
36
  */
37
37
  shadowDOMTarget?: ShadowRoot;
38
38
  }
39
- declare function SolidQueryDevtools$1(props: DevtoolsOptions): JSX.Element;
39
+ declare function SolidQueryDevtools$1(props: DevtoolsOptions): solid_js.JSX.Element;
40
40
 
41
41
  declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
42
42
 
package/build/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
+ import * as solid_js from 'solid-js';
1
2
  import { DevtoolsButtonPosition, DevtoolsPosition, DevtoolsErrorType } from '@tanstack/query-devtools';
2
3
  import { QueryClient } from '@tanstack/solid-query';
3
- import { JSX } from 'solid-js';
4
4
 
5
5
  interface DevtoolsOptions {
6
6
  /**
@@ -36,7 +36,7 @@ interface DevtoolsOptions {
36
36
  */
37
37
  shadowDOMTarget?: ShadowRoot;
38
38
  }
39
- declare function SolidQueryDevtools$1(props: DevtoolsOptions): JSX.Element;
39
+ declare function SolidQueryDevtools$1(props: DevtoolsOptions): solid_js.JSX.Element;
40
40
 
41
41
  declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
42
42
 
package/build/index.js CHANGED
@@ -1,7 +1,24 @@
1
- import { clientOnly } from './chunk/PQQXEPYU.js';
2
- import { isDev } from 'solid-js/web';
1
+ import { isDev, isServer } from 'solid-js/web';
2
+ import { createSignal, splitProps, sharedConfig, onMount, createMemo, untrack } from 'solid-js';
3
3
 
4
- var SolidQueryDevtools = isDev ? clientOnly(() => import('./devtools/C4J3FRGT.js')) : function() {
4
+ // src/index.tsx
5
+ function clientOnly(fn) {
6
+ if (isServer) return (props) => props.fallback;
7
+ const [comp, setComp] = createSignal();
8
+ fn().then((m) => setComp(() => m.default));
9
+ return (props) => {
10
+ let Comp;
11
+ let m;
12
+ const [, rest] = splitProps(props, ["fallback"]);
13
+ if ((Comp = comp()) && !sharedConfig.context) return Comp(rest);
14
+ const [mounted, setMounted] = createSignal(!sharedConfig.context);
15
+ onMount(() => setMounted(true));
16
+ return createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
17
+ };
18
+ }
19
+
20
+ // src/index.tsx
21
+ var SolidQueryDevtools = isDev ? clientOnly(() => import('./devtools/LBUQ2A5B.js')) : function() {
5
22
  return null;
6
23
  };
7
24
 
package/build/index.jsx CHANGED
@@ -1,10 +1,36 @@
1
+ // src/index.tsx
2
+ import { isDev } from "solid-js/web";
3
+
4
+ // src/clientOnly.tsx
1
5
  import {
2
- clientOnly
3
- } from "./chunk/AU5TFTIU.jsx";
6
+ createMemo,
7
+ createSignal,
8
+ onMount,
9
+ sharedConfig,
10
+ splitProps,
11
+ untrack
12
+ } from "solid-js";
13
+ import { isServer } from "solid-js/web";
14
+ function clientOnly(fn) {
15
+ if (isServer)
16
+ return (props) => props.fallback;
17
+ const [comp, setComp] = createSignal();
18
+ fn().then((m) => setComp(() => m.default));
19
+ return (props) => {
20
+ let Comp;
21
+ let m;
22
+ const [, rest] = splitProps(props, ["fallback"]);
23
+ if ((Comp = comp()) && !sharedConfig.context) return Comp(rest);
24
+ const [mounted, setMounted] = createSignal(!sharedConfig.context);
25
+ onMount(() => setMounted(true));
26
+ return createMemo(
27
+ () => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback))
28
+ );
29
+ };
30
+ }
4
31
 
5
32
  // src/index.tsx
6
- import { isDev } from "solid-js/web";
7
- var SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools/IXR2SZ26.jsx")) : function() {
33
+ var SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools/O4DODHQV.jsx")) : function() {
8
34
  return null;
9
35
  };
10
36
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/solid-query-devtools",
3
- "version": "5.80.5",
3
+ "version": "5.80.7",
4
4
  "description": "Developer tools to interact with and visualize the TanStack/solid-query Query cache",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -51,11 +51,11 @@
51
51
  "solid-js": "^1.9.5",
52
52
  "tsup-preset-solid": "^2.2.0",
53
53
  "vite-plugin-solid": "^2.11.6",
54
- "@tanstack/solid-query": "5.80.5"
54
+ "@tanstack/solid-query": "5.80.7"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "solid-js": "^1.6.0",
58
- "@tanstack/solid-query": "^5.80.5"
58
+ "@tanstack/solid-query": "^5.80.7"
59
59
  },
60
60
  "scripts": {}
61
61
  }
@@ -0,0 +1,43 @@
1
+ import {
2
+ createMemo,
3
+ createSignal,
4
+ onMount,
5
+ sharedConfig,
6
+ splitProps,
7
+ untrack,
8
+ } from 'solid-js'
9
+ import { isServer } from 'solid-js/web'
10
+ import type { Component, ComponentProps, JSX } from 'solid-js'
11
+
12
+ /*
13
+ This function has been taken from solid-start's codebase
14
+ This allows the devtools to be loaded only on the client and bypasses any server side rendering
15
+ https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx
16
+ */
17
+ export default function clientOnly<T extends Component<any>>(
18
+ fn: () => Promise<{
19
+ default: T
20
+ }>,
21
+ ) {
22
+ if (isServer)
23
+ return (props: ComponentProps<T> & { fallback?: JSX.Element }) =>
24
+ props.fallback
25
+
26
+ const [comp, setComp] = createSignal<T>()
27
+ fn().then((m) => setComp(() => m.default))
28
+ return (props: ComponentProps<T>) => {
29
+ let Comp: T | undefined
30
+ let m: boolean
31
+ const [, rest] = splitProps(props, ['fallback'])
32
+ if ((Comp = comp()) && !sharedConfig.context) return Comp(rest)
33
+ const [mounted, setMounted] = createSignal(!sharedConfig.context)
34
+ onMount(() => setMounted(true))
35
+ return createMemo(
36
+ () => (
37
+ (Comp = comp()),
38
+ (m = mounted()),
39
+ untrack(() => (Comp && m ? Comp(rest) : props.fallback))
40
+ ),
41
+ )
42
+ }
43
+ }
package/src/devtools.tsx CHANGED
@@ -1,15 +1,5 @@
1
- import {
2
- createEffect,
3
- createMemo,
4
- createSignal,
5
- onCleanup,
6
- onMount,
7
- sharedConfig,
8
- splitProps,
9
- untrack,
10
- } from 'solid-js'
1
+ import { createEffect, createMemo, onCleanup, onMount } from 'solid-js'
11
2
  import { onlineManager, useQueryClient } from '@tanstack/solid-query'
12
- import { isServer } from 'solid-js/web'
13
3
  import { TanstackQueryDevtools } from '@tanstack/query-devtools'
14
4
  import type {
15
5
  DevtoolsButtonPosition,
@@ -17,7 +7,6 @@ import type {
17
7
  DevtoolsPosition,
18
8
  } from '@tanstack/query-devtools'
19
9
  import type { QueryClient } from '@tanstack/solid-query'
20
- import type { Component, ComponentProps, JSX } from 'solid-js'
21
10
 
22
11
  interface DevtoolsOptions {
23
12
  /**
@@ -104,36 +93,3 @@ export default function SolidQueryDevtools(props: DevtoolsOptions) {
104
93
 
105
94
  return <div class="tsqd-parent-container" ref={ref}></div>
106
95
  }
107
-
108
- /*
109
- This function has been taken from solid-start's codebase
110
- This allows the devtools to be loaded only on the client and bypasses any server side rendering
111
- https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx
112
- */
113
- export function clientOnly<T extends Component<any>>(
114
- fn: () => Promise<{
115
- default: T
116
- }>,
117
- ) {
118
- if (isServer)
119
- return (props: ComponentProps<T> & { fallback?: JSX.Element }) =>
120
- props.fallback
121
-
122
- const [comp, setComp] = createSignal<T>()
123
- fn().then((m) => setComp(() => m.default))
124
- return (props: ComponentProps<T>) => {
125
- let Comp: T | undefined
126
- let m: boolean
127
- const [, rest] = splitProps(props, ['fallback'])
128
- if ((Comp = comp()) && !sharedConfig.context) return Comp(rest)
129
- const [mounted, setMounted] = createSignal(!sharedConfig.context)
130
- onMount(() => setMounted(true))
131
- return createMemo(
132
- () => (
133
- (Comp = comp()),
134
- (m = mounted()),
135
- untrack(() => (Comp && m ? Comp(rest) : props.fallback))
136
- ),
137
- )
138
- }
139
- }
package/src/index.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import { isDev } from 'solid-js/web'
2
- import { clientOnly } from './devtools'
2
+ import clientOnly from './clientOnly'
3
3
  import type SolidQueryDevtoolsComp from './devtools'
4
4
 
5
5
  export const SolidQueryDevtools: typeof SolidQueryDevtoolsComp = isDev
@@ -1 +0,0 @@
1
- export { clientOnly, SolidQueryDevtools as default } from '../chunk/PQQXEPYU.js';
@@ -1,8 +0,0 @@
1
- import {
2
- SolidQueryDevtools,
3
- clientOnly
4
- } from "../chunk/AU5TFTIU.jsx";
5
- export {
6
- clientOnly,
7
- SolidQueryDevtools as default
8
- };