@tanstack/vue-query-devtools 5.17.9 → 5.17.11

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.
@@ -0,0 +1,52 @@
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
+ },
15
+ setup(__props) {
16
+ const props = __props;
17
+ const div = vue.ref();
18
+ const client = props.client || vueQuery.useQueryClient();
19
+ const devtools = new queryDevtools.TanstackQueryDevtools({
20
+ client,
21
+ queryFlavor: "Vue Query",
22
+ version: "5",
23
+ onlineManager: vueQuery.onlineManager,
24
+ buttonPosition: props.buttonPosition,
25
+ position: props.position,
26
+ initialIsOpen: props.initialIsOpen,
27
+ errorTypes: props.errorTypes,
28
+ styleNonce: props.styleNonce
29
+ });
30
+ vue.watchEffect(() => {
31
+ devtools.setButtonPosition(props.buttonPosition || "bottom-left");
32
+ devtools.setPosition(props.position || "bottom");
33
+ devtools.setInitialIsOpen(props.initialIsOpen);
34
+ devtools.setErrorTypes(props.errorTypes || []);
35
+ });
36
+ vue.onMounted(() => {
37
+ devtools.mount(div.value);
38
+ });
39
+ vue.onScopeDispose(() => {
40
+ devtools.unmount();
41
+ });
42
+ return (_ctx, _cache) => {
43
+ return vue.openBlock(), vue.createElementBlock("div", {
44
+ className: "tsqd-parent-container",
45
+ ref_key: "div",
46
+ ref: div
47
+ }, null, 512);
48
+ };
49
+ }
50
+ });
51
+ module.exports = _sfc_main;
52
+ //# sourceMappingURL=devtools.vue.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtools.vue.cjs","sources":["../../src/devtools.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { onMounted, onScopeDispose, watchEffect, ref } 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})\n\nwatchEffect(() => {\n devtools.setButtonPosition(props.buttonPosition || 'bottom-left')\n devtools.setPosition(props.position || 'bottom')\n devtools.setInitialIsOpen(props.initialIsOpen)\n devtools.setErrorTypes(props.errorTypes || [])\n})\n\nonMounted(() => {\n devtools.mount(div.value as HTMLElement)\n})\n\nonScopeDispose(() => {\n devtools.unmount()\n})\n</script>\n\n<template>\n <div className=\"tsqd-parent-container\" ref=\"div\"></div>\n</template>\n"],"names":["ref","useQueryClient","TanstackQueryDevtools","onlineManager","watchEffect","onMounted","onScopeDispose"],"mappings":";;;;;;;;;;;;;;;;AAQA,UAAM,MAAMA,IAAAA;AACN,UAAA,SAAS,MAAM,UAAUC,SAAe,eAAA;AACxC,UAAA,WAAW,IAAIC,oCAAsB;AAAA,MACzC;AAAA,MACA,aAAa;AAAA,MACb,SAAS;AAAA,MAAA,eACTC,SAAA;AAAA,MACA,gBAAgB,MAAM;AAAA,MACtB,UAAU,MAAM;AAAA,MAChB,eAAe,MAAM;AAAA,MACrB,YAAY,MAAM;AAAA,MAClB,YAAY,MAAM;AAAA,IAAA,CACnB;AAEDC,QAAAA,YAAY,MAAM;AACP,eAAA,kBAAkB,MAAM,kBAAkB,aAAa;AACvD,eAAA,YAAY,MAAM,YAAY,QAAQ;AACtC,eAAA,iBAAiB,MAAM,aAAa;AAC7C,eAAS,cAAc,MAAM,cAAc,CAAE,CAAA;AAAA,IAAA,CAC9C;AAEDC,QAAAA,UAAU,MAAM;AACL,eAAA,MAAM,IAAI,KAAoB;AAAA,IAAA,CACxC;AAEDC,QAAAA,eAAe,MAAM;AACnB,eAAS,QAAQ;AAAA,IAAA,CAClB;;;;;;;;;;;"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ const devtools_vue_vue_type_script_setup_true_lang = require("./devtools.vue.cjs");
3
+ module.exports = devtools_vue_vue_type_script_setup_true_lang;
4
+ //# sourceMappingURL=devtools.vue2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtools.vue2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,8 @@
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 VueQueryDevtools = process.env.NODE_ENV !== "development" ? function() {
5
+ return null;
6
+ } : devtools_vue_vue_type_script_setup_true_lang;
7
+ exports.VueQueryDevtools = VueQueryDevtools;
8
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../src/index.ts"],"sourcesContent":["import devtools from './devtools.vue'\nimport type { DefineComponent } from 'vue'\nimport type { DevtoolsOptions } 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"],"names":["devtools"],"mappings":";;;AAIO,MAAM,mBACX,QAAQ,IAAI,aAAa,gBACrB,WAAY;AACH,SAAA;AACT,IACAA;;"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ const devtools_vue_vue_type_script_setup_true_lang = require("./devtools.vue.cjs");
3
+ module.exports = devtools_vue_vue_type_script_setup_true_lang;
4
+ //# sourceMappingURL=production.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"production.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,12 @@
1
+ import type { DevtoolsOptions } from './types';
2
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<DevtoolsOptions>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<DevtoolsOptions>>>, {}, {}>;
3
+ export default _default;
4
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
5
+ type __VLS_TypePropsToRuntimeProps<T> = {
6
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
7
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
8
+ } : {
9
+ type: import('vue').PropType<T[K]>;
10
+ required: true;
11
+ };
12
+ };
@@ -0,0 +1,53 @@
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
+ },
14
+ setup(__props) {
15
+ const props = __props;
16
+ const div = ref();
17
+ const client = props.client || useQueryClient();
18
+ const devtools = new TanstackQueryDevtools({
19
+ client,
20
+ queryFlavor: "Vue Query",
21
+ version: "5",
22
+ onlineManager,
23
+ buttonPosition: props.buttonPosition,
24
+ position: props.position,
25
+ initialIsOpen: props.initialIsOpen,
26
+ errorTypes: props.errorTypes,
27
+ styleNonce: props.styleNonce
28
+ });
29
+ watchEffect(() => {
30
+ devtools.setButtonPosition(props.buttonPosition || "bottom-left");
31
+ devtools.setPosition(props.position || "bottom");
32
+ devtools.setInitialIsOpen(props.initialIsOpen);
33
+ devtools.setErrorTypes(props.errorTypes || []);
34
+ });
35
+ onMounted(() => {
36
+ devtools.mount(div.value);
37
+ });
38
+ onScopeDispose(() => {
39
+ devtools.unmount();
40
+ });
41
+ return (_ctx, _cache) => {
42
+ return openBlock(), createElementBlock("div", {
43
+ className: "tsqd-parent-container",
44
+ ref_key: "div",
45
+ ref: div
46
+ }, null, 512);
47
+ };
48
+ }
49
+ });
50
+ export {
51
+ _sfc_main as default
52
+ };
53
+ //# sourceMappingURL=devtools.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtools.vue.js","sources":["../../src/devtools.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { onMounted, onScopeDispose, watchEffect, ref } 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})\n\nwatchEffect(() => {\n devtools.setButtonPosition(props.buttonPosition || 'bottom-left')\n devtools.setPosition(props.position || 'bottom')\n devtools.setInitialIsOpen(props.initialIsOpen)\n devtools.setErrorTypes(props.errorTypes || [])\n})\n\nonMounted(() => {\n devtools.mount(div.value as HTMLElement)\n})\n\nonScopeDispose(() => {\n devtools.unmount()\n})\n</script>\n\n<template>\n <div className=\"tsqd-parent-container\" ref=\"div\"></div>\n</template>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAQA,UAAM,MAAM;AACN,UAAA,SAAS,MAAM,UAAU,eAAe;AACxC,UAAA,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,IAAA,CACnB;AAED,gBAAY,MAAM;AACP,eAAA,kBAAkB,MAAM,kBAAkB,aAAa;AACvD,eAAA,YAAY,MAAM,YAAY,QAAQ;AACtC,eAAA,iBAAiB,MAAM,aAAa;AAC7C,eAAS,cAAc,MAAM,cAAc,CAAE,CAAA;AAAA,IAAA,CAC9C;AAED,cAAU,MAAM;AACL,eAAA,MAAM,IAAI,KAAoB;AAAA,IAAA,CACxC;AAED,mBAAe,MAAM;AACnB,eAAS,QAAQ;AAAA,IAAA,CAClB;;;;;;;;;;"}
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./devtools.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
5
+ //# sourceMappingURL=devtools.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtools.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,3 @@
1
+ import type { DefineComponent } from 'vue';
2
+ import type { DevtoolsOptions } from './types';
3
+ export declare const VueQueryDevtools: DefineComponent<DevtoolsOptions, {}, unknown>;
@@ -0,0 +1,8 @@
1
+ import _sfc_main from "./devtools.vue.js";
2
+ const VueQueryDevtools = process.env.NODE_ENV !== "development" ? function() {
3
+ return null;
4
+ } : _sfc_main;
5
+ export {
6
+ VueQueryDevtools
7
+ };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import devtools from './devtools.vue'\nimport type { DefineComponent } from 'vue'\nimport type { DevtoolsOptions } 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"],"names":["devtools"],"mappings":";AAIO,MAAM,mBACX,QAAQ,IAAI,aAAa,gBACrB,WAAY;AACH,SAAA;AACT,IACAA;"}
@@ -0,0 +1,2 @@
1
+ import devtools from './devtools.vue';
2
+ export default devtools;
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./devtools.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
5
+ //# sourceMappingURL=production.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,32 @@
1
+ import type { DevToolsErrorType, DevtoolsButtonPosition, DevtoolsPosition } from '@tanstack/query-devtools';
2
+ import type { 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 React Query logo to open and close the devtools panel.
10
+ * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
11
+ * Defaults to 'bottom-left'.
12
+ */
13
+ buttonPosition?: DevtoolsButtonPosition;
14
+ /**
15
+ * The position of the React Query devtools panel.
16
+ * 'top' | 'bottom' | 'left' | 'right'
17
+ * Defaults to 'bottom'.
18
+ */
19
+ position?: DevtoolsPosition;
20
+ /**
21
+ * Custom instance of QueryClient
22
+ */
23
+ client?: QueryClient;
24
+ /**
25
+ * Use this so you can define custom errors that can be shown in the devtools.
26
+ */
27
+ errorTypes?: Array<DevToolsErrorType>;
28
+ /**
29
+ * 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.
30
+ */
31
+ styleNonce?: string;
32
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/vue-query-devtools",
3
- "version": "5.17.9",
3
+ "version": "5.17.11",
4
4
  "description": "Developer tools to interact with and visualize the TanStack/vue-query cache",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -15,21 +15,21 @@
15
15
  "url": "https://github.com/sponsors/tannerlinsley"
16
16
  },
17
17
  "type": "module",
18
- "types": "dist/index.d.ts",
19
- "module": "dist/index.js",
20
- "main": "dist/index.js",
18
+ "types": "dist/esm/index.d.ts",
19
+ "module": "dist/esm/index.js",
20
+ "main": "dist/esm/index.js",
21
21
  "exports": {
22
22
  ".": {
23
- "types": "./dist/index.d.ts",
24
- "default": "./dist/index.js"
23
+ "types": "./dist/esm/index.d.ts",
24
+ "default": "./dist/esm/index.js"
25
25
  },
26
26
  "./production": {
27
- "types": "./dist/production.d.ts",
28
- "default": "./dist/production.js"
27
+ "types": "./dist/esm/production.d.ts",
28
+ "default": "./dist/esm/production.js"
29
29
  },
30
30
  "./dist/production.js": {
31
- "types": "./dist/production.d.ts",
32
- "default": "./dist/production.js"
31
+ "types": "./dist/esm/production.d.ts",
32
+ "default": "./dist/esm/production.js"
33
33
  },
34
34
  "./package.json": "./package.json"
35
35
  },
@@ -46,17 +46,17 @@
46
46
  "vite": "^5.0.10",
47
47
  "vue": "^3.3.0",
48
48
  "vue-tsc": "^1.8.26",
49
- "@tanstack/vue-query": "5.17.9"
49
+ "@tanstack/vue-query": "5.17.11"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "vue": "^3.3.0",
53
- "@tanstack/vue-query": "^5.17.9"
53
+ "@tanstack/vue-query": "^5.17.11"
54
54
  },
55
55
  "scripts": {
56
56
  "clean": "rimraf ./build && rimraf ./coverage",
57
57
  "test:eslint": "eslint --ext .ts,.tsx ./src",
58
58
  "test:types": "vue-tsc",
59
59
  "test:build": "publint --strict",
60
- "build": "vite build && vue-tsc"
60
+ "build": "vite build"
61
61
  }
62
62
  }