@tanstack/solid-query-devtools 5.106.0 → 5.106.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
@@ -1,35 +1,118 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let solid_js_web = require("solid-js/web");
3
3
  let solid_js = require("solid-js");
4
- // src/clientOnly.tsx
4
+ let _tanstack_solid_query = require("@tanstack/solid-query");
5
+ let _tanstack_query_devtools = require("@tanstack/query-devtools");
6
+ // src/devtools.tsx
7
+ var _tmpl$$1 = /*#__PURE__*/ (0, solid_js_web.template)(`<div class=tsqd-parent-container>`);
5
8
  /**
6
- * This function has been taken from solid-start's codebase:
7
- * <https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx>.
8
- * This allows the devtools to be loaded only on the client and bypasses any server side rendering.
9
- * @param fn - Imports the module whose default export is the component.
10
- * @returns A component that renders `fallback` on the server and while the module loads on the
11
- * client, then the imported component.
9
+ * Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
10
+ * nearest `QueryClient`.
11
+ * @param props - The devtools options.
12
+ * @returns The element the devtools are mounted in.
12
13
  */
13
- function clientOnly(fn) {
14
- if (solid_js_web.isServer) return (props) => props.fallback;
15
- const [comp, setComp] = (0, solid_js.createSignal)();
16
- fn().then((m) => setComp(() => m.default));
17
- return (props) => {
18
- let Comp;
19
- let m;
20
- const [, rest] = (0, solid_js.splitProps)(props, ["fallback"]);
21
- if ((Comp = comp()) && !solid_js.sharedConfig.context) return Comp(rest);
22
- const [mounted, setMounted] = (0, solid_js.createSignal)(!solid_js.sharedConfig.context);
23
- (0, solid_js.onMount)(() => setMounted(true));
24
- return (0, solid_js.createMemo)(() => (Comp = comp(), m = mounted(), (0, solid_js.untrack)(() => Comp && m ? Comp(rest) : props.fallback)));
25
- };
14
+ function SolidQueryDevtools$1(props) {
15
+ const queryClient = (0, _tanstack_solid_query.useQueryClient)(props.client);
16
+ const client = (0, solid_js.createMemo)(() => queryClient);
17
+ let ref;
18
+ const devtools = new _tanstack_query_devtools.TanstackQueryDevtools({
19
+ client: client(),
20
+ queryFlavor: "Solid Query",
21
+ version: "5",
22
+ onlineManager: _tanstack_solid_query.onlineManager,
23
+ buttonPosition: props.buttonPosition,
24
+ position: props.position,
25
+ initialIsOpen: props.initialIsOpen,
26
+ errorTypes: props.errorTypes,
27
+ styleNonce: props.styleNonce,
28
+ shadowDOMTarget: props.shadowDOMTarget,
29
+ hideDisabledQueries: props.hideDisabledQueries,
30
+ theme: props.theme
31
+ });
32
+ (0, solid_js.createEffect)(() => {
33
+ devtools.setClient(client());
34
+ });
35
+ (0, solid_js.createEffect)(() => {
36
+ const buttonPos = props.buttonPosition;
37
+ if (buttonPos) devtools.setButtonPosition(buttonPos);
38
+ });
39
+ (0, solid_js.createEffect)(() => {
40
+ const pos = props.position;
41
+ if (pos) devtools.setPosition(pos);
42
+ });
43
+ (0, solid_js.createEffect)(() => {
44
+ devtools.setInitialIsOpen(props.initialIsOpen || false);
45
+ });
46
+ (0, solid_js.createEffect)(() => {
47
+ devtools.setErrorTypes(props.errorTypes || []);
48
+ });
49
+ (0, solid_js.createEffect)(() => {
50
+ devtools.setTheme(props.theme);
51
+ });
52
+ (0, solid_js.onMount)(() => {
53
+ devtools.mount(ref);
54
+ (0, solid_js.onCleanup)(() => devtools.unmount());
55
+ });
56
+ return (() => {
57
+ var _el$ = _tmpl$$1();
58
+ var _ref$ = ref;
59
+ typeof _ref$ === "function" ? (0, solid_js_web.use)(_ref$, _el$) : ref = _el$;
60
+ return _el$;
61
+ })();
62
+ }
63
+ // src/devtoolsPanel.tsx
64
+ var _tmpl$ = /*#__PURE__*/ (0, solid_js_web.template)(`<div class=tsqd-parent-container style=height:100%;display:flex;flex-direction:column>`);
65
+ /**
66
+ * Renders the TanStack Query devtools panel inline, for the given or nearest `QueryClient`.
67
+ * @param props - The devtools panel options.
68
+ * @returns The element the devtools panel is mounted in.
69
+ */
70
+ function SolidQueryDevtoolsPanel$1(props) {
71
+ const queryClient = (0, _tanstack_solid_query.useQueryClient)(props.client);
72
+ const client = (0, solid_js.createMemo)(() => queryClient);
73
+ let ref;
74
+ const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props;
75
+ const devtools = new _tanstack_query_devtools.TanstackQueryDevtoolsPanel({
76
+ client: client(),
77
+ queryFlavor: "Solid Query",
78
+ version: "5",
79
+ onlineManager: _tanstack_solid_query.onlineManager,
80
+ buttonPosition: "bottom-left",
81
+ position: "bottom",
82
+ initialIsOpen: true,
83
+ errorTypes,
84
+ styleNonce,
85
+ shadowDOMTarget,
86
+ onClose: props.onClose,
87
+ hideDisabledQueries,
88
+ theme: props.theme
89
+ });
90
+ (0, solid_js.createEffect)(() => {
91
+ devtools.setClient(client());
92
+ });
93
+ (0, solid_js.createEffect)(() => {
94
+ devtools.setOnClose(props.onClose ?? (() => {}));
95
+ });
96
+ (0, solid_js.createEffect)(() => {
97
+ devtools.setErrorTypes(props.errorTypes || []);
98
+ });
99
+ (0, solid_js.createEffect)(() => {
100
+ devtools.setTheme(props.theme);
101
+ });
102
+ (0, solid_js.onMount)(() => {
103
+ devtools.mount(ref);
104
+ (0, solid_js.onCleanup)(() => devtools.unmount());
105
+ });
106
+ return (() => {
107
+ var _el$ = _tmpl$();
108
+ var _ref$ = ref;
109
+ typeof _ref$ === "function" ? (0, solid_js_web.use)(_ref$, _el$) : ref = _el$;
110
+ (0, solid_js_web.effect)((_$p) => (0, solid_js_web.style)(_el$, { ...props.style }, _$p));
111
+ return _el$;
112
+ })();
26
113
  }
27
114
  // src/index.tsx
28
- const SolidQueryDevtools = solid_js_web.isDev ? clientOnly(() => Promise.resolve().then(() => require("./devtools-8au4JaTw.cjs"))) : function() {
29
- return null;
30
- };
31
- const SolidQueryDevtoolsPanel = solid_js_web.isDev ? clientOnly(() => Promise.resolve().then(() => require("./devtoolsPanel-C2Ayou8L.cjs"))) : function() {
32
- return null;
33
- };
115
+ const SolidQueryDevtools = SolidQueryDevtools$1;
116
+ const SolidQueryDevtoolsPanel = SolidQueryDevtoolsPanel$1;
34
117
  exports.SolidQueryDevtools = SolidQueryDevtools;
35
118
  exports.SolidQueryDevtoolsPanel = SolidQueryDevtoolsPanel;
package/build/dev.js CHANGED
@@ -1,33 +1,116 @@
1
- import { isDev, isServer } from "solid-js/web";
2
- import { createMemo, createSignal, onMount, sharedConfig, splitProps, untrack } from "solid-js";
3
- // src/clientOnly.tsx
1
+ import { effect, style, template, use } from "solid-js/web";
2
+ import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
3
+ import { onlineManager, useQueryClient } from "@tanstack/solid-query";
4
+ import { TanstackQueryDevtools, TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
5
+ // src/devtools.tsx
6
+ var _tmpl$$1 = /*#__PURE__*/ template(`<div class=tsqd-parent-container>`);
4
7
  /**
5
- * This function has been taken from solid-start's codebase:
6
- * <https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx>.
7
- * This allows the devtools to be loaded only on the client and bypasses any server side rendering.
8
- * @param fn - Imports the module whose default export is the component.
9
- * @returns A component that renders `fallback` on the server and while the module loads on the
10
- * client, then the imported component.
8
+ * Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
9
+ * nearest `QueryClient`.
10
+ * @param props - The devtools options.
11
+ * @returns The element the devtools are mounted in.
11
12
  */
12
- function clientOnly(fn) {
13
- if (isServer) return (props) => props.fallback;
14
- const [comp, setComp] = createSignal();
15
- fn().then((m) => setComp(() => m.default));
16
- return (props) => {
17
- let Comp;
18
- let m;
19
- const [, rest] = splitProps(props, ["fallback"]);
20
- if ((Comp = comp()) && !sharedConfig.context) return Comp(rest);
21
- const [mounted, setMounted] = createSignal(!sharedConfig.context);
22
- onMount(() => setMounted(true));
23
- return createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
24
- };
13
+ function SolidQueryDevtools$1(props) {
14
+ const queryClient = useQueryClient(props.client);
15
+ const client = createMemo(() => queryClient);
16
+ let ref;
17
+ const devtools = new TanstackQueryDevtools({
18
+ client: client(),
19
+ queryFlavor: "Solid Query",
20
+ version: "5",
21
+ onlineManager,
22
+ buttonPosition: props.buttonPosition,
23
+ position: props.position,
24
+ initialIsOpen: props.initialIsOpen,
25
+ errorTypes: props.errorTypes,
26
+ styleNonce: props.styleNonce,
27
+ shadowDOMTarget: props.shadowDOMTarget,
28
+ hideDisabledQueries: props.hideDisabledQueries,
29
+ theme: props.theme
30
+ });
31
+ createEffect(() => {
32
+ devtools.setClient(client());
33
+ });
34
+ createEffect(() => {
35
+ const buttonPos = props.buttonPosition;
36
+ if (buttonPos) devtools.setButtonPosition(buttonPos);
37
+ });
38
+ createEffect(() => {
39
+ const pos = props.position;
40
+ if (pos) devtools.setPosition(pos);
41
+ });
42
+ createEffect(() => {
43
+ devtools.setInitialIsOpen(props.initialIsOpen || false);
44
+ });
45
+ createEffect(() => {
46
+ devtools.setErrorTypes(props.errorTypes || []);
47
+ });
48
+ createEffect(() => {
49
+ devtools.setTheme(props.theme);
50
+ });
51
+ onMount(() => {
52
+ devtools.mount(ref);
53
+ onCleanup(() => devtools.unmount());
54
+ });
55
+ return (() => {
56
+ var _el$ = _tmpl$$1();
57
+ var _ref$ = ref;
58
+ typeof _ref$ === "function" ? use(_ref$, _el$) : ref = _el$;
59
+ return _el$;
60
+ })();
61
+ }
62
+ // src/devtoolsPanel.tsx
63
+ var _tmpl$ = /*#__PURE__*/ template(`<div class=tsqd-parent-container style=height:100%;display:flex;flex-direction:column>`);
64
+ /**
65
+ * Renders the TanStack Query devtools panel inline, for the given or nearest `QueryClient`.
66
+ * @param props - The devtools panel options.
67
+ * @returns The element the devtools panel is mounted in.
68
+ */
69
+ function SolidQueryDevtoolsPanel$1(props) {
70
+ const queryClient = useQueryClient(props.client);
71
+ const client = createMemo(() => queryClient);
72
+ let ref;
73
+ const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props;
74
+ const devtools = new TanstackQueryDevtoolsPanel({
75
+ client: client(),
76
+ queryFlavor: "Solid Query",
77
+ version: "5",
78
+ onlineManager,
79
+ buttonPosition: "bottom-left",
80
+ position: "bottom",
81
+ initialIsOpen: true,
82
+ errorTypes,
83
+ styleNonce,
84
+ shadowDOMTarget,
85
+ onClose: props.onClose,
86
+ hideDisabledQueries,
87
+ theme: props.theme
88
+ });
89
+ createEffect(() => {
90
+ devtools.setClient(client());
91
+ });
92
+ createEffect(() => {
93
+ devtools.setOnClose(props.onClose ?? (() => {}));
94
+ });
95
+ createEffect(() => {
96
+ devtools.setErrorTypes(props.errorTypes || []);
97
+ });
98
+ createEffect(() => {
99
+ devtools.setTheme(props.theme);
100
+ });
101
+ onMount(() => {
102
+ devtools.mount(ref);
103
+ onCleanup(() => devtools.unmount());
104
+ });
105
+ return (() => {
106
+ var _el$ = _tmpl$();
107
+ var _ref$ = ref;
108
+ typeof _ref$ === "function" ? use(_ref$, _el$) : ref = _el$;
109
+ effect((_$p) => style(_el$, { ...props.style }, _$p));
110
+ return _el$;
111
+ })();
25
112
  }
26
113
  // src/index.tsx
27
- const SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools-DS7Cagay.js")) : function() {
28
- return null;
29
- };
30
- const SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel-3eu1kojY.js")) : function() {
31
- return null;
32
- };
114
+ const SolidQueryDevtools = SolidQueryDevtools$1;
115
+ const SolidQueryDevtoolsPanel = SolidQueryDevtoolsPanel$1;
33
116
  export { SolidQueryDevtools, SolidQueryDevtoolsPanel };
package/build/dev.jsx CHANGED
@@ -1,33 +1,107 @@
1
- import { isDev, isServer } from "solid-js/web";
2
- import { createMemo, createSignal, onMount, sharedConfig, splitProps, untrack } from "solid-js";
3
- // src/clientOnly.tsx
1
+ import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
2
+ import { onlineManager, useQueryClient } from "@tanstack/solid-query";
3
+ import { TanstackQueryDevtools, TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
4
+ // src/devtools.tsx
4
5
  /**
5
- * This function has been taken from solid-start's codebase:
6
- * <https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx>.
7
- * This allows the devtools to be loaded only on the client and bypasses any server side rendering.
8
- * @param fn - Imports the module whose default export is the component.
9
- * @returns A component that renders `fallback` on the server and while the module loads on the
10
- * client, then the imported component.
6
+ * Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
7
+ * nearest `QueryClient`.
8
+ * @param props - The devtools options.
9
+ * @returns The element the devtools are mounted in.
11
10
  */
12
- function clientOnly(fn) {
13
- if (isServer) return (props) => props.fallback;
14
- const [comp, setComp] = createSignal();
15
- fn().then((m) => setComp(() => m.default));
16
- return (props) => {
17
- let Comp;
18
- let m;
19
- const [, rest] = splitProps(props, ["fallback"]);
20
- if ((Comp = comp()) && !sharedConfig.context) return Comp(rest);
21
- const [mounted, setMounted] = createSignal(!sharedConfig.context);
22
- onMount(() => setMounted(true));
23
- return createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
24
- };
11
+ function SolidQueryDevtools$1(props) {
12
+ const queryClient = useQueryClient(props.client);
13
+ const client = createMemo(() => queryClient);
14
+ let ref;
15
+ const devtools = new TanstackQueryDevtools({
16
+ client: client(),
17
+ queryFlavor: "Solid Query",
18
+ version: "5",
19
+ onlineManager,
20
+ buttonPosition: props.buttonPosition,
21
+ position: props.position,
22
+ initialIsOpen: props.initialIsOpen,
23
+ errorTypes: props.errorTypes,
24
+ styleNonce: props.styleNonce,
25
+ shadowDOMTarget: props.shadowDOMTarget,
26
+ hideDisabledQueries: props.hideDisabledQueries,
27
+ theme: props.theme
28
+ });
29
+ createEffect(() => {
30
+ devtools.setClient(client());
31
+ });
32
+ createEffect(() => {
33
+ const buttonPos = props.buttonPosition;
34
+ if (buttonPos) devtools.setButtonPosition(buttonPos);
35
+ });
36
+ createEffect(() => {
37
+ const pos = props.position;
38
+ if (pos) devtools.setPosition(pos);
39
+ });
40
+ createEffect(() => {
41
+ devtools.setInitialIsOpen(props.initialIsOpen || false);
42
+ });
43
+ createEffect(() => {
44
+ devtools.setErrorTypes(props.errorTypes || []);
45
+ });
46
+ createEffect(() => {
47
+ devtools.setTheme(props.theme);
48
+ });
49
+ onMount(() => {
50
+ devtools.mount(ref);
51
+ onCleanup(() => devtools.unmount());
52
+ });
53
+ return <div class="tsqd-parent-container" ref={ref} />;
54
+ }
55
+ // src/devtoolsPanel.tsx
56
+ /**
57
+ * Renders the TanStack Query devtools panel inline, for the given or nearest `QueryClient`.
58
+ * @param props - The devtools panel options.
59
+ * @returns The element the devtools panel is mounted in.
60
+ */
61
+ function SolidQueryDevtoolsPanel$1(props) {
62
+ const queryClient = useQueryClient(props.client);
63
+ const client = createMemo(() => queryClient);
64
+ let ref;
65
+ const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props;
66
+ const devtools = new TanstackQueryDevtoolsPanel({
67
+ client: client(),
68
+ queryFlavor: "Solid Query",
69
+ version: "5",
70
+ onlineManager,
71
+ buttonPosition: "bottom-left",
72
+ position: "bottom",
73
+ initialIsOpen: true,
74
+ errorTypes,
75
+ styleNonce,
76
+ shadowDOMTarget,
77
+ onClose: props.onClose,
78
+ hideDisabledQueries,
79
+ theme: props.theme
80
+ });
81
+ createEffect(() => {
82
+ devtools.setClient(client());
83
+ });
84
+ createEffect(() => {
85
+ devtools.setOnClose(props.onClose ?? (() => {}));
86
+ });
87
+ createEffect(() => {
88
+ devtools.setErrorTypes(props.errorTypes || []);
89
+ });
90
+ createEffect(() => {
91
+ devtools.setTheme(props.theme);
92
+ });
93
+ onMount(() => {
94
+ devtools.mount(ref);
95
+ onCleanup(() => devtools.unmount());
96
+ });
97
+ return <div style={{
98
+ height: "100%",
99
+ display: "flex",
100
+ "flex-direction": "column",
101
+ ...props.style
102
+ }} class="tsqd-parent-container" ref={ref} />;
25
103
  }
26
104
  // src/index.tsx
27
- const SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools-COkRtz4W.jsx")) : function() {
28
- return null;
29
- };
30
- const SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel-BnT0jwWW.jsx")) : function() {
31
- return null;
32
- };
105
+ const SolidQueryDevtools = SolidQueryDevtools$1;
106
+ const SolidQueryDevtoolsPanel = SolidQueryDevtoolsPanel$1;
33
107
  export { SolidQueryDevtools, SolidQueryDevtoolsPanel };
package/build/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("solid-js/web"),t=require("solid-js");function n(n){if(e.isServer)return e=>e.fallback;let[r,i]=(0,t.createSignal)();return n().then(e=>i(()=>e.default)),e=>{let n,i,[,a]=(0,t.splitProps)(e,[`fallback`]);if((n=r())&&!t.sharedConfig.context)return n(a);let[o,s]=(0,t.createSignal)(!t.sharedConfig.context);return(0,t.onMount)(()=>s(!0)),(0,t.createMemo)(()=>(n=r(),i=o(),(0,t.untrack)(()=>n&&i?n(a):e.fallback)))}}const r=e.isDev?n(()=>Promise.resolve().then(()=>require("./devtools-CsBrM8Az.cjs"))):function(){return null},i=e.isDev?n(()=>Promise.resolve().then(()=>require("./devtoolsPanel-7jSpgkJK.cjs"))):function(){return null};exports.SolidQueryDevtools=r,exports.SolidQueryDevtoolsPanel=i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=function(){return null},t=function(){return null};exports.SolidQueryDevtools=e,exports.SolidQueryDevtoolsPanel=t;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":["SolidQueryDevtools","JSX","SolidQueryDevtoolsPanel","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel"],"sources":["../src/devtools.tsx","../src/devtoolsPanel.tsx","../src/index.tsx"],"mappings":";;;UAWU;;;;EAIR;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;;;;;;;iBAScA,qBAAmB,OAAO,qCAAe,IAAA;;;;UCrDhD;;;;EAIf,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;;;;EAQlB,QAAQC,MAAI;;;;EAKZ;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQcC,0BAAwB,OAAO,uBAAoBD,MAAA;qBCrD9D,2BAA2BE;qBAM3B,gCAAgCC"}
1
+ {"version":3,"file":"index.d.cts","names":["SolidQueryDevtools","JSX","SolidQueryDevtoolsPanel","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel"],"sources":["../src/devtools.tsx","../src/devtoolsPanel.tsx","../src/index.tsx"],"mappings":";;;UAWU;;;;EAIR;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;;;;;;;iBAScA,qBAAmB,OAAO,qCAAe,IAAA;;;;UCrDhD;;;;EAIf,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;;;;EAQlB,QAAQC,MAAI;;;;EAKZ;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQcC,0BAAwB,OAAO,uBAAoBD,MAAA;qBCvD9D,2BAA2BE;qBAO3B,gCAAgCC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["SolidQueryDevtools","JSX","SolidQueryDevtoolsPanel","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel"],"sources":["../src/devtools.tsx","../src/devtoolsPanel.tsx","../src/index.tsx"],"mappings":";;;UAWU;;;;EAIR;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;;;;;;;iBAScA,qBAAmB,OAAO,qCAAe,IAAA;;;;UCrDhD;;;;EAIf,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;;;;EAQlB,QAAQC,MAAI;;;;EAKZ;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQcC,0BAAwB,OAAO,uBAAoBD,MAAA;qBCrD9D,2BAA2BE;qBAM3B,gCAAgCC"}
1
+ {"version":3,"file":"index.d.ts","names":["SolidQueryDevtools","JSX","SolidQueryDevtoolsPanel","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel"],"sources":["../src/devtools.tsx","../src/devtoolsPanel.tsx","../src/index.tsx"],"mappings":";;;UAWU;;;;EAIR;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;;;;;;;iBAScA,qBAAmB,OAAO,qCAAe,IAAA;;;;UCrDhD;;;;EAIf,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;;;;EAQlB,QAAQC,MAAI;;;;EAKZ;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQcC,0BAAwB,OAAO,uBAAoBD,MAAA;qBCvD9D,2BAA2BE;qBAO3B,gCAAgCC"}
package/build/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{isDev as e,isServer as t}from"solid-js/web";import{createMemo as n,createSignal as r,onMount as i,sharedConfig as a,splitProps as o,untrack as s}from"solid-js";function c(e){if(t)return e=>e.fallback;let[c,l]=r();return e().then(e=>l(()=>e.default)),e=>{let t,l,[,u]=o(e,[`fallback`]);if((t=c())&&!a.context)return t(u);let[d,f]=r(!a.context);return i(()=>f(!0)),n(()=>(t=c(),l=d(),s(()=>t&&l?t(u):e.fallback)))}}const l=e?c(()=>import(`./devtools-DWG-IwnT.js`)):function(){return null},u=e?c(()=>import(`./devtoolsPanel-CCK9Gxsx.js`)):function(){return null};export{l as SolidQueryDevtools,u as SolidQueryDevtoolsPanel};
1
+ const e=function(){return null},t=function(){return null};export{e as SolidQueryDevtools,t as SolidQueryDevtoolsPanel};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createMemo","createSignal","onMount","sharedConfig","splitProps","untrack","isServer","Component","ComponentProps","JSX","clientOnly","fn","Promise","default","T","props","fallback","Element","comp","setComp","then","m","Comp","rest","context","mounted","setMounted","isDev","clientOnly","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel","SolidQueryDevtools","SolidQueryDevtoolsPanel","DevtoolsPanelOptions","clientOnly","isServer","props","comp","setComp","createSignal","fn","m","Comp","rest","splitProps","sharedConfig","mounted","setMounted","onMount","createMemo","untrack","SolidQueryDevtools","isDev","SolidQueryDevtoolsPanel"],"sources":["../src/clientOnly.tsx","../src/index.tsx"],"sourcesContent":["import {\n createMemo,\n createSignal,\n onMount,\n sharedConfig,\n splitProps,\n untrack,\n} from 'solid-js'\nimport { isServer } from 'solid-js/web'\nimport type { Component, ComponentProps, JSX } from 'solid-js'\n\n/**\n * This function has been taken from solid-start's codebase:\n * <https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx>.\n * This allows the devtools to be loaded only on the client and bypasses any server side rendering.\n * @param fn - Imports the module whose default export is the component.\n * @returns A component that renders `fallback` on the server and while the module loads on the\n * client, then the imported component.\n */\nexport default function clientOnly<T extends Component<any>>(\n fn: () => Promise<{\n default: T\n }>,\n) {\n if (isServer)\n return (props: ComponentProps<T> & { fallback?: JSX.Element }) =>\n props.fallback\n\n const [comp, setComp] = createSignal<T>()\n fn().then((m) => setComp(() => m.default))\n return (props: ComponentProps<T>) => {\n let Comp: T | undefined\n let m: boolean\n const [, rest] = splitProps(props, ['fallback'])\n if ((Comp = comp()) && !sharedConfig.context) return Comp(rest)\n const [mounted, setMounted] = createSignal(!sharedConfig.context)\n onMount(() => setMounted(true))\n return createMemo(\n () => (\n (Comp = comp()),\n (m = mounted()),\n untrack(() => (Comp && m ? Comp(rest) : props.fallback))\n ),\n )\n }\n}\n","import { isDev } from 'solid-js/web'\nimport clientOnly from './clientOnly'\nimport type SolidQueryDevtoolsComp from './devtools'\nimport type SolidQueryDevtoolsCompPanel from './devtoolsPanel'\n\nexport const SolidQueryDevtools: typeof SolidQueryDevtoolsComp = isDev\n ? clientOnly(() => import('./devtools'))\n : function () {\n return null\n }\n\nexport const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsCompPanel = isDev\n ? clientOnly(() => import('./devtoolsPanel'))\n : function () {\n return null\n }\n\nexport type { DevtoolsPanelOptions } from './devtoolsPanel'\n"],"mappings":"A,uKAmBA,SAAwBU,EACtBC,EAGA,CACA,GAAIL,EACF,MAAQS,IACNA,EAAMC,SAEV,GAAM,CAACE,EAAMC,GAAWlB,EAAgB,EAExC,OADAU,EAAG,CAAC,CAACS,KAAMC,GAAMF,MAAcE,EAAER,OAAO,CAAC,EACjCE,GAA6B,CACnC,IAAIO,EACAD,EACE,EAAGE,GAAQnB,EAAWW,EAAO,CAAC,UAAU,CAAC,EAC/C,IAAKO,EAAOJ,EAAK,IAAM,CAACf,EAAaqB,QAAS,OAAOF,EAAKC,CAAI,EAC9D,GAAM,CAACE,EAASC,GAAczB,EAAa,CAACE,EAAaqB,OAAO,EAEhE,OADAtB,MAAcwB,EAAW,EAAI,CAAC,EACvB1B,OAEFsB,EAAOJ,EAAK,EACZG,EAAII,EAAQ,EACbpB,MAAeiB,GAAQD,EAAIC,EAAKC,CAAI,EAAIR,EAAMC,QAAS,EAE3D,CACF,CACF,CCxCA,MAAae,EAAoDJ,EAC7DC,MAAiB,OAAO,yBAAa,EACrC,UAAY,CACV,OAAO,IACT,EAESI,EAA8DL,EACvEC,MAAiB,OAAO,8BAAkB,EAC1C,UAAY,CACV,OAAO,IACT,E"}
1
+ {"version":3,"file":"index.js","names":["SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel","SolidQueryDevtools","process","env","NODE_ENV","SolidQueryDevtoolsPanel","DevtoolsPanelOptions","SolidQueryDevtools","SolidQueryDevtoolsPanel"],"sources":["../src/index.tsx"],"sourcesContent":["import SolidQueryDevtoolsComp from './devtools'\nimport SolidQueryDevtoolsCompPanel from './devtoolsPanel'\n\nexport const SolidQueryDevtools: typeof SolidQueryDevtoolsComp =\n process.env.NODE_ENV !== 'development'\n ? function () {\n return null\n }\n : SolidQueryDevtoolsComp\n\nexport const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsCompPanel =\n process.env.NODE_ENV !== 'development'\n ? function () {\n return null\n }\n : SolidQueryDevtoolsCompPanel\n\nexport type { DevtoolsPanelOptions } from './devtoolsPanel'\n"],"mappings":"AAGA,MAAaE,EAEP,UAAY,CACV,OAAO,IACT,EAGOI,EAEP,UAAY,CACV,OAAO,IACT,E"}
package/build/index.jsx CHANGED
@@ -1,33 +1,8 @@
1
- import { isDev, isServer } from "solid-js/web";
2
- import { createMemo, createSignal, onMount, sharedConfig, splitProps, untrack } from "solid-js";
3
- // src/clientOnly.tsx
4
- /**
5
- * This function has been taken from solid-start's codebase:
6
- * <https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx>.
7
- * This allows the devtools to be loaded only on the client and bypasses any server side rendering.
8
- * @param fn - Imports the module whose default export is the component.
9
- * @returns A component that renders `fallback` on the server and while the module loads on the
10
- * client, then the imported component.
11
- */
12
- function clientOnly(fn) {
13
- if (isServer) return (props) => props.fallback;
14
- const [comp, setComp] = createSignal();
15
- fn().then((m) => setComp(() => m.default));
16
- return (props) => {
17
- let Comp;
18
- let m;
19
- const [, rest] = splitProps(props, ["fallback"]);
20
- if ((Comp = comp()) && !sharedConfig.context) return Comp(rest);
21
- const [mounted, setMounted] = createSignal(!sharedConfig.context);
22
- onMount(() => setMounted(true));
23
- return createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
24
- };
25
- }
26
1
  // src/index.tsx
27
- const SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools-COkRtz4W.jsx")) : function() {
2
+ const SolidQueryDevtools = function() {
28
3
  return null;
29
4
  };
30
- const SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel-BnT0jwWW.jsx")) : function() {
5
+ const SolidQueryDevtoolsPanel = function() {
31
6
  return null;
32
7
  };
33
8
  export { SolidQueryDevtools, SolidQueryDevtoolsPanel };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/solid-query-devtools",
3
- "version": "5.106.0",
3
+ "version": "5.106.1",
4
4
  "description": "Developer tools to interact with and visualize the TanStack/solid-query Query cache",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -38,17 +38,18 @@
38
38
  },
39
39
  "require": "./build/index.cjs"
40
40
  },
41
+ "sideEffects": false,
41
42
  "files": [
42
43
  "build",
43
44
  "src",
44
45
  "!src/__tests__"
45
46
  ],
46
47
  "dependencies": {
47
- "@tanstack/query-devtools": "5.106.0"
48
+ "@tanstack/query-devtools": "5.106.1"
48
49
  },
49
50
  "devDependencies": {
50
51
  "@solidjs/testing-library": "^0.8.10",
51
- "@tanstack/solid-query": "5.106.0",
52
+ "@tanstack/solid-query": "5.106.1",
52
53
  "eslint-plugin-solid": "^0.18.1",
53
54
  "solid-js": "^1.9.18",
54
55
  "typescript": "6.0.3",
@@ -56,7 +57,7 @@
56
57
  "vite-plugin-solid": "^2.11.15"
57
58
  },
58
59
  "peerDependencies": {
59
- "@tanstack/solid-query": "^5.106.0",
60
+ "@tanstack/solid-query": "^5.106.1",
60
61
  "solid-js": "^1.6.0"
61
62
  },
62
63
  "scripts": {
package/src/index.tsx CHANGED
@@ -1,18 +1,18 @@
1
- import { isDev } from 'solid-js/web'
2
- import clientOnly from './clientOnly'
3
- import type SolidQueryDevtoolsComp from './devtools'
4
- import type SolidQueryDevtoolsCompPanel from './devtoolsPanel'
1
+ import SolidQueryDevtoolsComp from './devtools'
2
+ import SolidQueryDevtoolsCompPanel from './devtoolsPanel'
5
3
 
6
- export const SolidQueryDevtools: typeof SolidQueryDevtoolsComp = isDev
7
- ? clientOnly(() => import('./devtools'))
8
- : function () {
9
- return null
10
- }
4
+ export const SolidQueryDevtools: typeof SolidQueryDevtoolsComp =
5
+ process.env.NODE_ENV !== 'development'
6
+ ? function () {
7
+ return null
8
+ }
9
+ : SolidQueryDevtoolsComp
11
10
 
12
- export const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsCompPanel = isDev
13
- ? clientOnly(() => import('./devtoolsPanel'))
14
- : function () {
15
- return null
16
- }
11
+ export const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsCompPanel =
12
+ process.env.NODE_ENV !== 'development'
13
+ ? function () {
14
+ return null
15
+ }
16
+ : SolidQueryDevtoolsCompPanel
17
17
 
18
18
  export type { DevtoolsPanelOptions } from './devtoolsPanel'
@@ -1,62 +0,0 @@
1
- let solid_js_web = require("solid-js/web");
2
- let solid_js = require("solid-js");
3
- let _tanstack_solid_query = require("@tanstack/solid-query");
4
- let _tanstack_query_devtools = require("@tanstack/query-devtools");
5
- // src/devtools.tsx
6
- var _tmpl$ = /*#__PURE__*/ (0, solid_js_web.template)(`<div class=tsqd-parent-container>`);
7
- /**
8
- * Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
9
- * nearest `QueryClient`.
10
- * @param props - The devtools options.
11
- * @returns The element the devtools are mounted in.
12
- */
13
- function SolidQueryDevtools(props) {
14
- const queryClient = (0, _tanstack_solid_query.useQueryClient)(props.client);
15
- const client = (0, solid_js.createMemo)(() => queryClient);
16
- let ref;
17
- const devtools = new _tanstack_query_devtools.TanstackQueryDevtools({
18
- client: client(),
19
- queryFlavor: "Solid Query",
20
- version: "5",
21
- onlineManager: _tanstack_solid_query.onlineManager,
22
- buttonPosition: props.buttonPosition,
23
- position: props.position,
24
- initialIsOpen: props.initialIsOpen,
25
- errorTypes: props.errorTypes,
26
- styleNonce: props.styleNonce,
27
- shadowDOMTarget: props.shadowDOMTarget,
28
- hideDisabledQueries: props.hideDisabledQueries,
29
- theme: props.theme
30
- });
31
- (0, solid_js.createEffect)(() => {
32
- devtools.setClient(client());
33
- });
34
- (0, solid_js.createEffect)(() => {
35
- const buttonPos = props.buttonPosition;
36
- if (buttonPos) devtools.setButtonPosition(buttonPos);
37
- });
38
- (0, solid_js.createEffect)(() => {
39
- const pos = props.position;
40
- if (pos) devtools.setPosition(pos);
41
- });
42
- (0, solid_js.createEffect)(() => {
43
- devtools.setInitialIsOpen(props.initialIsOpen || false);
44
- });
45
- (0, solid_js.createEffect)(() => {
46
- devtools.setErrorTypes(props.errorTypes || []);
47
- });
48
- (0, solid_js.createEffect)(() => {
49
- devtools.setTheme(props.theme);
50
- });
51
- (0, solid_js.onMount)(() => {
52
- devtools.mount(ref);
53
- (0, solid_js.onCleanup)(() => devtools.unmount());
54
- });
55
- return (() => {
56
- var _el$ = _tmpl$();
57
- var _ref$ = ref;
58
- typeof _ref$ === "function" ? (0, solid_js_web.use)(_ref$, _el$) : ref = _el$;
59
- return _el$;
60
- })();
61
- }
62
- exports.default = SolidQueryDevtools;
@@ -1,55 +0,0 @@
1
- import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
2
- import { onlineManager, useQueryClient } from "@tanstack/solid-query";
3
- import { TanstackQueryDevtools } from "@tanstack/query-devtools";
4
- // src/devtools.tsx
5
- /**
6
- * Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
7
- * nearest `QueryClient`.
8
- * @param props - The devtools options.
9
- * @returns The element the devtools are mounted in.
10
- */
11
- function SolidQueryDevtools(props) {
12
- const queryClient = useQueryClient(props.client);
13
- const client = createMemo(() => queryClient);
14
- let ref;
15
- const devtools = new TanstackQueryDevtools({
16
- client: client(),
17
- queryFlavor: "Solid Query",
18
- version: "5",
19
- onlineManager,
20
- buttonPosition: props.buttonPosition,
21
- position: props.position,
22
- initialIsOpen: props.initialIsOpen,
23
- errorTypes: props.errorTypes,
24
- styleNonce: props.styleNonce,
25
- shadowDOMTarget: props.shadowDOMTarget,
26
- hideDisabledQueries: props.hideDisabledQueries,
27
- theme: props.theme
28
- });
29
- createEffect(() => {
30
- devtools.setClient(client());
31
- });
32
- createEffect(() => {
33
- const buttonPos = props.buttonPosition;
34
- if (buttonPos) devtools.setButtonPosition(buttonPos);
35
- });
36
- createEffect(() => {
37
- const pos = props.position;
38
- if (pos) devtools.setPosition(pos);
39
- });
40
- createEffect(() => {
41
- devtools.setInitialIsOpen(props.initialIsOpen || false);
42
- });
43
- createEffect(() => {
44
- devtools.setErrorTypes(props.errorTypes || []);
45
- });
46
- createEffect(() => {
47
- devtools.setTheme(props.theme);
48
- });
49
- onMount(() => {
50
- devtools.mount(ref);
51
- onCleanup(() => devtools.unmount());
52
- });
53
- return <div class="tsqd-parent-container" ref={ref} />;
54
- }
55
- export { SolidQueryDevtools as default };
@@ -1 +0,0 @@
1
- let e=require("solid-js/web"),t=require("solid-js"),n=require("@tanstack/solid-query"),r=require("@tanstack/query-devtools");var i=/*#__PURE__*/ (0,e.template)(`<div class=tsqd-parent-container>`);function a(a){let o=(0,n.useQueryClient)(a.client),s=(0,t.createMemo)(()=>o),c,l=new r.TanstackQueryDevtools({client:s(),queryFlavor:`Solid Query`,version:`5`,onlineManager:n.onlineManager,buttonPosition:a.buttonPosition,position:a.position,initialIsOpen:a.initialIsOpen,errorTypes:a.errorTypes,styleNonce:a.styleNonce,shadowDOMTarget:a.shadowDOMTarget,hideDisabledQueries:a.hideDisabledQueries,theme:a.theme});return(0,t.createEffect)(()=>{l.setClient(s())}),(0,t.createEffect)(()=>{let e=a.buttonPosition;e&&l.setButtonPosition(e)}),(0,t.createEffect)(()=>{let e=a.position;e&&l.setPosition(e)}),(0,t.createEffect)(()=>{l.setInitialIsOpen(a.initialIsOpen||!1)}),(0,t.createEffect)(()=>{l.setErrorTypes(a.errorTypes||[])}),(0,t.createEffect)(()=>{l.setTheme(a.theme)}),(0,t.onMount)(()=>{l.mount(c),(0,t.onCleanup)(()=>l.unmount())}),(()=>{var t=i(),n=c;return typeof n==`function`?(0,e.use)(n,t):c=t,t})()}exports.default=a;
@@ -1,62 +0,0 @@
1
- import { template, use } from "solid-js/web";
2
- import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
3
- import { onlineManager, useQueryClient } from "@tanstack/solid-query";
4
- import { TanstackQueryDevtools } from "@tanstack/query-devtools";
5
- // src/devtools.tsx
6
- var _tmpl$ = /*#__PURE__*/ template(`<div class=tsqd-parent-container>`);
7
- /**
8
- * Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
9
- * nearest `QueryClient`.
10
- * @param props - The devtools options.
11
- * @returns The element the devtools are mounted in.
12
- */
13
- function SolidQueryDevtools(props) {
14
- const queryClient = useQueryClient(props.client);
15
- const client = createMemo(() => queryClient);
16
- let ref;
17
- const devtools = new TanstackQueryDevtools({
18
- client: client(),
19
- queryFlavor: "Solid Query",
20
- version: "5",
21
- onlineManager,
22
- buttonPosition: props.buttonPosition,
23
- position: props.position,
24
- initialIsOpen: props.initialIsOpen,
25
- errorTypes: props.errorTypes,
26
- styleNonce: props.styleNonce,
27
- shadowDOMTarget: props.shadowDOMTarget,
28
- hideDisabledQueries: props.hideDisabledQueries,
29
- theme: props.theme
30
- });
31
- createEffect(() => {
32
- devtools.setClient(client());
33
- });
34
- createEffect(() => {
35
- const buttonPos = props.buttonPosition;
36
- if (buttonPos) devtools.setButtonPosition(buttonPos);
37
- });
38
- createEffect(() => {
39
- const pos = props.position;
40
- if (pos) devtools.setPosition(pos);
41
- });
42
- createEffect(() => {
43
- devtools.setInitialIsOpen(props.initialIsOpen || false);
44
- });
45
- createEffect(() => {
46
- devtools.setErrorTypes(props.errorTypes || []);
47
- });
48
- createEffect(() => {
49
- devtools.setTheme(props.theme);
50
- });
51
- onMount(() => {
52
- devtools.mount(ref);
53
- onCleanup(() => devtools.unmount());
54
- });
55
- return (() => {
56
- var _el$ = _tmpl$();
57
- var _ref$ = ref;
58
- typeof _ref$ === "function" ? use(_ref$, _el$) : ref = _el$;
59
- return _el$;
60
- })();
61
- }
62
- export { SolidQueryDevtools as default };
@@ -1,2 +0,0 @@
1
- import{template as e,use as t}from"solid-js/web";import{createEffect as n,createMemo as r,onCleanup as i,onMount as a}from"solid-js";import{onlineManager as o,useQueryClient as s}from"@tanstack/solid-query";import{TanstackQueryDevtools as c}from"@tanstack/query-devtools";var l=/*#__PURE__*/ e(`<div class=tsqd-parent-container>`);function u(e){let u=s(e.client),d=r(()=>u),f,p=new c({client:d(),queryFlavor:`Solid Query`,version:`5`,onlineManager:o,buttonPosition:e.buttonPosition,position:e.position,initialIsOpen:e.initialIsOpen,errorTypes:e.errorTypes,styleNonce:e.styleNonce,shadowDOMTarget:e.shadowDOMTarget,hideDisabledQueries:e.hideDisabledQueries,theme:e.theme});return n(()=>{p.setClient(d())}),n(()=>{let t=e.buttonPosition;t&&p.setButtonPosition(t)}),n(()=>{let t=e.position;t&&p.setPosition(t)}),n(()=>{p.setInitialIsOpen(e.initialIsOpen||!1)}),n(()=>{p.setErrorTypes(e.errorTypes||[])}),n(()=>{p.setTheme(e.theme)}),a(()=>{p.mount(f),i(()=>p.unmount())}),(()=>{var e=l(),n=f;return typeof n==`function`?t(n,e):f=e,e})()}export{u as default};
2
- //# sourceMappingURL=devtools-DWG-IwnT.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"devtools-DWG-IwnT.js","names":["createEffect","createMemo","onCleanup","onMount","onlineManager","useQueryClient","TanstackQueryDevtools","DevtoolsButtonPosition","DevtoolsErrorType","DevtoolsPosition","Theme","QueryClient","DevtoolsOptions","initialIsOpen","buttonPosition","position","client","errorTypes","Array","styleNonce","shadowDOMTarget","ShadowRoot","hideDisabledQueries","theme","SolidQueryDevtools","props","queryClient","ref","HTMLDivElement","devtools","queryFlavor","version","setClient","buttonPos","setButtonPosition","pos","setPosition","setInitialIsOpen","setErrorTypes","setTheme","mount","unmount","_el$","_tmpl$","_ref$","_$use","_$use","_tmpl$","SolidQueryDevtools","queryClient","useQueryClient","props","client","createMemo","ref","devtools","TanstackQueryDevtools","createEffect","buttonPos","pos","onMount","onCleanup","_el$","_ref$","use"],"sources":["../src/devtools.tsx"],"sourcesContent":["import { createEffect, createMemo, onCleanup, onMount } from 'solid-js'\nimport { onlineManager, useQueryClient } from '@tanstack/solid-query'\nimport { TanstackQueryDevtools } from '@tanstack/query-devtools'\nimport type {\n DevtoolsButtonPosition,\n DevtoolsErrorType,\n DevtoolsPosition,\n Theme,\n} from '@tanstack/query-devtools'\nimport type { QueryClient } from '@tanstack/solid-query'\n\ninterface DevtoolsOptions {\n /**\n * Set this true if you want the dev tools to default to being open\n */\n initialIsOpen?: boolean\n /**\n * The position of the TanStack logo to open and close the devtools panel.\n * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'\n * @defaultValue bottom-right\n */\n buttonPosition?: DevtoolsButtonPosition\n /**\n * The position of the Solid Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\n * @defaultValue bottom\n */\n position?: DevtoolsPosition\n /**\n * Custom instance of QueryClient\n */\n client?: QueryClient\n /**\n * Use this so you can define custom errors that can be shown in the devtools.\n */\n errorTypes?: Array<DevtoolsErrorType>\n /**\n * Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.\n */\n styleNonce?: string\n /**\n * Use this to pass a shadow DOM target to the devtools so that the styles will be applied\n * within the shadow DOM instead of within the head tag in the light DOM.\n */\n shadowDOMTarget?: ShadowRoot\n /**\n * Set this to true to hide disabled queries from the devtools panel.\n */\n hideDisabledQueries?: boolean\n /**\n * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.\n * This overrides the theme selected in the devtools Settings menu. When omitted, the\n * selected theme is used, or `'system'` if none is selected.\n */\n theme?: Theme\n}\n\n/**\n * Renders the TanStack Query devtools, with a toggle button that opens them, for the given or\n * nearest `QueryClient`.\n * @param props - The devtools options.\n * @returns The element the devtools are mounted in.\n */\nexport default function SolidQueryDevtools(props: DevtoolsOptions) {\n const queryClient = useQueryClient(props.client)\n const client = createMemo(() => queryClient)\n let ref!: HTMLDivElement\n const devtools = new TanstackQueryDevtools({\n client: client(),\n queryFlavor: 'Solid Query',\n version: '5',\n onlineManager,\n buttonPosition: props.buttonPosition,\n position: props.position,\n initialIsOpen: props.initialIsOpen,\n errorTypes: props.errorTypes,\n styleNonce: props.styleNonce,\n shadowDOMTarget: props.shadowDOMTarget,\n hideDisabledQueries: props.hideDisabledQueries,\n theme: props.theme,\n })\n\n createEffect(() => {\n devtools.setClient(client())\n })\n\n createEffect(() => {\n const buttonPos = props.buttonPosition\n if (buttonPos) {\n devtools.setButtonPosition(buttonPos)\n }\n })\n\n createEffect(() => {\n const pos = props.position\n if (pos) {\n devtools.setPosition(pos)\n }\n })\n\n createEffect(() => {\n devtools.setInitialIsOpen(props.initialIsOpen || false)\n })\n\n createEffect(() => {\n devtools.setErrorTypes(props.errorTypes || [])\n })\n\n createEffect(() => {\n devtools.setTheme(props.theme)\n })\n\n onMount(() => {\n devtools.mount(ref)\n onCleanup(() => devtools.unmount())\n })\n\n return <div class=\"tsqd-parent-container\" ref={ref} />\n}\n"],"mappings":"A,2UA+DA,SAAwBwB,EAAmBC,EAAwB,CACjE,IAAMC,EAAcrB,EAAeoB,EAAMT,MAAM,EACzCA,EAASf,MAAiByB,CAAW,EACvCC,EACEE,EAAW,IAAIvB,EAAsB,CACzCU,OAAQA,EAAO,EACfc,YAAa,cACbC,QAAS,IACT3B,gBACAU,eAAgBW,EAAMX,eACtBC,SAAUU,EAAMV,SAChBF,cAAeY,EAAMZ,cACrBI,WAAYQ,EAAMR,WAClBE,WAAYM,EAAMN,WAClBC,gBAAiBK,EAAML,gBACvBE,oBAAqBG,EAAMH,oBAC3BC,MAAOE,EAAMF,KACf,CAAC,EAqCD,OAnCAvB,MAAmB,CACjB6B,EAASG,UAAUhB,EAAO,CAAC,CAC7B,CAAC,EAEDhB,MAAmB,CACjB,IAAMiC,EAAYR,EAAMX,eACpBmB,GACFJ,EAASK,kBAAkBD,CAAS,CAExC,CAAC,EAEDjC,MAAmB,CACjB,IAAMmC,EAAMV,EAAMV,SACdoB,GACFN,EAASO,YAAYD,CAAG,CAE5B,CAAC,EAEDnC,MAAmB,CACjB6B,EAASQ,iBAAiBZ,EAAMZ,eAAiB,EAAK,CACxD,CAAC,EAEDb,MAAmB,CACjB6B,EAASS,cAAcb,EAAMR,YAAc,CAAA,CAAE,CAC/C,CAAC,EAEDjB,MAAmB,CACjB6B,EAASU,SAASd,EAAMF,KAAK,CAC/B,CAAC,EAEDpB,MAAc,CACZ0B,EAASW,MAAMb,CAAG,EAClBzB,MAAgB2B,EAASY,QAAQ,CAAC,CACpC,CAAC,OAED,CAAA,IAAAC,EAAAC,EAAA,EAAAC,EAA+CjB,EAAG,OAAA,OAAAiB,GAAA,WAAAC,EAAAD,EAAAF,CAAA,EAAHf,EAAGe,EAAAA,CAAA,EAAA,CAAA,CACpD,C"}
@@ -1,56 +0,0 @@
1
- import { effect, style, template, use } from "solid-js/web";
2
- import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
3
- import { onlineManager, useQueryClient } from "@tanstack/solid-query";
4
- import { TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
5
- // src/devtoolsPanel.tsx
6
- var _tmpl$ = /*#__PURE__*/ template(`<div class=tsqd-parent-container style=height:100%;display:flex;flex-direction:column>`);
7
- /**
8
- * Renders the TanStack Query devtools panel inline, for the given or nearest `QueryClient`.
9
- * @param props - The devtools panel options.
10
- * @returns The element the devtools panel is mounted in.
11
- */
12
- function SolidQueryDevtoolsPanel(props) {
13
- const queryClient = useQueryClient(props.client);
14
- const client = createMemo(() => queryClient);
15
- let ref;
16
- const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props;
17
- const devtools = new TanstackQueryDevtoolsPanel({
18
- client: client(),
19
- queryFlavor: "Solid Query",
20
- version: "5",
21
- onlineManager,
22
- buttonPosition: "bottom-left",
23
- position: "bottom",
24
- initialIsOpen: true,
25
- errorTypes,
26
- styleNonce,
27
- shadowDOMTarget,
28
- onClose: props.onClose,
29
- hideDisabledQueries,
30
- theme: props.theme
31
- });
32
- createEffect(() => {
33
- devtools.setClient(client());
34
- });
35
- createEffect(() => {
36
- devtools.setOnClose(props.onClose ?? (() => {}));
37
- });
38
- createEffect(() => {
39
- devtools.setErrorTypes(props.errorTypes || []);
40
- });
41
- createEffect(() => {
42
- devtools.setTheme(props.theme);
43
- });
44
- onMount(() => {
45
- devtools.mount(ref);
46
- onCleanup(() => devtools.unmount());
47
- });
48
- return (() => {
49
- var _el$ = _tmpl$();
50
- var _ref$ = ref;
51
- typeof _ref$ === "function" ? use(_ref$, _el$) : ref = _el$;
52
- effect((_$p) => style(_el$, { ...props.style }, _$p));
53
- return _el$;
54
- })();
55
- }
56
- export { SolidQueryDevtoolsPanel as default };
@@ -1 +0,0 @@
1
- let e=require("solid-js/web"),t=require("solid-js"),n=require("@tanstack/solid-query"),r=require("@tanstack/query-devtools");var i=/*#__PURE__*/ (0,e.template)(`<div class=tsqd-parent-container style=height:100%;display:flex;flex-direction:column>`);function a(a){let o=(0,n.useQueryClient)(a.client),s=(0,t.createMemo)(()=>o),c,{errorTypes:l,styleNonce:u,shadowDOMTarget:d,hideDisabledQueries:f}=a,p=new r.TanstackQueryDevtoolsPanel({client:s(),queryFlavor:`Solid Query`,version:`5`,onlineManager:n.onlineManager,buttonPosition:`bottom-left`,position:`bottom`,initialIsOpen:!0,errorTypes:l,styleNonce:u,shadowDOMTarget:d,onClose:a.onClose,hideDisabledQueries:f,theme:a.theme});return(0,t.createEffect)(()=>{p.setClient(s())}),(0,t.createEffect)(()=>{p.setOnClose(a.onClose??(()=>{}))}),(0,t.createEffect)(()=>{p.setErrorTypes(a.errorTypes||[])}),(0,t.createEffect)(()=>{p.setTheme(a.theme)}),(0,t.onMount)(()=>{p.mount(c),(0,t.onCleanup)(()=>p.unmount())}),(()=>{var t=i(),n=c;return typeof n==`function`?(0,e.use)(n,t):c=t,(0,e.effect)(n=>(0,e.style)(t,{...a.style},n)),t})()}exports.default=a;
@@ -1,53 +0,0 @@
1
- import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
2
- import { onlineManager, useQueryClient } from "@tanstack/solid-query";
3
- import { TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
4
- // src/devtoolsPanel.tsx
5
- /**
6
- * Renders the TanStack Query devtools panel inline, for the given or nearest `QueryClient`.
7
- * @param props - The devtools panel options.
8
- * @returns The element the devtools panel is mounted in.
9
- */
10
- function SolidQueryDevtoolsPanel(props) {
11
- const queryClient = useQueryClient(props.client);
12
- const client = createMemo(() => queryClient);
13
- let ref;
14
- const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props;
15
- const devtools = new TanstackQueryDevtoolsPanel({
16
- client: client(),
17
- queryFlavor: "Solid Query",
18
- version: "5",
19
- onlineManager,
20
- buttonPosition: "bottom-left",
21
- position: "bottom",
22
- initialIsOpen: true,
23
- errorTypes,
24
- styleNonce,
25
- shadowDOMTarget,
26
- onClose: props.onClose,
27
- hideDisabledQueries,
28
- theme: props.theme
29
- });
30
- createEffect(() => {
31
- devtools.setClient(client());
32
- });
33
- createEffect(() => {
34
- devtools.setOnClose(props.onClose ?? (() => {}));
35
- });
36
- createEffect(() => {
37
- devtools.setErrorTypes(props.errorTypes || []);
38
- });
39
- createEffect(() => {
40
- devtools.setTheme(props.theme);
41
- });
42
- onMount(() => {
43
- devtools.mount(ref);
44
- onCleanup(() => devtools.unmount());
45
- });
46
- return <div style={{
47
- height: "100%",
48
- display: "flex",
49
- "flex-direction": "column",
50
- ...props.style
51
- }} class="tsqd-parent-container" ref={ref} />;
52
- }
53
- export { SolidQueryDevtoolsPanel as default };
@@ -1,56 +0,0 @@
1
- let solid_js_web = require("solid-js/web");
2
- let solid_js = require("solid-js");
3
- let _tanstack_solid_query = require("@tanstack/solid-query");
4
- let _tanstack_query_devtools = require("@tanstack/query-devtools");
5
- // src/devtoolsPanel.tsx
6
- var _tmpl$ = /*#__PURE__*/ (0, solid_js_web.template)(`<div class=tsqd-parent-container style=height:100%;display:flex;flex-direction:column>`);
7
- /**
8
- * Renders the TanStack Query devtools panel inline, for the given or nearest `QueryClient`.
9
- * @param props - The devtools panel options.
10
- * @returns The element the devtools panel is mounted in.
11
- */
12
- function SolidQueryDevtoolsPanel(props) {
13
- const queryClient = (0, _tanstack_solid_query.useQueryClient)(props.client);
14
- const client = (0, solid_js.createMemo)(() => queryClient);
15
- let ref;
16
- const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props;
17
- const devtools = new _tanstack_query_devtools.TanstackQueryDevtoolsPanel({
18
- client: client(),
19
- queryFlavor: "Solid Query",
20
- version: "5",
21
- onlineManager: _tanstack_solid_query.onlineManager,
22
- buttonPosition: "bottom-left",
23
- position: "bottom",
24
- initialIsOpen: true,
25
- errorTypes,
26
- styleNonce,
27
- shadowDOMTarget,
28
- onClose: props.onClose,
29
- hideDisabledQueries,
30
- theme: props.theme
31
- });
32
- (0, solid_js.createEffect)(() => {
33
- devtools.setClient(client());
34
- });
35
- (0, solid_js.createEffect)(() => {
36
- devtools.setOnClose(props.onClose ?? (() => {}));
37
- });
38
- (0, solid_js.createEffect)(() => {
39
- devtools.setErrorTypes(props.errorTypes || []);
40
- });
41
- (0, solid_js.createEffect)(() => {
42
- devtools.setTheme(props.theme);
43
- });
44
- (0, solid_js.onMount)(() => {
45
- devtools.mount(ref);
46
- (0, solid_js.onCleanup)(() => devtools.unmount());
47
- });
48
- return (() => {
49
- var _el$ = _tmpl$();
50
- var _ref$ = ref;
51
- typeof _ref$ === "function" ? (0, solid_js_web.use)(_ref$, _el$) : ref = _el$;
52
- (0, solid_js_web.effect)((_$p) => (0, solid_js_web.style)(_el$, { ...props.style }, _$p));
53
- return _el$;
54
- })();
55
- }
56
- exports.default = SolidQueryDevtoolsPanel;
@@ -1,2 +0,0 @@
1
- import{effect as e,style as t,template as n,use as r}from"solid-js/web";import{createEffect as i,createMemo as a,onCleanup as o,onMount as s}from"solid-js";import{onlineManager as c,useQueryClient as l}from"@tanstack/solid-query";import{TanstackQueryDevtoolsPanel as u}from"@tanstack/query-devtools";var d=/*#__PURE__*/ n(`<div class=tsqd-parent-container style=height:100%;display:flex;flex-direction:column>`);function f(n){let f=l(n.client),p=a(()=>f),m,{errorTypes:h,styleNonce:g,shadowDOMTarget:_,hideDisabledQueries:v}=n,y=new u({client:p(),queryFlavor:`Solid Query`,version:`5`,onlineManager:c,buttonPosition:`bottom-left`,position:`bottom`,initialIsOpen:!0,errorTypes:h,styleNonce:g,shadowDOMTarget:_,onClose:n.onClose,hideDisabledQueries:v,theme:n.theme});return i(()=>{y.setClient(p())}),i(()=>{y.setOnClose(n.onClose??(()=>{}))}),i(()=>{y.setErrorTypes(n.errorTypes||[])}),i(()=>{y.setTheme(n.theme)}),s(()=>{y.mount(m),o(()=>y.unmount())}),(()=>{var i=d(),a=m;return typeof a==`function`?r(a,i):m=i,e(e=>t(i,{...n.style},e)),i})()}export{f as default};
2
- //# sourceMappingURL=devtoolsPanel-CCK9Gxsx.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"devtoolsPanel-CCK9Gxsx.js","names":["createEffect","createMemo","onCleanup","onMount","onlineManager","useQueryClient","TanstackQueryDevtoolsPanel","DevtoolsErrorType","Theme","QueryClient","JSX","DevtoolsPanelOptions","client","errorTypes","Array","styleNonce","shadowDOMTarget","ShadowRoot","style","CSSProperties","onClose","hideDisabledQueries","theme","SolidQueryDevtoolsPanel","props","queryClient","ref","HTMLDivElement","devtools","queryFlavor","version","buttonPosition","position","initialIsOpen","setClient","setOnClose","setErrorTypes","setTheme","mount","unmount","_el$","_tmpl$","_ref$","_$use","_$effect","_$p","_$style","_$use","_$style","_tmpl$","SolidQueryDevtoolsPanel","queryClient","useQueryClient","props","client","createMemo","ref","devtools","TanstackQueryDevtoolsPanel","createEffect","onMount","onCleanup","_el$","_ref$","use","effect","style","_$p"],"sources":["../src/devtoolsPanel.tsx"],"sourcesContent":["import { createEffect, createMemo, onCleanup, onMount } from 'solid-js'\nimport { onlineManager, useQueryClient } from '@tanstack/solid-query'\nimport { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'\nimport type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'\nimport type { QueryClient } from '@tanstack/solid-query'\nimport type { JSX } from 'solid-js'\n\n/**\n * The props of `SolidQueryDevtoolsPanel`, which renders the devtools panel inline.\n */\nexport interface DevtoolsPanelOptions {\n /**\n * Custom instance of QueryClient\n */\n client?: QueryClient\n /**\n * Use this so you can define custom errors that can be shown in the devtools.\n */\n errorTypes?: Array<DevtoolsErrorType>\n /**\n * Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.\n */\n styleNonce?: string\n /**\n * Use this to pass a shadow DOM target to the devtools so that the styles will be applied\n * within the shadow DOM instead of within the head tag in the light DOM.\n */\n shadowDOMTarget?: ShadowRoot\n\n /**\n * Custom styles for the devtools panel\n * @default { height: '100%', display: 'flex', 'flex-direction': 'column' }\n * @example { height: '100%' }\n * @example { height: '100%', width: '100%' }\n */\n style?: JSX.CSSProperties\n\n /**\n * Callback function that is called when the devtools panel is closed\n */\n onClose?: () => void\n /**\n * Set this to true to hide disabled queries from the devtools panel.\n */\n hideDisabledQueries?: boolean\n /**\n * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.\n * This overrides the theme selected in the devtools Settings menu. When omitted, the\n * selected theme is used, or `'system'` if none is selected.\n */\n theme?: Theme\n}\n\n/**\n * Renders the TanStack Query devtools panel inline, for the given or nearest `QueryClient`.\n * @param props - The devtools panel options.\n * @returns The element the devtools panel is mounted in.\n */\nexport default function SolidQueryDevtoolsPanel(props: DevtoolsPanelOptions) {\n const queryClient = useQueryClient(props.client)\n const client = createMemo(() => queryClient)\n let ref!: HTMLDivElement\n const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props\n const devtools = new TanstackQueryDevtoolsPanel({\n client: client(),\n queryFlavor: 'Solid Query',\n version: '5',\n onlineManager,\n buttonPosition: 'bottom-left',\n position: 'bottom',\n initialIsOpen: true,\n errorTypes,\n styleNonce,\n shadowDOMTarget,\n onClose: props.onClose,\n hideDisabledQueries,\n theme: props.theme,\n })\n createEffect(() => {\n devtools.setClient(client())\n })\n createEffect(() => {\n devtools.setOnClose(props.onClose ?? (() => {}))\n })\n\n createEffect(() => {\n devtools.setErrorTypes(props.errorTypes || [])\n })\n\n createEffect(() => {\n devtools.setTheme(props.theme)\n })\n\n onMount(() => {\n devtools.mount(ref)\n onCleanup(() => devtools.unmount())\n })\n\n return (\n <div\n style={{\n height: '100%',\n display: 'flex',\n 'flex-direction': 'column',\n ...props.style,\n }}\n class=\"tsqd-parent-container\"\n ref={ref}\n />\n )\n}\n"],"mappings":"A,4ZA0DA,SAAwBuB,EAAwBC,EAA6B,CAC3E,IAAMC,EAAcpB,EAAemB,EAAMZ,MAAM,EACzCA,EAASX,MAAiBwB,CAAW,EACvCC,EACE,CAAEb,aAAYE,aAAYC,kBAAiBK,uBAAwBG,EACnEI,EAAW,IAAItB,EAA2B,CAC9CM,OAAQA,EAAO,EACfiB,YAAa,cACbC,QAAS,IACT1B,gBACA2B,eAAgB,cAChBC,SAAU,SACVC,cAAe,GACfpB,aACAE,aACAC,kBACAI,QAASI,EAAMJ,QACfC,sBACAC,MAAOE,EAAMF,KACf,CAAC,EAqBD,OApBAtB,MAAmB,CACjB4B,EAASM,UAAUtB,EAAO,CAAC,CAC7B,CAAC,EACDZ,MAAmB,CACjB4B,EAASO,WAAWX,EAAMJ,cAAkB,CAAC,EAAE,CACjD,CAAC,EAEDpB,MAAmB,CACjB4B,EAASQ,cAAcZ,EAAMX,YAAc,CAAA,CAAE,CAC/C,CAAC,EAEDb,MAAmB,CACjB4B,EAASS,SAASb,EAAMF,KAAK,CAC/B,CAAC,EAEDnB,MAAc,CACZyB,EAASU,MAAMZ,CAAG,EAClBxB,MAAgB0B,EAASW,QAAQ,CAAC,CACpC,CAAC,OAED,CAAA,IAAAC,EAAAC,EAAA,EAAAC,EASShB,EAFJ,OAEO,OAAAgB,GAAA,WAAAC,EAAAD,EAAAF,CAAA,EAAHd,EAAGc,EAAAI,EAAAC,GAAAC,EAAAN,EAPD,CAIL,GAAGhB,EAAMN,KACX,EAAC2B,CAAA,CAAA,EAAAL,CAAA,EAAA,CAAA,CAKP,C"}
@@ -1,46 +0,0 @@
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
- * <https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx>.
15
- * This allows the devtools to be loaded only on the client and bypasses any server side rendering.
16
- * @param fn - Imports the module whose default export is the component.
17
- * @returns A component that renders `fallback` on the server and while the module loads on the
18
- * client, then the imported component.
19
- */
20
- export default function clientOnly<T extends Component<any>>(
21
- fn: () => Promise<{
22
- default: T
23
- }>,
24
- ) {
25
- if (isServer)
26
- return (props: ComponentProps<T> & { fallback?: JSX.Element }) =>
27
- props.fallback
28
-
29
- const [comp, setComp] = createSignal<T>()
30
- fn().then((m) => setComp(() => m.default))
31
- return (props: ComponentProps<T>) => {
32
- let Comp: T | undefined
33
- let m: boolean
34
- const [, rest] = splitProps(props, ['fallback'])
35
- if ((Comp = comp()) && !sharedConfig.context) return Comp(rest)
36
- const [mounted, setMounted] = createSignal(!sharedConfig.context)
37
- onMount(() => setMounted(true))
38
- return createMemo(
39
- () => (
40
- (Comp = comp()),
41
- (m = mounted()),
42
- untrack(() => (Comp && m ? Comp(rest) : props.fallback))
43
- ),
44
- )
45
- }
46
- }