vike-react 0.5.3-commit-acd5466 → 0.5.4
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.
@@ -12,7 +12,9 @@ declare global {
|
|
12
12
|
page?: JSX.Element;
|
13
13
|
/** The React root DOM container */
|
14
14
|
root?: ReactDOM.Root;
|
15
|
+
/** The +Page.jsx component rendered to the HTML string. */
|
15
16
|
pageHtmlString?: string;
|
17
|
+
/** The +Pagejsx component rendered to an HTML stream. */
|
16
18
|
pageHtmlStream?: PageHtmlStream;
|
17
19
|
}
|
18
20
|
}
|
@@ -1 +1,2 @@
|
|
1
|
-
export
|
1
|
+
export { callCumulativeHooks };
|
2
|
+
declare function callCumulativeHooks(values: undefined | unknown[], pageContext: Record<string, any>): Promise<unknown[]>;
|
@@ -1,8 +1,11 @@
|
|
1
|
-
export
|
1
|
+
export { callCumulativeHooks };
|
2
|
+
import { providePageContext } from 'vike/getPageContext';
|
3
|
+
async function callCumulativeHooks(values, pageContext) {
|
2
4
|
if (!values)
|
3
5
|
return [];
|
4
6
|
const valuesPromises = values.map((val) => {
|
5
7
|
if (typeof val === 'function') {
|
8
|
+
providePageContext(pageContext);
|
6
9
|
// Hook
|
7
10
|
return val(pageContext);
|
8
11
|
}
|
package/package.json
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "vike-react",
|
3
|
-
"version": "0.5.
|
3
|
+
"version": "0.5.4",
|
4
|
+
"repository": "https://github.com/vikejs/vike-react",
|
4
5
|
"type": "module",
|
5
|
-
"main": "./dist/index.js",
|
6
|
-
"types": "./dist/index.d.ts",
|
7
6
|
"exports": {
|
8
|
-
"./useData": "./dist/hooks/useData.js",
|
9
7
|
"./usePageContext": "./dist/hooks/usePageContext.js",
|
8
|
+
"./useData": "./dist/hooks/useData.js",
|
10
9
|
"./useConfig": {
|
11
10
|
"browser": "./dist/hooks/useConfig/useConfig-client.js",
|
12
11
|
"default": "./dist/hooks/useConfig/useConfig-server.js"
|
@@ -19,14 +18,22 @@
|
|
19
18
|
"browser": "./dist/components/Head/Head-client.js",
|
20
19
|
"default": "./dist/components/Head/Head-server.js"
|
21
20
|
},
|
22
|
-
"./ClientOnly": "./dist/components/ClientOnly.js",
|
23
21
|
"./clientOnly": "./dist/helpers/clientOnly.js",
|
22
|
+
"./ClientOnly": "./dist/components/ClientOnly.js",
|
24
23
|
".": "./dist/index.js",
|
25
24
|
"./config": "./dist/+config.js",
|
26
25
|
"./renderer/onRenderHtml": "./dist/renderer/onRenderHtml.js",
|
27
26
|
"./renderer/onRenderClient": "./dist/renderer/onRenderClient.js",
|
28
27
|
"./components/Loading": "./dist/components/Loading.js"
|
29
28
|
},
|
29
|
+
"dependencies": {
|
30
|
+
"react-streaming": "^0.3.42"
|
31
|
+
},
|
32
|
+
"peerDependencies": {
|
33
|
+
"react": ">=18.0.0",
|
34
|
+
"react-dom": ">=18.0.0",
|
35
|
+
"vike": ">=0.4.182"
|
36
|
+
},
|
30
37
|
"scripts": {
|
31
38
|
"dev": "tsc --watch",
|
32
39
|
"build": "rimraf dist/ && tsc && pnpm run build:css",
|
@@ -35,11 +42,6 @@
|
|
35
42
|
"release:minor": "release-me minor",
|
36
43
|
"release:commit": "release-me commit"
|
37
44
|
},
|
38
|
-
"peerDependencies": {
|
39
|
-
"react": ">=18.0.0",
|
40
|
-
"react-dom": ">=18.0.0",
|
41
|
-
"vike": ">=0.4.182"
|
42
|
-
},
|
43
45
|
"devDependencies": {
|
44
46
|
"@biomejs/biome": "^1.6.4",
|
45
47
|
"@brillout/release-me": "^0.3.8",
|
@@ -51,12 +53,9 @@
|
|
51
53
|
"react-streaming": "^0.3.43",
|
52
54
|
"rimraf": "^5.0.5",
|
53
55
|
"typescript": "^5.5.4",
|
54
|
-
"vike": "^0.4.
|
56
|
+
"vike": "^0.4.191",
|
55
57
|
"vite": "^5.4.0"
|
56
58
|
},
|
57
|
-
"dependencies": {
|
58
|
-
"react-streaming": "^0.3.42"
|
59
|
-
},
|
60
59
|
"typesVersions": {
|
61
60
|
"*": {
|
62
61
|
"useData": [
|
@@ -94,9 +93,13 @@
|
|
94
93
|
]
|
95
94
|
}
|
96
95
|
},
|
96
|
+
"main": "./dist/index.js",
|
97
|
+
"types": "./dist/index.d.ts",
|
97
98
|
"files": [
|
98
99
|
"dist/"
|
99
100
|
],
|
100
|
-
"
|
101
|
-
"
|
101
|
+
"license": "MIT",
|
102
|
+
"keywords": [
|
103
|
+
"react"
|
104
|
+
]
|
102
105
|
}
|