@tanstack/vue-query-devtools 6.3.1 → 6.3.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"devtools.js","names":["_openBlock","_createElementBlock","_sfc_main"],"sources":["../src/devtools.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { onMounted, onScopeDispose, ref, watchEffect } from 'vue'\nimport { onlineManager, useQueryClient } from '@tanstack/vue-query'\nimport { TanstackQueryDevtools } from '@tanstack/query-devtools'\nimport type { DevtoolsOptions } from './types'\n\nconst props = defineProps<DevtoolsOptions>()\n\nconst div = ref<HTMLElement>()\nconst client = props.client || useQueryClient()\nconst devtools = new TanstackQueryDevtools({\n client,\n queryFlavor: 'Vue 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\nwatchEffect(() => {\n devtools.setButtonPosition(props.buttonPosition || 'bottom-right')\n devtools.setPosition(props.position || 'bottom')\n devtools.setInitialIsOpen(props.initialIsOpen)\n devtools.setErrorTypes(props.errorTypes || [])\n devtools.setTheme(props.theme || 'system')\n})\n\nonMounted(() => {\n devtools.mount(div.value as HTMLElement)\n onScopeDispose(() => {\n devtools.unmount()\n })\n})\n</script>\n\n<template>\n <div class=\"tsqd-parent-container\" ref=\"div\"></div>\n</template>\n"],"mappings":";;;;;CA0CO,OAAM;CAAwB,KAAI;;;CAAvC,OAAAA,UAAA,GAAAC,mBAAmD,OAAnD,YAAmD,MAAA,GAAA"}
1
+ {"version":3,"file":"devtools.js","names":["_openBlock","_createElementBlock","_sfc_main"],"sources":["../src/devtools.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { onMounted, onScopeDispose, ref, watchEffect } from 'vue'\nimport { onlineManager, useQueryClient } from '@tanstack/vue-query'\nimport { TanstackQueryDevtools } from '@tanstack/query-devtools'\nimport type { DevtoolsOptions } from './types'\n\nconst props = defineProps<DevtoolsOptions>()\n\nconst div = ref<HTMLElement>()\nconst client = props.client || useQueryClient()\nconst devtools = new TanstackQueryDevtools({\n client,\n queryFlavor: 'Vue 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\nwatchEffect(() => {\n devtools.setClient(props.client || client)\n devtools.setButtonPosition(props.buttonPosition || 'bottom-right')\n devtools.setPosition(props.position || 'bottom')\n devtools.setInitialIsOpen(props.initialIsOpen)\n devtools.setErrorTypes(props.errorTypes || [])\n devtools.setTheme(props.theme || 'system')\n})\n\nonMounted(() => {\n devtools.mount(div.value as HTMLElement)\n onScopeDispose(() => {\n devtools.unmount()\n })\n})\n</script>\n\n<template>\n <div class=\"tsqd-parent-container\" ref=\"div\"></div>\n</template>\n"],"mappings":";;;;;CA2CO,OAAM;CAAwB,KAAI;;;CAAvC,OAAAA,UAAA,GAAAC,mBAAmD,OAAnD,YAAmD,MAAA,GAAA"}
@@ -62,6 +62,7 @@ var devtools_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
62
62
  theme: props.theme
63
63
  });
64
64
  watchEffect(() => {
65
+ devtools.setClient(props.client || client);
65
66
  devtools.setButtonPosition(props.buttonPosition || "bottom-right");
66
67
  devtools.setPosition(props.position || "bottom");
67
68
  devtools.setInitialIsOpen(props.initialIsOpen);
@@ -1 +1 @@
1
- {"version":3,"file":"devtools.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../src/devtools.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { onMounted, onScopeDispose, ref, watchEffect } from 'vue'\nimport { onlineManager, useQueryClient } from '@tanstack/vue-query'\nimport { TanstackQueryDevtools } from '@tanstack/query-devtools'\nimport type { DevtoolsOptions } from './types'\n\nconst props = defineProps<DevtoolsOptions>()\n\nconst div = ref<HTMLElement>()\nconst client = props.client || useQueryClient()\nconst devtools = new TanstackQueryDevtools({\n client,\n queryFlavor: 'Vue 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\nwatchEffect(() => {\n devtools.setButtonPosition(props.buttonPosition || 'bottom-right')\n devtools.setPosition(props.position || 'bottom')\n devtools.setInitialIsOpen(props.initialIsOpen)\n devtools.setErrorTypes(props.errorTypes || [])\n devtools.setTheme(props.theme || 'system')\n})\n\nonMounted(() => {\n devtools.mount(div.value as HTMLElement)\n onScopeDispose(() => {\n devtools.unmount()\n })\n})\n</script>\n\n<template>\n <div class=\"tsqd-parent-container\" ref=\"div\"></div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMA,MAAM,QAAQ;EAEd,MAAM,MAAM,IAAiB;EAC7B,MAAM,SAAS,MAAM,UAAU,eAAe;EAC9C,MAAM,WAAW,IAAI,sBAAsB;GACzC;GACA,aAAa;GACb,SAAS;GACT;GACA,gBAAgB,MAAM;GACtB,UAAU,MAAM;GAChB,eAAe,MAAM;GACrB,YAAY,MAAM;GAClB,YAAY,MAAM;GAClB,iBAAiB,MAAM;GACvB,qBAAqB,MAAM;GAC3B,OAAO,MAAM;EACf,CAAC;EAED,kBAAkB;GAChB,SAAS,kBAAkB,MAAM,kBAAkB,cAAc;GACjE,SAAS,YAAY,MAAM,YAAY,QAAQ;GAC/C,SAAS,iBAAiB,MAAM,aAAa;GAC7C,SAAS,cAAc,MAAM,cAAc,CAAC,CAAC;GAC7C,SAAS,SAAS,MAAM,SAAS,QAAQ;EAC3C,CAAC;EAED,gBAAgB;GACd,SAAS,MAAM,IAAI,KAAoB;GACvC,qBAAqB;IACnB,SAAS,QAAQ;GACnB,CAAC;EACH,CAAC"}
1
+ {"version":3,"file":"devtools.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../src/devtools.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { onMounted, onScopeDispose, ref, watchEffect } from 'vue'\nimport { onlineManager, useQueryClient } from '@tanstack/vue-query'\nimport { TanstackQueryDevtools } from '@tanstack/query-devtools'\nimport type { DevtoolsOptions } from './types'\n\nconst props = defineProps<DevtoolsOptions>()\n\nconst div = ref<HTMLElement>()\nconst client = props.client || useQueryClient()\nconst devtools = new TanstackQueryDevtools({\n client,\n queryFlavor: 'Vue 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\nwatchEffect(() => {\n devtools.setClient(props.client || client)\n devtools.setButtonPosition(props.buttonPosition || 'bottom-right')\n devtools.setPosition(props.position || 'bottom')\n devtools.setInitialIsOpen(props.initialIsOpen)\n devtools.setErrorTypes(props.errorTypes || [])\n devtools.setTheme(props.theme || 'system')\n})\n\nonMounted(() => {\n devtools.mount(div.value as HTMLElement)\n onScopeDispose(() => {\n devtools.unmount()\n })\n})\n</script>\n\n<template>\n <div class=\"tsqd-parent-container\" ref=\"div\"></div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMA,MAAM,QAAQ;EAEd,MAAM,MAAM,IAAiB;EAC7B,MAAM,SAAS,MAAM,UAAU,eAAe;EAC9C,MAAM,WAAW,IAAI,sBAAsB;GACzC;GACA,aAAa;GACb,SAAS;GACT;GACA,gBAAgB,MAAM;GACtB,UAAU,MAAM;GAChB,eAAe,MAAM;GACrB,YAAY,MAAM;GAClB,YAAY,MAAM;GAClB,iBAAiB,MAAM;GACvB,qBAAqB,MAAM;GAC3B,OAAO,MAAM;EACf,CAAC;EAED,kBAAkB;GAChB,SAAS,UAAU,MAAM,UAAU,MAAM;GACzC,SAAS,kBAAkB,MAAM,kBAAkB,cAAc;GACjE,SAAS,YAAY,MAAM,YAAY,QAAQ;GAC/C,SAAS,iBAAiB,MAAM,aAAa;GAC7C,SAAS,cAAc,MAAM,cAAc,CAAC,CAAC;GAC7C,SAAS,SAAS,MAAM,SAAS,QAAQ;EAC3C,CAAC;EAED,gBAAgB;GACd,SAAS,MAAM,IAAI,KAAoB;GACvC,qBAAqB;IACnB,SAAS,QAAQ;GACnB,CAAC;EACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"devtoolsPanel.js","names":["_openBlock","_createElementBlock","_normalizeStyle","_sfc_main"],"sources":["../src/devtoolsPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, onMounted, onScopeDispose, ref, watchEffect } from 'vue'\nimport { onlineManager, useQueryClient } from '@tanstack/vue-query'\nimport { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'\nimport type { DevtoolsPanelOptions } from './types'\n\nconst props = defineProps<DevtoolsPanelOptions>()\nconst style = computed<any>(() => {\n return {\n height: '500px',\n ...props.style,\n }\n})\n\nconst div = ref<HTMLElement>()\nconst client = props.client || useQueryClient()\nconst devtools = new TanstackQueryDevtoolsPanel({\n client,\n queryFlavor: 'Vue Query',\n version: '5',\n onlineManager,\n buttonPosition: 'bottom-left',\n position: 'bottom',\n initialIsOpen: true,\n errorTypes: props.errorTypes,\n styleNonce: props.styleNonce,\n shadowDOMTarget: props.shadowDOMTarget,\n hideDisabledQueries: props.hideDisabledQueries,\n onClose: props.onClose,\n theme: props.theme,\n})\n\nwatchEffect(() => {\n devtools.setOnClose(props.onClose ?? (() => {}))\n devtools.setErrorTypes(props.errorTypes || [])\n devtools.setTheme(props.theme)\n})\n\nonMounted(() => {\n devtools.mount(div.value as HTMLElement)\n onScopeDispose(() => {\n devtools.unmount()\n })\n})\n</script>\n\n<template>\n <div :style=\"style\" class=\"tsqd-parent-container\" ref=\"div\"></div>\n</template>\n"],"mappings":";;;;;CA+CE,OAAAA,UAAA,GAAAC,mBAAkE,OAAA;EAA5D,OAAKC,eAAE,OAAA,KAAK;EAAE,OAAM;EAAwB,KAAI"}
1
+ {"version":3,"file":"devtoolsPanel.js","names":["_openBlock","_createElementBlock","_normalizeStyle","_sfc_main"],"sources":["../src/devtoolsPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, onMounted, onScopeDispose, ref, watchEffect } from 'vue'\nimport { onlineManager, useQueryClient } from '@tanstack/vue-query'\nimport { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'\nimport type { DevtoolsPanelOptions } from './types'\n\nconst props = defineProps<DevtoolsPanelOptions>()\nconst style = computed<any>(() => {\n return {\n height: '500px',\n ...props.style,\n }\n})\n\nconst div = ref<HTMLElement>()\nconst client = props.client || useQueryClient()\nconst devtools = new TanstackQueryDevtoolsPanel({\n client,\n queryFlavor: 'Vue Query',\n version: '5',\n onlineManager,\n buttonPosition: 'bottom-left',\n position: 'bottom',\n initialIsOpen: true,\n errorTypes: props.errorTypes,\n styleNonce: props.styleNonce,\n shadowDOMTarget: props.shadowDOMTarget,\n hideDisabledQueries: props.hideDisabledQueries,\n onClose: props.onClose,\n theme: props.theme,\n})\n\nwatchEffect(() => {\n devtools.setClient(props.client || client)\n devtools.setOnClose(props.onClose ?? (() => {}))\n devtools.setErrorTypes(props.errorTypes || [])\n devtools.setTheme(props.theme)\n})\n\nonMounted(() => {\n devtools.mount(div.value as HTMLElement)\n onScopeDispose(() => {\n devtools.unmount()\n })\n})\n</script>\n\n<template>\n <div :style=\"style\" class=\"tsqd-parent-container\" ref=\"div\"></div>\n</template>\n"],"mappings":";;;;;CAgDE,OAAAA,UAAA,GAAAC,mBAAkE,OAAA;EAA5D,OAAKC,eAAE,OAAA,KAAK;EAAE,OAAM;EAAwB,KAAI"}
@@ -65,6 +65,7 @@ var devtoolsPanel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
65
65
  theme: props.theme
66
66
  });
67
67
  watchEffect(() => {
68
+ devtools.setClient(props.client || client);
68
69
  devtools.setOnClose(props.onClose ?? (() => {}));
69
70
  devtools.setErrorTypes(props.errorTypes || []);
70
71
  devtools.setTheme(props.theme);
@@ -1 +1 @@
1
- {"version":3,"file":"devtoolsPanel.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../src/devtoolsPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, onMounted, onScopeDispose, ref, watchEffect } from 'vue'\nimport { onlineManager, useQueryClient } from '@tanstack/vue-query'\nimport { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'\nimport type { DevtoolsPanelOptions } from './types'\n\nconst props = defineProps<DevtoolsPanelOptions>()\nconst style = computed<any>(() => {\n return {\n height: '500px',\n ...props.style,\n }\n})\n\nconst div = ref<HTMLElement>()\nconst client = props.client || useQueryClient()\nconst devtools = new TanstackQueryDevtoolsPanel({\n client,\n queryFlavor: 'Vue Query',\n version: '5',\n onlineManager,\n buttonPosition: 'bottom-left',\n position: 'bottom',\n initialIsOpen: true,\n errorTypes: props.errorTypes,\n styleNonce: props.styleNonce,\n shadowDOMTarget: props.shadowDOMTarget,\n hideDisabledQueries: props.hideDisabledQueries,\n onClose: props.onClose,\n theme: props.theme,\n})\n\nwatchEffect(() => {\n devtools.setOnClose(props.onClose ?? (() => {}))\n devtools.setErrorTypes(props.errorTypes || [])\n devtools.setTheme(props.theme)\n})\n\nonMounted(() => {\n devtools.mount(div.value as HTMLElement)\n onScopeDispose(() => {\n devtools.unmount()\n })\n})\n</script>\n\n<template>\n <div :style=\"style\" class=\"tsqd-parent-container\" ref=\"div\"></div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMA,MAAM,QAAQ;EACd,MAAM,QAAQ,eAAoB;GAChC,OAAO;IACL,QAAQ;IACR,GAAG,MAAM;GACX;EACF,CAAC;EAED,MAAM,MAAM,IAAiB;EAC7B,MAAM,SAAS,MAAM,UAAU,eAAe;EAC9C,MAAM,WAAW,IAAI,2BAA2B;GAC9C;GACA,aAAa;GACb,SAAS;GACT;GACA,gBAAgB;GAChB,UAAU;GACV,eAAe;GACf,YAAY,MAAM;GAClB,YAAY,MAAM;GAClB,iBAAiB,MAAM;GACvB,qBAAqB,MAAM;GAC3B,SAAS,MAAM;GACf,OAAO,MAAM;EACf,CAAC;EAED,kBAAkB;GAChB,SAAS,WAAW,MAAM,kBAAkB,CAAC,EAAE;GAC/C,SAAS,cAAc,MAAM,cAAc,CAAC,CAAC;GAC7C,SAAS,SAAS,MAAM,KAAK;EAC/B,CAAC;EAED,gBAAgB;GACd,SAAS,MAAM,IAAI,KAAoB;GACvC,qBAAqB;IACnB,SAAS,QAAQ;GACnB,CAAC;EACH,CAAC"}
1
+ {"version":3,"file":"devtoolsPanel.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../src/devtoolsPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, onMounted, onScopeDispose, ref, watchEffect } from 'vue'\nimport { onlineManager, useQueryClient } from '@tanstack/vue-query'\nimport { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'\nimport type { DevtoolsPanelOptions } from './types'\n\nconst props = defineProps<DevtoolsPanelOptions>()\nconst style = computed<any>(() => {\n return {\n height: '500px',\n ...props.style,\n }\n})\n\nconst div = ref<HTMLElement>()\nconst client = props.client || useQueryClient()\nconst devtools = new TanstackQueryDevtoolsPanel({\n client,\n queryFlavor: 'Vue Query',\n version: '5',\n onlineManager,\n buttonPosition: 'bottom-left',\n position: 'bottom',\n initialIsOpen: true,\n errorTypes: props.errorTypes,\n styleNonce: props.styleNonce,\n shadowDOMTarget: props.shadowDOMTarget,\n hideDisabledQueries: props.hideDisabledQueries,\n onClose: props.onClose,\n theme: props.theme,\n})\n\nwatchEffect(() => {\n devtools.setClient(props.client || client)\n devtools.setOnClose(props.onClose ?? (() => {}))\n devtools.setErrorTypes(props.errorTypes || [])\n devtools.setTheme(props.theme)\n})\n\nonMounted(() => {\n devtools.mount(div.value as HTMLElement)\n onScopeDispose(() => {\n devtools.unmount()\n })\n})\n</script>\n\n<template>\n <div :style=\"style\" class=\"tsqd-parent-container\" ref=\"div\"></div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMA,MAAM,QAAQ;EACd,MAAM,QAAQ,eAAoB;GAChC,OAAO;IACL,QAAQ;IACR,GAAG,MAAM;GACX;EACF,CAAC;EAED,MAAM,MAAM,IAAiB;EAC7B,MAAM,SAAS,MAAM,UAAU,eAAe;EAC9C,MAAM,WAAW,IAAI,2BAA2B;GAC9C;GACA,aAAa;GACb,SAAS;GACT;GACA,gBAAgB;GAChB,UAAU;GACV,eAAe;GACf,YAAY,MAAM;GAClB,YAAY,MAAM;GAClB,iBAAiB,MAAM;GACvB,qBAAqB,MAAM;GAC3B,SAAS,MAAM;GACf,OAAO,MAAM;EACf,CAAC;EAED,kBAAkB;GAChB,SAAS,UAAU,MAAM,UAAU,MAAM;GACzC,SAAS,WAAW,MAAM,kBAAkB,CAAC,EAAE;GAC/C,SAAS,cAAc,MAAM,cAAc,CAAC,CAAC;GAC7C,SAAS,SAAS,MAAM,KAAK;EAC/B,CAAC;EAED,gBAAgB;GACd,SAAS,MAAM,IAAI,KAAoB;GACvC,qBAAqB;IACnB,SAAS,QAAQ;GACnB,CAAC;EACH,CAAC"}
package/dist/types.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  import { QueryClient } from "@tanstack/vue-query";
2
2
  import { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from "@tanstack/query-devtools";
3
3
  //#region src/types.d.ts
4
+ /**
5
+ * The props of `VueQueryDevtools`, which renders the devtools with a toggle button that opens them.
6
+ */
4
7
  export interface DevtoolsOptions {
5
8
  /**
6
9
  * Set this true if you want the dev tools to default to being open
@@ -9,14 +12,12 @@ export interface DevtoolsOptions {
9
12
  /**
10
13
  * The position of the TanStack logo to open and close the devtools panel.
11
14
  * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
12
- *
13
15
  * @defaultValue bottom-right
14
16
  */
15
17
  buttonPosition?: DevtoolsButtonPosition;
16
18
  /**
17
19
  * The position of the Vue Query devtools panel.
18
20
  * 'top' | 'bottom' | 'left' | 'right'
19
- *
20
21
  * @defaultValue bottom
21
22
  */
22
23
  position?: DevtoolsPosition;
@@ -33,7 +34,8 @@ export interface DevtoolsOptions {
33
34
  */
34
35
  styleNonce?: string;
35
36
  /**
36
- * Use this so you can attach the devtool's styles to specific element in the DOM.
37
+ * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
38
+ * within the shadow DOM instead of within the head tag in the light DOM.
37
39
  */
38
40
  shadowDOMTarget?: ShadowRoot;
39
41
  /**
@@ -42,11 +44,13 @@ export interface DevtoolsOptions {
42
44
  hideDisabledQueries?: boolean;
43
45
  /**
44
46
  * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
45
- *
46
47
  * @defaultValue system
47
48
  */
48
49
  theme?: Theme;
49
50
  }
51
+ /**
52
+ * The props of `VueQueryDevtoolsPanel`, which renders the devtools panel inline.
53
+ */
50
54
  export interface DevtoolsPanelOptions {
51
55
  /**
52
56
  * Custom instance of QueryClient
@@ -61,7 +65,8 @@ export interface DevtoolsPanelOptions {
61
65
  */
62
66
  styleNonce?: string;
63
67
  /**
64
- * Use this so you can attach the devtool's styles to specific element in the DOM.
68
+ * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
69
+ * within the shadow DOM instead of within the head tag in the light DOM.
65
70
  */
66
71
  shadowDOMTarget?: ShadowRoot;
67
72
  /**
@@ -81,7 +86,6 @@ export interface DevtoolsPanelOptions {
81
86
  hideDisabledQueries?: boolean;
82
87
  /**
83
88
  * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
84
- *
85
89
  * @defaultValue system
86
90
  */
87
91
  theme?: Theme;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"mappings":";;;iBAQiB;;;;EAIf;;;;;;;EAOA,iBAAiB;;;;;;;EAOjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;EAIA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;iBAGO;;;;EAIf,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;EAIA,kBAAkB;;;;;;;EAQlB,QAAQ,QAAQ;;;;EAKhB;;;;EAIA;;;;;;EAMA,QAAQ"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;iBAWiB;;;;EAIf;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;EAKA,QAAQ;;;;;iBAMO;;;;EAIf,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;;;;EAQlB,QAAQ,QAAQ;;;;EAKhB;;;;EAIA;;;;;EAKA,QAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/vue-query-devtools",
3
- "version": "6.3.1",
3
+ "version": "6.3.3",
4
4
  "description": "Developer tools to interact with and visualize the TanStack/vue-query cache",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -38,26 +38,24 @@
38
38
  "!src/__tests__"
39
39
  ],
40
40
  "dependencies": {
41
- "@tanstack/query-devtools": "5.104.1"
41
+ "@tanstack/query-devtools": "5.104.3"
42
42
  },
43
43
  "devDependencies": {
44
- "@tanstack/vue-query": "5.104.1",
45
- "eslint-plugin-vue": "^10.11.1",
44
+ "@tanstack/vue-query": "5.104.3",
46
45
  "typescript": "6.0.3",
47
46
  "unplugin-vue": "^8.0.0",
48
47
  "vue": "^3.5.43",
49
48
  "vue-tsc": "^2.2.8"
50
49
  },
51
50
  "peerDependencies": {
52
- "@tanstack/vue-query": "^5.104.1",
51
+ "@tanstack/vue-query": "^5.104.3",
53
52
  "vue": "^3.3.0"
54
53
  },
55
54
  "scripts": {
56
55
  "clean": "premove ./build ./coverage ./dist-ts ./.cache/test-types",
57
56
  "compile": "vue-tsc --project tsconfig.json",
58
- "test:eslint": "eslint --concurrency=auto ./src",
57
+ "test:oxlint": "oxlint ./src",
59
58
  "test:types": "npm-run-all --serial test:types:*",
60
- "test:types:ts56": "node -e \"process.argv.splice(1, 0, ''); require('vue-tsc').run(require.resolve('typescript56/lib/tsc'))\" -- --project tsconfig.legacy.json --outDir .cache/test-types/ts56 --tsBuildInfoFile .cache/test-types/ts56.tsbuildinfo",
61
59
  "test:types:ts57": "node -e \"process.argv.splice(1, 0, ''); require('vue-tsc').run(require.resolve('typescript57/lib/tsc'))\" -- --project tsconfig.legacy.json --outDir .cache/test-types/ts57 --tsBuildInfoFile .cache/test-types/ts57.tsbuildinfo",
62
60
  "test:types:ts58": "node -e \"process.argv.splice(1, 0, ''); require('vue-tsc').run(require.resolve('typescript58/lib/tsc'))\" -- --project tsconfig.legacy.json --outDir .cache/test-types/ts58 --tsBuildInfoFile .cache/test-types/ts58.tsbuildinfo",
63
61
  "test:types:ts59": "node -e \"process.argv.splice(1, 0, ''); require('vue-tsc').run(require.resolve('typescript59/lib/tsc'))\" -- --project tsconfig.legacy.json --outDir .cache/test-types/ts59 --tsBuildInfoFile .cache/test-types/ts59.tsbuildinfo",
package/src/devtools.vue CHANGED
@@ -24,6 +24,7 @@ const devtools = new TanstackQueryDevtools({
24
24
  })
25
25
 
26
26
  watchEffect(() => {
27
+ devtools.setClient(props.client || client)
27
28
  devtools.setButtonPosition(props.buttonPosition || 'bottom-right')
28
29
  devtools.setPosition(props.position || 'bottom')
29
30
  devtools.setInitialIsOpen(props.initialIsOpen)
@@ -31,6 +31,7 @@ const devtools = new TanstackQueryDevtoolsPanel({
31
31
  })
32
32
 
33
33
  watchEffect(() => {
34
+ devtools.setClient(props.client || client)
34
35
  devtools.setOnClose(props.onClose ?? (() => {}))
35
36
  devtools.setErrorTypes(props.errorTypes || [])
36
37
  devtools.setTheme(props.theme)
package/src/types.ts CHANGED
@@ -6,6 +6,9 @@ import type {
6
6
  } from '@tanstack/query-devtools'
7
7
  import type { QueryClient } from '@tanstack/vue-query'
8
8
 
9
+ /**
10
+ * The props of `VueQueryDevtools`, which renders the devtools with a toggle button that opens them.
11
+ */
9
12
  export interface DevtoolsOptions {
10
13
  /**
11
14
  * Set this true if you want the dev tools to default to being open
@@ -14,14 +17,12 @@ export interface DevtoolsOptions {
14
17
  /**
15
18
  * The position of the TanStack logo to open and close the devtools panel.
16
19
  * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
17
- *
18
20
  * @defaultValue bottom-right
19
21
  */
20
22
  buttonPosition?: DevtoolsButtonPosition
21
23
  /**
22
24
  * The position of the Vue Query devtools panel.
23
25
  * 'top' | 'bottom' | 'left' | 'right'
24
- *
25
26
  * @defaultValue bottom
26
27
  */
27
28
  position?: DevtoolsPosition
@@ -38,7 +39,8 @@ export interface DevtoolsOptions {
38
39
  */
39
40
  styleNonce?: string
40
41
  /**
41
- * Use this so you can attach the devtool's styles to specific element in the DOM.
42
+ * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
43
+ * within the shadow DOM instead of within the head tag in the light DOM.
42
44
  */
43
45
  shadowDOMTarget?: ShadowRoot
44
46
  /**
@@ -47,12 +49,14 @@ export interface DevtoolsOptions {
47
49
  hideDisabledQueries?: boolean
48
50
  /**
49
51
  * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
50
- *
51
52
  * @defaultValue system
52
53
  */
53
54
  theme?: Theme
54
55
  }
55
56
 
57
+ /**
58
+ * The props of `VueQueryDevtoolsPanel`, which renders the devtools panel inline.
59
+ */
56
60
  export interface DevtoolsPanelOptions {
57
61
  /**
58
62
  * Custom instance of QueryClient
@@ -67,7 +71,8 @@ export interface DevtoolsPanelOptions {
67
71
  */
68
72
  styleNonce?: string
69
73
  /**
70
- * Use this so you can attach the devtool's styles to specific element in the DOM.
74
+ * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
75
+ * within the shadow DOM instead of within the head tag in the light DOM.
71
76
  */
72
77
  shadowDOMTarget?: ShadowRoot
73
78
 
@@ -89,7 +94,6 @@ export interface DevtoolsPanelOptions {
89
94
  hideDisabledQueries?: boolean
90
95
  /**
91
96
  * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
92
- *
93
97
  * @defaultValue system
94
98
  */
95
99
  theme?: Theme