@tanstack/vue-query-devtools 6.2.4 → 6.3.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/dist/_virtual/_/plugin-vue/export-helper.js +8 -0
- package/dist/devtools.js +16 -0
- package/dist/devtools.js.map +1 -0
- package/dist/devtools.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/devtools.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/devtoolsPanel.js +16 -0
- package/dist/devtoolsPanel.js.map +1 -0
- package/dist/devtoolsPanel.vue_vue_type_script_setup_true_lang.js +95 -0
- package/dist/devtoolsPanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/{esm/index.d.ts → index.d.ts} +5 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/stub.d.ts +5 -0
- package/dist/stub.d.ts.map +1 -0
- package/dist/stub.js +11 -0
- package/dist/stub.js.map +1 -0
- package/dist/types.d.ts +90 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +18 -25
- package/src/index.ts +10 -14
- package/src/stub.ts +7 -0
- package/dist/cjs/__tests__/VueQueryDevtoolsPanel.test.d.cts +0 -1
- package/dist/cjs/devtools.vue.cjs +0 -59
- package/dist/cjs/devtools.vue.cjs.map +0 -1
- package/dist/cjs/devtools.vue.d.cts +0 -3
- package/dist/cjs/devtools.vue2.cjs +0 -4
- package/dist/cjs/devtools.vue2.cjs.map +0 -1
- package/dist/cjs/devtoolsPanel.vue.cjs +0 -65
- package/dist/cjs/devtoolsPanel.vue.cjs.map +0 -1
- package/dist/cjs/devtoolsPanel.vue.d.cts +0 -3
- package/dist/cjs/devtoolsPanel.vue2.cjs +0 -4
- package/dist/cjs/devtoolsPanel.vue2.cjs.map +0 -1
- package/dist/cjs/index.cjs +0 -13
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/cjs/index.d.cts +0 -4
- package/dist/cjs/production.cjs +0 -4
- package/dist/cjs/production.cjs.map +0 -1
- package/dist/cjs/production.d.cts +0 -2
- package/dist/cjs/types.d.cts +0 -87
- package/dist/esm/__tests__/VueQueryDevtools.test.d.ts +0 -1
- package/dist/esm/__tests__/VueQueryDevtoolsPanel.test.d.ts +0 -1
- package/dist/esm/devtools.vue.d.ts +0 -3
- package/dist/esm/devtools.vue.js +0 -60
- package/dist/esm/devtools.vue.js.map +0 -1
- package/dist/esm/devtools.vue2.js +0 -5
- package/dist/esm/devtools.vue2.js.map +0 -1
- package/dist/esm/devtoolsPanel.vue.d.ts +0 -3
- package/dist/esm/devtoolsPanel.vue.js +0 -66
- package/dist/esm/devtoolsPanel.vue.js.map +0 -1
- package/dist/esm/devtoolsPanel.vue2.js +0 -5
- package/dist/esm/devtoolsPanel.vue2.js.map +0 -1
- package/dist/esm/index.js +0 -13
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/production.d.ts +0 -2
- package/dist/esm/production.js +0 -5
- package/dist/esm/production.js.map +0 -1
- package/dist/esm/types.d.ts +0 -87
- package/src/production.ts +0 -3
- /package/dist/{cjs/__tests__/VueQueryDevtools.test.d.cts → types.js} +0 -0
package/dist/devtools.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import devtools_vue_vue_type_script_setup_true_lang_default from "./devtools.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
import export_helper_default from "./_virtual/_/plugin-vue/export-helper.js";
|
|
3
|
+
import { createElementBlock, openBlock } from "vue";
|
|
4
|
+
//#region src/devtools.vue
|
|
5
|
+
const _hoisted_1 = {
|
|
6
|
+
class: "tsqd-parent-container",
|
|
7
|
+
ref: "div"
|
|
8
|
+
};
|
|
9
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10
|
+
return openBlock(), createElementBlock("div", _hoisted_1, null, 512);
|
|
11
|
+
}
|
|
12
|
+
var devtools_default = /*#__PURE__*/ export_helper_default(devtools_vue_vue_type_script_setup_true_lang_default, [["render", _sfc_render], ["__file", "/home/runner/work/query/query/packages/vue-query-devtools/src/devtools.vue"]]);
|
|
13
|
+
//#endregion
|
|
14
|
+
export { devtools_default as default };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=devtools.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { defineComponent, onMounted, onScopeDispose, ref, watchEffect } from "vue";
|
|
2
|
+
import { onlineManager, useQueryClient } from "@tanstack/vue-query";
|
|
3
|
+
import { TanstackQueryDevtools } from "@tanstack/query-devtools";
|
|
4
|
+
//#region src/devtools.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var devtools_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
6
|
+
__name: "devtools",
|
|
7
|
+
props: {
|
|
8
|
+
initialIsOpen: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
required: false
|
|
11
|
+
},
|
|
12
|
+
buttonPosition: {
|
|
13
|
+
type: null,
|
|
14
|
+
required: false
|
|
15
|
+
},
|
|
16
|
+
position: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: false
|
|
19
|
+
},
|
|
20
|
+
client: {
|
|
21
|
+
type: Object,
|
|
22
|
+
required: false
|
|
23
|
+
},
|
|
24
|
+
errorTypes: {
|
|
25
|
+
type: Array,
|
|
26
|
+
required: false
|
|
27
|
+
},
|
|
28
|
+
styleNonce: {
|
|
29
|
+
type: String,
|
|
30
|
+
required: false
|
|
31
|
+
},
|
|
32
|
+
shadowDOMTarget: {
|
|
33
|
+
type: null,
|
|
34
|
+
required: false
|
|
35
|
+
},
|
|
36
|
+
hideDisabledQueries: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
required: false
|
|
39
|
+
},
|
|
40
|
+
theme: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: false
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
setup(__props, { expose: __expose }) {
|
|
46
|
+
__expose();
|
|
47
|
+
const props = __props;
|
|
48
|
+
const div = ref();
|
|
49
|
+
const client = props.client || useQueryClient();
|
|
50
|
+
const devtools = new TanstackQueryDevtools({
|
|
51
|
+
client,
|
|
52
|
+
queryFlavor: "Vue Query",
|
|
53
|
+
version: "5",
|
|
54
|
+
onlineManager,
|
|
55
|
+
buttonPosition: props.buttonPosition,
|
|
56
|
+
position: props.position,
|
|
57
|
+
initialIsOpen: props.initialIsOpen,
|
|
58
|
+
errorTypes: props.errorTypes,
|
|
59
|
+
styleNonce: props.styleNonce,
|
|
60
|
+
shadowDOMTarget: props.shadowDOMTarget,
|
|
61
|
+
hideDisabledQueries: props.hideDisabledQueries,
|
|
62
|
+
theme: props.theme
|
|
63
|
+
});
|
|
64
|
+
watchEffect(() => {
|
|
65
|
+
devtools.setButtonPosition(props.buttonPosition || "bottom-right");
|
|
66
|
+
devtools.setPosition(props.position || "bottom");
|
|
67
|
+
devtools.setInitialIsOpen(props.initialIsOpen);
|
|
68
|
+
devtools.setErrorTypes(props.errorTypes || []);
|
|
69
|
+
devtools.setTheme(props.theme || "system");
|
|
70
|
+
});
|
|
71
|
+
onMounted(() => {
|
|
72
|
+
devtools.mount(div.value);
|
|
73
|
+
onScopeDispose(() => {
|
|
74
|
+
devtools.unmount();
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
const __returned__ = {
|
|
78
|
+
props,
|
|
79
|
+
div,
|
|
80
|
+
client,
|
|
81
|
+
devtools
|
|
82
|
+
};
|
|
83
|
+
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
84
|
+
enumerable: false,
|
|
85
|
+
value: true
|
|
86
|
+
});
|
|
87
|
+
return __returned__;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
//#endregion
|
|
91
|
+
export { devtools_vue_vue_type_script_setup_true_lang_default as default };
|
|
92
|
+
|
|
93
|
+
//# sourceMappingURL=devtools.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import export_helper_default from "./_virtual/_/plugin-vue/export-helper.js";
|
|
2
|
+
import devtoolsPanel_vue_vue_type_script_setup_true_lang_default from "./devtoolsPanel.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
import { createElementBlock, normalizeStyle, openBlock } from "vue";
|
|
4
|
+
//#region src/devtoolsPanel.vue
|
|
5
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6
|
+
return openBlock(), createElementBlock("div", {
|
|
7
|
+
style: normalizeStyle($setup.style),
|
|
8
|
+
class: "tsqd-parent-container",
|
|
9
|
+
ref: "div"
|
|
10
|
+
}, null, 4);
|
|
11
|
+
}
|
|
12
|
+
var devtoolsPanel_default = /*#__PURE__*/ export_helper_default(devtoolsPanel_vue_vue_type_script_setup_true_lang_default, [["render", _sfc_render], ["__file", "/home/runner/work/query/query/packages/vue-query-devtools/src/devtoolsPanel.vue"]]);
|
|
13
|
+
//#endregion
|
|
14
|
+
export { devtoolsPanel_default as default };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=devtoolsPanel.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { computed, defineComponent, onMounted, onScopeDispose, ref, watchEffect } from "vue";
|
|
2
|
+
import { onlineManager, useQueryClient } from "@tanstack/vue-query";
|
|
3
|
+
import { TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
|
|
4
|
+
//#region src/devtoolsPanel.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var devtoolsPanel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
6
|
+
__name: "devtoolsPanel",
|
|
7
|
+
props: {
|
|
8
|
+
client: {
|
|
9
|
+
type: Object,
|
|
10
|
+
required: false
|
|
11
|
+
},
|
|
12
|
+
errorTypes: {
|
|
13
|
+
type: Array,
|
|
14
|
+
required: false
|
|
15
|
+
},
|
|
16
|
+
styleNonce: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: false
|
|
19
|
+
},
|
|
20
|
+
shadowDOMTarget: {
|
|
21
|
+
type: null,
|
|
22
|
+
required: false
|
|
23
|
+
},
|
|
24
|
+
style: {
|
|
25
|
+
type: Object,
|
|
26
|
+
required: false
|
|
27
|
+
},
|
|
28
|
+
onClose: {
|
|
29
|
+
type: Function,
|
|
30
|
+
required: false
|
|
31
|
+
},
|
|
32
|
+
hideDisabledQueries: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
required: false
|
|
35
|
+
},
|
|
36
|
+
theme: {
|
|
37
|
+
type: String,
|
|
38
|
+
required: false
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
setup(__props, { expose: __expose }) {
|
|
42
|
+
__expose();
|
|
43
|
+
const props = __props;
|
|
44
|
+
const style = computed(() => {
|
|
45
|
+
return {
|
|
46
|
+
height: "500px",
|
|
47
|
+
...props.style
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
const div = ref();
|
|
51
|
+
const client = props.client || useQueryClient();
|
|
52
|
+
const devtools = new TanstackQueryDevtoolsPanel({
|
|
53
|
+
client,
|
|
54
|
+
queryFlavor: "Vue Query",
|
|
55
|
+
version: "5",
|
|
56
|
+
onlineManager,
|
|
57
|
+
buttonPosition: "bottom-left",
|
|
58
|
+
position: "bottom",
|
|
59
|
+
initialIsOpen: true,
|
|
60
|
+
errorTypes: props.errorTypes,
|
|
61
|
+
styleNonce: props.styleNonce,
|
|
62
|
+
shadowDOMTarget: props.shadowDOMTarget,
|
|
63
|
+
hideDisabledQueries: props.hideDisabledQueries,
|
|
64
|
+
onClose: props.onClose,
|
|
65
|
+
theme: props.theme
|
|
66
|
+
});
|
|
67
|
+
watchEffect(() => {
|
|
68
|
+
devtools.setOnClose(props.onClose ?? (() => {}));
|
|
69
|
+
devtools.setErrorTypes(props.errorTypes || []);
|
|
70
|
+
devtools.setTheme(props.theme);
|
|
71
|
+
});
|
|
72
|
+
onMounted(() => {
|
|
73
|
+
devtools.mount(div.value);
|
|
74
|
+
onScopeDispose(() => {
|
|
75
|
+
devtools.unmount();
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
const __returned__ = {
|
|
79
|
+
props,
|
|
80
|
+
style,
|
|
81
|
+
div,
|
|
82
|
+
client,
|
|
83
|
+
devtools
|
|
84
|
+
};
|
|
85
|
+
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
86
|
+
enumerable: false,
|
|
87
|
+
value: true
|
|
88
|
+
});
|
|
89
|
+
return __returned__;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
//#endregion
|
|
93
|
+
export { devtoolsPanel_vue_vue_type_script_setup_true_lang_default as default };
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=devtoolsPanel.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +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,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { DevtoolsOptions, DevtoolsPanelOptions } from "./types.js";
|
|
2
|
+
import { DefineComponent } from "vue";
|
|
3
|
+
//#region src/index.d.ts
|
|
3
4
|
export declare const VueQueryDevtools: DefineComponent<DevtoolsOptions, {}, unknown>;
|
|
4
5
|
export declare const VueQueryDevtoolsPanel: DefineComponent<DevtoolsPanelOptions, {}, unknown>;
|
|
6
|
+
//#endregion
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;qBAKa,kBAA+B,gBAC1C;qBAKW,uBAAyC,gBACpD"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import devtools_default from "./devtools.js";
|
|
2
|
+
import devtoolsPanel_default from "./devtoolsPanel.js";
|
|
3
|
+
//#region src/index.ts
|
|
4
|
+
const VueQueryDevtools = devtools_default;
|
|
5
|
+
const VueQueryDevtoolsPanel = devtoolsPanel_default;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { VueQueryDevtools, VueQueryDevtoolsPanel };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["devtools","devtoolsPanel"],"sources":["../src/index.ts"],"sourcesContent":["import devtools from './devtools.vue'\nimport devtoolsPanel from './devtoolsPanel.vue'\nimport type { DefineComponent } from 'vue'\nimport type { DevtoolsOptions, DevtoolsPanelOptions } from './types'\n\nexport const VueQueryDevtools = devtools as DefineComponent<\n DevtoolsOptions,\n {},\n unknown\n>\n\nexport const VueQueryDevtoolsPanel = devtoolsPanel as DefineComponent<\n DevtoolsPanelOptions,\n {},\n unknown\n>\n"],"mappings":";;;AAKA,MAAa,mBAAmBA;AAMhC,MAAa,wBAAwBC"}
|
package/dist/stub.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stub.d.ts","names":[],"sources":["../src/stub.ts"],"mappings":";qBAAa;qBAIA"}
|
package/dist/stub.js
ADDED
package/dist/stub.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stub.js","names":[],"sources":["../src/stub.ts"],"sourcesContent":["export const VueQueryDevtools = function () {\n return null\n}\n\nexport const VueQueryDevtoolsPanel = function () {\n return null\n}\n"],"mappings":";AAAA,MAAa,mBAAmB,WAAY;CAC1C,OAAO;AACT;AAEA,MAAa,wBAAwB,WAAY;CAC/C,OAAO;AACT"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { QueryClient } from "@tanstack/vue-query";
|
|
2
|
+
import { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from "@tanstack/query-devtools";
|
|
3
|
+
//#region src/types.d.ts
|
|
4
|
+
export interface DevtoolsOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Set this true if you want the dev tools to default to being open
|
|
7
|
+
*/
|
|
8
|
+
initialIsOpen?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* The position of the TanStack logo to open and close the devtools panel.
|
|
11
|
+
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
12
|
+
*
|
|
13
|
+
* @defaultValue bottom-right
|
|
14
|
+
*/
|
|
15
|
+
buttonPosition?: DevtoolsButtonPosition;
|
|
16
|
+
/**
|
|
17
|
+
* The position of the Vue Query devtools panel.
|
|
18
|
+
* 'top' | 'bottom' | 'left' | 'right'
|
|
19
|
+
*
|
|
20
|
+
* @defaultValue 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
|
+
*
|
|
46
|
+
* @defaultValue system
|
|
47
|
+
*/
|
|
48
|
+
theme?: Theme;
|
|
49
|
+
}
|
|
50
|
+
export interface DevtoolsPanelOptions {
|
|
51
|
+
/**
|
|
52
|
+
* Custom instance of QueryClient
|
|
53
|
+
*/
|
|
54
|
+
client?: QueryClient;
|
|
55
|
+
/**
|
|
56
|
+
* Use this so you can define custom errors that can be shown in the devtools.
|
|
57
|
+
*/
|
|
58
|
+
errorTypes?: Array<DevtoolsErrorType>;
|
|
59
|
+
/**
|
|
60
|
+
* 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.
|
|
61
|
+
*/
|
|
62
|
+
styleNonce?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Use this so you can attach the devtool's styles to specific element in the DOM.
|
|
65
|
+
*/
|
|
66
|
+
shadowDOMTarget?: ShadowRoot;
|
|
67
|
+
/**
|
|
68
|
+
* Custom styles for the devtools panel
|
|
69
|
+
* @default { height: '500px' }
|
|
70
|
+
* @example { height: '100%' }
|
|
71
|
+
* @example { height: '100%', width: '100%' }
|
|
72
|
+
*/
|
|
73
|
+
style?: Partial<CSSStyleDeclaration>;
|
|
74
|
+
/**
|
|
75
|
+
* Callback function that is called when the devtools panel is closed
|
|
76
|
+
*/
|
|
77
|
+
onClose?: () => void;
|
|
78
|
+
/**
|
|
79
|
+
* Set this to true to hide disabled queries from the devtools panel.
|
|
80
|
+
*/
|
|
81
|
+
hideDisabledQueries?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
|
|
84
|
+
*
|
|
85
|
+
* @defaultValue system
|
|
86
|
+
*/
|
|
87
|
+
theme?: Theme;
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/vue-query-devtools",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "Developer tools to interact with and visualize the TanStack/vue-query cache",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,23 +15,19 @@
|
|
|
15
15
|
"url": "https://github.com/sponsors/tannerlinsley"
|
|
16
16
|
},
|
|
17
17
|
"type": "module",
|
|
18
|
-
"types": "dist/
|
|
19
|
-
"module": "dist/
|
|
20
|
-
"main": "dist/esm/index.js",
|
|
18
|
+
"types": "dist/index.d.ts",
|
|
19
|
+
"module": "dist/index.js",
|
|
21
20
|
"exports": {
|
|
22
21
|
".": {
|
|
23
22
|
"@tanstack/custom-condition": "./src/index.ts",
|
|
24
|
-
"types": "./dist/
|
|
25
|
-
"
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"development": "./dist/index.js",
|
|
25
|
+
"default": "./dist/stub.js"
|
|
26
26
|
},
|
|
27
27
|
"./production": {
|
|
28
|
-
"@tanstack/custom-condition": "./src/
|
|
29
|
-
"types": "./dist/
|
|
30
|
-
"default": "./dist/
|
|
31
|
-
},
|
|
32
|
-
"./dist/production.js": {
|
|
33
|
-
"types": "./dist/esm/production.d.ts",
|
|
34
|
-
"default": "./dist/esm/production.js"
|
|
28
|
+
"@tanstack/custom-condition": "./src/index.ts",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"default": "./dist/index.js"
|
|
35
31
|
},
|
|
36
32
|
"./package.json": "./package.json"
|
|
37
33
|
},
|
|
@@ -42,20 +38,19 @@
|
|
|
42
38
|
"!src/__tests__"
|
|
43
39
|
],
|
|
44
40
|
"dependencies": {
|
|
45
|
-
"@tanstack/query-devtools": "5.
|
|
41
|
+
"@tanstack/query-devtools": "5.104.0"
|
|
46
42
|
},
|
|
47
43
|
"devDependencies": {
|
|
48
|
-
"@
|
|
49
|
-
"eslint-plugin-vue": "^10.
|
|
44
|
+
"@tanstack/vue-query": "5.104.0",
|
|
45
|
+
"eslint-plugin-vue": "^10.11.1",
|
|
50
46
|
"typescript": "5.8.3",
|
|
51
|
-
"
|
|
52
|
-
"vue": "^3.
|
|
53
|
-
"vue-tsc": "^2.2.8"
|
|
54
|
-
"@tanstack/vue-query": "5.103.2"
|
|
47
|
+
"unplugin-vue": "^8.0.0",
|
|
48
|
+
"vue": "^3.5.43",
|
|
49
|
+
"vue-tsc": "^2.2.8"
|
|
55
50
|
},
|
|
56
51
|
"peerDependencies": {
|
|
57
|
-
"vue": "^
|
|
58
|
-
"
|
|
52
|
+
"@tanstack/vue-query": "^5.104.0",
|
|
53
|
+
"vue": "^3.3.0"
|
|
59
54
|
},
|
|
60
55
|
"nx": {
|
|
61
56
|
"targets": {
|
|
@@ -72,9 +67,7 @@
|
|
|
72
67
|
"compile": "vue-tsc --project tsconfig.json",
|
|
73
68
|
"test:eslint": "eslint --concurrency=auto ./src",
|
|
74
69
|
"test:types": "vue-tsc --project tsconfig.json --outDir .cache/test-types/tscurrent --tsBuildInfoFile .cache/test-types/tscurrent.tsbuildinfo",
|
|
75
|
-
"test:lib": "vitest",
|
|
76
|
-
"test:lib:dev": "pnpm run test:lib --watch",
|
|
77
70
|
"test:build": "publint --strict && attw --pack",
|
|
78
|
-
"build": "
|
|
71
|
+
"build": "tsdown"
|
|
79
72
|
}
|
|
80
73
|
}
|
package/src/index.ts
CHANGED
|
@@ -3,18 +3,14 @@ import devtoolsPanel from './devtoolsPanel.vue'
|
|
|
3
3
|
import type { DefineComponent } from 'vue'
|
|
4
4
|
import type { DevtoolsOptions, DevtoolsPanelOptions } from './types'
|
|
5
5
|
|
|
6
|
-
export const VueQueryDevtools =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
: devtools
|
|
12
|
-
) as DefineComponent<DevtoolsOptions, {}, unknown>
|
|
6
|
+
export const VueQueryDevtools = devtools as DefineComponent<
|
|
7
|
+
DevtoolsOptions,
|
|
8
|
+
{},
|
|
9
|
+
unknown
|
|
10
|
+
>
|
|
13
11
|
|
|
14
|
-
export const VueQueryDevtoolsPanel =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
: devtoolsPanel
|
|
20
|
-
) as DefineComponent<DevtoolsPanelOptions, {}, unknown>
|
|
12
|
+
export const VueQueryDevtoolsPanel = devtoolsPanel as DefineComponent<
|
|
13
|
+
DevtoolsPanelOptions,
|
|
14
|
+
{},
|
|
15
|
+
unknown
|
|
16
|
+
>
|
package/src/stub.ts
ADDED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const vue = require("vue");
|
|
3
|
-
const vueQuery = require("@tanstack/vue-query");
|
|
4
|
-
const queryDevtools = require("@tanstack/query-devtools");
|
|
5
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
6
|
-
__name: "devtools",
|
|
7
|
-
props: {
|
|
8
|
-
initialIsOpen: { type: Boolean },
|
|
9
|
-
buttonPosition: {},
|
|
10
|
-
position: {},
|
|
11
|
-
client: {},
|
|
12
|
-
errorTypes: {},
|
|
13
|
-
styleNonce: {},
|
|
14
|
-
shadowDOMTarget: {},
|
|
15
|
-
hideDisabledQueries: { type: Boolean },
|
|
16
|
-
theme: {}
|
|
17
|
-
},
|
|
18
|
-
setup(__props) {
|
|
19
|
-
const props = __props;
|
|
20
|
-
const div = vue.ref();
|
|
21
|
-
const client = props.client || vueQuery.useQueryClient();
|
|
22
|
-
const devtools = new queryDevtools.TanstackQueryDevtools({
|
|
23
|
-
client,
|
|
24
|
-
queryFlavor: "Vue Query",
|
|
25
|
-
version: "5",
|
|
26
|
-
onlineManager: vueQuery.onlineManager,
|
|
27
|
-
buttonPosition: props.buttonPosition,
|
|
28
|
-
position: props.position,
|
|
29
|
-
initialIsOpen: props.initialIsOpen,
|
|
30
|
-
errorTypes: props.errorTypes,
|
|
31
|
-
styleNonce: props.styleNonce,
|
|
32
|
-
shadowDOMTarget: props.shadowDOMTarget,
|
|
33
|
-
hideDisabledQueries: props.hideDisabledQueries,
|
|
34
|
-
theme: props.theme
|
|
35
|
-
});
|
|
36
|
-
vue.watchEffect(() => {
|
|
37
|
-
devtools.setButtonPosition(props.buttonPosition || "bottom-right");
|
|
38
|
-
devtools.setPosition(props.position || "bottom");
|
|
39
|
-
devtools.setInitialIsOpen(props.initialIsOpen);
|
|
40
|
-
devtools.setErrorTypes(props.errorTypes || []);
|
|
41
|
-
devtools.setTheme(props.theme || "system");
|
|
42
|
-
});
|
|
43
|
-
vue.onMounted(() => {
|
|
44
|
-
devtools.mount(div.value);
|
|
45
|
-
vue.onScopeDispose(() => {
|
|
46
|
-
devtools.unmount();
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
return (_ctx, _cache) => {
|
|
50
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
51
|
-
class: "tsqd-parent-container",
|
|
52
|
-
ref_key: "div",
|
|
53
|
-
ref: div
|
|
54
|
-
}, null, 512);
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
module.exports = _sfc_main;
|
|
59
|
-
//# sourceMappingURL=devtools.vue.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devtools.vue.cjs","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"],"names":["ref","useQueryClient","TanstackQueryDevtools","onlineManager","watchEffect","onMounted","onScopeDispose","_createElementBlock"],"mappings":";;;;;;;;;;;;;;;;;;AAMA,UAAM,QAAQ;AAEd,UAAM,MAAMA,IAAAA,IAAA;AACZ,UAAM,SAAS,MAAM,UAAUC,wBAAA;AAC/B,UAAM,WAAW,IAAIC,oCAAsB;AAAA,MACzC;AAAA,MACA,aAAa;AAAA,MACb,SAAS;AAAA,MAAA,eACTC,SAAAA;AAAAA,MACA,gBAAgB,MAAM;AAAA,MACtB,UAAU,MAAM;AAAA,MAChB,eAAe,MAAM;AAAA,MACrB,YAAY,MAAM;AAAA,MAClB,YAAY,MAAM;AAAA,MAClB,iBAAiB,MAAM;AAAA,MACvB,qBAAqB,MAAM;AAAA,MAC3B,OAAO,MAAM;AAAA,IAAA,CACd;AAEDC,QAAAA,YAAY,MAAM;AAChB,eAAS,kBAAkB,MAAM,kBAAkB,cAAc;AACjE,eAAS,YAAY,MAAM,YAAY,QAAQ;AAC/C,eAAS,iBAAiB,MAAM,aAAa;AAC7C,eAAS,cAAc,MAAM,cAAc,CAAA,CAAE;AAC7C,eAAS,SAAS,MAAM,SAAS,QAAQ;AAAA,IAC3C,CAAC;AAEDC,QAAAA,UAAU,MAAM;AACd,eAAS,MAAM,IAAI,KAAoB;AACvCC,UAAAA,eAAe,MAAM;AACnB,iBAAS,QAAA;AAAA,MACX,CAAC;AAAA,IACH,CAAC;;8BAICC,IAAAA,mBAAmD,OAAA;AAAA,QAA9C,OAAM;AAAA,iBAA4B;AAAA,QAAJ,KAAI;AAAA,MAAA;;;;;"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { DevtoolsOptions } from './types.cjs';
|
|
2
|
-
declare const _default: import('vue').DefineComponent<DevtoolsOptions, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DevtoolsOptions> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devtools.vue2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const vue = require("vue");
|
|
3
|
-
const vueQuery = require("@tanstack/vue-query");
|
|
4
|
-
const queryDevtools = require("@tanstack/query-devtools");
|
|
5
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
6
|
-
__name: "devtoolsPanel",
|
|
7
|
-
props: {
|
|
8
|
-
client: {},
|
|
9
|
-
errorTypes: {},
|
|
10
|
-
styleNonce: {},
|
|
11
|
-
shadowDOMTarget: {},
|
|
12
|
-
style: {},
|
|
13
|
-
onClose: { type: Function },
|
|
14
|
-
hideDisabledQueries: { type: Boolean },
|
|
15
|
-
theme: {}
|
|
16
|
-
},
|
|
17
|
-
setup(__props) {
|
|
18
|
-
const props = __props;
|
|
19
|
-
const style = vue.computed(() => {
|
|
20
|
-
return {
|
|
21
|
-
height: "500px",
|
|
22
|
-
...props.style
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
const div = vue.ref();
|
|
26
|
-
const client = props.client || vueQuery.useQueryClient();
|
|
27
|
-
const devtools = new queryDevtools.TanstackQueryDevtoolsPanel({
|
|
28
|
-
client,
|
|
29
|
-
queryFlavor: "Vue Query",
|
|
30
|
-
version: "5",
|
|
31
|
-
onlineManager: vueQuery.onlineManager,
|
|
32
|
-
buttonPosition: "bottom-left",
|
|
33
|
-
position: "bottom",
|
|
34
|
-
initialIsOpen: true,
|
|
35
|
-
errorTypes: props.errorTypes,
|
|
36
|
-
styleNonce: props.styleNonce,
|
|
37
|
-
shadowDOMTarget: props.shadowDOMTarget,
|
|
38
|
-
hideDisabledQueries: props.hideDisabledQueries,
|
|
39
|
-
onClose: props.onClose,
|
|
40
|
-
theme: props.theme
|
|
41
|
-
});
|
|
42
|
-
vue.watchEffect(() => {
|
|
43
|
-
devtools.setOnClose(props.onClose ?? (() => {
|
|
44
|
-
}));
|
|
45
|
-
devtools.setErrorTypes(props.errorTypes || []);
|
|
46
|
-
devtools.setTheme(props.theme);
|
|
47
|
-
});
|
|
48
|
-
vue.onMounted(() => {
|
|
49
|
-
devtools.mount(div.value);
|
|
50
|
-
vue.onScopeDispose(() => {
|
|
51
|
-
devtools.unmount();
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
return (_ctx, _cache) => {
|
|
55
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
56
|
-
style: vue.normalizeStyle(style.value),
|
|
57
|
-
class: "tsqd-parent-container",
|
|
58
|
-
ref_key: "div",
|
|
59
|
-
ref: div
|
|
60
|
-
}, null, 4);
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
module.exports = _sfc_main;
|
|
65
|
-
//# sourceMappingURL=devtoolsPanel.vue.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devtoolsPanel.vue.cjs","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"],"names":["computed","ref","useQueryClient","TanstackQueryDevtoolsPanel","onlineManager","watchEffect","onMounted","onScopeDispose","_createElementBlock"],"mappings":";;;;;;;;;;;;;;;;;AAMA,UAAM,QAAQ;AACd,UAAM,QAAQA,IAAAA,SAAc,MAAM;AAChC,aAAO;AAAA,QACL,QAAQ;AAAA,QACR,GAAG,MAAM;AAAA,MAAA;AAAA,IAEb,CAAC;AAED,UAAM,MAAMC,IAAAA,IAAA;AACZ,UAAM,SAAS,MAAM,UAAUC,wBAAA;AAC/B,UAAM,WAAW,IAAIC,yCAA2B;AAAA,MAC9C;AAAA,MACA,aAAa;AAAA,MACb,SAAS;AAAA,MAAA,eACTC,SAAAA;AAAAA,MACA,gBAAgB;AAAA,MAChB,UAAU;AAAA,MACV,eAAe;AAAA,MACf,YAAY,MAAM;AAAA,MAClB,YAAY,MAAM;AAAA,MAClB,iBAAiB,MAAM;AAAA,MACvB,qBAAqB,MAAM;AAAA,MAC3B,SAAS,MAAM;AAAA,MACf,OAAO,MAAM;AAAA,IAAA,CACd;AAEDC,QAAAA,YAAY,MAAM;AAChB,eAAS,WAAW,MAAM,YAAY,MAAM;AAAA,MAAC,EAAE;AAC/C,eAAS,cAAc,MAAM,cAAc,CAAA,CAAE;AAC7C,eAAS,SAAS,MAAM,KAAK;AAAA,IAC/B,CAAC;AAEDC,QAAAA,UAAU,MAAM;AACd,eAAS,MAAM,IAAI,KAAoB;AACvCC,UAAAA,eAAe,MAAM;AACnB,iBAAS,QAAA;AAAA,MACX,CAAC;AAAA,IACH,CAAC;;8BAICC,IAAAA,mBAAkE,OAAA;AAAA,QAA5D,0BAAO,MAAA,KAAK;AAAA,QAAE,OAAM;AAAA,iBAA4B;AAAA,QAAJ,KAAI;AAAA,MAAA;;;;;"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { DevtoolsPanelOptions } from './types.cjs';
|
|
2
|
-
declare const _default: import('vue').DefineComponent<DevtoolsPanelOptions, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DevtoolsPanelOptions> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devtoolsPanel.vue2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
package/dist/cjs/index.cjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const devtools_vue_vue_type_script_setup_true_lang = require("./devtools.vue.cjs");
|
|
4
|
-
const devtoolsPanel_vue_vue_type_script_setup_true_lang = require("./devtoolsPanel.vue.cjs");
|
|
5
|
-
const VueQueryDevtools = process.env.NODE_ENV !== "development" ? function() {
|
|
6
|
-
return null;
|
|
7
|
-
} : devtools_vue_vue_type_script_setup_true_lang;
|
|
8
|
-
const VueQueryDevtoolsPanel = process.env.NODE_ENV !== "development" ? function() {
|
|
9
|
-
return null;
|
|
10
|
-
} : devtoolsPanel_vue_vue_type_script_setup_true_lang;
|
|
11
|
-
exports.VueQueryDevtools = VueQueryDevtools;
|
|
12
|
-
exports.VueQueryDevtoolsPanel = VueQueryDevtoolsPanel;
|
|
13
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/index.ts"],"sourcesContent":["import devtools from './devtools.vue'\nimport devtoolsPanel from './devtoolsPanel.vue'\nimport type { DefineComponent } from 'vue'\nimport type { DevtoolsOptions, DevtoolsPanelOptions } from './types'\n\nexport const VueQueryDevtools = (\n process.env.NODE_ENV !== 'development'\n ? function () {\n return null\n }\n : devtools\n) as DefineComponent<DevtoolsOptions, {}, unknown>\n\nexport const VueQueryDevtoolsPanel = (\n process.env.NODE_ENV !== 'development'\n ? function () {\n return null\n }\n : devtoolsPanel\n) as DefineComponent<DevtoolsPanelOptions, {}, unknown>\n"],"names":["devtools","devtoolsPanel"],"mappings":";;;;AAKO,MAAM,mBACX,QAAQ,IAAI,aAAa,gBACrB,WAAY;AACV,SAAO;AACT,IACAA;AAGC,MAAM,wBACX,QAAQ,IAAI,aAAa,gBACrB,WAAY;AACV,SAAO;AACT,IACAC;;;"}
|
package/dist/cjs/index.d.cts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { DefineComponent } from 'vue';
|
|
2
|
-
import { DevtoolsOptions, DevtoolsPanelOptions } from './types.cjs';
|
|
3
|
-
export declare const VueQueryDevtools: DefineComponent<DevtoolsOptions, {}, unknown>;
|
|
4
|
-
export declare const VueQueryDevtoolsPanel: DefineComponent<DevtoolsPanelOptions, {}, unknown>;
|
package/dist/cjs/production.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"production.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
package/dist/cjs/types.d.cts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from '@tanstack/query-devtools';
|
|
2
|
-
import { QueryClient } from '@tanstack/vue-query';
|
|
3
|
-
export interface DevtoolsOptions {
|
|
4
|
-
/**
|
|
5
|
-
* Set this true if you want the dev tools to default to being open
|
|
6
|
-
*/
|
|
7
|
-
initialIsOpen?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* The position of the TanStack logo to open and close the devtools panel.
|
|
10
|
-
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
11
|
-
*
|
|
12
|
-
* @defaultValue bottom-right
|
|
13
|
-
*/
|
|
14
|
-
buttonPosition?: DevtoolsButtonPosition;
|
|
15
|
-
/**
|
|
16
|
-
* The position of the Vue Query devtools panel.
|
|
17
|
-
* 'top' | 'bottom' | 'left' | 'right'
|
|
18
|
-
*
|
|
19
|
-
* @defaultValue bottom
|
|
20
|
-
*/
|
|
21
|
-
position?: DevtoolsPosition;
|
|
22
|
-
/**
|
|
23
|
-
* Custom instance of QueryClient
|
|
24
|
-
*/
|
|
25
|
-
client?: QueryClient;
|
|
26
|
-
/**
|
|
27
|
-
* Use this so you can define custom errors that can be shown in the devtools.
|
|
28
|
-
*/
|
|
29
|
-
errorTypes?: Array<DevtoolsErrorType>;
|
|
30
|
-
/**
|
|
31
|
-
* 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.
|
|
32
|
-
*/
|
|
33
|
-
styleNonce?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Use this so you can attach the devtool's styles to specific element in the DOM.
|
|
36
|
-
*/
|
|
37
|
-
shadowDOMTarget?: ShadowRoot;
|
|
38
|
-
/**
|
|
39
|
-
* Set this to true to hide disabled queries from the devtools panel.
|
|
40
|
-
*/
|
|
41
|
-
hideDisabledQueries?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
|
|
44
|
-
*
|
|
45
|
-
* @defaultValue system
|
|
46
|
-
*/
|
|
47
|
-
theme?: Theme;
|
|
48
|
-
}
|
|
49
|
-
export interface DevtoolsPanelOptions {
|
|
50
|
-
/**
|
|
51
|
-
* Custom instance of QueryClient
|
|
52
|
-
*/
|
|
53
|
-
client?: QueryClient;
|
|
54
|
-
/**
|
|
55
|
-
* Use this so you can define custom errors that can be shown in the devtools.
|
|
56
|
-
*/
|
|
57
|
-
errorTypes?: Array<DevtoolsErrorType>;
|
|
58
|
-
/**
|
|
59
|
-
* 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.
|
|
60
|
-
*/
|
|
61
|
-
styleNonce?: string;
|
|
62
|
-
/**
|
|
63
|
-
* Use this so you can attach the devtool's styles to specific element in the DOM.
|
|
64
|
-
*/
|
|
65
|
-
shadowDOMTarget?: ShadowRoot;
|
|
66
|
-
/**
|
|
67
|
-
* Custom styles for the devtools panel
|
|
68
|
-
* @default { height: '500px' }
|
|
69
|
-
* @example { height: '100%' }
|
|
70
|
-
* @example { height: '100%', width: '100%' }
|
|
71
|
-
*/
|
|
72
|
-
style?: Partial<CSSStyleDeclaration>;
|
|
73
|
-
/**
|
|
74
|
-
* Callback function that is called when the devtools panel is closed
|
|
75
|
-
*/
|
|
76
|
-
onClose?: () => void;
|
|
77
|
-
/**
|
|
78
|
-
* Set this to true to hide disabled queries from the devtools panel.
|
|
79
|
-
*/
|
|
80
|
-
hideDisabledQueries?: boolean;
|
|
81
|
-
/**
|
|
82
|
-
* Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
|
|
83
|
-
*
|
|
84
|
-
* @defaultValue system
|
|
85
|
-
*/
|
|
86
|
-
theme?: Theme;
|
|
87
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { DevtoolsOptions } from './types.js';
|
|
2
|
-
declare const _default: import('vue').DefineComponent<DevtoolsOptions, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DevtoolsOptions> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
-
export default _default;
|
package/dist/esm/devtools.vue.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, watchEffect, onMounted, onScopeDispose, openBlock, createElementBlock } from "vue";
|
|
2
|
-
import { useQueryClient, onlineManager } from "@tanstack/vue-query";
|
|
3
|
-
import { TanstackQueryDevtools } from "@tanstack/query-devtools";
|
|
4
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
-
__name: "devtools",
|
|
6
|
-
props: {
|
|
7
|
-
initialIsOpen: { type: Boolean },
|
|
8
|
-
buttonPosition: {},
|
|
9
|
-
position: {},
|
|
10
|
-
client: {},
|
|
11
|
-
errorTypes: {},
|
|
12
|
-
styleNonce: {},
|
|
13
|
-
shadowDOMTarget: {},
|
|
14
|
-
hideDisabledQueries: { type: Boolean },
|
|
15
|
-
theme: {}
|
|
16
|
-
},
|
|
17
|
-
setup(__props) {
|
|
18
|
-
const props = __props;
|
|
19
|
-
const div = ref();
|
|
20
|
-
const client = props.client || useQueryClient();
|
|
21
|
-
const devtools = new TanstackQueryDevtools({
|
|
22
|
-
client,
|
|
23
|
-
queryFlavor: "Vue Query",
|
|
24
|
-
version: "5",
|
|
25
|
-
onlineManager,
|
|
26
|
-
buttonPosition: props.buttonPosition,
|
|
27
|
-
position: props.position,
|
|
28
|
-
initialIsOpen: props.initialIsOpen,
|
|
29
|
-
errorTypes: props.errorTypes,
|
|
30
|
-
styleNonce: props.styleNonce,
|
|
31
|
-
shadowDOMTarget: props.shadowDOMTarget,
|
|
32
|
-
hideDisabledQueries: props.hideDisabledQueries,
|
|
33
|
-
theme: props.theme
|
|
34
|
-
});
|
|
35
|
-
watchEffect(() => {
|
|
36
|
-
devtools.setButtonPosition(props.buttonPosition || "bottom-right");
|
|
37
|
-
devtools.setPosition(props.position || "bottom");
|
|
38
|
-
devtools.setInitialIsOpen(props.initialIsOpen);
|
|
39
|
-
devtools.setErrorTypes(props.errorTypes || []);
|
|
40
|
-
devtools.setTheme(props.theme || "system");
|
|
41
|
-
});
|
|
42
|
-
onMounted(() => {
|
|
43
|
-
devtools.mount(div.value);
|
|
44
|
-
onScopeDispose(() => {
|
|
45
|
-
devtools.unmount();
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
return (_ctx, _cache) => {
|
|
49
|
-
return openBlock(), createElementBlock("div", {
|
|
50
|
-
class: "tsqd-parent-container",
|
|
51
|
-
ref_key: "div",
|
|
52
|
-
ref: div
|
|
53
|
-
}, null, 512);
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
export {
|
|
58
|
-
_sfc_main as default
|
|
59
|
-
};
|
|
60
|
-
//# sourceMappingURL=devtools.vue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devtools.vue.js","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"],"names":["_createElementBlock"],"mappings":";;;;;;;;;;;;;;;;;AAMA,UAAM,QAAQ;AAEd,UAAM,MAAM,IAAA;AACZ,UAAM,SAAS,MAAM,UAAU,eAAA;AAC/B,UAAM,WAAW,IAAI,sBAAsB;AAAA,MACzC;AAAA,MACA,aAAa;AAAA,MACb,SAAS;AAAA,MACT;AAAA,MACA,gBAAgB,MAAM;AAAA,MACtB,UAAU,MAAM;AAAA,MAChB,eAAe,MAAM;AAAA,MACrB,YAAY,MAAM;AAAA,MAClB,YAAY,MAAM;AAAA,MAClB,iBAAiB,MAAM;AAAA,MACvB,qBAAqB,MAAM;AAAA,MAC3B,OAAO,MAAM;AAAA,IAAA,CACd;AAED,gBAAY,MAAM;AAChB,eAAS,kBAAkB,MAAM,kBAAkB,cAAc;AACjE,eAAS,YAAY,MAAM,YAAY,QAAQ;AAC/C,eAAS,iBAAiB,MAAM,aAAa;AAC7C,eAAS,cAAc,MAAM,cAAc,CAAA,CAAE;AAC7C,eAAS,SAAS,MAAM,SAAS,QAAQ;AAAA,IAC3C,CAAC;AAED,cAAU,MAAM;AACd,eAAS,MAAM,IAAI,KAAoB;AACvC,qBAAe,MAAM;AACnB,iBAAS,QAAA;AAAA,MACX,CAAC;AAAA,IACH,CAAC;;0BAICA,mBAAmD,OAAA;AAAA,QAA9C,OAAM;AAAA,iBAA4B;AAAA,QAAJ,KAAI;AAAA,MAAA;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devtools.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { DevtoolsPanelOptions } from './types.js';
|
|
2
|
-
declare const _default: import('vue').DefineComponent<DevtoolsPanelOptions, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DevtoolsPanelOptions> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
-
export default _default;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, watchEffect, onMounted, onScopeDispose, openBlock, createElementBlock, normalizeStyle } from "vue";
|
|
2
|
-
import { useQueryClient, onlineManager } from "@tanstack/vue-query";
|
|
3
|
-
import { TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
|
|
4
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
-
__name: "devtoolsPanel",
|
|
6
|
-
props: {
|
|
7
|
-
client: {},
|
|
8
|
-
errorTypes: {},
|
|
9
|
-
styleNonce: {},
|
|
10
|
-
shadowDOMTarget: {},
|
|
11
|
-
style: {},
|
|
12
|
-
onClose: { type: Function },
|
|
13
|
-
hideDisabledQueries: { type: Boolean },
|
|
14
|
-
theme: {}
|
|
15
|
-
},
|
|
16
|
-
setup(__props) {
|
|
17
|
-
const props = __props;
|
|
18
|
-
const style = computed(() => {
|
|
19
|
-
return {
|
|
20
|
-
height: "500px",
|
|
21
|
-
...props.style
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
const div = ref();
|
|
25
|
-
const client = props.client || useQueryClient();
|
|
26
|
-
const devtools = new TanstackQueryDevtoolsPanel({
|
|
27
|
-
client,
|
|
28
|
-
queryFlavor: "Vue Query",
|
|
29
|
-
version: "5",
|
|
30
|
-
onlineManager,
|
|
31
|
-
buttonPosition: "bottom-left",
|
|
32
|
-
position: "bottom",
|
|
33
|
-
initialIsOpen: true,
|
|
34
|
-
errorTypes: props.errorTypes,
|
|
35
|
-
styleNonce: props.styleNonce,
|
|
36
|
-
shadowDOMTarget: props.shadowDOMTarget,
|
|
37
|
-
hideDisabledQueries: props.hideDisabledQueries,
|
|
38
|
-
onClose: props.onClose,
|
|
39
|
-
theme: props.theme
|
|
40
|
-
});
|
|
41
|
-
watchEffect(() => {
|
|
42
|
-
devtools.setOnClose(props.onClose ?? (() => {
|
|
43
|
-
}));
|
|
44
|
-
devtools.setErrorTypes(props.errorTypes || []);
|
|
45
|
-
devtools.setTheme(props.theme);
|
|
46
|
-
});
|
|
47
|
-
onMounted(() => {
|
|
48
|
-
devtools.mount(div.value);
|
|
49
|
-
onScopeDispose(() => {
|
|
50
|
-
devtools.unmount();
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
return (_ctx, _cache) => {
|
|
54
|
-
return openBlock(), createElementBlock("div", {
|
|
55
|
-
style: normalizeStyle(style.value),
|
|
56
|
-
class: "tsqd-parent-container",
|
|
57
|
-
ref_key: "div",
|
|
58
|
-
ref: div
|
|
59
|
-
}, null, 4);
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
export {
|
|
64
|
-
_sfc_main as default
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=devtoolsPanel.vue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devtoolsPanel.vue.js","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"],"names":["_createElementBlock"],"mappings":";;;;;;;;;;;;;;;;AAMA,UAAM,QAAQ;AACd,UAAM,QAAQ,SAAc,MAAM;AAChC,aAAO;AAAA,QACL,QAAQ;AAAA,QACR,GAAG,MAAM;AAAA,MAAA;AAAA,IAEb,CAAC;AAED,UAAM,MAAM,IAAA;AACZ,UAAM,SAAS,MAAM,UAAU,eAAA;AAC/B,UAAM,WAAW,IAAI,2BAA2B;AAAA,MAC9C;AAAA,MACA,aAAa;AAAA,MACb,SAAS;AAAA,MACT;AAAA,MACA,gBAAgB;AAAA,MAChB,UAAU;AAAA,MACV,eAAe;AAAA,MACf,YAAY,MAAM;AAAA,MAClB,YAAY,MAAM;AAAA,MAClB,iBAAiB,MAAM;AAAA,MACvB,qBAAqB,MAAM;AAAA,MAC3B,SAAS,MAAM;AAAA,MACf,OAAO,MAAM;AAAA,IAAA,CACd;AAED,gBAAY,MAAM;AAChB,eAAS,WAAW,MAAM,YAAY,MAAM;AAAA,MAAC,EAAE;AAC/C,eAAS,cAAc,MAAM,cAAc,CAAA,CAAE;AAC7C,eAAS,SAAS,MAAM,KAAK;AAAA,IAC/B,CAAC;AAED,cAAU,MAAM;AACd,eAAS,MAAM,IAAI,KAAoB;AACvC,qBAAe,MAAM;AACnB,iBAAS,QAAA;AAAA,MACX,CAAC;AAAA,IACH,CAAC;;0BAICA,mBAAkE,OAAA;AAAA,QAA5D,sBAAO,MAAA,KAAK;AAAA,QAAE,OAAM;AAAA,iBAA4B;AAAA,QAAJ,KAAI;AAAA,MAAA;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devtoolsPanel.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/esm/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./devtools.vue.js";
|
|
2
|
-
import _sfc_main$1 from "./devtoolsPanel.vue.js";
|
|
3
|
-
const VueQueryDevtools = process.env.NODE_ENV !== "development" ? function() {
|
|
4
|
-
return null;
|
|
5
|
-
} : _sfc_main;
|
|
6
|
-
const VueQueryDevtoolsPanel = process.env.NODE_ENV !== "development" ? function() {
|
|
7
|
-
return null;
|
|
8
|
-
} : _sfc_main$1;
|
|
9
|
-
export {
|
|
10
|
-
VueQueryDevtools,
|
|
11
|
-
VueQueryDevtoolsPanel
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import devtools from './devtools.vue'\nimport devtoolsPanel from './devtoolsPanel.vue'\nimport type { DefineComponent } from 'vue'\nimport type { DevtoolsOptions, DevtoolsPanelOptions } from './types'\n\nexport const VueQueryDevtools = (\n process.env.NODE_ENV !== 'development'\n ? function () {\n return null\n }\n : devtools\n) as DefineComponent<DevtoolsOptions, {}, unknown>\n\nexport const VueQueryDevtoolsPanel = (\n process.env.NODE_ENV !== 'development'\n ? function () {\n return null\n }\n : devtoolsPanel\n) as DefineComponent<DevtoolsPanelOptions, {}, unknown>\n"],"names":["devtools","devtoolsPanel"],"mappings":";;AAKO,MAAM,mBACX,QAAQ,IAAI,aAAa,gBACrB,WAAY;AACV,SAAO;AACT,IACAA;AAGC,MAAM,wBACX,QAAQ,IAAI,aAAa,gBACrB,WAAY;AACV,SAAO;AACT,IACAC;"}
|
package/dist/esm/production.d.ts
DELETED
package/dist/esm/production.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/esm/types.d.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from '@tanstack/query-devtools';
|
|
2
|
-
import { QueryClient } from '@tanstack/vue-query';
|
|
3
|
-
export interface DevtoolsOptions {
|
|
4
|
-
/**
|
|
5
|
-
* Set this true if you want the dev tools to default to being open
|
|
6
|
-
*/
|
|
7
|
-
initialIsOpen?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* The position of the TanStack logo to open and close the devtools panel.
|
|
10
|
-
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
11
|
-
*
|
|
12
|
-
* @defaultValue bottom-right
|
|
13
|
-
*/
|
|
14
|
-
buttonPosition?: DevtoolsButtonPosition;
|
|
15
|
-
/**
|
|
16
|
-
* The position of the Vue Query devtools panel.
|
|
17
|
-
* 'top' | 'bottom' | 'left' | 'right'
|
|
18
|
-
*
|
|
19
|
-
* @defaultValue bottom
|
|
20
|
-
*/
|
|
21
|
-
position?: DevtoolsPosition;
|
|
22
|
-
/**
|
|
23
|
-
* Custom instance of QueryClient
|
|
24
|
-
*/
|
|
25
|
-
client?: QueryClient;
|
|
26
|
-
/**
|
|
27
|
-
* Use this so you can define custom errors that can be shown in the devtools.
|
|
28
|
-
*/
|
|
29
|
-
errorTypes?: Array<DevtoolsErrorType>;
|
|
30
|
-
/**
|
|
31
|
-
* 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.
|
|
32
|
-
*/
|
|
33
|
-
styleNonce?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Use this so you can attach the devtool's styles to specific element in the DOM.
|
|
36
|
-
*/
|
|
37
|
-
shadowDOMTarget?: ShadowRoot;
|
|
38
|
-
/**
|
|
39
|
-
* Set this to true to hide disabled queries from the devtools panel.
|
|
40
|
-
*/
|
|
41
|
-
hideDisabledQueries?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
|
|
44
|
-
*
|
|
45
|
-
* @defaultValue system
|
|
46
|
-
*/
|
|
47
|
-
theme?: Theme;
|
|
48
|
-
}
|
|
49
|
-
export interface DevtoolsPanelOptions {
|
|
50
|
-
/**
|
|
51
|
-
* Custom instance of QueryClient
|
|
52
|
-
*/
|
|
53
|
-
client?: QueryClient;
|
|
54
|
-
/**
|
|
55
|
-
* Use this so you can define custom errors that can be shown in the devtools.
|
|
56
|
-
*/
|
|
57
|
-
errorTypes?: Array<DevtoolsErrorType>;
|
|
58
|
-
/**
|
|
59
|
-
* 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.
|
|
60
|
-
*/
|
|
61
|
-
styleNonce?: string;
|
|
62
|
-
/**
|
|
63
|
-
* Use this so you can attach the devtool's styles to specific element in the DOM.
|
|
64
|
-
*/
|
|
65
|
-
shadowDOMTarget?: ShadowRoot;
|
|
66
|
-
/**
|
|
67
|
-
* Custom styles for the devtools panel
|
|
68
|
-
* @default { height: '500px' }
|
|
69
|
-
* @example { height: '100%' }
|
|
70
|
-
* @example { height: '100%', width: '100%' }
|
|
71
|
-
*/
|
|
72
|
-
style?: Partial<CSSStyleDeclaration>;
|
|
73
|
-
/**
|
|
74
|
-
* Callback function that is called when the devtools panel is closed
|
|
75
|
-
*/
|
|
76
|
-
onClose?: () => void;
|
|
77
|
-
/**
|
|
78
|
-
* Set this to true to hide disabled queries from the devtools panel.
|
|
79
|
-
*/
|
|
80
|
-
hideDisabledQueries?: boolean;
|
|
81
|
-
/**
|
|
82
|
-
* Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
|
|
83
|
-
*
|
|
84
|
-
* @defaultValue system
|
|
85
|
-
*/
|
|
86
|
-
theme?: Theme;
|
|
87
|
-
}
|
package/src/production.ts
DELETED
|
File without changes
|