@tanstack/router-core 1.171.3 → 1.171.5
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/index.cjs +0 -3
- package/dist/cjs/index.d.cts +1 -2
- package/dist/cjs/rewrite.cjs +1 -6
- package/dist/cjs/rewrite.cjs.map +1 -1
- package/dist/cjs/rewrite.d.cts +0 -4
- package/dist/cjs/router.cjs +9 -2
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +5 -1
- package/dist/cjs/scroll-restoration-inline.cjs +1 -1
- package/dist/cjs/scroll-restoration-inline.cjs.map +1 -1
- package/dist/cjs/scroll-restoration-inline.d.cts +1 -6
- package/dist/cjs/scroll-restoration-script/server.cjs +5 -12
- package/dist/cjs/scroll-restoration-script/server.cjs.map +1 -1
- package/dist/cjs/scroll-restoration.cjs +117 -111
- package/dist/cjs/scroll-restoration.cjs.map +1 -1
- package/dist/cjs/scroll-restoration.d.cts +0 -10
- package/dist/esm/index.d.ts +1 -2
- package/dist/esm/index.js +2 -3
- package/dist/esm/rewrite.d.ts +0 -4
- package/dist/esm/rewrite.js +1 -6
- package/dist/esm/rewrite.js.map +1 -1
- package/dist/esm/router.d.ts +5 -1
- package/dist/esm/router.js +9 -3
- package/dist/esm/router.js.map +1 -1
- package/dist/esm/scroll-restoration-inline.d.ts +1 -6
- package/dist/esm/scroll-restoration-inline.js +1 -1
- package/dist/esm/scroll-restoration-inline.js.map +1 -1
- package/dist/esm/scroll-restoration-script/server.js +5 -12
- package/dist/esm/scroll-restoration-script/server.js.map +1 -1
- package/dist/esm/scroll-restoration.d.ts +0 -10
- package/dist/esm/scroll-restoration.js +118 -111
- package/dist/esm/scroll-restoration.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +0 -3
- package/src/rewrite.ts +1 -8
- package/src/router.ts +28 -4
- package/src/scroll-restoration-inline.ts +23 -51
- package/src/scroll-restoration-script/server.ts +5 -26
- package/src/scroll-restoration.ts +190 -174
- package/dist/cjs/hash-scroll.cjs +0 -20
- package/dist/cjs/hash-scroll.cjs.map +0 -1
- package/dist/cjs/hash-scroll.d.cts +0 -7
- package/dist/esm/hash-scroll.d.ts +0 -7
- package/dist/esm/hash-scroll.js +0 -20
- package/dist/esm/hash-scroll.js.map +0 -1
- package/src/hash-scroll.ts +0 -21
package/dist/cjs/hash-scroll.cjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
//#region src/hash-scroll.ts
|
|
2
|
-
/**
|
|
3
|
-
* @private
|
|
4
|
-
* Handles hash-based scrolling after navigation completes.
|
|
5
|
-
* To be used in framework-specific <Transitioner> components during the onResolved event.
|
|
6
|
-
*/
|
|
7
|
-
function handleHashScroll(router) {
|
|
8
|
-
if (typeof document !== "undefined" && document.querySelector) {
|
|
9
|
-
const location = router.stores.location.get();
|
|
10
|
-
const hashScrollIntoViewOptions = location.state.__hashScrollIntoViewOptions ?? true;
|
|
11
|
-
if (hashScrollIntoViewOptions && location.hash !== "") {
|
|
12
|
-
const el = document.getElementById(location.hash);
|
|
13
|
-
if (el) el.scrollIntoView(hashScrollIntoViewOptions);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
exports.handleHashScroll = handleHashScroll;
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=hash-scroll.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hash-scroll.cjs","names":[],"sources":["../../src/hash-scroll.ts"],"sourcesContent":["import type { AnyRouter } from './router'\n\n/**\n * @private\n * Handles hash-based scrolling after navigation completes.\n * To be used in framework-specific <Transitioner> components during the onResolved event.\n */\nexport function handleHashScroll(router: AnyRouter) {\n if (typeof document !== 'undefined' && (document as any).querySelector) {\n const location = router.stores.location.get()\n const hashScrollIntoViewOptions =\n location.state.__hashScrollIntoViewOptions ?? true\n\n if (hashScrollIntoViewOptions && location.hash !== '') {\n const el = document.getElementById(location.hash)\n if (el) {\n el.scrollIntoView(hashScrollIntoViewOptions)\n }\n }\n }\n}\n"],"mappings":";;;;;;AAOA,SAAgB,iBAAiB,QAAmB;AAClD,KAAI,OAAO,aAAa,eAAgB,SAAiB,eAAe;EACtE,MAAM,WAAW,OAAO,OAAO,SAAS,KAAK;EAC7C,MAAM,4BACJ,SAAS,MAAM,+BAA+B;AAEhD,MAAI,6BAA6B,SAAS,SAAS,IAAI;GACrD,MAAM,KAAK,SAAS,eAAe,SAAS,KAAK;AACjD,OAAI,GACF,IAAG,eAAe,0BAA0B"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AnyRouter } from './router.cjs';
|
|
2
|
-
/**
|
|
3
|
-
* @private
|
|
4
|
-
* Handles hash-based scrolling after navigation completes.
|
|
5
|
-
* To be used in framework-specific <Transitioner> components during the onResolved event.
|
|
6
|
-
*/
|
|
7
|
-
export declare function handleHashScroll(router: AnyRouter): void;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AnyRouter } from './router.js';
|
|
2
|
-
/**
|
|
3
|
-
* @private
|
|
4
|
-
* Handles hash-based scrolling after navigation completes.
|
|
5
|
-
* To be used in framework-specific <Transitioner> components during the onResolved event.
|
|
6
|
-
*/
|
|
7
|
-
export declare function handleHashScroll(router: AnyRouter): void;
|
package/dist/esm/hash-scroll.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
//#region src/hash-scroll.ts
|
|
2
|
-
/**
|
|
3
|
-
* @private
|
|
4
|
-
* Handles hash-based scrolling after navigation completes.
|
|
5
|
-
* To be used in framework-specific <Transitioner> components during the onResolved event.
|
|
6
|
-
*/
|
|
7
|
-
function handleHashScroll(router) {
|
|
8
|
-
if (typeof document !== "undefined" && document.querySelector) {
|
|
9
|
-
const location = router.stores.location.get();
|
|
10
|
-
const hashScrollIntoViewOptions = location.state.__hashScrollIntoViewOptions ?? true;
|
|
11
|
-
if (hashScrollIntoViewOptions && location.hash !== "") {
|
|
12
|
-
const el = document.getElementById(location.hash);
|
|
13
|
-
if (el) el.scrollIntoView(hashScrollIntoViewOptions);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { handleHashScroll };
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=hash-scroll.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hash-scroll.js","names":[],"sources":["../../src/hash-scroll.ts"],"sourcesContent":["import type { AnyRouter } from './router'\n\n/**\n * @private\n * Handles hash-based scrolling after navigation completes.\n * To be used in framework-specific <Transitioner> components during the onResolved event.\n */\nexport function handleHashScroll(router: AnyRouter) {\n if (typeof document !== 'undefined' && (document as any).querySelector) {\n const location = router.stores.location.get()\n const hashScrollIntoViewOptions =\n location.state.__hashScrollIntoViewOptions ?? true\n\n if (hashScrollIntoViewOptions && location.hash !== '') {\n const el = document.getElementById(location.hash)\n if (el) {\n el.scrollIntoView(hashScrollIntoViewOptions)\n }\n }\n }\n}\n"],"mappings":";;;;;;AAOA,SAAgB,iBAAiB,QAAmB;AAClD,KAAI,OAAO,aAAa,eAAgB,SAAiB,eAAe;EACtE,MAAM,WAAW,OAAO,OAAO,SAAS,KAAK;EAC7C,MAAM,4BACJ,SAAS,MAAM,+BAA+B;AAEhD,MAAI,6BAA6B,SAAS,SAAS,IAAI;GACrD,MAAM,KAAK,SAAS,eAAe,SAAS,KAAK;AACjD,OAAI,GACF,IAAG,eAAe,0BAA0B"}
|
package/src/hash-scroll.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { AnyRouter } from './router'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @private
|
|
5
|
-
* Handles hash-based scrolling after navigation completes.
|
|
6
|
-
* To be used in framework-specific <Transitioner> components during the onResolved event.
|
|
7
|
-
*/
|
|
8
|
-
export function handleHashScroll(router: AnyRouter) {
|
|
9
|
-
if (typeof document !== 'undefined' && (document as any).querySelector) {
|
|
10
|
-
const location = router.stores.location.get()
|
|
11
|
-
const hashScrollIntoViewOptions =
|
|
12
|
-
location.state.__hashScrollIntoViewOptions ?? true
|
|
13
|
-
|
|
14
|
-
if (hashScrollIntoViewOptions && location.hash !== '') {
|
|
15
|
-
const el = document.getElementById(location.hash)
|
|
16
|
-
if (el) {
|
|
17
|
-
el.scrollIntoView(hashScrollIntoViewOptions)
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|