@tanstack/router-core 1.171.12 → 1.171.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.
- package/dist/cjs/router.cjs +2 -4
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +6 -3
- package/dist/cjs/scroll-restoration.cjs +26 -20
- package/dist/cjs/scroll-restoration.cjs.map +1 -1
- package/dist/esm/router.d.ts +6 -3
- package/dist/esm/router.js +2 -4
- package/dist/esm/router.js.map +1 -1
- package/dist/esm/scroll-restoration.js +26 -20
- package/dist/esm/scroll-restoration.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +7 -4
- package/src/scroll-restoration.ts +39 -29
package/dist/cjs/router.cjs
CHANGED
|
@@ -65,12 +65,10 @@ var RouterCore = class {
|
|
|
65
65
|
*/
|
|
66
66
|
constructor(options, getStoreConfig) {
|
|
67
67
|
this.tempLocationKey = `${Math.round(Math.random() * 1e7)}`;
|
|
68
|
-
this.
|
|
68
|
+
this._scroll = { next: true };
|
|
69
69
|
this.shouldViewTransition = void 0;
|
|
70
70
|
this.isViewTransitionTypesSupported = void 0;
|
|
71
71
|
this.subscribers = /* @__PURE__ */ new Set();
|
|
72
|
-
this.isScrollRestoring = false;
|
|
73
|
-
this.isScrollRestorationSetup = false;
|
|
74
72
|
this.routeBranchCache = /* @__PURE__ */ new WeakMap();
|
|
75
73
|
this.startTransition = (fn) => fn();
|
|
76
74
|
this.update = (newOptions) => {
|
|
@@ -427,7 +425,7 @@ var RouterCore = class {
|
|
|
427
425
|
historyAction = next.replace ? "REPLACE" : "PUSH";
|
|
428
426
|
this.history[historyAction === "REPLACE" ? "replace" : "push"](nextHistory.publicHref, nextHistory.state, { ignoreBlocker });
|
|
429
427
|
}
|
|
430
|
-
this.
|
|
428
|
+
this._scroll.next = next.resetScroll ?? true;
|
|
431
429
|
if (!this.history.subscribers.size) this.load(historyAction ? { action: { type: historyAction } } : void 0);
|
|
432
430
|
return this.commitLocationPromise;
|
|
433
431
|
};
|