vike-react 0.4.17-commit-024b6ad → 0.4.17-commit-7fe7b04

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,4 +1,4 @@
1
- import type { ImportString, PageContextClient } from 'vike/types';
1
+ import type { ImportString, PageContextClient, PageContext } from 'vike/types';
2
2
  declare global {
3
3
  namespace Vike {
4
4
  interface Config {
@@ -20,16 +20,26 @@ declare global {
20
20
  * https://vike.dev/Wrapper
21
21
  */
22
22
  Wrapper?: Wrapper | ImportString;
23
- /** <title>${title}</title> */
24
- title?: string;
25
- /** <link rel="icon" href="${favicon}" /> */
26
- favicon?: string;
27
- /** <html lang="${lang}">
28
- *
29
- * @default 'en'
30
- *
23
+ /**
24
+ * ```js
25
+ * <title>${title}</title>
26
+ * <meta property="og:title" content="${title}" />
27
+ * ```
28
+ */
29
+ title?: StringGetter;
30
+ /**
31
+ * ```js
32
+ * <link rel="icon" href="${favicon}" />
33
+ * ```
34
+ */
35
+ favicon?: StringGetter;
36
+ /**
37
+ * ```js
38
+ * <html lang="${lang}">
39
+ * ```
40
+ * @default 'en'
31
41
  */
32
- lang?: string;
42
+ lang?: StringGetter;
33
43
  /**
34
44
  * If `true`, the page is rendered twice: on the server-side (to HTML) and on the client-side (hydration).
35
45
  *
@@ -89,6 +99,7 @@ declare global {
89
99
  }
90
100
  }
91
101
  }
102
+ type StringGetter = string | ((pageContext: PageContext) => string);
92
103
  type Wrapper = (props: {
93
104
  children: React.ReactNode;
94
105
  }) => React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike-react",
3
- "version": "0.4.17-commit-024b6ad",
3
+ "version": "0.4.17-commit-7fe7b04",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",