vike-react 0.6.1 → 0.6.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/integration/Loading.css +10 -0
- package/dist/integration/Loading.js +5 -0
- package/dist/integration/onRenderClient.d.ts +1 -1
- package/dist/integration/onRenderClient.js +1 -1
- package/dist/utils/callCumulativeHooks.d.ts +2 -1
- package/package.json +3 -3
- package/dist/integration/styles.css +0 -6
@@ -0,0 +1,10 @@
|
|
1
|
+
/*
|
2
|
+
This CSS is loaded for all vike-react users, even if they don't use the <Loading> component because it's imported not directly but over depednency injection, see:
|
3
|
+
https://github.com/vikejs/vike/discussions/2340
|
4
|
+
*/
|
5
|
+
|
6
|
+
@keyframes vike-react-shine {
|
7
|
+
to {
|
8
|
+
background-position-x: -200%;
|
9
|
+
}
|
10
|
+
}
|
@@ -2,6 +2,11 @@ export default {
|
|
2
2
|
component: LoadingComponent,
|
3
3
|
};
|
4
4
|
import React from 'react';
|
5
|
+
/* We can't import it here: https://github.com/vikejs/vike/issues/2460
|
6
|
+
* - We import it inside onRenderClient.js instead.
|
7
|
+
* - We'll be able to do it if Vite + Rolldown always transpiles the server-side.
|
8
|
+
import './Loading.css'
|
9
|
+
*/
|
5
10
|
function LoadingComponent() {
|
6
11
|
return (React.createElement("div", { style: {
|
7
12
|
width: '100%',
|
@@ -3,10 +3,10 @@ export { onRenderClient };
|
|
3
3
|
import ReactDOM from 'react-dom/client';
|
4
4
|
import { getHeadSetting } from './getHeadSetting.js';
|
5
5
|
import { getPageElement } from './getPageElement.js';
|
6
|
-
import './styles.css';
|
7
6
|
import { callCumulativeHooks } from '../utils/callCumulativeHooks.js';
|
8
7
|
import { applyHeadSettings } from './applyHeadSettings.js';
|
9
8
|
import { resolveReactOptions } from './resolveReactOptions.js';
|
9
|
+
import './Loading.css'; // See comment inside Loading.tsx
|
10
10
|
let root;
|
11
11
|
const onRenderClient = async (pageContext) => {
|
12
12
|
pageContext._headAlreadySet = pageContext.isHydration;
|
@@ -1,2 +1,3 @@
|
|
1
1
|
export { callCumulativeHooks };
|
2
|
-
|
2
|
+
import type { PageContext } from 'vike/types';
|
3
|
+
declare function callCumulativeHooks<T>(values: undefined | T[], pageContext: PageContext): Promise<(undefined | null | Exclude<T, Function>)[]>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vike-react",
|
3
|
-
"version": "0.6.
|
3
|
+
"version": "0.6.3",
|
4
4
|
"repository": "https://github.com/vikejs/vike-react",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
@@ -45,7 +45,7 @@
|
|
45
45
|
"rimraf": "^5.0.5",
|
46
46
|
"typescript": "^5.7.3",
|
47
47
|
"vike": "^0.4.223",
|
48
|
-
"vite": "^6.
|
48
|
+
"vite": "^6.2.5"
|
49
49
|
},
|
50
50
|
"typesVersions": {
|
51
51
|
"*": {
|
@@ -96,7 +96,7 @@
|
|
96
96
|
"scripts": {
|
97
97
|
"dev": "tsc --watch",
|
98
98
|
"build": "rimraf dist/ && tsc && pnpm run build:css",
|
99
|
-
"build:css": "cp src/integration/
|
99
|
+
"build:css": "cp src/integration/Loading.css dist/integration/Loading.css",
|
100
100
|
"release": "release-me patch",
|
101
101
|
"release:minor": "release-me minor",
|
102
102
|
"release:commit": "release-me commit"
|