vike 0.4.204-commit-386d2d8 → 0.4.204-commit-9a97c22

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,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROJECT_VERSION = void 0;
4
4
  // Automatically updated by @brillout/release-me
5
- exports.PROJECT_VERSION = '0.4.204-commit-386d2d8';
5
+ exports.PROJECT_VERSION = '0.4.204-commit-9a97c22';
@@ -8,8 +8,9 @@ export { reload };
8
8
  * @param keepScrollPosition - Don't scroll to the top of the page, instead keep the current scroll position.
9
9
  * @param overwriteLastHistoryEntry - Don't create a new entry in the browser's history, instead let the new URL replace the current URL. (This effectively removes the current URL from the browser history).
10
10
  */
11
- declare function navigate(url: string, { keepScrollPosition, overwriteLastHistoryEntry }?: {
11
+ declare function navigate(url: string, { keepScrollPosition, overwriteLastHistoryEntry, pageContext }?: {
12
12
  keepScrollPosition?: boolean;
13
13
  overwriteLastHistoryEntry?: boolean;
14
+ pageContext?: Record<string, unknown>;
14
15
  }): Promise<void>;
15
16
  declare function reload(): Promise<void>;
@@ -13,7 +13,7 @@ assertClientRouting();
13
13
  * @param keepScrollPosition - Don't scroll to the top of the page, instead keep the current scroll position.
14
14
  * @param overwriteLastHistoryEntry - Don't create a new entry in the browser's history, instead let the new URL replace the current URL. (This effectively removes the current URL from the browser history).
15
15
  */
16
- async function navigate(url, { keepScrollPosition = false, overwriteLastHistoryEntry = false } = {}) {
16
+ async function navigate(url, { keepScrollPosition = false, overwriteLastHistoryEntry = false, pageContext } = {}) {
17
17
  normalizeUrlArgument(url, 'navigate');
18
18
  // If `hydrationCanBeAborted === false` (e.g. Vue) then we can apply navigate() only after hydration is done
19
19
  await firstRenderStartPromise;
@@ -22,7 +22,8 @@ async function navigate(url, { keepScrollPosition = false, overwriteLastHistoryE
22
22
  scrollTarget,
23
23
  urlOriginal: url,
24
24
  overwriteLastHistoryEntry,
25
- isBackwardNavigation: false
25
+ isBackwardNavigation: false,
26
+ pageContextInitClient: pageContext
26
27
  });
27
28
  }
28
29
  async function reload() {
@@ -14,6 +14,7 @@ type RenderArgs = {
14
14
  redirectCount?: number;
15
15
  doNotRenderIfSamePage?: boolean;
16
16
  isClientSideNavigation?: boolean;
17
+ pageContextInitClient?: Record<string, unknown>;
17
18
  };
18
19
  declare function renderPageClientSide(renderArgs: RenderArgs): Promise<void>;
19
20
  declare function disableClientRouting(err: unknown, log: boolean): void;
@@ -30,7 +30,7 @@ const globalObject = getGlobalObject('renderPageClientSide.ts', (() => {
30
30
  })());
31
31
  const { firstRenderStartPromise } = globalObject;
32
32
  async function renderPageClientSide(renderArgs) {
33
- const { urlOriginal = getCurrentUrl(), overwriteLastHistoryEntry = false, isBackwardNavigation, pageContextsFromRewrite = [], redirectCount = 0, doNotRenderIfSamePage, isClientSideNavigation = true } = renderArgs;
33
+ const { urlOriginal = getCurrentUrl(), overwriteLastHistoryEntry = false, isBackwardNavigation, pageContextsFromRewrite = [], redirectCount = 0, doNotRenderIfSamePage, isClientSideNavigation = true, pageContextInitClient } = renderArgs;
34
34
  let { scrollTarget } = renderArgs;
35
35
  const { previousPageContext } = globalObject;
36
36
  addLinkPrefetchHandlers_unwatch();
@@ -218,7 +218,8 @@ async function renderPageClientSide(renderArgs) {
218
218
  isBackwardNavigation,
219
219
  isClientSideNavigation,
220
220
  isHydration: isFirstRender && !isForErrorPage,
221
- _previousPageContext: previousPageContext
221
+ _previousPageContext: previousPageContext,
222
+ ...pageContextInitClient
222
223
  });
223
224
  {
224
225
  const pageContextFromAllRewrites = getPageContextFromAllRewrites(pageContextsFromRewrite);
@@ -1 +1 @@
1
- export declare const PROJECT_VERSION: "0.4.204-commit-386d2d8";
1
+ export declare const PROJECT_VERSION: "0.4.204-commit-9a97c22";
@@ -1,2 +1,2 @@
1
1
  // Automatically updated by @brillout/release-me
2
- export const PROJECT_VERSION = '0.4.204-commit-386d2d8';
2
+ export const PROJECT_VERSION = '0.4.204-commit-9a97c22';
@@ -1,4 +1,4 @@
1
1
  export declare const projectInfo: {
2
2
  projectName: "Vike";
3
- projectVersion: "0.4.204-commit-386d2d8";
3
+ projectVersion: "0.4.204-commit-9a97c22";
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.204-commit-386d2d8",
3
+ "version": "0.4.204-commit-9a97c22",
4
4
  "repository": "https://github.com/vikejs/vike",
5
5
  "exports": {
6
6
  "./server": {
@@ -129,7 +129,7 @@
129
129
  "acorn": "^8.0.0",
130
130
  "cac": "^6.0.0",
131
131
  "es-module-lexer": "^1.0.0",
132
- "esbuild": "^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0",
132
+ "esbuild": "^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0",
133
133
  "fast-glob": "^3.0.0",
134
134
  "semver": "^7.0.0",
135
135
  "source-map-support": "^0.5.0"