vike-solid-query 0.0.1-commit-f6af6c4 → 0.0.1-commit-dc7c4d4
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/integration/+config.d.ts +12 -2
- package/dist/integration/+config.js +22 -21
- package/dist/integration/Wrapper.d.ts +6 -3
- package/dist/integration/Wrapper.js +16 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/package.json +18 -15
- package/dist/integration/Wrapper.jsx +0 -7
- package/dist/integration/index.d.ts +0 -2
- package/dist/integration/index.js +0 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { QueryClientConfig } from '@tanstack/solid-query';
|
|
2
|
+
|
|
2
3
|
declare const _default: {
|
|
3
4
|
name: string;
|
|
4
5
|
require: {
|
|
@@ -21,4 +22,13 @@ declare const _default: {
|
|
|
21
22
|
};
|
|
22
23
|
};
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
+
|
|
26
|
+
declare global {
|
|
27
|
+
namespace Vike {
|
|
28
|
+
interface Config {
|
|
29
|
+
queryClientConfig?: QueryClientConfig;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { _default as default };
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
var _config = {
|
|
2
|
+
name: "vike-solid-query",
|
|
3
|
+
require: {
|
|
4
|
+
"vike-solid": ">=0.7.3"
|
|
5
|
+
},
|
|
6
|
+
Wrapper: "import:vike-solid-query/__internal/integration/Wrapper:default",
|
|
7
|
+
queryClientConfig: {
|
|
8
|
+
defaultOptions: {
|
|
9
|
+
queries: {
|
|
10
|
+
staleTime: 5000
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
meta: {
|
|
8
15
|
queryClientConfig: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
meta: {
|
|
16
|
-
queryClientConfig: {
|
|
17
|
-
env: {
|
|
18
|
-
server: true,
|
|
19
|
-
client: true,
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
16
|
+
env: {
|
|
17
|
+
server: true,
|
|
18
|
+
client: true
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
23
22
|
};
|
|
23
|
+
|
|
24
|
+
export { _config as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { QueryClient, QueryClientProvider } from '@tanstack/solid-query';
|
|
3
|
+
import { usePageContext } from 'vike-solid/usePageContext';
|
|
4
|
+
|
|
5
|
+
function Wrapper(props) {
|
|
6
|
+
const pageContext = usePageContext();
|
|
7
|
+
const queryClient = new QueryClient(pageContext.config.queryClientConfig);
|
|
8
|
+
return createComponent(QueryClientProvider, {
|
|
9
|
+
client: queryClient,
|
|
10
|
+
get children() {
|
|
11
|
+
return props.children;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { Wrapper as default };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { QueryBoundary } from "./QueryBoundary
|
|
1
|
+
export { QueryBoundary } from "./QueryBoundary";
|
package/dist/src/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { QueryBoundary } from "./QueryBoundary
|
|
1
|
+
export { QueryBoundary } from "./QueryBoundary";
|
package/package.json
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vike-solid-query",
|
|
3
|
-
"version": "0.0.1-commit-
|
|
3
|
+
"version": "0.0.1-commit-dc7c4d4",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "dist/src/index.js",
|
|
6
|
-
"typings": "dist/src/index.js",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": "./dist/src/index.js",
|
|
9
|
-
"./config": "./dist/integration/+config.js",
|
|
10
|
-
"./__internal/integration/Wrapper": "./dist/integration/index.js"
|
|
11
|
-
},
|
|
12
5
|
"peerDependencies": {
|
|
13
6
|
"@tanstack/solid-query": ">=5.0.0",
|
|
14
7
|
"solid-js": "^1.8.7",
|
|
15
|
-
"vike-solid": "
|
|
8
|
+
"vike-solid": "^0.7.5"
|
|
16
9
|
},
|
|
17
10
|
"devDependencies": {
|
|
18
|
-
"@brillout/release-me": "^0.4.
|
|
11
|
+
"@brillout/release-me": "^0.4.2",
|
|
12
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
13
|
+
"@rollup/plugin-node-resolve": "^15.2.4",
|
|
19
14
|
"@tanstack/solid-query": "^5.56.2",
|
|
20
15
|
"rimraf": "^6.0.1",
|
|
16
|
+
"rollup": "^4.22.4",
|
|
17
|
+
"rollup-plugin-dts": "^6.1.1",
|
|
21
18
|
"solid-js": "^1.8.22",
|
|
22
19
|
"typescript": "^5.6.2",
|
|
23
|
-
"vike": "^0.4.
|
|
24
|
-
"
|
|
20
|
+
"vike": "^0.4.196",
|
|
21
|
+
"vite": "^5.4.7",
|
|
22
|
+
"vike-solid": "0.7.5"
|
|
23
|
+
},
|
|
24
|
+
"exports": {
|
|
25
|
+
".": "./dist/src/index.js",
|
|
26
|
+
"./config": "./dist/integration/+config.js",
|
|
27
|
+
"./__internal/integration/Wrapper": "./dist/integration/Wrapper.js"
|
|
25
28
|
},
|
|
26
29
|
"typesVersions": {
|
|
27
30
|
"*": {
|
|
@@ -34,14 +37,14 @@
|
|
|
34
37
|
}
|
|
35
38
|
},
|
|
36
39
|
"files": [
|
|
37
|
-
"dist"
|
|
40
|
+
"dist/"
|
|
38
41
|
],
|
|
39
42
|
"repository": "github:vikejs/vike-solid",
|
|
40
43
|
"license": "MIT",
|
|
41
44
|
"scripts": {
|
|
42
|
-
"dev": "
|
|
45
|
+
"dev": "rollup -c rollup.config.js --watch",
|
|
43
46
|
"dev:typecheck": "tsc --noEmit --watch",
|
|
44
|
-
"build": "
|
|
47
|
+
"build": "rollup -c rollup.config.js && tsc",
|
|
45
48
|
"release": "LANG=en_US release-me patch",
|
|
46
49
|
"release:minor": "LANG=en_US release-me minor",
|
|
47
50
|
"release:commit": "LANG=en_US release-me commit"
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { QueryClient, QueryClientProvider } from "@tanstack/solid-query";
|
|
2
|
-
import { usePageContext } from "vike-solid/usePageContext";
|
|
3
|
-
export default function Wrapper(props) {
|
|
4
|
-
const pageContext = usePageContext();
|
|
5
|
-
const queryClient = new QueryClient(pageContext.config.queryClientConfig);
|
|
6
|
-
return <QueryClientProvider client={queryClient}>{props.children}</QueryClientProvider>;
|
|
7
|
-
}
|