@tanstack/solid-query-devtools 5.91.2 → 6.0.0-alpha.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.
package/build/index.d.cts CHANGED
@@ -1,94 +1,3 @@
1
- import * as solid_js from 'solid-js';
2
- import { JSX } from 'solid-js';
3
- import { DevtoolsButtonPosition, DevtoolsPosition, DevtoolsErrorType, Theme } from '@tanstack/query-devtools';
4
- import { QueryClient } from '@tanstack/solid-query';
5
-
6
- interface DevtoolsOptions {
7
- /**
8
- * Set this true if you want the dev tools to default to being open
9
- */
10
- initialIsOpen?: boolean;
11
- /**
12
- * The position of the React Query logo to open and close the devtools panel.
13
- * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
14
- * Defaults to 'bottom-right'.
15
- */
16
- buttonPosition?: DevtoolsButtonPosition;
17
- /**
18
- * The position of the React Query devtools panel.
19
- * 'top' | 'bottom' | 'left' | 'right'
20
- * Defaults to 'bottom'.
21
- */
22
- position?: DevtoolsPosition;
23
- /**
24
- * Custom instance of QueryClient
25
- */
26
- client?: QueryClient;
27
- /**
28
- * Use this so you can define custom errors that can be shown in the devtools.
29
- */
30
- errorTypes?: Array<DevtoolsErrorType>;
31
- /**
32
- * 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.
33
- */
34
- styleNonce?: string;
35
- /**
36
- * Use this so you can attach the devtool's styles to specific element in the DOM.
37
- */
38
- shadowDOMTarget?: ShadowRoot;
39
- /**
40
- * Set this to true to hide disabled queries from the devtools panel.
41
- */
42
- hideDisabledQueries?: boolean;
43
- /**
44
- * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
45
- * Defaults to 'system'.
46
- */
47
- theme?: Theme;
48
- }
49
- declare function SolidQueryDevtools$1(props: DevtoolsOptions): solid_js.JSX.Element;
50
-
51
- interface DevtoolsPanelOptions {
52
- /**
53
- * Custom instance of QueryClient
54
- */
55
- client?: QueryClient;
56
- /**
57
- * Use this so you can define custom errors that can be shown in the devtools.
58
- */
59
- errorTypes?: Array<DevtoolsErrorType>;
60
- /**
61
- * 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.
62
- */
63
- styleNonce?: string;
64
- /**
65
- * Use this so you can attach the devtool's styles to specific element in the DOM.
66
- */
67
- shadowDOMTarget?: ShadowRoot;
68
- /**
69
- * Custom styles for the devtools panel
70
- * @default { height: '500px' }
71
- * @example { height: '100%' }
72
- * @example { height: '100%', width: '100%' }
73
- */
74
- style?: JSX.CSSProperties;
75
- /**
76
- * Callback function that is called when the devtools panel is closed
77
- */
78
- onClose?: () => unknown;
79
- /**
80
- * Set this to true to hide disabled queries from the devtools panel.
81
- */
82
- hideDisabledQueries?: boolean;
83
- /**
84
- * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
85
- * Defaults to 'system'.
86
- */
87
- theme?: Theme;
88
- }
89
- declare function SolidQueryDevtoolsPanel$1(props: DevtoolsPanelOptions): JSX.Element;
90
-
91
- declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
92
- declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
93
-
94
- export { type DevtoolsPanelOptions, SolidQueryDevtools, SolidQueryDevtoolsPanel };
1
+ export { SolidQueryDevtools } from './_tsup-dts-rollup.cjs';
2
+ export { SolidQueryDevtoolsPanel } from './_tsup-dts-rollup.cjs';
3
+ export { DevtoolsPanelOptions_alias_1 as DevtoolsPanelOptions } from './_tsup-dts-rollup.cjs';
package/build/index.d.ts CHANGED
@@ -1,94 +1,3 @@
1
- import * as solid_js from 'solid-js';
2
- import { JSX } from 'solid-js';
3
- import { DevtoolsButtonPosition, DevtoolsPosition, DevtoolsErrorType, Theme } from '@tanstack/query-devtools';
4
- import { QueryClient } from '@tanstack/solid-query';
5
-
6
- interface DevtoolsOptions {
7
- /**
8
- * Set this true if you want the dev tools to default to being open
9
- */
10
- initialIsOpen?: boolean;
11
- /**
12
- * The position of the React Query logo to open and close the devtools panel.
13
- * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
14
- * Defaults to 'bottom-right'.
15
- */
16
- buttonPosition?: DevtoolsButtonPosition;
17
- /**
18
- * The position of the React Query devtools panel.
19
- * 'top' | 'bottom' | 'left' | 'right'
20
- * Defaults to 'bottom'.
21
- */
22
- position?: DevtoolsPosition;
23
- /**
24
- * Custom instance of QueryClient
25
- */
26
- client?: QueryClient;
27
- /**
28
- * Use this so you can define custom errors that can be shown in the devtools.
29
- */
30
- errorTypes?: Array<DevtoolsErrorType>;
31
- /**
32
- * 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.
33
- */
34
- styleNonce?: string;
35
- /**
36
- * Use this so you can attach the devtool's styles to specific element in the DOM.
37
- */
38
- shadowDOMTarget?: ShadowRoot;
39
- /**
40
- * Set this to true to hide disabled queries from the devtools panel.
41
- */
42
- hideDisabledQueries?: boolean;
43
- /**
44
- * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
45
- * Defaults to 'system'.
46
- */
47
- theme?: Theme;
48
- }
49
- declare function SolidQueryDevtools$1(props: DevtoolsOptions): solid_js.JSX.Element;
50
-
51
- interface DevtoolsPanelOptions {
52
- /**
53
- * Custom instance of QueryClient
54
- */
55
- client?: QueryClient;
56
- /**
57
- * Use this so you can define custom errors that can be shown in the devtools.
58
- */
59
- errorTypes?: Array<DevtoolsErrorType>;
60
- /**
61
- * 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.
62
- */
63
- styleNonce?: string;
64
- /**
65
- * Use this so you can attach the devtool's styles to specific element in the DOM.
66
- */
67
- shadowDOMTarget?: ShadowRoot;
68
- /**
69
- * Custom styles for the devtools panel
70
- * @default { height: '500px' }
71
- * @example { height: '100%' }
72
- * @example { height: '100%', width: '100%' }
73
- */
74
- style?: JSX.CSSProperties;
75
- /**
76
- * Callback function that is called when the devtools panel is closed
77
- */
78
- onClose?: () => unknown;
79
- /**
80
- * Set this to true to hide disabled queries from the devtools panel.
81
- */
82
- hideDisabledQueries?: boolean;
83
- /**
84
- * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
85
- * Defaults to 'system'.
86
- */
87
- theme?: Theme;
88
- }
89
- declare function SolidQueryDevtoolsPanel$1(props: DevtoolsPanelOptions): JSX.Element;
90
-
91
- declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
92
- declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
93
-
94
- export { type DevtoolsPanelOptions, SolidQueryDevtools, SolidQueryDevtoolsPanel };
1
+ export { SolidQueryDevtools } from './_tsup-dts-rollup.js';
2
+ export { SolidQueryDevtoolsPanel } from './_tsup-dts-rollup.js';
3
+ export { DevtoolsPanelOptions_alias_1 as DevtoolsPanelOptions } from './_tsup-dts-rollup.js';
package/build/index.js CHANGED
@@ -1,7 +1,6 @@
1
- import { isDev, isServer } from 'solid-js/web';
2
- import { createSignal, splitProps, sharedConfig, onMount, createMemo, untrack } from 'solid-js';
1
+ import { isDev, isServer } from './chunk/RDKFYAW3.js';
2
+ import { createSignal, omit, sharedConfig, onSettled, createMemo, untrack } from 'solid-js';
3
3
 
4
- // src/index.tsx
5
4
  function clientOnly(fn) {
6
5
  if (isServer) return (props) => props.fallback;
7
6
  const [comp, setComp] = createSignal();
@@ -9,19 +8,21 @@ function clientOnly(fn) {
9
8
  return (props) => {
10
9
  let Comp;
11
10
  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));
11
+ const rest = omit(props, "fallback");
12
+ if ((Comp = comp()) && !sharedConfig.hydrating) return Comp(rest);
13
+ const [mounted, setMounted] = createSignal(!sharedConfig.hydrating);
14
+ onSettled(() => {
15
+ setMounted(true);
16
+ });
16
17
  return createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
17
18
  };
18
19
  }
19
20
 
20
21
  // src/index.tsx
21
- var SolidQueryDevtools = isDev ? clientOnly(() => import('./devtools/BCD44V6M.js')) : function() {
22
+ var SolidQueryDevtools = isDev ? clientOnly(() => import('./devtools/CHPGNEUY.js')) : function() {
22
23
  return null;
23
24
  };
24
- var SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import('./devtoolsPanel/VKJ7SILT.js')) : function() {
25
+ var SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import('./devtoolsPanel/LLRYE7CA.js')) : function() {
25
26
  return null;
26
27
  };
27
28