vike-lite 1.10.1 → 1.11.0

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,3 +1,5 @@
1
+ import { PageContext } from "../index.mjs";
2
+
1
3
  //#region src/client/router.d.ts
2
4
  /**
3
5
  * Change page programmatically on the client without reloading the browser.
@@ -6,6 +8,7 @@
6
8
  */
7
9
  declare function navigate(url: string, options?: {
8
10
  keepScrollPosition?: boolean;
11
+ pageContext?: Partial<PageContext>;
9
12
  }): void;
10
13
  declare const reload: () => Promise<void>;
11
14
  //#endregion
@@ -10,7 +10,10 @@ function navigate(url, options) {
10
10
  let finalUrl = url;
11
11
  if (finalUrl.startsWith("/")) finalUrl = (BASE_URL.endsWith("/") ? BASE_URL.slice(0, -1) : BASE_URL) + (finalUrl === "/" ? "" : finalUrl);
12
12
  globalThis.history.pushState({ triggeredBy: "vike-lite" }, "", finalUrl);
13
- globalThis.dispatchEvent(new CustomEvent("vike-navigate", { detail: { keepScrollPosition: options?.keepScrollPosition } }));
13
+ globalThis.dispatchEvent(new CustomEvent("vike-navigate", { detail: {
14
+ keepScrollPosition: options?.keepScrollPosition,
15
+ pageContext: options?.pageContext
16
+ } }));
14
17
  }
15
18
  const reload = () => {
16
19
  return new Promise((resolve) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike-lite",
3
- "version": "1.10.1",
3
+ "version": "1.11.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.mjs",