vike-lite 1.15.12 → 1.15.13

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,9 +1,7 @@
1
1
  //#region src/__internal/client.d.ts
2
2
  declare function createLinkClickHandler(onNavigate: (url: URL) => void): (e: MouseEvent) => void;
3
3
  declare function createLinkPrefetchHandler(onPrefetch: (url: URL) => void): (e: Event) => void;
4
- declare function finalizeNavigation(scrollState: {
5
- [key: string]: boolean;
6
- }, key: string): void;
4
+ declare function finalizeNavigation(scrollStateSetState: boolean): void;
7
5
  interface ViewComponents {
8
6
  Page: any | null;
9
7
  Layout: any | null;
@@ -30,10 +30,10 @@ function createLinkPrefetchHandler(onPrefetch) {
30
30
  onPrefetch(url);
31
31
  };
32
32
  }
33
- function finalizeNavigation(scrollState, key) {
34
- if (scrollState[key] === true) {
33
+ function finalizeNavigation(scrollStateSetState) {
34
+ if (scrollStateSetState) {
35
35
  globalThis.scrollTo(0, 0);
36
- scrollState[key] = false;
36
+ scrollStateSetState = false;
37
37
  } else if (globalThis.location.hash) requestAnimationFrame(() => {
38
38
  try {
39
39
  document.querySelector(decodeURIComponent(globalThis.location.hash))?.scrollIntoView();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike-lite",
3
- "version": "1.15.12",
3
+ "version": "1.15.13",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",