vike-react 0.1.5 → 0.1.6

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.
@@ -1,24 +1,22 @@
1
- import type { Config } from 'vite-plugin-ssr/types';
1
+ import type { Config as ConfigCore } from 'vite-plugin-ssr/types';
2
2
  import type { Component } from './types';
3
- export type ConfigEnhanced = Config & Partial<VikeReactConfig & {
4
- Page: Component;
5
- }>;
6
- export type VikeReactConfig = {
3
+ export type Config = ConfigCore & {
7
4
  /** React element renderer and appended into &lt;head>&lt;/head> */
8
- Head: Component;
9
- Layout: Component;
5
+ Head?: Component;
6
+ Layout?: Component;
10
7
  /** &lt;title>${title}&lt;/title> */
11
- title: string;
8
+ title?: string;
12
9
  /** &lt;meta name="description" content="${description}" /> */
13
- description: string;
10
+ description?: string;
14
11
  /** &lt;link rel="icon" href="${favicon}" /> */
15
- favicon: string;
12
+ favicon?: string;
16
13
  /** &lt;html lang="${lang}">
17
14
  *
18
15
  * @default 'en'
19
16
  *
20
17
  */
21
- lang: string;
18
+ lang?: string;
19
+ Page?: Component;
22
20
  };
23
21
  declare const _default: {
24
22
  onRenderHtml: "import:vike-react/renderer/onRenderHtml";
@@ -5,7 +5,7 @@ export type { PageProps };
5
5
  export type { Page };
6
6
  export type { Component };
7
7
  import type { PageContextBuiltIn, PageContextBuiltInClientWithClientRouting as PageContextBuiltInClient } from 'vite-plugin-ssr/types';
8
- import type { ConfigEnhanced } from './+config';
8
+ import type { Config } from './+config';
9
9
  import type { ReactElement } from 'react';
10
10
  type Component = (props: any) => ReactElement;
11
11
  type Page = (pageProps: PageProps) => ReactElement;
@@ -22,7 +22,7 @@ export type PageContextCommon = {
22
22
  };
23
23
  };
24
24
  type PageContextServer = PageContextBuiltIn<Page> & PageContextCommon & {
25
- config: Partial<ConfigEnhanced>;
25
+ config: Config;
26
26
  };
27
27
  type PageContextClient = PageContextBuiltInClient<Page> & PageContextCommon;
28
28
  type PageContext = PageContextClient | PageContextServer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike-react",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "main": "./dist/renderer/+config.js",
6
6
  "types": "./dist/renderer/+config.d.ts",
@@ -20,7 +20,7 @@
20
20
  "react": "18.x.x",
21
21
  "react-dom": "18.x.x",
22
22
  "vite": "^4.3.8",
23
- "vite-plugin-ssr": "^0.4.130"
23
+ "vite-plugin-ssr": "^0.4.132"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@brillout/release-me": "^0.1.3",