@tanstack/solid-query-devtools 6.0.0-beta.3 → 6.0.0-beta.5

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.
@@ -3,11 +3,9 @@ import type { ComponentProps } from 'solid-js';
3
3
  import type { DevtoolsButtonPosition } from '@tanstack/query-devtools';
4
4
  import type { DevtoolsErrorType } from '@tanstack/query-devtools';
5
5
  import type { DevtoolsPosition } from '@tanstack/query-devtools';
6
- import { JSX } from 'solid-js';
7
- import { Options } from 'tsup';
6
+ import { JSX } from '@solidjs/web';
8
7
  import type { QueryClient } from '@tanstack/solid-query';
9
8
  import type { Theme } from '@tanstack/query-devtools';
10
- import { UserConfig } from 'vite';
11
9
 
12
10
  export declare function default_alias<T extends Component<any>>(fn: () => Promise<{
13
11
  default: T;
@@ -19,27 +17,19 @@ export declare function default_alias_1(props: DevtoolsOptions): JSX;
19
17
 
20
18
  export declare function default_alias_2(props: DevtoolsPanelOptions): JSX.Element;
21
19
 
22
- export declare const default_alias_3: any[];
23
-
24
- export declare const default_alias_4: any[];
25
-
26
- export declare const default_alias_5: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
27
-
28
- export declare const default_alias_6: UserConfig;
29
-
30
20
  declare interface DevtoolsOptions {
31
21
  /**
32
22
  * Set this true if you want the dev tools to default to being open
33
23
  */
34
24
  initialIsOpen?: boolean;
35
25
  /**
36
- * The position of the React Query logo to open and close the devtools panel.
37
- * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
26
+ * The position of the TanStack logo to open and close the devtools panel.
27
+ * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
38
28
  * Defaults to 'bottom-right'.
39
29
  */
40
30
  buttonPosition?: DevtoolsButtonPosition;
41
31
  /**
42
- * The position of the React Query devtools panel.
32
+ * The position of the Solid Query devtools panel.
43
33
  * 'top' | 'bottom' | 'left' | 'right'
44
34
  * Defaults to 'bottom'.
45
35
  */
@@ -98,7 +88,7 @@ declare interface DevtoolsPanelOptions {
98
88
  /**
99
89
  * Callback function that is called when the devtools panel is closed
100
90
  */
101
- onClose?: () => unknown;
91
+ onClose?: () => void;
102
92
  /**
103
93
  * Set this to true to hide disabled queries from the devtools panel.
104
94
  */
@@ -3,11 +3,9 @@ import type { ComponentProps } from 'solid-js';
3
3
  import type { DevtoolsButtonPosition } from '@tanstack/query-devtools';
4
4
  import type { DevtoolsErrorType } from '@tanstack/query-devtools';
5
5
  import type { DevtoolsPosition } from '@tanstack/query-devtools';
6
- import { JSX } from 'solid-js';
7
- import { Options } from 'tsup';
6
+ import { JSX } from '@solidjs/web';
8
7
  import type { QueryClient } from '@tanstack/solid-query';
9
8
  import type { Theme } from '@tanstack/query-devtools';
10
- import { UserConfig } from 'vite';
11
9
 
12
10
  export declare function default_alias<T extends Component<any>>(fn: () => Promise<{
13
11
  default: T;
@@ -19,27 +17,19 @@ export declare function default_alias_1(props: DevtoolsOptions): JSX;
19
17
 
20
18
  export declare function default_alias_2(props: DevtoolsPanelOptions): JSX.Element;
21
19
 
22
- export declare const default_alias_3: any[];
23
-
24
- export declare const default_alias_4: any[];
25
-
26
- export declare const default_alias_5: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
27
-
28
- export declare const default_alias_6: UserConfig;
29
-
30
20
  declare interface DevtoolsOptions {
31
21
  /**
32
22
  * Set this true if you want the dev tools to default to being open
33
23
  */
34
24
  initialIsOpen?: boolean;
35
25
  /**
36
- * The position of the React Query logo to open and close the devtools panel.
37
- * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
26
+ * The position of the TanStack logo to open and close the devtools panel.
27
+ * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
38
28
  * Defaults to 'bottom-right'.
39
29
  */
40
30
  buttonPosition?: DevtoolsButtonPosition;
41
31
  /**
42
- * The position of the React Query devtools panel.
32
+ * The position of the Solid Query devtools panel.
43
33
  * 'top' | 'bottom' | 'left' | 'right'
44
34
  * Defaults to 'bottom'.
45
35
  */
@@ -98,7 +88,7 @@ declare interface DevtoolsPanelOptions {
98
88
  /**
99
89
  * Callback function that is called when the devtools panel is closed
100
90
  */
101
- onClose?: () => unknown;
91
+ onClose?: () => void;
102
92
  /**
103
93
  * Set this to true to hide disabled queries from the devtools panel.
104
94
  */
@@ -0,0 +1,57 @@
1
+ import { createRenderEffect, untrack, runWithOwner, sharedConfig } from 'solid-js';
2
+
3
+ // ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.15_solid-js@2.0.0-beta.15/node_modules/@solidjs/web/dist/web.js
4
+ var transparentOptions = {
5
+ transparent: true,
6
+ sync: true
7
+ };
8
+ var effect = (fn, effectFn, options) => createRenderEffect(fn, effectFn, options ? {
9
+ transparent: true,
10
+ sync: true,
11
+ ...options
12
+ } : transparentOptions);
13
+ function create(html, bypassGuard, flag) {
14
+ const t = document.createElement("template");
15
+ t.innerHTML = html;
16
+ return flag === 2 ? t.content.firstChild.firstChild : t.content.firstChild;
17
+ }
18
+ function template(html, flag) {
19
+ let node;
20
+ const fn = flag === 1 ? (bypassGuard) => document.importNode(node || (node = create(html, bypassGuard, flag)), true) : (bypassGuard) => (node || (node = create(html, bypassGuard, flag))).cloneNode(true);
21
+ return fn;
22
+ }
23
+ function setAttribute(node, name, value) {
24
+ if (isHydrating(node)) return;
25
+ node.removeAttribute(name);
26
+ }
27
+ function style(node, value, prev) {
28
+ if (!value) {
29
+ if (prev) setAttribute(node, "style");
30
+ return;
31
+ }
32
+ const nodeStyle = node.style;
33
+ if (typeof value === "string") return nodeStyle.cssText = value;
34
+ typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
35
+ prev || (prev = {});
36
+ let v, s;
37
+ for (s in value) {
38
+ v = value[s];
39
+ if (v !== prev[s]) nodeStyle.setProperty(s, v);
40
+ delete prev[s];
41
+ }
42
+ for (s in prev) value[s] == null && nodeStyle.removeProperty(s);
43
+ }
44
+ function applyRef(r, element) {
45
+ Array.isArray(r) ? r.flat(Infinity).forEach((f) => f && f(element)) : r(element);
46
+ }
47
+ function ref(fn, element) {
48
+ const resolved = untrack(fn);
49
+ runWithOwner(null, () => applyRef(resolved, element));
50
+ }
51
+ function isHydrating(node) {
52
+ return sharedConfig.hydrating && (!node || node.isConnected);
53
+ }
54
+ var isServer = false;
55
+ var isDev = false;
56
+
57
+ export { effect, isDev, isServer, ref, style, template };
@@ -0,0 +1,59 @@
1
+ import { createRenderEffect, untrack, runWithOwner, sharedConfig } from 'solid-js';
2
+
3
+ // ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.15_solid-js@2.0.0-beta.15/node_modules/@solidjs/web/dist/dev.js
4
+ var transparentOptions = {
5
+ transparent: true,
6
+ sync: true
7
+ };
8
+ var effect = (fn, effectFn, options) => createRenderEffect(fn, effectFn, options ? {
9
+ transparent: true,
10
+ sync: true,
11
+ ...options
12
+ } : transparentOptions);
13
+ function create(html, bypassGuard, flag) {
14
+ if (isHydrating() && !bypassGuard) throw new Error("Failed attempt to create new DOM elements during hydration. Check that the libraries you are using support hydration.");
15
+ const t = document.createElement("template");
16
+ t.innerHTML = html;
17
+ return flag === 2 ? t.content.firstChild.firstChild : t.content.firstChild;
18
+ }
19
+ function template(html, flag) {
20
+ let node;
21
+ const fn = flag === 1 ? (bypassGuard) => document.importNode(node || (node = create(html, bypassGuard, flag)), true) : (bypassGuard) => (node || (node = create(html, bypassGuard, flag))).cloneNode(true);
22
+ fn._html = flag === 2 ? html.replace(/^<[^>]+>/, "") : html;
23
+ return fn;
24
+ }
25
+ function setAttribute(node, name, value) {
26
+ if (isHydrating(node)) return;
27
+ node.removeAttribute(name);
28
+ }
29
+ function style(node, value, prev) {
30
+ if (!value) {
31
+ if (prev) setAttribute(node, "style");
32
+ return;
33
+ }
34
+ const nodeStyle = node.style;
35
+ if (typeof value === "string") return nodeStyle.cssText = value;
36
+ typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
37
+ prev || (prev = {});
38
+ let v, s;
39
+ for (s in value) {
40
+ v = value[s];
41
+ if (v !== prev[s]) nodeStyle.setProperty(s, v);
42
+ delete prev[s];
43
+ }
44
+ for (s in prev) value[s] == null && nodeStyle.removeProperty(s);
45
+ }
46
+ function applyRef(r, element) {
47
+ Array.isArray(r) ? r.flat(Infinity).forEach((f) => f && f(element)) : r(element);
48
+ }
49
+ function ref(fn, element) {
50
+ const resolved = untrack(fn);
51
+ runWithOwner(null, () => applyRef(resolved, element));
52
+ }
53
+ function isHydrating(node) {
54
+ return sharedConfig.hydrating && (!node || node.isConnected);
55
+ }
56
+ var isServer = false;
57
+ var isDev = true;
58
+
59
+ export { effect, isDev, isServer, ref, style, template };