@tanstack/vue-router-ssr-query 1.166.7 → 1.166.9
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/esm/index.js +20 -25
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -1,29 +1,24 @@
|
|
|
1
1
|
import * as Vue from "vue";
|
|
2
2
|
import { setupCoreRouterSsrQueryIntegration } from "@tanstack/router-ssr-query-core";
|
|
3
|
-
|
|
3
|
+
//#region src/index.tsx
|
|
4
|
+
var VUE_QUERY_CLIENT = "VUE_QUERY_CLIENT";
|
|
4
5
|
function setupRouterSsrQueryIntegration(opts) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return Vue.h(OGWrap, null, () => children);
|
|
20
|
-
}
|
|
21
|
-
return children;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
});
|
|
6
|
+
setupCoreRouterSsrQueryIntegration(opts);
|
|
7
|
+
if (opts.wrapQueryClient === false) return;
|
|
8
|
+
const OGWrap = opts.router.options.Wrap;
|
|
9
|
+
opts.router.options.Wrap = Vue.defineComponent({
|
|
10
|
+
name: "QueryClientWrapper",
|
|
11
|
+
setup(_, { slots }) {
|
|
12
|
+
Vue.provide(VUE_QUERY_CLIENT, opts.queryClient);
|
|
13
|
+
return () => {
|
|
14
|
+
const children = slots.default?.();
|
|
15
|
+
if (OGWrap) return Vue.h(OGWrap, null, () => children);
|
|
16
|
+
return children;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
});
|
|
25
20
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=index.js.map
|
|
21
|
+
//#endregion
|
|
22
|
+
export { setupRouterSsrQueryIntegration };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/index.tsx"],"sourcesContent":["import * as Vue from 'vue'\nimport { setupCoreRouterSsrQueryIntegration } from '@tanstack/router-ssr-query-core'\nimport type { RouterSsrQueryOptions } from '@tanstack/router-ssr-query-core'\nimport type { AnyRouter } from '@tanstack/vue-router'\n\n// Vue Query uses this string as the injection key\nconst VUE_QUERY_CLIENT = 'VUE_QUERY_CLIENT'\n\nexport type Options<TRouter extends AnyRouter> =\n RouterSsrQueryOptions<TRouter> & {\n wrapQueryClient?: boolean\n }\n\nexport function setupRouterSsrQueryIntegration<TRouter extends AnyRouter>(\n opts: Options<TRouter>,\n) {\n setupCoreRouterSsrQueryIntegration(opts)\n\n if (opts.wrapQueryClient === false) {\n return\n }\n\n const OGWrap = opts.router.options.Wrap\n\n opts.router.options.Wrap = Vue.defineComponent({\n name: 'QueryClientWrapper',\n setup(_, { slots }) {\n Vue.provide(VUE_QUERY_CLIENT, opts.queryClient)\n return () => {\n const children = slots.default?.()\n if (OGWrap) {\n return Vue.h(OGWrap, null, () => children)\n }\n return children\n }\n },\n }) as any\n}\n"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":["Vue","setupCoreRouterSsrQueryIntegration","VUE_QUERY_CLIENT","setupRouterSsrQueryIntegration","opts","wrapQueryClient","OGWrap","router","options","Wrap","defineComponent","name","setup","_","slots","provide","queryClient","children","default","h"],"sources":["../../src/index.tsx"],"sourcesContent":["import * as Vue from 'vue'\nimport { setupCoreRouterSsrQueryIntegration } from '@tanstack/router-ssr-query-core'\nimport type { RouterSsrQueryOptions } from '@tanstack/router-ssr-query-core'\nimport type { AnyRouter } from '@tanstack/vue-router'\n\n// Vue Query uses this string as the injection key\nconst VUE_QUERY_CLIENT = 'VUE_QUERY_CLIENT'\n\nexport type Options<TRouter extends AnyRouter> =\n RouterSsrQueryOptions<TRouter> & {\n wrapQueryClient?: boolean\n }\n\nexport function setupRouterSsrQueryIntegration<TRouter extends AnyRouter>(\n opts: Options<TRouter>,\n) {\n setupCoreRouterSsrQueryIntegration(opts)\n\n if (opts.wrapQueryClient === false) {\n return\n }\n\n const OGWrap = opts.router.options.Wrap\n\n opts.router.options.Wrap = Vue.defineComponent({\n name: 'QueryClientWrapper',\n setup(_, { slots }) {\n Vue.provide(VUE_QUERY_CLIENT, opts.queryClient)\n return () => {\n const children = slots.default?.()\n if (OGWrap) {\n return Vue.h(OGWrap, null, () => children)\n }\n return children\n }\n },\n }) as any\n}\n"],"mappings":";;;AAMA,IAAME,mBAAmB;AAOzB,SAAgBC,+BACdC,MACA;AACAH,oCAAmCG,KAAK;AAExC,KAAIA,KAAKC,oBAAoB,MAC3B;CAGF,MAAMC,SAASF,KAAKG,OAAOC,QAAQC;AAEnCL,MAAKG,OAAOC,QAAQC,OAAOT,IAAIU,gBAAgB;EAC7CC,MAAM;EACNC,MAAMC,GAAG,EAAEC,SAAS;AAClBd,OAAIe,QAAQb,kBAAkBE,KAAKY,YAAY;AAC/C,gBAAa;IACX,MAAMC,WAAWH,MAAMI,WAAW;AAClC,QAAIZ,OACF,QAAON,IAAImB,EAAEb,QAAQ,YAAYW,SAAS;AAE5C,WAAOA;;;EAGZ,CAAQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/vue-router-ssr-query",
|
|
3
|
-
"version": "1.166.
|
|
3
|
+
"version": "1.166.9",
|
|
4
4
|
"description": "Modern and scalable routing for Vue applications",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
"node": ">=20.19"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@tanstack/router-ssr-query-core": "1.166.
|
|
47
|
+
"@tanstack/router-ssr-query-core": "1.166.9"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@tanstack/vue-query": "^5.92.0",
|
|
51
51
|
"@vitejs/plugin-vue-jsx": "^4.1.2",
|
|
52
52
|
"vite": "*",
|
|
53
53
|
"vue": "^3.5.25",
|
|
54
|
-
"@tanstack/vue-router": "1.
|
|
54
|
+
"@tanstack/vue-router": "1.167.2"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@tanstack/query-core": ">=5.90.0",
|