@tanstack/solid-router-ssr-query 2.0.0-alpha.1 → 2.0.0-alpha.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.
- package/dist/cjs/index.cjs +22 -24
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +20 -23
- package/dist/esm/index.js.map +1 -1
- package/package.json +8 -8
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
let _solidjs_web = require("@solidjs/web");
|
|
3
|
+
let _tanstack_solid_query = require("@tanstack/solid-query");
|
|
4
|
+
let _tanstack_router_ssr_query_core = require("@tanstack/router-ssr-query-core");
|
|
5
|
+
//#region src/index.tsx
|
|
6
6
|
function setupRouterSsrQueryIntegration(opts) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
};
|
|
7
|
+
(0, _tanstack_router_ssr_query_core.setupCoreRouterSsrQueryIntegration)(opts);
|
|
8
|
+
if (opts.wrapQueryClient === false) return;
|
|
9
|
+
const OGWrap = opts.router.options.Wrap || ((props) => props.children);
|
|
10
|
+
opts.router.options.Wrap = (props) => {
|
|
11
|
+
return (0, _solidjs_web.createComponent)(_tanstack_solid_query.QueryClientProvider, {
|
|
12
|
+
get client() {
|
|
13
|
+
return opts.queryClient;
|
|
14
|
+
},
|
|
15
|
+
get children() {
|
|
16
|
+
return (0, _solidjs_web.createComponent)(OGWrap, { get children() {
|
|
17
|
+
return props.children;
|
|
18
|
+
} });
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
};
|
|
26
22
|
}
|
|
23
|
+
//#endregion
|
|
27
24
|
exports.setupRouterSsrQueryIntegration = setupRouterSsrQueryIntegration;
|
|
28
|
-
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/index.tsx"],"sourcesContent":["import { QueryClientProvider } from '@tanstack/solid-query'\nimport { setupCoreRouterSsrQueryIntegration } from '@tanstack/router-ssr-query-core'\nimport type { RouterSsrQueryOptions } from '@tanstack/router-ssr-query-core'\nimport type { AnyRouter } from '@tanstack/solid-router'\nimport type { JSX } from 'solid-js'\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 =\n opts.router.options.Wrap ||\n ((props: { children: JSX.Element }) => props.children)\n\n opts.router.options.Wrap = (props) => {\n return (\n <QueryClientProvider client={opts.queryClient}>\n <OGWrap>{props.children}</OGWrap>\n </QueryClientProvider>\n )\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["QueryClientProvider","setupCoreRouterSsrQueryIntegration","RouterSsrQueryOptions","AnyRouter","JSX","Options","TRouter","wrapQueryClient","setupRouterSsrQueryIntegration","opts","OGWrap","router","options","Wrap","props","children","Element","_$createComponent","client","queryClient"],"sources":["../../src/index.tsx"],"sourcesContent":["import { QueryClientProvider } from '@tanstack/solid-query'\nimport { setupCoreRouterSsrQueryIntegration } from '@tanstack/router-ssr-query-core'\nimport type { RouterSsrQueryOptions } from '@tanstack/router-ssr-query-core'\nimport type { AnyRouter } from '@tanstack/solid-router'\nimport type { JSX } from 'solid-js'\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 =\n opts.router.options.Wrap ||\n ((props: { children: JSX.Element }) => props.children)\n\n opts.router.options.Wrap = (props) => {\n return (\n <QueryClientProvider client={opts.queryClient}>\n <OGWrap>{props.children}</OGWrap>\n </QueryClientProvider>\n )\n }\n}\n"],"mappings":";;;;;AAWA,SAAgBQ,+BACdC,MACA;AACAR,EAAAA,GAAAA,gCAAAA,oCAAmCQ,KAAK;AAExC,KAAIA,KAAKF,oBAAoB,MAC3B;CAGF,MAAMG,SACJD,KAAKE,OAAOC,QAAQC,UAClBC,UAAqCA,MAAMC;AAE/CN,MAAKE,OAAOC,QAAQC,QAAQC,UAAU;AACpC,UAAA,GAAA,aAAA,iBACGd,sBAAAA,qBAAmB;GAAA,IAACkB,SAAM;AAAA,WAAET,KAAKU;;GAAW,IAAAJ,WAAA;AAAA,YAAA,GAAA,aAAA,iBAC1CL,QAAM,EAAA,IAAAK,WAAA;AAAA,YAAED,MAAMC;OAAQ,CAAA;;GAAA,CAAA"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
import { createComponent } from "@solidjs/web";
|
|
2
2
|
import { QueryClientProvider } from "@tanstack/solid-query";
|
|
3
3
|
import { setupCoreRouterSsrQueryIntegration } from "@tanstack/router-ssr-query-core";
|
|
4
|
+
//#region src/index.tsx
|
|
4
5
|
function setupRouterSsrQueryIntegration(opts) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
};
|
|
6
|
+
setupCoreRouterSsrQueryIntegration(opts);
|
|
7
|
+
if (opts.wrapQueryClient === false) return;
|
|
8
|
+
const OGWrap = opts.router.options.Wrap || ((props) => props.children);
|
|
9
|
+
opts.router.options.Wrap = (props) => {
|
|
10
|
+
return createComponent(QueryClientProvider, {
|
|
11
|
+
get client() {
|
|
12
|
+
return opts.queryClient;
|
|
13
|
+
},
|
|
14
|
+
get children() {
|
|
15
|
+
return createComponent(OGWrap, { get children() {
|
|
16
|
+
return props.children;
|
|
17
|
+
} });
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
};
|
|
24
21
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
|
22
|
+
//#endregion
|
|
23
|
+
export { setupRouterSsrQueryIntegration };
|
|
24
|
+
|
|
25
|
+
//# 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 { QueryClientProvider } from '@tanstack/solid-query'\nimport { setupCoreRouterSsrQueryIntegration } from '@tanstack/router-ssr-query-core'\nimport type { RouterSsrQueryOptions } from '@tanstack/router-ssr-query-core'\nimport type { AnyRouter } from '@tanstack/solid-router'\nimport type { JSX } from 'solid-js'\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 =\n opts.router.options.Wrap ||\n ((props: { children: JSX.Element }) => props.children)\n\n opts.router.options.Wrap = (props) => {\n return (\n <QueryClientProvider client={opts.queryClient}>\n <OGWrap>{props.children}</OGWrap>\n </QueryClientProvider>\n )\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":["QueryClientProvider","setupCoreRouterSsrQueryIntegration","RouterSsrQueryOptions","AnyRouter","JSX","Options","TRouter","wrapQueryClient","setupRouterSsrQueryIntegration","opts","OGWrap","router","options","Wrap","props","children","Element","_$createComponent","client","queryClient"],"sources":["../../src/index.tsx"],"sourcesContent":["import { QueryClientProvider } from '@tanstack/solid-query'\nimport { setupCoreRouterSsrQueryIntegration } from '@tanstack/router-ssr-query-core'\nimport type { RouterSsrQueryOptions } from '@tanstack/router-ssr-query-core'\nimport type { AnyRouter } from '@tanstack/solid-router'\nimport type { JSX } from 'solid-js'\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 =\n opts.router.options.Wrap ||\n ((props: { children: JSX.Element }) => props.children)\n\n opts.router.options.Wrap = (props) => {\n return (\n <QueryClientProvider client={opts.queryClient}>\n <OGWrap>{props.children}</OGWrap>\n </QueryClientProvider>\n )\n }\n}\n"],"mappings":";;;;AAWA,SAAgBQ,+BACdC,MACA;AACAR,oCAAmCQ,KAAK;AAExC,KAAIA,KAAKF,oBAAoB,MAC3B;CAGF,MAAMG,SACJD,KAAKE,OAAOC,QAAQC,UAClBC,UAAqCA,MAAMC;AAE/CN,MAAKE,OAAOC,QAAQC,QAAQC,UAAU;AACpC,SAAAG,gBACGjB,qBAAmB;GAAA,IAACkB,SAAM;AAAA,WAAET,KAAKU;;GAAW,IAAAJ,WAAA;AAAA,WAAAE,gBAC1CP,QAAM,EAAA,IAAAK,WAAA;AAAA,YAAED,MAAMC;OAAQ,CAAA;;GAAA,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-router-ssr-query",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.3",
|
|
4
4
|
"description": "Modern and scalable routing for Solid applications",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,23 +49,23 @@
|
|
|
49
49
|
"node": ">=20.19"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@tanstack/router-ssr-query-core": "1.166.
|
|
52
|
+
"@tanstack/router-ssr-query-core": "1.166.9"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@
|
|
55
|
+
"@solidjs/web": "2.0.0-beta.3",
|
|
56
|
+
"@tanstack/solid-query": "https://pkg.pr.new/@tanstack/solid-query@e7415f0",
|
|
56
57
|
"eslint-plugin-solid": "^0.14.5",
|
|
57
|
-
"solid-js": "2.0.0-beta.
|
|
58
|
-
"@solidjs/web": "2.0.0-beta.2",
|
|
58
|
+
"solid-js": "2.0.0-beta.3",
|
|
59
59
|
"vite": "*",
|
|
60
60
|
"vite-plugin-solid": "3.0.0-next.2",
|
|
61
|
-
"@tanstack/solid-router": "2.0.0-alpha.
|
|
61
|
+
"@tanstack/solid-router": "2.0.0-alpha.4"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
+
"@solidjs/web": "2.0.0-beta.3",
|
|
64
65
|
"@tanstack/query-core": ">=5.90.0",
|
|
65
66
|
"@tanstack/solid-query": ">=5.90.0",
|
|
66
67
|
"@tanstack/solid-router": ">=2.0.0-alpha.1",
|
|
67
|
-
"solid-js": "2.0.0-beta.
|
|
68
|
-
"@solidjs/web": "2.0.0-beta.2"
|
|
68
|
+
"solid-js": "2.0.0-beta.3"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
71
|
"clean": "rimraf ./dist && rimraf ./coverage",
|