vike-solid-query 0.0.1-commit-429fd54 → 0.0.1-commit-f6af6c4

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.
@@ -2,7 +2,7 @@ import "vike-solid/config"; // Needed for declaration merging of Config
2
2
  export default {
3
3
  name: "vike-solid-query",
4
4
  require: {
5
- "vike-solid": ">=0.7.3",
5
+ "vike-solid": ">=0.7.4",
6
6
  },
7
7
  Wrapper: "import:vike-solid-query/__internal/integration/Wrapper:default",
8
8
  queryClientConfig: {
@@ -1,4 +1,4 @@
1
- import { type JSX } from "solid-js";
1
+ import type { JSX } from "solid-js";
2
2
  export default function Wrapper(props: {
3
3
  children?: JSX.Element;
4
4
  }): JSX.Element;
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ import Wrapper from "./Wrapper.jsx";
2
+ export default Wrapper;
@@ -0,0 +1,2 @@
1
+ import Wrapper from "./Wrapper.jsx";
2
+ export default Wrapper;
@@ -1 +1 @@
1
- export { QueryBoundary } from "./QueryBoundary";
1
+ export { QueryBoundary } from "./QueryBoundary.jsx";
package/dist/src/index.js CHANGED
@@ -1 +1 @@
1
- export { QueryBoundary } from "./QueryBoundary";
1
+ export { QueryBoundary } from "./QueryBoundary.jsx";
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "vike-solid-query",
3
- "version": "0.0.1-commit-429fd54",
3
+ "version": "0.0.1-commit-f6af6c4",
4
4
  "type": "module",
5
5
  "main": "dist/src/index.js",
6
6
  "typings": "dist/src/index.js",
7
7
  "exports": {
8
8
  ".": "./dist/src/index.js",
9
9
  "./config": "./dist/integration/+config.js",
10
- "./__internal/integration/Wrapper": "./dist/integration/Wrapper.js"
10
+ "./__internal/integration/Wrapper": "./dist/integration/index.js"
11
11
  },
12
12
  "peerDependencies": {
13
13
  "@tanstack/solid-query": ">=5.0.0",
@@ -1,12 +0,0 @@
1
- import { createComponent } from "solid-js";
2
- import { QueryClient, QueryClientProvider } from "@tanstack/solid-query";
3
- import { usePageContext } from "vike-solid/usePageContext";
4
- export default function Wrapper(props) {
5
- const pageContext = usePageContext();
6
- return createComponent(QueryClientProvider, {
7
- client: new QueryClient(pageContext.config.queryClientConfig),
8
- get children() {
9
- return props.children;
10
- },
11
- });
12
- }