From 35de19bb3b707ce6a4752c781f1faf09d58fb662 Mon Sep 17 00:00:00 2001
From: Nicolas Beaussart
Date: Wed, 20 May 2026 22:32:54 +0200
Subject: [PATCH 001/454] chore: ignore nx generated folders (#7451)
---
.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitignore b/.gitignore
index 72af44458d..4c5184f4d8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -64,6 +64,8 @@ ts-perf
nx-cloud.env
.nx/cache
.nx/workspace-data
+.nx/polygraph
+.nx/self-healing
gpt/db.json
From d024a5487bc28418c0589f163fbc56eb8d633753 Mon Sep 17 00:00:00 2001
From: Manuel Schiller
Date: Wed, 20 May 2026 22:54:58 +0200
Subject: [PATCH 002/454] perf: optimize and test rewrite (#7448)
optimize and test rewrite
---
packages/router-core/src/rewrite.ts | 9 +--
packages/router-core/tests/rewrite.test.ts | 72 ++++++++++++++++++++++
2 files changed, 73 insertions(+), 8 deletions(-)
create mode 100644 packages/router-core/tests/rewrite.test.ts
diff --git a/packages/router-core/src/rewrite.ts b/packages/router-core/src/rewrite.ts
index 0da50c5b62..5c82408c00 100644
--- a/packages/router-core/src/rewrite.ts
+++ b/packages/router-core/src/rewrite.ts
@@ -1,7 +1,6 @@
import { joinPaths, trimPath } from './path'
import type { LocationRewrite } from './router'
-/** Compose multiple rewrite pairs into a single in/out rewrite. */
/** Compose multiple rewrite pairs into a single in/out rewrite. */
export function composeRewrites(rewrites: Array) {
return {
@@ -20,7 +19,6 @@ export function composeRewrites(rewrites: Array) {
} satisfies LocationRewrite
}
-/** Create a rewrite pair that strips/adds a basepath on input/output. */
/** Create a rewrite pair that strips/adds a basepath on input/output. */
export function rewriteBasepath(opts: {
basepath: string
@@ -28,13 +26,10 @@ export function rewriteBasepath(opts: {
}) {
const trimmedBasepath = trimPath(opts.basepath)
const normalizedBasepath = `/${trimmedBasepath}`
- const normalizedBasepathWithSlash = `${normalizedBasepath}/`
const checkBasepath = opts.caseSensitive
? normalizedBasepath
: normalizedBasepath.toLowerCase()
- const checkBasepathWithSlash = opts.caseSensitive
- ? normalizedBasepathWithSlash
- : normalizedBasepathWithSlash.toLowerCase()
+ const checkBasepathWithSlash = `${checkBasepath}/`
return {
input: ({ url }) => {
@@ -58,7 +53,6 @@ export function rewriteBasepath(opts: {
} satisfies LocationRewrite
}
-/** Execute a location input rewrite if provided. */
/** Execute a location input rewrite if provided. */
export function executeRewriteInput(
rewrite: LocationRewrite | undefined,
@@ -75,7 +69,6 @@ export function executeRewriteInput(
return url
}
-/** Execute a location output rewrite if provided. */
/** Execute a location output rewrite if provided. */
export function executeRewriteOutput(
rewrite: LocationRewrite | undefined,
diff --git a/packages/router-core/tests/rewrite.test.ts b/packages/router-core/tests/rewrite.test.ts
new file mode 100644
index 0000000000..c5ca2e9428
--- /dev/null
+++ b/packages/router-core/tests/rewrite.test.ts
@@ -0,0 +1,72 @@
+import { describe, expect, test } from 'vitest'
+import {
+ composeRewrites,
+ executeRewriteInput,
+ executeRewriteOutput,
+ rewriteBasepath,
+} from '../src/rewrite'
+import type { LocationRewrite } from '../src'
+
+describe('rewrite helpers', () => {
+ test('basepath rewrite strips input and restores output', () => {
+ const rewrite = rewriteBasepath({ basepath: '/app/' })
+ const inputUrl = new URL('https://example.com/app/posts')
+
+ expect(executeRewriteInput(rewrite, inputUrl).pathname).toBe('/posts')
+
+ const outputUrl = new URL('https://example.com/posts')
+ expect(executeRewriteOutput(rewrite, outputUrl).pathname).toBe('/app/posts')
+ })
+
+ test('basepath rewrite handles root output', () => {
+ const rewrite = rewriteBasepath({ basepath: '/app' })
+ const url = new URL('https://example.com/')
+
+ expect(executeRewriteOutput(rewrite, url).pathname).toBe('/app/')
+ })
+
+ test('case-insensitive basepath input preserves original suffix casing', () => {
+ const rewrite = rewriteBasepath({ basepath: '/App' })
+ const url = new URL('https://example.com/app/Users')
+
+ expect(executeRewriteInput(rewrite, url).pathname).toBe('/Users')
+ })
+
+ test('composeRewrites applies input forward and output backward', () => {
+ const calls: Array = []
+ const first: LocationRewrite = {
+ input: ({ url }) => {
+ calls.push('first-in')
+ url.pathname += 'a'
+ return url
+ },
+ output: ({ url }) => {
+ calls.push('first-out')
+ url.pathname += 'd'
+ return url
+ },
+ }
+ const second: LocationRewrite = {
+ input: ({ url }) => {
+ calls.push('second-in')
+ url.pathname += 'b'
+ return url
+ },
+ output: ({ url }) => {
+ calls.push('second-out')
+ url.pathname += 'c'
+ return url
+ },
+ }
+
+ const rewrite = composeRewrites([first, second])
+
+ expect(
+ executeRewriteInput(rewrite, new URL('https://example.com/')).pathname,
+ ).toBe('/ab')
+ expect(
+ executeRewriteOutput(rewrite, new URL('https://example.com/')).pathname,
+ ).toBe('/cd')
+ expect(calls).toEqual(['first-in', 'second-in', 'second-out', 'first-out'])
+ })
+})
From 0300f87ec5a7f878ffbe0b181acf84cba9139960 Mon Sep 17 00:00:00 2001
From: Manuel Schiller
Date: Wed, 20 May 2026 23:12:12 +0200
Subject: [PATCH 003/454] fix: fix scroll restoration issues (#7447)
Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
---
.changeset/brave-dingos-hope.md | 8 +
.changeset/soft-badgers-sneeze.md | 5 +
.../scroll-restoration/src/routeTree.gen.ts | 149 +++++++
.../scroll-restoration/src/router.tsx | 8 +
.../src/routes/(tests)/hash-scroll-repro.tsx | 18 +
.../src/routes/(tests)/nested-scroll-away.tsx | 14 +
.../(tests)/nested-scroll-carry-over-a.tsx | 49 +++
.../(tests)/nested-scroll-carry-over-b.tsx | 38 ++
.../routes/(tests)/nested-scroll-search.tsx | 44 +++
.../routes/(tests)/reset-scroll-false-a.tsx | 15 +
.../routes/(tests)/reset-scroll-false-b.tsx | 15 +
.../routes/(tests)/reset-scroll-false-c.tsx | 15 +
.../-components/reset-scroll-false-list.tsx | 23 ++
.../scroll-restoration/src/routes/index.tsx | 17 +
.../tests/hash-scroll-repro.spec.ts | 62 +++
.../tests/nested-scroll-carry-over.spec.ts | 196 +++++++++
.../tests/reset-scroll-false.spec.ts | 52 +++
packages/react-router/src/Transitioner.tsx | 10 +-
packages/router-core/src/hash-scroll.ts | 21 -
packages/router-core/src/index.ts | 3 -
packages/router-core/src/router.ts | 32 +-
.../src/scroll-restoration-inline.ts | 23 +-
.../src/scroll-restoration-script/server.ts | 11 +-
.../router-core/src/scroll-restoration.ts | 373 +++++++++---------
packages/solid-router/src/Transitioner.tsx | 10 +-
packages/vue-router/src/Transitioner.tsx | 10 +-
26 files changed, 964 insertions(+), 257 deletions(-)
create mode 100644 .changeset/brave-dingos-hope.md
create mode 100644 .changeset/soft-badgers-sneeze.md
create mode 100644 e2e/react-start/scroll-restoration/src/routes/(tests)/nested-scroll-away.tsx
create mode 100644 e2e/react-start/scroll-restoration/src/routes/(tests)/nested-scroll-carry-over-a.tsx
create mode 100644 e2e/react-start/scroll-restoration/src/routes/(tests)/nested-scroll-carry-over-b.tsx
create mode 100644 e2e/react-start/scroll-restoration/src/routes/(tests)/nested-scroll-search.tsx
create mode 100644 e2e/react-start/scroll-restoration/src/routes/(tests)/reset-scroll-false-a.tsx
create mode 100644 e2e/react-start/scroll-restoration/src/routes/(tests)/reset-scroll-false-b.tsx
create mode 100644 e2e/react-start/scroll-restoration/src/routes/(tests)/reset-scroll-false-c.tsx
create mode 100644 e2e/react-start/scroll-restoration/src/routes/-components/reset-scroll-false-list.tsx
create mode 100644 e2e/react-start/scroll-restoration/tests/nested-scroll-carry-over.spec.ts
create mode 100644 e2e/react-start/scroll-restoration/tests/reset-scroll-false.spec.ts
delete mode 100644 packages/router-core/src/hash-scroll.ts
diff --git a/.changeset/brave-dingos-hope.md b/.changeset/brave-dingos-hope.md
new file mode 100644
index 0000000000..826c01993c
--- /dev/null
+++ b/.changeset/brave-dingos-hope.md
@@ -0,0 +1,8 @@
+---
+'@tanstack/router-core': patch
+'@tanstack/react-router': patch
+'@tanstack/solid-router': patch
+'@tanstack/vue-router': patch
+---
+
+Fix hash navigation being overridden by stale scroll restoration entries.
diff --git a/.changeset/soft-badgers-sneeze.md b/.changeset/soft-badgers-sneeze.md
new file mode 100644
index 0000000000..2ce7333c61
--- /dev/null
+++ b/.changeset/soft-badgers-sneeze.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/router-core': patch
+---
+
+Preserve carried scroll positions across SPA navigations that create new restoration keys.
diff --git a/e2e/react-start/scroll-restoration/src/routeTree.gen.ts b/e2e/react-start/scroll-restoration/src/routeTree.gen.ts
index 5194bbc556..5c9174efcc 100644
--- a/e2e/react-start/scroll-restoration/src/routeTree.gen.ts
+++ b/e2e/react-start/scroll-restoration/src/routeTree.gen.ts
@@ -12,7 +12,14 @@ import { Route as rootRouteImport } from './routes/__root'
import { Route as IndexRouteImport } from './routes/index'
import { Route as testsWithSearchRouteImport } from './routes/(tests)/with-search'
import { Route as testsWithLoaderRouteImport } from './routes/(tests)/with-loader'
+import { Route as testsResetScrollFalseCRouteImport } from './routes/(tests)/reset-scroll-false-c'
+import { Route as testsResetScrollFalseBRouteImport } from './routes/(tests)/reset-scroll-false-b'
+import { Route as testsResetScrollFalseARouteImport } from './routes/(tests)/reset-scroll-false-a'
import { Route as testsNormalPageRouteImport } from './routes/(tests)/normal-page'
+import { Route as testsNestedScrollSearchRouteImport } from './routes/(tests)/nested-scroll-search'
+import { Route as testsNestedScrollCarryOverBRouteImport } from './routes/(tests)/nested-scroll-carry-over-b'
+import { Route as testsNestedScrollCarryOverARouteImport } from './routes/(tests)/nested-scroll-carry-over-a'
+import { Route as testsNestedScrollAwayRouteImport } from './routes/(tests)/nested-scroll-away'
import { Route as testsHashScrollReproRouteImport } from './routes/(tests)/hash-scroll-repro'
import { Route as testsHashScrollAboutRouteImport } from './routes/(tests)/hash-scroll-about'
@@ -31,11 +38,48 @@ const testsWithLoaderRoute = testsWithLoaderRouteImport.update({
path: '/with-loader',
getParentRoute: () => rootRouteImport,
} as any)
+const testsResetScrollFalseCRoute = testsResetScrollFalseCRouteImport.update({
+ id: '/(tests)/reset-scroll-false-c',
+ path: '/reset-scroll-false-c',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const testsResetScrollFalseBRoute = testsResetScrollFalseBRouteImport.update({
+ id: '/(tests)/reset-scroll-false-b',
+ path: '/reset-scroll-false-b',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const testsResetScrollFalseARoute = testsResetScrollFalseARouteImport.update({
+ id: '/(tests)/reset-scroll-false-a',
+ path: '/reset-scroll-false-a',
+ getParentRoute: () => rootRouteImport,
+} as any)
const testsNormalPageRoute = testsNormalPageRouteImport.update({
id: '/(tests)/normal-page',
path: '/normal-page',
getParentRoute: () => rootRouteImport,
} as any)
+const testsNestedScrollSearchRoute = testsNestedScrollSearchRouteImport.update({
+ id: '/(tests)/nested-scroll-search',
+ path: '/nested-scroll-search',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const testsNestedScrollCarryOverBRoute =
+ testsNestedScrollCarryOverBRouteImport.update({
+ id: '/(tests)/nested-scroll-carry-over-b',
+ path: '/nested-scroll-carry-over-b',
+ getParentRoute: () => rootRouteImport,
+ } as any)
+const testsNestedScrollCarryOverARoute =
+ testsNestedScrollCarryOverARouteImport.update({
+ id: '/(tests)/nested-scroll-carry-over-a',
+ path: '/nested-scroll-carry-over-a',
+ getParentRoute: () => rootRouteImport,
+ } as any)
+const testsNestedScrollAwayRoute = testsNestedScrollAwayRouteImport.update({
+ id: '/(tests)/nested-scroll-away',
+ path: '/nested-scroll-away',
+ getParentRoute: () => rootRouteImport,
+} as any)
const testsHashScrollReproRoute = testsHashScrollReproRouteImport.update({
id: '/(tests)/hash-scroll-repro',
path: '/hash-scroll-repro',
@@ -51,7 +95,14 @@ export interface FileRoutesByFullPath {
'/': typeof IndexRoute
'/hash-scroll-about': typeof testsHashScrollAboutRoute
'/hash-scroll-repro': typeof testsHashScrollReproRoute
+ '/nested-scroll-away': typeof testsNestedScrollAwayRoute
+ '/nested-scroll-carry-over-a': typeof testsNestedScrollCarryOverARoute
+ '/nested-scroll-carry-over-b': typeof testsNestedScrollCarryOverBRoute
+ '/nested-scroll-search': typeof testsNestedScrollSearchRoute
'/normal-page': typeof testsNormalPageRoute
+ '/reset-scroll-false-a': typeof testsResetScrollFalseARoute
+ '/reset-scroll-false-b': typeof testsResetScrollFalseBRoute
+ '/reset-scroll-false-c': typeof testsResetScrollFalseCRoute
'/with-loader': typeof testsWithLoaderRoute
'/with-search': typeof testsWithSearchRoute
}
@@ -59,7 +110,14 @@ export interface FileRoutesByTo {
'/': typeof IndexRoute
'/hash-scroll-about': typeof testsHashScrollAboutRoute
'/hash-scroll-repro': typeof testsHashScrollReproRoute
+ '/nested-scroll-away': typeof testsNestedScrollAwayRoute
+ '/nested-scroll-carry-over-a': typeof testsNestedScrollCarryOverARoute
+ '/nested-scroll-carry-over-b': typeof testsNestedScrollCarryOverBRoute
+ '/nested-scroll-search': typeof testsNestedScrollSearchRoute
'/normal-page': typeof testsNormalPageRoute
+ '/reset-scroll-false-a': typeof testsResetScrollFalseARoute
+ '/reset-scroll-false-b': typeof testsResetScrollFalseBRoute
+ '/reset-scroll-false-c': typeof testsResetScrollFalseCRoute
'/with-loader': typeof testsWithLoaderRoute
'/with-search': typeof testsWithSearchRoute
}
@@ -68,7 +126,14 @@ export interface FileRoutesById {
'/': typeof IndexRoute
'/(tests)/hash-scroll-about': typeof testsHashScrollAboutRoute
'/(tests)/hash-scroll-repro': typeof testsHashScrollReproRoute
+ '/(tests)/nested-scroll-away': typeof testsNestedScrollAwayRoute
+ '/(tests)/nested-scroll-carry-over-a': typeof testsNestedScrollCarryOverARoute
+ '/(tests)/nested-scroll-carry-over-b': typeof testsNestedScrollCarryOverBRoute
+ '/(tests)/nested-scroll-search': typeof testsNestedScrollSearchRoute
'/(tests)/normal-page': typeof testsNormalPageRoute
+ '/(tests)/reset-scroll-false-a': typeof testsResetScrollFalseARoute
+ '/(tests)/reset-scroll-false-b': typeof testsResetScrollFalseBRoute
+ '/(tests)/reset-scroll-false-c': typeof testsResetScrollFalseCRoute
'/(tests)/with-loader': typeof testsWithLoaderRoute
'/(tests)/with-search': typeof testsWithSearchRoute
}
@@ -78,7 +143,14 @@ export interface FileRouteTypes {
| '/'
| '/hash-scroll-about'
| '/hash-scroll-repro'
+ | '/nested-scroll-away'
+ | '/nested-scroll-carry-over-a'
+ | '/nested-scroll-carry-over-b'
+ | '/nested-scroll-search'
| '/normal-page'
+ | '/reset-scroll-false-a'
+ | '/reset-scroll-false-b'
+ | '/reset-scroll-false-c'
| '/with-loader'
| '/with-search'
fileRoutesByTo: FileRoutesByTo
@@ -86,7 +158,14 @@ export interface FileRouteTypes {
| '/'
| '/hash-scroll-about'
| '/hash-scroll-repro'
+ | '/nested-scroll-away'
+ | '/nested-scroll-carry-over-a'
+ | '/nested-scroll-carry-over-b'
+ | '/nested-scroll-search'
| '/normal-page'
+ | '/reset-scroll-false-a'
+ | '/reset-scroll-false-b'
+ | '/reset-scroll-false-c'
| '/with-loader'
| '/with-search'
id:
@@ -94,7 +173,14 @@ export interface FileRouteTypes {
| '/'
| '/(tests)/hash-scroll-about'
| '/(tests)/hash-scroll-repro'
+ | '/(tests)/nested-scroll-away'
+ | '/(tests)/nested-scroll-carry-over-a'
+ | '/(tests)/nested-scroll-carry-over-b'
+ | '/(tests)/nested-scroll-search'
| '/(tests)/normal-page'
+ | '/(tests)/reset-scroll-false-a'
+ | '/(tests)/reset-scroll-false-b'
+ | '/(tests)/reset-scroll-false-c'
| '/(tests)/with-loader'
| '/(tests)/with-search'
fileRoutesById: FileRoutesById
@@ -103,7 +189,14 @@ export interface RootRouteChildren {
IndexRoute: typeof IndexRoute
testsHashScrollAboutRoute: typeof testsHashScrollAboutRoute
testsHashScrollReproRoute: typeof testsHashScrollReproRoute
+ testsNestedScrollAwayRoute: typeof testsNestedScrollAwayRoute
+ testsNestedScrollCarryOverARoute: typeof testsNestedScrollCarryOverARoute
+ testsNestedScrollCarryOverBRoute: typeof testsNestedScrollCarryOverBRoute
+ testsNestedScrollSearchRoute: typeof testsNestedScrollSearchRoute
testsNormalPageRoute: typeof testsNormalPageRoute
+ testsResetScrollFalseARoute: typeof testsResetScrollFalseARoute
+ testsResetScrollFalseBRoute: typeof testsResetScrollFalseBRoute
+ testsResetScrollFalseCRoute: typeof testsResetScrollFalseCRoute
testsWithLoaderRoute: typeof testsWithLoaderRoute
testsWithSearchRoute: typeof testsWithSearchRoute
}
@@ -131,6 +224,27 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof testsWithLoaderRouteImport
parentRoute: typeof rootRouteImport
}
+ '/(tests)/reset-scroll-false-c': {
+ id: '/(tests)/reset-scroll-false-c'
+ path: '/reset-scroll-false-c'
+ fullPath: '/reset-scroll-false-c'
+ preLoaderRoute: typeof testsResetScrollFalseCRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/(tests)/reset-scroll-false-b': {
+ id: '/(tests)/reset-scroll-false-b'
+ path: '/reset-scroll-false-b'
+ fullPath: '/reset-scroll-false-b'
+ preLoaderRoute: typeof testsResetScrollFalseBRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/(tests)/reset-scroll-false-a': {
+ id: '/(tests)/reset-scroll-false-a'
+ path: '/reset-scroll-false-a'
+ fullPath: '/reset-scroll-false-a'
+ preLoaderRoute: typeof testsResetScrollFalseARouteImport
+ parentRoute: typeof rootRouteImport
+ }
'/(tests)/normal-page': {
id: '/(tests)/normal-page'
path: '/normal-page'
@@ -138,6 +252,34 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof testsNormalPageRouteImport
parentRoute: typeof rootRouteImport
}
+ '/(tests)/nested-scroll-search': {
+ id: '/(tests)/nested-scroll-search'
+ path: '/nested-scroll-search'
+ fullPath: '/nested-scroll-search'
+ preLoaderRoute: typeof testsNestedScrollSearchRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/(tests)/nested-scroll-carry-over-b': {
+ id: '/(tests)/nested-scroll-carry-over-b'
+ path: '/nested-scroll-carry-over-b'
+ fullPath: '/nested-scroll-carry-over-b'
+ preLoaderRoute: typeof testsNestedScrollCarryOverBRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/(tests)/nested-scroll-carry-over-a': {
+ id: '/(tests)/nested-scroll-carry-over-a'
+ path: '/nested-scroll-carry-over-a'
+ fullPath: '/nested-scroll-carry-over-a'
+ preLoaderRoute: typeof testsNestedScrollCarryOverARouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/(tests)/nested-scroll-away': {
+ id: '/(tests)/nested-scroll-away'
+ path: '/nested-scroll-away'
+ fullPath: '/nested-scroll-away'
+ preLoaderRoute: typeof testsNestedScrollAwayRouteImport
+ parentRoute: typeof rootRouteImport
+ }
'/(tests)/hash-scroll-repro': {
id: '/(tests)/hash-scroll-repro'
path: '/hash-scroll-repro'
@@ -159,7 +301,14 @@ const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
testsHashScrollAboutRoute: testsHashScrollAboutRoute,
testsHashScrollReproRoute: testsHashScrollReproRoute,
+ testsNestedScrollAwayRoute: testsNestedScrollAwayRoute,
+ testsNestedScrollCarryOverARoute: testsNestedScrollCarryOverARoute,
+ testsNestedScrollCarryOverBRoute: testsNestedScrollCarryOverBRoute,
+ testsNestedScrollSearchRoute: testsNestedScrollSearchRoute,
testsNormalPageRoute: testsNormalPageRoute,
+ testsResetScrollFalseARoute: testsResetScrollFalseARoute,
+ testsResetScrollFalseBRoute: testsResetScrollFalseBRoute,
+ testsResetScrollFalseCRoute: testsResetScrollFalseCRoute,
testsWithLoaderRoute: testsWithLoaderRoute,
testsWithSearchRoute: testsWithSearchRoute,
}
diff --git a/e2e/react-start/scroll-restoration/src/router.tsx b/e2e/react-start/scroll-restoration/src/router.tsx
index fef35c9e06..0d529ba002 100644
--- a/e2e/react-start/scroll-restoration/src/router.tsx
+++ b/e2e/react-start/scroll-restoration/src/router.tsx
@@ -7,6 +7,14 @@ export function getRouter() {
const router = createRouter({
routeTree,
scrollRestoration: true,
+ scrollToTopSelectors: ['[data-scroll-restoration-id="carry-over-reset"]'],
+ getScrollRestorationKey: (location) => {
+ if (location.pathname === '/hash-scroll-repro') {
+ return location.pathname
+ }
+
+ return location.state.__TSR_key! || location.href
+ },
defaultPreload: 'intent',
defaultErrorComponent: DefaultCatchBoundary,
defaultNotFoundComponent: () => ,
diff --git a/e2e/react-start/scroll-restoration/src/routes/(tests)/hash-scroll-repro.tsx b/e2e/react-start/scroll-restoration/src/routes/(tests)/hash-scroll-repro.tsx
index ff85d140fa..31970306bd 100644
--- a/e2e/react-start/scroll-restoration/src/routes/(tests)/hash-scroll-repro.tsx
+++ b/e2e/react-start/scroll-restoration/src/routes/(tests)/hash-scroll-repro.tsx
@@ -44,9 +44,27 @@ function Component() {
>
Invalidate
+
+ #one
+
+
+ {Array.from({ length: 20 }).map((_, i) => (
+
Nested scroll row {i}
+ ))}
+
+
{sectionIds.map((sectionId) => (
+ nested-scroll-away
+ This route intentionally has no nested scroll container.
+
+ )
+}
diff --git a/e2e/react-start/scroll-restoration/src/routes/(tests)/nested-scroll-carry-over-a.tsx b/e2e/react-start/scroll-restoration/src/routes/(tests)/nested-scroll-carry-over-a.tsx
new file mode 100644
index 0000000000..624727775c
--- /dev/null
+++ b/e2e/react-start/scroll-restoration/src/routes/(tests)/nested-scroll-carry-over-a.tsx
@@ -0,0 +1,49 @@
+import { Link, createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/(tests)/nested-scroll-carry-over-a')({
+ component: Component,
+})
+
+function ScrollBox({
+ restorationId,
+ testId,
+}: {
+ restorationId: string
+ testId: string
+}) {
+ return (
+
+ {Array.from({ length: 20 }).map((_, i) => (
+
Source row {i}
+ ))}
+
+ )
+}
+
+function Component() {
+ return (
+
+
nested-scroll-carry-over-a
+
+ Go to target
+
+
+
+
+
+
+ )
+}
diff --git a/e2e/react-start/scroll-restoration/src/routes/(tests)/nested-scroll-carry-over-b.tsx b/e2e/react-start/scroll-restoration/src/routes/(tests)/nested-scroll-carry-over-b.tsx
new file mode 100644
index 0000000000..69dddb2d14
--- /dev/null
+++ b/e2e/react-start/scroll-restoration/src/routes/(tests)/nested-scroll-carry-over-b.tsx
@@ -0,0 +1,38 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/(tests)/nested-scroll-carry-over-b')({
+ component: Component,
+})
+
+function ScrollBox({
+ restorationId,
+ testId,
+}: {
+ restorationId: string
+ testId: string
+}) {
+ return (
+
+ {Array.from({ length: 20 }).map((_, i) => (
+
Target row {i}
+ ))}
+
+ )
+}
+
+function Component() {
+ return (
+
+
nested-scroll-carry-over-b
+
+
+
+ )
+}
diff --git a/e2e/react-start/scroll-restoration/src/routes/(tests)/nested-scroll-search.tsx b/e2e/react-start/scroll-restoration/src/routes/(tests)/nested-scroll-search.tsx
new file mode 100644
index 0000000000..7216ba421c
--- /dev/null
+++ b/e2e/react-start/scroll-restoration/src/routes/(tests)/nested-scroll-search.tsx
@@ -0,0 +1,44 @@
+import { Link, createFileRoute } from '@tanstack/react-router'
+import { z } from 'zod'
+
+export const Route = createFileRoute('/(tests)/nested-scroll-search')({
+ validateSearch: z.object({
+ query: z.string().optional(),
+ }),
+ component: Component,
+})
+
+function Component() {
+ const search = Route.useSearch()
+ const query = search.query ?? 'none'
+
+ return (
+
+
nested-scroll-search
+
query: {query}
+
+
+ Set query
+
+
+ Away
+
+
+
+ {Array.from({ length: 20 }).map((_, i) => (
+
+ Query {query} row {i}
+
+ ))}
+
+
+ )
+}
diff --git a/e2e/react-start/scroll-restoration/src/routes/(tests)/reset-scroll-false-a.tsx b/e2e/react-start/scroll-restoration/src/routes/(tests)/reset-scroll-false-a.tsx
new file mode 100644
index 0000000000..89103f1194
--- /dev/null
+++ b/e2e/react-start/scroll-restoration/src/routes/(tests)/reset-scroll-false-a.tsx
@@ -0,0 +1,15 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { ResetScrollFalseList } from '../-components/reset-scroll-false-list'
+
+export const Route = createFileRoute('/(tests)/reset-scroll-false-a')({
+ component: Component,
+})
+
+function Component() {
+ return (
+
+
reset-scroll-false-a
+
+
+ )
+}
diff --git a/e2e/react-start/scroll-restoration/src/routes/(tests)/reset-scroll-false-b.tsx b/e2e/react-start/scroll-restoration/src/routes/(tests)/reset-scroll-false-b.tsx
new file mode 100644
index 0000000000..19713d91e6
--- /dev/null
+++ b/e2e/react-start/scroll-restoration/src/routes/(tests)/reset-scroll-false-b.tsx
@@ -0,0 +1,15 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { ResetScrollFalseList } from '../-components/reset-scroll-false-list'
+
+export const Route = createFileRoute('/(tests)/reset-scroll-false-b')({
+ component: Component,
+})
+
+function Component() {
+ return (
+
+
reset-scroll-false-b
+
+
+ )
+}
diff --git a/e2e/react-start/scroll-restoration/src/routes/(tests)/reset-scroll-false-c.tsx b/e2e/react-start/scroll-restoration/src/routes/(tests)/reset-scroll-false-c.tsx
new file mode 100644
index 0000000000..b7c2a853f6
--- /dev/null
+++ b/e2e/react-start/scroll-restoration/src/routes/(tests)/reset-scroll-false-c.tsx
@@ -0,0 +1,15 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { ResetScrollFalseList } from '../-components/reset-scroll-false-list'
+
+export const Route = createFileRoute('/(tests)/reset-scroll-false-c')({
+ component: Component,
+})
+
+function Component() {
+ return (
+
+
reset-scroll-false-c
+
+
+ )
+}
diff --git a/e2e/react-start/scroll-restoration/src/routes/-components/reset-scroll-false-list.tsx b/e2e/react-start/scroll-restoration/src/routes/-components/reset-scroll-false-list.tsx
new file mode 100644
index 0000000000..cdfe934aa1
--- /dev/null
+++ b/e2e/react-start/scroll-restoration/src/routes/-components/reset-scroll-false-list.tsx
@@ -0,0 +1,23 @@
+import { Link } from '@tanstack/react-router'
+import type { CSSProperties } from 'react'
+import type { LinkOptions } from '@tanstack/react-router'
+
+const style = { height: '100px', width: '50%' } satisfies CSSProperties
+
+export function ResetScrollFalseList({ to }: { to?: LinkOptions['to'] }) {
+ return Array.from({ length: 100 }, (_, i) => {
+ const label = i + 1
+
+ return (
+
+
+ {label}
+
+
+ )
+ })
+}
diff --git a/e2e/react-start/scroll-restoration/src/routes/index.tsx b/e2e/react-start/scroll-restoration/src/routes/index.tsx
index 9d36cca264..81835a5582 100644
--- a/e2e/react-start/scroll-restoration/src/routes/index.tsx
+++ b/e2e/react-start/scroll-restoration/src/routes/index.tsx
@@ -30,6 +30,23 @@ function HomeComponent() {
))}
+
+
scroll restoration repro routes
+
+ /hash-scroll-repro
+
+
+
+ /nested-scroll-carry-over-a
+
+
+
+ /nested-scroll-search
+
+
+ /reset-scroll-false-a
+
+
)
}
diff --git a/e2e/react-start/scroll-restoration/tests/hash-scroll-repro.spec.ts b/e2e/react-start/scroll-restoration/tests/hash-scroll-repro.spec.ts
index 3a8dc92afc..65dcf7a4dc 100644
--- a/e2e/react-start/scroll-restoration/tests/hash-scroll-repro.spec.ts
+++ b/e2e/react-start/scroll-restoration/tests/hash-scroll-repro.spec.ts
@@ -79,3 +79,65 @@ test('router.invalidate does not scroll back to the current hash', async ({
const scrollYAfterInvalidate = await page.evaluate(() => window.scrollY)
expect(scrollYAfterInvalidate).toBe(scrollYBeforeInvalidate)
})
+
+test('hash navigation wins over stale same-tab scroll restoration entries', async ({
+ page,
+}) => {
+ await goToRepro(page)
+ const staleScrollY = await scrollUpFromHashTarget(page)
+
+ await page.reload()
+ await page.waitForLoadState('networkidle')
+ await expect(
+ page.getByTestId('hash-scroll-repro-invalidate-count'),
+ ).toBeVisible()
+
+ await page.getByTestId('hash-scroll-section-one-link').click()
+ await expect(page.getByTestId('hash-scroll-section-one')).toBeInViewport()
+
+ await expect(
+ page.getByTestId('hash-scroll-section-five'),
+ ).not.toBeInViewport()
+
+ const scrollYAfterHashNavigation = await page.evaluate(() => window.scrollY)
+ expect(scrollYAfterHashNavigation).toBeLessThan(staleScrollY)
+})
+
+test('hash navigation still runs when only nested scroll entries restore', async ({
+ page,
+}) => {
+ await goToRepro(page)
+
+ const nestedScrollTop = await page.evaluate(() => {
+ const nested = document.querySelector('[data-testid="hash-scroll-nested"]')
+ if (!(nested instanceof HTMLElement)) {
+ throw new Error('Missing nested scroller')
+ }
+
+ nested.scrollTop = 80
+ window.dispatchEvent(new PageTransitionEvent('pagehide'))
+ return nested.scrollTop
+ })
+
+ expect(nestedScrollTop).toBeGreaterThan(0)
+
+ await page.reload()
+ await page.waitForLoadState('networkidle')
+ await expect(
+ page.getByTestId('hash-scroll-repro-invalidate-count'),
+ ).toBeVisible()
+
+ await page.getByTestId('hash-scroll-section-one-link').click()
+ await expect(page.getByTestId('hash-scroll-section-one')).toBeInViewport()
+
+ await expect
+ .poll(async () => {
+ return page.evaluate(() => {
+ const nested = document.querySelector(
+ '[data-testid="hash-scroll-nested"]',
+ )
+ return nested instanceof HTMLElement ? nested.scrollTop : 0
+ })
+ })
+ .toBe(nestedScrollTop)
+})
diff --git a/e2e/react-start/scroll-restoration/tests/nested-scroll-carry-over.spec.ts b/e2e/react-start/scroll-restoration/tests/nested-scroll-carry-over.spec.ts
new file mode 100644
index 0000000000..b26a6e32d3
--- /dev/null
+++ b/e2e/react-start/scroll-restoration/tests/nested-scroll-carry-over.spec.ts
@@ -0,0 +1,196 @@
+import { expect, test } from '@playwright/test'
+
+const storageKey = 'tsr-scroll-restoration-v1_3'
+
+test('carries existing nested scroll entries to the next key', async ({
+ page,
+}) => {
+ await page.goto('/nested-scroll-carry-over-a')
+ await page.waitForLoadState('networkidle')
+ await expect(
+ page.getByRole('heading', { name: 'nested-scroll-carry-over-a' }),
+ ).toBeVisible()
+
+ const positions = await page.evaluate(() => {
+ const getScroller = (testId: string) => {
+ const element = document.querySelector(`[data-testid="${testId}"]`)
+ if (!(element instanceof HTMLElement)) {
+ throw new Error(`Missing ${testId}`)
+ }
+ return element
+ }
+
+ const preserved = getScroller('carry-over-preserved')
+ const reset = getScroller('carry-over-reset')
+ const sourceOnly = getScroller('carry-over-source-only')
+
+ preserved.scrollTop = 80
+ reset.scrollTop = 80
+ sourceOnly.scrollTop = 80
+
+ preserved.dispatchEvent(new Event('scroll', { bubbles: true }))
+ reset.dispatchEvent(new Event('scroll', { bubbles: true }))
+ sourceOnly.dispatchEvent(new Event('scroll', { bubbles: true }))
+
+ return {
+ preserved: preserved.scrollTop,
+ reset: reset.scrollTop,
+ sourceOnly: sourceOnly.scrollTop,
+ }
+ })
+
+ expect(positions.preserved).toBeGreaterThan(0)
+ expect(positions.reset).toBeGreaterThan(0)
+ expect(positions.sourceOnly).toBeGreaterThan(0)
+
+ await page.getByTestId('nested-scroll-carry-over-link').click()
+ await expect(
+ page.getByRole('heading', { name: 'nested-scroll-carry-over-b' }),
+ ).toBeVisible()
+
+ await expect
+ .poll(async () => {
+ return page.evaluate(() => {
+ const element = document.querySelector(
+ '[data-testid="carry-over-preserved"]',
+ )
+ return element instanceof HTMLElement ? element.scrollTop : 0
+ })
+ })
+ .toBe(positions.preserved)
+
+ await expect
+ .poll(async () => {
+ return page.evaluate(() => {
+ const element = document.querySelector(
+ '[data-testid="carry-over-reset"]',
+ )
+ return element instanceof HTMLElement ? element.scrollTop : -1
+ })
+ })
+ .toBe(0)
+
+ await page.reload()
+ await page.waitForLoadState('networkidle')
+ await expect(
+ page.getByRole('heading', { name: 'nested-scroll-carry-over-b' }),
+ ).toBeVisible()
+
+ await expect
+ .poll(async () => {
+ return page.evaluate(() => {
+ const element = document.querySelector(
+ '[data-testid="carry-over-preserved"]',
+ )
+ return element instanceof HTMLElement ? element.scrollTop : 0
+ })
+ })
+ .toBe(positions.preserved)
+
+ await expect
+ .poll(async () => {
+ return page.evaluate(() => {
+ const element = document.querySelector(
+ '[data-testid="carry-over-reset"]',
+ )
+ return element instanceof HTMLElement ? element.scrollTop : -1
+ })
+ })
+ .toBe(0)
+
+ const targetKeyEntries = await page.evaluate((scrollStorageKey) => {
+ const targetKey = window.history.state.__TSR_key
+ const raw = window.sessionStorage.getItem(scrollStorageKey)
+ const state = raw ? JSON.parse(raw) : {}
+ const entries = state[targetKey] ?? {}
+
+ return {
+ hasPreserved: Object.hasOwn(
+ entries,
+ '[data-scroll-restoration-id="carry-over-preserved"]',
+ ),
+ hasReset: Object.hasOwn(
+ entries,
+ '[data-scroll-restoration-id="carry-over-reset"]',
+ ),
+ hasSourceOnly: Object.hasOwn(
+ entries,
+ '[data-scroll-restoration-id="carry-over-source-only"]',
+ ),
+ }
+ }, storageKey)
+
+ expect(targetKeyEntries).toEqual({
+ hasPreserved: true,
+ hasReset: false,
+ hasSourceOnly: false,
+ })
+})
+
+test('restores carried nested scroll after search navigation and browser back', async ({
+ page,
+}) => {
+ await page.goto('/nested-scroll-search')
+ await page.waitForLoadState('networkidle')
+ await expect(
+ page.getByRole('heading', { name: 'nested-scroll-search' }),
+ ).toBeVisible()
+
+ const scrollTop = await page.evaluate(() => {
+ const element = document.querySelector(
+ '[data-testid="nested-scroll-search-container"]',
+ )
+ if (!(element instanceof HTMLElement)) {
+ throw new Error('Missing nested scroll container')
+ }
+
+ element.scrollTop = 80
+ element.dispatchEvent(new Event('scroll', { bubbles: true }))
+ return element.scrollTop
+ })
+
+ expect(scrollTop).toBeGreaterThan(0)
+
+ await page.getByTestId('nested-scroll-search-link').click()
+ await expect(page.getByTestId('nested-scroll-search-query')).toHaveText(
+ 'query: xyz',
+ )
+
+ await expect
+ .poll(async () => {
+ return page.evaluate(() => {
+ const element = document.querySelector(
+ '[data-testid="nested-scroll-search-container"]',
+ )
+ return element instanceof HTMLElement ? element.scrollTop : 0
+ })
+ })
+ .toBe(scrollTop)
+
+ await page.getByTestId('nested-scroll-away-link').click()
+ await expect(
+ page.getByRole('heading', { name: 'nested-scroll-away' }),
+ ).toBeVisible()
+ await expect(page.getByTestId('nested-scroll-search-container')).toHaveCount(
+ 0,
+ )
+
+ await page.goBack()
+ await expect(
+ page.getByRole('heading', { name: 'nested-scroll-search' }),
+ ).toBeVisible()
+ await expect(page.getByTestId('nested-scroll-search-query')).toHaveText(
+ 'query: xyz',
+ )
+
+ await expect
+ .poll(async () => {
+ return page.evaluate(() => {
+ const element = document.querySelector(
+ '[data-testid="nested-scroll-search-container"]',
+ )
+ return element instanceof HTMLElement ? element.scrollTop : 0
+ })
+ })
+ .toBe(scrollTop)
+})
diff --git a/e2e/react-start/scroll-restoration/tests/reset-scroll-false.spec.ts b/e2e/react-start/scroll-restoration/tests/reset-scroll-false.spec.ts
new file mode 100644
index 0000000000..c153a42d19
--- /dev/null
+++ b/e2e/react-start/scroll-restoration/tests/reset-scroll-false.spec.ts
@@ -0,0 +1,52 @@
+import { expect, test } from '@playwright/test'
+
+test('preserves carried window scroll for intermediate resetScroll=false entries', async ({
+ page,
+}) => {
+ await page.goto('/reset-scroll-false-a')
+ await page.waitForLoadState('networkidle')
+ await expect(
+ page.getByRole('heading', { name: 'reset-scroll-false-a' }),
+ ).toBeVisible()
+
+ const scrollY = await page.evaluate(async () => {
+ window.scrollTo(0, 500)
+ window.dispatchEvent(new Event('scroll'))
+ await new Promise((resolve) => requestAnimationFrame(() => resolve(null)))
+ return window.scrollY
+ })
+
+ expect(scrollY).toBeGreaterThan(0)
+ await expect(page.getByTestId('reset-scroll-false-link-8')).toBeInViewport()
+
+ await page.getByTestId('reset-scroll-false-link-8').click()
+ await expect(page).toHaveURL(/\/reset-scroll-false-b$/)
+ await expect(
+ page.getByRole('heading', { name: 'reset-scroll-false-b' }),
+ ).toHaveCount(1)
+
+ await expect
+ .poll(async () => page.evaluate(() => window.scrollY))
+ .toBe(scrollY)
+ await expect(page.getByTestId('reset-scroll-false-link-8')).toBeInViewport()
+
+ await page.getByTestId('reset-scroll-false-link-8').click()
+ await expect(page).toHaveURL(/\/reset-scroll-false-c$/)
+ await expect(
+ page.getByRole('heading', { name: 'reset-scroll-false-c' }),
+ ).toHaveCount(1)
+
+ await expect
+ .poll(async () => page.evaluate(() => window.scrollY))
+ .toBe(scrollY)
+
+ await page.goBack()
+ await expect(page).toHaveURL(/\/reset-scroll-false-b$/)
+ await expect(
+ page.getByRole('heading', { name: 'reset-scroll-false-b' }),
+ ).toHaveCount(1)
+
+ await expect
+ .poll(async () => page.evaluate(() => window.scrollY))
+ .toBe(scrollY)
+})
diff --git a/packages/react-router/src/Transitioner.tsx b/packages/react-router/src/Transitioner.tsx
index 01abedded9..bf945571a6 100644
--- a/packages/react-router/src/Transitioner.tsx
+++ b/packages/react-router/src/Transitioner.tsx
@@ -2,11 +2,7 @@
import * as React from 'react'
import { batch, useStore } from '@tanstack/react-store'
-import {
- getLocationChangeInfo,
- handleHashScroll,
- trimPathRight,
-} from '@tanstack/router-core'
+import { getLocationChangeInfo, trimPathRight } from '@tanstack/router-core'
import { useLayoutEffect, usePrevious } from './utils'
import { useRouter } from './useRouter'
@@ -128,10 +124,6 @@ export function Transitioner() {
router.stores.status.set('idle')
router.stores.resolvedLocation.set(router.stores.location.get())
})
-
- if (changeInfo.hrefChanged) {
- handleHashScroll(router)
- }
}
}, [isAnyPending, previousIsAnyPending, router])
diff --git a/packages/router-core/src/hash-scroll.ts b/packages/router-core/src/hash-scroll.ts
deleted file mode 100644
index ed8354890b..0000000000
--- a/packages/router-core/src/hash-scroll.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import type { AnyRouter } from './router'
-
-/**
- * @private
- * Handles hash-based scrolling after navigation completes.
- * To be used in framework-specific components during the onResolved event.
- */
-export function handleHashScroll(router: AnyRouter) {
- if (typeof document !== 'undefined' && (document as any).querySelector) {
- const location = router.stores.location.get()
- const hashScrollIntoViewOptions =
- location.state.__hashScrollIntoViewOptions ?? true
-
- if (hashScrollIntoViewOptions && location.hash !== '') {
- const el = document.getElementById(location.hash)
- if (el) {
- el.scrollIntoView(hashScrollIntoViewOptions)
- }
- }
- }
-}
diff --git a/packages/router-core/src/index.ts b/packages/router-core/src/index.ts
index e737fa50f8..b2929420a4 100644
--- a/packages/router-core/src/index.ts
+++ b/packages/router-core/src/index.ts
@@ -407,12 +407,9 @@ export {
defaultGetScrollRestorationKey,
getElementScrollRestorationEntry,
storageKey,
- scrollRestorationCache,
setupScrollRestoration,
} from './scroll-restoration'
-export { handleHashScroll } from './hash-scroll'
-
export type {
ScrollRestorationOptions,
ScrollRestorationEntry,
diff --git a/packages/router-core/src/router.ts b/packages/router-core/src/router.ts
index 3fbcd91387..8b0200e687 100644
--- a/packages/router-core/src/router.ts
+++ b/packages/router-core/src/router.ts
@@ -52,6 +52,7 @@ import type {
import type { SearchParser, SearchSerializer } from './searchParams'
import type { AnyRedirect, ResolvedRedirect } from './redirect'
import type {
+ HistoryAction,
HistoryLocation,
HistoryState,
ParsedHistoryState,
@@ -740,7 +741,10 @@ export type GetMatchRoutesFn = (pathname: string) => {
export type EmitFn = (routerEvent: RouterEvent) => void
-export type LoadFn = (opts?: { sync?: boolean }) => Promise
+export type LoadFn = (opts?: {
+ sync?: boolean
+ action?: { type: HistoryAction }
+}) => Promise
export type CommitLocationFn = ({
viewTransition,
@@ -883,6 +887,11 @@ export function getLocationChangeInfo(
return { fromLocation, toLocation, pathChanged, hrefChanged, hashChanged }
}
+export const locationHistoryActions = new WeakMap<
+ ParsedLocation,
+ HistoryAction
+>()
+
export type CreateRouterFn = <
TRouteTree extends AnyRoute,
TTrailingSlashOption extends TrailingSlashOption = 'never',
@@ -2116,6 +2125,7 @@ export class RouterCore<
ignoreBlocker,
...next
}) => {
+ let historyAction: HistoryAction | undefined
const isSameState = () => {
// the following props are ignored but may still be provided when navigating,
// temporarily add the previous values to the next state so they don't affect
@@ -2191,7 +2201,9 @@ export class RouterCore<
this.shouldViewTransition = viewTransition
- this.history[next.replace ? 'replace' : 'push'](
+ historyAction = next.replace ? 'REPLACE' : 'PUSH'
+
+ this.history[historyAction === 'REPLACE' ? 'replace' : 'push'](
nextHistory.publicHref,
nextHistory.state,
{ ignoreBlocker },
@@ -2201,7 +2213,13 @@ export class RouterCore<
this.resetNextScroll = next.resetScroll ?? true
if (!this.history.subscribers.size) {
- this.load()
+ this.load(
+ historyAction
+ ? {
+ action: { type: historyAction },
+ }
+ : undefined,
+ )
}
return this.commitLocationPromise
@@ -2403,7 +2421,8 @@ export class RouterCore<
})
}
- load: LoadFn = async (opts?: { sync?: boolean }): Promise => {
+ load: LoadFn = async (opts): Promise => {
+ const historyAction = opts?.action?.type
let redirect: AnyRedirect | undefined
let notFound: NotFoundError | undefined
let loadPromise: Promise
@@ -2415,6 +2434,11 @@ export class RouterCore<
this.startTransition(async () => {
try {
this.beforeLoad()
+ if (historyAction) {
+ locationHistoryActions.set(this.latestLocation, historyAction)
+ } else {
+ locationHistoryActions.delete(this.latestLocation)
+ }
const next = this.latestLocation
const prevLocation = this.stores.resolvedLocation.get()
const locationChangeInfo = getLocationChangeInfo(next, prevLocation)
diff --git a/packages/router-core/src/scroll-restoration-inline.ts b/packages/router-core/src/scroll-restoration-inline.ts
index b6c772fa69..1e0328a663 100644
--- a/packages/router-core/src/scroll-restoration-inline.ts
+++ b/packages/router-core/src/scroll-restoration-inline.ts
@@ -1,9 +1,4 @@
-export default function (options: {
- storageKey: string
- key?: string
- behavior?: ScrollToOptions['behavior']
- shouldScrollRestoration?: boolean
-}) {
+export default function (options: { storageKey: string; key?: string }) {
let byKey
try {
@@ -15,13 +10,9 @@ export default function (options: {
const resolvedKey = options.key || window.history.state?.__TSR_key
const elementEntries = resolvedKey ? byKey[resolvedKey] : undefined
+ let windowRestored = false
- if (
- options.shouldScrollRestoration &&
- elementEntries &&
- typeof elementEntries === 'object' &&
- Object.keys(elementEntries).length > 0
- ) {
+ if (elementEntries && typeof elementEntries === 'object') {
for (const elementSelector in elementEntries) {
const entry = elementEntries[elementSelector]
@@ -40,8 +31,8 @@ export default function (options: {
window.scrollTo({
top: scrollY,
left: scrollX,
- behavior: options.behavior,
})
+ windowRestored = true
} else if (elementSelector) {
let element
@@ -57,10 +48,10 @@ export default function (options: {
}
}
}
-
- return
}
+ if (windowRestored) return
+
const hash = window.location.hash.split('#', 2)[1]
if (hash) {
@@ -77,5 +68,5 @@ export default function (options: {
return
}
- window.scrollTo({ top: 0, left: 0, behavior: options.behavior })
+ window.scrollTo({ top: 0, left: 0 })
}
diff --git a/packages/router-core/src/scroll-restoration-script/server.ts b/packages/router-core/src/scroll-restoration-script/server.ts
index cc7f0f38fb..d112f144b9 100644
--- a/packages/router-core/src/scroll-restoration-script/server.ts
+++ b/packages/router-core/src/scroll-restoration-script/server.ts
@@ -9,26 +9,18 @@ import type { AnyRouter } from '../router'
type InlineScrollRestorationScriptOptions = {
storageKey: string
key?: string
- behavior?: ScrollToOptions['behavior']
- shouldScrollRestoration?: boolean
}
const defaultInlineScrollRestorationScript = `(${minifiedScrollRestorationScript})(${escapeHtml(
JSON.stringify({
storageKey,
- shouldScrollRestoration: true,
} satisfies InlineScrollRestorationScriptOptions),
)})`
function getScrollRestorationScript(
options: InlineScrollRestorationScriptOptions,
) {
- if (
- options.storageKey === storageKey &&
- options.shouldScrollRestoration === true &&
- options.key === undefined &&
- options.behavior === undefined
- ) {
+ if (options.storageKey === storageKey && options.key === undefined) {
return defaultInlineScrollRestorationScript
}
@@ -58,7 +50,6 @@ export function getScrollRestorationScriptForRouter(router: AnyRouter) {
return getScrollRestorationScript({
storageKey,
- shouldScrollRestoration: true,
key: userKey,
})
}
diff --git a/packages/router-core/src/scroll-restoration.ts b/packages/router-core/src/scroll-restoration.ts
index a3a89ca1cb..d27ad28529 100644
--- a/packages/router-core/src/scroll-restoration.ts
+++ b/packages/router-core/src/scroll-restoration.ts
@@ -1,8 +1,7 @@
import { isServer } from '@tanstack/router-core/isServer'
-import { functionalUpdate, isPlainObject } from './utils'
+import { locationHistoryActions } from './router'
import type { AnyRouter } from './router'
import type { ParsedLocation } from './location'
-import type { NonNullableUpdater } from './utils'
export type ScrollRestorationEntry = { scrollX: number; scrollY: number }
@@ -10,12 +9,6 @@ type ScrollRestorationByElement = Record
type ScrollRestorationByKey = Record
-type ScrollRestorationCache = {
- readonly state: ScrollRestorationByKey
- set: (updater: NonNullableUpdater) => void
- persist: () => void
-}
-
export type ScrollRestorationOptions = {
getKey?: (location: ParsedLocation) => string
scrollBehavior?: ScrollToOptions['behavior']
@@ -23,60 +16,46 @@ export type ScrollRestorationOptions = {
function getSafeSessionStorage() {
try {
- return typeof window !== 'undefined' &&
- typeof window.sessionStorage === 'object'
- ? window.sessionStorage
- : undefined
+ // Accessing sessionStorage itself can throw SecurityError in locked-down
+ // contexts, e.g. sandboxed/opaque origins or blocked storage policies.
+ return sessionStorage
} catch {
- // silent
- return undefined
+ return
}
}
// SessionStorage key used to store scroll positions across navigations.
export const storageKey = 'tsr-scroll-restoration-v1_3'
+const safeSessionStorage = getSafeSessionStorage()
-function createScrollRestorationCache(): ScrollRestorationCache | null {
- const safeSessionStorage = getSafeSessionStorage()
- if (!safeSessionStorage) {
- return null
- }
-
- let state: ScrollRestorationByKey = {}
-
+function createScrollRestorationCache() {
try {
- const parsed = JSON.parse(safeSessionStorage.getItem(storageKey) || '{}')
- if (isPlainObject(parsed)) {
- state = parsed as ScrollRestorationByKey
- }
+ return JSON.parse(
+ safeSessionStorage?.getItem(storageKey) || '{}',
+ ) as ScrollRestorationByKey
} catch {
// ignore invalid session storage payloads
- }
-
- const persist = () => {
- try {
- safeSessionStorage.setItem(storageKey, JSON.stringify(state))
- } catch {
- if (process.env.NODE_ENV !== 'production') {
- console.warn(
- '[ts-router] Could not persist scroll restoration state to sessionStorage.',
- )
- }
- }
- }
-
- return {
- get state() {
- return state
- },
- set: (updater) => {
- state = functionalUpdate(updater, state) || state
- },
- persist,
+ return {}
}
}
-export const scrollRestorationCache = createScrollRestorationCache()
+function persistScrollRestorationCache() {
+ try {
+ safeSessionStorage?.setItem(
+ storageKey,
+ JSON.stringify(scrollRestorationCache),
+ )
+ } catch {
+ if (process.env.NODE_ENV !== 'production') {
+ console.warn(
+ '[ts-router] Could not persist scroll restoration state to sessionStorage.',
+ )
+ }
+ }
+}
+
+const scrollRestorationCache = /* @__PURE__ */ createScrollRestorationCache()
+const scrollRestorationIdAttribute = 'data-scroll-restoration-id'
/**
* The default `getKey` function for `useScrollRestoration`.
@@ -88,16 +67,29 @@ export const defaultGetScrollRestorationKey = (location: ParsedLocation) => {
return location.state.__TSR_key! || location.href
}
-function getCssSelector(el: any): string {
- const path = []
+function getScrollRestorationSelector(element: Element): string {
+ const attrId = element.getAttribute(scrollRestorationIdAttribute)
+ if (attrId) {
+ return `[${scrollRestorationIdAttribute}="${attrId}"]`
+ }
+
+ let selector = ''
+ let el: any = element
let parent: HTMLElement
+
while ((parent = el.parentNode)) {
- path.push(
- `${el.tagName}:nth-child(${Array.prototype.indexOf.call(parent.children, el) + 1})`,
- )
+ let index = 1
+ let sibling = el
+ while ((sibling = sibling.previousElementSibling)) {
+ index++
+ }
+
+ const part = `${el.localName}:nth-child(${index})`
+ selector = selector ? `${part} > ${selector}` : part
el = parent
}
- return `${path.reverse().join(' > ')}`.toLowerCase()
+
+ return selector
}
export function getElementScrollRestorationEntry(
@@ -117,11 +109,14 @@ export function getElementScrollRestorationEntry(
): ScrollRestorationEntry | undefined {
const getKey = options.getKey || defaultGetScrollRestorationKey
const restoreKey = getKey(router.latestLocation)
+ const entries = scrollRestorationCache[restoreKey]
+
+ if (!entries) {
+ return
+ }
if (options.id) {
- return scrollRestorationCache?.state[restoreKey]?.[
- `[${scrollRestorationIdAttribute}="${options.id}"]`
- ]
+ return entries[`[${scrollRestorationIdAttribute}="${options.id}"]`]
}
const element = options.getElement?.()
@@ -129,35 +124,55 @@ export function getElementScrollRestorationEntry(
return
}
- return scrollRestorationCache?.state[restoreKey]?.[
- element instanceof Window ? windowScrollTarget : getCssSelector(element)
+ return entries[
+ element === window
+ ? windowScrollTarget
+ : getScrollRestorationSelector(element as Element)
]
}
let ignoreScroll = false
const windowScrollTarget = 'window'
-const scrollRestorationIdAttribute = 'data-scroll-restoration-id'
type ScrollTarget = typeof windowScrollTarget | Element
-export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
- if (!scrollRestorationCache && !(isServer ?? router.isServer)) {
- return
+function getElement(selector: string | (() => Element | null | undefined)) {
+ try {
+ return typeof selector === 'function'
+ ? selector()
+ : document.querySelector(selector)
+ } catch {}
+ return
+}
+
+function getScrollToTopElements(
+ scrollToTopSelectors: NonNullable<
+ AnyRouter['options']['scrollToTopSelectors']
+ >,
+): Array {
+ const elements: Array = []
+
+ for (const selector of scrollToTopSelectors) {
+ if (selector === windowScrollTarget) {
+ continue
+ }
+
+ const element = getElement(selector)
+ if (element) {
+ elements.push(element)
+ }
}
- const cache = scrollRestorationCache
+ return elements
+}
- const shouldScrollRestoration =
- force ?? router.options.scrollRestoration ?? false
+export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
+ // Keep hash/top scrolling active even when sessionStorage is unavailable.
- if (shouldScrollRestoration) {
+ if (force ?? router.options.scrollRestoration) {
router.isScrollRestoring = true
}
- if (
- (isServer ?? router.isServer) ||
- router.isScrollRestorationSetup ||
- !cache
- ) {
+ if ((isServer ?? router.isServer) || router.isScrollRestorationSetup) {
return
}
@@ -167,88 +182,77 @@ export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
const getKey =
router.options.getScrollRestorationKey || defaultGetScrollRestorationKey
const trackedScrollEntries = new Map()
+ const setTrackedScrollEntry = (
+ target: ScrollTarget,
+ scrollX: number,
+ scrollY: number,
+ ) => {
+ const entry =
+ trackedScrollEntries.get(target) || ({} as ScrollRestorationEntry)
+ entry.scrollX = scrollX
+ entry.scrollY = scrollY
+ trackedScrollEntries.set(target, entry)
+ }
- window.history.scrollRestoration = 'manual'
+ history.scrollRestoration = 'manual'
const onScroll = (event: Event) => {
if (ignoreScroll || !router.isScrollRestoring) {
return
}
- if (event.target === document || event.target === window) {
- trackedScrollEntries.set(windowScrollTarget, {
- scrollX: window.scrollX || 0,
- scrollY: window.scrollY || 0,
- })
+ if (event.target === document) {
+ setTrackedScrollEntry(windowScrollTarget, scrollX, scrollY)
} else {
const target = event.target as Element
- trackedScrollEntries.set(target, {
- scrollX: target.scrollLeft || 0,
- scrollY: target.scrollTop || 0,
- })
+ setTrackedScrollEntry(target, target.scrollLeft, target.scrollTop)
}
}
// Snapshot the current page's tracked scroll targets before navigation or unload.
- const snapshotCurrentScrollTargets = (restoreKey?: string) => {
- if (
- !router.isScrollRestoring ||
- !restoreKey ||
- trackedScrollEntries.size === 0 ||
- !cache
- ) {
+ const snapshotCurrentScrollTargets = (restoreKey: string) => {
+ if (!router.isScrollRestoring) {
return
}
- const keyEntry = (cache.state[restoreKey] ||=
+ const keyEntry = (scrollRestorationCache[restoreKey] ||=
{} as ScrollRestorationByElement)
for (const [target, position] of trackedScrollEntries) {
- let selector: string | undefined
-
if (target === windowScrollTarget) {
- selector = windowScrollTarget
+ keyEntry[windowScrollTarget] = position
} else if (target.isConnected) {
- const attrId = target.getAttribute(scrollRestorationIdAttribute)
- selector = attrId
- ? `[${scrollRestorationIdAttribute}="${attrId}"]`
- : getCssSelector(target)
+ keyEntry[getScrollRestorationSelector(target)] = position
}
-
- if (!selector) {
- continue
- }
-
- keyEntry[selector] = position
}
}
document.addEventListener('scroll', onScroll, true)
router.subscribe('onBeforeLoad', (event) => {
- snapshotCurrentScrollTargets(
- event.fromLocation ? getKey(event.fromLocation) : undefined,
- )
+ if (event.fromLocation) {
+ snapshotCurrentScrollTargets(getKey(event.fromLocation))
+ }
trackedScrollEntries.clear()
})
- window.addEventListener('pagehide', () => {
+ addEventListener('pagehide', () => {
snapshotCurrentScrollTargets(
getKey(
router.stores.resolvedLocation.get() ?? router.stores.location.get(),
),
)
- cache.persist()
+ persistScrollRestorationCache()
})
// Restore destination scroll after the new route has rendered.
router.subscribe('onRendered', (event) => {
- const cacheKey = getKey(event.toLocation)
const behavior = router.options.scrollRestorationBehavior
const scrollToTopSelectors = router.options.scrollToTopSelectors
+ const shouldResetScroll = router.resetNextScroll
+ let scrollToTopElements: Array | undefined
trackedScrollEntries.clear()
- if (!router.resetNextScroll) {
+ if (!shouldResetScroll) {
router.resetNextScroll = true
- return
}
if (
@@ -258,68 +262,98 @@ export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
return
}
- ignoreScroll = true
+ const cacheKey = getKey(event.toLocation)
+ const fromCacheKey = event.fromLocation && getKey(event.fromLocation)
- try {
- const elementEntries = router.isScrollRestoring
- ? cache.state[cacheKey]
- : undefined
- let restored = false
+ if (router.isScrollRestoring && fromCacheKey && fromCacheKey !== cacheKey) {
+ const fromElementEntries = scrollRestorationCache[fromCacheKey]
- if (elementEntries) {
- for (const elementSelector in elementEntries) {
- const entry = elementEntries[elementSelector]
-
- if (!isPlainObject(entry)) {
- continue
- }
-
- const { scrollX, scrollY } = entry as {
- scrollX?: unknown
- scrollY?: unknown
- }
-
- if (!Number.isFinite(scrollX) || !Number.isFinite(scrollY)) {
- continue
- }
+ if (fromElementEntries) {
+ let toElementEntries = scrollRestorationCache[cacheKey]
+ for (const elementSelector in fromElementEntries) {
if (elementSelector === windowScrollTarget) {
- window.scrollTo({
- top: scrollY as number,
- left: scrollX as number,
- behavior,
- })
- restored = true
- } else if (elementSelector) {
- let element
-
- try {
- element = document.querySelector(elementSelector)
- } catch {
+ if (shouldResetScroll) {
+ continue
+ }
+ } else {
+ const element = getElement(elementSelector)
+ if (!element) {
continue
}
+ if (shouldResetScroll && scrollToTopSelectors) {
+ scrollToTopElements ??=
+ getScrollToTopElements(scrollToTopSelectors)
+ if (scrollToTopElements.includes(element)) {
+ continue
+ }
+ }
+ }
+
+ if (!toElementEntries) {
+ toElementEntries = scrollRestorationCache[cacheKey] =
+ {} as ScrollRestorationByElement
+ }
+
+ toElementEntries[elementSelector] ??=
+ fromElementEntries[elementSelector]!
+ }
+ }
+ }
+
+ if (!shouldResetScroll) {
+ return
+ }
+
+ ignoreScroll = true
+
+ try {
+ const hash = event.toLocation.hash
+ const hashScrollIntoViewOptions =
+ event.toLocation.state.__hashScrollIntoViewOptions ?? true
+ const action = locationHistoryActions.get(event.toLocation)
+ const skipWindowRestore =
+ hash &&
+ hashScrollIntoViewOptions &&
+ (action === 'PUSH' || action === 'REPLACE')
+
+ const elementEntries = router.isScrollRestoring
+ ? scrollRestorationCache[cacheKey]
+ : undefined
+ let windowRestored = false
+
+ if (elementEntries) {
+ for (const elementSelector in elementEntries) {
+ const { scrollX, scrollY } = elementEntries[elementSelector]!
+
+ if (elementSelector === windowScrollTarget) {
+ if (skipWindowRestore) {
+ continue
+ }
+
+ scrollTo({
+ top: scrollY,
+ left: scrollX,
+ behavior,
+ })
+ windowRestored = true
+ } else {
+ const element = getElement(elementSelector)
if (element) {
- element.scrollLeft = scrollX as number
- element.scrollTop = scrollY as number
- restored = true
+ element.scrollLeft = scrollX
+ element.scrollTop = scrollY
}
}
}
}
- if (!restored) {
- const hash = router.history.location.hash.slice(1)
-
+ if (!windowRestored) {
if (hash) {
- const hashScrollIntoViewOptions =
- window.history.state?.__hashScrollIntoViewOptions ?? true
-
if (hashScrollIntoViewOptions) {
- const el = document.getElementById(hash)
- if (el) {
- el.scrollIntoView(hashScrollIntoViewOptions)
- }
+ document
+ .getElementById(hash)
+ ?.scrollIntoView(hashScrollIntoViewOptions)
}
} else {
const scrollOptions = {
@@ -328,17 +362,11 @@ export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
behavior,
}
- window.scrollTo(scrollOptions)
+ scrollTo(scrollOptions)
if (scrollToTopSelectors) {
- for (const selector of scrollToTopSelectors) {
- if (selector === windowScrollTarget) continue
- const element =
- typeof selector === 'function'
- ? selector()
- : document.querySelector(selector)
- if (element) {
- element.scrollTo(scrollOptions)
- }
+ scrollToTopElements ??= getScrollToTopElements(scrollToTopSelectors)
+ for (const element of scrollToTopElements) {
+ element.scrollTo(scrollOptions)
}
}
}
@@ -346,12 +374,5 @@ export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
} finally {
ignoreScroll = false
}
-
- if (router.isScrollRestoring) {
- cache.set((state) => {
- state[cacheKey] ||= {} as ScrollRestorationByElement
- return state
- })
- }
})
}
diff --git a/packages/solid-router/src/Transitioner.tsx b/packages/solid-router/src/Transitioner.tsx
index d0983ba1ff..331aff5864 100644
--- a/packages/solid-router/src/Transitioner.tsx
+++ b/packages/solid-router/src/Transitioner.tsx
@@ -1,9 +1,5 @@
import * as Solid from 'solid-js'
-import {
- getLocationChangeInfo,
- handleHashScroll,
- trimPathRight,
-} from '@tanstack/router-core'
+import { getLocationChangeInfo, trimPathRight } from '@tanstack/router-core'
import { isServer } from '@tanstack/router-core/isServer'
import { useRouter } from './useRouter'
@@ -133,10 +129,6 @@ export function Transitioner() {
router.stores.status.set('idle')
router.stores.resolvedLocation.set(router.stores.location.get())
})
-
- if (changeInfo.hrefChanged) {
- handleHashScroll(router)
- }
}
return currentIsAnyPending
diff --git a/packages/vue-router/src/Transitioner.tsx b/packages/vue-router/src/Transitioner.tsx
index 66ebbfde38..b0133d965c 100644
--- a/packages/vue-router/src/Transitioner.tsx
+++ b/packages/vue-router/src/Transitioner.tsx
@@ -1,9 +1,5 @@
import * as Vue from 'vue'
-import {
- getLocationChangeInfo,
- handleHashScroll,
- trimPathRight,
-} from '@tanstack/router-core'
+import { getLocationChangeInfo, trimPathRight } from '@tanstack/router-core'
import { isServer } from '@tanstack/router-core/isServer'
import { batch, useStore } from '@tanstack/vue-store'
import { useRouter } from './useRouter'
@@ -230,10 +226,6 @@ export function useTransitionerSetup() {
type: 'onResolved',
...changeInfo,
})
-
- if (changeInfo.hrefChanged) {
- handleHashScroll(router)
- }
}
} catch {
// Ignore errors if component is unmounted
From 35a7d9cd5a0e6e19a6ad6f5b79b89b4f069a17bc Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Wed, 20 May 2026 23:32:04 +0200
Subject: [PATCH 004/454] ci: Version Packages (#7452)
---
.changeset/brave-dingos-hope.md | 8 --
.changeset/soft-badgers-sneeze.md | 5 -
.../package.json | 4 +-
.../react/authenticated-routes/package.json | 4 +-
.../basic-default-search-params/package.json | 2 +-
.../react/basic-devtools-panel/package.json | 2 +-
examples/react/basic-file-based/package.json | 4 +-
.../basic-non-nested-devtools/package.json | 2 +-
.../basic-react-query-file-based/package.json | 4 +-
examples/react/basic-react-query/package.json | 2 +-
.../react/basic-ssr-file-based/package.json | 4 +-
.../package.json | 4 +-
.../basic-virtual-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/react/basic/package.json | 2 +-
examples/react/deferred-data/package.json | 2 +-
examples/react/i18n-paraglide/package.json | 4 +-
.../kitchen-sink-file-based/package.json | 4 +-
.../package.json | 4 +-
.../kitchen-sink-react-query/package.json | 2 +-
examples/react/kitchen-sink/package.json | 2 +-
examples/react/large-file-based/package.json | 4 +-
examples/react/location-masking/package.json | 2 +-
.../react/navigation-blocking/package.json | 2 +-
.../package.json | 4 +-
.../react/quickstart-file-based/package.json | 4 +-
.../quickstart-rspack-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/react/quickstart/package.json | 2 +-
.../router-monorepo-react-query/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../router-monorepo-simple-lazy/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../react/router-monorepo-simple/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../react/scroll-restoration/package.json | 2 +-
.../search-validator-adapters/package.json | 4 +-
examples/react/start-bare/package.json | 4 +-
examples/react/start-basic-auth/package.json | 4 +-
.../react/start-basic-authjs/package.json | 4 +-
.../react/start-basic-cloudflare/package.json | 4 +-
.../start-basic-react-query/package.json | 4 +-
.../react/start-basic-static/package.json | 6 +-
examples/react/start-basic/package.json | 4 +-
examples/react/start-bun/package.json | 6 +-
examples/react/start-clerk-basic/package.json | 4 +-
.../react/start-convex-trellaux/package.json | 4 +-
examples/react/start-counter/package.json | 4 +-
.../react/start-i18n-paraglide/package.json | 4 +-
examples/react/start-large/package.json | 4 +-
examples/react/start-material-ui/package.json | 4 +-
examples/react/start-rscs/package.json | 4 +-
.../package.json | 4 +-
.../react/start-supabase-basic/package.json | 4 +-
examples/react/start-tailwind-v4/package.json | 4 +-
examples/react/start-trellaux/package.json | 4 +-
examples/react/start-workos/package.json | 4 +-
examples/react/view-transitions/package.json | 4 +-
.../react/with-framer-motion/package.json | 2 +-
.../react/with-trpc-react-query/package.json | 4 +-
examples/react/with-trpc/package.json | 4 +-
.../package.json | 4 +-
.../solid/authenticated-routes/package.json | 4 +-
.../basic-default-search-params/package.json | 2 +-
.../solid/basic-devtools-panel/package.json | 2 +-
examples/solid/basic-file-based/package.json | 4 +-
.../basic-non-nested-devtools/package.json | 2 +-
.../basic-solid-query-file-based/package.json | 4 +-
examples/solid/basic-solid-query/package.json | 4 +-
.../solid/basic-ssr-file-based/package.json | 4 +-
.../package.json | 4 +-
.../basic-virtual-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/solid/basic/package.json | 2 +-
examples/solid/deferred-data/package.json | 2 +-
examples/solid/i18n-paraglide/package.json | 4 +-
.../kitchen-sink-file-based/package.json | 4 +-
.../package.json | 4 +-
.../kitchen-sink-solid-query/package.json | 2 +-
examples/solid/kitchen-sink/package.json | 2 +-
examples/solid/large-file-based/package.json | 4 +-
examples/solid/location-masking/package.json | 2 +-
.../solid/navigation-blocking/package.json | 2 +-
.../package.json | 4 +-
.../solid/quickstart-file-based/package.json | 4 +-
.../quickstart-rspack-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/solid/quickstart/package.json | 2 +-
.../router-monorepo-simple-lazy/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../solid/router-monorepo-simple/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../router-monorepo-solid-query/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../solid/scroll-restoration/package.json | 2 +-
.../search-validator-adapters/package.json | 4 +-
examples/solid/start-basic-auth/package.json | 4 +-
.../solid/start-basic-authjs/package.json | 4 +-
.../solid/start-basic-cloudflare/package.json | 4 +-
.../solid/start-basic-netlify/package.json | 4 +-
examples/solid/start-basic-nitro/package.json | 4 +-
.../start-basic-solid-query/package.json | 4 +-
.../solid/start-basic-static/package.json | 6 +-
examples/solid/start-basic/package.json | 4 +-
examples/solid/start-bun/package.json | 6 +-
.../start-convex-better-auth/package.json | 4 +-
examples/solid/start-counter/package.json | 4 +-
.../solid/start-i18n-paraglide/package.json | 4 +-
examples/solid/start-large/package.json | 4 +-
.../package.json | 4 +-
.../solid/start-supabase-basic/package.json | 4 +-
examples/solid/start-tailwind-v4/package.json | 4 +-
examples/solid/view-transitions/package.json | 4 +-
.../solid/with-framer-motion/package.json | 2 +-
examples/solid/with-trpc/package.json | 4 +-
.../vue/basic-file-based-jsx/package.json | 4 +-
.../vue/basic-file-based-sfc/package.json | 4 +-
examples/vue/basic/package.json | 2 +-
packages/react-router/CHANGELOG.md | 9 ++
packages/react-router/package.json | 2 +-
packages/react-start-client/CHANGELOG.md | 9 ++
packages/react-start-client/package.json | 2 +-
packages/react-start-rsc/CHANGELOG.md | 13 +++
packages/react-start-rsc/package.json | 2 +-
packages/react-start-server/CHANGELOG.md | 10 ++
packages/react-start-server/package.json | 2 +-
packages/react-start/CHANGELOG.md | 13 +++
packages/react-start/package.json | 2 +-
packages/router-cli/CHANGELOG.md | 7 ++
packages/router-cli/package.json | 2 +-
packages/router-core/CHANGELOG.md | 8 ++
packages/router-core/package.json | 2 +-
packages/router-generator/CHANGELOG.md | 7 ++
packages/router-generator/package.json | 2 +-
packages/router-plugin/CHANGELOG.md | 9 ++
packages/router-plugin/package.json | 2 +-
packages/router-vite-plugin/CHANGELOG.md | 7 ++
packages/router-vite-plugin/package.json | 2 +-
packages/solid-router/CHANGELOG.md | 9 ++
packages/solid-router/package.json | 2 +-
packages/solid-start-client/CHANGELOG.md | 9 ++
packages/solid-start-client/package.json | 2 +-
packages/solid-start-server/CHANGELOG.md | 10 ++
packages/solid-start-server/package.json | 2 +-
packages/solid-start/CHANGELOG.md | 12 +++
packages/solid-start/package.json | 2 +-
packages/start-client-core/CHANGELOG.md | 8 ++
packages/start-client-core/package.json | 2 +-
packages/start-plugin-core/CHANGELOG.md | 11 ++
packages/start-plugin-core/package.json | 2 +-
packages/start-server-core/CHANGELOG.md | 9 ++
packages/start-server-core/package.json | 2 +-
.../CHANGELOG.md | 9 ++
.../package.json | 2 +-
packages/start-storage-context/CHANGELOG.md | 7 ++
packages/start-storage-context/package.json | 2 +-
packages/vue-router/CHANGELOG.md | 9 ++
packages/vue-router/package.json | 2 +-
packages/vue-start-client/CHANGELOG.md | 9 ++
packages/vue-start-client/package.json | 2 +-
packages/vue-start-server/CHANGELOG.md | 10 ++
packages/vue-start-server/package.json | 2 +-
packages/vue-start/CHANGELOG.md | 12 +++
packages/vue-start/package.json | 2 +-
pnpm-lock.yaml | 102 +++++++++---------
165 files changed, 500 insertions(+), 297 deletions(-)
delete mode 100644 .changeset/brave-dingos-hope.md
delete mode 100644 .changeset/soft-badgers-sneeze.md
diff --git a/.changeset/brave-dingos-hope.md b/.changeset/brave-dingos-hope.md
deleted file mode 100644
index 826c01993c..0000000000
--- a/.changeset/brave-dingos-hope.md
+++ /dev/null
@@ -1,8 +0,0 @@
----
-'@tanstack/router-core': patch
-'@tanstack/react-router': patch
-'@tanstack/solid-router': patch
-'@tanstack/vue-router': patch
----
-
-Fix hash navigation being overridden by stale scroll restoration entries.
diff --git a/.changeset/soft-badgers-sneeze.md b/.changeset/soft-badgers-sneeze.md
deleted file mode 100644
index 2ce7333c61..0000000000
--- a/.changeset/soft-badgers-sneeze.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@tanstack/router-core': patch
----
-
-Preserve carried scroll positions across SPA navigations that create new restoration keys.
diff --git a/examples/react/authenticated-routes-firebase/package.json b/examples/react/authenticated-routes-firebase/package.json
index 5e228d3a93..ec812cb3a7 100644
--- a/examples/react/authenticated-routes-firebase/package.json
+++ b/examples/react/authenticated-routes-firebase/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"firebase": "^11.4.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/authenticated-routes/package.json b/examples/react/authenticated-routes/package.json
index c87ce95728..5caad3a32f 100644
--- a/examples/react/authenticated-routes/package.json
+++ b/examples/react/authenticated-routes/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-default-search-params/package.json b/examples/react/basic-default-search-params/package.json
index caf4f14cae..27531f791f 100644
--- a/examples/react/basic-default-search-params/package.json
+++ b/examples/react/basic-default-search-params/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-devtools-panel/package.json b/examples/react/basic-devtools-panel/package.json
index a477eee596..854d41c207 100644
--- a/examples/react/basic-devtools-panel/package.json
+++ b/examples/react/basic-devtools-panel/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query-devtools": "^5.67.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-file-based/package.json b/examples/react/basic-file-based/package.json
index 56d4bda031..b48534f3c5 100644
--- a/examples/react/basic-file-based/package.json
+++ b/examples/react/basic-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-non-nested-devtools/package.json b/examples/react/basic-non-nested-devtools/package.json
index 57943cca27..72b70bcfe2 100644
--- a/examples/react/basic-non-nested-devtools/package.json
+++ b/examples/react/basic-non-nested-devtools/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-react-query-file-based/package.json b/examples/react/basic-react-query-file-based/package.json
index 31171c6bce..ed6a5b2960 100644
--- a/examples/react/basic-react-query-file-based/package.json
+++ b/examples/react/basic-react-query-file-based/package.json
@@ -12,9 +12,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-react-query/package.json b/examples/react/basic-react-query/package.json
index 84728cfaa8..bc02ca6c77 100644
--- a/examples/react/basic-react-query/package.json
+++ b/examples/react/basic-react-query/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-ssr-file-based/package.json b/examples/react/basic-ssr-file-based/package.json
index 3a4bab04c0..2b18261cb9 100644
--- a/examples/react/basic-ssr-file-based/package.json
+++ b/examples/react/basic-ssr-file-based/package.json
@@ -11,8 +11,8 @@
"debug": "node --inspect-brk server"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.5",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/react-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.8",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/react/basic-ssr-streaming-file-based/package.json b/examples/react/basic-ssr-streaming-file-based/package.json
index 2da76e2de2..315d95c289 100644
--- a/examples/react/basic-ssr-streaming-file-based/package.json
+++ b/examples/react/basic-ssr-streaming-file-based/package.json
@@ -11,8 +11,8 @@
"debug": "node --inspect-brk server"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.5",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/react-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.8",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/react/basic-virtual-file-based/package.json b/examples/react/basic-virtual-file-based/package.json
index 61c8bb9367..5bbc9ebfbe 100644
--- a/examples/react/basic-virtual-file-based/package.json
+++ b/examples/react/basic-virtual-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"@tanstack/virtual-file-routes": "^1.162.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-virtual-inside-file-based/package.json b/examples/react/basic-virtual-inside-file-based/package.json
index 07af23d04f..8043a7b54a 100644
--- a/examples/react/basic-virtual-inside-file-based/package.json
+++ b/examples/react/basic-virtual-inside-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"@tanstack/virtual-file-routes": "^1.162.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json
index d1ea2919df..433584bb5e 100644
--- a/examples/react/basic/package.json
+++ b/examples/react/basic/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/deferred-data/package.json b/examples/react/deferred-data/package.json
index 9ff29ac992..974433e232 100644
--- a/examples/react/deferred-data/package.json
+++ b/examples/react/deferred-data/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/i18n-paraglide/package.json b/examples/react/i18n-paraglide/package.json
index a4753e6083..9f973371ea 100644
--- a/examples/react/i18n-paraglide/package.json
+++ b/examples/react/i18n-paraglide/package.json
@@ -11,8 +11,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/react-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.8",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"tailwindcss": "^4.2.2"
diff --git a/examples/react/kitchen-sink-file-based/package.json b/examples/react/kitchen-sink-file-based/package.json
index 47b3d5f3e1..90577d0d6c 100644
--- a/examples/react/kitchen-sink-file-based/package.json
+++ b/examples/react/kitchen-sink-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"immer": "^10.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/kitchen-sink-react-query-file-based/package.json b/examples/react/kitchen-sink-react-query-file-based/package.json
index b8ec9e0a6f..76fa5a4327 100644
--- a/examples/react/kitchen-sink-react-query-file-based/package.json
+++ b/examples/react/kitchen-sink-react-query-file-based/package.json
@@ -12,9 +12,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"immer": "^10.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/kitchen-sink-react-query/package.json b/examples/react/kitchen-sink-react-query/package.json
index c891364253..dffab36cec 100644
--- a/examples/react/kitchen-sink-react-query/package.json
+++ b/examples/react/kitchen-sink-react-query/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"immer": "^10.1.1",
"react": "^19.0.0",
diff --git a/examples/react/kitchen-sink/package.json b/examples/react/kitchen-sink/package.json
index 51554732b8..dc54780d28 100644
--- a/examples/react/kitchen-sink/package.json
+++ b/examples/react/kitchen-sink/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"immer": "^10.1.1",
"react": "^19.0.0",
diff --git a/examples/react/large-file-based/package.json b/examples/react/large-file-based/package.json
index 539a4517b1..ab59b7373c 100644
--- a/examples/react/large-file-based/package.json
+++ b/examples/react/large-file-based/package.json
@@ -13,9 +13,9 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/location-masking/package.json b/examples/react/location-masking/package.json
index 5465bce944..cf2851838b 100644
--- a/examples/react/location-masking/package.json
+++ b/examples/react/location-masking/package.json
@@ -12,7 +12,7 @@
"@radix-ui/react-dialog": "^1.1.6",
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/navigation-blocking/package.json b/examples/react/navigation-blocking/package.json
index 08d3be7ba4..8e24813227 100644
--- a/examples/react/navigation-blocking/package.json
+++ b/examples/react/navigation-blocking/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/quickstart-esbuild-file-based/package.json b/examples/react/quickstart-esbuild-file-based/package.json
index decd297f70..6df08ad3da 100644
--- a/examples/react/quickstart-esbuild-file-based/package.json
+++ b/examples/react/quickstart-esbuild-file-based/package.json
@@ -9,9 +9,9 @@
"start": "dev"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/quickstart-file-based/package.json b/examples/react/quickstart-file-based/package.json
index b810f1e114..27dc70de3c 100644
--- a/examples/react/quickstart-file-based/package.json
+++ b/examples/react/quickstart-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/quickstart-rspack-file-based/package.json b/examples/react/quickstart-rspack-file-based/package.json
index 4abc46cf51..ac7d0cfe2e 100644
--- a/examples/react/quickstart-rspack-file-based/package.json
+++ b/examples/react/quickstart-rspack-file-based/package.json
@@ -9,7 +9,7 @@
},
"dependencies": {
"@tailwindcss/postcss": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"postcss": "^8.5.1",
"react": "^19.0.0",
@@ -19,7 +19,7 @@
"devDependencies": {
"@rsbuild/core": "^2.0.1",
"@rsbuild/plugin-react": "^2.0.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"typescript": "^6.0.2"
diff --git a/examples/react/quickstart-webpack-file-based/package.json b/examples/react/quickstart-webpack-file-based/package.json
index 932c30c41e..5c85cb0bd2 100644
--- a/examples/react/quickstart-webpack-file-based/package.json
+++ b/examples/react/quickstart-webpack-file-based/package.json
@@ -7,14 +7,14 @@
"build": "webpack build && tsc --noEmit"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@swc/core": "^1.15.33",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"html-webpack-plugin": "^5.6.3",
diff --git a/examples/react/quickstart/package.json b/examples/react/quickstart/package.json
index ab428f9c10..77a0372a8c 100644
--- a/examples/react/quickstart/package.json
+++ b/examples/react/quickstart/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/router-monorepo-react-query/package.json b/examples/react/router-monorepo-react-query/package.json
index b08354b9b6..c61b4f668f 100644
--- a/examples/react/router-monorepo-react-query/package.json
+++ b/examples/react/router-monorepo-react-query/package.json
@@ -12,9 +12,9 @@
"dependencies": {
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-react-query/packages/router/package.json b/examples/react/router-monorepo-react-query/packages/router/package.json
index 3a6e3fd99e..072106367c 100644
--- a/examples/react/router-monorepo-react-query/packages/router/package.json
+++ b/examples/react/router-monorepo-react-query/packages/router/package.json
@@ -11,8 +11,8 @@
"@router-mono-react-query/post-query": "workspace:*",
"@tanstack/history": "^1.162.0",
"@tanstack/react-query": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/react-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/router-monorepo-simple-lazy/package.json b/examples/react/router-monorepo-simple-lazy/package.json
index 3997efd01d..d67ab256a4 100644
--- a/examples/react/router-monorepo-simple-lazy/package.json
+++ b/examples/react/router-monorepo-simple-lazy/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-simple-lazy/packages/router/package.json b/examples/react/router-monorepo-simple-lazy/packages/router/package.json
index 340ae6f812..3d2dacc294 100644
--- a/examples/react/router-monorepo-simple-lazy/packages/router/package.json
+++ b/examples/react/router-monorepo-simple-lazy/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.0",
- "@tanstack/react-router": "^1.170.5",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/react-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/router-monorepo-simple/package.json b/examples/react/router-monorepo-simple/package.json
index 5c1dc8ff77..15113c22f6 100644
--- a/examples/react/router-monorepo-simple/package.json
+++ b/examples/react/router-monorepo-simple/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-simple/packages/router/package.json b/examples/react/router-monorepo-simple/packages/router/package.json
index 5c5c689da8..2f97fce3a9 100644
--- a/examples/react/router-monorepo-simple/packages/router/package.json
+++ b/examples/react/router-monorepo-simple/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.0",
- "@tanstack/react-router": "^1.170.5",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/react-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/scroll-restoration/package.json b/examples/react/scroll-restoration/package.json
index 219bc22f1e..33377e13ef 100644
--- a/examples/react/scroll-restoration/package.json
+++ b/examples/react/scroll-restoration/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-virtual": "^3.13.0",
"react": "^19.0.0",
diff --git a/examples/react/search-validator-adapters/package.json b/examples/react/search-validator-adapters/package.json
index 584deb8cc4..8e405a203e 100644
--- a/examples/react/search-validator-adapters/package.json
+++ b/examples/react/search-validator-adapters/package.json
@@ -13,9 +13,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/arktype-adapter": "^1.167.0",
"@tanstack/react-query": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"@tanstack/valibot-adapter": "^1.167.0",
"@tanstack/zod-adapter": "^1.167.0",
"arktype": "^2.1.7",
diff --git a/examples/react/start-bare/package.json b/examples/react/start-bare/package.json
index 7562804bff..3d45684c04 100644
--- a/examples/react/start-bare/package.json
+++ b/examples/react/start-bare/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-basic-auth/package.json b/examples/react/start-basic-auth/package.json
index 22ccdd7ced..c239064f4b 100644
--- a/examples/react/start-basic-auth/package.json
+++ b/examples/react/start-basic-auth/package.json
@@ -14,9 +14,9 @@
"@libsql/client": "^0.15.15",
"@prisma/adapter-libsql": "^7.0.0",
"@prisma/client": "^7.0.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-authjs/package.json b/examples/react/start-basic-authjs/package.json
index 2ab2e86ee5..3ca99feb82 100644
--- a/examples/react/start-basic-authjs/package.json
+++ b/examples/react/start-basic-authjs/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@auth/core": "^0.41.1",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"start-authjs": "^1.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/start-basic-cloudflare/package.json b/examples/react/start-basic-cloudflare/package.json
index a03ad01421..896f0c01cc 100644
--- a/examples/react/start-basic-cloudflare/package.json
+++ b/examples/react/start-basic-cloudflare/package.json
@@ -12,9 +12,9 @@
"postinstall": "npm run cf-typegen"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-basic-react-query/package.json b/examples/react/start-basic-react-query/package.json
index 582bbc018d..904bdaeb62 100644
--- a/examples/react/start-basic-react-query/package.json
+++ b/examples/react/start-basic-react-query/package.json
@@ -12,10 +12,10 @@
"dependencies": {
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-static/package.json b/examples/react/start-basic-static/package.json
index e0ff34e6b7..d5c0ea3fce 100644
--- a/examples/react/start-basic-static/package.json
+++ b/examples/react/start-basic-static/package.json
@@ -10,10 +10,10 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
- "@tanstack/start-static-server-functions": "^1.167.5",
+ "@tanstack/react-start": "^1.168.8",
+ "@tanstack/start-static-server-functions": "^1.167.6",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/start-basic/package.json b/examples/react/start-basic/package.json
index 49b6c48e42..88335c1a66 100644
--- a/examples/react/start-basic/package.json
+++ b/examples/react/start-basic/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^2.6.0",
diff --git a/examples/react/start-bun/package.json b/examples/react/start-bun/package.json
index d5e39a4730..cebc6bbfcd 100644
--- a/examples/react/start-bun/package.json
+++ b/examples/react/start-bun/package.json
@@ -15,11 +15,11 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-devtools": "^0.7.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.8",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"tailwindcss": "^4.2.2"
diff --git a/examples/react/start-clerk-basic/package.json b/examples/react/start-clerk-basic/package.json
index cce179a85d..ee326da237 100644
--- a/examples/react/start-clerk-basic/package.json
+++ b/examples/react/start-clerk-basic/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@clerk/tanstack-react-start": "^0.27.14",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/start-convex-trellaux/package.json b/examples/react/start-convex-trellaux/package.json
index 2ad6128814..4161a8b2b5 100644
--- a/examples/react/start-convex-trellaux/package.json
+++ b/examples/react/start-convex-trellaux/package.json
@@ -15,10 +15,10 @@
"@convex-dev/react-query": "0.0.0-alpha.8",
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"concurrently": "^8.2.2",
"convex": "^1.19.0",
"ky": "^1.7.4",
diff --git a/examples/react/start-counter/package.json b/examples/react/start-counter/package.json
index fb0e66ebfd..330dabc992 100644
--- a/examples/react/start-counter/package.json
+++ b/examples/react/start-counter/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-i18n-paraglide/package.json b/examples/react/start-i18n-paraglide/package.json
index 8c7c026bbe..54f998696c 100644
--- a/examples/react/start-i18n-paraglide/package.json
+++ b/examples/react/start-i18n-paraglide/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tanstack/react-devtools": "^0.7.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"react": "^19.1.1",
"react-dom": "^19.1.1"
},
diff --git a/examples/react/start-large/package.json b/examples/react/start-large/package.json
index c95951a97d..b096ad6b7d 100644
--- a/examples/react/start-large/package.json
+++ b/examples/react/start-large/package.json
@@ -13,9 +13,9 @@
},
"dependencies": {
"@tanstack/react-query": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-material-ui/package.json b/examples/react/start-material-ui/package.json
index aeabc22ec8..2b73b1ef73 100644
--- a/examples/react/start-material-ui/package.json
+++ b/examples/react/start-material-ui/package.json
@@ -15,9 +15,9 @@
"@emotion/styled": "11.14.0",
"@fontsource-variable/roboto": "5.2.5",
"@mui/material": "6.4.7",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-rscs/package.json b/examples/react/start-rscs/package.json
index 9f35ac7f93..a282784965 100644
--- a/examples/react/start-rscs/package.json
+++ b/examples/react/start-rscs/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"dexie": "^4.0.10",
"react": "^19.2.0",
"react-dom": "^19.2.0",
diff --git a/examples/react/start-streaming-data-from-server-functions/package.json b/examples/react/start-streaming-data-from-server-functions/package.json
index f82bf8b636..efbb20f5c9 100644
--- a/examples/react/start-streaming-data-from-server-functions/package.json
+++ b/examples/react/start-streaming-data-from-server-functions/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-supabase-basic/package.json b/examples/react/start-supabase-basic/package.json
index b3da2dee66..65ba228d03 100644
--- a/examples/react/start-supabase-basic/package.json
+++ b/examples/react/start-supabase-basic/package.json
@@ -15,9 +15,9 @@
"dependencies": {
"@supabase/ssr": "^0.5.2",
"@supabase/supabase-js": "^2.48.1",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/start-tailwind-v4/package.json b/examples/react/start-tailwind-v4/package.json
index d9f4cfcabf..afeaf66e5d 100644
--- a/examples/react/start-tailwind-v4/package.json
+++ b/examples/react/start-tailwind-v4/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^2.6.0",
diff --git a/examples/react/start-trellaux/package.json b/examples/react/start-trellaux/package.json
index dd0b0626f0..2dd0562a07 100644
--- a/examples/react/start-trellaux/package.json
+++ b/examples/react/start-trellaux/package.json
@@ -12,10 +12,10 @@
"dependencies": {
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"ky": "^1.7.4",
"msw": "^2.7.0",
"react": "^19.0.0",
diff --git a/examples/react/start-workos/package.json b/examples/react/start-workos/package.json
index 394666915a..aaa45ff72e 100644
--- a/examples/react/start-workos/package.json
+++ b/examples/react/start-workos/package.json
@@ -14,9 +14,9 @@
"license": "MIT",
"dependencies": {
"@radix-ui/themes": "^3.3.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.7",
+ "@tanstack/react-start": "^1.168.8",
"@workos/authkit-tanstack-react-start": "^0.5.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
diff --git a/examples/react/view-transitions/package.json b/examples/react/view-transitions/package.json
index 02cfa9344c..3c1f548b67 100644
--- a/examples/react/view-transitions/package.json
+++ b/examples/react/view-transitions/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/with-framer-motion/package.json b/examples/react/with-framer-motion/package.json
index 73cc0e669a..d173aae1de 100644
--- a/examples/react/with-framer-motion/package.json
+++ b/examples/react/with-framer-motion/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"framer-motion": "^11.18.2",
"react": "^19.0.0",
diff --git a/examples/react/with-trpc-react-query/package.json b/examples/react/with-trpc-react-query/package.json
index e12f9a3e9a..311873e55b 100644
--- a/examples/react/with-trpc-react-query/package.json
+++ b/examples/react/with-trpc-react-query/package.json
@@ -13,9 +13,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
"@trpc/tanstack-react-query": "^11.4.3",
diff --git a/examples/react/with-trpc/package.json b/examples/react/with-trpc/package.json
index 1f4f0e69ca..3915700d6f 100644
--- a/examples/react/with-trpc/package.json
+++ b/examples/react/with-trpc/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.5",
+ "@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
"express": "^5.2.1",
diff --git a/examples/solid/authenticated-routes-firebase/package.json b/examples/solid/authenticated-routes-firebase/package.json
index 5d7d420d44..9a21f1b2b1 100644
--- a/examples/solid/authenticated-routes-firebase/package.json
+++ b/examples/solid/authenticated-routes-firebase/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.7",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"firebase": "^11.4.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/authenticated-routes/package.json b/examples/solid/authenticated-routes/package.json
index 7e850bc1f2..c87e1513fc 100644
--- a/examples/solid/authenticated-routes/package.json
+++ b/examples/solid/authenticated-routes/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.7",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-default-search-params/package.json b/examples/solid/basic-default-search-params/package.json
index 03b1187bc2..f8372e728a 100644
--- a/examples/solid/basic-default-search-params/package.json
+++ b/examples/solid/basic-default-search-params/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-devtools-panel/package.json b/examples/solid/basic-devtools-panel/package.json
index c05cd9b6fb..f4dd3e7ba2 100644
--- a/examples/solid/basic-devtools-panel/package.json
+++ b/examples/solid/basic-devtools-panel/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-file-based/package.json b/examples/solid/basic-file-based/package.json
index 984b2a2bb3..ae65586112 100644
--- a/examples/solid/basic-file-based/package.json
+++ b/examples/solid/basic-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
@@ -18,7 +18,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/basic-non-nested-devtools/package.json b/examples/solid/basic-non-nested-devtools/package.json
index 38440e773d..ae0339ffe6 100644
--- a/examples/solid/basic-non-nested-devtools/package.json
+++ b/examples/solid/basic-non-nested-devtools/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-solid-query-file-based/package.json b/examples/solid/basic-solid-query-file-based/package.json
index 17788135a3..6a7ffe1823 100644
--- a/examples/solid/basic-solid-query-file-based/package.json
+++ b/examples/solid/basic-solid-query-file-based/package.json
@@ -13,7 +13,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
@@ -21,7 +21,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/basic-solid-query/package.json b/examples/solid/basic-solid-query/package.json
index 30b8c41add..3aff51b9f0 100644
--- a/examples/solid/basic-solid-query/package.json
+++ b/examples/solid/basic-solid-query/package.json
@@ -12,14 +12,14 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/basic-ssr-file-based/package.json b/examples/solid/basic-ssr-file-based/package.json
index e85385cea2..972032b048 100644
--- a/examples/solid/basic-ssr-file-based/package.json
+++ b/examples/solid/basic-ssr-file-based/package.json
@@ -11,8 +11,8 @@
"debug": "node --inspect-brk server"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.5",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.8",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/solid/basic-ssr-streaming-file-based/package.json b/examples/solid/basic-ssr-streaming-file-based/package.json
index 95a59804bd..c34f57d3e4 100644
--- a/examples/solid/basic-ssr-streaming-file-based/package.json
+++ b/examples/solid/basic-ssr-streaming-file-based/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"compression": "^1.8.0",
"express": "^5.2.1",
@@ -24,7 +24,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"@types/express": "^5.0.6",
"typescript": "^6.0.2",
"vite": "^8.0.0",
diff --git a/examples/solid/basic-virtual-file-based/package.json b/examples/solid/basic-virtual-file-based/package.json
index a597e712e4..f4446c6c99 100644
--- a/examples/solid/basic-virtual-file-based/package.json
+++ b/examples/solid/basic-virtual-file-based/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.7",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/virtual-file-routes": "^1.162.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/basic-virtual-inside-file-based/package.json b/examples/solid/basic-virtual-inside-file-based/package.json
index 6f7b67d2e2..58f31e59d2 100644
--- a/examples/solid/basic-virtual-inside-file-based/package.json
+++ b/examples/solid/basic-virtual-inside-file-based/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.7",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/virtual-file-routes": "^1.162.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/basic/package.json b/examples/solid/basic/package.json
index eba54d6032..c85041a038 100644
--- a/examples/solid/basic/package.json
+++ b/examples/solid/basic/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/deferred-data/package.json b/examples/solid/deferred-data/package.json
index 621bd08f5f..092484f3e0 100644
--- a/examples/solid/deferred-data/package.json
+++ b/examples/solid/deferred-data/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/i18n-paraglide/package.json b/examples/solid/i18n-paraglide/package.json
index b0a7f15c86..17030b2ab7 100644
--- a/examples/solid/i18n-paraglide/package.json
+++ b/examples/solid/i18n-paraglide/package.json
@@ -11,8 +11,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.5",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.8",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
diff --git a/examples/solid/kitchen-sink-file-based/package.json b/examples/solid/kitchen-sink-file-based/package.json
index 40808372f9..2dcfc6befe 100644
--- a/examples/solid/kitchen-sink-file-based/package.json
+++ b/examples/solid/kitchen-sink-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
@@ -19,7 +19,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/kitchen-sink-solid-query-file-based/package.json b/examples/solid/kitchen-sink-solid-query-file-based/package.json
index 0526f62338..520f9060e1 100644
--- a/examples/solid/kitchen-sink-solid-query-file-based/package.json
+++ b/examples/solid/kitchen-sink-solid-query-file-based/package.json
@@ -10,10 +10,10 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
diff --git a/examples/solid/kitchen-sink-solid-query/package.json b/examples/solid/kitchen-sink-solid-query/package.json
index 668db6a236..59b81bf06e 100644
--- a/examples/solid/kitchen-sink-solid-query/package.json
+++ b/examples/solid/kitchen-sink-solid-query/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
diff --git a/examples/solid/kitchen-sink/package.json b/examples/solid/kitchen-sink/package.json
index fb5117d65e..9026efa9a9 100644
--- a/examples/solid/kitchen-sink/package.json
+++ b/examples/solid/kitchen-sink/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
diff --git a/examples/solid/large-file-based/package.json b/examples/solid/large-file-based/package.json
index b9e3f1e269..d6d0d02ab4 100644
--- a/examples/solid/large-file-based/package.json
+++ b/examples/solid/large-file-based/package.json
@@ -12,9 +12,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/location-masking/package.json b/examples/solid/location-masking/package.json
index 8dd9ec96a6..67b24a4862 100644
--- a/examples/solid/location-masking/package.json
+++ b/examples/solid/location-masking/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
diff --git a/examples/solid/navigation-blocking/package.json b/examples/solid/navigation-blocking/package.json
index e3155dc01c..485379a908 100644
--- a/examples/solid/navigation-blocking/package.json
+++ b/examples/solid/navigation-blocking/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
diff --git a/examples/solid/quickstart-esbuild-file-based/package.json b/examples/solid/quickstart-esbuild-file-based/package.json
index 651cd7abd5..6eba69fc6d 100644
--- a/examples/solid/quickstart-esbuild-file-based/package.json
+++ b/examples/solid/quickstart-esbuild-file-based/package.json
@@ -9,8 +9,8 @@
"start": "dev"
},
"dependencies": {
- "@tanstack/router-plugin": "^1.168.7",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/quickstart-file-based/package.json b/examples/solid/quickstart-file-based/package.json
index 88044b5945..551f6ebdcd 100644
--- a/examples/solid/quickstart-file-based/package.json
+++ b/examples/solid/quickstart-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
@@ -18,7 +18,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/quickstart-rspack-file-based/package.json b/examples/solid/quickstart-rspack-file-based/package.json
index 52a874195a..95385af782 100644
--- a/examples/solid/quickstart-rspack-file-based/package.json
+++ b/examples/solid/quickstart-rspack-file-based/package.json
@@ -9,7 +9,7 @@
},
"dependencies": {
"@tailwindcss/postcss": "^4.2.2",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"postcss": "^8.5.1",
"solid-js": "^1.9.10",
@@ -19,7 +19,7 @@
"@rsbuild/core": "^2.0.1",
"@rsbuild/plugin-babel": "^1.1.2",
"@rsbuild/plugin-solid": "^1.1.1",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"typescript": "^6.0.2"
}
}
diff --git a/examples/solid/quickstart-webpack-file-based/package.json b/examples/solid/quickstart-webpack-file-based/package.json
index e217cee13a..6b2963fd9f 100644
--- a/examples/solid/quickstart-webpack-file-based/package.json
+++ b/examples/solid/quickstart-webpack-file-based/package.json
@@ -7,7 +7,7 @@
"build": "webpack build && tsc --noEmit"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
@@ -15,7 +15,7 @@
"devDependencies": {
"@babel/core": "^7.28.5",
"@babel/preset-typescript": "^7.27.1",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"babel-loader": "^10.0.0",
"babel-preset-solid": "^1.9.10",
"css-loader": "^7.1.2",
diff --git a/examples/solid/quickstart/package.json b/examples/solid/quickstart/package.json
index 5cd5fbd6fa..4fd6978bc4 100644
--- a/examples/solid/quickstart/package.json
+++ b/examples/solid/quickstart/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
diff --git a/examples/solid/router-monorepo-simple-lazy/package.json b/examples/solid/router-monorepo-simple-lazy/package.json
index 6f30372a1c..6bb627da62 100644
--- a/examples/solid/router-monorepo-simple-lazy/package.json
+++ b/examples/solid/router-monorepo-simple-lazy/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-simple-lazy/packages/router/package.json b/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
index 35410dc2b8..0d3c1ea446 100644
--- a/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
+++ b/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.0",
- "@tanstack/solid-router": "^1.170.5",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.8",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
"solid-js": "^1.9.10"
diff --git a/examples/solid/router-monorepo-simple/package.json b/examples/solid/router-monorepo-simple/package.json
index 3fe4f9044f..6425c6aca3 100644
--- a/examples/solid/router-monorepo-simple/package.json
+++ b/examples/solid/router-monorepo-simple/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-simple/packages/router/package.json b/examples/solid/router-monorepo-simple/packages/router/package.json
index bfbd17a908..c67c468cec 100644
--- a/examples/solid/router-monorepo-simple/packages/router/package.json
+++ b/examples/solid/router-monorepo-simple/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.0",
- "@tanstack/solid-router": "^1.170.5",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.8",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
"solid-js": "^1.9.10"
diff --git a/examples/solid/router-monorepo-solid-query/package.json b/examples/solid/router-monorepo-solid-query/package.json
index 91a5d52b02..54cfc82f67 100644
--- a/examples/solid/router-monorepo-solid-query/package.json
+++ b/examples/solid/router-monorepo-solid-query/package.json
@@ -12,9 +12,9 @@
"dependencies": {
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-solid-query/packages/router/package.json b/examples/solid/router-monorepo-solid-query/packages/router/package.json
index c9321f2c4e..9e45605826 100644
--- a/examples/solid/router-monorepo-solid-query/packages/router/package.json
+++ b/examples/solid/router-monorepo-solid-query/packages/router/package.json
@@ -10,8 +10,8 @@
"dependencies": {
"@tanstack/history": "^1.162.0",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.5",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.8",
"@router-solid-mono-solid-query/post-query": "workspace:*",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
diff --git a/examples/solid/scroll-restoration/package.json b/examples/solid/scroll-restoration/package.json
index 0d082e2f69..21eba7bb1e 100644
--- a/examples/solid/scroll-restoration/package.json
+++ b/examples/solid/scroll-restoration/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/solid-virtual": "^3.13.0",
"solid-js": "^1.9.10",
diff --git a/examples/solid/search-validator-adapters/package.json b/examples/solid/search-validator-adapters/package.json
index 7240d31032..3335b3b0cd 100644
--- a/examples/solid/search-validator-adapters/package.json
+++ b/examples/solid/search-validator-adapters/package.json
@@ -13,9 +13,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/arktype-adapter": "^1.167.0",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/router-plugin": "^1.168.8",
"@tanstack/valibot-adapter": "^1.167.0",
"@tanstack/zod-adapter": "^1.167.0",
"arktype": "^2.1.7",
diff --git a/examples/solid/start-basic-auth/package.json b/examples/solid/start-basic-auth/package.json
index 22da45a9e1..dddea459f9 100644
--- a/examples/solid/start-basic-auth/package.json
+++ b/examples/solid/start-basic-auth/package.json
@@ -14,9 +14,9 @@
"@libsql/client": "^0.15.15",
"@prisma/adapter-libsql": "^7.0.0",
"@prisma/client": "^7.0.0",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
+ "@tanstack/solid-start": "^1.168.8",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0"
diff --git a/examples/solid/start-basic-authjs/package.json b/examples/solid/start-basic-authjs/package.json
index 9c1b8fd7f6..a80a834c96 100644
--- a/examples/solid/start-basic-authjs/package.json
+++ b/examples/solid/start-basic-authjs/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@auth/core": "^0.41.1",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
+ "@tanstack/solid-start": "^1.168.8",
"start-authjs": "^1.0.0",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0"
diff --git a/examples/solid/start-basic-cloudflare/package.json b/examples/solid/start-basic-cloudflare/package.json
index 38c023f3cf..1bfff3ab5b 100644
--- a/examples/solid/start-basic-cloudflare/package.json
+++ b/examples/solid/start-basic-cloudflare/package.json
@@ -12,9 +12,9 @@
"postinstall": "npm run cf-typegen"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
+ "@tanstack/solid-start": "^1.168.8",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-netlify/package.json b/examples/solid/start-basic-netlify/package.json
index 51420bc439..89abbba7fb 100644
--- a/examples/solid/start-basic-netlify/package.json
+++ b/examples/solid/start-basic-netlify/package.json
@@ -9,9 +9,9 @@
"preview": "vite preview"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
+ "@tanstack/solid-start": "^1.168.8",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-nitro/package.json b/examples/solid/start-basic-nitro/package.json
index 03ca7e7ad9..a99d1e8f28 100644
--- a/examples/solid/start-basic-nitro/package.json
+++ b/examples/solid/start-basic-nitro/package.json
@@ -9,9 +9,9 @@
"preview": "vite preview"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
+ "@tanstack/solid-start": "^1.168.8",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-solid-query/package.json b/examples/solid/start-basic-solid-query/package.json
index 32e68c3071..864f211d28 100644
--- a/examples/solid/start-basic-solid-query/package.json
+++ b/examples/solid/start-basic-solid-query/package.json
@@ -12,10 +12,10 @@
"dependencies": {
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/solid-router-ssr-query": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
+ "@tanstack/solid-start": "^1.168.8",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0"
diff --git a/examples/solid/start-basic-static/package.json b/examples/solid/start-basic-static/package.json
index a84aa50cf9..4cee02143a 100644
--- a/examples/solid/start-basic-static/package.json
+++ b/examples/solid/start-basic-static/package.json
@@ -10,10 +10,10 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
- "@tanstack/start-static-server-functions": "^1.167.5",
+ "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/start-static-server-functions": "^1.167.6",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
"tailwind-merge": "^2.6.0"
diff --git a/examples/solid/start-basic/package.json b/examples/solid/start-basic/package.json
index deb3a18b65..4294e31b11 100644
--- a/examples/solid/start-basic/package.json
+++ b/examples/solid/start-basic/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
+ "@tanstack/solid-start": "^1.168.8",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0"
diff --git a/examples/solid/start-bun/package.json b/examples/solid/start-bun/package.json
index 6ece8b1451..0a2d821ae8 100644
--- a/examples/solid/start-bun/package.json
+++ b/examples/solid/start-bun/package.json
@@ -15,11 +15,11 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-devtools": "^0.7.0",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/solid-router-ssr-query": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
- "@tanstack/router-plugin": "^1.168.7",
+ "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.8",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
diff --git a/examples/solid/start-convex-better-auth/package.json b/examples/solid/start-convex-better-auth/package.json
index 318563bc24..9c14355f8a 100644
--- a/examples/solid/start-convex-better-auth/package.json
+++ b/examples/solid/start-convex-better-auth/package.json
@@ -13,9 +13,9 @@
"dependencies": {
"@convex-dev/better-auth": "^0.9.7",
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
+ "@tanstack/solid-start": "^1.168.8",
"better-auth": "^1.3.27",
"clsx": "^2.1.1",
"convex": "^1.28.2",
diff --git a/examples/solid/start-counter/package.json b/examples/solid/start-counter/package.json
index 5acd3058a2..4838a5789b 100644
--- a/examples/solid/start-counter/package.json
+++ b/examples/solid/start-counter/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
+ "@tanstack/solid-start": "^1.168.8",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0",
diff --git a/examples/solid/start-i18n-paraglide/package.json b/examples/solid/start-i18n-paraglide/package.json
index 0d3359a4c3..da38ce8613 100644
--- a/examples/solid/start-i18n-paraglide/package.json
+++ b/examples/solid/start-i18n-paraglide/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tanstack/solid-devtools": "^0.7.0",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
+ "@tanstack/solid-start": "^1.168.8",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-large/package.json b/examples/solid/start-large/package.json
index dfb28dbe7d..4b9fe15ab6 100644
--- a/examples/solid/start-large/package.json
+++ b/examples/solid/start-large/package.json
@@ -13,9 +13,9 @@
},
"dependencies": {
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
+ "@tanstack/solid-start": "^1.168.8",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
"tailwind-merge": "^2.6.0",
diff --git a/examples/solid/start-streaming-data-from-server-functions/package.json b/examples/solid/start-streaming-data-from-server-functions/package.json
index 512d7791a8..b28cee556a 100644
--- a/examples/solid/start-streaming-data-from-server-functions/package.json
+++ b/examples/solid/start-streaming-data-from-server-functions/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
+ "@tanstack/solid-start": "^1.168.8",
"solid-js": "^1.9.10",
"zod": "^4.4.3"
},
diff --git a/examples/solid/start-supabase-basic/package.json b/examples/solid/start-supabase-basic/package.json
index 1780b317d6..350b2fcfa1 100644
--- a/examples/solid/start-supabase-basic/package.json
+++ b/examples/solid/start-supabase-basic/package.json
@@ -14,9 +14,9 @@
"dependencies": {
"@supabase/ssr": "^0.5.2",
"@supabase/supabase-js": "^2.48.1",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
+ "@tanstack/solid-start": "^1.168.8",
"solid-js": "^1.9.9",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/start-tailwind-v4/package.json b/examples/solid/start-tailwind-v4/package.json
index 90be84f664..eacc1a2cd1 100644
--- a/examples/solid/start-tailwind-v4/package.json
+++ b/examples/solid/start-tailwind-v4/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.7",
+ "@tanstack/solid-start": "^1.168.8",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0",
"zod": "^4.4.3"
diff --git a/examples/solid/view-transitions/package.json b/examples/solid/view-transitions/package.json
index 3b3ab73143..e4429c22f7 100644
--- a/examples/solid/view-transitions/package.json
+++ b/examples/solid/view-transitions/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.7",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/with-framer-motion/package.json b/examples/solid/with-framer-motion/package.json
index d4a1a6d86e..c86a33fb4e 100644
--- a/examples/solid/with-framer-motion/package.json
+++ b/examples/solid/with-framer-motion/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/with-trpc/package.json b/examples/solid/with-trpc/package.json
index dc436a0dc2..788447dbd4 100644
--- a/examples/solid/with-trpc/package.json
+++ b/examples/solid/with-trpc/package.json
@@ -11,8 +11,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.7",
- "@tanstack/solid-router": "^1.170.5",
+ "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
diff --git a/examples/vue/basic-file-based-jsx/package.json b/examples/vue/basic-file-based-jsx/package.json
index 18670cde4f..91762744b1 100644
--- a/examples/vue/basic-file-based-jsx/package.json
+++ b/examples/vue/basic-file-based-jsx/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.7",
- "@tanstack/vue-router": "^1.170.5",
+ "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/vue-router": "^1.170.6",
"@tanstack/vue-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"tailwindcss": "^4.2.2",
diff --git a/examples/vue/basic-file-based-sfc/package.json b/examples/vue/basic-file-based-sfc/package.json
index b7e5b76b5a..91d711b957 100644
--- a/examples/vue/basic-file-based-sfc/package.json
+++ b/examples/vue/basic-file-based-sfc/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.7",
- "@tanstack/vue-router": "^1.170.5",
+ "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/vue-router": "^1.170.6",
"@tanstack/vue-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"tailwindcss": "^4.2.2",
diff --git a/examples/vue/basic/package.json b/examples/vue/basic/package.json
index dced3d07f5..9e1a9b689b 100644
--- a/examples/vue/basic/package.json
+++ b/examples/vue/basic/package.json
@@ -9,7 +9,7 @@
"start": "vite"
},
"dependencies": {
- "@tanstack/vue-router": "^1.170.5",
+ "@tanstack/vue-router": "^1.170.6",
"@tanstack/vue-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"vue": "^3.5.13",
diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md
index dae7fc0bac..bea372a8a9 100644
--- a/packages/react-router/CHANGELOG.md
+++ b/packages/react-router/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/react-router
+## 1.170.6
+
+### Patch Changes
+
+- Fix hash navigation being overridden by stale scroll restoration entries. ([#7447](https://github.com/TanStack/router/pull/7447))
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+
## 1.170.5
### Patch Changes
diff --git a/packages/react-router/package.json b/packages/react-router/package.json
index e838d459df..b99802acff 100644
--- a/packages/react-router/package.json
+++ b/packages/react-router/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-router",
- "version": "1.170.5",
+ "version": "1.170.6",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start-client/CHANGELOG.md b/packages/react-start-client/CHANGELOG.md
index 3e4181502f..8e18c4090c 100644
--- a/packages/react-start-client/CHANGELOG.md
+++ b/packages/react-start-client/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/react-start-client
+## 1.168.1
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+ - @tanstack/react-router@1.170.6
+ - @tanstack/start-client-core@1.170.1
+
## 1.168.0
### Minor Changes
diff --git a/packages/react-start-client/package.json b/packages/react-start-client/package.json
index 56e26b3b0d..1cbe0f4839 100644
--- a/packages/react-start-client/package.json
+++ b/packages/react-start-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-client",
- "version": "1.168.0",
+ "version": "1.168.1",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start-rsc/CHANGELOG.md b/packages/react-start-rsc/CHANGELOG.md
index 0732c4c907..a38c7f7fc5 100644
--- a/packages/react-start-rsc/CHANGELOG.md
+++ b/packages/react-start-rsc/CHANGELOG.md
@@ -1,5 +1,18 @@
# @tanstack/react-start-rsc
+## 0.1.8
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+ - @tanstack/react-router@1.170.6
+ - @tanstack/react-start-server@1.167.6
+ - @tanstack/start-client-core@1.170.1
+ - @tanstack/start-plugin-core@1.171.1
+ - @tanstack/start-server-core@1.169.1
+ - @tanstack/start-storage-context@1.167.6
+
## 0.1.7
### Patch Changes
diff --git a/packages/react-start-rsc/package.json b/packages/react-start-rsc/package.json
index 085d984b6e..f564f67c89 100644
--- a/packages/react-start-rsc/package.json
+++ b/packages/react-start-rsc/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-rsc",
- "version": "0.1.7",
+ "version": "0.1.8",
"description": "React Server Components support for TanStack Start",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start-server/CHANGELOG.md b/packages/react-start-server/CHANGELOG.md
index cd2468f67e..db0285b291 100644
--- a/packages/react-start-server/CHANGELOG.md
+++ b/packages/react-start-server/CHANGELOG.md
@@ -1,5 +1,15 @@
# @tanstack/react-start-server
+## 1.167.6
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+ - @tanstack/react-router@1.170.6
+ - @tanstack/start-client-core@1.170.1
+ - @tanstack/start-server-core@1.169.1
+
## 1.167.5
### Patch Changes
diff --git a/packages/react-start-server/package.json b/packages/react-start-server/package.json
index a52d4e692e..db18d260e7 100644
--- a/packages/react-start-server/package.json
+++ b/packages/react-start-server/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-server",
- "version": "1.167.5",
+ "version": "1.167.6",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start/CHANGELOG.md b/packages/react-start/CHANGELOG.md
index c09d468d50..1b1723b9e0 100644
--- a/packages/react-start/CHANGELOG.md
+++ b/packages/react-start/CHANGELOG.md
@@ -1,5 +1,18 @@
# @tanstack/react-start
+## 1.168.8
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/react-router@1.170.6
+ - @tanstack/react-start-client@1.168.1
+ - @tanstack/react-start-rsc@0.1.8
+ - @tanstack/react-start-server@1.167.6
+ - @tanstack/start-client-core@1.170.1
+ - @tanstack/start-plugin-core@1.171.1
+ - @tanstack/start-server-core@1.169.1
+
## 1.168.7
### Patch Changes
diff --git a/packages/react-start/package.json b/packages/react-start/package.json
index 386ad1547b..dc9fc5e7ee 100644
--- a/packages/react-start/package.json
+++ b/packages/react-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start",
- "version": "1.168.7",
+ "version": "1.168.8",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-cli/CHANGELOG.md b/packages/router-cli/CHANGELOG.md
index 3deb09f561..3817e2a345 100644
--- a/packages/router-cli/CHANGELOG.md
+++ b/packages/router-cli/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-cli
+## 1.167.7
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/router-generator@1.167.7
+
## 1.167.6
### Patch Changes
diff --git a/packages/router-cli/package.json b/packages/router-cli/package.json
index 46ab6e4fb4..99210a3a90 100644
--- a/packages/router-cli/package.json
+++ b/packages/router-cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-cli",
- "version": "1.167.6",
+ "version": "1.167.7",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-core/CHANGELOG.md b/packages/router-core/CHANGELOG.md
index 51b03620a1..a0e796a694 100644
--- a/packages/router-core/CHANGELOG.md
+++ b/packages/router-core/CHANGELOG.md
@@ -1,5 +1,13 @@
# @tanstack/router-core
+## 1.171.4
+
+### Patch Changes
+
+- Fix hash navigation being overridden by stale scroll restoration entries. ([#7447](https://github.com/TanStack/router/pull/7447))
+
+- Preserve carried scroll positions across SPA navigations that create new restoration keys. ([#7447](https://github.com/TanStack/router/pull/7447))
+
## 1.171.3
### Patch Changes
diff --git a/packages/router-core/package.json b/packages/router-core/package.json
index b4040d434d..f1ab6b7c36 100644
--- a/packages/router-core/package.json
+++ b/packages/router-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-core",
- "version": "1.171.3",
+ "version": "1.171.4",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-generator/CHANGELOG.md b/packages/router-generator/CHANGELOG.md
index 5261204396..4200dd6713 100644
--- a/packages/router-generator/CHANGELOG.md
+++ b/packages/router-generator/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-generator
+## 1.167.7
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+
## 1.167.6
### Patch Changes
diff --git a/packages/router-generator/package.json b/packages/router-generator/package.json
index 7acf637f19..4d4f35c402 100644
--- a/packages/router-generator/package.json
+++ b/packages/router-generator/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-generator",
- "version": "1.167.6",
+ "version": "1.167.7",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-plugin/CHANGELOG.md b/packages/router-plugin/CHANGELOG.md
index fd72f95178..7bd7b621dc 100644
--- a/packages/router-plugin/CHANGELOG.md
+++ b/packages/router-plugin/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/router-plugin
+## 1.168.8
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+ - @tanstack/react-router@1.170.6
+ - @tanstack/router-generator@1.167.7
+
## 1.168.7
### Patch Changes
diff --git a/packages/router-plugin/package.json b/packages/router-plugin/package.json
index d9a47b3387..eaf55e5141 100644
--- a/packages/router-plugin/package.json
+++ b/packages/router-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-plugin",
- "version": "1.168.7",
+ "version": "1.168.8",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-vite-plugin/CHANGELOG.md b/packages/router-vite-plugin/CHANGELOG.md
index b9dd498d14..195e9a5dd3 100644
--- a/packages/router-vite-plugin/CHANGELOG.md
+++ b/packages/router-vite-plugin/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-vite-plugin
+## 1.167.8
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/router-plugin@1.168.8
+
## 1.167.7
### Patch Changes
diff --git a/packages/router-vite-plugin/package.json b/packages/router-vite-plugin/package.json
index a8fb6d621a..3157c548c5 100644
--- a/packages/router-vite-plugin/package.json
+++ b/packages/router-vite-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-vite-plugin",
- "version": "1.167.7",
+ "version": "1.167.8",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-router/CHANGELOG.md b/packages/solid-router/CHANGELOG.md
index 0295cea24a..2bc44aeb84 100644
--- a/packages/solid-router/CHANGELOG.md
+++ b/packages/solid-router/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/solid-router
+## 1.170.6
+
+### Patch Changes
+
+- Fix hash navigation being overridden by stale scroll restoration entries. ([#7447](https://github.com/TanStack/router/pull/7447))
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+
## 1.170.5
### Patch Changes
diff --git a/packages/solid-router/package.json b/packages/solid-router/package.json
index 99d85145d4..fab2f1156d 100644
--- a/packages/solid-router/package.json
+++ b/packages/solid-router/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-router",
- "version": "1.170.5",
+ "version": "1.170.6",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-start-client/CHANGELOG.md b/packages/solid-start-client/CHANGELOG.md
index c55fd2b1d2..dcb6ed2f26 100644
--- a/packages/solid-start-client/CHANGELOG.md
+++ b/packages/solid-start-client/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/solid-start-client
+## 1.168.1
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+ - @tanstack/solid-router@1.170.6
+ - @tanstack/start-client-core@1.170.1
+
## 1.168.0
### Minor Changes
diff --git a/packages/solid-start-client/package.json b/packages/solid-start-client/package.json
index 0364671d1b..72cfabeeb2 100644
--- a/packages/solid-start-client/package.json
+++ b/packages/solid-start-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-start-client",
- "version": "1.168.0",
+ "version": "1.168.1",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-start-server/CHANGELOG.md b/packages/solid-start-server/CHANGELOG.md
index 911f16fdb2..7516a930e9 100644
--- a/packages/solid-start-server/CHANGELOG.md
+++ b/packages/solid-start-server/CHANGELOG.md
@@ -1,5 +1,15 @@
# @tanstack/solid-start-server
+## 1.167.6
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+ - @tanstack/solid-router@1.170.6
+ - @tanstack/start-client-core@1.170.1
+ - @tanstack/start-server-core@1.169.1
+
## 1.167.5
### Patch Changes
diff --git a/packages/solid-start-server/package.json b/packages/solid-start-server/package.json
index ed28f9fec0..c3b84e53a1 100644
--- a/packages/solid-start-server/package.json
+++ b/packages/solid-start-server/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-start-server",
- "version": "1.167.5",
+ "version": "1.167.6",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-start/CHANGELOG.md b/packages/solid-start/CHANGELOG.md
index af2ced7af5..42239162d3 100644
--- a/packages/solid-start/CHANGELOG.md
+++ b/packages/solid-start/CHANGELOG.md
@@ -1,5 +1,17 @@
# @tanstack/solid-start
+## 1.168.8
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/solid-router@1.170.6
+ - @tanstack/solid-start-client@1.168.1
+ - @tanstack/solid-start-server@1.167.6
+ - @tanstack/start-client-core@1.170.1
+ - @tanstack/start-plugin-core@1.171.1
+ - @tanstack/start-server-core@1.169.1
+
## 1.168.7
### Patch Changes
diff --git a/packages/solid-start/package.json b/packages/solid-start/package.json
index 2fb32e19bf..981ada4eb5 100644
--- a/packages/solid-start/package.json
+++ b/packages/solid-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-start",
- "version": "1.168.7",
+ "version": "1.168.8",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-client-core/CHANGELOG.md b/packages/start-client-core/CHANGELOG.md
index c3b7eec77d..e96f796396 100644
--- a/packages/start-client-core/CHANGELOG.md
+++ b/packages/start-client-core/CHANGELOG.md
@@ -1,5 +1,13 @@
# @tanstack/start-client-core
+## 1.170.1
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+ - @tanstack/start-storage-context@1.167.6
+
## 1.170.0
### Minor Changes
diff --git a/packages/start-client-core/package.json b/packages/start-client-core/package.json
index b4d7fd990b..083628d55b 100644
--- a/packages/start-client-core/package.json
+++ b/packages/start-client-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-client-core",
- "version": "1.170.0",
+ "version": "1.170.1",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-plugin-core/CHANGELOG.md b/packages/start-plugin-core/CHANGELOG.md
index 016652ac58..6572d64003 100644
--- a/packages/start-plugin-core/CHANGELOG.md
+++ b/packages/start-plugin-core/CHANGELOG.md
@@ -1,5 +1,16 @@
# @tanstack/start-plugin-core
+## 1.171.1
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+ - @tanstack/router-generator@1.167.7
+ - @tanstack/router-plugin@1.168.8
+ - @tanstack/start-client-core@1.170.1
+ - @tanstack/start-server-core@1.169.1
+
## 1.171.0
### Minor Changes
diff --git a/packages/start-plugin-core/package.json b/packages/start-plugin-core/package.json
index 27abc54f07..ff691c0eaa 100644
--- a/packages/start-plugin-core/package.json
+++ b/packages/start-plugin-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-plugin-core",
- "version": "1.171.0",
+ "version": "1.171.1",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-server-core/CHANGELOG.md b/packages/start-server-core/CHANGELOG.md
index 85a0202cbb..4920f0ef46 100644
--- a/packages/start-server-core/CHANGELOG.md
+++ b/packages/start-server-core/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/start-server-core
+## 1.169.1
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+ - @tanstack/start-client-core@1.170.1
+ - @tanstack/start-storage-context@1.167.6
+
## 1.169.0
### Minor Changes
diff --git a/packages/start-server-core/package.json b/packages/start-server-core/package.json
index b4ba415409..4846fc5fe5 100644
--- a/packages/start-server-core/package.json
+++ b/packages/start-server-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-server-core",
- "version": "1.169.0",
+ "version": "1.169.1",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-static-server-functions/CHANGELOG.md b/packages/start-static-server-functions/CHANGELOG.md
index ff3aa9bd85..6cc3250af8 100644
--- a/packages/start-static-server-functions/CHANGELOG.md
+++ b/packages/start-static-server-functions/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/start-static-server-functions
+## 1.167.6
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/start-client-core@1.170.1
+ - @tanstack/react-start@1.168.8
+ - @tanstack/solid-start@1.168.8
+
## 1.167.5
### Patch Changes
diff --git a/packages/start-static-server-functions/package.json b/packages/start-static-server-functions/package.json
index ee765ded0b..492ac90c01 100644
--- a/packages/start-static-server-functions/package.json
+++ b/packages/start-static-server-functions/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-static-server-functions",
- "version": "1.167.5",
+ "version": "1.167.6",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-storage-context/CHANGELOG.md b/packages/start-storage-context/CHANGELOG.md
index dfe148c6e2..8050e83eb9 100644
--- a/packages/start-storage-context/CHANGELOG.md
+++ b/packages/start-storage-context/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/start-storage-context
+## 1.167.6
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+
## 1.167.5
### Patch Changes
diff --git a/packages/start-storage-context/package.json b/packages/start-storage-context/package.json
index 1506c658f9..dcc3f22dac 100644
--- a/packages/start-storage-context/package.json
+++ b/packages/start-storage-context/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-storage-context",
- "version": "1.167.5",
+ "version": "1.167.6",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-router/CHANGELOG.md b/packages/vue-router/CHANGELOG.md
index f610ad3dd5..86d1663b33 100644
--- a/packages/vue-router/CHANGELOG.md
+++ b/packages/vue-router/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/vue-router
+## 1.170.6
+
+### Patch Changes
+
+- Fix hash navigation being overridden by stale scroll restoration entries. ([#7447](https://github.com/TanStack/router/pull/7447))
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+
## 1.170.5
### Patch Changes
diff --git a/packages/vue-router/package.json b/packages/vue-router/package.json
index 61e5cff269..066db5b844 100644
--- a/packages/vue-router/package.json
+++ b/packages/vue-router/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-router",
- "version": "1.170.5",
+ "version": "1.170.6",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-start-client/CHANGELOG.md b/packages/vue-start-client/CHANGELOG.md
index ca4c52031d..f99f3d2047 100644
--- a/packages/vue-start-client/CHANGELOG.md
+++ b/packages/vue-start-client/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/vue-start-client
+## 1.167.6
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+ - @tanstack/vue-router@1.170.6
+ - @tanstack/start-client-core@1.170.1
+
## 1.167.5
### Patch Changes
diff --git a/packages/vue-start-client/package.json b/packages/vue-start-client/package.json
index b107d57f8e..e61575fdd5 100644
--- a/packages/vue-start-client/package.json
+++ b/packages/vue-start-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-start-client",
- "version": "1.167.5",
+ "version": "1.167.6",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-start-server/CHANGELOG.md b/packages/vue-start-server/CHANGELOG.md
index 5f8f43a1c6..664ca31747 100644
--- a/packages/vue-start-server/CHANGELOG.md
+++ b/packages/vue-start-server/CHANGELOG.md
@@ -1,5 +1,15 @@
# @tanstack/vue-start-server
+## 1.167.6
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960), [`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/router-core@1.171.4
+ - @tanstack/vue-router@1.170.6
+ - @tanstack/start-client-core@1.170.1
+ - @tanstack/start-server-core@1.169.1
+
## 1.167.5
### Patch Changes
diff --git a/packages/vue-start-server/package.json b/packages/vue-start-server/package.json
index ae01a68cf4..59b70b085d 100644
--- a/packages/vue-start-server/package.json
+++ b/packages/vue-start-server/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-start-server",
- "version": "1.167.5",
+ "version": "1.167.6",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-start/CHANGELOG.md b/packages/vue-start/CHANGELOG.md
index aa6e1b8f34..b24b4cabce 100644
--- a/packages/vue-start/CHANGELOG.md
+++ b/packages/vue-start/CHANGELOG.md
@@ -1,5 +1,17 @@
# @tanstack/vue-start
+## 1.168.8
+
+### Patch Changes
+
+- Updated dependencies [[`0300f87`](https://github.com/TanStack/router/commit/0300f87ec5a7f878ffbe0b181acf84cba9139960)]:
+ - @tanstack/vue-router@1.170.6
+ - @tanstack/start-client-core@1.170.1
+ - @tanstack/start-plugin-core@1.171.1
+ - @tanstack/start-server-core@1.169.1
+ - @tanstack/vue-start-client@1.167.6
+ - @tanstack/vue-start-server@1.167.6
+
## 1.168.7
### Patch Changes
diff --git a/packages/vue-start/package.json b/packages/vue-start/package.json
index a0bd728f23..83cafe7325 100644
--- a/packages/vue-start/package.json
+++ b/packages/vue-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-start",
- "version": "1.168.7",
+ "version": "1.168.8",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 2363a22eb4..819ae4a325 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -10115,7 +10115,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10152,7 +10152,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10192,7 +10192,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10232,7 +10232,7 @@ importers:
specifier: ^5.99.0
version: 5.99.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10266,7 +10266,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10297,7 +10297,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10334,7 +10334,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10377,7 +10377,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.99.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10417,7 +10417,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.99.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10454,7 +10454,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
compression:
specifier: ^1.8.0
@@ -10494,7 +10494,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10549,7 +10549,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10589,7 +10589,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10626,7 +10626,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10663,7 +10663,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
solid-js:
specifier: 1.9.12
@@ -10694,7 +10694,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10731,7 +10731,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10777,7 +10777,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.99.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10823,7 +10823,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.99.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10866,7 +10866,7 @@ importers:
specifier: ^5.99.0
version: 5.99.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10903,7 +10903,7 @@ importers:
specifier: ^5.99.0
version: 5.99.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10937,7 +10937,7 @@ importers:
specifier: ^5.99.0
version: 5.99.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10968,7 +10968,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10996,7 +10996,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11027,7 +11027,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11064,7 +11064,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11098,7 +11098,7 @@ importers:
examples/solid/quickstart-webpack-file-based:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11159,7 +11159,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11193,7 +11193,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11233,7 +11233,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.99.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11267,7 +11267,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11307,7 +11307,7 @@ importers:
specifier: ^5.99.0
version: 5.99.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11353,7 +11353,7 @@ importers:
examples/solid/start-basic:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11405,7 +11405,7 @@ importers:
specifier: ^7.0.0
version: 7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2)
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11454,7 +11454,7 @@ importers:
specifier: ^0.41.1
version: 0.41.1
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11494,7 +11494,7 @@ importers:
examples/solid/start-basic-cloudflare:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11534,7 +11534,7 @@ importers:
examples/solid/start-basic-netlify:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11571,7 +11571,7 @@ importers:
examples/solid/start-basic-nitro:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11614,7 +11614,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.99.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11657,7 +11657,7 @@ importers:
examples/solid/start-basic-static:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11709,7 +11709,7 @@ importers:
specifier: ^0.7.0
version: 0.7.14(csstype@3.2.3)(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11773,7 +11773,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11828,7 +11828,7 @@ importers:
examples/solid/start-counter:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11871,7 +11871,7 @@ importers:
specifier: ^0.7.0
version: 0.7.14(csstype@3.2.3)(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11911,7 +11911,7 @@ importers:
specifier: ^5.99.0
version: 5.99.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11954,7 +11954,7 @@ importers:
examples/solid/start-streaming-data-from-server-functions:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11991,7 +11991,7 @@ importers:
specifier: ^2.48.1
version: 2.48.1
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12028,7 +12028,7 @@ importers:
examples/solid/start-tailwind-v4:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12074,7 +12074,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12108,7 +12108,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12148,7 +12148,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.5
+ specifier: ^1.170.6
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
From 7df0d02bfb1407b1f07731ef69af24e2f0e415d7 Mon Sep 17 00:00:00 2001
From: Manuel Schiller
Date: Thu, 21 May 2026 00:03:43 +0200
Subject: [PATCH 005/454] fix: Fix escaped underscore index route generation
(#7453)
---
.changeset/bright-bats-fold.md | 5 +
.../src/filesystem/physical/getRouteNodes.ts | 17 +-
.../src/filesystem/virtual/getRouteNodes.ts | 20 +-
.../routeTree.snapshot.ts | 175 +++++++++++++
.../routes/[_]root-index/index.tsx | 5 +
.../routes/[__root-index]/index.tsx | 5 +
.../routes/_layout/[_]nested-index/$id.tsx | 5 +
.../routes/_layout/[_]nested-index/index.tsx | 5 +
.../routes/_layout/[__double-index]/$id.tsx | 5 +
.../routes/_layout/[__double-index]/index.tsx | 5 +
.../_layout/_nested/[_]deep-index/index.tsx | 5 +
.../_layout/nested-trailing[_]/index.tsx | 5 +
.../routeTree.snapshot.ts | 236 ++++++++++++++++++
.../routes.ts | 19 +-
.../routes/deep-index.tsx | 5 +
.../routes/double-id.tsx | 5 +
.../routes/double-index.tsx | 5 +
.../routes/escaped-id.tsx | 5 +
.../routes/escaped-index.tsx | 5 +
.../routes/inner-layout.tsx | 5 +
.../routes/nested-id.tsx | 5 +
.../routes/nested-index.tsx | 5 +
.../routes/root-id.tsx | 5 +
.../routes/root-index.tsx | 5 +
.../routes/trail-index.tsx | 5 +
.../routeTree.snapshot.ts | 104 ++++++++
.../routes.ts | 5 +
.../routes/__root.tsx | 3 +
.../routes/layout.tsx | 5 +
.../routes/physical-routes/[_]nested/$id.tsx | 5 +
.../physical-routes/[_]nested/index.tsx | 5 +
.../tsr.config.json | 5 +
.../routeTree.snapshot.ts | 77 ++++++
.../routes.ts | 5 +
.../routes/__root.tsx | 3 +
.../routes/physical-routes/$id.tsx | 5 +
.../routes/physical-routes/index.tsx | 5 +
.../tsr.config.json | 5 +
.../routeTree.snapshot.ts | 77 ++++++
.../routes/[_]area/__virtual.ts | 10 +
.../routes/[_]area/child.tsx | 5 +
.../routes/[_]area/index.tsx | 5 +
.../routes/__root.tsx | 3 +
packages/router-generator/tests/utils.test.ts | 102 ++++++++
44 files changed, 988 insertions(+), 13 deletions(-)
create mode 100644 .changeset/bright-bats-fold.md
create mode 100644 packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/[_]root-index/index.tsx
create mode 100644 packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/[__root-index]/index.tsx
create mode 100644 packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[_]nested-index/$id.tsx
create mode 100644 packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[_]nested-index/index.tsx
create mode 100644 packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[__double-index]/$id.tsx
create mode 100644 packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[__double-index]/index.tsx
create mode 100644 packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/_nested/[_]deep-index/index.tsx
create mode 100644 packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/nested-trailing[_]/index.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/deep-index.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/double-id.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/double-index.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/escaped-id.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/escaped-index.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/inner-layout.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/nested-id.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/nested-index.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/root-id.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/root-index.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/trail-index.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routeTree.snapshot.ts
create mode 100644 packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes.ts
create mode 100644 packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/__root.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/layout.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/physical-routes/[_]nested/$id.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/physical-routes/[_]nested/index.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/tsr.config.json
create mode 100644 packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routeTree.snapshot.ts
create mode 100644 packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes.ts
create mode 100644 packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes/__root.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes/physical-routes/$id.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes/physical-routes/index.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/tsr.config.json
create mode 100644 packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routeTree.snapshot.ts
create mode 100644 packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/[_]area/__virtual.ts
create mode 100644 packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/[_]area/child.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/[_]area/index.tsx
create mode 100644 packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/__root.tsx
diff --git a/.changeset/bright-bats-fold.md b/.changeset/bright-bats-fold.md
new file mode 100644
index 0000000000..514947525c
--- /dev/null
+++ b/.changeset/bright-bats-fold.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/router-generator': patch
+---
+
+Preserve escaped underscore segments when generating index routes across physical and virtual route trees, including pathless layouts, `physical()` prefixes, and `__virtual.ts` subtrees.
diff --git a/packages/router-generator/src/filesystem/physical/getRouteNodes.ts b/packages/router-generator/src/filesystem/physical/getRouteNodes.ts
index a4f72a8df7..09e7fc6c25 100644
--- a/packages/router-generator/src/filesystem/physical/getRouteNodes.ts
+++ b/packages/router-generator/src/filesystem/physical/getRouteNodes.ts
@@ -128,23 +128,26 @@ export async function getRouteNodes(
const filePath = replaceBackslash(
path.join(normalizedDir, node.filePath),
)
- const prefixPath = cleanPath(`/${normalizedDir}`)
- const routePath = cleanPath(`/${normalizedDir}${node.routePath}`)
+ const { routePath: prefixPath, originalRoutePath: originalPrefixPath } =
+ normalizedDir
+ ? determineInitialRoutePath(normalizedDir)
+ : { routePath: '', originalRoutePath: '' }
+ const routePath = cleanPath(`${prefixPath}${node.routePath}`)
node.variableName = routePathToVariable(
- cleanPath(`/${normalizedDir}/${removeExt(node.filePath)}`),
+ cleanPath(`${prefixPath}/${removeExt(node.filePath)}`),
)
node._routePathSegmentMetadata = joinRoutePathSegmentMetadata(
routePath,
prefixPath,
- undefined,
+ createRoutePathSegmentMetadata(prefixPath, originalPrefixPath),
node._routePathSegmentMetadata,
)
node.routePath = routePath
// Keep originalRoutePath aligned with routePath for escape detection
if (node.originalRoutePath) {
node.originalRoutePath = cleanPath(
- `/${normalizedDir}${node.originalRoutePath}`,
+ `${originalPrefixPath}${node.originalRoutePath}`,
)
}
node.filePath = filePath
@@ -313,10 +316,6 @@ export async function getRouteNodes(
routePath = '/'
}
- if (lastOriginalSegment === updatedLastRouteSegment) {
- originalRoutePath = '/'
- }
-
// For layout routes, don't use '/' fallback - an empty path means
// "layout for the parent path" which is important for physical() mounts
// where route.tsx at root should have empty path, not '/'
diff --git a/packages/router-generator/src/filesystem/virtual/getRouteNodes.ts b/packages/router-generator/src/filesystem/virtual/getRouteNodes.ts
index be07a648d7..509b1be321 100644
--- a/packages/router-generator/src/filesystem/virtual/getRouteNodes.ts
+++ b/packages/router-generator/src/filesystem/virtual/getRouteNodes.ts
@@ -152,6 +152,12 @@ export async function getRouteNodesRecursive(
const children = await Promise.all(
nodes.map(async (node) => {
if (node.type === 'physical') {
+ const {
+ routePath: routePathPrefix,
+ originalRoutePath: originalRoutePathPrefix,
+ } = node.pathPrefix
+ ? determineInitialRoutePath(removeLeadingSlash(node.pathPrefix))
+ : { routePath: '', originalRoutePath: '' }
const { routeNodes, physicalDirectories } = await getRouteNodesPhysical(
{
...tsrConfig,
@@ -166,13 +172,16 @@ export async function getRouteNodesRecursive(
)
routeNodes.forEach((subtreeNode) => {
const pathPrefix = cleanPath(
- `${parent?.routePath ?? ''}${node.pathPrefix}`,
+ `${parent?.routePath ?? ''}${routePathPrefix}`,
+ )
+ const originalPathPrefix = cleanPath(
+ `${parent?.originalRoutePath ?? parent?.routePath ?? ''}${originalRoutePathPrefix}`,
)
const literalPathPrefixSegments =
createLiteralRoutePathSegmentMetadata(pathPrefix, parent, true)
const routePath = cleanPath(`${pathPrefix}${subtreeNode.routePath}`)
subtreeNode.variableName = routePathToVariable(
- `${node.pathPrefix}/${removeExt(subtreeNode.filePath)}`,
+ `${routePathPrefix}/${removeExt(subtreeNode.filePath)}`,
)
subtreeNode._routePathSegmentMetadata = joinRoutePathSegmentMetadata(
routePath,
@@ -184,7 +193,7 @@ export async function getRouteNodesRecursive(
// Keep originalRoutePath aligned with routePath for escape detection
if (subtreeNode.originalRoutePath) {
subtreeNode.originalRoutePath = cleanPath(
- `${parent?.originalRoutePath ?? parent?.routePath ?? ''}${node.pathPrefix}${subtreeNode.originalRoutePath}`,
+ `${originalPathPrefix}${subtreeNode.originalRoutePath}`,
)
}
subtreeNode.filePath = `${node.directory}/${subtreeNode.filePath}`
@@ -208,11 +217,16 @@ export async function getRouteNodesRecursive(
case 'index': {
const { filePath, variableName, fullPath } = getFile(node.file)
const routePath = `${parentRoutePath}/`
+ const originalRoutePath = `${parentOriginalRoutePath}/`
return {
filePath,
fullPath,
variableName,
routePath,
+ originalRoutePath,
+ _routePathSegmentMetadata: parent?._routePathSegmentMetadata
+ ? [...parent._routePathSegmentMetadata]
+ : undefined,
_fsRouteType: 'static',
_virtualParentRoutePath: virtualParentRoutePath,
} satisfies RouteNode
diff --git a/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routeTree.snapshot.ts b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routeTree.snapshot.ts
index 6877c1ac1d..53a35bf149 100644
--- a/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routeTree.snapshot.ts
+++ b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routeTree.snapshot.ts
@@ -9,18 +9,32 @@
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
import { Route as rootRouteImport } from './routes/__root'
+import { Route as Char91__rootIndexChar93IndexRouteImport } from './routes/[__root-index]/index'
import { Route as LayoutRouteImport } from './routes/_layout'
import { Route as FooRouteImport } from './routes/[_]foo'
import { Route as Char91__literalChar93RouteImport } from './routes/[__literal]'
import { Route as _layoutRouteImport } from './routes/__layout'
+import { Route as RootIndexIndexRouteImport } from './routes/[_]root-index/index'
import { Route as LayoutNestedRouteImport } from './routes/_layout/_nested'
import { Route as LayoutBarRouteImport } from './routes/_layout/[_]bar'
import { Route as Layout_nested2RouteImport } from './routes/_layout/__nested2'
import { Route as LayoutChar91__doubleChar93RouteImport } from './routes/_layout/[__double]'
import { Route as _layoutQuxRouteImport } from './routes/__layout/[_]qux'
+import { Route as LayoutNestedTrailingIndexRouteImport } from './routes/_layout/nested-trailing[_]/index'
+import { Route as LayoutNestedIndexIndexRouteImport } from './routes/_layout/[_]nested-index/index'
+import { Route as LayoutChar91__doubleIndexChar93IndexRouteImport } from './routes/_layout/[__double-index]/index'
import { Route as LayoutNestedBazRouteImport } from './routes/_layout/_nested/[_]baz'
+import { Route as LayoutNestedIndexIdRouteImport } from './routes/_layout/[_]nested-index/$id'
import { Route as Layout_nested2DeepRouteImport } from './routes/_layout/__nested2/[_]deep'
+import { Route as LayoutChar91__doubleIndexChar93IdRouteImport } from './routes/_layout/[__double-index]/$id'
+import { Route as LayoutNestedDeepIndexIndexRouteImport } from './routes/_layout/_nested/[_]deep-index/index'
+const Char91__rootIndexChar93IndexRoute =
+ Char91__rootIndexChar93IndexRouteImport.update({
+ id: '/__root-index/',
+ path: '/__root-index/',
+ getParentRoute: () => rootRouteImport,
+ } as any)
const LayoutRoute = LayoutRouteImport.update({
id: '/_layout',
getParentRoute: () => rootRouteImport,
@@ -39,6 +53,11 @@ const _layoutRoute = _layoutRouteImport.update({
id: '/__layout',
getParentRoute: () => rootRouteImport,
} as any)
+const RootIndexIndexRoute = RootIndexIndexRouteImport.update({
+ id: '/_root-index/',
+ path: '/_root-index/',
+ getParentRoute: () => rootRouteImport,
+} as any)
const LayoutNestedRoute = LayoutNestedRouteImport.update({
id: '/_nested',
getParentRoute: () => LayoutRoute,
@@ -63,16 +82,50 @@ const _layoutQuxRoute = _layoutQuxRouteImport.update({
path: '/_qux',
getParentRoute: () => _layoutRoute,
} as any)
+const LayoutNestedTrailingIndexRoute =
+ LayoutNestedTrailingIndexRouteImport.update({
+ id: '/nested-trailing_/',
+ path: '/nested-trailing_/',
+ getParentRoute: () => LayoutRoute,
+ } as any)
+const LayoutNestedIndexIndexRoute = LayoutNestedIndexIndexRouteImport.update({
+ id: '/_nested-index/',
+ path: '/_nested-index/',
+ getParentRoute: () => LayoutRoute,
+} as any)
+const LayoutChar91__doubleIndexChar93IndexRoute =
+ LayoutChar91__doubleIndexChar93IndexRouteImport.update({
+ id: '/__double-index/',
+ path: '/__double-index/',
+ getParentRoute: () => LayoutRoute,
+ } as any)
const LayoutNestedBazRoute = LayoutNestedBazRouteImport.update({
id: '/_baz',
path: '/_baz',
getParentRoute: () => LayoutNestedRoute,
} as any)
+const LayoutNestedIndexIdRoute = LayoutNestedIndexIdRouteImport.update({
+ id: '/_nested-index/$id',
+ path: '/_nested-index/$id',
+ getParentRoute: () => LayoutRoute,
+} as any)
const Layout_nested2DeepRoute = Layout_nested2DeepRouteImport.update({
id: '/_deep',
path: '/_deep',
getParentRoute: () => Layout_nested2Route,
} as any)
+const LayoutChar91__doubleIndexChar93IdRoute =
+ LayoutChar91__doubleIndexChar93IdRouteImport.update({
+ id: '/__double-index/$id',
+ path: '/__double-index/$id',
+ getParentRoute: () => LayoutRoute,
+ } as any)
+const LayoutNestedDeepIndexIndexRoute =
+ LayoutNestedDeepIndexIndexRouteImport.update({
+ id: '/_deep-index/',
+ path: '/_deep-index/',
+ getParentRoute: () => LayoutNestedRoute,
+ } as any)
export interface FileRoutesByFullPath {
'/': typeof LayoutNestedRouteWithChildren
@@ -81,8 +134,16 @@ export interface FileRoutesByFullPath {
'/_qux': typeof _layoutQuxRoute
'/__double': typeof LayoutChar91__doubleChar93Route
'/_bar': typeof LayoutBarRoute
+ '/__root-index/': typeof Char91__rootIndexChar93IndexRoute
+ '/_root-index/': typeof RootIndexIndexRoute
+ '/__double-index/$id': typeof LayoutChar91__doubleIndexChar93IdRoute
'/_deep': typeof Layout_nested2DeepRoute
+ '/_nested-index/$id': typeof LayoutNestedIndexIdRoute
'/_baz': typeof LayoutNestedBazRoute
+ '/__double-index/': typeof LayoutChar91__doubleIndexChar93IndexRoute
+ '/_nested-index/': typeof LayoutNestedIndexIndexRoute
+ '/nested-trailing_/': typeof LayoutNestedTrailingIndexRoute
+ '/_deep-index/': typeof LayoutNestedDeepIndexIndexRoute
}
export interface FileRoutesByTo {
'/': typeof LayoutNestedRouteWithChildren
@@ -91,8 +152,16 @@ export interface FileRoutesByTo {
'/_qux': typeof _layoutQuxRoute
'/__double': typeof LayoutChar91__doubleChar93Route
'/_bar': typeof LayoutBarRoute
+ '/__root-index': typeof Char91__rootIndexChar93IndexRoute
+ '/_root-index': typeof RootIndexIndexRoute
+ '/__double-index/$id': typeof LayoutChar91__doubleIndexChar93IdRoute
'/_deep': typeof Layout_nested2DeepRoute
+ '/_nested-index/$id': typeof LayoutNestedIndexIdRoute
'/_baz': typeof LayoutNestedBazRoute
+ '/__double-index': typeof LayoutChar91__doubleIndexChar93IndexRoute
+ '/_nested-index': typeof LayoutNestedIndexIndexRoute
+ '/nested-trailing_': typeof LayoutNestedTrailingIndexRoute
+ '/_deep-index': typeof LayoutNestedDeepIndexIndexRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
@@ -105,8 +174,16 @@ export interface FileRoutesById {
'/_layout/__nested2': typeof Layout_nested2RouteWithChildren
'/_layout/_bar': typeof LayoutBarRoute
'/_layout/_nested': typeof LayoutNestedRouteWithChildren
+ '/__root-index/': typeof Char91__rootIndexChar93IndexRoute
+ '/_root-index/': typeof RootIndexIndexRoute
+ '/_layout/__double-index/$id': typeof LayoutChar91__doubleIndexChar93IdRoute
'/_layout/__nested2/_deep': typeof Layout_nested2DeepRoute
+ '/_layout/_nested-index/$id': typeof LayoutNestedIndexIdRoute
'/_layout/_nested/_baz': typeof LayoutNestedBazRoute
+ '/_layout/__double-index/': typeof LayoutChar91__doubleIndexChar93IndexRoute
+ '/_layout/_nested-index/': typeof LayoutNestedIndexIndexRoute
+ '/_layout/nested-trailing_/': typeof LayoutNestedTrailingIndexRoute
+ '/_layout/_nested/_deep-index/': typeof LayoutNestedDeepIndexIndexRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
@@ -117,8 +194,16 @@ export interface FileRouteTypes {
| '/_qux'
| '/__double'
| '/_bar'
+ | '/__root-index/'
+ | '/_root-index/'
+ | '/__double-index/$id'
| '/_deep'
+ | '/_nested-index/$id'
| '/_baz'
+ | '/__double-index/'
+ | '/_nested-index/'
+ | '/nested-trailing_/'
+ | '/_deep-index/'
fileRoutesByTo: FileRoutesByTo
to:
| '/'
@@ -127,8 +212,16 @@ export interface FileRouteTypes {
| '/_qux'
| '/__double'
| '/_bar'
+ | '/__root-index'
+ | '/_root-index'
+ | '/__double-index/$id'
| '/_deep'
+ | '/_nested-index/$id'
| '/_baz'
+ | '/__double-index'
+ | '/_nested-index'
+ | '/nested-trailing_'
+ | '/_deep-index'
id:
| '__root__'
| '/__layout'
@@ -140,8 +233,16 @@ export interface FileRouteTypes {
| '/_layout/__nested2'
| '/_layout/_bar'
| '/_layout/_nested'
+ | '/__root-index/'
+ | '/_root-index/'
+ | '/_layout/__double-index/$id'
| '/_layout/__nested2/_deep'
+ | '/_layout/_nested-index/$id'
| '/_layout/_nested/_baz'
+ | '/_layout/__double-index/'
+ | '/_layout/_nested-index/'
+ | '/_layout/nested-trailing_/'
+ | '/_layout/_nested/_deep-index/'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
@@ -149,10 +250,19 @@ export interface RootRouteChildren {
Char91__literalChar93Route: typeof Char91__literalChar93Route
FooRoute: typeof FooRoute
LayoutRoute: typeof LayoutRouteWithChildren
+ Char91__rootIndexChar93IndexRoute: typeof Char91__rootIndexChar93IndexRoute
+ RootIndexIndexRoute: typeof RootIndexIndexRoute
}
declare module '@tanstack/react-router' {
interface FileRoutesByPath {
+ '/__root-index/': {
+ id: '/__root-index/'
+ path: '/__root-index'
+ fullPath: '/__root-index/'
+ preLoaderRoute: typeof Char91__rootIndexChar93IndexRouteImport
+ parentRoute: typeof rootRouteImport
+ }
'/_layout': {
id: '/_layout'
path: ''
@@ -181,6 +291,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof _layoutRouteImport
parentRoute: typeof rootRouteImport
}
+ '/_root-index/': {
+ id: '/_root-index/'
+ path: '/_root-index'
+ fullPath: '/_root-index/'
+ preLoaderRoute: typeof RootIndexIndexRouteImport
+ parentRoute: typeof rootRouteImport
+ }
'/_layout/_nested': {
id: '/_layout/_nested'
path: ''
@@ -216,6 +333,27 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof _layoutQuxRouteImport
parentRoute: typeof _layoutRoute
}
+ '/_layout/nested-trailing_/': {
+ id: '/_layout/nested-trailing_/'
+ path: '/nested-trailing_'
+ fullPath: '/nested-trailing_/'
+ preLoaderRoute: typeof LayoutNestedTrailingIndexRouteImport
+ parentRoute: typeof LayoutRoute
+ }
+ '/_layout/_nested-index/': {
+ id: '/_layout/_nested-index/'
+ path: '/_nested-index'
+ fullPath: '/_nested-index/'
+ preLoaderRoute: typeof LayoutNestedIndexIndexRouteImport
+ parentRoute: typeof LayoutRoute
+ }
+ '/_layout/__double-index/': {
+ id: '/_layout/__double-index/'
+ path: '/__double-index'
+ fullPath: '/__double-index/'
+ preLoaderRoute: typeof LayoutChar91__doubleIndexChar93IndexRouteImport
+ parentRoute: typeof LayoutRoute
+ }
'/_layout/_nested/_baz': {
id: '/_layout/_nested/_baz'
path: '/_baz'
@@ -223,6 +361,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof LayoutNestedBazRouteImport
parentRoute: typeof LayoutNestedRoute
}
+ '/_layout/_nested-index/$id': {
+ id: '/_layout/_nested-index/$id'
+ path: '/_nested-index/$id'
+ fullPath: '/_nested-index/$id'
+ preLoaderRoute: typeof LayoutNestedIndexIdRouteImport
+ parentRoute: typeof LayoutRoute
+ }
'/_layout/__nested2/_deep': {
id: '/_layout/__nested2/_deep'
path: '/_deep'
@@ -230,6 +375,20 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof Layout_nested2DeepRouteImport
parentRoute: typeof Layout_nested2Route
}
+ '/_layout/__double-index/$id': {
+ id: '/_layout/__double-index/$id'
+ path: '/__double-index/$id'
+ fullPath: '/__double-index/$id'
+ preLoaderRoute: typeof LayoutChar91__doubleIndexChar93IdRouteImport
+ parentRoute: typeof LayoutRoute
+ }
+ '/_layout/_nested/_deep-index/': {
+ id: '/_layout/_nested/_deep-index/'
+ path: '/_deep-index'
+ fullPath: '/_deep-index/'
+ preLoaderRoute: typeof LayoutNestedDeepIndexIndexRouteImport
+ parentRoute: typeof LayoutNestedRoute
+ }
}
}
@@ -258,10 +417,12 @@ const Layout_nested2RouteWithChildren = Layout_nested2Route._addFileChildren(
interface LayoutNestedRouteChildren {
LayoutNestedBazRoute: typeof LayoutNestedBazRoute
+ LayoutNestedDeepIndexIndexRoute: typeof LayoutNestedDeepIndexIndexRoute
}
const LayoutNestedRouteChildren: LayoutNestedRouteChildren = {
LayoutNestedBazRoute: LayoutNestedBazRoute,
+ LayoutNestedDeepIndexIndexRoute: LayoutNestedDeepIndexIndexRoute,
}
const LayoutNestedRouteWithChildren = LayoutNestedRoute._addFileChildren(
@@ -273,6 +434,11 @@ interface LayoutRouteChildren {
Layout_nested2Route: typeof Layout_nested2RouteWithChildren
LayoutBarRoute: typeof LayoutBarRoute
LayoutNestedRoute: typeof LayoutNestedRouteWithChildren
+ LayoutChar91__doubleIndexChar93IdRoute: typeof LayoutChar91__doubleIndexChar93IdRoute
+ LayoutNestedIndexIdRoute: typeof LayoutNestedIndexIdRoute
+ LayoutChar91__doubleIndexChar93IndexRoute: typeof LayoutChar91__doubleIndexChar93IndexRoute
+ LayoutNestedIndexIndexRoute: typeof LayoutNestedIndexIndexRoute
+ LayoutNestedTrailingIndexRoute: typeof LayoutNestedTrailingIndexRoute
}
const LayoutRouteChildren: LayoutRouteChildren = {
@@ -280,6 +446,13 @@ const LayoutRouteChildren: LayoutRouteChildren = {
Layout_nested2Route: Layout_nested2RouteWithChildren,
LayoutBarRoute: LayoutBarRoute,
LayoutNestedRoute: LayoutNestedRouteWithChildren,
+ LayoutChar91__doubleIndexChar93IdRoute:
+ LayoutChar91__doubleIndexChar93IdRoute,
+ LayoutNestedIndexIdRoute: LayoutNestedIndexIdRoute,
+ LayoutChar91__doubleIndexChar93IndexRoute:
+ LayoutChar91__doubleIndexChar93IndexRoute,
+ LayoutNestedIndexIndexRoute: LayoutNestedIndexIndexRoute,
+ LayoutNestedTrailingIndexRoute: LayoutNestedTrailingIndexRoute,
}
const LayoutRouteWithChildren =
@@ -290,6 +463,8 @@ const rootRouteChildren: RootRouteChildren = {
Char91__literalChar93Route: Char91__literalChar93Route,
FooRoute: FooRoute,
LayoutRoute: LayoutRouteWithChildren,
+ Char91__rootIndexChar93IndexRoute: Char91__rootIndexChar93IndexRoute,
+ RootIndexIndexRoute: RootIndexIndexRoute,
}
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)
diff --git a/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/[_]root-index/index.tsx b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/[_]root-index/index.tsx
new file mode 100644
index 0000000000..39387c7250
--- /dev/null
+++ b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/[_]root-index/index.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_root-index/')({
+ component: () => 'Root Index',
+})
diff --git a/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/[__root-index]/index.tsx b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/[__root-index]/index.tsx
new file mode 100644
index 0000000000..9945c7d300
--- /dev/null
+++ b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/[__root-index]/index.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/__root-index/')({
+ component: () => 'Double Root Index',
+})
diff --git a/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[_]nested-index/$id.tsx b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[_]nested-index/$id.tsx
new file mode 100644
index 0000000000..e09396020b
--- /dev/null
+++ b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[_]nested-index/$id.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/_nested-index/$id')({
+ component: () => 'Nested Id',
+})
diff --git a/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[_]nested-index/index.tsx b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[_]nested-index/index.tsx
new file mode 100644
index 0000000000..a5f8f95497
--- /dev/null
+++ b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[_]nested-index/index.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/_nested-index/')({
+ component: () => 'Nested Index',
+})
diff --git a/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[__double-index]/$id.tsx b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[__double-index]/$id.tsx
new file mode 100644
index 0000000000..2a31adf60c
--- /dev/null
+++ b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[__double-index]/$id.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/__double-index/$id')({
+ component: () => 'Double Id',
+})
diff --git a/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[__double-index]/index.tsx b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[__double-index]/index.tsx
new file mode 100644
index 0000000000..231e787df0
--- /dev/null
+++ b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/[__double-index]/index.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/__double-index/')({
+ component: () => 'Double Index',
+})
diff --git a/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/_nested/[_]deep-index/index.tsx b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/_nested/[_]deep-index/index.tsx
new file mode 100644
index 0000000000..4113450ea1
--- /dev/null
+++ b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/_nested/[_]deep-index/index.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/_nested/_deep-index/')({
+ component: () => 'Deep Index',
+})
diff --git a/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/nested-trailing[_]/index.tsx b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/nested-trailing[_]/index.tsx
new file mode 100644
index 0000000000..786604a503
--- /dev/null
+++ b/packages/router-generator/tests/generator/physical-pathless-layout-escaped-underscore/routes/_layout/nested-trailing[_]/index.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/nested-trailing_/')({
+ component: () => 'Nested Trailing Index',
+})
diff --git a/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routeTree.snapshot.ts b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routeTree.snapshot.ts
index c708ac47c0..70d06b2004 100644
--- a/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routeTree.snapshot.ts
+++ b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routeTree.snapshot.ts
@@ -13,11 +13,22 @@ import { Route as layoutRouteImport } from './routes/layout'
import { Route as fooRouteImport } from './routes/foo'
import { Route as escapedRouteImport } from './routes/escaped'
import { Route as doubleRouteImport } from './routes/double'
+import { Route as rootIdRouteImport } from './routes/root-id'
import { Route as nestedLayoutRouteImport } from './routes/nested-layout'
+import { Route as innerLayoutRouteImport } from './routes/inner-layout'
import { Route as escapedBarRouteImport } from './routes/escaped-bar'
import { Route as barRouteImport } from './routes/bar'
import { Route as doubleBarRouteImport } from './routes/double-bar'
+import { Route as rootIndexRouteImport } from './routes/root-index'
import { Route as bazRouteImport } from './routes/baz'
+import { Route as nestedIdRouteImport } from './routes/nested-id'
+import { Route as escapedIdRouteImport } from './routes/escaped-id'
+import { Route as doubleIdRouteImport } from './routes/double-id'
+import { Route as trailIndexRouteImport } from './routes/trail-index'
+import { Route as nestedIndexRouteImport } from './routes/nested-index'
+import { Route as escapedIndexRouteImport } from './routes/escaped-index'
+import { Route as doubleIndexRouteImport } from './routes/double-index'
+import { Route as deepIndexRouteImport } from './routes/deep-index'
const layoutRoute = layoutRouteImport.update({
id: '/_layout',
@@ -38,10 +49,19 @@ const doubleRoute = doubleRouteImport.update({
path: '/__double',
getParentRoute: () => rootRouteImport,
} as any)
+const rootIdRoute = rootIdRouteImport.update({
+ id: '/_root-index/$id',
+ path: '/_root-index/$id',
+ getParentRoute: () => rootRouteImport,
+} as any)
const nestedLayoutRoute = nestedLayoutRouteImport.update({
id: '/_nested',
getParentRoute: () => layoutRoute,
} as any)
+const innerLayoutRoute = innerLayoutRouteImport.update({
+ id: '/_inner',
+ getParentRoute: () => layoutRoute,
+} as any)
const escapedBarRoute = escapedBarRouteImport.update({
id: '/_escaped-bar',
path: '/_escaped-bar',
@@ -57,31 +77,96 @@ const doubleBarRoute = doubleBarRouteImport.update({
path: '/__double-bar',
getParentRoute: () => layoutRoute,
} as any)
+const rootIndexRoute = rootIndexRouteImport.update({
+ id: '/_root-index/',
+ path: '/_root-index/',
+ getParentRoute: () => rootRouteImport,
+} as any)
const bazRoute = bazRouteImport.update({
id: '/_baz',
path: '/_baz',
getParentRoute: () => nestedLayoutRoute,
} as any)
+const nestedIdRoute = nestedIdRouteImport.update({
+ id: '/_nested-index/$id',
+ path: '/_nested-index/$id',
+ getParentRoute: () => layoutRoute,
+} as any)
+const escapedIdRoute = escapedIdRouteImport.update({
+ id: '/_escaped-index/$id',
+ path: '/_escaped-index/$id',
+ getParentRoute: () => layoutRoute,
+} as any)
+const doubleIdRoute = doubleIdRouteImport.update({
+ id: '/__double-index/$id',
+ path: '/__double-index/$id',
+ getParentRoute: () => layoutRoute,
+} as any)
+const trailIndexRoute = trailIndexRouteImport.update({
+ id: '/trail_/',
+ path: '/trail_/',
+ getParentRoute: () => layoutRoute,
+} as any)
+const nestedIndexRoute = nestedIndexRouteImport.update({
+ id: '/_nested-index/',
+ path: '/_nested-index/',
+ getParentRoute: () => layoutRoute,
+} as any)
+const escapedIndexRoute = escapedIndexRouteImport.update({
+ id: '/_escaped-index/',
+ path: '/_escaped-index/',
+ getParentRoute: () => layoutRoute,
+} as any)
+const doubleIndexRoute = doubleIndexRouteImport.update({
+ id: '/__double-index/',
+ path: '/__double-index/',
+ getParentRoute: () => layoutRoute,
+} as any)
+const deepIndexRoute = deepIndexRouteImport.update({
+ id: '/_deep-index/',
+ path: '/_deep-index/',
+ getParentRoute: () => innerLayoutRoute,
+} as any)
export interface FileRoutesByFullPath {
'/__double': typeof doubleRoute
'/_escaped': typeof escapedRoute
'/_foo': typeof fooRoute
'/': typeof nestedLayoutRouteWithChildren
+ '/_root-index/': typeof rootIndexRoute
'/__double-bar': typeof doubleBarRoute
'/_bar': typeof barRoute
'/_escaped-bar': typeof escapedBarRoute
+ '/_root-index/$id': typeof rootIdRoute
+ '/__double-index/': typeof doubleIndexRoute
+ '/_escaped-index/': typeof escapedIndexRoute
+ '/_nested-index/': typeof nestedIndexRoute
+ '/trail_/': typeof trailIndexRoute
+ '/__double-index/$id': typeof doubleIdRoute
+ '/_escaped-index/$id': typeof escapedIdRoute
+ '/_nested-index/$id': typeof nestedIdRoute
'/_baz': typeof bazRoute
+ '/_deep-index/': typeof deepIndexRoute
}
export interface FileRoutesByTo {
'/__double': typeof doubleRoute
'/_escaped': typeof escapedRoute
'/_foo': typeof fooRoute
'/': typeof nestedLayoutRouteWithChildren
+ '/_root-index': typeof rootIndexRoute
'/__double-bar': typeof doubleBarRoute
'/_bar': typeof barRoute
'/_escaped-bar': typeof escapedBarRoute
+ '/_root-index/$id': typeof rootIdRoute
+ '/__double-index': typeof doubleIndexRoute
+ '/_escaped-index': typeof escapedIndexRoute
+ '/_nested-index': typeof nestedIndexRoute
+ '/trail_': typeof trailIndexRoute
+ '/__double-index/$id': typeof doubleIdRoute
+ '/_escaped-index/$id': typeof escapedIdRoute
+ '/_nested-index/$id': typeof nestedIdRoute
'/_baz': typeof bazRoute
+ '/_deep-index': typeof deepIndexRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
@@ -89,11 +174,22 @@ export interface FileRoutesById {
'/_escaped': typeof escapedRoute
'/_foo': typeof fooRoute
'/_layout': typeof layoutRouteWithChildren
+ '/_root-index/': typeof rootIndexRoute
'/_layout/__double-bar': typeof doubleBarRoute
'/_layout/_bar': typeof barRoute
'/_layout/_escaped-bar': typeof escapedBarRoute
+ '/_layout/_inner': typeof innerLayoutRouteWithChildren
'/_layout/_nested': typeof nestedLayoutRouteWithChildren
+ '/_root-index/$id': typeof rootIdRoute
+ '/_layout/__double-index/': typeof doubleIndexRoute
+ '/_layout/_escaped-index/': typeof escapedIndexRoute
+ '/_layout/_nested-index/': typeof nestedIndexRoute
+ '/_layout/trail_/': typeof trailIndexRoute
+ '/_layout/__double-index/$id': typeof doubleIdRoute
+ '/_layout/_escaped-index/$id': typeof escapedIdRoute
+ '/_layout/_nested-index/$id': typeof nestedIdRoute
'/_layout/_nested/_baz': typeof bazRoute
+ '/_layout/_inner/_deep-index/': typeof deepIndexRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
@@ -102,31 +198,62 @@ export interface FileRouteTypes {
| '/_escaped'
| '/_foo'
| '/'
+ | '/_root-index/'
| '/__double-bar'
| '/_bar'
| '/_escaped-bar'
+ | '/_root-index/$id'
+ | '/__double-index/'
+ | '/_escaped-index/'
+ | '/_nested-index/'
+ | '/trail_/'
+ | '/__double-index/$id'
+ | '/_escaped-index/$id'
+ | '/_nested-index/$id'
| '/_baz'
+ | '/_deep-index/'
fileRoutesByTo: FileRoutesByTo
to:
| '/__double'
| '/_escaped'
| '/_foo'
| '/'
+ | '/_root-index'
| '/__double-bar'
| '/_bar'
| '/_escaped-bar'
+ | '/_root-index/$id'
+ | '/__double-index'
+ | '/_escaped-index'
+ | '/_nested-index'
+ | '/trail_'
+ | '/__double-index/$id'
+ | '/_escaped-index/$id'
+ | '/_nested-index/$id'
| '/_baz'
+ | '/_deep-index'
id:
| '__root__'
| '/__double'
| '/_escaped'
| '/_foo'
| '/_layout'
+ | '/_root-index/'
| '/_layout/__double-bar'
| '/_layout/_bar'
| '/_layout/_escaped-bar'
+ | '/_layout/_inner'
| '/_layout/_nested'
+ | '/_root-index/$id'
+ | '/_layout/__double-index/'
+ | '/_layout/_escaped-index/'
+ | '/_layout/_nested-index/'
+ | '/_layout/trail_/'
+ | '/_layout/__double-index/$id'
+ | '/_layout/_escaped-index/$id'
+ | '/_layout/_nested-index/$id'
| '/_layout/_nested/_baz'
+ | '/_layout/_inner/_deep-index/'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
@@ -134,6 +261,8 @@ export interface RootRouteChildren {
escapedRoute: typeof escapedRoute
fooRoute: typeof fooRoute
layoutRoute: typeof layoutRouteWithChildren
+ rootIndexRoute: typeof rootIndexRoute
+ rootIdRoute: typeof rootIdRoute
}
declare module '@tanstack/react-router' {
@@ -166,6 +295,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof doubleRouteImport
parentRoute: typeof rootRouteImport
}
+ '/_root-index/$id': {
+ id: '/_root-index/$id'
+ path: '/_root-index/$id'
+ fullPath: '/_root-index/$id'
+ preLoaderRoute: typeof rootIdRouteImport
+ parentRoute: typeof rootRouteImport
+ }
'/_layout/_nested': {
id: '/_layout/_nested'
path: ''
@@ -173,6 +309,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof nestedLayoutRouteImport
parentRoute: typeof layoutRoute
}
+ '/_layout/_inner': {
+ id: '/_layout/_inner'
+ path: ''
+ fullPath: '/'
+ preLoaderRoute: typeof innerLayoutRouteImport
+ parentRoute: typeof layoutRoute
+ }
'/_layout/_escaped-bar': {
id: '/_layout/_escaped-bar'
path: '/_escaped-bar'
@@ -194,6 +337,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof doubleBarRouteImport
parentRoute: typeof layoutRoute
}
+ '/_root-index/': {
+ id: '/_root-index/'
+ path: '/_root-index'
+ fullPath: '/_root-index/'
+ preLoaderRoute: typeof rootIndexRouteImport
+ parentRoute: typeof rootRouteImport
+ }
'/_layout/_nested/_baz': {
id: '/_layout/_nested/_baz'
path: '/_baz'
@@ -201,9 +351,77 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof bazRouteImport
parentRoute: typeof nestedLayoutRoute
}
+ '/_layout/_nested-index/$id': {
+ id: '/_layout/_nested-index/$id'
+ path: '/_nested-index/$id'
+ fullPath: '/_nested-index/$id'
+ preLoaderRoute: typeof nestedIdRouteImport
+ parentRoute: typeof layoutRoute
+ }
+ '/_layout/_escaped-index/$id': {
+ id: '/_layout/_escaped-index/$id'
+ path: '/_escaped-index/$id'
+ fullPath: '/_escaped-index/$id'
+ preLoaderRoute: typeof escapedIdRouteImport
+ parentRoute: typeof layoutRoute
+ }
+ '/_layout/__double-index/$id': {
+ id: '/_layout/__double-index/$id'
+ path: '/__double-index/$id'
+ fullPath: '/__double-index/$id'
+ preLoaderRoute: typeof doubleIdRouteImport
+ parentRoute: typeof layoutRoute
+ }
+ '/_layout/trail_/': {
+ id: '/_layout/trail_/'
+ path: '/trail_'
+ fullPath: '/trail_/'
+ preLoaderRoute: typeof trailIndexRouteImport
+ parentRoute: typeof layoutRoute
+ }
+ '/_layout/_nested-index/': {
+ id: '/_layout/_nested-index/'
+ path: '/_nested-index'
+ fullPath: '/_nested-index/'
+ preLoaderRoute: typeof nestedIndexRouteImport
+ parentRoute: typeof layoutRoute
+ }
+ '/_layout/_escaped-index/': {
+ id: '/_layout/_escaped-index/'
+ path: '/_escaped-index'
+ fullPath: '/_escaped-index/'
+ preLoaderRoute: typeof escapedIndexRouteImport
+ parentRoute: typeof layoutRoute
+ }
+ '/_layout/__double-index/': {
+ id: '/_layout/__double-index/'
+ path: '/__double-index'
+ fullPath: '/__double-index/'
+ preLoaderRoute: typeof doubleIndexRouteImport
+ parentRoute: typeof layoutRoute
+ }
+ '/_layout/_inner/_deep-index/': {
+ id: '/_layout/_inner/_deep-index/'
+ path: '/_deep-index'
+ fullPath: '/_deep-index/'
+ preLoaderRoute: typeof deepIndexRouteImport
+ parentRoute: typeof innerLayoutRoute
+ }
}
}
+interface innerLayoutRouteChildren {
+ deepIndexRoute: typeof deepIndexRoute
+}
+
+const innerLayoutRouteChildren: innerLayoutRouteChildren = {
+ deepIndexRoute: deepIndexRoute,
+}
+
+const innerLayoutRouteWithChildren = innerLayoutRoute._addFileChildren(
+ innerLayoutRouteChildren,
+)
+
interface nestedLayoutRouteChildren {
bazRoute: typeof bazRoute
}
@@ -220,14 +438,30 @@ interface layoutRouteChildren {
doubleBarRoute: typeof doubleBarRoute
barRoute: typeof barRoute
escapedBarRoute: typeof escapedBarRoute
+ innerLayoutRoute: typeof innerLayoutRouteWithChildren
nestedLayoutRoute: typeof nestedLayoutRouteWithChildren
+ doubleIndexRoute: typeof doubleIndexRoute
+ escapedIndexRoute: typeof escapedIndexRoute
+ nestedIndexRoute: typeof nestedIndexRoute
+ trailIndexRoute: typeof trailIndexRoute
+ doubleIdRoute: typeof doubleIdRoute
+ escapedIdRoute: typeof escapedIdRoute
+ nestedIdRoute: typeof nestedIdRoute
}
const layoutRouteChildren: layoutRouteChildren = {
doubleBarRoute: doubleBarRoute,
barRoute: barRoute,
escapedBarRoute: escapedBarRoute,
+ innerLayoutRoute: innerLayoutRouteWithChildren,
nestedLayoutRoute: nestedLayoutRouteWithChildren,
+ doubleIndexRoute: doubleIndexRoute,
+ escapedIndexRoute: escapedIndexRoute,
+ nestedIndexRoute: nestedIndexRoute,
+ trailIndexRoute: trailIndexRoute,
+ doubleIdRoute: doubleIdRoute,
+ escapedIdRoute: escapedIdRoute,
+ nestedIdRoute: nestedIdRoute,
}
const layoutRouteWithChildren =
@@ -238,6 +472,8 @@ const rootRouteChildren: RootRouteChildren = {
escapedRoute: escapedRoute,
fooRoute: fooRoute,
layoutRoute: layoutRouteWithChildren,
+ rootIndexRoute: rootIndexRoute,
+ rootIdRoute: rootIdRoute,
}
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)
diff --git a/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes.ts b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes.ts
index 27aac72e77..34ebbc111e 100644
--- a/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes.ts
+++ b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes.ts
@@ -1,13 +1,30 @@
-import { layout, rootRoute, route } from '@tanstack/virtual-file-routes'
+import { index, layout, rootRoute, route } from '@tanstack/virtual-file-routes'
export const routes = rootRoute('__root.tsx', [
route('/_foo', 'foo.tsx'),
route('/[_]escaped', 'escaped.tsx'),
route('/__double', 'double.tsx'),
+ route('/_root-index', [index('root-index.tsx'), route('$id', 'root-id.tsx')]),
layout('_layout', 'layout.tsx', [
route('/_bar', 'bar.tsx'),
route('/[_]escaped-bar', 'escaped-bar.tsx'),
route('/__double-bar', 'double-bar.tsx'),
+ route('/_nested-index', [
+ index('nested-index.tsx'),
+ route('$id', 'nested-id.tsx'),
+ ]),
+ route('/[_]escaped-index', [
+ index('escaped-index.tsx'),
+ route('$id', 'escaped-id.tsx'),
+ ]),
+ route('/__double-index', [
+ index('double-index.tsx'),
+ route('$id', 'double-id.tsx'),
+ ]),
+ route('/trail_', [index('trail-index.tsx')]),
layout('_nested', 'nested-layout.tsx', [route('/_baz', 'baz.tsx')]),
+ layout('_inner', 'inner-layout.tsx', [
+ route('/_deep-index', [index('deep-index.tsx')]),
+ ]),
]),
])
diff --git a/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/deep-index.tsx b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/deep-index.tsx
new file mode 100644
index 0000000000..1952b00184
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/deep-index.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/_inner/_deep-index/')({
+ component: () => 'Deep Index',
+})
diff --git a/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/double-id.tsx b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/double-id.tsx
new file mode 100644
index 0000000000..2a31adf60c
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/double-id.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/__double-index/$id')({
+ component: () => 'Double Id',
+})
diff --git a/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/double-index.tsx b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/double-index.tsx
new file mode 100644
index 0000000000..231e787df0
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/double-index.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/__double-index/')({
+ component: () => 'Double Index',
+})
diff --git a/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/escaped-id.tsx b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/escaped-id.tsx
new file mode 100644
index 0000000000..a9fad62448
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/escaped-id.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/_escaped-index/$id')({
+ component: () => 'Escaped Id',
+})
diff --git a/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/escaped-index.tsx b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/escaped-index.tsx
new file mode 100644
index 0000000000..9b81fcbadd
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/escaped-index.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/_escaped-index/')({
+ component: () => 'Escaped Index',
+})
diff --git a/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/inner-layout.tsx b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/inner-layout.tsx
new file mode 100644
index 0000000000..5266c32a7c
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/inner-layout.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/_inner')({
+ component: () => 'Inner Layout',
+})
diff --git a/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/nested-id.tsx b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/nested-id.tsx
new file mode 100644
index 0000000000..e09396020b
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/nested-id.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/_nested-index/$id')({
+ component: () => 'Nested Id',
+})
diff --git a/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/nested-index.tsx b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/nested-index.tsx
new file mode 100644
index 0000000000..a5f8f95497
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/nested-index.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/_nested-index/')({
+ component: () => 'Nested Index',
+})
diff --git a/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/root-id.tsx b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/root-id.tsx
new file mode 100644
index 0000000000..ec329adfd3
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/root-id.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_root-index/$id')({
+ component: () => 'Root Id',
+})
diff --git a/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/root-index.tsx b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/root-index.tsx
new file mode 100644
index 0000000000..39387c7250
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/root-index.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_root-index/')({
+ component: () => 'Root Index',
+})
diff --git a/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/trail-index.tsx b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/trail-index.tsx
new file mode 100644
index 0000000000..7794e8f0b3
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-pathless-layout-escaped-underscore/routes/trail-index.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/trail_/')({
+ component: () => 'Trail Index',
+})
diff --git a/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routeTree.snapshot.ts b/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routeTree.snapshot.ts
new file mode 100644
index 0000000000..b0fd76d1ef
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routeTree.snapshot.ts
@@ -0,0 +1,104 @@
+/* eslint-disable */
+
+// @ts-nocheck
+
+// noinspection JSUnusedGlobalSymbols
+
+// This file was automatically generated by TanStack Router.
+// You should NOT make any changes in this file as it will be overwritten.
+// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
+
+import { Route as rootRouteImport } from './routes/__root'
+import { Route as layoutRouteImport } from './routes/layout'
+import { Route as Char91_Char93nestedIndexRouteImport } from './routes/physical-routes/[_]nested/index'
+import { Route as Char91_Char93nestedIdRouteImport } from './routes/physical-routes/[_]nested/$id'
+
+const layoutRoute = layoutRouteImport.update({
+ id: '/_layout',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const Char91_Char93nestedIndexRoute =
+ Char91_Char93nestedIndexRouteImport.update({
+ id: '/_nested/',
+ path: '/_nested/',
+ getParentRoute: () => layoutRoute,
+ } as any)
+const Char91_Char93nestedIdRoute = Char91_Char93nestedIdRouteImport.update({
+ id: '/_nested/$id',
+ path: '/_nested/$id',
+ getParentRoute: () => layoutRoute,
+} as any)
+
+export interface FileRoutesByFullPath {
+ '/': typeof layoutRouteWithChildren
+ '/_nested/$id': typeof Char91_Char93nestedIdRoute
+ '/_nested/': typeof Char91_Char93nestedIndexRoute
+}
+export interface FileRoutesByTo {
+ '/': typeof layoutRouteWithChildren
+ '/_nested/$id': typeof Char91_Char93nestedIdRoute
+ '/_nested': typeof Char91_Char93nestedIndexRoute
+}
+export interface FileRoutesById {
+ __root__: typeof rootRouteImport
+ '/_layout': typeof layoutRouteWithChildren
+ '/_layout/_nested/$id': typeof Char91_Char93nestedIdRoute
+ '/_layout/_nested/': typeof Char91_Char93nestedIndexRoute
+}
+export interface FileRouteTypes {
+ fileRoutesByFullPath: FileRoutesByFullPath
+ fullPaths: '/' | '/_nested/$id' | '/_nested/'
+ fileRoutesByTo: FileRoutesByTo
+ to: '/' | '/_nested/$id' | '/_nested'
+ id: '__root__' | '/_layout' | '/_layout/_nested/$id' | '/_layout/_nested/'
+ fileRoutesById: FileRoutesById
+}
+export interface RootRouteChildren {
+ layoutRoute: typeof layoutRouteWithChildren
+}
+
+declare module '@tanstack/react-router' {
+ interface FileRoutesByPath {
+ '/_layout': {
+ id: '/_layout'
+ path: ''
+ fullPath: '/'
+ preLoaderRoute: typeof layoutRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/_layout/_nested/': {
+ id: '/_layout/_nested/'
+ path: '/_nested'
+ fullPath: '/_nested/'
+ preLoaderRoute: typeof Char91_Char93nestedIndexRouteImport
+ parentRoute: typeof layoutRoute
+ }
+ '/_layout/_nested/$id': {
+ id: '/_layout/_nested/$id'
+ path: '/_nested/$id'
+ fullPath: '/_nested/$id'
+ preLoaderRoute: typeof Char91_Char93nestedIdRouteImport
+ parentRoute: typeof layoutRoute
+ }
+ }
+}
+
+interface layoutRouteChildren {
+ Char91_Char93nestedIdRoute: typeof Char91_Char93nestedIdRoute
+ Char91_Char93nestedIndexRoute: typeof Char91_Char93nestedIndexRoute
+}
+
+const layoutRouteChildren: layoutRouteChildren = {
+ Char91_Char93nestedIdRoute: Char91_Char93nestedIdRoute,
+ Char91_Char93nestedIndexRoute: Char91_Char93nestedIndexRoute,
+}
+
+const layoutRouteWithChildren =
+ layoutRoute._addFileChildren(layoutRouteChildren)
+
+const rootRouteChildren: RootRouteChildren = {
+ layoutRoute: layoutRouteWithChildren,
+}
+export const routeTree = rootRouteImport
+ ._addFileChildren(rootRouteChildren)
+ ._addFileTypes()
diff --git a/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes.ts b/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes.ts
new file mode 100644
index 0000000000..8cd9a3a353
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes.ts
@@ -0,0 +1,5 @@
+import { layout, physical, rootRoute } from '@tanstack/virtual-file-routes'
+
+export const routes = rootRoute('__root.tsx', [
+ layout('_layout', 'layout.tsx', [physical('', 'physical-routes')]),
+])
diff --git a/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/__root.tsx b/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/__root.tsx
new file mode 100644
index 0000000000..9c657c7d5b
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/__root.tsx
@@ -0,0 +1,3 @@
+import { createRootRoute } from '@tanstack/react-router'
+
+export const Route = createRootRoute()
diff --git a/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/layout.tsx b/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/layout.tsx
new file mode 100644
index 0000000000..9c1673dafd
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/layout.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout')({
+ component: () => 'Layout',
+})
diff --git a/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/physical-routes/[_]nested/$id.tsx b/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/physical-routes/[_]nested/$id.tsx
new file mode 100644
index 0000000000..4b06b8799e
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/physical-routes/[_]nested/$id.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/_nested/$id')({
+ component: () => 'Nested Id',
+})
diff --git a/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/physical-routes/[_]nested/index.tsx b/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/physical-routes/[_]nested/index.tsx
new file mode 100644
index 0000000000..b8eca0e427
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/routes/physical-routes/[_]nested/index.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_layout/_nested/')({
+ component: () => 'Nested Index',
+})
diff --git a/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/tsr.config.json b/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/tsr.config.json
new file mode 100644
index 0000000000..4d587108e3
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-physical-pathless-layout-literal-index/tsr.config.json
@@ -0,0 +1,5 @@
+{
+ "routesDirectory": "./routes",
+ "generatedRouteTree": "./routeTree.gen.ts",
+ "virtualRouteConfig": "./routes.ts"
+}
diff --git a/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routeTree.snapshot.ts b/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routeTree.snapshot.ts
new file mode 100644
index 0000000000..63b1df0f40
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routeTree.snapshot.ts
@@ -0,0 +1,77 @@
+/* eslint-disable */
+
+// @ts-nocheck
+
+// noinspection JSUnusedGlobalSymbols
+
+// This file was automatically generated by TanStack Router.
+// You should NOT make any changes in this file as it will be overwritten.
+// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
+
+import { Route as rootRouteImport } from './routes/__root'
+import { Route as ApiIndexRouteImport } from './routes/physical-routes/index'
+import { Route as ApiIdRouteImport } from './routes/physical-routes/$id'
+
+const ApiIndexRoute = ApiIndexRouteImport.update({
+ id: '/_api/',
+ path: '/_api/',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const ApiIdRoute = ApiIdRouteImport.update({
+ id: '/_api/$id',
+ path: '/_api/$id',
+ getParentRoute: () => rootRouteImport,
+} as any)
+
+export interface FileRoutesByFullPath {
+ '/_api/$id': typeof ApiIdRoute
+ '/_api/': typeof ApiIndexRoute
+}
+export interface FileRoutesByTo {
+ '/_api/$id': typeof ApiIdRoute
+ '/_api': typeof ApiIndexRoute
+}
+export interface FileRoutesById {
+ __root__: typeof rootRouteImport
+ '/_api/$id': typeof ApiIdRoute
+ '/_api/': typeof ApiIndexRoute
+}
+export interface FileRouteTypes {
+ fileRoutesByFullPath: FileRoutesByFullPath
+ fullPaths: '/_api/$id' | '/_api/'
+ fileRoutesByTo: FileRoutesByTo
+ to: '/_api/$id' | '/_api'
+ id: '__root__' | '/_api/$id' | '/_api/'
+ fileRoutesById: FileRoutesById
+}
+export interface RootRouteChildren {
+ ApiIdRoute: typeof ApiIdRoute
+ ApiIndexRoute: typeof ApiIndexRoute
+}
+
+declare module '@tanstack/react-router' {
+ interface FileRoutesByPath {
+ '/_api/': {
+ id: '/_api/'
+ path: '/_api'
+ fullPath: '/_api/'
+ preLoaderRoute: typeof ApiIndexRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/_api/$id': {
+ id: '/_api/$id'
+ path: '/_api/$id'
+ fullPath: '/_api/$id'
+ preLoaderRoute: typeof ApiIdRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ }
+}
+
+const rootRouteChildren: RootRouteChildren = {
+ ApiIdRoute: ApiIdRoute,
+ ApiIndexRoute: ApiIndexRoute,
+}
+export const routeTree = rootRouteImport
+ ._addFileChildren(rootRouteChildren)
+ ._addFileTypes()
diff --git a/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes.ts b/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes.ts
new file mode 100644
index 0000000000..8e3883cec6
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes.ts
@@ -0,0 +1,5 @@
+import { physical, rootRoute } from '@tanstack/virtual-file-routes'
+
+export const routes = rootRoute('__root.tsx', [
+ physical('/[_]api', 'physical-routes'),
+])
diff --git a/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes/__root.tsx b/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes/__root.tsx
new file mode 100644
index 0000000000..9c657c7d5b
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes/__root.tsx
@@ -0,0 +1,3 @@
+import { createRootRoute } from '@tanstack/react-router'
+
+export const Route = createRootRoute()
diff --git a/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes/physical-routes/$id.tsx b/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes/physical-routes/$id.tsx
new file mode 100644
index 0000000000..e45ad32d5d
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes/physical-routes/$id.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_api/$id')({
+ component: () => 'API Id',
+})
diff --git a/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes/physical-routes/index.tsx b/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes/physical-routes/index.tsx
new file mode 100644
index 0000000000..ac44aee10d
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/routes/physical-routes/index.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_api/')({
+ component: () => 'API Index',
+})
diff --git a/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/tsr.config.json b/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/tsr.config.json
new file mode 100644
index 0000000000..4d587108e3
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-physical-prefix-escaped-underscore/tsr.config.json
@@ -0,0 +1,5 @@
+{
+ "routesDirectory": "./routes",
+ "generatedRouteTree": "./routeTree.gen.ts",
+ "virtualRouteConfig": "./routes.ts"
+}
diff --git a/packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routeTree.snapshot.ts b/packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routeTree.snapshot.ts
new file mode 100644
index 0000000000..bb8b39ad4a
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routeTree.snapshot.ts
@@ -0,0 +1,77 @@
+/* eslint-disable */
+
+// @ts-nocheck
+
+// noinspection JSUnusedGlobalSymbols
+
+// This file was automatically generated by TanStack Router.
+// You should NOT make any changes in this file as it will be overwritten.
+// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
+
+import { Route as rootRouteImport } from './routes/__root'
+import { Route as AreaIndexRouteImport } from './routes/[_]area/index'
+import { Route as AreaChildRouteImport } from './routes/[_]area/child'
+
+const AreaIndexRoute = AreaIndexRouteImport.update({
+ id: '/_area/',
+ path: '/_area/',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const AreaChildRoute = AreaChildRouteImport.update({
+ id: '/_area/child',
+ path: '/_area/child',
+ getParentRoute: () => rootRouteImport,
+} as any)
+
+export interface FileRoutesByFullPath {
+ '/_area/child': typeof AreaChildRoute
+ '/_area/': typeof AreaIndexRoute
+}
+export interface FileRoutesByTo {
+ '/_area/child': typeof AreaChildRoute
+ '/_area': typeof AreaIndexRoute
+}
+export interface FileRoutesById {
+ __root__: typeof rootRouteImport
+ '/_area/child': typeof AreaChildRoute
+ '/_area/': typeof AreaIndexRoute
+}
+export interface FileRouteTypes {
+ fileRoutesByFullPath: FileRoutesByFullPath
+ fullPaths: '/_area/child' | '/_area/'
+ fileRoutesByTo: FileRoutesByTo
+ to: '/_area/child' | '/_area'
+ id: '__root__' | '/_area/child' | '/_area/'
+ fileRoutesById: FileRoutesById
+}
+export interface RootRouteChildren {
+ AreaChildRoute: typeof AreaChildRoute
+ AreaIndexRoute: typeof AreaIndexRoute
+}
+
+declare module '@tanstack/react-router' {
+ interface FileRoutesByPath {
+ '/_area/': {
+ id: '/_area/'
+ path: '/_area'
+ fullPath: '/_area/'
+ preLoaderRoute: typeof AreaIndexRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/_area/child': {
+ id: '/_area/child'
+ path: '/_area/child'
+ fullPath: '/_area/child'
+ preLoaderRoute: typeof AreaChildRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ }
+}
+
+const rootRouteChildren: RootRouteChildren = {
+ AreaChildRoute: AreaChildRoute,
+ AreaIndexRoute: AreaIndexRoute,
+}
+export const routeTree = rootRouteImport
+ ._addFileChildren(rootRouteChildren)
+ ._addFileTypes()
diff --git a/packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/[_]area/__virtual.ts b/packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/[_]area/__virtual.ts
new file mode 100644
index 0000000000..fd1baf16be
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/[_]area/__virtual.ts
@@ -0,0 +1,10 @@
+import {
+ defineVirtualSubtreeConfig,
+ index,
+ route,
+} from '@tanstack/virtual-file-routes'
+
+export default defineVirtualSubtreeConfig([
+ index('index.tsx'),
+ route('/child', 'child.tsx'),
+])
diff --git a/packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/[_]area/child.tsx b/packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/[_]area/child.tsx
new file mode 100644
index 0000000000..f3af7057cb
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/[_]area/child.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_area/child')({
+ component: () => 'Area Child',
+})
diff --git a/packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/[_]area/index.tsx b/packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/[_]area/index.tsx
new file mode 100644
index 0000000000..90b81675e6
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/[_]area/index.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/_area/')({
+ component: () => 'Area Index',
+})
diff --git a/packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/__root.tsx b/packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/__root.tsx
new file mode 100644
index 0000000000..9c657c7d5b
--- /dev/null
+++ b/packages/router-generator/tests/generator/virtual-subtree-in-escaped-physical-directory/routes/__root.tsx
@@ -0,0 +1,3 @@
+import { createRootRoute } from '@tanstack/react-router'
+
+export const Route = createRootRoute()
diff --git a/packages/router-generator/tests/utils.test.ts b/packages/router-generator/tests/utils.test.ts
index 6e1a58a204..0cdce3cfae 100644
--- a/packages/router-generator/tests/utils.test.ts
+++ b/packages/router-generator/tests/utils.test.ts
@@ -2,6 +2,8 @@ import { describe, expect, it, vi } from 'vitest'
import {
RoutePrefixMap,
cleanPath,
+ createLiteralRoutePathSegmentMetadata,
+ createRoutePathSegmentMetadata,
createRouteNodesByFullPath,
createRouteNodesByTo,
determineInitialRoutePath,
@@ -58,6 +60,88 @@ describe('inferFullPath', () => {
expect(inferFullPath(node)).toBe('/__foo')
})
+
+ it('preserves explicit literal leading underscores on index routes after removing pathless ancestors', () => {
+ const parent = {
+ routePath: '/_layout',
+ } as unknown as RouteNode
+ const node = {
+ routePath: '/_layout/_nested/',
+ originalRoutePath: '/_layout/_nested/',
+ _routePathSegmentMetadata: createLiteralRoutePathSegmentMetadata(
+ '/_layout/_nested',
+ parent,
+ true,
+ ),
+ } as unknown as RouteNode
+
+ expect(inferFullPath(node)).toBe('/_nested/')
+ })
+
+ it('removes pathless index route segments when they are not marked literal', () => {
+ const node = {
+ routePath: '/_layout/_nested/',
+ originalRoutePath: '/_layout/_nested/',
+ } as unknown as RouteNode
+
+ expect(inferFullPath(node)).toBe('/')
+ })
+
+ it('preserves escaped trailing underscores on index routes', () => {
+ const node = {
+ routePath: '/_layout/foo_/',
+ originalRoutePath: '/_layout/foo[_]/',
+ _routePathSegmentMetadata: createRoutePathSegmentMetadata(
+ '/_layout/foo_/',
+ '/_layout/foo[_]/',
+ ),
+ } as unknown as RouteNode
+
+ expect(inferFullPath(node)).toBe('/foo_/')
+ })
+
+ it('removes unescaped trailing underscores on index routes', () => {
+ const node = {
+ routePath: '/_layout/foo_/',
+ originalRoutePath: '/_layout/foo_/',
+ } as unknown as RouteNode
+
+ expect(inferFullPath(node)).toBe('/foo/')
+ })
+})
+
+describe('createRoutePathSegmentMetadata', () => {
+ it('preserves escaped trailing underscores on index routes', () => {
+ const metadata = createRoutePathSegmentMetadata('/foo_/', '/foo[_]/')
+
+ expect(metadata).toHaveLength(3)
+ expect(metadata?.[1]).toEqual({ literalTrailingUnderscore: true })
+ })
+
+ it('preserves mixed escaped leading and trailing underscores', () => {
+ const metadata = createRoutePathSegmentMetadata('/_foo_/', '/[_]foo[_]/')
+
+ expect(metadata).toHaveLength(3)
+ expect(metadata?.[1]).toEqual({
+ literalLeadingUnderscore: true,
+ literalTrailingUnderscore: true,
+ })
+ })
+
+ it('tracks multiple literal underscore segments independently', () => {
+ const metadata = createRoutePathSegmentMetadata(
+ '/_foo/bar_/_baz_/',
+ '/[_]foo/bar[_]/[_baz_]/',
+ )
+
+ expect(metadata).toHaveLength(5)
+ expect(metadata?.[1]).toEqual({ literalLeadingUnderscore: true })
+ expect(metadata?.[2]).toEqual({ literalTrailingUnderscore: true })
+ expect(metadata?.[3]).toEqual({
+ literalLeadingUnderscore: true,
+ literalTrailingUnderscore: true,
+ })
+ })
})
describe('createRouteNodesByTo', () => {
@@ -663,6 +747,24 @@ describe('removeLayoutSegmentsAndUnderscoresWithEscape', () => {
),
).toBe('/foo/bar')
})
+
+ it('preserves escaped trailing underscores after removing pathless ancestors', () => {
+ expect(
+ removeLayoutSegmentsAndUnderscoresWithEscape(
+ '/_layout/foo_/',
+ '/_layout/foo[_]/',
+ ),
+ ).toBe('/foo_/')
+ })
+
+ it('preserves mixed escaped leading and trailing underscores after removing pathless ancestors', () => {
+ expect(
+ removeLayoutSegmentsAndUnderscoresWithEscape(
+ '/_layout/_foo_/',
+ '/_layout/[_]foo[_]/',
+ ),
+ ).toBe('/_foo_/')
+ })
})
describe('routePathToVariable', () => {
From 65b4abe65bc222e4244585fa8d85a6144448e99a Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Thu, 21 May 2026 00:28:19 +0200
Subject: [PATCH 006/454] ci: Version Packages (#7454)
---
.changeset/bright-bats-fold.md | 5 -----
examples/react/authenticated-routes-firebase/package.json | 2 +-
examples/react/authenticated-routes/package.json | 2 +-
examples/react/basic-file-based/package.json | 2 +-
examples/react/basic-react-query-file-based/package.json | 2 +-
examples/react/basic-ssr-file-based/package.json | 2 +-
.../react/basic-ssr-streaming-file-based/package.json | 2 +-
examples/react/basic-virtual-file-based/package.json | 2 +-
.../react/basic-virtual-inside-file-based/package.json | 2 +-
examples/react/i18n-paraglide/package.json | 2 +-
examples/react/kitchen-sink-file-based/package.json | 2 +-
.../kitchen-sink-react-query-file-based/package.json | 2 +-
examples/react/large-file-based/package.json | 2 +-
examples/react/quickstart-esbuild-file-based/package.json | 2 +-
examples/react/quickstart-file-based/package.json | 2 +-
examples/react/quickstart-rspack-file-based/package.json | 2 +-
examples/react/quickstart-webpack-file-based/package.json | 2 +-
examples/react/router-monorepo-react-query/package.json | 2 +-
.../packages/router/package.json | 2 +-
examples/react/router-monorepo-simple-lazy/package.json | 2 +-
.../packages/router/package.json | 2 +-
examples/react/router-monorepo-simple/package.json | 2 +-
.../router-monorepo-simple/packages/router/package.json | 2 +-
examples/react/search-validator-adapters/package.json | 2 +-
examples/react/start-bare/package.json | 2 +-
examples/react/start-basic-auth/package.json | 2 +-
examples/react/start-basic-authjs/package.json | 2 +-
examples/react/start-basic-cloudflare/package.json | 2 +-
examples/react/start-basic-react-query/package.json | 2 +-
examples/react/start-basic-static/package.json | 2 +-
examples/react/start-basic/package.json | 2 +-
examples/react/start-bun/package.json | 4 ++--
examples/react/start-clerk-basic/package.json | 2 +-
examples/react/start-convex-trellaux/package.json | 2 +-
examples/react/start-counter/package.json | 2 +-
examples/react/start-i18n-paraglide/package.json | 2 +-
examples/react/start-large/package.json | 2 +-
examples/react/start-material-ui/package.json | 2 +-
examples/react/start-rscs/package.json | 2 +-
.../package.json | 2 +-
examples/react/start-supabase-basic/package.json | 2 +-
examples/react/start-tailwind-v4/package.json | 2 +-
examples/react/start-trellaux/package.json | 2 +-
examples/react/start-workos/package.json | 2 +-
examples/react/view-transitions/package.json | 2 +-
examples/react/with-trpc-react-query/package.json | 2 +-
examples/react/with-trpc/package.json | 2 +-
examples/solid/authenticated-routes-firebase/package.json | 2 +-
examples/solid/authenticated-routes/package.json | 2 +-
examples/solid/basic-file-based/package.json | 2 +-
examples/solid/basic-solid-query-file-based/package.json | 2 +-
examples/solid/basic-solid-query/package.json | 2 +-
examples/solid/basic-ssr-file-based/package.json | 2 +-
.../solid/basic-ssr-streaming-file-based/package.json | 2 +-
examples/solid/basic-virtual-file-based/package.json | 2 +-
.../solid/basic-virtual-inside-file-based/package.json | 2 +-
examples/solid/i18n-paraglide/package.json | 2 +-
examples/solid/kitchen-sink-file-based/package.json | 2 +-
.../kitchen-sink-solid-query-file-based/package.json | 2 +-
examples/solid/large-file-based/package.json | 2 +-
examples/solid/quickstart-esbuild-file-based/package.json | 2 +-
examples/solid/quickstart-file-based/package.json | 2 +-
examples/solid/quickstart-rspack-file-based/package.json | 2 +-
examples/solid/quickstart-webpack-file-based/package.json | 2 +-
examples/solid/router-monorepo-simple-lazy/package.json | 2 +-
.../packages/router/package.json | 2 +-
examples/solid/router-monorepo-simple/package.json | 2 +-
.../router-monorepo-simple/packages/router/package.json | 2 +-
examples/solid/router-monorepo-solid-query/package.json | 2 +-
.../packages/router/package.json | 2 +-
examples/solid/search-validator-adapters/package.json | 2 +-
examples/solid/start-basic-auth/package.json | 2 +-
examples/solid/start-basic-authjs/package.json | 2 +-
examples/solid/start-basic-cloudflare/package.json | 2 +-
examples/solid/start-basic-netlify/package.json | 2 +-
examples/solid/start-basic-nitro/package.json | 2 +-
examples/solid/start-basic-solid-query/package.json | 2 +-
examples/solid/start-basic-static/package.json | 2 +-
examples/solid/start-basic/package.json | 2 +-
examples/solid/start-bun/package.json | 4 ++--
examples/solid/start-convex-better-auth/package.json | 2 +-
examples/solid/start-counter/package.json | 2 +-
examples/solid/start-i18n-paraglide/package.json | 2 +-
examples/solid/start-large/package.json | 2 +-
.../package.json | 2 +-
examples/solid/start-supabase-basic/package.json | 2 +-
examples/solid/start-tailwind-v4/package.json | 2 +-
examples/solid/view-transitions/package.json | 2 +-
examples/solid/with-trpc/package.json | 2 +-
examples/vue/basic-file-based-jsx/package.json | 2 +-
examples/vue/basic-file-based-sfc/package.json | 2 +-
packages/react-start-rsc/CHANGELOG.md | 7 +++++++
packages/react-start-rsc/package.json | 2 +-
packages/react-start/CHANGELOG.md | 8 ++++++++
packages/react-start/package.json | 2 +-
packages/router-cli/CHANGELOG.md | 7 +++++++
packages/router-cli/package.json | 2 +-
packages/router-generator/CHANGELOG.md | 6 ++++++
packages/router-generator/package.json | 2 +-
packages/router-plugin/CHANGELOG.md | 7 +++++++
packages/router-plugin/package.json | 2 +-
packages/router-vite-plugin/CHANGELOG.md | 7 +++++++
packages/router-vite-plugin/package.json | 2 +-
packages/solid-start/CHANGELOG.md | 7 +++++++
packages/solid-start/package.json | 2 +-
packages/start-plugin-core/CHANGELOG.md | 8 ++++++++
packages/start-plugin-core/package.json | 2 +-
packages/vue-start/CHANGELOG.md | 7 +++++++
packages/vue-start/package.json | 2 +-
109 files changed, 165 insertions(+), 106 deletions(-)
delete mode 100644 .changeset/bright-bats-fold.md
diff --git a/.changeset/bright-bats-fold.md b/.changeset/bright-bats-fold.md
deleted file mode 100644
index 514947525c..0000000000
--- a/.changeset/bright-bats-fold.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@tanstack/router-generator': patch
----
-
-Preserve escaped underscore segments when generating index routes across physical and virtual route trees, including pathless layouts, `physical()` prefixes, and `__virtual.ts` subtrees.
diff --git a/examples/react/authenticated-routes-firebase/package.json b/examples/react/authenticated-routes-firebase/package.json
index ec812cb3a7..21a9c8815b 100644
--- a/examples/react/authenticated-routes-firebase/package.json
+++ b/examples/react/authenticated-routes-firebase/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"firebase": "^11.4.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/authenticated-routes/package.json b/examples/react/authenticated-routes/package.json
index 5caad3a32f..7a62511164 100644
--- a/examples/react/authenticated-routes/package.json
+++ b/examples/react/authenticated-routes/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-file-based/package.json b/examples/react/basic-file-based/package.json
index b48534f3c5..e9724481fc 100644
--- a/examples/react/basic-file-based/package.json
+++ b/examples/react/basic-file-based/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-react-query-file-based/package.json b/examples/react/basic-react-query-file-based/package.json
index ed6a5b2960..93876afaeb 100644
--- a/examples/react/basic-react-query-file-based/package.json
+++ b/examples/react/basic-react-query-file-based/package.json
@@ -14,7 +14,7 @@
"@tanstack/react-query-devtools": "^5.90.0",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-ssr-file-based/package.json b/examples/react/basic-ssr-file-based/package.json
index 2b18261cb9..9e623fc7cf 100644
--- a/examples/react/basic-ssr-file-based/package.json
+++ b/examples/react/basic-ssr-file-based/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@tanstack/react-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/react/basic-ssr-streaming-file-based/package.json b/examples/react/basic-ssr-streaming-file-based/package.json
index 315d95c289..5cb95470c7 100644
--- a/examples/react/basic-ssr-streaming-file-based/package.json
+++ b/examples/react/basic-ssr-streaming-file-based/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@tanstack/react-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/react/basic-virtual-file-based/package.json b/examples/react/basic-virtual-file-based/package.json
index 5bbc9ebfbe..622e65315f 100644
--- a/examples/react/basic-virtual-file-based/package.json
+++ b/examples/react/basic-virtual-file-based/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@tanstack/virtual-file-routes": "^1.162.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-virtual-inside-file-based/package.json b/examples/react/basic-virtual-inside-file-based/package.json
index 8043a7b54a..6d4894bce5 100644
--- a/examples/react/basic-virtual-inside-file-based/package.json
+++ b/examples/react/basic-virtual-inside-file-based/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@tanstack/virtual-file-routes": "^1.162.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/i18n-paraglide/package.json b/examples/react/i18n-paraglide/package.json
index 9f973371ea..1f4b2e2af9 100644
--- a/examples/react/i18n-paraglide/package.json
+++ b/examples/react/i18n-paraglide/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"tailwindcss": "^4.2.2"
diff --git a/examples/react/kitchen-sink-file-based/package.json b/examples/react/kitchen-sink-file-based/package.json
index 90577d0d6c..8b275f41e9 100644
--- a/examples/react/kitchen-sink-file-based/package.json
+++ b/examples/react/kitchen-sink-file-based/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"immer": "^10.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/kitchen-sink-react-query-file-based/package.json b/examples/react/kitchen-sink-react-query-file-based/package.json
index 76fa5a4327..e342a74e57 100644
--- a/examples/react/kitchen-sink-react-query-file-based/package.json
+++ b/examples/react/kitchen-sink-react-query-file-based/package.json
@@ -14,7 +14,7 @@
"@tanstack/react-query-devtools": "^5.90.0",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"immer": "^10.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/large-file-based/package.json b/examples/react/large-file-based/package.json
index ab59b7373c..11dce4e36a 100644
--- a/examples/react/large-file-based/package.json
+++ b/examples/react/large-file-based/package.json
@@ -15,7 +15,7 @@
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/quickstart-esbuild-file-based/package.json b/examples/react/quickstart-esbuild-file-based/package.json
index 6df08ad3da..68ed792010 100644
--- a/examples/react/quickstart-esbuild-file-based/package.json
+++ b/examples/react/quickstart-esbuild-file-based/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/quickstart-file-based/package.json b/examples/react/quickstart-file-based/package.json
index 27dc70de3c..90e716792f 100644
--- a/examples/react/quickstart-file-based/package.json
+++ b/examples/react/quickstart-file-based/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/quickstart-rspack-file-based/package.json b/examples/react/quickstart-rspack-file-based/package.json
index ac7d0cfe2e..0438ca911e 100644
--- a/examples/react/quickstart-rspack-file-based/package.json
+++ b/examples/react/quickstart-rspack-file-based/package.json
@@ -19,7 +19,7 @@
"devDependencies": {
"@rsbuild/core": "^2.0.1",
"@rsbuild/plugin-react": "^2.0.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"typescript": "^6.0.2"
diff --git a/examples/react/quickstart-webpack-file-based/package.json b/examples/react/quickstart-webpack-file-based/package.json
index 5c85cb0bd2..5781a412c2 100644
--- a/examples/react/quickstart-webpack-file-based/package.json
+++ b/examples/react/quickstart-webpack-file-based/package.json
@@ -14,7 +14,7 @@
},
"devDependencies": {
"@swc/core": "^1.15.33",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"html-webpack-plugin": "^5.6.3",
diff --git a/examples/react/router-monorepo-react-query/package.json b/examples/react/router-monorepo-react-query/package.json
index c61b4f668f..b58241b232 100644
--- a/examples/react/router-monorepo-react-query/package.json
+++ b/examples/react/router-monorepo-react-query/package.json
@@ -14,7 +14,7 @@
"@tanstack/react-query-devtools": "^5.90.0",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-react-query/packages/router/package.json b/examples/react/router-monorepo-react-query/packages/router/package.json
index 072106367c..cc86a9309f 100644
--- a/examples/react/router-monorepo-react-query/packages/router/package.json
+++ b/examples/react/router-monorepo-react-query/packages/router/package.json
@@ -12,7 +12,7 @@
"@tanstack/history": "^1.162.0",
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/router-monorepo-simple-lazy/package.json b/examples/react/router-monorepo-simple-lazy/package.json
index d67ab256a4..af667c40e9 100644
--- a/examples/react/router-monorepo-simple-lazy/package.json
+++ b/examples/react/router-monorepo-simple-lazy/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-simple-lazy/packages/router/package.json b/examples/react/router-monorepo-simple-lazy/packages/router/package.json
index 3d2dacc294..0dfa971f2f 100644
--- a/examples/react/router-monorepo-simple-lazy/packages/router/package.json
+++ b/examples/react/router-monorepo-simple-lazy/packages/router/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/history": "^1.162.0",
"@tanstack/react-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/router-monorepo-simple/package.json b/examples/react/router-monorepo-simple/package.json
index 15113c22f6..9cfcf358dd 100644
--- a/examples/react/router-monorepo-simple/package.json
+++ b/examples/react/router-monorepo-simple/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-simple/packages/router/package.json b/examples/react/router-monorepo-simple/packages/router/package.json
index 2f97fce3a9..b4d409d39e 100644
--- a/examples/react/router-monorepo-simple/packages/router/package.json
+++ b/examples/react/router-monorepo-simple/packages/router/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/history": "^1.162.0",
"@tanstack/react-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/search-validator-adapters/package.json b/examples/react/search-validator-adapters/package.json
index 8e405a203e..58e79f3adf 100644
--- a/examples/react/search-validator-adapters/package.json
+++ b/examples/react/search-validator-adapters/package.json
@@ -15,7 +15,7 @@
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@tanstack/valibot-adapter": "^1.167.0",
"@tanstack/zod-adapter": "^1.167.0",
"arktype": "^2.1.7",
diff --git a/examples/react/start-bare/package.json b/examples/react/start-bare/package.json
index 3d45684c04..bacc981df1 100644
--- a/examples/react/start-bare/package.json
+++ b/examples/react/start-bare/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-basic-auth/package.json b/examples/react/start-basic-auth/package.json
index c239064f4b..6d15a71181 100644
--- a/examples/react/start-basic-auth/package.json
+++ b/examples/react/start-basic-auth/package.json
@@ -16,7 +16,7 @@
"@prisma/client": "^7.0.0",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-authjs/package.json b/examples/react/start-basic-authjs/package.json
index 3ca99feb82..00b337dd94 100644
--- a/examples/react/start-basic-authjs/package.json
+++ b/examples/react/start-basic-authjs/package.json
@@ -13,7 +13,7 @@
"@auth/core": "^0.41.1",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"start-authjs": "^1.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/start-basic-cloudflare/package.json b/examples/react/start-basic-cloudflare/package.json
index 896f0c01cc..a615953ed9 100644
--- a/examples/react/start-basic-cloudflare/package.json
+++ b/examples/react/start-basic-cloudflare/package.json
@@ -14,7 +14,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-basic-react-query/package.json b/examples/react/start-basic-react-query/package.json
index 904bdaeb62..f072370532 100644
--- a/examples/react/start-basic-react-query/package.json
+++ b/examples/react/start-basic-react-query/package.json
@@ -15,7 +15,7 @@
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-static/package.json b/examples/react/start-basic-static/package.json
index d5c0ea3fce..7147a5d22e 100644
--- a/examples/react/start-basic-static/package.json
+++ b/examples/react/start-basic-static/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"@tanstack/start-static-server-functions": "^1.167.6",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
diff --git a/examples/react/start-basic/package.json b/examples/react/start-basic/package.json
index 88335c1a66..83edf4dad6 100644
--- a/examples/react/start-basic/package.json
+++ b/examples/react/start-basic/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^2.6.0",
diff --git a/examples/react/start-bun/package.json b/examples/react/start-bun/package.json
index cebc6bbfcd..4a2bbe87ae 100644
--- a/examples/react/start-bun/package.json
+++ b/examples/react/start-bun/package.json
@@ -18,8 +18,8 @@
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.9",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"tailwindcss": "^4.2.2"
diff --git a/examples/react/start-clerk-basic/package.json b/examples/react/start-clerk-basic/package.json
index ee326da237..f597c066c9 100644
--- a/examples/react/start-clerk-basic/package.json
+++ b/examples/react/start-clerk-basic/package.json
@@ -13,7 +13,7 @@
"@clerk/tanstack-react-start": "^0.27.14",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/start-convex-trellaux/package.json b/examples/react/start-convex-trellaux/package.json
index 4161a8b2b5..976172e41c 100644
--- a/examples/react/start-convex-trellaux/package.json
+++ b/examples/react/start-convex-trellaux/package.json
@@ -18,7 +18,7 @@
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"concurrently": "^8.2.2",
"convex": "^1.19.0",
"ky": "^1.7.4",
diff --git a/examples/react/start-counter/package.json b/examples/react/start-counter/package.json
index 330dabc992..3590f6a2c1 100644
--- a/examples/react/start-counter/package.json
+++ b/examples/react/start-counter/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-i18n-paraglide/package.json b/examples/react/start-i18n-paraglide/package.json
index 54f998696c..9a5c30e834 100644
--- a/examples/react/start-i18n-paraglide/package.json
+++ b/examples/react/start-i18n-paraglide/package.json
@@ -12,7 +12,7 @@
"@tanstack/react-devtools": "^0.7.0",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"react": "^19.1.1",
"react-dom": "^19.1.1"
},
diff --git a/examples/react/start-large/package.json b/examples/react/start-large/package.json
index b096ad6b7d..f7aad15ad0 100644
--- a/examples/react/start-large/package.json
+++ b/examples/react/start-large/package.json
@@ -15,7 +15,7 @@
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-material-ui/package.json b/examples/react/start-material-ui/package.json
index 2b73b1ef73..ce8ae7f009 100644
--- a/examples/react/start-material-ui/package.json
+++ b/examples/react/start-material-ui/package.json
@@ -17,7 +17,7 @@
"@mui/material": "6.4.7",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-rscs/package.json b/examples/react/start-rscs/package.json
index a282784965..eed30ffe37 100644
--- a/examples/react/start-rscs/package.json
+++ b/examples/react/start-rscs/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"dexie": "^4.0.10",
"react": "^19.2.0",
"react-dom": "^19.2.0",
diff --git a/examples/react/start-streaming-data-from-server-functions/package.json b/examples/react/start-streaming-data-from-server-functions/package.json
index efbb20f5c9..5f4aff48a8 100644
--- a/examples/react/start-streaming-data-from-server-functions/package.json
+++ b/examples/react/start-streaming-data-from-server-functions/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-supabase-basic/package.json b/examples/react/start-supabase-basic/package.json
index 65ba228d03..a58ff5770f 100644
--- a/examples/react/start-supabase-basic/package.json
+++ b/examples/react/start-supabase-basic/package.json
@@ -17,7 +17,7 @@
"@supabase/supabase-js": "^2.48.1",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/start-tailwind-v4/package.json b/examples/react/start-tailwind-v4/package.json
index afeaf66e5d..38e7ea8b29 100644
--- a/examples/react/start-tailwind-v4/package.json
+++ b/examples/react/start-tailwind-v4/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^2.6.0",
diff --git a/examples/react/start-trellaux/package.json b/examples/react/start-trellaux/package.json
index 2dd0562a07..8801848bf5 100644
--- a/examples/react/start-trellaux/package.json
+++ b/examples/react/start-trellaux/package.json
@@ -15,7 +15,7 @@
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"ky": "^1.7.4",
"msw": "^2.7.0",
"react": "^19.0.0",
diff --git a/examples/react/start-workos/package.json b/examples/react/start-workos/package.json
index aaa45ff72e..d4e47c1dc4 100644
--- a/examples/react/start-workos/package.json
+++ b/examples/react/start-workos/package.json
@@ -16,7 +16,7 @@
"@radix-ui/themes": "^3.3.0",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.8",
+ "@tanstack/react-start": "^1.168.9",
"@workos/authkit-tanstack-react-start": "^0.5.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
diff --git a/examples/react/view-transitions/package.json b/examples/react/view-transitions/package.json
index 3c1f548b67..0e92117f97 100644
--- a/examples/react/view-transitions/package.json
+++ b/examples/react/view-transitions/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/with-trpc-react-query/package.json b/examples/react/with-trpc-react-query/package.json
index 311873e55b..cb1608d697 100644
--- a/examples/react/with-trpc-react-query/package.json
+++ b/examples/react/with-trpc-react-query/package.json
@@ -15,7 +15,7 @@
"@tanstack/react-query-devtools": "^5.90.0",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
"@trpc/tanstack-react-query": "^11.4.3",
diff --git a/examples/react/with-trpc/package.json b/examples/react/with-trpc/package.json
index 3915700d6f..12117ba578 100644
--- a/examples/react/with-trpc/package.json
+++ b/examples/react/with-trpc/package.json
@@ -13,7 +13,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.6",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
"express": "^5.2.1",
diff --git a/examples/solid/authenticated-routes-firebase/package.json b/examples/solid/authenticated-routes-firebase/package.json
index 9a21f1b2b1..e18731f7d1 100644
--- a/examples/solid/authenticated-routes-firebase/package.json
+++ b/examples/solid/authenticated-routes-firebase/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"firebase": "^11.4.0",
diff --git a/examples/solid/authenticated-routes/package.json b/examples/solid/authenticated-routes/package.json
index c87e1513fc..c1448d950c 100644
--- a/examples/solid/authenticated-routes/package.json
+++ b/examples/solid/authenticated-routes/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/basic-file-based/package.json b/examples/solid/basic-file-based/package.json
index ae65586112..d1a0ddd8e9 100644
--- a/examples/solid/basic-file-based/package.json
+++ b/examples/solid/basic-file-based/package.json
@@ -18,7 +18,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/basic-solid-query-file-based/package.json b/examples/solid/basic-solid-query-file-based/package.json
index 6a7ffe1823..11279fc796 100644
--- a/examples/solid/basic-solid-query-file-based/package.json
+++ b/examples/solid/basic-solid-query-file-based/package.json
@@ -21,7 +21,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/basic-solid-query/package.json b/examples/solid/basic-solid-query/package.json
index 3aff51b9f0..48e9a7aa83 100644
--- a/examples/solid/basic-solid-query/package.json
+++ b/examples/solid/basic-solid-query/package.json
@@ -19,7 +19,7 @@
"tailwindcss": "^4.2.2"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/basic-ssr-file-based/package.json b/examples/solid/basic-ssr-file-based/package.json
index 972032b048..ef4c3ea7fb 100644
--- a/examples/solid/basic-ssr-file-based/package.json
+++ b/examples/solid/basic-ssr-file-based/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@tanstack/solid-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/solid/basic-ssr-streaming-file-based/package.json b/examples/solid/basic-ssr-streaming-file-based/package.json
index c34f57d3e4..6b86e37fdb 100644
--- a/examples/solid/basic-ssr-streaming-file-based/package.json
+++ b/examples/solid/basic-ssr-streaming-file-based/package.json
@@ -24,7 +24,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@types/express": "^5.0.6",
"typescript": "^6.0.2",
"vite": "^8.0.0",
diff --git a/examples/solid/basic-virtual-file-based/package.json b/examples/solid/basic-virtual-file-based/package.json
index f4446c6c99..cd68f1277d 100644
--- a/examples/solid/basic-virtual-file-based/package.json
+++ b/examples/solid/basic-virtual-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/virtual-file-routes": "^1.162.0",
diff --git a/examples/solid/basic-virtual-inside-file-based/package.json b/examples/solid/basic-virtual-inside-file-based/package.json
index 58f31e59d2..4f5cdc709e 100644
--- a/examples/solid/basic-virtual-inside-file-based/package.json
+++ b/examples/solid/basic-virtual-inside-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/virtual-file-routes": "^1.162.0",
diff --git a/examples/solid/i18n-paraglide/package.json b/examples/solid/i18n-paraglide/package.json
index 17030b2ab7..652fc39124 100644
--- a/examples/solid/i18n-paraglide/package.json
+++ b/examples/solid/i18n-paraglide/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
diff --git a/examples/solid/kitchen-sink-file-based/package.json b/examples/solid/kitchen-sink-file-based/package.json
index 2dcfc6befe..657f835b63 100644
--- a/examples/solid/kitchen-sink-file-based/package.json
+++ b/examples/solid/kitchen-sink-file-based/package.json
@@ -19,7 +19,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/kitchen-sink-solid-query-file-based/package.json b/examples/solid/kitchen-sink-solid-query-file-based/package.json
index 520f9060e1..20dd44be3c 100644
--- a/examples/solid/kitchen-sink-solid-query-file-based/package.json
+++ b/examples/solid/kitchen-sink-solid-query-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
"@tanstack/solid-router": "^1.170.6",
diff --git a/examples/solid/large-file-based/package.json b/examples/solid/large-file-based/package.json
index d6d0d02ab4..285809df67 100644
--- a/examples/solid/large-file-based/package.json
+++ b/examples/solid/large-file-based/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
diff --git a/examples/solid/quickstart-esbuild-file-based/package.json b/examples/solid/quickstart-esbuild-file-based/package.json
index 6eba69fc6d..630f835f17 100644
--- a/examples/solid/quickstart-esbuild-file-based/package.json
+++ b/examples/solid/quickstart-esbuild-file-based/package.json
@@ -9,7 +9,7 @@
"start": "dev"
},
"dependencies": {
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/quickstart-file-based/package.json b/examples/solid/quickstart-file-based/package.json
index 551f6ebdcd..3e056decf3 100644
--- a/examples/solid/quickstart-file-based/package.json
+++ b/examples/solid/quickstart-file-based/package.json
@@ -18,7 +18,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/quickstart-rspack-file-based/package.json b/examples/solid/quickstart-rspack-file-based/package.json
index 95385af782..53b55d946e 100644
--- a/examples/solid/quickstart-rspack-file-based/package.json
+++ b/examples/solid/quickstart-rspack-file-based/package.json
@@ -19,7 +19,7 @@
"@rsbuild/core": "^2.0.1",
"@rsbuild/plugin-babel": "^1.1.2",
"@rsbuild/plugin-solid": "^1.1.1",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"typescript": "^6.0.2"
}
}
diff --git a/examples/solid/quickstart-webpack-file-based/package.json b/examples/solid/quickstart-webpack-file-based/package.json
index 6b2963fd9f..51d0d3198c 100644
--- a/examples/solid/quickstart-webpack-file-based/package.json
+++ b/examples/solid/quickstart-webpack-file-based/package.json
@@ -15,7 +15,7 @@
"devDependencies": {
"@babel/core": "^7.28.5",
"@babel/preset-typescript": "^7.27.1",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"babel-loader": "^10.0.0",
"babel-preset-solid": "^1.9.10",
"css-loader": "^7.1.2",
diff --git a/examples/solid/router-monorepo-simple-lazy/package.json b/examples/solid/router-monorepo-simple-lazy/package.json
index 6bb627da62..55b5264fb5 100644
--- a/examples/solid/router-monorepo-simple-lazy/package.json
+++ b/examples/solid/router-monorepo-simple-lazy/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-simple-lazy/packages/router/package.json b/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
index 0d3c1ea446..29eb3bcdf6 100644
--- a/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
+++ b/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/history": "^1.162.0",
"@tanstack/solid-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
"solid-js": "^1.9.10"
diff --git a/examples/solid/router-monorepo-simple/package.json b/examples/solid/router-monorepo-simple/package.json
index 6425c6aca3..14096b080f 100644
--- a/examples/solid/router-monorepo-simple/package.json
+++ b/examples/solid/router-monorepo-simple/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-simple/packages/router/package.json b/examples/solid/router-monorepo-simple/packages/router/package.json
index c67c468cec..3db245b6fa 100644
--- a/examples/solid/router-monorepo-simple/packages/router/package.json
+++ b/examples/solid/router-monorepo-simple/packages/router/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/history": "^1.162.0",
"@tanstack/solid-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
"solid-js": "^1.9.10"
diff --git a/examples/solid/router-monorepo-solid-query/package.json b/examples/solid/router-monorepo-solid-query/package.json
index 54cfc82f67..8ebec7e21c 100644
--- a/examples/solid/router-monorepo-solid-query/package.json
+++ b/examples/solid/router-monorepo-solid-query/package.json
@@ -14,7 +14,7 @@
"@tanstack/solid-query-devtools": "^5.90.0",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-solid-query/packages/router/package.json b/examples/solid/router-monorepo-solid-query/packages/router/package.json
index 9e45605826..a4c437c94f 100644
--- a/examples/solid/router-monorepo-solid-query/packages/router/package.json
+++ b/examples/solid/router-monorepo-solid-query/packages/router/package.json
@@ -11,7 +11,7 @@
"@tanstack/history": "^1.162.0",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@router-solid-mono-solid-query/post-query": "workspace:*",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
diff --git a/examples/solid/search-validator-adapters/package.json b/examples/solid/search-validator-adapters/package.json
index 3335b3b0cd..5dbc5f06d8 100644
--- a/examples/solid/search-validator-adapters/package.json
+++ b/examples/solid/search-validator-adapters/package.json
@@ -15,7 +15,7 @@
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@tanstack/valibot-adapter": "^1.167.0",
"@tanstack/zod-adapter": "^1.167.0",
"arktype": "^2.1.7",
diff --git a/examples/solid/start-basic-auth/package.json b/examples/solid/start-basic-auth/package.json
index dddea459f9..2f4a93e79e 100644
--- a/examples/solid/start-basic-auth/package.json
+++ b/examples/solid/start-basic-auth/package.json
@@ -16,7 +16,7 @@
"@prisma/client": "^7.0.0",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0"
diff --git a/examples/solid/start-basic-authjs/package.json b/examples/solid/start-basic-authjs/package.json
index a80a834c96..66b637460b 100644
--- a/examples/solid/start-basic-authjs/package.json
+++ b/examples/solid/start-basic-authjs/package.json
@@ -13,7 +13,7 @@
"@auth/core": "^0.41.1",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
"start-authjs": "^1.0.0",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0"
diff --git a/examples/solid/start-basic-cloudflare/package.json b/examples/solid/start-basic-cloudflare/package.json
index 1bfff3ab5b..3b42f991de 100644
--- a/examples/solid/start-basic-cloudflare/package.json
+++ b/examples/solid/start-basic-cloudflare/package.json
@@ -14,7 +14,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-netlify/package.json b/examples/solid/start-basic-netlify/package.json
index 89abbba7fb..0ad1679df1 100644
--- a/examples/solid/start-basic-netlify/package.json
+++ b/examples/solid/start-basic-netlify/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-nitro/package.json b/examples/solid/start-basic-nitro/package.json
index a99d1e8f28..5ae48ece48 100644
--- a/examples/solid/start-basic-nitro/package.json
+++ b/examples/solid/start-basic-nitro/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-solid-query/package.json b/examples/solid/start-basic-solid-query/package.json
index 864f211d28..ec4d8261f2 100644
--- a/examples/solid/start-basic-solid-query/package.json
+++ b/examples/solid/start-basic-solid-query/package.json
@@ -15,7 +15,7 @@
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/solid-router-ssr-query": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0"
diff --git a/examples/solid/start-basic-static/package.json b/examples/solid/start-basic-static/package.json
index 4cee02143a..f5dd3f9922 100644
--- a/examples/solid/start-basic-static/package.json
+++ b/examples/solid/start-basic-static/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
"@tanstack/start-static-server-functions": "^1.167.6",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
diff --git a/examples/solid/start-basic/package.json b/examples/solid/start-basic/package.json
index 4294e31b11..2997b8b19c 100644
--- a/examples/solid/start-basic/package.json
+++ b/examples/solid/start-basic/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0"
diff --git a/examples/solid/start-bun/package.json b/examples/solid/start-bun/package.json
index 0a2d821ae8..51c41ea0c3 100644
--- a/examples/solid/start-bun/package.json
+++ b/examples/solid/start-bun/package.json
@@ -18,8 +18,8 @@
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/solid-router-ssr-query": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.9",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
diff --git a/examples/solid/start-convex-better-auth/package.json b/examples/solid/start-convex-better-auth/package.json
index 9c14355f8a..609ec166cd 100644
--- a/examples/solid/start-convex-better-auth/package.json
+++ b/examples/solid/start-convex-better-auth/package.json
@@ -15,7 +15,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
"better-auth": "^1.3.27",
"clsx": "^2.1.1",
"convex": "^1.28.2",
diff --git a/examples/solid/start-counter/package.json b/examples/solid/start-counter/package.json
index 4838a5789b..60c7f20032 100644
--- a/examples/solid/start-counter/package.json
+++ b/examples/solid/start-counter/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0",
diff --git a/examples/solid/start-i18n-paraglide/package.json b/examples/solid/start-i18n-paraglide/package.json
index da38ce8613..8a7d468a93 100644
--- a/examples/solid/start-i18n-paraglide/package.json
+++ b/examples/solid/start-i18n-paraglide/package.json
@@ -12,7 +12,7 @@
"@tanstack/solid-devtools": "^0.7.0",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-large/package.json b/examples/solid/start-large/package.json
index 4b9fe15ab6..226d28531a 100644
--- a/examples/solid/start-large/package.json
+++ b/examples/solid/start-large/package.json
@@ -15,7 +15,7 @@
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
"tailwind-merge": "^2.6.0",
diff --git a/examples/solid/start-streaming-data-from-server-functions/package.json b/examples/solid/start-streaming-data-from-server-functions/package.json
index b28cee556a..2dcf10232b 100644
--- a/examples/solid/start-streaming-data-from-server-functions/package.json
+++ b/examples/solid/start-streaming-data-from-server-functions/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
"solid-js": "^1.9.10",
"zod": "^4.4.3"
},
diff --git a/examples/solid/start-supabase-basic/package.json b/examples/solid/start-supabase-basic/package.json
index 350b2fcfa1..7ddbc3cf9d 100644
--- a/examples/solid/start-supabase-basic/package.json
+++ b/examples/solid/start-supabase-basic/package.json
@@ -16,7 +16,7 @@
"@supabase/supabase-js": "^2.48.1",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
"solid-js": "^1.9.9",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/start-tailwind-v4/package.json b/examples/solid/start-tailwind-v4/package.json
index eacc1a2cd1..27f1b5b26e 100644
--- a/examples/solid/start-tailwind-v4/package.json
+++ b/examples/solid/start-tailwind-v4/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.8",
+ "@tanstack/solid-start": "^1.168.9",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0",
"zod": "^4.4.3"
diff --git a/examples/solid/view-transitions/package.json b/examples/solid/view-transitions/package.json
index e4429c22f7..27693bd4a2 100644
--- a/examples/solid/view-transitions/package.json
+++ b/examples/solid/view-transitions/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/with-trpc/package.json b/examples/solid/with-trpc/package.json
index 788447dbd4..74dd33762c 100644
--- a/examples/solid/with-trpc/package.json
+++ b/examples/solid/with-trpc/package.json
@@ -11,7 +11,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@tanstack/solid-router": "^1.170.6",
"@tanstack/solid-router-devtools": "^1.167.0",
"@trpc/client": "^11.4.3",
diff --git a/examples/vue/basic-file-based-jsx/package.json b/examples/vue/basic-file-based-jsx/package.json
index 91762744b1..8546ed5364 100644
--- a/examples/vue/basic-file-based-jsx/package.json
+++ b/examples/vue/basic-file-based-jsx/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@tanstack/vue-router": "^1.170.6",
"@tanstack/vue-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
diff --git a/examples/vue/basic-file-based-sfc/package.json b/examples/vue/basic-file-based-sfc/package.json
index 91d711b957..997861eab8 100644
--- a/examples/vue/basic-file-based-sfc/package.json
+++ b/examples/vue/basic-file-based-sfc/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.8",
+ "@tanstack/router-plugin": "^1.168.9",
"@tanstack/vue-router": "^1.170.6",
"@tanstack/vue-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
diff --git a/packages/react-start-rsc/CHANGELOG.md b/packages/react-start-rsc/CHANGELOG.md
index a38c7f7fc5..11c5f378bc 100644
--- a/packages/react-start-rsc/CHANGELOG.md
+++ b/packages/react-start-rsc/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/react-start-rsc
+## 0.1.9
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/start-plugin-core@1.171.2
+
## 0.1.8
### Patch Changes
diff --git a/packages/react-start-rsc/package.json b/packages/react-start-rsc/package.json
index f564f67c89..c6e438ea59 100644
--- a/packages/react-start-rsc/package.json
+++ b/packages/react-start-rsc/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-rsc",
- "version": "0.1.8",
+ "version": "0.1.9",
"description": "React Server Components support for TanStack Start",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start/CHANGELOG.md b/packages/react-start/CHANGELOG.md
index 1b1723b9e0..d24390b0e1 100644
--- a/packages/react-start/CHANGELOG.md
+++ b/packages/react-start/CHANGELOG.md
@@ -1,5 +1,13 @@
# @tanstack/react-start
+## 1.168.9
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/start-plugin-core@1.171.2
+ - @tanstack/react-start-rsc@0.1.9
+
## 1.168.8
### Patch Changes
diff --git a/packages/react-start/package.json b/packages/react-start/package.json
index dc9fc5e7ee..2810e22ed0 100644
--- a/packages/react-start/package.json
+++ b/packages/react-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start",
- "version": "1.168.8",
+ "version": "1.168.9",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-cli/CHANGELOG.md b/packages/router-cli/CHANGELOG.md
index 3817e2a345..eec511f6cc 100644
--- a/packages/router-cli/CHANGELOG.md
+++ b/packages/router-cli/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-cli
+## 1.167.8
+
+### Patch Changes
+
+- Updated dependencies [[`7df0d02`](https://github.com/TanStack/router/commit/7df0d02bfb1407b1f07731ef69af24e2f0e415d7)]:
+ - @tanstack/router-generator@1.167.8
+
## 1.167.7
### Patch Changes
diff --git a/packages/router-cli/package.json b/packages/router-cli/package.json
index 99210a3a90..284ed99aae 100644
--- a/packages/router-cli/package.json
+++ b/packages/router-cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-cli",
- "version": "1.167.7",
+ "version": "1.167.8",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-generator/CHANGELOG.md b/packages/router-generator/CHANGELOG.md
index 4200dd6713..a8092b3184 100644
--- a/packages/router-generator/CHANGELOG.md
+++ b/packages/router-generator/CHANGELOG.md
@@ -1,5 +1,11 @@
# @tanstack/router-generator
+## 1.167.8
+
+### Patch Changes
+
+- Preserve escaped underscore segments when generating index routes across physical and virtual route trees, including pathless layouts, `physical()` prefixes, and `__virtual.ts` subtrees. ([#7453](https://github.com/TanStack/router/pull/7453))
+
## 1.167.7
### Patch Changes
diff --git a/packages/router-generator/package.json b/packages/router-generator/package.json
index 4d4f35c402..a51436ea0f 100644
--- a/packages/router-generator/package.json
+++ b/packages/router-generator/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-generator",
- "version": "1.167.7",
+ "version": "1.167.8",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-plugin/CHANGELOG.md b/packages/router-plugin/CHANGELOG.md
index 7bd7b621dc..38b98d8516 100644
--- a/packages/router-plugin/CHANGELOG.md
+++ b/packages/router-plugin/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-plugin
+## 1.168.9
+
+### Patch Changes
+
+- Updated dependencies [[`7df0d02`](https://github.com/TanStack/router/commit/7df0d02bfb1407b1f07731ef69af24e2f0e415d7)]:
+ - @tanstack/router-generator@1.167.8
+
## 1.168.8
### Patch Changes
diff --git a/packages/router-plugin/package.json b/packages/router-plugin/package.json
index eaf55e5141..5b75d94871 100644
--- a/packages/router-plugin/package.json
+++ b/packages/router-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-plugin",
- "version": "1.168.8",
+ "version": "1.168.9",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-vite-plugin/CHANGELOG.md b/packages/router-vite-plugin/CHANGELOG.md
index 195e9a5dd3..72bab17f8f 100644
--- a/packages/router-vite-plugin/CHANGELOG.md
+++ b/packages/router-vite-plugin/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-vite-plugin
+## 1.167.9
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/router-plugin@1.168.9
+
## 1.167.8
### Patch Changes
diff --git a/packages/router-vite-plugin/package.json b/packages/router-vite-plugin/package.json
index 3157c548c5..c58ab15ec4 100644
--- a/packages/router-vite-plugin/package.json
+++ b/packages/router-vite-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-vite-plugin",
- "version": "1.167.8",
+ "version": "1.167.9",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-start/CHANGELOG.md b/packages/solid-start/CHANGELOG.md
index 42239162d3..a5f05f0878 100644
--- a/packages/solid-start/CHANGELOG.md
+++ b/packages/solid-start/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/solid-start
+## 1.168.9
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/start-plugin-core@1.171.2
+
## 1.168.8
### Patch Changes
diff --git a/packages/solid-start/package.json b/packages/solid-start/package.json
index 981ada4eb5..4c3b6c31f4 100644
--- a/packages/solid-start/package.json
+++ b/packages/solid-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-start",
- "version": "1.168.8",
+ "version": "1.168.9",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-plugin-core/CHANGELOG.md b/packages/start-plugin-core/CHANGELOG.md
index 6572d64003..a5be524fa0 100644
--- a/packages/start-plugin-core/CHANGELOG.md
+++ b/packages/start-plugin-core/CHANGELOG.md
@@ -1,5 +1,13 @@
# @tanstack/start-plugin-core
+## 1.171.2
+
+### Patch Changes
+
+- Updated dependencies [[`7df0d02`](https://github.com/TanStack/router/commit/7df0d02bfb1407b1f07731ef69af24e2f0e415d7)]:
+ - @tanstack/router-generator@1.167.8
+ - @tanstack/router-plugin@1.168.9
+
## 1.171.1
### Patch Changes
diff --git a/packages/start-plugin-core/package.json b/packages/start-plugin-core/package.json
index ff691c0eaa..57c29e4b0d 100644
--- a/packages/start-plugin-core/package.json
+++ b/packages/start-plugin-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-plugin-core",
- "version": "1.171.1",
+ "version": "1.171.2",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-start/CHANGELOG.md b/packages/vue-start/CHANGELOG.md
index b24b4cabce..47db2f056f 100644
--- a/packages/vue-start/CHANGELOG.md
+++ b/packages/vue-start/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/vue-start
+## 1.168.9
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/start-plugin-core@1.171.2
+
## 1.168.8
### Patch Changes
diff --git a/packages/vue-start/package.json b/packages/vue-start/package.json
index 83cafe7325..effcdbba3d 100644
--- a/packages/vue-start/package.json
+++ b/packages/vue-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-start",
- "version": "1.168.8",
+ "version": "1.168.9",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
From e2896b5051334913e78792ca39f01e848262b17d Mon Sep 17 00:00:00 2001
From: Birk Skyum <74932975+birkskyum@users.noreply.github.com>
Date: Thu, 21 May 2026 02:22:39 +0200
Subject: [PATCH 007/454] ci: fix release notes diff range after Release PR
flow (#7456)
---
scripts/create-github-release.mjs | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/scripts/create-github-release.mjs b/scripts/create-github-release.mjs
index 1ddcac4d4f..cd009cd9b7 100644
--- a/scripts/create-github-release.mjs
+++ b/scripts/create-github-release.mjs
@@ -54,10 +54,10 @@ async function resolveAuthorForPR(prNumber) {
}
// Get the previous release commit to diff against.
-// This script runs right after the "ci: changeset release" commit is pushed,
+// This script runs right after the "ci: Version Packages" PR is merged,
// so HEAD is the release commit.
const releaseLogs = execSync(
- 'git log --oneline --grep="ci: changeset release" --format=%H',
+ 'git log --oneline --grep="^ci: Version Packages" --grep="^ci: changeset release" --format=%H',
)
.toString()
.trim()
@@ -159,7 +159,11 @@ for (const line of commits) {
const [, hash, email, subject] = match
// Skip release commits
- if (subject.startsWith('ci: changeset release')) continue
+ if (
+ subject.startsWith('ci: Version Packages') ||
+ subject.startsWith('ci: changeset release')
+ )
+ continue
// Parse conventional commit: type(scope)!: message
const conventionalMatch = subject.match(/^(\w+)(?:\(([^)]*)\))?(!)?:\s*(.*)$/)
From ce61fa2e65d70973f983ea0f03378903f7751bf5 Mon Sep 17 00:00:00 2001
From: Manuel Schiller
Date: Thu, 21 May 2026 22:53:54 +0200
Subject: [PATCH 008/454] fix(start): explicitly re-export public API to
survive SSR cold-start cycle (#7466)
---
.changeset/trim-start-meta-reexports.md | 7 +++++++
packages/react-start/src/index.ts | 16 +++++++++++++++-
packages/solid-start/src/index.ts | 15 +++++++++++++++
packages/vue-start/src/index.ts | 15 +++++++++++++++
4 files changed, 52 insertions(+), 1 deletion(-)
create mode 100644 .changeset/trim-start-meta-reexports.md
diff --git a/.changeset/trim-start-meta-reexports.md b/.changeset/trim-start-meta-reexports.md
new file mode 100644
index 0000000000..553324cc19
--- /dev/null
+++ b/.changeset/trim-start-meta-reexports.md
@@ -0,0 +1,7 @@
+---
+'@tanstack/react-start': patch
+'@tanstack/solid-start': patch
+'@tanstack/vue-start': patch
+---
+
+Explicitly re-export public API names from `@tanstack/start-client-core` (`createServerFn`, `createMiddleware`, `createStart`, `createCsrfMiddleware`, `createIsomorphicFn`, `createClientOnlyFn`, `createServerOnlyFn`) alongside the existing `export *`. The explicit named re-exports are registered at link time (via Vite SSR's `defineExport` at `fileStartIndex`), so the namespace has these getters before any import body runs — survives the cold-start SSR cycle through user middleware where `export *` would otherwise produce a partial facade (`createMiddleware is not a function`). Workaround for vitejs/vite#22491 / #22493.
diff --git a/packages/react-start/src/index.ts b/packages/react-start/src/index.ts
index 65b116ec2e..0947745215 100644
--- a/packages/react-start/src/index.ts
+++ b/packages/react-start/src/index.ts
@@ -1,6 +1,20 @@
export { useServerFn } from './useServerFn'
export * from '@tanstack/start-client-core'
-export { createServerFn } from '@tanstack/start-client-core'
+// Explicit re-exports shadow `export *` above so these public-API names are
+// registered on the namespace at link time (via Vite SSR's `defineExport`
+// at fileStartIndex), surviving the cold-start SSR cycle through user
+// middleware. See vitejs/vite#22491 / #22493. Trim list to genuine public
+// API only; internals fall through `export *` and are safe because they
+// aren't imported at top level in the cycle path.
+export {
+ createClientOnlyFn,
+ createCsrfMiddleware,
+ createIsomorphicFn,
+ createMiddleware,
+ createServerFn,
+ createServerOnlyFn,
+ createStart,
+} from '@tanstack/start-client-core'
export { Hydrate } from '@tanstack/react-start-client'
export type {
HydrateOptions,
diff --git a/packages/solid-start/src/index.ts b/packages/solid-start/src/index.ts
index 0cdac87c81..44d8c36c88 100644
--- a/packages/solid-start/src/index.ts
+++ b/packages/solid-start/src/index.ts
@@ -1,5 +1,20 @@
export { useServerFn } from './useServerFn'
export * from '@tanstack/start-client-core'
+// Explicit re-exports shadow `export *` above so these public-API names are
+// registered on the namespace at link time (via Vite SSR's `defineExport`
+// at fileStartIndex), surviving the cold-start SSR cycle through user
+// middleware. See vitejs/vite#22491 / #22493. Trim list to genuine public
+// API only; internals fall through `export *` and are safe because they
+// aren't imported at top level in the cycle path.
+export {
+ createClientOnlyFn,
+ createCsrfMiddleware,
+ createIsomorphicFn,
+ createMiddleware,
+ createServerFn,
+ createServerOnlyFn,
+ createStart,
+} from '@tanstack/start-client-core'
export { Hydrate } from '@tanstack/solid-start-client'
export type {
HydrateOptions,
diff --git a/packages/vue-start/src/index.ts b/packages/vue-start/src/index.ts
index 8b51b6c783..21b3b5b003 100644
--- a/packages/vue-start/src/index.ts
+++ b/packages/vue-start/src/index.ts
@@ -1,2 +1,17 @@
export { useServerFn } from './useServerFn'
export * from '@tanstack/start-client-core'
+// Explicit re-exports shadow `export *` above so these public-API names are
+// registered on the namespace at link time (via Vite SSR's `defineExport`
+// at fileStartIndex), surviving the cold-start SSR cycle through user
+// middleware. See vitejs/vite#22491 / #22493. Trim list to genuine public
+// API only; internals fall through `export *` and are safe because they
+// aren't imported at top level in the cycle path.
+export {
+ createClientOnlyFn,
+ createCsrfMiddleware,
+ createIsomorphicFn,
+ createMiddleware,
+ createServerFn,
+ createServerOnlyFn,
+ createStart,
+} from '@tanstack/start-client-core'
From 5268ba4566233ea58880df85f167ad0401a93a46 Mon Sep 17 00:00:00 2001
From: Manuel Schiller
Date: Thu, 21 May 2026 22:54:26 +0200
Subject: [PATCH 009/454] fix: Fix hash scrolling with `resetScroll={false}`
(#7464)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---
.changeset/scroll-restoration-fixes.md | 5 +
.../scroll-restoration/src/routeTree.gen.ts | 21 +++
.../scroll-restoration/src/router.tsx | 4 +
.../src/routes/(tests)/hash-scroll-repro.tsx | 9 +
.../src/routes/(tests)/ssr-scroll-key.tsx | 16 ++
.../scroll-restoration/tests/app.spec.ts | 40 +++++
.../tests/hash-scroll-repro.spec.ts | 16 ++
.../tests/ssr-scroll-key.spec.ts | 41 +++++
.../src/scroll-restoration-inline.ts | 57 +++----
.../src/scroll-restoration-script/server.ts | 22 +--
.../router-core/src/scroll-restoration.ts | 75 ++++-----
.../tests/scroll-restoration-script.test.ts | 155 ++++++++++++++++++
12 files changed, 366 insertions(+), 95 deletions(-)
create mode 100644 .changeset/scroll-restoration-fixes.md
create mode 100644 e2e/react-start/scroll-restoration/src/routes/(tests)/ssr-scroll-key.tsx
create mode 100644 e2e/react-start/scroll-restoration/tests/ssr-scroll-key.spec.ts
create mode 100644 packages/router-core/tests/scroll-restoration-script.test.ts
diff --git a/.changeset/scroll-restoration-fixes.md b/.changeset/scroll-restoration-fixes.md
new file mode 100644
index 0000000000..65437fa5a8
--- /dev/null
+++ b/.changeset/scroll-restoration-fixes.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/router-core': patch
+---
+
+Fix hash scrolling with `resetScroll={false}`
diff --git a/e2e/react-start/scroll-restoration/src/routeTree.gen.ts b/e2e/react-start/scroll-restoration/src/routeTree.gen.ts
index 5c9174efcc..1df27a0424 100644
--- a/e2e/react-start/scroll-restoration/src/routeTree.gen.ts
+++ b/e2e/react-start/scroll-restoration/src/routeTree.gen.ts
@@ -12,6 +12,7 @@ import { Route as rootRouteImport } from './routes/__root'
import { Route as IndexRouteImport } from './routes/index'
import { Route as testsWithSearchRouteImport } from './routes/(tests)/with-search'
import { Route as testsWithLoaderRouteImport } from './routes/(tests)/with-loader'
+import { Route as testsSsrScrollKeyRouteImport } from './routes/(tests)/ssr-scroll-key'
import { Route as testsResetScrollFalseCRouteImport } from './routes/(tests)/reset-scroll-false-c'
import { Route as testsResetScrollFalseBRouteImport } from './routes/(tests)/reset-scroll-false-b'
import { Route as testsResetScrollFalseARouteImport } from './routes/(tests)/reset-scroll-false-a'
@@ -38,6 +39,11 @@ const testsWithLoaderRoute = testsWithLoaderRouteImport.update({
path: '/with-loader',
getParentRoute: () => rootRouteImport,
} as any)
+const testsSsrScrollKeyRoute = testsSsrScrollKeyRouteImport.update({
+ id: '/(tests)/ssr-scroll-key',
+ path: '/ssr-scroll-key',
+ getParentRoute: () => rootRouteImport,
+} as any)
const testsResetScrollFalseCRoute = testsResetScrollFalseCRouteImport.update({
id: '/(tests)/reset-scroll-false-c',
path: '/reset-scroll-false-c',
@@ -103,6 +109,7 @@ export interface FileRoutesByFullPath {
'/reset-scroll-false-a': typeof testsResetScrollFalseARoute
'/reset-scroll-false-b': typeof testsResetScrollFalseBRoute
'/reset-scroll-false-c': typeof testsResetScrollFalseCRoute
+ '/ssr-scroll-key': typeof testsSsrScrollKeyRoute
'/with-loader': typeof testsWithLoaderRoute
'/with-search': typeof testsWithSearchRoute
}
@@ -118,6 +125,7 @@ export interface FileRoutesByTo {
'/reset-scroll-false-a': typeof testsResetScrollFalseARoute
'/reset-scroll-false-b': typeof testsResetScrollFalseBRoute
'/reset-scroll-false-c': typeof testsResetScrollFalseCRoute
+ '/ssr-scroll-key': typeof testsSsrScrollKeyRoute
'/with-loader': typeof testsWithLoaderRoute
'/with-search': typeof testsWithSearchRoute
}
@@ -134,6 +142,7 @@ export interface FileRoutesById {
'/(tests)/reset-scroll-false-a': typeof testsResetScrollFalseARoute
'/(tests)/reset-scroll-false-b': typeof testsResetScrollFalseBRoute
'/(tests)/reset-scroll-false-c': typeof testsResetScrollFalseCRoute
+ '/(tests)/ssr-scroll-key': typeof testsSsrScrollKeyRoute
'/(tests)/with-loader': typeof testsWithLoaderRoute
'/(tests)/with-search': typeof testsWithSearchRoute
}
@@ -151,6 +160,7 @@ export interface FileRouteTypes {
| '/reset-scroll-false-a'
| '/reset-scroll-false-b'
| '/reset-scroll-false-c'
+ | '/ssr-scroll-key'
| '/with-loader'
| '/with-search'
fileRoutesByTo: FileRoutesByTo
@@ -166,6 +176,7 @@ export interface FileRouteTypes {
| '/reset-scroll-false-a'
| '/reset-scroll-false-b'
| '/reset-scroll-false-c'
+ | '/ssr-scroll-key'
| '/with-loader'
| '/with-search'
id:
@@ -181,6 +192,7 @@ export interface FileRouteTypes {
| '/(tests)/reset-scroll-false-a'
| '/(tests)/reset-scroll-false-b'
| '/(tests)/reset-scroll-false-c'
+ | '/(tests)/ssr-scroll-key'
| '/(tests)/with-loader'
| '/(tests)/with-search'
fileRoutesById: FileRoutesById
@@ -197,6 +209,7 @@ export interface RootRouteChildren {
testsResetScrollFalseARoute: typeof testsResetScrollFalseARoute
testsResetScrollFalseBRoute: typeof testsResetScrollFalseBRoute
testsResetScrollFalseCRoute: typeof testsResetScrollFalseCRoute
+ testsSsrScrollKeyRoute: typeof testsSsrScrollKeyRoute
testsWithLoaderRoute: typeof testsWithLoaderRoute
testsWithSearchRoute: typeof testsWithSearchRoute
}
@@ -224,6 +237,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof testsWithLoaderRouteImport
parentRoute: typeof rootRouteImport
}
+ '/(tests)/ssr-scroll-key': {
+ id: '/(tests)/ssr-scroll-key'
+ path: '/ssr-scroll-key'
+ fullPath: '/ssr-scroll-key'
+ preLoaderRoute: typeof testsSsrScrollKeyRouteImport
+ parentRoute: typeof rootRouteImport
+ }
'/(tests)/reset-scroll-false-c': {
id: '/(tests)/reset-scroll-false-c'
path: '/reset-scroll-false-c'
@@ -309,6 +329,7 @@ const rootRouteChildren: RootRouteChildren = {
testsResetScrollFalseARoute: testsResetScrollFalseARoute,
testsResetScrollFalseBRoute: testsResetScrollFalseBRoute,
testsResetScrollFalseCRoute: testsResetScrollFalseCRoute,
+ testsSsrScrollKeyRoute: testsSsrScrollKeyRoute,
testsWithLoaderRoute: testsWithLoaderRoute,
testsWithSearchRoute: testsWithSearchRoute,
}
diff --git a/e2e/react-start/scroll-restoration/src/router.tsx b/e2e/react-start/scroll-restoration/src/router.tsx
index 0d529ba002..eb81f5bfa9 100644
--- a/e2e/react-start/scroll-restoration/src/router.tsx
+++ b/e2e/react-start/scroll-restoration/src/router.tsx
@@ -9,6 +9,10 @@ export function getRouter() {
scrollRestoration: true,
scrollToTopSelectors: ['[data-scroll-restoration-id="carry-over-reset"]'],
getScrollRestorationKey: (location) => {
+ if (location.pathname === '/ssr-scroll-key') {
+ return 'ssr-scroll-key'
+ }
+
if (location.pathname === '/hash-scroll-repro') {
return location.pathname
}
diff --git a/e2e/react-start/scroll-restoration/src/routes/(tests)/hash-scroll-repro.tsx b/e2e/react-start/scroll-restoration/src/routes/(tests)/hash-scroll-repro.tsx
index 31970306bd..1017b63bc3 100644
--- a/e2e/react-start/scroll-restoration/src/routes/(tests)/hash-scroll-repro.tsx
+++ b/e2e/react-start/scroll-restoration/src/routes/(tests)/hash-scroll-repro.tsx
@@ -52,6 +52,15 @@ function Component() {
>
#one
+
+ #four no reset
+
diff --git a/e2e/react-start/scroll-restoration/src/routes/(tests)/ssr-scroll-key.tsx b/e2e/react-start/scroll-restoration/src/routes/(tests)/ssr-scroll-key.tsx
new file mode 100644
index 0000000000..e224ed9137
--- /dev/null
+++ b/e2e/react-start/scroll-restoration/src/routes/(tests)/ssr-scroll-key.tsx
@@ -0,0 +1,16 @@
+import { createFileRoute } from '@tanstack/react-router'
+import * as React from 'react'
+import { ScrollBlock } from '../-components/scroll-block'
+
+export const Route = createFileRoute('/(tests)/ssr-scroll-key')({
+ component: Component,
+})
+
+function Component() {
+ return (
+
+
ssr-scroll-key
+
+
+ )
+}
diff --git a/e2e/react-start/scroll-restoration/tests/app.spec.ts b/e2e/react-start/scroll-restoration/tests/app.spec.ts
index 2485d04da0..2d7ee75fd3 100644
--- a/e2e/react-start/scroll-restoration/tests/app.spec.ts
+++ b/e2e/react-start/scroll-restoration/tests/app.spec.ts
@@ -8,6 +8,46 @@ test('Smoke - Renders home', async ({ page }) => {
).toBeVisible()
})
+test('restores window scroll after force reload of a navigated route', async ({
+ page,
+}) => {
+ await page.goto('/')
+ await page.getByRole('link', { name: '/reset-scroll-false-a' }).click()
+ await expect(
+ page.getByRole('heading', { name: 'reset-scroll-false-a' }),
+ ).toBeVisible()
+ await expect
+ .poll(async () =>
+ page.evaluate(() => document.documentElement.scrollHeight > innerHeight),
+ )
+ .toBe(true)
+
+ const scrollY = await page.evaluate(async () => {
+ window.scrollTo(0, 500)
+ await new Promise((resolve) => requestAnimationFrame(() => resolve(null)))
+ return window.scrollY
+ })
+
+ expect(scrollY).toBeGreaterThan(0)
+
+ await page.reload()
+ await expect(
+ page.getByRole('heading', { name: 'reset-scroll-false-a' }),
+ ).toBeVisible()
+ await expect
+ .poll(async () => page.evaluate(() => window.scrollY))
+ .toBe(scrollY)
+})
+
+test('initial hard navigation to a hash scrolls to the hash target', async ({
+ page,
+}) => {
+ await page.goto('/hash-scroll-repro#four')
+ await page.waitForLoadState('networkidle')
+ await expect(page.getByTestId('hash-scroll-section-four')).toBeInViewport()
+ await expect(page.getByTestId('hash-scroll-section-one')).not.toBeInViewport()
+})
+
// Test for scroll related stuff
;[
linkOptions({ to: '/normal-page' }),
diff --git a/e2e/react-start/scroll-restoration/tests/hash-scroll-repro.spec.ts b/e2e/react-start/scroll-restoration/tests/hash-scroll-repro.spec.ts
index 65dcf7a4dc..d203ea8c26 100644
--- a/e2e/react-start/scroll-restoration/tests/hash-scroll-repro.spec.ts
+++ b/e2e/react-start/scroll-restoration/tests/hash-scroll-repro.spec.ts
@@ -141,3 +141,19 @@ test('hash navigation still runs when only nested scroll entries restore', async
})
.toBe(nestedScrollTop)
})
+
+test('hash navigation scrolls when resetScroll is false', async ({ page }) => {
+ await page.goto('/hash-scroll-repro#one')
+ await page.waitForLoadState('networkidle')
+ await expect(page.getByTestId('hash-scroll-section-one')).toBeInViewport()
+
+ const scrollYBeforeHashNavigation = await page.evaluate(() => window.scrollY)
+
+ await page.getByTestId('hash-scroll-section-four-no-reset-link').click()
+
+ await expect(page).toHaveURL(/#four$/)
+ await expect(page.getByTestId('hash-scroll-section-four')).toBeInViewport()
+ await expect
+ .poll(async () => page.evaluate(() => window.scrollY))
+ .toBeGreaterThan(scrollYBeforeHashNavigation)
+})
diff --git a/e2e/react-start/scroll-restoration/tests/ssr-scroll-key.spec.ts b/e2e/react-start/scroll-restoration/tests/ssr-scroll-key.spec.ts
new file mode 100644
index 0000000000..39b2f3e8d2
--- /dev/null
+++ b/e2e/react-start/scroll-restoration/tests/ssr-scroll-key.spec.ts
@@ -0,0 +1,41 @@
+import { expect, test } from '@playwright/test'
+
+const storageKey = 'tsr-scroll-restoration-v1_3'
+
+test('SSR scroll restoration uses a custom restoration key', async ({
+ page,
+}) => {
+ const customKeyScrollY = 650
+ const historyKeyScrollY = 80
+
+ await page.goto('/')
+ await page.evaluate(
+ ({ customKeyScrollY, historyKeyScrollY, storageKey }) => {
+ window.sessionStorage.setItem(
+ storageKey,
+ JSON.stringify({
+ 'ssr-scroll-key': {
+ window: { scrollX: 0, scrollY: customKeyScrollY },
+ },
+ 'history-key': {
+ window: { scrollX: 0, scrollY: historyKeyScrollY },
+ },
+ }),
+ )
+ },
+ { customKeyScrollY, historyKeyScrollY, storageKey },
+ )
+
+ await page.addInitScript(() => {
+ window.history.replaceState({ __TSR_key: 'history-key' }, '')
+ })
+ await page.route(/\/assets\/.*\.js$/, (route) => route.abort())
+
+ await page.goto('/ssr-scroll-key', { waitUntil: 'domcontentloaded' })
+ await expect(
+ page.getByRole('heading', { name: 'ssr-scroll-key' }),
+ ).toBeVisible()
+ await expect
+ .poll(async () => page.evaluate(() => window.scrollY))
+ .toBe(customKeyScrollY)
+})
diff --git a/packages/router-core/src/scroll-restoration-inline.ts b/packages/router-core/src/scroll-restoration-inline.ts
index 1e0328a663..76ab0027b3 100644
--- a/packages/router-core/src/scroll-restoration-inline.ts
+++ b/packages/router-core/src/scroll-restoration-inline.ts
@@ -1,62 +1,43 @@
-export default function (options: { storageKey: string; key?: string }) {
+export default function (storageKey: string, key?: string) {
let byKey
try {
- byKey = JSON.parse(sessionStorage.getItem(options.storageKey) || '{}')
- } catch (error) {
- console.error(error)
+ byKey = JSON.parse(sessionStorage.getItem(storageKey) || '{}')
+ } catch {
return
}
- const resolvedKey = options.key || window.history.state?.__TSR_key
- const elementEntries = resolvedKey ? byKey[resolvedKey] : undefined
+ const elementEntries = byKey?.[key || history.state?.__TSR_key]
let windowRestored = false
- if (elementEntries && typeof elementEntries === 'object') {
- for (const elementSelector in elementEntries) {
- const entry = elementEntries[elementSelector]
-
- if (!entry || typeof entry !== 'object') {
- continue
- }
-
- const scrollX = entry.scrollX
- const scrollY = entry.scrollY
-
- if (!Number.isFinite(scrollX) || !Number.isFinite(scrollY)) {
- continue
- }
+ for (const elementSelector in elementEntries) {
+ const entry = elementEntries[elementSelector]
+ const scrollX = entry?.scrollX
+ const scrollY = entry?.scrollY
+ if (Number.isFinite(scrollX) && Number.isFinite(scrollY)) {
if (elementSelector === 'window') {
- window.scrollTo({
- top: scrollY,
- left: scrollX,
- })
+ scrollTo(scrollX, scrollY)
windowRestored = true
} else if (elementSelector) {
- let element
-
try {
- element = document.querySelector(elementSelector)
- } catch {
- continue
- }
-
- if (element) {
- element.scrollLeft = scrollX
- element.scrollTop = scrollY
- }
+ const element = document.querySelector(elementSelector)
+ if (element) {
+ element.scrollLeft = scrollX
+ element.scrollTop = scrollY
+ }
+ } catch {}
}
}
}
if (windowRestored) return
- const hash = window.location.hash.split('#', 2)[1]
+ const hash = location.hash.slice(1)
if (hash) {
const hashScrollIntoViewOptions =
- window.history.state?.__hashScrollIntoViewOptions ?? true
+ history.state?.__hashScrollIntoViewOptions ?? true
if (hashScrollIntoViewOptions) {
const el = document.getElementById(hash)
@@ -68,5 +49,5 @@ export default function (options: { storageKey: string; key?: string }) {
return
}
- window.scrollTo({ top: 0, left: 0 })
+ scrollTo(0, 0)
}
diff --git a/packages/router-core/src/scroll-restoration-script/server.ts b/packages/router-core/src/scroll-restoration-script/server.ts
index d112f144b9..5c5ce5e734 100644
--- a/packages/router-core/src/scroll-restoration-script/server.ts
+++ b/packages/router-core/src/scroll-restoration-script/server.ts
@@ -6,25 +6,16 @@ import {
import { escapeHtml } from '../utils'
import type { AnyRouter } from '../router'
-type InlineScrollRestorationScriptOptions = {
- storageKey: string
- key?: string
-}
-
const defaultInlineScrollRestorationScript = `(${minifiedScrollRestorationScript})(${escapeHtml(
- JSON.stringify({
- storageKey,
- } satisfies InlineScrollRestorationScriptOptions),
+ JSON.stringify(storageKey),
)})`
-function getScrollRestorationScript(
- options: InlineScrollRestorationScriptOptions,
-) {
- if (options.storageKey === storageKey && options.key === undefined) {
+function getScrollRestorationScript(key?: string) {
+ if (key === undefined) {
return defaultInlineScrollRestorationScript
}
- return `(${minifiedScrollRestorationScript})(${escapeHtml(JSON.stringify(options))})`
+ return `(${minifiedScrollRestorationScript})(${escapeHtml(JSON.stringify(storageKey))},${escapeHtml(JSON.stringify(key))})`
}
export function getScrollRestorationScriptForRouter(router: AnyRouter) {
@@ -48,8 +39,5 @@ export function getScrollRestorationScriptForRouter(router: AnyRouter) {
return defaultInlineScrollRestorationScript
}
- return getScrollRestorationScript({
- storageKey,
- key: userKey,
- })
+ return getScrollRestorationScript(userKey)
}
diff --git a/packages/router-core/src/scroll-restoration.ts b/packages/router-core/src/scroll-restoration.ts
index d27ad28529..f3c67802d5 100644
--- a/packages/router-core/src/scroll-restoration.ts
+++ b/packages/router-core/src/scroll-restoration.ts
@@ -302,60 +302,51 @@ export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
}
}
- if (!shouldResetScroll) {
- return
- }
-
ignoreScroll = true
try {
const hash = event.toLocation.hash
const hashScrollIntoViewOptions =
event.toLocation.state.__hashScrollIntoViewOptions ?? true
- const action = locationHistoryActions.get(event.toLocation)
- const skipWindowRestore =
- hash &&
- hashScrollIntoViewOptions &&
- (action === 'PUSH' || action === 'REPLACE')
-
- const elementEntries = router.isScrollRestoring
- ? scrollRestorationCache[cacheKey]
- : undefined
let windowRestored = false
- if (elementEntries) {
- for (const elementSelector in elementEntries) {
- const { scrollX, scrollY } = elementEntries[elementSelector]!
+ if (shouldResetScroll) {
+ const action = locationHistoryActions.get(event.toLocation)
+ const skipWindowRestore =
+ hash &&
+ hashScrollIntoViewOptions &&
+ (action === 'PUSH' || action === 'REPLACE')
- if (elementSelector === windowScrollTarget) {
- if (skipWindowRestore) {
- continue
- }
+ const elementEntries = router.isScrollRestoring
+ ? scrollRestorationCache[cacheKey]
+ : undefined
- scrollTo({
- top: scrollY,
- left: scrollX,
- behavior,
- })
- windowRestored = true
- } else {
- const element = getElement(elementSelector)
- if (element) {
- element.scrollLeft = scrollX
- element.scrollTop = scrollY
+ if (elementEntries) {
+ for (const elementSelector in elementEntries) {
+ const { scrollX, scrollY } = elementEntries[elementSelector]!
+
+ if (elementSelector === windowScrollTarget) {
+ if (skipWindowRestore) {
+ continue
+ }
+
+ scrollTo({
+ top: scrollY,
+ left: scrollX,
+ behavior,
+ })
+ windowRestored = true
+ } else {
+ const element = getElement(elementSelector)
+ if (element) {
+ element.scrollLeft = scrollX
+ element.scrollTop = scrollY
+ }
}
}
}
- }
- if (!windowRestored) {
- if (hash) {
- if (hashScrollIntoViewOptions) {
- document
- .getElementById(hash)
- ?.scrollIntoView(hashScrollIntoViewOptions)
- }
- } else {
+ if (!windowRestored && !hash) {
const scrollOptions = {
top: 0,
left: 0,
@@ -371,6 +362,10 @@ export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
}
}
}
+
+ if (!windowRestored && hash && hashScrollIntoViewOptions) {
+ document.getElementById(hash)?.scrollIntoView(hashScrollIntoViewOptions)
+ }
} finally {
ignoreScroll = false
}
diff --git a/packages/router-core/tests/scroll-restoration-script.test.ts b/packages/router-core/tests/scroll-restoration-script.test.ts
new file mode 100644
index 0000000000..ed1f151562
--- /dev/null
+++ b/packages/router-core/tests/scroll-restoration-script.test.ts
@@ -0,0 +1,155 @@
+import { createMemoryHistory } from '@tanstack/history'
+import { afterEach, describe, expect, test, vi } from 'vitest'
+import { getScrollRestorationScriptForRouter } from '../src/scroll-restoration-script/server'
+import { BaseRootRoute, BaseRoute, storageKey } from '../src'
+import { createTestRouter } from './routerTestUtils'
+
+function createScrollRestorationRouter(getScrollRestorationKey?: () => string) {
+ const rootRoute = new BaseRootRoute({})
+ const indexRoute = new BaseRoute({
+ getParentRoute: () => rootRoute,
+ path: '/',
+ })
+
+ return createTestRouter({
+ routeTree: rootRoute.addChildren([indexRoute]),
+ history: createMemoryHistory({ initialEntries: ['/'] }),
+ isServer: true,
+ scrollRestoration: true,
+ getScrollRestorationKey,
+ })
+}
+
+function runScrollRestorationScript(script: string | null) {
+ expect(script).toBeTruthy()
+ new Function(script!)()
+}
+
+afterEach(() => {
+ window.sessionStorage.clear()
+ window.history.replaceState({}, '', '/')
+ vi.unstubAllGlobals()
+})
+
+describe('getScrollRestorationScriptForRouter', () => {
+ test('restores SSR scroll entries for a user supplied key', () => {
+ const router = createScrollRestorationRouter(() => 'custom-key')
+ const script = getScrollRestorationScriptForRouter(router)
+ const scrollTo = vi.fn()
+
+ window.history.replaceState({ __TSR_key: 'history-key' }, '', '/')
+ window.sessionStorage.setItem(
+ storageKey,
+ JSON.stringify({
+ 'custom-key': {
+ window: { scrollX: 11, scrollY: 22 },
+ },
+ 'history-key': {
+ window: { scrollX: 33, scrollY: 44 },
+ },
+ }),
+ )
+
+ vi.stubGlobal('scrollTo', scrollTo)
+
+ runScrollRestorationScript(script)
+
+ expect(scrollTo).toHaveBeenCalledWith(11, 22)
+ })
+
+ test('restores SSR scroll entries for the default history key', () => {
+ const router = createScrollRestorationRouter()
+ const script = getScrollRestorationScriptForRouter(router)
+ const scrollTo = vi.fn()
+
+ window.history.replaceState({ __TSR_key: 'history-key' }, '', '/')
+ window.sessionStorage.setItem(
+ storageKey,
+ JSON.stringify({
+ 'history-key': {
+ window: { scrollX: 33, scrollY: 44 },
+ },
+ '/': {
+ window: { scrollX: 11, scrollY: 22 },
+ },
+ }),
+ )
+
+ vi.stubGlobal('scrollTo', scrollTo)
+
+ runScrollRestorationScript(script)
+
+ expect(scrollTo).toHaveBeenCalledWith(33, 44)
+ })
+
+ test('ignores invalid serialized scroll storage', () => {
+ const router = createScrollRestorationRouter()
+ const script = getScrollRestorationScriptForRouter(router)
+ const scrollTo = vi.fn()
+
+ window.history.replaceState({ __TSR_key: 'history-key' }, '', '/')
+ window.sessionStorage.setItem(storageKey, '{')
+ vi.stubGlobal('scrollTo', scrollTo)
+
+ expect(() => runScrollRestorationScript(script)).not.toThrow()
+ expect(scrollTo).not.toHaveBeenCalled()
+ })
+
+ test('ignores malformed scroll entries and falls back to top', () => {
+ const router = createScrollRestorationRouter()
+ const script = getScrollRestorationScriptForRouter(router)
+ const scrollTo = vi.fn()
+
+ window.history.replaceState({ __TSR_key: 'history-key' }, '', '/')
+ window.sessionStorage.setItem(
+ storageKey,
+ JSON.stringify({
+ 'history-key': {
+ window: { scrollX: 'bad', scrollY: 44 },
+ '[': { scrollX: 11, scrollY: 22 },
+ empty: null,
+ },
+ }),
+ )
+ vi.stubGlobal('scrollTo', scrollTo)
+
+ expect(() => runScrollRestorationScript(script)).not.toThrow()
+ expect(scrollTo).toHaveBeenCalledWith(0, 0)
+ })
+
+ test('ignores a malformed restoration key payload and falls back to top', () => {
+ const router = createScrollRestorationRouter()
+ const script = getScrollRestorationScriptForRouter(router)
+ const scrollTo = vi.fn()
+
+ window.history.replaceState({ __TSR_key: 'history-key' }, '', '/')
+ window.sessionStorage.setItem(
+ storageKey,
+ JSON.stringify({
+ 'history-key': 'not an entry object',
+ }),
+ )
+ vi.stubGlobal('scrollTo', scrollTo)
+
+ expect(() => runScrollRestorationScript(script)).not.toThrow()
+ expect(scrollTo).toHaveBeenCalledWith(0, 0)
+ })
+
+ test('falls back safely when restoration key is missing from storage', () => {
+ const router = createScrollRestorationRouter()
+ const script = getScrollRestorationScriptForRouter(router)
+ const scrollTo = vi.fn()
+
+ window.history.replaceState({ __TSR_key: 'history-key' }, '', '/')
+ window.sessionStorage.setItem(
+ storageKey,
+ JSON.stringify({
+ 'other-key': { window: { scrollX: 1, scrollY: 2 } },
+ }),
+ )
+ vi.stubGlobal('scrollTo', scrollTo)
+
+ expect(() => runScrollRestorationScript(script)).not.toThrow()
+ expect(scrollTo).toHaveBeenCalledWith(0, 0)
+ })
+})
From 28fda1c91033e81ea935aa53f13d568137da389f Mon Sep 17 00:00:00 2001
From: Flo
Date: Thu, 21 May 2026 23:04:09 +0200
Subject: [PATCH 010/454] chore: enforce pnpm 11 (#7465)
---
package.json | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package.json b/package.json
index 41b3a29874..b9ae9d58f1 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,9 @@
"url": "git+https://github.com/TanStack/router.git"
},
"packageManager": "pnpm@11.1.0",
+ "engines": {
+ "pnpm": ">=11.0.0"
+ },
"type": "module",
"scripts": {
"cleanNodeModules": "pnpm -r exec rm -rf node_modules",
From b47b338d15deadb8dc9fbc297c39965442833c3a Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Thu, 21 May 2026 23:05:25 +0200
Subject: [PATCH 011/454] ci: Version Packages (#7467)
---
.changeset/scroll-restoration-fixes.md | 5 -
.changeset/trim-start-meta-reexports.md | 7 --
.../package.json | 4 +-
.../react/authenticated-routes/package.json | 4 +-
.../basic-default-search-params/package.json | 2 +-
.../react/basic-devtools-panel/package.json | 2 +-
examples/react/basic-file-based/package.json | 4 +-
.../basic-non-nested-devtools/package.json | 2 +-
.../basic-react-query-file-based/package.json | 4 +-
examples/react/basic-react-query/package.json | 2 +-
.../react/basic-ssr-file-based/package.json | 4 +-
.../package.json | 4 +-
.../basic-virtual-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/react/basic/package.json | 2 +-
examples/react/deferred-data/package.json | 2 +-
examples/react/i18n-paraglide/package.json | 4 +-
.../kitchen-sink-file-based/package.json | 4 +-
.../package.json | 4 +-
.../kitchen-sink-react-query/package.json | 2 +-
examples/react/kitchen-sink/package.json | 2 +-
examples/react/large-file-based/package.json | 4 +-
examples/react/location-masking/package.json | 2 +-
.../react/navigation-blocking/package.json | 2 +-
.../package.json | 4 +-
.../react/quickstart-file-based/package.json | 4 +-
.../quickstart-rspack-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/react/quickstart/package.json | 2 +-
.../router-monorepo-react-query/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../router-monorepo-simple-lazy/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../react/router-monorepo-simple/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../react/scroll-restoration/package.json | 2 +-
.../search-validator-adapters/package.json | 4 +-
examples/react/start-bare/package.json | 4 +-
examples/react/start-basic-auth/package.json | 4 +-
.../react/start-basic-authjs/package.json | 4 +-
.../react/start-basic-cloudflare/package.json | 4 +-
.../start-basic-react-query/package.json | 4 +-
.../react/start-basic-static/package.json | 6 +-
examples/react/start-basic/package.json | 4 +-
examples/react/start-bun/package.json | 6 +-
examples/react/start-clerk-basic/package.json | 4 +-
.../react/start-convex-trellaux/package.json | 4 +-
examples/react/start-counter/package.json | 4 +-
.../react/start-i18n-paraglide/package.json | 4 +-
examples/react/start-large/package.json | 4 +-
examples/react/start-material-ui/package.json | 4 +-
examples/react/start-rscs/package.json | 4 +-
.../package.json | 4 +-
.../react/start-supabase-basic/package.json | 4 +-
examples/react/start-tailwind-v4/package.json | 4 +-
examples/react/start-trellaux/package.json | 4 +-
examples/react/start-workos/package.json | 4 +-
examples/react/view-transitions/package.json | 4 +-
.../react/with-framer-motion/package.json | 2 +-
.../react/with-trpc-react-query/package.json | 4 +-
examples/react/with-trpc/package.json | 4 +-
.../package.json | 4 +-
.../solid/authenticated-routes/package.json | 4 +-
.../basic-default-search-params/package.json | 2 +-
.../solid/basic-devtools-panel/package.json | 2 +-
examples/solid/basic-file-based/package.json | 4 +-
.../basic-non-nested-devtools/package.json | 2 +-
.../basic-solid-query-file-based/package.json | 4 +-
examples/solid/basic-solid-query/package.json | 4 +-
.../solid/basic-ssr-file-based/package.json | 4 +-
.../package.json | 4 +-
.../basic-virtual-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/solid/basic/package.json | 2 +-
examples/solid/deferred-data/package.json | 2 +-
examples/solid/i18n-paraglide/package.json | 4 +-
.../kitchen-sink-file-based/package.json | 4 +-
.../package.json | 4 +-
.../kitchen-sink-solid-query/package.json | 2 +-
examples/solid/kitchen-sink/package.json | 2 +-
examples/solid/large-file-based/package.json | 4 +-
examples/solid/location-masking/package.json | 2 +-
.../solid/navigation-blocking/package.json | 2 +-
.../package.json | 4 +-
.../solid/quickstart-file-based/package.json | 4 +-
.../quickstart-rspack-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/solid/quickstart/package.json | 2 +-
.../router-monorepo-simple-lazy/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../solid/router-monorepo-simple/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../router-monorepo-solid-query/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../solid/scroll-restoration/package.json | 2 +-
.../search-validator-adapters/package.json | 4 +-
examples/solid/start-basic-auth/package.json | 4 +-
.../solid/start-basic-authjs/package.json | 4 +-
.../solid/start-basic-cloudflare/package.json | 4 +-
.../solid/start-basic-netlify/package.json | 4 +-
examples/solid/start-basic-nitro/package.json | 4 +-
.../start-basic-solid-query/package.json | 4 +-
.../solid/start-basic-static/package.json | 6 +-
examples/solid/start-basic/package.json | 4 +-
examples/solid/start-bun/package.json | 6 +-
.../start-convex-better-auth/package.json | 4 +-
examples/solid/start-counter/package.json | 4 +-
.../solid/start-i18n-paraglide/package.json | 4 +-
examples/solid/start-large/package.json | 4 +-
.../package.json | 4 +-
.../solid/start-supabase-basic/package.json | 4 +-
examples/solid/start-tailwind-v4/package.json | 4 +-
examples/solid/view-transitions/package.json | 4 +-
.../solid/with-framer-motion/package.json | 2 +-
examples/solid/with-trpc/package.json | 4 +-
.../vue/basic-file-based-jsx/package.json | 4 +-
.../vue/basic-file-based-sfc/package.json | 4 +-
examples/vue/basic/package.json | 2 +-
packages/react-router/CHANGELOG.md | 7 ++
packages/react-router/package.json | 2 +-
packages/react-start-client/CHANGELOG.md | 9 ++
packages/react-start-client/package.json | 2 +-
packages/react-start-rsc/CHANGELOG.md | 13 +++
packages/react-start-rsc/package.json | 2 +-
packages/react-start-server/CHANGELOG.md | 10 ++
packages/react-start-server/package.json | 2 +-
packages/react-start/CHANGELOG.md | 15 +++
packages/react-start/package.json | 2 +-
packages/router-cli/CHANGELOG.md | 7 ++
packages/router-cli/package.json | 2 +-
packages/router-core/CHANGELOG.md | 6 ++
packages/router-core/package.json | 2 +-
packages/router-generator/CHANGELOG.md | 7 ++
packages/router-generator/package.json | 2 +-
packages/router-plugin/CHANGELOG.md | 9 ++
packages/router-plugin/package.json | 2 +-
packages/router-vite-plugin/CHANGELOG.md | 7 ++
packages/router-vite-plugin/package.json | 2 +-
packages/solid-router/CHANGELOG.md | 7 ++
packages/solid-router/package.json | 2 +-
packages/solid-start-client/CHANGELOG.md | 9 ++
packages/solid-start-client/package.json | 2 +-
packages/solid-start-server/CHANGELOG.md | 10 ++
packages/solid-start-server/package.json | 2 +-
packages/solid-start/CHANGELOG.md | 14 +++
packages/solid-start/package.json | 2 +-
packages/start-client-core/CHANGELOG.md | 8 ++
packages/start-client-core/package.json | 2 +-
packages/start-plugin-core/CHANGELOG.md | 11 ++
packages/start-plugin-core/package.json | 2 +-
packages/start-server-core/CHANGELOG.md | 9 ++
packages/start-server-core/package.json | 2 +-
.../CHANGELOG.md | 9 ++
.../package.json | 2 +-
packages/start-storage-context/CHANGELOG.md | 7 ++
packages/start-storage-context/package.json | 2 +-
packages/vue-router/CHANGELOG.md | 7 ++
packages/vue-router/package.json | 2 +-
packages/vue-start-client/CHANGELOG.md | 9 ++
packages/vue-start-client/package.json | 2 +-
packages/vue-start-server/CHANGELOG.md | 10 ++
packages/vue-start-server/package.json | 2 +-
packages/vue-start/CHANGELOG.md | 14 +++
packages/vue-start/package.json | 2 +-
pnpm-lock.yaml | 102 +++++++++---------
165 files changed, 498 insertions(+), 296 deletions(-)
delete mode 100644 .changeset/scroll-restoration-fixes.md
delete mode 100644 .changeset/trim-start-meta-reexports.md
diff --git a/.changeset/scroll-restoration-fixes.md b/.changeset/scroll-restoration-fixes.md
deleted file mode 100644
index 65437fa5a8..0000000000
--- a/.changeset/scroll-restoration-fixes.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@tanstack/router-core': patch
----
-
-Fix hash scrolling with `resetScroll={false}`
diff --git a/.changeset/trim-start-meta-reexports.md b/.changeset/trim-start-meta-reexports.md
deleted file mode 100644
index 553324cc19..0000000000
--- a/.changeset/trim-start-meta-reexports.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-'@tanstack/react-start': patch
-'@tanstack/solid-start': patch
-'@tanstack/vue-start': patch
----
-
-Explicitly re-export public API names from `@tanstack/start-client-core` (`createServerFn`, `createMiddleware`, `createStart`, `createCsrfMiddleware`, `createIsomorphicFn`, `createClientOnlyFn`, `createServerOnlyFn`) alongside the existing `export *`. The explicit named re-exports are registered at link time (via Vite SSR's `defineExport` at `fileStartIndex`), so the namespace has these getters before any import body runs — survives the cold-start SSR cycle through user middleware where `export *` would otherwise produce a partial facade (`createMiddleware is not a function`). Workaround for vitejs/vite#22491 / #22493.
diff --git a/examples/react/authenticated-routes-firebase/package.json b/examples/react/authenticated-routes-firebase/package.json
index 21a9c8815b..7b3a074278 100644
--- a/examples/react/authenticated-routes-firebase/package.json
+++ b/examples/react/authenticated-routes-firebase/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"firebase": "^11.4.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/authenticated-routes/package.json b/examples/react/authenticated-routes/package.json
index 7a62511164..5d6760c043 100644
--- a/examples/react/authenticated-routes/package.json
+++ b/examples/react/authenticated-routes/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-default-search-params/package.json b/examples/react/basic-default-search-params/package.json
index 27531f791f..43831895f7 100644
--- a/examples/react/basic-default-search-params/package.json
+++ b/examples/react/basic-default-search-params/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-devtools-panel/package.json b/examples/react/basic-devtools-panel/package.json
index 854d41c207..c8758753e4 100644
--- a/examples/react/basic-devtools-panel/package.json
+++ b/examples/react/basic-devtools-panel/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query-devtools": "^5.67.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-file-based/package.json b/examples/react/basic-file-based/package.json
index e9724481fc..85374bead5 100644
--- a/examples/react/basic-file-based/package.json
+++ b/examples/react/basic-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-non-nested-devtools/package.json b/examples/react/basic-non-nested-devtools/package.json
index 72b70bcfe2..b19c15b245 100644
--- a/examples/react/basic-non-nested-devtools/package.json
+++ b/examples/react/basic-non-nested-devtools/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-react-query-file-based/package.json b/examples/react/basic-react-query-file-based/package.json
index 93876afaeb..171ec6bfbc 100644
--- a/examples/react/basic-react-query-file-based/package.json
+++ b/examples/react/basic-react-query-file-based/package.json
@@ -12,9 +12,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-react-query/package.json b/examples/react/basic-react-query/package.json
index bc02ca6c77..9aea2f5d26 100644
--- a/examples/react/basic-react-query/package.json
+++ b/examples/react/basic-react-query/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-ssr-file-based/package.json b/examples/react/basic-ssr-file-based/package.json
index 9e623fc7cf..a3209fad9c 100644
--- a/examples/react/basic-ssr-file-based/package.json
+++ b/examples/react/basic-ssr-file-based/package.json
@@ -11,8 +11,8 @@
"debug": "node --inspect-brk server"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/react-router": "^1.170.7",
+ "@tanstack/router-plugin": "^1.168.10",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/react/basic-ssr-streaming-file-based/package.json b/examples/react/basic-ssr-streaming-file-based/package.json
index 5cb95470c7..f5031a9971 100644
--- a/examples/react/basic-ssr-streaming-file-based/package.json
+++ b/examples/react/basic-ssr-streaming-file-based/package.json
@@ -11,8 +11,8 @@
"debug": "node --inspect-brk server"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/react-router": "^1.170.7",
+ "@tanstack/router-plugin": "^1.168.10",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/react/basic-virtual-file-based/package.json b/examples/react/basic-virtual-file-based/package.json
index 622e65315f..5b79a5caa7 100644
--- a/examples/react/basic-virtual-file-based/package.json
+++ b/examples/react/basic-virtual-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"@tanstack/virtual-file-routes": "^1.162.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-virtual-inside-file-based/package.json b/examples/react/basic-virtual-inside-file-based/package.json
index 6d4894bce5..366c64259c 100644
--- a/examples/react/basic-virtual-inside-file-based/package.json
+++ b/examples/react/basic-virtual-inside-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"@tanstack/virtual-file-routes": "^1.162.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json
index 433584bb5e..2832ce3ced 100644
--- a/examples/react/basic/package.json
+++ b/examples/react/basic/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/deferred-data/package.json b/examples/react/deferred-data/package.json
index 974433e232..5880956fa4 100644
--- a/examples/react/deferred-data/package.json
+++ b/examples/react/deferred-data/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/i18n-paraglide/package.json b/examples/react/i18n-paraglide/package.json
index 1f4b2e2af9..94dc78f731 100644
--- a/examples/react/i18n-paraglide/package.json
+++ b/examples/react/i18n-paraglide/package.json
@@ -11,8 +11,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/react-router": "^1.170.7",
+ "@tanstack/router-plugin": "^1.168.10",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"tailwindcss": "^4.2.2"
diff --git a/examples/react/kitchen-sink-file-based/package.json b/examples/react/kitchen-sink-file-based/package.json
index 8b275f41e9..19f02ef699 100644
--- a/examples/react/kitchen-sink-file-based/package.json
+++ b/examples/react/kitchen-sink-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"immer": "^10.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/kitchen-sink-react-query-file-based/package.json b/examples/react/kitchen-sink-react-query-file-based/package.json
index e342a74e57..2d9bb2f2b9 100644
--- a/examples/react/kitchen-sink-react-query-file-based/package.json
+++ b/examples/react/kitchen-sink-react-query-file-based/package.json
@@ -12,9 +12,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"immer": "^10.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/kitchen-sink-react-query/package.json b/examples/react/kitchen-sink-react-query/package.json
index dffab36cec..1501cecbee 100644
--- a/examples/react/kitchen-sink-react-query/package.json
+++ b/examples/react/kitchen-sink-react-query/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"immer": "^10.1.1",
"react": "^19.0.0",
diff --git a/examples/react/kitchen-sink/package.json b/examples/react/kitchen-sink/package.json
index dc54780d28..fc45d06fe1 100644
--- a/examples/react/kitchen-sink/package.json
+++ b/examples/react/kitchen-sink/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"immer": "^10.1.1",
"react": "^19.0.0",
diff --git a/examples/react/large-file-based/package.json b/examples/react/large-file-based/package.json
index 11dce4e36a..974113a391 100644
--- a/examples/react/large-file-based/package.json
+++ b/examples/react/large-file-based/package.json
@@ -13,9 +13,9 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/location-masking/package.json b/examples/react/location-masking/package.json
index cf2851838b..f61ddb727a 100644
--- a/examples/react/location-masking/package.json
+++ b/examples/react/location-masking/package.json
@@ -12,7 +12,7 @@
"@radix-ui/react-dialog": "^1.1.6",
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/navigation-blocking/package.json b/examples/react/navigation-blocking/package.json
index 8e24813227..ee7c99fe78 100644
--- a/examples/react/navigation-blocking/package.json
+++ b/examples/react/navigation-blocking/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/quickstart-esbuild-file-based/package.json b/examples/react/quickstart-esbuild-file-based/package.json
index 68ed792010..4d4fb95ba0 100644
--- a/examples/react/quickstart-esbuild-file-based/package.json
+++ b/examples/react/quickstart-esbuild-file-based/package.json
@@ -9,9 +9,9 @@
"start": "dev"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/quickstart-file-based/package.json b/examples/react/quickstart-file-based/package.json
index 90e716792f..2aaa7fd96d 100644
--- a/examples/react/quickstart-file-based/package.json
+++ b/examples/react/quickstart-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/quickstart-rspack-file-based/package.json b/examples/react/quickstart-rspack-file-based/package.json
index 0438ca911e..d93ded851f 100644
--- a/examples/react/quickstart-rspack-file-based/package.json
+++ b/examples/react/quickstart-rspack-file-based/package.json
@@ -9,7 +9,7 @@
},
"dependencies": {
"@tailwindcss/postcss": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"postcss": "^8.5.1",
"react": "^19.0.0",
@@ -19,7 +19,7 @@
"devDependencies": {
"@rsbuild/core": "^2.0.1",
"@rsbuild/plugin-react": "^2.0.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"typescript": "^6.0.2"
diff --git a/examples/react/quickstart-webpack-file-based/package.json b/examples/react/quickstart-webpack-file-based/package.json
index 5781a412c2..5cdf1393f3 100644
--- a/examples/react/quickstart-webpack-file-based/package.json
+++ b/examples/react/quickstart-webpack-file-based/package.json
@@ -7,14 +7,14 @@
"build": "webpack build && tsc --noEmit"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@swc/core": "^1.15.33",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"html-webpack-plugin": "^5.6.3",
diff --git a/examples/react/quickstart/package.json b/examples/react/quickstart/package.json
index 77a0372a8c..0955251b25 100644
--- a/examples/react/quickstart/package.json
+++ b/examples/react/quickstart/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/router-monorepo-react-query/package.json b/examples/react/router-monorepo-react-query/package.json
index b58241b232..f5634f9169 100644
--- a/examples/react/router-monorepo-react-query/package.json
+++ b/examples/react/router-monorepo-react-query/package.json
@@ -12,9 +12,9 @@
"dependencies": {
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-react-query/packages/router/package.json b/examples/react/router-monorepo-react-query/packages/router/package.json
index cc86a9309f..28302cd17c 100644
--- a/examples/react/router-monorepo-react-query/packages/router/package.json
+++ b/examples/react/router-monorepo-react-query/packages/router/package.json
@@ -11,8 +11,8 @@
"@router-mono-react-query/post-query": "workspace:*",
"@tanstack/history": "^1.162.0",
"@tanstack/react-query": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/react-router": "^1.170.7",
+ "@tanstack/router-plugin": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/router-monorepo-simple-lazy/package.json b/examples/react/router-monorepo-simple-lazy/package.json
index af667c40e9..ef367778e7 100644
--- a/examples/react/router-monorepo-simple-lazy/package.json
+++ b/examples/react/router-monorepo-simple-lazy/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-simple-lazy/packages/router/package.json b/examples/react/router-monorepo-simple-lazy/packages/router/package.json
index 0dfa971f2f..79e7eb8892 100644
--- a/examples/react/router-monorepo-simple-lazy/packages/router/package.json
+++ b/examples/react/router-monorepo-simple-lazy/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.0",
- "@tanstack/react-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/react-router": "^1.170.7",
+ "@tanstack/router-plugin": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/router-monorepo-simple/package.json b/examples/react/router-monorepo-simple/package.json
index 9cfcf358dd..f3acaab8b7 100644
--- a/examples/react/router-monorepo-simple/package.json
+++ b/examples/react/router-monorepo-simple/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-simple/packages/router/package.json b/examples/react/router-monorepo-simple/packages/router/package.json
index b4d409d39e..9a06dffdee 100644
--- a/examples/react/router-monorepo-simple/packages/router/package.json
+++ b/examples/react/router-monorepo-simple/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.0",
- "@tanstack/react-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/react-router": "^1.170.7",
+ "@tanstack/router-plugin": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/scroll-restoration/package.json b/examples/react/scroll-restoration/package.json
index 33377e13ef..849a3d6aae 100644
--- a/examples/react/scroll-restoration/package.json
+++ b/examples/react/scroll-restoration/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-virtual": "^3.13.0",
"react": "^19.0.0",
diff --git a/examples/react/search-validator-adapters/package.json b/examples/react/search-validator-adapters/package.json
index 58e79f3adf..4da5d7ce73 100644
--- a/examples/react/search-validator-adapters/package.json
+++ b/examples/react/search-validator-adapters/package.json
@@ -13,9 +13,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/arktype-adapter": "^1.167.0",
"@tanstack/react-query": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"@tanstack/valibot-adapter": "^1.167.0",
"@tanstack/zod-adapter": "^1.167.0",
"arktype": "^2.1.7",
diff --git a/examples/react/start-bare/package.json b/examples/react/start-bare/package.json
index bacc981df1..5769b2669e 100644
--- a/examples/react/start-bare/package.json
+++ b/examples/react/start-bare/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-basic-auth/package.json b/examples/react/start-basic-auth/package.json
index 6d15a71181..265058b484 100644
--- a/examples/react/start-basic-auth/package.json
+++ b/examples/react/start-basic-auth/package.json
@@ -14,9 +14,9 @@
"@libsql/client": "^0.15.15",
"@prisma/adapter-libsql": "^7.0.0",
"@prisma/client": "^7.0.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-authjs/package.json b/examples/react/start-basic-authjs/package.json
index 00b337dd94..11b20b8a98 100644
--- a/examples/react/start-basic-authjs/package.json
+++ b/examples/react/start-basic-authjs/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@auth/core": "^0.41.1",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"start-authjs": "^1.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/start-basic-cloudflare/package.json b/examples/react/start-basic-cloudflare/package.json
index a615953ed9..0325cf9bee 100644
--- a/examples/react/start-basic-cloudflare/package.json
+++ b/examples/react/start-basic-cloudflare/package.json
@@ -12,9 +12,9 @@
"postinstall": "npm run cf-typegen"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-basic-react-query/package.json b/examples/react/start-basic-react-query/package.json
index f072370532..e304e6ba4f 100644
--- a/examples/react/start-basic-react-query/package.json
+++ b/examples/react/start-basic-react-query/package.json
@@ -12,10 +12,10 @@
"dependencies": {
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-static/package.json b/examples/react/start-basic-static/package.json
index 7147a5d22e..a30f58bc3c 100644
--- a/examples/react/start-basic-static/package.json
+++ b/examples/react/start-basic-static/package.json
@@ -10,10 +10,10 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
- "@tanstack/start-static-server-functions": "^1.167.6",
+ "@tanstack/react-start": "^1.168.10",
+ "@tanstack/start-static-server-functions": "^1.167.7",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/start-basic/package.json b/examples/react/start-basic/package.json
index 83edf4dad6..46ebdceed5 100644
--- a/examples/react/start-basic/package.json
+++ b/examples/react/start-basic/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^2.6.0",
diff --git a/examples/react/start-bun/package.json b/examples/react/start-bun/package.json
index 4a2bbe87ae..6942868d32 100644
--- a/examples/react/start-bun/package.json
+++ b/examples/react/start-bun/package.json
@@ -15,11 +15,11 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-devtools": "^0.7.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
+ "@tanstack/router-plugin": "^1.168.10",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"tailwindcss": "^4.2.2"
diff --git a/examples/react/start-clerk-basic/package.json b/examples/react/start-clerk-basic/package.json
index f597c066c9..349cfc25c6 100644
--- a/examples/react/start-clerk-basic/package.json
+++ b/examples/react/start-clerk-basic/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@clerk/tanstack-react-start": "^0.27.14",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/start-convex-trellaux/package.json b/examples/react/start-convex-trellaux/package.json
index 976172e41c..dbcc8dc955 100644
--- a/examples/react/start-convex-trellaux/package.json
+++ b/examples/react/start-convex-trellaux/package.json
@@ -15,10 +15,10 @@
"@convex-dev/react-query": "0.0.0-alpha.8",
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"concurrently": "^8.2.2",
"convex": "^1.19.0",
"ky": "^1.7.4",
diff --git a/examples/react/start-counter/package.json b/examples/react/start-counter/package.json
index 3590f6a2c1..4a4ec7814f 100644
--- a/examples/react/start-counter/package.json
+++ b/examples/react/start-counter/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-i18n-paraglide/package.json b/examples/react/start-i18n-paraglide/package.json
index 9a5c30e834..901d572d73 100644
--- a/examples/react/start-i18n-paraglide/package.json
+++ b/examples/react/start-i18n-paraglide/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tanstack/react-devtools": "^0.7.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"react": "^19.1.1",
"react-dom": "^19.1.1"
},
diff --git a/examples/react/start-large/package.json b/examples/react/start-large/package.json
index f7aad15ad0..1676bc7223 100644
--- a/examples/react/start-large/package.json
+++ b/examples/react/start-large/package.json
@@ -13,9 +13,9 @@
},
"dependencies": {
"@tanstack/react-query": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-material-ui/package.json b/examples/react/start-material-ui/package.json
index ce8ae7f009..9cfc75556d 100644
--- a/examples/react/start-material-ui/package.json
+++ b/examples/react/start-material-ui/package.json
@@ -15,9 +15,9 @@
"@emotion/styled": "11.14.0",
"@fontsource-variable/roboto": "5.2.5",
"@mui/material": "6.4.7",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-rscs/package.json b/examples/react/start-rscs/package.json
index eed30ffe37..d0cc1b205f 100644
--- a/examples/react/start-rscs/package.json
+++ b/examples/react/start-rscs/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"dexie": "^4.0.10",
"react": "^19.2.0",
"react-dom": "^19.2.0",
diff --git a/examples/react/start-streaming-data-from-server-functions/package.json b/examples/react/start-streaming-data-from-server-functions/package.json
index 5f4aff48a8..556b6da9ef 100644
--- a/examples/react/start-streaming-data-from-server-functions/package.json
+++ b/examples/react/start-streaming-data-from-server-functions/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-supabase-basic/package.json b/examples/react/start-supabase-basic/package.json
index a58ff5770f..749b990efa 100644
--- a/examples/react/start-supabase-basic/package.json
+++ b/examples/react/start-supabase-basic/package.json
@@ -15,9 +15,9 @@
"dependencies": {
"@supabase/ssr": "^0.5.2",
"@supabase/supabase-js": "^2.48.1",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/start-tailwind-v4/package.json b/examples/react/start-tailwind-v4/package.json
index 38e7ea8b29..c0e476418f 100644
--- a/examples/react/start-tailwind-v4/package.json
+++ b/examples/react/start-tailwind-v4/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^2.6.0",
diff --git a/examples/react/start-trellaux/package.json b/examples/react/start-trellaux/package.json
index 8801848bf5..ad542d3cd5 100644
--- a/examples/react/start-trellaux/package.json
+++ b/examples/react/start-trellaux/package.json
@@ -12,10 +12,10 @@
"dependencies": {
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"ky": "^1.7.4",
"msw": "^2.7.0",
"react": "^19.0.0",
diff --git a/examples/react/start-workos/package.json b/examples/react/start-workos/package.json
index d4e47c1dc4..58f03a74ce 100644
--- a/examples/react/start-workos/package.json
+++ b/examples/react/start-workos/package.json
@@ -14,9 +14,9 @@
"license": "MIT",
"dependencies": {
"@radix-ui/themes": "^3.3.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.9",
+ "@tanstack/react-start": "^1.168.10",
"@workos/authkit-tanstack-react-start": "^0.5.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
diff --git a/examples/react/view-transitions/package.json b/examples/react/view-transitions/package.json
index 0e92117f97..3b9e3d268d 100644
--- a/examples/react/view-transitions/package.json
+++ b/examples/react/view-transitions/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/with-framer-motion/package.json b/examples/react/with-framer-motion/package.json
index d173aae1de..2d30567c43 100644
--- a/examples/react/with-framer-motion/package.json
+++ b/examples/react/with-framer-motion/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
"framer-motion": "^11.18.2",
"react": "^19.0.0",
diff --git a/examples/react/with-trpc-react-query/package.json b/examples/react/with-trpc-react-query/package.json
index cb1608d697..04b7365467 100644
--- a/examples/react/with-trpc-react-query/package.json
+++ b/examples/react/with-trpc-react-query/package.json
@@ -13,9 +13,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
"@trpc/tanstack-react-query": "^11.4.3",
diff --git a/examples/react/with-trpc/package.json b/examples/react/with-trpc/package.json
index 12117ba578..ef29ffd115 100644
--- a/examples/react/with-trpc/package.json
+++ b/examples/react/with-trpc/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.6",
+ "@tanstack/react-router": "^1.170.7",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
"express": "^5.2.1",
diff --git a/examples/solid/authenticated-routes-firebase/package.json b/examples/solid/authenticated-routes-firebase/package.json
index e18731f7d1..39f6adef65 100644
--- a/examples/solid/authenticated-routes-firebase/package.json
+++ b/examples/solid/authenticated-routes-firebase/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.9",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.10",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"firebase": "^11.4.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/authenticated-routes/package.json b/examples/solid/authenticated-routes/package.json
index c1448d950c..608c44d322 100644
--- a/examples/solid/authenticated-routes/package.json
+++ b/examples/solid/authenticated-routes/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.9",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.10",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-default-search-params/package.json b/examples/solid/basic-default-search-params/package.json
index f8372e728a..f8024e8874 100644
--- a/examples/solid/basic-default-search-params/package.json
+++ b/examples/solid/basic-default-search-params/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-devtools-panel/package.json b/examples/solid/basic-devtools-panel/package.json
index f4dd3e7ba2..015d293668 100644
--- a/examples/solid/basic-devtools-panel/package.json
+++ b/examples/solid/basic-devtools-panel/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-file-based/package.json b/examples/solid/basic-file-based/package.json
index d1a0ddd8e9..a84de115c7 100644
--- a/examples/solid/basic-file-based/package.json
+++ b/examples/solid/basic-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
@@ -18,7 +18,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/basic-non-nested-devtools/package.json b/examples/solid/basic-non-nested-devtools/package.json
index ae0339ffe6..55f3cec37e 100644
--- a/examples/solid/basic-non-nested-devtools/package.json
+++ b/examples/solid/basic-non-nested-devtools/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-solid-query-file-based/package.json b/examples/solid/basic-solid-query-file-based/package.json
index 11279fc796..f7da4beede 100644
--- a/examples/solid/basic-solid-query-file-based/package.json
+++ b/examples/solid/basic-solid-query-file-based/package.json
@@ -13,7 +13,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
@@ -21,7 +21,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/basic-solid-query/package.json b/examples/solid/basic-solid-query/package.json
index 48e9a7aa83..e7d42e6c59 100644
--- a/examples/solid/basic-solid-query/package.json
+++ b/examples/solid/basic-solid-query/package.json
@@ -12,14 +12,14 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/basic-ssr-file-based/package.json b/examples/solid/basic-ssr-file-based/package.json
index ef4c3ea7fb..bd37d3a99a 100644
--- a/examples/solid/basic-ssr-file-based/package.json
+++ b/examples/solid/basic-ssr-file-based/package.json
@@ -11,8 +11,8 @@
"debug": "node --inspect-brk server"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/solid-router": "^1.170.7",
+ "@tanstack/router-plugin": "^1.168.10",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/solid/basic-ssr-streaming-file-based/package.json b/examples/solid/basic-ssr-streaming-file-based/package.json
index 6b86e37fdb..0bc9299d83 100644
--- a/examples/solid/basic-ssr-streaming-file-based/package.json
+++ b/examples/solid/basic-ssr-streaming-file-based/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"compression": "^1.8.0",
"express": "^5.2.1",
@@ -24,7 +24,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"@types/express": "^5.0.6",
"typescript": "^6.0.2",
"vite": "^8.0.0",
diff --git a/examples/solid/basic-virtual-file-based/package.json b/examples/solid/basic-virtual-file-based/package.json
index cd68f1277d..377516d331 100644
--- a/examples/solid/basic-virtual-file-based/package.json
+++ b/examples/solid/basic-virtual-file-based/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.9",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.10",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/virtual-file-routes": "^1.162.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/basic-virtual-inside-file-based/package.json b/examples/solid/basic-virtual-inside-file-based/package.json
index 4f5cdc709e..267b2d154e 100644
--- a/examples/solid/basic-virtual-inside-file-based/package.json
+++ b/examples/solid/basic-virtual-inside-file-based/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.9",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.10",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/virtual-file-routes": "^1.162.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/basic/package.json b/examples/solid/basic/package.json
index c85041a038..1fa252bea0 100644
--- a/examples/solid/basic/package.json
+++ b/examples/solid/basic/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/deferred-data/package.json b/examples/solid/deferred-data/package.json
index 092484f3e0..4c31a0cc52 100644
--- a/examples/solid/deferred-data/package.json
+++ b/examples/solid/deferred-data/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/i18n-paraglide/package.json b/examples/solid/i18n-paraglide/package.json
index 652fc39124..d57145eba4 100644
--- a/examples/solid/i18n-paraglide/package.json
+++ b/examples/solid/i18n-paraglide/package.json
@@ -11,8 +11,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/solid-router": "^1.170.7",
+ "@tanstack/router-plugin": "^1.168.10",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
diff --git a/examples/solid/kitchen-sink-file-based/package.json b/examples/solid/kitchen-sink-file-based/package.json
index 657f835b63..f00ef04a9d 100644
--- a/examples/solid/kitchen-sink-file-based/package.json
+++ b/examples/solid/kitchen-sink-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
@@ -19,7 +19,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/kitchen-sink-solid-query-file-based/package.json b/examples/solid/kitchen-sink-solid-query-file-based/package.json
index 20dd44be3c..ff0a933a9b 100644
--- a/examples/solid/kitchen-sink-solid-query-file-based/package.json
+++ b/examples/solid/kitchen-sink-solid-query-file-based/package.json
@@ -10,10 +10,10 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
diff --git a/examples/solid/kitchen-sink-solid-query/package.json b/examples/solid/kitchen-sink-solid-query/package.json
index 59b81bf06e..bb2efeaa42 100644
--- a/examples/solid/kitchen-sink-solid-query/package.json
+++ b/examples/solid/kitchen-sink-solid-query/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
diff --git a/examples/solid/kitchen-sink/package.json b/examples/solid/kitchen-sink/package.json
index 9026efa9a9..655e101bf9 100644
--- a/examples/solid/kitchen-sink/package.json
+++ b/examples/solid/kitchen-sink/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
diff --git a/examples/solid/large-file-based/package.json b/examples/solid/large-file-based/package.json
index 285809df67..df824101a8 100644
--- a/examples/solid/large-file-based/package.json
+++ b/examples/solid/large-file-based/package.json
@@ -12,9 +12,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/location-masking/package.json b/examples/solid/location-masking/package.json
index 67b24a4862..79389e7215 100644
--- a/examples/solid/location-masking/package.json
+++ b/examples/solid/location-masking/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
diff --git a/examples/solid/navigation-blocking/package.json b/examples/solid/navigation-blocking/package.json
index 485379a908..3c59df46c8 100644
--- a/examples/solid/navigation-blocking/package.json
+++ b/examples/solid/navigation-blocking/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
diff --git a/examples/solid/quickstart-esbuild-file-based/package.json b/examples/solid/quickstart-esbuild-file-based/package.json
index 630f835f17..a3d76bbf47 100644
--- a/examples/solid/quickstart-esbuild-file-based/package.json
+++ b/examples/solid/quickstart-esbuild-file-based/package.json
@@ -9,8 +9,8 @@
"start": "dev"
},
"dependencies": {
- "@tanstack/router-plugin": "^1.168.9",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.10",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/quickstart-file-based/package.json b/examples/solid/quickstart-file-based/package.json
index 3e056decf3..5ed22a5ddd 100644
--- a/examples/solid/quickstart-file-based/package.json
+++ b/examples/solid/quickstart-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
@@ -18,7 +18,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/quickstart-rspack-file-based/package.json b/examples/solid/quickstart-rspack-file-based/package.json
index 53b55d946e..75d53fdb5c 100644
--- a/examples/solid/quickstart-rspack-file-based/package.json
+++ b/examples/solid/quickstart-rspack-file-based/package.json
@@ -9,7 +9,7 @@
},
"dependencies": {
"@tailwindcss/postcss": "^4.2.2",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"postcss": "^8.5.1",
"solid-js": "^1.9.10",
@@ -19,7 +19,7 @@
"@rsbuild/core": "^2.0.1",
"@rsbuild/plugin-babel": "^1.1.2",
"@rsbuild/plugin-solid": "^1.1.1",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"typescript": "^6.0.2"
}
}
diff --git a/examples/solid/quickstart-webpack-file-based/package.json b/examples/solid/quickstart-webpack-file-based/package.json
index 51d0d3198c..04c919701e 100644
--- a/examples/solid/quickstart-webpack-file-based/package.json
+++ b/examples/solid/quickstart-webpack-file-based/package.json
@@ -7,7 +7,7 @@
"build": "webpack build && tsc --noEmit"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
@@ -15,7 +15,7 @@
"devDependencies": {
"@babel/core": "^7.28.5",
"@babel/preset-typescript": "^7.27.1",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"babel-loader": "^10.0.0",
"babel-preset-solid": "^1.9.10",
"css-loader": "^7.1.2",
diff --git a/examples/solid/quickstart/package.json b/examples/solid/quickstart/package.json
index 4fd6978bc4..e15e2b31a9 100644
--- a/examples/solid/quickstart/package.json
+++ b/examples/solid/quickstart/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
diff --git a/examples/solid/router-monorepo-simple-lazy/package.json b/examples/solid/router-monorepo-simple-lazy/package.json
index 55b5264fb5..05dac25b08 100644
--- a/examples/solid/router-monorepo-simple-lazy/package.json
+++ b/examples/solid/router-monorepo-simple-lazy/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-simple-lazy/packages/router/package.json b/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
index 29eb3bcdf6..076394e040 100644
--- a/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
+++ b/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.0",
- "@tanstack/solid-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/solid-router": "^1.170.7",
+ "@tanstack/router-plugin": "^1.168.10",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
"solid-js": "^1.9.10"
diff --git a/examples/solid/router-monorepo-simple/package.json b/examples/solid/router-monorepo-simple/package.json
index 14096b080f..52ef7b8132 100644
--- a/examples/solid/router-monorepo-simple/package.json
+++ b/examples/solid/router-monorepo-simple/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-simple/packages/router/package.json b/examples/solid/router-monorepo-simple/packages/router/package.json
index 3db245b6fa..2e246e3b8d 100644
--- a/examples/solid/router-monorepo-simple/packages/router/package.json
+++ b/examples/solid/router-monorepo-simple/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.0",
- "@tanstack/solid-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/solid-router": "^1.170.7",
+ "@tanstack/router-plugin": "^1.168.10",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
"solid-js": "^1.9.10"
diff --git a/examples/solid/router-monorepo-solid-query/package.json b/examples/solid/router-monorepo-solid-query/package.json
index 8ebec7e21c..9400589bdc 100644
--- a/examples/solid/router-monorepo-solid-query/package.json
+++ b/examples/solid/router-monorepo-solid-query/package.json
@@ -12,9 +12,9 @@
"dependencies": {
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-solid-query/packages/router/package.json b/examples/solid/router-monorepo-solid-query/packages/router/package.json
index a4c437c94f..43a7806c9b 100644
--- a/examples/solid/router-monorepo-solid-query/packages/router/package.json
+++ b/examples/solid/router-monorepo-solid-query/packages/router/package.json
@@ -10,8 +10,8 @@
"dependencies": {
"@tanstack/history": "^1.162.0",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.6",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/solid-router": "^1.170.7",
+ "@tanstack/router-plugin": "^1.168.10",
"@router-solid-mono-solid-query/post-query": "workspace:*",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
diff --git a/examples/solid/scroll-restoration/package.json b/examples/solid/scroll-restoration/package.json
index 21eba7bb1e..0d9d2d2bb3 100644
--- a/examples/solid/scroll-restoration/package.json
+++ b/examples/solid/scroll-restoration/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/solid-virtual": "^3.13.0",
"solid-js": "^1.9.10",
diff --git a/examples/solid/search-validator-adapters/package.json b/examples/solid/search-validator-adapters/package.json
index 5dbc5f06d8..339186486c 100644
--- a/examples/solid/search-validator-adapters/package.json
+++ b/examples/solid/search-validator-adapters/package.json
@@ -13,9 +13,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/arktype-adapter": "^1.167.0",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/router-plugin": "^1.168.10",
"@tanstack/valibot-adapter": "^1.167.0",
"@tanstack/zod-adapter": "^1.167.0",
"arktype": "^2.1.7",
diff --git a/examples/solid/start-basic-auth/package.json b/examples/solid/start-basic-auth/package.json
index 2f4a93e79e..6d12e36f8f 100644
--- a/examples/solid/start-basic-auth/package.json
+++ b/examples/solid/start-basic-auth/package.json
@@ -14,9 +14,9 @@
"@libsql/client": "^0.15.15",
"@prisma/adapter-libsql": "^7.0.0",
"@prisma/client": "^7.0.0",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
+ "@tanstack/solid-start": "^1.168.10",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0"
diff --git a/examples/solid/start-basic-authjs/package.json b/examples/solid/start-basic-authjs/package.json
index 66b637460b..166f396ab4 100644
--- a/examples/solid/start-basic-authjs/package.json
+++ b/examples/solid/start-basic-authjs/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@auth/core": "^0.41.1",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
+ "@tanstack/solid-start": "^1.168.10",
"start-authjs": "^1.0.0",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0"
diff --git a/examples/solid/start-basic-cloudflare/package.json b/examples/solid/start-basic-cloudflare/package.json
index 3b42f991de..50de9d1ceb 100644
--- a/examples/solid/start-basic-cloudflare/package.json
+++ b/examples/solid/start-basic-cloudflare/package.json
@@ -12,9 +12,9 @@
"postinstall": "npm run cf-typegen"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
+ "@tanstack/solid-start": "^1.168.10",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-netlify/package.json b/examples/solid/start-basic-netlify/package.json
index 0ad1679df1..c7f92df40c 100644
--- a/examples/solid/start-basic-netlify/package.json
+++ b/examples/solid/start-basic-netlify/package.json
@@ -9,9 +9,9 @@
"preview": "vite preview"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
+ "@tanstack/solid-start": "^1.168.10",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-nitro/package.json b/examples/solid/start-basic-nitro/package.json
index 5ae48ece48..9e6dfc24df 100644
--- a/examples/solid/start-basic-nitro/package.json
+++ b/examples/solid/start-basic-nitro/package.json
@@ -9,9 +9,9 @@
"preview": "vite preview"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
+ "@tanstack/solid-start": "^1.168.10",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-solid-query/package.json b/examples/solid/start-basic-solid-query/package.json
index ec4d8261f2..d28145afd2 100644
--- a/examples/solid/start-basic-solid-query/package.json
+++ b/examples/solid/start-basic-solid-query/package.json
@@ -12,10 +12,10 @@
"dependencies": {
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/solid-router-ssr-query": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
+ "@tanstack/solid-start": "^1.168.10",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0"
diff --git a/examples/solid/start-basic-static/package.json b/examples/solid/start-basic-static/package.json
index f5dd3f9922..3e79136a06 100644
--- a/examples/solid/start-basic-static/package.json
+++ b/examples/solid/start-basic-static/package.json
@@ -10,10 +10,10 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
- "@tanstack/start-static-server-functions": "^1.167.6",
+ "@tanstack/solid-start": "^1.168.10",
+ "@tanstack/start-static-server-functions": "^1.167.7",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
"tailwind-merge": "^2.6.0"
diff --git a/examples/solid/start-basic/package.json b/examples/solid/start-basic/package.json
index 2997b8b19c..2aa1e97178 100644
--- a/examples/solid/start-basic/package.json
+++ b/examples/solid/start-basic/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
+ "@tanstack/solid-start": "^1.168.10",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0"
diff --git a/examples/solid/start-bun/package.json b/examples/solid/start-bun/package.json
index 51c41ea0c3..716fd1b922 100644
--- a/examples/solid/start-bun/package.json
+++ b/examples/solid/start-bun/package.json
@@ -15,11 +15,11 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-devtools": "^0.7.0",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/solid-router-ssr-query": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
- "@tanstack/router-plugin": "^1.168.9",
+ "@tanstack/solid-start": "^1.168.10",
+ "@tanstack/router-plugin": "^1.168.10",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
diff --git a/examples/solid/start-convex-better-auth/package.json b/examples/solid/start-convex-better-auth/package.json
index 609ec166cd..cfcad2435e 100644
--- a/examples/solid/start-convex-better-auth/package.json
+++ b/examples/solid/start-convex-better-auth/package.json
@@ -13,9 +13,9 @@
"dependencies": {
"@convex-dev/better-auth": "^0.9.7",
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
+ "@tanstack/solid-start": "^1.168.10",
"better-auth": "^1.3.27",
"clsx": "^2.1.1",
"convex": "^1.28.2",
diff --git a/examples/solid/start-counter/package.json b/examples/solid/start-counter/package.json
index 60c7f20032..343f064bfb 100644
--- a/examples/solid/start-counter/package.json
+++ b/examples/solid/start-counter/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
+ "@tanstack/solid-start": "^1.168.10",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0",
diff --git a/examples/solid/start-i18n-paraglide/package.json b/examples/solid/start-i18n-paraglide/package.json
index 8a7d468a93..52d35137ba 100644
--- a/examples/solid/start-i18n-paraglide/package.json
+++ b/examples/solid/start-i18n-paraglide/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tanstack/solid-devtools": "^0.7.0",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
+ "@tanstack/solid-start": "^1.168.10",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-large/package.json b/examples/solid/start-large/package.json
index 226d28531a..b3b97ea54e 100644
--- a/examples/solid/start-large/package.json
+++ b/examples/solid/start-large/package.json
@@ -13,9 +13,9 @@
},
"dependencies": {
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
+ "@tanstack/solid-start": "^1.168.10",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
"tailwind-merge": "^2.6.0",
diff --git a/examples/solid/start-streaming-data-from-server-functions/package.json b/examples/solid/start-streaming-data-from-server-functions/package.json
index 2dcf10232b..b83914d209 100644
--- a/examples/solid/start-streaming-data-from-server-functions/package.json
+++ b/examples/solid/start-streaming-data-from-server-functions/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
+ "@tanstack/solid-start": "^1.168.10",
"solid-js": "^1.9.10",
"zod": "^4.4.3"
},
diff --git a/examples/solid/start-supabase-basic/package.json b/examples/solid/start-supabase-basic/package.json
index 7ddbc3cf9d..cd65ab13a4 100644
--- a/examples/solid/start-supabase-basic/package.json
+++ b/examples/solid/start-supabase-basic/package.json
@@ -14,9 +14,9 @@
"dependencies": {
"@supabase/ssr": "^0.5.2",
"@supabase/supabase-js": "^2.48.1",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
+ "@tanstack/solid-start": "^1.168.10",
"solid-js": "^1.9.9",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/start-tailwind-v4/package.json b/examples/solid/start-tailwind-v4/package.json
index 27f1b5b26e..1d602467e5 100644
--- a/examples/solid/start-tailwind-v4/package.json
+++ b/examples/solid/start-tailwind-v4/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.9",
+ "@tanstack/solid-start": "^1.168.10",
"solid-js": "^1.9.10",
"tailwind-merge": "^2.6.0",
"zod": "^4.4.3"
diff --git a/examples/solid/view-transitions/package.json b/examples/solid/view-transitions/package.json
index 27693bd4a2..998b9a249d 100644
--- a/examples/solid/view-transitions/package.json
+++ b/examples/solid/view-transitions/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.9",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.10",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/with-framer-motion/package.json b/examples/solid/with-framer-motion/package.json
index c86a33fb4e..b3a581bd66 100644
--- a/examples/solid/with-framer-motion/package.json
+++ b/examples/solid/with-framer-motion/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/with-trpc/package.json b/examples/solid/with-trpc/package.json
index 74dd33762c..01c784bcec 100644
--- a/examples/solid/with-trpc/package.json
+++ b/examples/solid/with-trpc/package.json
@@ -11,8 +11,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.9",
- "@tanstack/solid-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.10",
+ "@tanstack/solid-router": "^1.170.7",
"@tanstack/solid-router-devtools": "^1.167.0",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
diff --git a/examples/vue/basic-file-based-jsx/package.json b/examples/vue/basic-file-based-jsx/package.json
index 8546ed5364..7c85396b78 100644
--- a/examples/vue/basic-file-based-jsx/package.json
+++ b/examples/vue/basic-file-based-jsx/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.9",
- "@tanstack/vue-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.10",
+ "@tanstack/vue-router": "^1.170.7",
"@tanstack/vue-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"tailwindcss": "^4.2.2",
diff --git a/examples/vue/basic-file-based-sfc/package.json b/examples/vue/basic-file-based-sfc/package.json
index 997861eab8..299b4c5489 100644
--- a/examples/vue/basic-file-based-sfc/package.json
+++ b/examples/vue/basic-file-based-sfc/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.9",
- "@tanstack/vue-router": "^1.170.6",
+ "@tanstack/router-plugin": "^1.168.10",
+ "@tanstack/vue-router": "^1.170.7",
"@tanstack/vue-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"tailwindcss": "^4.2.2",
diff --git a/examples/vue/basic/package.json b/examples/vue/basic/package.json
index 9e1a9b689b..b45c7876d2 100644
--- a/examples/vue/basic/package.json
+++ b/examples/vue/basic/package.json
@@ -9,7 +9,7 @@
"start": "vite"
},
"dependencies": {
- "@tanstack/vue-router": "^1.170.6",
+ "@tanstack/vue-router": "^1.170.7",
"@tanstack/vue-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
"vue": "^3.5.13",
diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md
index bea372a8a9..bd35c02837 100644
--- a/packages/react-router/CHANGELOG.md
+++ b/packages/react-router/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/react-router
+## 1.170.7
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+
## 1.170.6
### Patch Changes
diff --git a/packages/react-router/package.json b/packages/react-router/package.json
index b99802acff..f735bc50f4 100644
--- a/packages/react-router/package.json
+++ b/packages/react-router/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-router",
- "version": "1.170.6",
+ "version": "1.170.7",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start-client/CHANGELOG.md b/packages/react-start-client/CHANGELOG.md
index 8e18c4090c..26fbc925dd 100644
--- a/packages/react-start-client/CHANGELOG.md
+++ b/packages/react-start-client/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/react-start-client
+## 1.168.2
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+ - @tanstack/react-router@1.170.7
+ - @tanstack/start-client-core@1.170.2
+
## 1.168.1
### Patch Changes
diff --git a/packages/react-start-client/package.json b/packages/react-start-client/package.json
index 1cbe0f4839..d5042ecb05 100644
--- a/packages/react-start-client/package.json
+++ b/packages/react-start-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-client",
- "version": "1.168.1",
+ "version": "1.168.2",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start-rsc/CHANGELOG.md b/packages/react-start-rsc/CHANGELOG.md
index 11c5f378bc..6f5cf07518 100644
--- a/packages/react-start-rsc/CHANGELOG.md
+++ b/packages/react-start-rsc/CHANGELOG.md
@@ -1,5 +1,18 @@
# @tanstack/react-start-rsc
+## 0.1.10
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+ - @tanstack/react-router@1.170.7
+ - @tanstack/react-start-server@1.167.7
+ - @tanstack/start-client-core@1.170.2
+ - @tanstack/start-plugin-core@1.171.3
+ - @tanstack/start-server-core@1.169.2
+ - @tanstack/start-storage-context@1.167.7
+
## 0.1.9
### Patch Changes
diff --git a/packages/react-start-rsc/package.json b/packages/react-start-rsc/package.json
index c6e438ea59..940ae6160e 100644
--- a/packages/react-start-rsc/package.json
+++ b/packages/react-start-rsc/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-rsc",
- "version": "0.1.9",
+ "version": "0.1.10",
"description": "React Server Components support for TanStack Start",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start-server/CHANGELOG.md b/packages/react-start-server/CHANGELOG.md
index db0285b291..0a5ce81366 100644
--- a/packages/react-start-server/CHANGELOG.md
+++ b/packages/react-start-server/CHANGELOG.md
@@ -1,5 +1,15 @@
# @tanstack/react-start-server
+## 1.167.7
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+ - @tanstack/react-router@1.170.7
+ - @tanstack/start-client-core@1.170.2
+ - @tanstack/start-server-core@1.169.2
+
## 1.167.6
### Patch Changes
diff --git a/packages/react-start-server/package.json b/packages/react-start-server/package.json
index db18d260e7..d60aad6fda 100644
--- a/packages/react-start-server/package.json
+++ b/packages/react-start-server/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-server",
- "version": "1.167.6",
+ "version": "1.167.7",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start/CHANGELOG.md b/packages/react-start/CHANGELOG.md
index d24390b0e1..8131aeb32f 100644
--- a/packages/react-start/CHANGELOG.md
+++ b/packages/react-start/CHANGELOG.md
@@ -1,5 +1,20 @@
# @tanstack/react-start
+## 1.168.10
+
+### Patch Changes
+
+- Explicitly re-export public API names from `@tanstack/start-client-core` (`createServerFn`, `createMiddleware`, `createStart`, `createCsrfMiddleware`, `createIsomorphicFn`, `createClientOnlyFn`, `createServerOnlyFn`) alongside the existing `export *`. The explicit named re-exports are registered at link time (via Vite SSR's `defineExport` at `fileStartIndex`), so the namespace has these getters before any import body runs — survives the cold-start SSR cycle through user middleware where `export *` would otherwise produce a partial facade (`createMiddleware is not a function`). Workaround for vitejs/vite#22491 / #22493. ([#7466](https://github.com/TanStack/router/pull/7466))
+
+- Updated dependencies []:
+ - @tanstack/react-router@1.170.7
+ - @tanstack/react-start-client@1.168.2
+ - @tanstack/react-start-rsc@0.1.10
+ - @tanstack/react-start-server@1.167.7
+ - @tanstack/start-client-core@1.170.2
+ - @tanstack/start-plugin-core@1.171.3
+ - @tanstack/start-server-core@1.169.2
+
## 1.168.9
### Patch Changes
diff --git a/packages/react-start/package.json b/packages/react-start/package.json
index 2810e22ed0..18fee1a4b2 100644
--- a/packages/react-start/package.json
+++ b/packages/react-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start",
- "version": "1.168.9",
+ "version": "1.168.10",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-cli/CHANGELOG.md b/packages/router-cli/CHANGELOG.md
index eec511f6cc..6b273fc576 100644
--- a/packages/router-cli/CHANGELOG.md
+++ b/packages/router-cli/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-cli
+## 1.167.9
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/router-generator@1.167.9
+
## 1.167.8
### Patch Changes
diff --git a/packages/router-cli/package.json b/packages/router-cli/package.json
index 284ed99aae..82a397cbc0 100644
--- a/packages/router-cli/package.json
+++ b/packages/router-cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-cli",
- "version": "1.167.8",
+ "version": "1.167.9",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-core/CHANGELOG.md b/packages/router-core/CHANGELOG.md
index a0e796a694..8756070092 100644
--- a/packages/router-core/CHANGELOG.md
+++ b/packages/router-core/CHANGELOG.md
@@ -1,5 +1,11 @@
# @tanstack/router-core
+## 1.171.5
+
+### Patch Changes
+
+- Fix hash scrolling with `resetScroll={false}` ([#7464](https://github.com/TanStack/router/pull/7464))
+
## 1.171.4
### Patch Changes
diff --git a/packages/router-core/package.json b/packages/router-core/package.json
index f1ab6b7c36..6376d69647 100644
--- a/packages/router-core/package.json
+++ b/packages/router-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-core",
- "version": "1.171.4",
+ "version": "1.171.5",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-generator/CHANGELOG.md b/packages/router-generator/CHANGELOG.md
index a8092b3184..dfb7c26498 100644
--- a/packages/router-generator/CHANGELOG.md
+++ b/packages/router-generator/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-generator
+## 1.167.9
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+
## 1.167.8
### Patch Changes
diff --git a/packages/router-generator/package.json b/packages/router-generator/package.json
index a51436ea0f..dc2eb65d49 100644
--- a/packages/router-generator/package.json
+++ b/packages/router-generator/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-generator",
- "version": "1.167.8",
+ "version": "1.167.9",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-plugin/CHANGELOG.md b/packages/router-plugin/CHANGELOG.md
index 38b98d8516..a1f442f1a3 100644
--- a/packages/router-plugin/CHANGELOG.md
+++ b/packages/router-plugin/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/router-plugin
+## 1.168.10
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+ - @tanstack/react-router@1.170.7
+ - @tanstack/router-generator@1.167.9
+
## 1.168.9
### Patch Changes
diff --git a/packages/router-plugin/package.json b/packages/router-plugin/package.json
index 5b75d94871..062265a568 100644
--- a/packages/router-plugin/package.json
+++ b/packages/router-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-plugin",
- "version": "1.168.9",
+ "version": "1.168.10",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-vite-plugin/CHANGELOG.md b/packages/router-vite-plugin/CHANGELOG.md
index 72bab17f8f..cdea82bdcd 100644
--- a/packages/router-vite-plugin/CHANGELOG.md
+++ b/packages/router-vite-plugin/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-vite-plugin
+## 1.167.10
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/router-plugin@1.168.10
+
## 1.167.9
### Patch Changes
diff --git a/packages/router-vite-plugin/package.json b/packages/router-vite-plugin/package.json
index c58ab15ec4..a02ec0d3cf 100644
--- a/packages/router-vite-plugin/package.json
+++ b/packages/router-vite-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-vite-plugin",
- "version": "1.167.9",
+ "version": "1.167.10",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-router/CHANGELOG.md b/packages/solid-router/CHANGELOG.md
index 2bc44aeb84..bf4dabace6 100644
--- a/packages/solid-router/CHANGELOG.md
+++ b/packages/solid-router/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/solid-router
+## 1.170.7
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+
## 1.170.6
### Patch Changes
diff --git a/packages/solid-router/package.json b/packages/solid-router/package.json
index fab2f1156d..db66179d3f 100644
--- a/packages/solid-router/package.json
+++ b/packages/solid-router/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-router",
- "version": "1.170.6",
+ "version": "1.170.7",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-start-client/CHANGELOG.md b/packages/solid-start-client/CHANGELOG.md
index dcb6ed2f26..baa64a89c6 100644
--- a/packages/solid-start-client/CHANGELOG.md
+++ b/packages/solid-start-client/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/solid-start-client
+## 1.168.2
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+ - @tanstack/solid-router@1.170.7
+ - @tanstack/start-client-core@1.170.2
+
## 1.168.1
### Patch Changes
diff --git a/packages/solid-start-client/package.json b/packages/solid-start-client/package.json
index 72cfabeeb2..7ef8013301 100644
--- a/packages/solid-start-client/package.json
+++ b/packages/solid-start-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-start-client",
- "version": "1.168.1",
+ "version": "1.168.2",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-start-server/CHANGELOG.md b/packages/solid-start-server/CHANGELOG.md
index 7516a930e9..281e684c7c 100644
--- a/packages/solid-start-server/CHANGELOG.md
+++ b/packages/solid-start-server/CHANGELOG.md
@@ -1,5 +1,15 @@
# @tanstack/solid-start-server
+## 1.167.7
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+ - @tanstack/solid-router@1.170.7
+ - @tanstack/start-client-core@1.170.2
+ - @tanstack/start-server-core@1.169.2
+
## 1.167.6
### Patch Changes
diff --git a/packages/solid-start-server/package.json b/packages/solid-start-server/package.json
index c3b84e53a1..92ce0854a5 100644
--- a/packages/solid-start-server/package.json
+++ b/packages/solid-start-server/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-start-server",
- "version": "1.167.6",
+ "version": "1.167.7",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-start/CHANGELOG.md b/packages/solid-start/CHANGELOG.md
index a5f05f0878..572f7f2dc8 100644
--- a/packages/solid-start/CHANGELOG.md
+++ b/packages/solid-start/CHANGELOG.md
@@ -1,5 +1,19 @@
# @tanstack/solid-start
+## 1.168.10
+
+### Patch Changes
+
+- Explicitly re-export public API names from `@tanstack/start-client-core` (`createServerFn`, `createMiddleware`, `createStart`, `createCsrfMiddleware`, `createIsomorphicFn`, `createClientOnlyFn`, `createServerOnlyFn`) alongside the existing `export *`. The explicit named re-exports are registered at link time (via Vite SSR's `defineExport` at `fileStartIndex`), so the namespace has these getters before any import body runs — survives the cold-start SSR cycle through user middleware where `export *` would otherwise produce a partial facade (`createMiddleware is not a function`). Workaround for vitejs/vite#22491 / #22493. ([#7466](https://github.com/TanStack/router/pull/7466))
+
+- Updated dependencies []:
+ - @tanstack/solid-router@1.170.7
+ - @tanstack/solid-start-client@1.168.2
+ - @tanstack/solid-start-server@1.167.7
+ - @tanstack/start-client-core@1.170.2
+ - @tanstack/start-plugin-core@1.171.3
+ - @tanstack/start-server-core@1.169.2
+
## 1.168.9
### Patch Changes
diff --git a/packages/solid-start/package.json b/packages/solid-start/package.json
index 4c3b6c31f4..18349e8809 100644
--- a/packages/solid-start/package.json
+++ b/packages/solid-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-start",
- "version": "1.168.9",
+ "version": "1.168.10",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-client-core/CHANGELOG.md b/packages/start-client-core/CHANGELOG.md
index e96f796396..4210caa46e 100644
--- a/packages/start-client-core/CHANGELOG.md
+++ b/packages/start-client-core/CHANGELOG.md
@@ -1,5 +1,13 @@
# @tanstack/start-client-core
+## 1.170.2
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+ - @tanstack/start-storage-context@1.167.7
+
## 1.170.1
### Patch Changes
diff --git a/packages/start-client-core/package.json b/packages/start-client-core/package.json
index 083628d55b..767ce3ce67 100644
--- a/packages/start-client-core/package.json
+++ b/packages/start-client-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-client-core",
- "version": "1.170.1",
+ "version": "1.170.2",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-plugin-core/CHANGELOG.md b/packages/start-plugin-core/CHANGELOG.md
index a5be524fa0..ef19cf2c37 100644
--- a/packages/start-plugin-core/CHANGELOG.md
+++ b/packages/start-plugin-core/CHANGELOG.md
@@ -1,5 +1,16 @@
# @tanstack/start-plugin-core
+## 1.171.3
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+ - @tanstack/router-generator@1.167.9
+ - @tanstack/router-plugin@1.168.10
+ - @tanstack/start-client-core@1.170.2
+ - @tanstack/start-server-core@1.169.2
+
## 1.171.2
### Patch Changes
diff --git a/packages/start-plugin-core/package.json b/packages/start-plugin-core/package.json
index 57c29e4b0d..f69986821d 100644
--- a/packages/start-plugin-core/package.json
+++ b/packages/start-plugin-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-plugin-core",
- "version": "1.171.2",
+ "version": "1.171.3",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-server-core/CHANGELOG.md b/packages/start-server-core/CHANGELOG.md
index 4920f0ef46..e90a1d992b 100644
--- a/packages/start-server-core/CHANGELOG.md
+++ b/packages/start-server-core/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/start-server-core
+## 1.169.2
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+ - @tanstack/start-client-core@1.170.2
+ - @tanstack/start-storage-context@1.167.7
+
## 1.169.1
### Patch Changes
diff --git a/packages/start-server-core/package.json b/packages/start-server-core/package.json
index 4846fc5fe5..b0b992d7fc 100644
--- a/packages/start-server-core/package.json
+++ b/packages/start-server-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-server-core",
- "version": "1.169.1",
+ "version": "1.169.2",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-static-server-functions/CHANGELOG.md b/packages/start-static-server-functions/CHANGELOG.md
index 6cc3250af8..0500ee136e 100644
--- a/packages/start-static-server-functions/CHANGELOG.md
+++ b/packages/start-static-server-functions/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/start-static-server-functions
+## 1.167.7
+
+### Patch Changes
+
+- Updated dependencies [[`ce61fa2`](https://github.com/TanStack/router/commit/ce61fa2e65d70973f983ea0f03378903f7751bf5)]:
+ - @tanstack/react-start@1.168.10
+ - @tanstack/solid-start@1.168.10
+ - @tanstack/start-client-core@1.170.2
+
## 1.167.6
### Patch Changes
diff --git a/packages/start-static-server-functions/package.json b/packages/start-static-server-functions/package.json
index 492ac90c01..2dccb8d947 100644
--- a/packages/start-static-server-functions/package.json
+++ b/packages/start-static-server-functions/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-static-server-functions",
- "version": "1.167.6",
+ "version": "1.167.7",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-storage-context/CHANGELOG.md b/packages/start-storage-context/CHANGELOG.md
index 8050e83eb9..4ad11cbcf0 100644
--- a/packages/start-storage-context/CHANGELOG.md
+++ b/packages/start-storage-context/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/start-storage-context
+## 1.167.7
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+
## 1.167.6
### Patch Changes
diff --git a/packages/start-storage-context/package.json b/packages/start-storage-context/package.json
index dcc3f22dac..93e40b9e45 100644
--- a/packages/start-storage-context/package.json
+++ b/packages/start-storage-context/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-storage-context",
- "version": "1.167.6",
+ "version": "1.167.7",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-router/CHANGELOG.md b/packages/vue-router/CHANGELOG.md
index 86d1663b33..32032671b8 100644
--- a/packages/vue-router/CHANGELOG.md
+++ b/packages/vue-router/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/vue-router
+## 1.170.7
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+
## 1.170.6
### Patch Changes
diff --git a/packages/vue-router/package.json b/packages/vue-router/package.json
index 066db5b844..4b72b18105 100644
--- a/packages/vue-router/package.json
+++ b/packages/vue-router/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-router",
- "version": "1.170.6",
+ "version": "1.170.7",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-start-client/CHANGELOG.md b/packages/vue-start-client/CHANGELOG.md
index f99f3d2047..7ec64dca8d 100644
--- a/packages/vue-start-client/CHANGELOG.md
+++ b/packages/vue-start-client/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/vue-start-client
+## 1.167.7
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+ - @tanstack/start-client-core@1.170.2
+ - @tanstack/vue-router@1.170.7
+
## 1.167.6
### Patch Changes
diff --git a/packages/vue-start-client/package.json b/packages/vue-start-client/package.json
index e61575fdd5..80b3a0fc21 100644
--- a/packages/vue-start-client/package.json
+++ b/packages/vue-start-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-start-client",
- "version": "1.167.6",
+ "version": "1.167.7",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-start-server/CHANGELOG.md b/packages/vue-start-server/CHANGELOG.md
index 664ca31747..87ee426af7 100644
--- a/packages/vue-start-server/CHANGELOG.md
+++ b/packages/vue-start-server/CHANGELOG.md
@@ -1,5 +1,15 @@
# @tanstack/vue-start-server
+## 1.167.7
+
+### Patch Changes
+
+- Updated dependencies [[`5268ba4`](https://github.com/TanStack/router/commit/5268ba4566233ea58880df85f167ad0401a93a46)]:
+ - @tanstack/router-core@1.171.5
+ - @tanstack/start-client-core@1.170.2
+ - @tanstack/start-server-core@1.169.2
+ - @tanstack/vue-router@1.170.7
+
## 1.167.6
### Patch Changes
diff --git a/packages/vue-start-server/package.json b/packages/vue-start-server/package.json
index 59b70b085d..78e34320ff 100644
--- a/packages/vue-start-server/package.json
+++ b/packages/vue-start-server/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-start-server",
- "version": "1.167.6",
+ "version": "1.167.7",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-start/CHANGELOG.md b/packages/vue-start/CHANGELOG.md
index 47db2f056f..14ca04a6ad 100644
--- a/packages/vue-start/CHANGELOG.md
+++ b/packages/vue-start/CHANGELOG.md
@@ -1,5 +1,19 @@
# @tanstack/vue-start
+## 1.168.10
+
+### Patch Changes
+
+- Explicitly re-export public API names from `@tanstack/start-client-core` (`createServerFn`, `createMiddleware`, `createStart`, `createCsrfMiddleware`, `createIsomorphicFn`, `createClientOnlyFn`, `createServerOnlyFn`) alongside the existing `export *`. The explicit named re-exports are registered at link time (via Vite SSR's `defineExport` at `fileStartIndex`), so the namespace has these getters before any import body runs — survives the cold-start SSR cycle through user middleware where `export *` would otherwise produce a partial facade (`createMiddleware is not a function`). Workaround for vitejs/vite#22491 / #22493. ([#7466](https://github.com/TanStack/router/pull/7466))
+
+- Updated dependencies []:
+ - @tanstack/start-client-core@1.170.2
+ - @tanstack/start-plugin-core@1.171.3
+ - @tanstack/start-server-core@1.169.2
+ - @tanstack/vue-router@1.170.7
+ - @tanstack/vue-start-client@1.167.7
+ - @tanstack/vue-start-server@1.167.7
+
## 1.168.9
### Patch Changes
diff --git a/packages/vue-start/package.json b/packages/vue-start/package.json
index effcdbba3d..40593cc0e2 100644
--- a/packages/vue-start/package.json
+++ b/packages/vue-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-start",
- "version": "1.168.9",
+ "version": "1.168.10",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 819ae4a325..f08d5e6a7d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -10115,7 +10115,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10152,7 +10152,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10192,7 +10192,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10232,7 +10232,7 @@ importers:
specifier: ^5.99.0
version: 5.99.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10266,7 +10266,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10297,7 +10297,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10334,7 +10334,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10377,7 +10377,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.99.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10417,7 +10417,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.99.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10454,7 +10454,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
compression:
specifier: ^1.8.0
@@ -10494,7 +10494,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10549,7 +10549,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10589,7 +10589,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10626,7 +10626,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10663,7 +10663,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
solid-js:
specifier: 1.9.12
@@ -10694,7 +10694,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10731,7 +10731,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10777,7 +10777,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.99.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10823,7 +10823,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.99.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10866,7 +10866,7 @@ importers:
specifier: ^5.99.0
version: 5.99.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10903,7 +10903,7 @@ importers:
specifier: ^5.99.0
version: 5.99.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10937,7 +10937,7 @@ importers:
specifier: ^5.99.0
version: 5.99.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10968,7 +10968,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -10996,7 +10996,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11027,7 +11027,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11064,7 +11064,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11098,7 +11098,7 @@ importers:
examples/solid/quickstart-webpack-file-based:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11159,7 +11159,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11193,7 +11193,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11233,7 +11233,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.99.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11267,7 +11267,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11307,7 +11307,7 @@ importers:
specifier: ^5.99.0
version: 5.99.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11353,7 +11353,7 @@ importers:
examples/solid/start-basic:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11405,7 +11405,7 @@ importers:
specifier: ^7.0.0
version: 7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2)
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11454,7 +11454,7 @@ importers:
specifier: ^0.41.1
version: 0.41.1
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11494,7 +11494,7 @@ importers:
examples/solid/start-basic-cloudflare:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11534,7 +11534,7 @@ importers:
examples/solid/start-basic-netlify:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11571,7 +11571,7 @@ importers:
examples/solid/start-basic-nitro:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11614,7 +11614,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.99.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11657,7 +11657,7 @@ importers:
examples/solid/start-basic-static:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11709,7 +11709,7 @@ importers:
specifier: ^0.7.0
version: 0.7.14(csstype@3.2.3)(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11773,7 +11773,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11828,7 +11828,7 @@ importers:
examples/solid/start-counter:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11871,7 +11871,7 @@ importers:
specifier: ^0.7.0
version: 0.7.14(csstype@3.2.3)(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11911,7 +11911,7 @@ importers:
specifier: ^5.99.0
version: 5.99.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11954,7 +11954,7 @@ importers:
examples/solid/start-streaming-data-from-server-functions:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11991,7 +11991,7 @@ importers:
specifier: ^2.48.1
version: 2.48.1
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12028,7 +12028,7 @@ importers:
examples/solid/start-tailwind-v4:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12074,7 +12074,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12108,7 +12108,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.8.1))
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12148,7 +12148,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.6
+ specifier: ^1.170.7
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
From 31f5684aa27fdbffc918115f2eed8c7219605413 Mon Sep 17 00:00:00 2001
From: Manuel Schiller
Date: Fri, 22 May 2026 00:26:07 +0200
Subject: [PATCH 012/454] chore: only run autofix on PRs (#7469)
---
.github/workflows/autofix.yml | 2 --
1 file changed, 2 deletions(-)
diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml
index 9e2bbcc369..5d52b046d2 100644
--- a/.github/workflows/autofix.yml
+++ b/.github/workflows/autofix.yml
@@ -2,8 +2,6 @@ name: autofix.ci # needed to securely identify the workflow
on:
pull_request:
- push:
- branches: [main, alpha, beta]
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
From 51a97a167fb3ef1b8ca70fbb63db635158f43509 Mon Sep 17 00:00:00 2001
From: Manuel Schiller
Date: Sun, 24 May 2026 02:02:05 +0200
Subject: [PATCH 013/454] feat(start): support rsbuild iife client output
(#7477)
---
.changeset/gentle-pandas-clap.md | 15 +
.changeset/slow-badgers-remember.md | 10 +
docs/router/guide/document-head-management.md | 4 +-
.../framework/react/guide/cdn-asset-urls.md | 33 +-
.../framework/react/guide/early-hints.md | 1 +
.../basic-file-based/src/routeTree.gen.ts | 4 +-
e2e/react-start/basic/package.json | 8 +
e2e/react-start/basic/playwright.config.ts | 3 +
e2e/react-start/basic/start-mode-config.ts | 19 +
.../basic/tests/client-output.spec.ts | 32 +
e2e/react-start/csp/tests/csp.spec.ts | 34 +-
e2e/react-start/dev-ssr-styles/package.json | 1 +
.../dev-ssr-styles/tests/app.spec.ts | 13 +-
.../tests/hydration.spec.ts | 22 +-
.../tests/ssr-scroll-key.spec.ts | 9 +-
e2e/react-start/server-functions/package.json | 3 +-
.../playwright.rsbuild-cache.config.ts | 15 +
.../server-functions/rsbuild.config.ts | 3 +
.../tests/rsbuild-cache.spec.ts | 390 ++++++++++++
.../tests/server-functions.spec.ts | 4 +-
.../tests/start-manifest.spec.ts | 8 +-
.../src/routes/__root.tsx | 2 +-
.../transform-asset-urls/src/server.ts | 2 +-
.../tests/transform-asset-urls.spec.ts | 26 +-
e2e/solid-start/csp/tests/csp.spec.ts | 34 +-
.../tests/start-manifest.spec.ts | 8 +-
.../tests/start-manifest.spec.ts | 24 +-
packages/react-router/src/Asset.tsx | 121 ++--
packages/react-router/src/HeadContent.dev.tsx | 7 +-
packages/react-router/src/Scripts.tsx | 54 +-
.../react-router/src/headContentUtils.tsx | 402 ++++++------
packages/react-router/tests/Scripts.test.tsx | 189 +++++-
.../src/serialization.server.ts | 51 +-
packages/router-core/src/index.ts | 22 +-
packages/router-core/src/manifest.ts | 222 +++++--
packages/router-core/src/router.ts | 10 +-
.../src/ssr/createRequestHandler.ts | 11 +-
packages/router-core/src/ssr/ssr-server.ts | 392 +++++++-----
packages/router-core/tests/hydrate.test.ts | 24 +-
packages/router-core/tests/manifest.test.ts | 117 ++++
.../tests/ssr-server-manifest.test.ts | 321 ++++++++--
packages/solid-router/src/HeadContent.dev.tsx | 7 +-
packages/solid-router/src/Scripts.tsx | 89 +--
.../solid-router/src/headContentUtils.tsx | 214 +++----
packages/solid-router/tests/Scripts.test.tsx | 126 +++-
.../src/import-protection/virtualModules.ts | 10 +-
.../src/rsbuild/COMPILER_ARCHITECTURE.md | 199 ++++++
.../start-plugin-core/src/rsbuild/planning.ts | 20 +-
.../start-plugin-core/src/rsbuild/plugin.ts | 155 +++--
.../start-plugin-core/src/rsbuild/schema.ts | 18 +-
.../src/rsbuild/start-compiler-host.ts | 248 +++++++-
.../rsbuild/start-compiler-metadata-loader.ts | 22 +
.../src/rsbuild/start-compiler-metadata.ts | 20 +
.../src/rsbuild/virtual-modules.ts | 40 +-
.../start-manifest-plugin/manifestBuilder.ts | 294 ++++++---
.../src/vite/start-manifest-plugin/plugin.ts | 4 +-
.../importProtection/virtualModules.test.ts | 42 +-
.../tests/rsbuild-output-directory.test.ts | 79 ++-
.../manifestBuilder.test.ts | 595 ++++++------------
packages/start-plugin-core/vite.config.ts | 1 +
.../src/createStartHandler.ts | 1 -
packages/start-server-core/src/early-hints.ts | 48 +-
.../start-server-core/src/finalManifest.ts | 26 +-
.../start-server-core/src/request-handler.ts | 3 +-
.../start-server-core/src/router-manifest.ts | 104 +--
.../start-server-core/src/tanstack-start.d.ts | 4 +-
.../src/transformAssetUrls.ts | 253 +++++---
.../tests/early-hints.test.ts | 105 ++--
.../tests/finalManifest.test.ts | 9 +-
.../tests/transformAssets.test.ts | 410 +++++++++---
.../src/async-local-storage.ts | 6 +-
packages/vue-router/src/HeadContent.dev.tsx | 8 +-
packages/vue-router/src/HeadContent.tsx | 158 ++++-
packages/vue-router/src/Scripts.tsx | 186 +++---
packages/vue-router/src/headContentUtils.tsx | 132 ++--
packages/vue-router/tests/Scripts.test.tsx | 491 ++++++++++++++-
pnpm-lock.yaml | 3 +
77 files changed, 4794 insertions(+), 2006 deletions(-)
create mode 100644 .changeset/gentle-pandas-clap.md
create mode 100644 .changeset/slow-badgers-remember.md
create mode 100644 e2e/react-start/basic/tests/client-output.spec.ts
create mode 100644 e2e/react-start/server-functions/playwright.rsbuild-cache.config.ts
create mode 100644 e2e/react-start/server-functions/tests/rsbuild-cache.spec.ts
create mode 100644 packages/router-core/tests/manifest.test.ts
create mode 100644 packages/start-plugin-core/src/rsbuild/COMPILER_ARCHITECTURE.md
create mode 100644 packages/start-plugin-core/src/rsbuild/start-compiler-metadata-loader.ts
create mode 100644 packages/start-plugin-core/src/rsbuild/start-compiler-metadata.ts
diff --git a/.changeset/gentle-pandas-clap.md b/.changeset/gentle-pandas-clap.md
new file mode 100644
index 0000000000..e170c7fe85
--- /dev/null
+++ b/.changeset/gentle-pandas-clap.md
@@ -0,0 +1,15 @@
+---
+'@tanstack/router-core': patch
+'@tanstack/react-router': patch
+'@tanstack/solid-router': patch
+'@tanstack/vue-router': patch
+'@tanstack/start-plugin-core': patch
+'@tanstack/start-server-core': patch
+'@tanstack/react-start': patch
+'@tanstack/solid-start': patch
+'@tanstack/vue-start': patch
+---
+
+Add support for Rsbuild client output formats, including module output by default and IIFE output for classic script environments.
+
+Client entry scripts and preloads are now represented as root route manifest assets, script preloads follow the manifest script format, and script asset cross-origin configuration uses the `script` key. The `transformAssets` script callback context now exposes only `kind: 'script'` and `url`, keeping script format handling internal to manifest rendering.
diff --git a/.changeset/slow-badgers-remember.md b/.changeset/slow-badgers-remember.md
new file mode 100644
index 0000000000..4a6fb197df
--- /dev/null
+++ b/.changeset/slow-badgers-remember.md
@@ -0,0 +1,10 @@
+---
+'@tanstack/start-plugin-core': patch
+'@tanstack/react-start': patch
+'@tanstack/solid-start': patch
+'@tanstack/vue-start': patch
+---
+
+Fix Rsbuild server function metadata replay when Rspack restores modules from its persistent cache.
+
+Server function metadata is now stored on Rspack module build info and replayed from cached modules before resolver modules are rebuilt, preventing warm restarts from losing server function registrations.
diff --git a/docs/router/guide/document-head-management.md b/docs/router/guide/document-head-management.md
index 381462e20a..61770b3662 100644
--- a/docs/router/guide/document-head-management.md
+++ b/docs/router/guide/document-head-management.md
@@ -69,14 +69,14 @@ The `` component is **required** to render the head, title, meta,
It should be **rendered either in the `` tag of your root layout or as high up in the component tree as possible** if your application doesn't or can't manage the `` tag.
For manifest-managed assets, you can also set `crossorigin` values on emitted
-`modulepreload` and stylesheet links:
+script preload and stylesheet links:
```tsx
diff --git a/docs/start/framework/react/guide/cdn-asset-urls.md b/docs/start/framework/react/guide/cdn-asset-urls.md
index 183921fc6d..df43906198 100644
--- a/docs/start/framework/react/guide/cdn-asset-urls.md
+++ b/docs/start/framework/react/guide/cdn-asset-urls.md
@@ -15,9 +15,9 @@ This guide is about asset URL rewriting. For choosing CSS import patterns and co
The `transformAssets` option on `createStartHandler` rewrites URLs that Start manages in its SSR manifest:
-- `` tags for JavaScript preloads
+- JavaScript preload links (`` for module output, or `` for IIFE output)
- `` tags for manifest-managed CSS
-- The client entry module URL
+- The client entry script URL
- `url(...)` and `@import` URLs inside [inlined CSS](./css-styling#inline-route-css-in-production) when CSS URL templates are enabled
It does not rewrite every URL in your app. In particular, it does not rewrite arbitrary route `head().links` entries, including CSS imported with `?url` and returned from route `head()` functions. See [What This Does Not Rewrite](#what-this-does-not-rewrite) for the main exclusions.
@@ -75,7 +75,7 @@ export default createServerEntry({ fetch: handler })
transformAssets: {
prefix: 'https://cdn.example.com',
crossOrigin: {
- modulepreload: 'anonymous',
+ script: 'anonymous',
stylesheet: 'use-credentials',
},
}
@@ -94,13 +94,13 @@ or:
```tsx
```
-If both `transformAssets` and `assetCrossOrigin` set a cross-origin value, `assetCrossOrigin` overrides the value from `transformAssets`. `assetCrossOrigin` only applies to manifest-managed `modulepreload` and stylesheet links, not arbitrary links returned from route `head()` functions.
+If both `transformAssets` and `assetCrossOrigin` set a cross-origin value, `assetCrossOrigin` overrides the value from `transformAssets`. `assetCrossOrigin` only applies to manifest-managed script and stylesheet links, not arbitrary links returned from route `head()` functions.
## Use a Callback for Per-Asset Logic
@@ -119,7 +119,7 @@ const handler = createStartHandler({
transformAssets: (asset) => {
const href = `https://cdn.example.com${asset.url}`
- if (asset.kind === 'modulepreload') {
+ if (asset.kind === 'script') {
return {
href,
crossOrigin: 'anonymous',
@@ -135,16 +135,15 @@ export default createServerEntry({ fetch: handler })
The `kind` field tells you which asset URL is being transformed.
-| `kind` | Description |
-| ----------------- | ---------------------------------------------- |
-| `'modulepreload'` | JavaScript module preload URL |
-| `'stylesheet'` | Manifest-managed CSS stylesheet URL |
-| `'clientEntry'` | Client entry module URL |
-| `'css-url'` | `url(...)` or `@import` URL inside inlined CSS |
+| `kind` | Description |
+| -------------- | ---------------------------------------------- |
+| `'script'` | JavaScript preload or client entry script URL |
+| `'stylesheet'` | Manifest-managed CSS stylesheet URL |
+| `'css-url'` | `url(...)` or `@import` URL inside inlined CSS |
For `kind === 'css-url'`, the context also includes `stylesheetHref`, which is the manifest stylesheet href whose CSS content is being inlined.
-`crossOrigin` applies to manifest-managed link tags. For the client entry and CSS-internal URLs, returning `{ href }` is equivalent to returning a string.
+`crossOrigin` applies to manifest-managed script and stylesheet tags. For CSS-internal URLs, returning `{ href }` is equivalent to returning a string.
By default, callback results are cached after the first request in production. Use the object form with `cache: false` only when the transform depends on per-request data.
@@ -171,7 +170,7 @@ const handler = createStartHandler({
? 'https://cdn-eu.example.com'
: 'https://cdn-us.example.com'
- if (kind === 'modulepreload') {
+ if (kind === 'script') {
return {
href: `${cdnBase}${url}`,
crossOrigin: 'anonymous',
@@ -210,7 +209,7 @@ transformAssets: {
const cdnBase = await fetchCdnBaseForRegion(region)
return (asset) => {
- if (asset.kind === 'modulepreload') {
+ if (asset.kind === 'script') {
return {
href: `${cdnBase}${asset.url}`,
crossOrigin: 'anonymous',
@@ -320,7 +319,7 @@ Warmup has no effect in development mode or when `cache: false`.
## Use Relative Vite Asset Paths for Client Navigation
-`transformAssets` rewrites the URLs in the SSR HTML: modulepreload hints, stylesheet links, and the client entry module. This means the browser's initial page load can fetch those assets from the CDN.
+`transformAssets` rewrites the URLs in the SSR HTML: script preload hints, stylesheet links, and the client entry script. This means the browser's initial page load can fetch those assets from the CDN.
When users navigate client-side, TanStack Router lazy-loads route chunks using `import()` calls with paths baked in by the bundler. With Vite's default `base: '/'`, those paths are absolute, such as `/assets/about-abc123.js`, and resolve against the app server origin instead of the CDN.
@@ -336,7 +335,7 @@ export default defineConfig({
})
```
-With `base: ''`, the client entry module can be loaded from the CDN by `transformAssets`, and relative `import()` calls resolve against that same CDN origin. This keeps lazy-loaded route chunks on the CDN during client-side navigation.
+With `base: ''`, the client entry script can be loaded from the CDN by `transformAssets`, and relative `import()` calls resolve against that same CDN origin. This keeps lazy-loaded route chunks on the CDN during client-side navigation.
Using an empty string rather than `'./'` is important. Both produce relative client-side imports, but `base: ''` preserves the root-relative paths in the SSR manifest so `transformAssets` can prepend the CDN origin correctly.
diff --git a/docs/start/framework/react/guide/early-hints.md b/docs/start/framework/react/guide/early-hints.md
index 2c63bd5289..da633a84d7 100644
--- a/docs/start/framework/react/guide/early-hints.md
+++ b/docs/start/framework/react/guide/early-hints.md
@@ -165,6 +165,7 @@ Static Early Hints are collected from the final Start manifest resolved for the
- CDN URL rewrites are reflected in Early Hints.
- `crossOrigin` returned from `transformAssets` is reflected in Early Hints.
+- JavaScript hints follow the client output format: `modulepreload` for module output, or `preload; as=script` for IIFE output.
- Per-request transforms with `cache: false` are reflected in Early Hints for that request.
- Inlined CSS assets are skipped when Start's [CSS inlining](./css-styling#inline-route-css-in-production) build option inlines them into the HTML.
diff --git a/e2e/react-router/basic-file-based/src/routeTree.gen.ts b/e2e/react-router/basic-file-based/src/routeTree.gen.ts
index daf304c064..7ee0051549 100644
--- a/e2e/react-router/basic-file-based/src/routeTree.gen.ts
+++ b/e2e/react-router/basic-file-based/src/routeTree.gen.ts
@@ -780,9 +780,9 @@ const NonNestedDeepBazBarFooQuxRoute =
export interface FileRoutesByFullPath {
'/': typeof IndexRoute
- '/fullpath-test': typeof FullpathTestLayoutRouteRouteWithChildren
+ '/fullpath-test': typeof FullpathTestRouteRouteWithChildren
'/non-nested': typeof NonNestedRouteRouteWithChildren
- '/pathless-layout': typeof PathlessLayoutLayoutRouteRouteWithChildren
+ '/pathless-layout': typeof PathlessLayoutRouteRouteWithChildren
'/search-params': typeof SearchParamsRouteRouteWithChildren
'/대한민국': typeof Char45824Char54620Char48124Char44397RouteRouteWithChildren
'/anchor': typeof AnchorRoute
diff --git a/e2e/react-start/basic/package.json b/e2e/react-start/basic/package.json
index eaf648c6ab..4e0fd86ab8 100644
--- a/e2e/react-start/basic/package.json
+++ b/e2e/react-start/basic/package.json
@@ -71,6 +71,14 @@
"toolchain": "rsbuild",
"mode": "ssr"
},
+ {
+ "toolchain": "rsbuild",
+ "mode": "ssr",
+ "name": "iife",
+ "env": {
+ "TSS_RSB_CLIENT_OUTPUT": "iife"
+ }
+ },
{
"toolchain": "rsbuild",
"mode": "spa"
diff --git a/e2e/react-start/basic/playwright.config.ts b/e2e/react-start/basic/playwright.config.ts
index 5e46a2b1c7..4d92fc032d 100644
--- a/e2e/react-start/basic/playwright.config.ts
+++ b/e2e/react-start/basic/playwright.config.ts
@@ -57,6 +57,9 @@ export default defineConfig({
PORT: String(PORT),
E2E_DIST_DIR: distDir,
E2E_PORT_KEY: e2ePortKey,
+ ...(process.env.TSS_RSB_CLIENT_OUTPUT
+ ? { TSS_RSB_CLIENT_OUTPUT: process.env.TSS_RSB_CLIENT_OUTPUT }
+ : {}),
},
},
diff --git a/e2e/react-start/basic/start-mode-config.ts b/e2e/react-start/basic/start-mode-config.ts
index 3cb6db2658..efc5862eea 100644
--- a/e2e/react-start/basic/start-mode-config.ts
+++ b/e2e/react-start/basic/start-mode-config.ts
@@ -1,6 +1,18 @@
import { isPrerender } from './tests/utils/isPrerender'
import { isSpaMode } from './tests/utils/isSpaMode'
+const rsbuildClientOutput: 'module' | 'iife' | undefined = (() => {
+ const output = process.env.TSS_RSB_CLIENT_OUTPUT
+
+ if (output === undefined) return undefined
+ if (output === 'module') return 'module'
+ if (output === 'iife') return 'iife'
+
+ throw new Error(
+ `Invalid TSS_RSB_CLIENT_OUTPUT: ${output}. Expected "module" or "iife".`,
+ )
+})()
+
export function getStartModeConfig() {
return {
spa: isSpaMode
@@ -28,5 +40,12 @@ export function getStartModeConfig() {
maxRedirects: 100,
}
: undefined,
+ rsbuild: rsbuildClientOutput
+ ? {
+ client: {
+ output: rsbuildClientOutput,
+ },
+ }
+ : undefined,
}
}
diff --git a/e2e/react-start/basic/tests/client-output.spec.ts b/e2e/react-start/basic/tests/client-output.spec.ts
new file mode 100644
index 0000000000..41cf21870d
--- /dev/null
+++ b/e2e/react-start/basic/tests/client-output.spec.ts
@@ -0,0 +1,32 @@
+import { expect } from '@playwright/test'
+import { test } from '@tanstack/router-e2e-utils'
+
+test.skip(
+ process.env.TSS_RSB_CLIENT_OUTPUT !== 'iife',
+ 'IIFE client output assertions only run in rsbuild/ssr/iife mode',
+)
+
+test('SSR HTML emits IIFE client scripts and classic script preloads', async ({
+ page,
+}) => {
+ const response = await page.goto('/posts')
+ const html = await response!.text()
+
+ expect(html).not.toContain('rel="modulepreload"')
+ expect(html).toMatch(/]+rel="preload"[^>]+as="script"/)
+
+ const clientEntry = html.match(
+ /
+ return (
+
+ )
default:
return null
}
@@ -106,9 +134,11 @@ function InlineCssStyle({
function Script({
attrs,
children,
+ preventScriptHoist,
}: {
attrs?: ScriptAttrs
children?: string
+ preventScriptHoist?: boolean
}) {
const router = useRouter()
const hydrated = useHydrated()
@@ -141,36 +171,19 @@ function Script({
return attrs.src
}
})()
- const existingScript = Array.from(
- document.querySelectorAll('script[src]'),
- ).find((el) => (el as HTMLScriptElement).src === normSrc)
-
- if (existingScript) {
- return
+ for (const el of document.querySelectorAll('script[src]')) {
+ if ((el as HTMLScriptElement).src === normSrc) {
+ return
+ }
}
const script = document.createElement('script')
- for (const [key, value] of Object.entries(attrs)) {
- if (
- key !== 'suppressHydrationWarning' &&
- value !== undefined &&
- value !== false
- ) {
- script.setAttribute(
- key,
- typeof value === 'boolean' ? '' : String(value),
- )
- }
- }
+ setScriptAttrs(script, attrs)
document.head.appendChild(script)
- return () => {
- if (script.parentNode) {
- script.parentNode.removeChild(script)
- }
- }
+ return () => script.remove()
}
if (typeof children === 'string') {
@@ -178,48 +191,29 @@ function Script({
typeof attrs?.type === 'string' ? attrs.type : 'text/javascript'
const nonceAttr =
typeof attrs?.nonce === 'string' ? attrs.nonce : undefined
- const existingScript = Array.from(
- document.querySelectorAll('script:not([src])'),
- ).find((el) => {
- if (!(el instanceof HTMLScriptElement)) return false
+ for (const el of document.querySelectorAll('script:not([src])')) {
+ if (!(el instanceof HTMLScriptElement)) {
+ continue
+ }
+
const sType = el.getAttribute('type') ?? 'text/javascript'
const sNonce = el.getAttribute('nonce') ?? undefined
- return (
+ if (
el.textContent === children &&
sType === typeAttr &&
sNonce === nonceAttr
- )
- })
-
- if (existingScript) {
- return
+ ) {
+ return
+ }
}
const script = document.createElement('script')
script.textContent = children
-
- if (attrs) {
- for (const [key, value] of Object.entries(attrs)) {
- if (
- key !== 'suppressHydrationWarning' &&
- value !== undefined &&
- value !== false
- ) {
- script.setAttribute(
- key,
- typeof value === 'boolean' ? '' : String(value),
- )
- }
- }
- }
+ setScriptAttrs(script, attrs)
document.head.appendChild(script)
- return () => {
- if (script.parentNode) {
- script.parentNode.removeChild(script)
- }
- }
+ return () => script.remove()
}
return undefined
@@ -228,7 +222,20 @@ function Script({
// --- Server rendering ---
if (isServer ?? router.isServer) {
if (attrs?.src) {
- return
+ if (!preventScriptHoist) {
+ return
+ }
+
+ return (
+ `
router.serverSsr!.injectHtml(html)
},
- dehydrate: async (opts?: { requestAssets?: Array }) => {
+ dehydrate: async (opts?: { requestAssets?: ManifestRouteAssets }) => {
if (_dehydrated) {
if (process.env.NODE_ENV !== 'production') {
throw new Error('Invariant failed: router is already dehydrated!')
@@ -357,61 +480,36 @@ export function attachRouterServerSsrUtils({
const matches = matchesToDehydrate.map(dehydrateMatch)
let manifestToDehydrate: Manifest | undefined = undefined
- // For currently matched routes, send full manifest (preloads + assets).
- // For unmatched routes, include assets only when includeUnmatchedRouteAssets
- // is true; otherwise omit them entirely. Preloads for unmatched routes are
- // still excluded because they are handled via dynamic imports.
+ // Only currently matched routes are dehydrated. Other route assets are
+ // loaded through dynamic imports when those routes become active.
if (manifest) {
- // Prod-only caching; in dev manifests may be replaced/updated (HMR)
- const currentRouteIdsList = matchesToDehydrate.map((m) => m.routeId)
- const manifestCacheKey = `${currentRouteIdsList.join('\0')}\0includeUnmatchedRouteAssets=${includeUnmatchedRouteAssets}`
-
- let filteredRoutes: FilteredRoutes | undefined
-
- if (isProd) {
- filteredRoutes = getManifestCache(manifest).get(manifestCacheKey)
- }
-
- if (!filteredRoutes) {
- const currentRouteIds = new Set(currentRouteIdsList)
- const nextFilteredRoutes: FilteredRoutes = {}
-
- for (const routeId in manifest.routes) {
- const routeManifest = manifest.routes[routeId]!
- if (currentRouteIds.has(routeId)) {
- nextFilteredRoutes[routeId] = routeManifest
- } else if (
- includeUnmatchedRouteAssets &&
- routeManifest.assets &&
- routeManifest.assets.length > 0
- ) {
- nextFilteredRoutes[routeId] = {
- assets: routeManifest.assets,
- }
- }
- }
-
- filteredRoutes = stripInlinedStylesheetAssets(
- manifest,
- nextFilteredRoutes,
- matchesToDehydrate,
- )
-
- if (isProd) {
- getManifestCache(manifest).set(manifestCacheKey, filteredRoutes)
- }
- }
+ const cacheKey = getMatchedRoutesCacheKey(matchesToDehydrate)
+ const preparedManifest = getPreparedMatchedManifestRoutes(
+ manifest,
+ matchesToDehydrate,
+ cacheKey,
+ )
manifestToDehydrate = {
- routes: { ...filteredRoutes },
+ ...(manifest.scriptFormat
+ ? { scriptFormat: manifest.scriptFormat }
+ : {}),
+ ...(preparedManifest.inlineCssHrefs
+ ? { inlineStyle: createInlineCssPlaceholderAsset() }
+ : {}),
+ routes: preparedManifest.routes,
}
// Merge request-scoped assets into root route (without mutating cached manifest)
- if (opts?.requestAssets?.length) {
+ const requestAssets = opts?.requestAssets
+ if (hasRequestAssets(requestAssets)) {
const existingRoot = manifestToDehydrate.routes[rootRouteId]
- manifestToDehydrate.routes[rootRouteId] = {
- ...existingRoot,
- assets: [...opts.requestAssets, ...(existingRoot?.assets ?? [])],
+ manifestToDehydrate.routes = {
+ ...manifestToDehydrate.routes,
+ [rootRouteId]: mergeRequestAssetsIntoRootRoute(
+ existingRoot,
+ requestAssets,
+ ),
}
}
}
diff --git a/packages/router-core/tests/hydrate.test.ts b/packages/router-core/tests/hydrate.test.ts
index d21445ada6..efac230e49 100644
--- a/packages/router-core/tests/hydrate.test.ts
+++ b/packages/router-core/tests/hydrate.test.ts
@@ -7,6 +7,11 @@ import { dehydrateSsrMatchId } from '../src/ssr/ssr-match-id'
import type { LocationRewrite } from '../src'
import type { TsrSsrGlobal } from '../src/ssr/types'
import type { AnyRouteMatch } from '../src'
+import type { Manifest } from '../src/manifest'
+
+const testManifest: Manifest = {
+ routes: {},
+}
describe('hydrate', () => {
let mockWindow: { $_TSR?: TsrSsrGlobal }
@@ -93,7 +98,7 @@ describe('hydrate', () => {
const mockBuffer = [vi.fn(), vi.fn()]
mockWindow.$_TSR = {
router: {
- manifest: { routes: {} },
+ manifest: testManifest,
dehydratedData: {},
lastMatchId: '/',
matches: [],
@@ -122,7 +127,7 @@ describe('hydrate', () => {
mockWindow.$_TSR = {
router: {
- manifest: { routes: {} },
+ manifest: testManifest,
dehydratedData: {},
lastMatchId: '/',
matches: [],
@@ -142,7 +147,6 @@ describe('hydrate', () => {
})
it('should set manifest in router.ssr', async () => {
- const testManifest = { routes: {} }
mockWindow.$_TSR = {
router: {
manifest: testManifest,
@@ -198,7 +202,7 @@ describe('hydrate', () => {
mockWindow.$_TSR = {
router: {
- manifest: { routes: {} },
+ manifest: testManifest,
dehydratedData: {},
lastMatchId: '/',
matches: dehydratedMatches,
@@ -246,7 +250,7 @@ describe('hydrate', () => {
mockWindow.$_TSR = {
router: {
- manifest: { routes: {} },
+ manifest: testManifest,
dehydratedData: {},
lastMatchId: '/',
matches: dehydratedMatches,
@@ -289,7 +293,7 @@ describe('hydrate', () => {
mockWindow.$_TSR = {
router: {
- manifest: { routes: {} },
+ manifest: testManifest,
dehydratedData: {},
lastMatchId: '/',
matches: dehydratedMatches,
@@ -333,7 +337,7 @@ describe('hydrate', () => {
mockWindow.$_TSR = {
router: {
- manifest: { routes: {} },
+ manifest: testManifest,
dehydratedData: {},
lastMatchId: '/',
matches: dehydratedMatches,
@@ -369,7 +373,7 @@ describe('hydrate', () => {
mockWindow.$_TSR = {
router: {
- manifest: { routes: {} },
+ manifest: testManifest,
dehydratedData: {},
lastMatchId: dehydrateSsrMatchId('/'),
matches: [
@@ -428,7 +432,7 @@ describe('hydrate', () => {
mockWindow.$_TSR = {
router: {
- manifest: { routes: {} },
+ manifest: testManifest,
dehydratedData: { rewrite: true },
lastMatchId: '/internal/internal',
matches: [
@@ -478,7 +482,7 @@ describe('hydrate', () => {
mockWindow.$_TSR = {
router: {
- manifest: { routes: {} },
+ manifest: testManifest,
dehydratedData: {},
lastMatchId: '/',
matches: [
diff --git a/packages/router-core/tests/manifest.test.ts b/packages/router-core/tests/manifest.test.ts
new file mode 100644
index 0000000000..f9d5d961df
--- /dev/null
+++ b/packages/router-core/tests/manifest.test.ts
@@ -0,0 +1,117 @@
+import { describe, expect, it } from 'vitest'
+import { appendUniqueUserTags } from '../src/manifest'
+import type { RouterManagedTag } from '../src/manifest'
+
+describe('appendUniqueUserTags', () => {
+ it('does not modify the target for an empty category', () => {
+ const existing: RouterManagedTag = {
+ tag: 'meta',
+ attrs: {
+ name: 'description',
+ content: 'existing',
+ },
+ }
+ const target = [existing]
+
+ appendUniqueUserTags(target, [])
+
+ expect(target).toEqual([existing])
+ })
+
+ it('appends a single tag unchanged', () => {
+ const tag: RouterManagedTag = {
+ tag: 'title',
+ children: 'Home',
+ }
+ const target: Array = []
+
+ appendUniqueUserTags(target, [tag])
+
+ expect(target).toEqual([tag])
+ expect(target[0]).toBe(tag)
+ })
+
+ it('dedupes equivalent tags within one appended category', () => {
+ const firstTag: RouterManagedTag = {
+ tag: 'link',
+ attrs: {
+ href: '/style.css',
+ rel: 'stylesheet',
+ },
+ }
+ const duplicateTag: RouterManagedTag = {
+ tag: 'link',
+ attrs: {
+ href: '/style.css',
+ rel: 'stylesheet',
+ },
+ }
+ const nextTag: RouterManagedTag = {
+ tag: 'link',
+ attrs: {
+ href: '/next.css',
+ rel: 'stylesheet',
+ },
+ }
+ const target: Array = []
+
+ appendUniqueUserTags(target, [firstTag, duplicateTag, nextTag])
+
+ expect(target).toEqual([firstTag, nextTag])
+ expect(target[0]).toBe(firstTag)
+ })
+
+ it('keeps tags that differ by attributes within one category', () => {
+ const target: Array = []
+
+ appendUniqueUserTags(target, [
+ {
+ tag: 'meta',
+ attrs: {
+ name: 'description',
+ content: 'first',
+ },
+ },
+ {
+ tag: 'meta',
+ attrs: {
+ name: 'description',
+ content: 'second',
+ },
+ },
+ ])
+
+ expect(target).toEqual([
+ {
+ tag: 'meta',
+ attrs: {
+ name: 'description',
+ content: 'first',
+ },
+ },
+ {
+ tag: 'meta',
+ attrs: {
+ name: 'description',
+ content: 'second',
+ },
+ },
+ ])
+ })
+
+ it('dedupes only within the appended tag category', () => {
+ const tag: RouterManagedTag = {
+ tag: 'link',
+ attrs: {
+ href: '/style.css',
+ rel: 'stylesheet',
+ },
+ }
+ const target: Array = []
+
+ appendUniqueUserTags(target, [tag, tag])
+ appendUniqueUserTags(target, [tag])
+
+ expect(target).toEqual([tag, tag])
+ })
+})
diff --git a/packages/router-core/tests/ssr-server-manifest.test.ts b/packages/router-core/tests/ssr-server-manifest.test.ts
index b566f13dc8..f76535622f 100644
--- a/packages/router-core/tests/ssr-server-manifest.test.ts
+++ b/packages/router-core/tests/ssr-server-manifest.test.ts
@@ -5,7 +5,11 @@ import { attachRouterServerSsrUtils } from '../src/ssr/ssr-server'
import { GLOBAL_TSR } from '../src/ssr/constants'
import { createTestRouter } from './routerTestUtils'
import { describe, expect, test } from 'vitest'
-import type { Manifest } from '../src/manifest'
+import type {
+ ManifestCssLink,
+ ManifestRouteAssets,
+ ServerManifest,
+} from '../src/manifest'
import type { DehydratedRouter } from '../src/ssr/types'
function buildRouter() {
@@ -30,35 +34,28 @@ function buildRouter() {
})
}
-function buildManifest(): Manifest {
- const sharedAsset = {
- tag: 'link' as const,
- attrs: {
- rel: 'stylesheet',
- href: '/assets/shared.css',
- type: 'text/css',
- },
- }
+function buildManifest(): ServerManifest {
+ const sharedAsset: ManifestCssLink = '/assets/shared.css'
return {
routes: {
__root__: {
- assets: [sharedAsset],
+ css: [sharedAsset],
preloads: ['/assets/root.js'],
},
'/': {
- assets: [sharedAsset],
+ css: [sharedAsset],
preloads: ['/assets/index.js'],
},
'/posts': {
- assets: [sharedAsset],
+ css: [sharedAsset],
preloads: ['/assets/posts.js'],
},
},
}
}
-function buildInlineManifest(): Manifest {
+function buildInlineManifest(): ServerManifest {
const manifest = buildManifest()
return {
...manifest,
@@ -70,16 +67,13 @@ function buildInlineManifest(): Manifest {
}
}
-async function dehydrateManifest(options?: {
- includeUnmatchedRouteAssets?: boolean
-}) {
+async function dehydrateManifest() {
const router = buildRouter()
const manifest = buildManifest()
attachRouterServerSsrUtils({
router,
manifest,
- includeUnmatchedRouteAssets: options?.includeUnmatchedRouteAssets,
})
await router.load()
@@ -110,30 +104,192 @@ function parseSerializedRouter(serialized: string): DehydratedRouter {
}
describe('attachRouterServerSsrUtils manifest dehydration', () => {
- test('includes unmatched route assets by default', async () => {
+ test('omits unmatched route assets by default', async () => {
const manifest = await dehydrateManifest()
- expect(manifest.routes['/posts']).toEqual({
- assets: [
+ expect(manifest.routes['/posts']).toBeUndefined()
+ expect(manifest.routes['/']?.preloads).toEqual(['/assets/index.js'])
+ })
+
+ test('preserves script format when dehydrating the manifest', async () => {
+ const router = buildRouter()
+ const manifest: ServerManifest = {
+ ...buildManifest(),
+ scriptFormat: 'iife',
+ }
+
+ attachRouterServerSsrUtils({
+ router,
+ manifest,
+ })
+
+ await router.load()
+ await router.serverSsr!.dehydrate()
+
+ const script = router.serverSsr!.takeBufferedScripts()
+ expect(script?.children).toBeTruthy()
+ const dehydratedManifest = parseSerializedRouter(
+ script!.children!,
+ ).manifest!
+
+ expect(dehydratedManifest.scriptFormat).toBe('iife')
+ })
+
+ test('maps request-scoped preload links into SSR manifest data', async () => {
+ const router = buildRouter()
+ const manifest = buildManifest()
+ const requestAssets: ManifestRouteAssets = {
+ preloads: [{ href: '/assets/rsc-client.js', crossOrigin: 'anonymous' }],
+ scripts: [
{
- tag: 'link',
attrs: {
- rel: 'stylesheet',
- href: '/assets/shared.css',
- type: 'text/css',
+ src: '/assets/request-script.js',
+ type: 'module',
},
+ children: 'console.log("request")',
},
],
+ css: [{ href: '/assets/rsc-client.css', crossOrigin: 'use-credentials' }],
+ }
+
+ attachRouterServerSsrUtils({
+ router,
+ manifest,
+ getRequestAssets: () => requestAssets,
+ })
+
+ await router.load()
+
+ expect(router.ssr!.manifest?.routes.__root__).toMatchObject({
+ preloads: [
+ { href: '/assets/rsc-client.js', crossOrigin: 'anonymous' },
+ '/assets/root.js',
+ ],
+ scripts: [
+ {
+ attrs: {
+ src: '/assets/request-script.js',
+ type: 'module',
+ },
+ children: 'console.log("request")',
+ },
+ ],
+ css: [
+ { href: '/assets/rsc-client.css', crossOrigin: 'use-credentials' },
+ '/assets/shared.css',
+ ],
})
})
- test('omits unmatched route assets when disabled', async () => {
- const manifest = await dehydrateManifest({
- includeUnmatchedRouteAssets: false,
+ test('maps preloads-only request assets into SSR manifest data', async () => {
+ const router = buildRouter()
+ const manifest = buildManifest()
+ const requestAssets: ManifestRouteAssets = {
+ preloads: [{ href: '/assets/rsc-client.js', crossOrigin: 'anonymous' }],
+ }
+
+ attachRouterServerSsrUtils({
+ router,
+ manifest,
+ getRequestAssets: () => requestAssets,
})
- expect(manifest.routes['/posts']).toBeUndefined()
- expect(manifest.routes['/']?.preloads).toEqual(['/assets/index.js'])
+ await router.load()
+
+ expect(router.ssr!.manifest?.routes.__root__?.preloads).toEqual([
+ { href: '/assets/rsc-client.js', crossOrigin: 'anonymous' },
+ '/assets/root.js',
+ ])
+ })
+
+ test('dehydrates request-scoped preload links into manifest data', async () => {
+ const router = buildRouter()
+ const manifest = buildManifest()
+
+ attachRouterServerSsrUtils({
+ router,
+ manifest,
+ })
+
+ await router.load()
+ await router.serverSsr!.dehydrate({
+ requestAssets: {
+ preloads: [{ href: '/assets/rsc-client.js', crossOrigin: 'anonymous' }],
+ scripts: [
+ {
+ attrs: {
+ src: '/assets/request-script.js',
+ type: 'module',
+ },
+ children: 'console.log("request")',
+ },
+ ],
+ css: [
+ {
+ href: '/assets/rsc-client.css',
+ crossOrigin: 'use-credentials',
+ },
+ ],
+ },
+ })
+
+ const script = router.serverSsr!.takeBufferedScripts()
+ expect(script?.children).toBeTruthy()
+ const dehydratedManifest = parseSerializedRouter(
+ script!.children!,
+ ).manifest!
+
+ expect(dehydratedManifest.routes.__root__).toMatchObject({
+ preloads: [
+ { href: '/assets/rsc-client.js', crossOrigin: 'anonymous' },
+ '/assets/root.js',
+ ],
+ scripts: [
+ {
+ attrs: {
+ src: '/assets/request-script.js',
+ type: 'module',
+ },
+ children: 'console.log("request")',
+ },
+ ],
+ css: [
+ { href: '/assets/rsc-client.css', crossOrigin: 'use-credentials' },
+ '/assets/shared.css',
+ ],
+ })
+ expect(Array.isArray(dehydratedManifest.routes.__root__?.css)).toBe(true)
+ expect((dehydratedManifest.routes.__root__?.css as any).links).toBe(
+ undefined,
+ )
+ })
+
+ test('dehydrates preloads-only request assets into manifest data', async () => {
+ const router = buildRouter()
+ const manifest = buildManifest()
+
+ attachRouterServerSsrUtils({
+ router,
+ manifest,
+ })
+
+ await router.load()
+ await router.serverSsr!.dehydrate({
+ requestAssets: {
+ preloads: [{ href: '/assets/rsc-client.js', crossOrigin: 'anonymous' }],
+ },
+ })
+
+ const script = router.serverSsr!.takeBufferedScripts()
+ expect(script?.children).toBeTruthy()
+ const dehydratedManifest = parseSerializedRouter(
+ script!.children!,
+ ).manifest!
+
+ expect(dehydratedManifest.routes.__root__?.preloads).toEqual([
+ { href: '/assets/rsc-client.js', crossOrigin: 'anonymous' },
+ '/assets/root.js',
+ ])
})
test('inlines stylesheet assets for SSR and strips stylesheet links from dehydration', async () => {
@@ -143,20 +299,14 @@ describe('attachRouterServerSsrUtils manifest dehydration', () => {
attachRouterServerSsrUtils({
router,
manifest,
- includeUnmatchedRouteAssets: false,
})
await router.load()
- const ssrRootAssets = router.ssr!.manifest?.routes.__root__?.assets ?? []
- expect(
- ssrRootAssets.find(
- (asset) =>
- asset.tag === 'style' &&
- asset.inlineCss &&
- asset.children === '.shared{color:red}',
- ),
- ).toBeTruthy()
+ const ssrInlineCss = router.ssr!.manifest?.inlineStyle
+ expect(ssrInlineCss).toMatchObject({
+ children: '.shared{color:red}',
+ })
await router.serverSsr!.dehydrate()
@@ -164,28 +314,91 @@ describe('attachRouterServerSsrUtils manifest dehydration', () => {
expect(script?.children).toBeTruthy()
const dehydratedRouter = parseSerializedRouter(script!.children!)
const dehydratedManifest = dehydratedRouter.manifest!
- const rootAssets = dehydratedManifest.routes.__root__?.assets ?? []
- const allAssets = Object.values(dehydratedManifest.routes).flatMap(
- (route) => route.assets ?? [],
+ const rootInlineCss = dehydratedManifest.inlineStyle
+ const allLinks = Object.values(dehydratedManifest.routes).flatMap(
+ (route) => route.css ?? [],
)
- expect(rootAssets).toEqual([
- {
- tag: 'style',
- attrs: {
- suppressHydrationWarning: true,
- },
- inlineCss: true,
+ expect(rootInlineCss).toEqual({
+ attrs: {
+ suppressHydrationWarning: true,
},
- ])
+ })
+ expect('inlineCss' in dehydratedManifest).toBe(false)
expect(
- allAssets.some(
- (asset) =>
- asset.tag === 'link' && asset.attrs?.href === '/assets/shared.css',
+ allLinks.some((asset) =>
+ typeof asset === 'string'
+ ? asset === '/assets/shared.css'
+ : asset.href === '/assets/shared.css',
),
).toBe(false)
expect(dehydratedManifest.routes['/']?.preloads).toEqual([
'/assets/index.js',
])
})
+
+ test('strips only inlinable stylesheet links from dehydrated manifest data', async () => {
+ const router = buildRouter()
+ const manifest: ServerManifest = {
+ inlineCss: {
+ styles: {
+ '/assets/root-inline.css': '.root{color:red}',
+ '/assets/index-inline.css': '.index{color:blue}',
+ },
+ },
+ routes: {
+ __root__: {
+ css: [
+ '/assets/root-inline.css',
+ {
+ href: '/assets/root-linked.css',
+ crossOrigin: 'anonymous',
+ },
+ ],
+ },
+ '/': {
+ css: [
+ {
+ href: '/assets/index-inline.css',
+ crossOrigin: 'use-credentials',
+ },
+ '/assets/index-linked.css',
+ ],
+ preloads: ['/assets/index.js'],
+ },
+ },
+ }
+
+ attachRouterServerSsrUtils({
+ router,
+ manifest,
+ })
+
+ await router.load()
+
+ expect(router.ssr!.manifest?.inlineStyle).toMatchObject({
+ children: '.root{color:red}.index{color:blue}',
+ })
+
+ await router.serverSsr!.dehydrate()
+
+ const script = router.serverSsr!.takeBufferedScripts()
+ expect(script?.children).toBeTruthy()
+ const dehydratedManifest = parseSerializedRouter(
+ script!.children!,
+ ).manifest!
+
+ expect(dehydratedManifest.routes.__root__?.css).toEqual([
+ {
+ href: '/assets/root-linked.css',
+ crossOrigin: 'anonymous',
+ },
+ ])
+ expect(dehydratedManifest.routes['/']?.css).toEqual([
+ '/assets/index-linked.css',
+ ])
+ expect(dehydratedManifest.routes['/']?.preloads).toEqual([
+ '/assets/index.js',
+ ])
+ })
})
diff --git a/packages/solid-router/src/HeadContent.dev.tsx b/packages/solid-router/src/HeadContent.dev.tsx
index 83c241d3fb..adf46ab800 100644
--- a/packages/solid-router/src/HeadContent.dev.tsx
+++ b/packages/solid-router/src/HeadContent.dev.tsx
@@ -1,12 +1,11 @@
import { MetaProvider } from '@solidjs/meta'
import { For, createEffect, createMemo } from 'solid-js'
+import { DEV_STYLES_ATTR } from '@tanstack/router-core'
import { Asset } from './Asset'
import { useHydrated } from './ClientOnly'
import { useTags } from './headContentUtils'
import type { HeadContentProps } from './HeadContent'
-const DEV_STYLES_ATTR = 'data-tanstack-router-dev-styles'
-
/**
* @description The `HeadContent` component is used to render meta tags, links, and scripts for the current route.
* When using full document hydration (hydrating from ``), this component should be rendered in the ``
@@ -33,7 +32,9 @@ export function HeadContent(props: HeadContentProps) {
// Filter out dev styles after hydration
const filteredTags = createMemo(() => {
if (hydrated()) {
- return tags().filter((tag) => !tag.attrs?.[DEV_STYLES_ATTR])
+ return tags().filter(
+ (tag) => tag.tag !== 'link' || tag.attrs?.[DEV_STYLES_ATTR] !== true,
+ )
}
return tags()
})
diff --git a/packages/solid-router/src/Scripts.tsx b/packages/solid-router/src/Scripts.tsx
index 188bd5e187..4c1ece99c6 100644
--- a/packages/solid-router/src/Scripts.tsx
+++ b/packages/solid-router/src/Scripts.tsx
@@ -1,13 +1,14 @@
import * as Solid from 'solid-js'
+import { isServer } from '@tanstack/router-core/isServer'
import { Asset } from './Asset'
import { useRouter } from './useRouter'
-import type { RouterManagedTag } from '@tanstack/router-core'
+import type { AnyRouteMatch, RouterManagedTag } from '@tanstack/router-core'
export const Scripts = () => {
const router = useRouter()
const nonce = router.options.ssr?.nonce
- const activeMatches = Solid.createMemo(() => router.stores.matches.get())
- const assetScripts = Solid.createMemo(() => {
+
+ const getAssetScripts = (matches: Array) => {
const assetScripts: Array = []
const manifest = router.ssr?.manifest
@@ -15,57 +16,67 @@ export const Scripts = () => {
return []
}
- activeMatches()
- .map((match) => router.looseRoutesById[match.routeId]!)
- .forEach((route) =>
- manifest.routes[route.id]?.assets
- ?.filter((d) => d.tag === 'script')
- .forEach((asset) => {
- assetScripts.push({
- tag: 'script',
- attrs: { ...asset.attrs, nonce },
- children: asset.children,
- } as any)
- }),
- )
+ for (const match of matches) {
+ const scripts = manifest.routes[match.routeId]?.scripts
+
+ if (!scripts) {
+ continue
+ }
+
+ for (const asset of scripts) {
+ assetScripts.push({
+ tag: 'script',
+ attrs: { ...asset.attrs, nonce },
+ children: asset.children,
+ })
+ }
+ }
return assetScripts
- })
+ }
- const scripts = Solid.createMemo(() =>
+ const getScripts = (matches: Array): Array =>
(
- activeMatches()
+ matches
.map((match) => match.scripts!)
.flat(1)
.filter(Boolean) as Array
- ).map(({ children, ...script }) => ({
- tag: 'script',
- attrs: {
- ...script,
- nonce,
- },
- children,
- })),
- )
+ ).map(
+ ({ children, ...script }) =>
+ ({
+ tag: 'script',
+ attrs: {
+ ...script,
+ nonce,
+ },
+ children,
+ }) satisfies RouterManagedTag,
+ )
- let serverBufferedScript: RouterManagedTag | undefined = undefined
+ const activeMatches = Solid.createMemo(() => router.stores.matches.get())
+ const assetScripts = Solid.createMemo(() => getAssetScripts(activeMatches()))
+ const scripts = Solid.createMemo(() => getScripts(activeMatches()))
- if (router.serverSsr) {
- serverBufferedScript = router.serverSsr.takeBufferedScripts()
- }
+ return renderScripts(router, scripts(), assetScripts())
+}
- const allScripts = [
- ...scripts(),
- ...assetScripts(),
- ] as Array
+function renderScripts(
+ router: ReturnType,
+ scripts: Array,
+ assetScripts: Array,
+) {
+ const allScripts = [...scripts, ...assetScripts] as Array
- if (serverBufferedScript) {
- allScripts.unshift(serverBufferedScript)
+ if ((isServer ?? router.isServer) && router.serverSsr) {
+ const serverBufferedScript = router.serverSsr.takeBufferedScripts()
+ if (serverBufferedScript) {
+ allScripts.unshift(serverBufferedScript)
+ }
}
return (
<>
- {allScripts.map((asset, i) => (
+ {allScripts.map((asset) => (
))}
>
diff --git a/packages/solid-router/src/headContentUtils.tsx b/packages/solid-router/src/headContentUtils.tsx
index da77c86191..b4ca3e8a4e 100644
--- a/packages/solid-router/src/headContentUtils.tsx
+++ b/packages/solid-router/src/headContentUtils.tsx
@@ -1,9 +1,10 @@
import * as Solid from 'solid-js'
import {
+ appendUniqueUserTags,
escapeHtml,
getAssetCrossOrigin,
- isInlinableStylesheet,
- resolveManifestAssetLink,
+ getScriptPreloadAttrs,
+ resolveManifestCssLink,
} from '@tanstack/router-core'
import { useRouter } from './useRouter'
import type {
@@ -21,8 +22,8 @@ export const useTags = (assetCrossOrigin?: AssetCrossOriginConfig) => {
const activeMatches = Solid.createMemo(() => router.stores.matches.get())
const routeMeta = Solid.createMemo(() =>
activeMatches()
- .map((match) => match.meta!)
- .filter(Boolean),
+ .map((match) => match.meta)
+ .filter((meta) => meta !== undefined),
)
const meta: Solid.Accessor> = Solid.createMemo(() => {
@@ -100,9 +101,8 @@ export const useTags = (assetCrossOrigin?: AssetCrossOriginConfig) => {
const links = Solid.createMemo(() => {
const matches = activeMatches()
const constructed = matches
- .map((match) => match.links!)
- .filter(Boolean)
- .flat(1)
+ .flatMap((match) => match.links ?? [])
+ .filter((link) => link !== undefined)
.map((link) => ({
tag: 'link',
attrs: {
@@ -111,125 +111,111 @@ export const useTags = (assetCrossOrigin?: AssetCrossOriginConfig) => {
},
})) satisfies Array
+ return constructed
+ })
+
+ const manifestCssTags = Solid.createMemo(() => {
const manifest = router.ssr?.manifest
+ const tags: Array = []
- const assets = matches
- .map((match) => manifest?.routes[match.routeId]?.assets ?? [])
- .filter(Boolean)
- .flat(1)
- .flatMap((asset): Array => {
- if (asset.tag === 'link') {
- if (isInlinableStylesheet(manifest, asset)) {
- return []
- }
+ if (!manifest) {
+ return tags
+ }
- return [
- {
- tag: 'link',
- attrs: {
- ...asset.attrs,
- crossOrigin:
- getAssetCrossOrigin(assetCrossOrigin, 'stylesheet') ??
- asset.attrs?.crossOrigin,
- nonce,
- },
- },
- ]
- }
-
- if (asset.tag === 'style') {
- return [
- {
- tag: 'style',
- attrs: {
- ...asset.attrs,
- nonce,
- },
- children: asset.children,
- ...(asset.inlineCss ? { inlineCss: true as const } : {}),
- },
- ]
- }
-
- return []
+ for (const match of activeMatches()) {
+ manifest.routes[match.routeId]?.css?.forEach((link) => {
+ const resolvedLink = resolveManifestCssLink(link)
+ tags.push({
+ tag: 'link',
+ attrs: {
+ rel: 'stylesheet',
+ ...resolvedLink,
+ crossOrigin:
+ getAssetCrossOrigin(assetCrossOrigin, 'stylesheet') ??
+ resolvedLink.crossOrigin,
+ nonce,
+ },
+ })
})
+ }
- return [...constructed, ...assets]
+ if (manifest.inlineStyle) {
+ tags.push({
+ tag: 'style',
+ attrs: {
+ ...manifest.inlineStyle.attrs,
+ nonce,
+ },
+ children: manifest.inlineStyle.children,
+ inlineCss: true,
+ })
+ }
+
+ return tags
})
const preloadLinks = Solid.createMemo(() => {
const matches = activeMatches()
const preloadLinks: Array = []
- matches
- .map((match) => router.looseRoutesById[match.routeId]!)
- .forEach((route) =>
- router.ssr?.manifest?.routes[route.id]?.preloads
- ?.filter(Boolean)
- .forEach((preload) => {
- const preloadLink = resolveManifestAssetLink(preload)
- preloadLinks.push({
- tag: 'link',
- attrs: {
- rel: 'modulepreload',
- href: preloadLink.href,
- crossOrigin:
- getAssetCrossOrigin(assetCrossOrigin, 'modulepreload') ??
- preloadLink.crossOrigin,
- nonce,
- },
- })
- }),
- )
+ matches.forEach((match) =>
+ router.ssr?.manifest?.routes[match.routeId]?.preloads
+ ?.filter(Boolean)
+ .forEach((preload) => {
+ preloadLinks.push({
+ tag: 'link',
+ attrs: {
+ ...getScriptPreloadAttrs(
+ router.ssr?.manifest,
+ preload,
+ assetCrossOrigin,
+ ),
+ nonce,
+ },
+ })
+ }),
+ )
return preloadLinks
})
- const styles = Solid.createMemo(() =>
- (
- activeMatches()
- .map((match) => match.styles!)
- .flat(1)
- .filter(Boolean) as Array
- ).map(({ children, ...style }) => ({
- tag: 'style',
- attrs: {
- ...style,
- nonce,
- },
- children,
- })),
- )
+ const styles = Solid.createMemo(() => {
+ return activeMatches()
+ .flatMap((match) => match.styles ?? [])
+ .filter((style) => style !== undefined)
+ .map(({ children, ...style }) => ({
+ tag: 'style',
+ attrs: {
+ ...style,
+ nonce,
+ },
+ children: children as string | undefined,
+ })) satisfies Array
+ })
- const headScripts = Solid.createMemo(() =>
- (
- activeMatches()
- .map((match) => match.headScripts!)
- .flat(1)
- .filter(Boolean) as Array
- ).map(({ children, ...script }) => ({
- tag: 'script',
- attrs: {
- ...script,
- nonce,
- },
- children,
- })),
- )
+ const headScripts = Solid.createMemo(() => {
+ return activeMatches()
+ .flatMap((match) => match.headScripts ?? [])
+ .filter((script) => script !== undefined)
+ .map(({ children, ...script }) => ({
+ tag: 'script',
+ attrs: {
+ ...script,
+ nonce,
+ },
+ children: children as string | undefined,
+ })) satisfies Array
+ })
return Solid.createMemo((prev: Array | undefined) => {
- const next = uniqBy(
- [
- ...meta(),
- ...preloadLinks(),
- ...links(),
- ...styles(),
- ...headScripts(),
- ] as Array,
- (d) => {
- return JSON.stringify(d)
- },
- )
+ const next: Array = []
+ appendUniqueUserTags(next, meta())
+ next.push(...preloadLinks())
+ appendUniqueUserTags(next, links())
+ next.push(...manifestCssTags())
+ appendUniqueUserTags(next, styles())
+ appendUniqueUserTags(next, headScripts())
+
if (prev === undefined) {
return next
}
@@ -262,15 +248,3 @@ function replaceEqualTags(
return isEqual ? prev : result
}
-
-export function uniqBy(arr: Array, fn: (item: T) => string) {
- const seen = new Set()
- return arr.filter((item) => {
- const key = fn(item)
- if (seen.has(key)) {
- return false
- }
- seen.add(key)
- return true
- })
-}
diff --git a/packages/solid-router/tests/Scripts.test.tsx b/packages/solid-router/tests/Scripts.test.tsx
index 29f3138352..b15faaef19 100644
--- a/packages/solid-router/tests/Scripts.test.tsx
+++ b/packages/solid-router/tests/Scripts.test.tsx
@@ -21,20 +21,16 @@ import {
import { Scripts } from '../src/Scripts'
import type { Manifest } from '@tanstack/router-core'
-const createTestManifest = (routeId: string) =>
+const createTestManifest = (
+ routeId: string,
+ options?: { scriptFormat?: Manifest['scriptFormat'] },
+) =>
({
+ ...(options?.scriptFormat ? { scriptFormat: options.scriptFormat } : {}),
routes: {
[routeId]: {
preloads: ['/main.js'],
- assets: [
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/main.css',
- },
- },
- ],
+ css: ['/main.css'],
},
},
}) satisfies Manifest
@@ -259,23 +255,13 @@ describe('ssr scripts', () => {
routes: {
[rootRoute.id]: {
preloads: ['/root.js'],
- assets: [
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/main.css',
- },
- },
- ],
+ css: ['/main.css'],
},
[aRoute.id]: {
preloads: ['/a.js'],
- assets: [],
},
[bRoute.id]: {
preloads: ['/b.js', '/b-child.js'],
- assets: [],
},
},
},
@@ -314,7 +300,7 @@ describe('ssr scripts', () => {
).toHaveLength(1)
})
- test('applies assetCrossOrigin to manifest assets and preloads', async () => {
+ test('applies assetCrossOrigin to manifest stylesheets and preloads', async () => {
const history = createTestBrowserHistory()
const rootRoute = createRootRoute({
@@ -323,7 +309,7 @@ describe('ssr scripts', () => {
<>
@@ -370,6 +356,100 @@ describe('ssr scripts', () => {
?.getAttribute('crossorigin'),
).toBe('anonymous')
})
+
+ test('renders runtime manifest inlineStyle', async () => {
+ const history = createTestBrowserHistory()
+
+ const rootRoute = createRootRoute({
+ component: () => {
+ return (
+ <>
+
+
+ >
+ )
+ },
+ })
+
+ const indexRoute = createRoute({
+ path: '/',
+ getParentRoute: () => rootRoute,
+ component: () => Index
,
+ })
+
+ const router = createRouter({
+ history,
+ routeTree: rootRoute.addChildren([indexRoute]),
+ })
+
+ router.ssr = {
+ manifest: {
+ inlineStyle: {
+ attrs: { id: 'runtime-inline-style' },
+ children: '.runtime{color:red}',
+ },
+ routes: {
+ [rootRoute.id]: {},
+ },
+ },
+ }
+
+ await router.load()
+
+ render(() => )
+
+ await waitFor(() => {
+ expect(
+ document.head.querySelector('style#runtime-inline-style'),
+ ).toBeTruthy()
+ })
+
+ expect(
+ document.head.querySelector('style#runtime-inline-style')?.textContent,
+ ).toBe('.runtime{color:red}')
+ })
+
+ test('renders preload as script links for iife manifest preloads', async () => {
+ const history = createTestBrowserHistory()
+
+ const rootRoute = createRootRoute({
+ component: () => {
+ return (
+ <>
+
+
+ >
+ )
+ },
+ })
+
+ const indexRoute = createRoute({
+ path: '/',
+ getParentRoute: () => rootRoute,
+ component: () => Index
,
+ })
+
+ const router = createRouter({
+ history,
+ routeTree: rootRoute.addChildren([indexRoute]),
+ })
+
+ router.ssr = {
+ manifest: createTestManifest(rootRoute.id, { scriptFormat: 'iife' }),
+ }
+
+ await router.load()
+
+ render(() => )
+
+ await waitFor(() => {
+ expect(
+ document.head.querySelector('link[rel="preload"][as="script"]'),
+ ).toBeTruthy()
+ })
+
+ expect(document.head.querySelector('link[rel="modulepreload"]')).toBeFalsy()
+ })
})
describe('ssr HeadContent', () => {
diff --git a/packages/start-plugin-core/src/import-protection/virtualModules.ts b/packages/start-plugin-core/src/import-protection/virtualModules.ts
index 948f06fddb..29b6878927 100644
--- a/packages/start-plugin-core/src/import-protection/virtualModules.ts
+++ b/packages/start-plugin-core/src/import-protection/virtualModules.ts
@@ -104,21 +104,19 @@ function __report(action, accessPath) {
`
: ''
- const diagGetTraps = hasDiag
- ? `
+ const primitiveGetTraps = `
if (prop === Symbol.toPrimitive) {
return () => {
- __report('toPrimitive', name);
+ ${hasDiag ? `__report('toPrimitive', name);` : ''}
return '[import-protection mock]';
};
}
if (prop === 'toString' || prop === 'valueOf' || prop === 'toJSON') {
return () => {
- __report(String(prop), name);
+ ${hasDiag ? `__report(String(prop), name);` : ''}
return '[import-protection mock]';
};
}`
- : ''
const applyBody = hasDiag
? `__report('call', name + '()');
@@ -151,7 +149,7 @@ function ${fnName}(name) {
if (prop === 'caller') return null;
if (prop === 'then') return (f) => Promise.resolve(f(proxy));
if (prop === 'catch') return () => Promise.resolve(proxy);
- if (prop === 'finally') return (f) => { f(); return Promise.resolve(proxy); };${diagGetTraps}
+ if (prop === 'finally') return (f) => { f(); return Promise.resolve(proxy); };${primitiveGetTraps}
if (typeof prop === 'symbol') return undefined;
if (!(prop in children)) {
children[prop] = ${fnName}(name + '.' + prop);
diff --git a/packages/start-plugin-core/src/rsbuild/COMPILER_ARCHITECTURE.md b/packages/start-plugin-core/src/rsbuild/COMPILER_ARCHITECTURE.md
new file mode 100644
index 0000000000..a97c500b0d
--- /dev/null
+++ b/packages/start-plugin-core/src/rsbuild/COMPILER_ARCHITECTURE.md
@@ -0,0 +1,199 @@
+# Rsbuild Compiler Architecture
+
+This document explains the TanStack Start compiler integration for Rsbuild and Rspack. It focuses on server-function discovery, Rspack cache interaction, and the resolver virtual module.
+
+## Goals
+
+The Rsbuild integration has to do three things at the same time:
+
+- Compile Start-specific source patterns such as server functions, isomorphic functions, middleware, and compiler virtual modules.
+- Keep server-function metadata available when Rspack restores modules from its persistent cache and skips transforms.
+- Generate the `#tanstack-start-server-fn-resolver` virtual module after the server-function registry is complete for the current compilation.
+
+The important point is that server-function discovery is a side effect of compilation. If Rspack restores a transformed module from persistent cache, the transform side effect does not run. We therefore store the discovered metadata on the Rspack module itself and replay it from `module.buildInfo`.
+
+## Main Files
+
+- `plugin.ts` wires the Rsbuild plugin phases, virtual modules, RSC hooks, compiler ordering, and resolver rebuild hooks.
+- `start-compiler-host.ts` registers the Start compiler transforms, captures server-function metadata, writes metadata to Rspack `buildInfo`, and replays cached metadata.
+- `start-compiler-metadata.ts` defines the string keys and types used by the metadata loader.
+- `start-compiler-metadata-loader.ts` is the real Rspack loader that writes server-function metadata to the current module's `buildInfo`.
+- `virtual-modules.ts` owns the resolver virtual module and writes updated virtual module content per Rsbuild environment.
+- `../start-compiler/handleCreateServerFn.ts` discovers server functions while compiling caller modules.
+- `../start-compiler/server-fn-resolver-module.ts` generates the resolver module from the current server-function registry.
+
+## Environments
+
+Start registers compiler work for each Rsbuild environment that can affect server-function metadata:
+
+- `client` discovers functions referenced from browser code and marks them client-accessible.
+- `ssr` discovers functions reachable from the server-rendered route graph.
+- A separate provider environment is included when server-function providers are not compiled in `ssr` and RSC is not enabled.
+
+The shared registry is `serverFnsById`. It is passed to `virtual-modules.ts`, which uses it to generate resolver module content.
+
+## Cold Transform Path
+
+`registerStartCompilerTransforms()` registers an `api.transform({ order: 'pre' })` transform for each Start compiler environment.
+
+When a matching module is compiled normally:
+
+1. Rsbuild runs the Start transform in the pre-loader phase.
+2. The transform checks compiler virtual modules first.
+3. It runs cheap code filters to skip files that cannot contain Start compiler patterns.
+4. It lazily creates one `StartCompiler` per environment.
+5. It detects which compiler features are present in the current code.
+6. It serializes access to the per-environment `StartCompiler` through `runCompilerTask()`.
+7. It calls `compiler.compile({ id, code, detectedKinds })`.
+8. During compile, `handleCreateServerFn()` reports discovered server functions through `onServerFnsById`.
+9. The transform stores the discovered server functions for this module in the environment's pending metadata map.
+
+The module ID used for transform metadata is `ctx.resource`. The metadata loader later reads `this.resource`. Using the same Rspack resource string keeps the handoff stable across resource queries.
+
+## Server-Function Discovery
+
+Server functions are discovered in caller modules, not in provider modules. In `handleCreateServerFn()`, each discovered function records:
+
+- `functionName`, the generated handler export name.
+- `functionId`, the stable server-function ID.
+- `filename`, the caller module ID.
+- `extractedFilename`, the provider module ID with the server-function split query.
+- `isClientReferenced`, whether client-origin calls are allowed.
+
+`onServerFnsById` merges discoveries into the shared `serverFnsById` registry. While a compile task is active, it also merges the same discoveries into that module's `activeServerFnMetadata` object. After compile finishes, that object becomes the metadata payload for the module.
+
+Per-environment compiler tasks are serialized because `StartCompiler` owns mutable module caches and because `activeServerFnMetadata` must only describe the module currently being compiled in that environment.
+
+## Loading And Resolving Modules
+
+The compiler sometimes needs to read or resolve imported modules while compiling a source file.
+
+`start-compiler-host.ts` uses two native Rsbuild/Rspack surfaces for this:
+
+- `ctx.resolve()` from the active Rsbuild transform context resolves module IDs.
+- `compiler.inputFileSystem` reads source through Rspack's input filesystem.
+
+An `AsyncLocalStorage` value binds `loadModule` and `resolveId` back to the active transform context. That lets the compiler add dependencies to the current Rspack module without reaching into Rspack private resolver internals.
+
+## Why A Real Loader Is Used
+
+Rsbuild `api.transform()` is implemented as a loader, but its callback only exposes the transform context. It does not expose the current `NormalModule` or `module.buildInfo`.
+
+Rspack persists custom `module.buildInfo` fields. To write metadata there, Start installs a small real loader after the transform:
+
+1. `start-compiler-host.ts` adds a rule with `enforce: 'post'` for Start transformable modules.
+2. The rule points to the emitted `start-compiler-metadata-loader.js` file.
+3. The loader receives the environment's pending metadata map through loader options.
+4. A public `NormalModule.getCompilationHooks(compilation).loader` hook adds a setter to the loader context.
+5. The loader reads metadata for `this.resource` and calls the setter.
+6. The setter writes to `module.buildInfo['tanstack.start.serverFns']`.
+
+Only string-keyed, JSON-serializable `buildInfo` fields are used. Rspack persists those fields with the module cache. Symbol keys and private cache internals are intentionally avoided.
+
+## Cache-Enabled And Cache-Disabled Behavior
+
+The metadata loader is installed regardless of `performance.buildCache`.
+
+When persistent cache is enabled, Rspack may later restore a module without rerunning the Start transform or the metadata loader. The `buildInfo` payload is then replayed from the cached module.
+
+When persistent cache is disabled, the same loader path still runs during normal compilation and writes in-memory `buildInfo`. Keeping one path avoids conditional behavior and keeps cold, watch, cache-disabled, and cache-enabled builds aligned. The overhead is one small post loader for modules that already match the Start transform test.
+
+The cache-specific part is not the loader itself. The cache-specific part is that Rspack can persist and later restore the `buildInfo` field.
+
+## Stale Metadata Clearing
+
+If a module previously contained server functions and then no longer produces metadata, the metadata loader writes an empty payload:
+
+```ts
+{ version: 1, serverFnsById: {} }
+```
+
+This prevents stale server-function entries from surviving on a cached module's `buildInfo` after a file edit removes or renames server functions.
+
+## Warm Cache Replay
+
+Each relevant compiler installs a `finishMake` hook at stage `-20`.
+
+At that point Rspack has built or restored the module graph for the environment, and module `buildInfo` is available. The hook:
+
+1. Iterates over `compilation.modules`.
+2. Reads `module.buildInfo['tanstack.start.serverFns']`.
+3. Validates the payload with the versioned schema.
+4. Merges valid module metadata into an environment snapshot.
+5. Stores the snapshot in `serverFnsByEnvironment`.
+6. Rebuilds the shared `serverFnsById` registry from all environment snapshots.
+7. Notifies virtual modules that resolver content may have changed.
+
+The shared registry is rebuilt from snapshots instead of being append-only. This is what lets deleted or renamed server functions disappear after watch rebuilds or warm-cache restores.
+
+The pending transform-to-loader metadata maps are cleared on each Rspack `compile` hook. That prevents metadata discovered in an earlier compilation from being written to a later module when the transform no longer runs or no longer discovers server functions.
+
+## Why Snapshots Are Per Environment
+
+Each Rsbuild environment can see different information for the same file. For example, client and SSR caller environments can mark functions as client-accessible, while server and provider environments own server execution details. The merged registry preserves the broadest known access information.
+
+A single global replay pass would either drop another environment's metadata or keep stale metadata too long. The model is therefore:
+
+- Build one current snapshot per environment.
+- Replace the shared registry with the union of all available snapshots.
+- Regenerate resolver content from that shared registry.
+
+This keeps the global registry convergent while allowing Rspack environments to finish independently.
+
+## Resolver Rebuild Ordering
+
+The resolver virtual module must be rebuilt after cached metadata has been replayed.
+
+The ordering is:
+
+1. `finishMake` stage `-20`: replay `buildInfo` into environment snapshots and rebuild `serverFnsById`.
+2. `finishMake` stage `-10`: write resolver virtual module content and rebuild modules that import the resolver.
+
+For non-RSC builds, each server-like environment that needs the resolver installs the stage `-10` rebuild hook.
+
+For RSC builds, the server environment installs the RSC resolver rebuild hook at stage `-10`. It generates provider-style resolver content because RSC server actions run inside the server/RSC environment and do not need the client-reference check in that resolver layer.
+
+## Compiler Ordering
+
+Non-RSC Rsbuild uses Rspack `MultiCompiler.setDependencies()` to make resolver-owning environments wait for metadata-producing environments.
+
+The intended order is:
+
+- `client` runs before every server-like environment.
+- If a separate provider environment exists, the provider runs after `client`.
+- If a separate provider environment exists, `ssr` runs after both `client` and the provider.
+
+That ordering prevents the `ssr` resolver module from being finalized before provider metadata is available.
+
+RSC builds intentionally do not add these dependencies. Rspack's native RSC coordinator interleaves server and client compilation phases. Adding MultiCompiler dependencies on top of it can deadlock the build.
+
+## Native APIs Used
+
+The implementation uses Rsbuild/Rspack integration points instead of cache internals:
+
+- Rsbuild `api.transform()` for source transforms.
+- Rsbuild transform `ctx.resolve()` for module resolution.
+- Rspack `compiler.inputFileSystem` for source reads.
+- Rspack loaders for access to the loader pipeline.
+- Rspack `NormalModule.getCompilationHooks(compilation).loader` to extend loader context.
+- Rspack `module.buildInfo` for module-scoped persisted metadata.
+- Rspack `compiler.hooks.finishMake` for module graph replay and resolver rebuild ordering.
+- Rspack `compilation.rebuildModule()` through the local `rebuildModulesContaining()` helper.
+- Rspack `MultiCompiler.setDependencies()` for non-RSC compiler ordering.
+- Rspack `experiments.VirtualModulesPlugin` for virtual module content.
+
+The implementation avoids private persistent-cache files, direct cache mutation, direct `_module` access from loaders, global handoff state, and disabling module caching with `this.cacheable(false)`.
+
+## When A New Server Function Is Compiled
+
+For a new server function in a normal cold compile:
+
+1. Rsbuild sends the source module through the Start pre transform.
+2. `StartCompiler.compile()` rewrites the caller module and discovers the server function.
+3. `onServerFnsById` merges the function into `serverFnsById` and the active module metadata object.
+4. The transform stores `{ version: 1, serverFnsById: discoveredServerFnsById }` in the environment metadata map under the module resource.
+5. The post metadata loader runs for the same resource.
+6. The loader writes that payload into `module.buildInfo['tanstack.start.serverFns']`.
+7. Rspack owns the module from there. If persistent cache is enabled, Rspack persists the module and its string-keyed `buildInfo` with its normal cache machinery.
+8. At `finishMake -20`, Start reads current module `buildInfo` and rebuilds the environment snapshot.
+9. At `finishMake -10`, Start rewrites and rebuilds the resolver virtual module so runtime lookups can find the new function.
diff --git a/packages/start-plugin-core/src/rsbuild/planning.ts b/packages/start-plugin-core/src/rsbuild/planning.ts
index 5ab3b631f2..856ea23240 100644
--- a/packages/start-plugin-core/src/rsbuild/planning.ts
+++ b/packages/start-plugin-core/src/rsbuild/planning.ts
@@ -5,6 +5,7 @@ import { ENTRY_POINTS } from '../constants'
import type { EnvironmentConfig } from '@rsbuild/core'
import type { ResolvedStartEntryPlan } from '../planning'
import type { RsbuildEnvironmentOverrides } from './types'
+import type { ScriptFormat } from '@tanstack/router-core'
const require = createRequire(import.meta.url)
@@ -72,6 +73,7 @@ export function createRsbuildEnvironmentPlan(opts: {
publicBase: string
serverFnProviderEnv: string
environmentOverrides?: RsbuildEnvironmentOverrides
+ scriptFormat?: ScriptFormat
rsc?: boolean | undefined
dev?: boolean | undefined
}): RsbuildEnvironmentPlanResult {
@@ -87,6 +89,20 @@ export function createRsbuildEnvironmentPlan(opts: {
: {}),
}
const environmentOverrides = opts.environmentOverrides ?? {}
+ const scriptFormat = opts.scriptFormat ?? 'module'
+ const clientOutputModule = scriptFormat === 'module'
+ const userClientOutputModule =
+ environmentOverrides.client?.output?.module ??
+ environmentOverrides.all?.output?.module
+
+ if (
+ typeof userClientOutputModule === 'boolean' &&
+ userClientOutputModule !== clientOutputModule
+ ) {
+ throw new Error(
+ 'TanStack Start rsbuild.client.output controls environments.client.output.module. Remove environments.client.output.module or set rsbuild.client.output to match it.',
+ )
+ }
return {
environments: {
@@ -102,7 +118,7 @@ export function createRsbuildEnvironmentPlan(opts: {
},
output: {
target: 'web',
- module: true,
+ module: clientOutputModule,
distPath: {
root: opts.clientOutputDirectory,
},
@@ -224,7 +240,7 @@ export function resolveRsbuildOutputDirectory(opts: {
}
function normalizeEntryPath(path: string) {
- return path.replaceAll('\\', '/')
+ return path.includes('\\') ? path.replaceAll('\\', '/') : path
}
function resolveFromRoot(specifier: string, root: string): string {
diff --git a/packages/start-plugin-core/src/rsbuild/plugin.ts b/packages/start-plugin-core/src/rsbuild/plugin.ts
index 242cb549ae..8243d2e28b 100644
--- a/packages/start-plugin-core/src/rsbuild/plugin.ts
+++ b/packages/start-plugin-core/src/rsbuild/plugin.ts
@@ -1,7 +1,6 @@
import { existsSync, readdirSync, realpathSync, statSync } from 'node:fs'
import { dirname, join, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
-import { hasKeys } from '@tanstack/router-core'
import { joinURL } from 'ufo'
import {
applyResolvedBaseAndOutput,
@@ -10,7 +9,7 @@ import {
} from '../config-context'
import { normalizePath } from '../utils'
import { createServerFnBasePath, normalizePublicBase } from '../planning'
-import { parseStartConfig } from './schema'
+import { parseStartConfig, rsbuildClientOutputSchema } from './schema'
import {
RSBUILD_ENVIRONMENT_NAMES,
RSBUILD_RSC_LAYERS,
@@ -40,6 +39,7 @@ import type {
rspack as rspackNamespaceType,
} from '@rsbuild/core'
import type { TanStackStartRsbuildInputConfig } from './schema'
+import type { ScriptFormat } from '@tanstack/router-core'
// Detect whether this plugin source is running from inside the TanStack
// Router monorepo (packages/start-plugin-core/src/rsbuild/plugin.ts). When
@@ -62,6 +62,7 @@ type RscPluginPair = ReturnType<
type RspackConfig = Parameters[0]
type RspackCompiler = Rspack.Compiler
type RspackCompilationExtended = Rspack.Compilation
+type RspackAsset = ReturnType[number]
export function tanStackStartRsbuild(
corePluginOpts: TanStackStartRsbuildPluginCoreOptions,
@@ -78,6 +79,9 @@ export function tanStackStartRsbuild(
const { getConfig, resolvedStartConfig } = configContext
const serverFnProviderEnv = corePluginOpts.providerEnvironmentName
const ssrIsProvider = corePluginOpts.ssrIsProvider
+ const scriptFormat = rsbuildClientOutputSchema.parse(
+ startPluginOpts.rsbuild?.client?.output ?? 'module',
+ ) satisfies ScriptFormat
// RSC plugin instances — created lazily when rspack namespace is available
let rscPlugins: RscPluginPair | undefined
@@ -90,6 +94,18 @@ export function tanStackStartRsbuild(
return {
name: 'tanstack-start-rsbuild',
setup(api: RsbuildPluginAPI) {
+ const startCompilerEnvironments = [
+ { name: RSBUILD_ENVIRONMENT_NAMES.client, type: 'client' as const },
+ { name: RSBUILD_ENVIRONMENT_NAMES.server, type: 'server' as const },
+ ...(serverFnProviderEnv !== RSBUILD_ENVIRONMENT_NAMES.server &&
+ !rscEnabled
+ ? [{ name: serverFnProviderEnv, type: 'server' as const }]
+ : []),
+ ]
+ const startCompilerServerEnvironmentNames = startCompilerEnvironments
+ .filter((env) => env.type === 'server')
+ .map((env) => env.name)
+
// ---------------------------------------------------------------
// 1. modifyRsbuildConfig — resolve config, set up environments
// ---------------------------------------------------------------
@@ -155,6 +171,7 @@ export function tanStackStartRsbuild(
publicBase: resolvedStartConfig.basePaths.publicBase,
serverFnProviderEnv,
environmentOverrides: corePluginOpts.rsbuild?.environments,
+ scriptFormat,
rsc: rscOpts,
dev: isDev,
})
@@ -252,6 +269,7 @@ export function tanStackStartRsbuild(
// so defer this read until transform time instead of falling back to
// process.cwd() during plugin setup.
root: () => resolvedStartConfig.root || process.cwd(),
+ environments: startCompilerEnvironments,
providerEnvName: serverFnProviderEnv,
generateFunctionId: startPluginOpts.serverFns?.generateFunctionId,
compilerTransforms: corePluginOpts.compilerTransforms,
@@ -266,14 +284,7 @@ export function tanStackStartRsbuild(
registerImportProtection(api, {
getConfig,
framework: corePluginOpts.framework,
- environments: [
- { name: RSBUILD_ENVIRONMENT_NAMES.client, type: 'client' },
- { name: RSBUILD_ENVIRONMENT_NAMES.server, type: 'server' },
- ...(serverFnProviderEnv !== RSBUILD_ENVIRONMENT_NAMES.server &&
- !rscEnabled
- ? [{ name: serverFnProviderEnv, type: 'server' as const }]
- : []),
- ],
+ environments: startCompilerEnvironments,
})
// ---------------------------------------------------------------
@@ -290,9 +301,41 @@ export function tanStackStartRsbuild(
getDevClientEntryUrl: (publicBase: string) =>
joinURL(publicBase, 'static/js/index.js'),
rscEnabled,
+ scriptFormat,
})
updateServerFnResolver = virtualModuleState.updateServerFnResolver
+ if (!rscEnabled) {
+ api.modifyRspackConfig((config, utils) => {
+ if (
+ !startCompilerServerEnvironmentNames.includes(
+ utils.environment.name,
+ )
+ ) {
+ return
+ }
+
+ config.plugins.push({
+ apply(compiler: RspackCompiler) {
+ compiler.hooks.finishMake.tapPromise(
+ {
+ name: 'TanStackStartServerFnResolverRebuild',
+ stage: -10,
+ },
+ async (compilation: RspackCompilationExtended) => {
+ virtualModuleState.updateServerFnResolver()
+
+ await rebuildModulesContaining(
+ compilation,
+ virtualModuleState.serverFnResolverPath,
+ )
+ },
+ )
+ },
+ })
+ })
+ }
+
// ---------------------------------------------------------------
// 4. Client build stats capture via processAssets
// ---------------------------------------------------------------
@@ -484,10 +527,6 @@ export function tanStackStartRsbuild(
stage: -10,
},
async (compilation: RspackCompilationExtended) => {
- if (!hasKeys(serverFnsById)) {
- return
- }
-
const resolverContent =
virtualModuleState.generateCurrentResolverContent(true)
virtualModuleState.tryUpdateServerFnResolver(
@@ -579,13 +618,23 @@ export function tanStackStartRsbuild(
api.onAfterCreateCompiler(({ compiler }) => {
// MultiCompiler has a `compilers` array; single compiler does not
if ('compilers' in compiler) {
- const serverCompiler = compiler.compilers.find(
- (c) => c.name === RSBUILD_ENVIRONMENT_NAMES.server,
- )
- if (serverCompiler) {
- compiler.setDependencies(serverCompiler, [
- RSBUILD_ENVIRONMENT_NAMES.client,
- ])
+ for (const environmentName of startCompilerServerEnvironmentNames) {
+ const serverCompiler = compiler.compilers.find(
+ (c) => c.name === environmentName,
+ )
+ if (serverCompiler) {
+ const dependencies: Array = [
+ RSBUILD_ENVIRONMENT_NAMES.client,
+ ]
+ if (
+ environmentName === RSBUILD_ENVIRONMENT_NAMES.server &&
+ serverFnProviderEnv !== RSBUILD_ENVIRONMENT_NAMES.server
+ ) {
+ dependencies.push(serverFnProviderEnv)
+ }
+
+ compiler.setDependencies(serverCompiler, dependencies)
+ }
}
}
})
@@ -620,18 +669,32 @@ export function tanStackStartRsbuild(
.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE,
},
() => {
- const assetsWithPlaceholder = compilation
- .getAssets()
- .flatMap((asset) => {
- if (!asset.name.endsWith('.js')) return []
+ let assetsWithPlaceholder:
+ | Array<{ asset: RspackAsset; sourceStr: string }>
+ | undefined
- const sourceStr = String(asset.source.source())
- return sourceStr.includes(manifestPlaceholderLiteral)
- ? [{ asset, sourceStr }]
- : []
+ for (const asset of compilation.getAssets()) {
+ if (!asset.name.endsWith('.js')) {
+ continue
+ }
+
+ const sourceStr = String(asset.source.source())
+ if (!sourceStr.includes(manifestPlaceholderLiteral)) {
+ continue
+ }
+
+ if (!assetsWithPlaceholder) {
+ assetsWithPlaceholder = []
+ }
+ assetsWithPlaceholder.push({
+ asset,
+ sourceStr,
})
+ }
- if (assetsWithPlaceholder.length === 0) return
+ if (!assetsWithPlaceholder) {
+ return
+ }
const clientBuild = getClientBuild()
if (!clientBuild) {
@@ -720,25 +783,25 @@ function rebuildModulesContaining(
compilation: RspackCompilationExtended,
identifierFragment: string,
): Promise {
- const modulesToRebuild = Array.from(compilation.modules).filter((mod) =>
- mod.identifier().includes(identifierFragment),
- )
+ const rebuilds: Array> = []
+ for (const mod of compilation.modules) {
+ if (!mod.identifier().includes(identifierFragment)) {
+ continue
+ }
- if (modulesToRebuild.length === 0) {
- return Promise.resolve()
+ rebuilds.push(
+ new Promise((resolve, reject) => {
+ compilation.rebuildModule(mod, (err: Error | null) => {
+ if (err) reject(err)
+ else resolve()
+ })
+ }),
+ )
}
- return Promise.all(
- modulesToRebuild.map(
- (mod) =>
- new Promise((resolve, reject) => {
- compilation.rebuildModule(mod, (err: Error | null) => {
- if (err) reject(err)
- else resolve()
- })
- }),
- ),
- ).then(() => undefined)
+ return rebuilds.length === 0
+ ? Promise.resolve()
+ : Promise.all(rebuilds).then(() => undefined)
}
/**
diff --git a/packages/start-plugin-core/src/rsbuild/schema.ts b/packages/start-plugin-core/src/rsbuild/schema.ts
index adbc5c5328..86194e309c 100644
--- a/packages/start-plugin-core/src/rsbuild/schema.ts
+++ b/packages/start-plugin-core/src/rsbuild/schema.ts
@@ -6,11 +6,21 @@ import {
import type { CompileStartFrameworkOptions } from '../types'
import type { InlineCssInputOptions } from '../schema'
+export const rsbuildClientOutputSchema = z.enum(['module', 'iife'])
+
export const tanstackStartRsbuildOptionsSchema =
tanstackStartOptionsObjectSchema
.extend({
rsbuild: z
- .object({ installDevServerMiddleware: z.boolean().optional() })
+ .object({
+ installDevServerMiddleware: z.boolean().optional(),
+ client: z
+ .object({
+ output: rsbuildClientOutputSchema.optional().default('module'),
+ })
+ .optional()
+ .prefault({}),
+ })
.optional(),
})
.optional()
@@ -30,6 +40,12 @@ export function parseStartConfig(
export type TanStackStartRsbuildInputConfig = z.input<
typeof tanstackStartRsbuildOptionsSchema
> & {
+ rsbuild?: {
+ installDevServerMiddleware?: boolean
+ client?: {
+ output?: z.input
+ }
+ }
server?: {
build?: {
inlineCss?: InlineCssInputOptions
diff --git a/packages/start-plugin-core/src/rsbuild/start-compiler-host.ts b/packages/start-plugin-core/src/rsbuild/start-compiler-host.ts
index d0ef77e34b..5cf9319238 100644
--- a/packages/start-plugin-core/src/rsbuild/start-compiler-host.ts
+++ b/packages/start-plugin-core/src/rsbuild/start-compiler-host.ts
@@ -1,5 +1,7 @@
import { AsyncLocalStorage } from 'node:async_hooks'
-import { pathToFileURL } from 'node:url'
+import { dirname, resolve } from 'node:path'
+import { fileURLToPath, pathToFileURL } from 'node:url'
+import { z } from 'zod'
import { TRANSFORM_ID_REGEX } from '../constants'
import { detectKindsInCode } from '../start-compiler/compiler'
import { getTransformCodeFilterForEnv } from '../start-compiler/config'
@@ -11,8 +13,15 @@ import {
} from '../start-compiler/host'
import { cleanId } from '../start-compiler/utils'
import { createHydrateCompilerPlugin } from '../hydrate-when-transform'
-import { RSBUILD_ENVIRONMENT_NAMES } from './planning'
+import {
+ SERVER_FN_BUILD_INFO_CONTEXT_KEY,
+ SERVER_FN_BUILD_INFO_FIELD,
+} from './start-compiler-metadata'
import type { RsbuildPluginAPI, Rspack } from '@rsbuild/core'
+import type {
+ ServerFnBuildInfo,
+ ServerFnBuildInfoLoaderContext,
+} from './start-compiler-metadata'
import type {
CompileStartFrameworkOptions,
StartCompilerImportTransform,
@@ -29,18 +38,74 @@ type RsbuildTransformContext = Parameters<
Parameters[1]
>[0]
type RsbuildInputFileSystem = NonNullable
+type ServerFnMetadataById = Map
+type StartCompilerEnvironment = {
+ name: string
+ type: 'client' | 'server'
+}
+
+const serverFnSchema = z.object({
+ functionName: z.string(),
+ functionId: z.string(),
+ extractedFilename: z.string(),
+ filename: z.string(),
+ isClientReferenced: z.boolean().optional(),
+})
+
+const serverFnBuildInfoSchema = z.object({
+ version: z.literal(1),
+ serverFnsById: z.record(z.string(), serverFnSchema),
+})
/**
- * Rsbuild dev server fn ref when: uses file:// URLs for absolute paths.
+ * In Rsbuild dev, use file:// URLs for absolute server function paths.
* These are directly importable by Node's ESM VM runner without any bundler
* path conventions (unlike Vite's /@id/ prefix).
*/
const rsbuildDevServerFnModuleSpecifierEncoder: DevServerFnModuleSpecifierEncoder =
({ extractedFilename }) => pathToFileURL(extractedFilename).href
+const currentDir = dirname(fileURLToPath(import.meta.url))
+const metadataLoaderFilename = 'start-compiler-metadata-loader.js'
+const EMPTY_SERVER_FN_BUILD_INFO: ServerFnBuildInfo = {
+ version: 1,
+ serverFnsById: {},
+}
+
+function resolveMetadataLoader(): string {
+ return resolve(currentDir, metadataLoaderFilename)
+}
+
+function readServerFnBuildInfo(
+ module: Rspack.Module,
+): Record | null {
+ const result = serverFnBuildInfoSchema.safeParse(
+ module.buildInfo[SERVER_FN_BUILD_INFO_FIELD],
+ )
+ if (!result.success) {
+ return null
+ }
+
+ return result.data.serverFnsById
+}
+
+function setServerFnBuildInfoLoaderContext(
+ loaderContext: Rspack.LoaderContext & ServerFnBuildInfoLoaderContext,
+ module: Rspack.Module,
+) {
+ loaderContext[SERVER_FN_BUILD_INFO_CONTEXT_KEY] = (metadata) => {
+ if (metadata) {
+ module.buildInfo[SERVER_FN_BUILD_INFO_FIELD] = metadata
+ } else if (module.buildInfo[SERVER_FN_BUILD_INFO_FIELD]) {
+ module.buildInfo[SERVER_FN_BUILD_INFO_FIELD] = EMPTY_SERVER_FN_BUILD_INFO
+ }
+ }
+}
+
export interface StartCompilerHostOptions {
framework: CompileStartFrameworkOptions
root: string | (() => string)
+ environments: Array
providerEnvName: string
generateFunctionId?: GenerateFunctionIdFnOptional
compilerTransforms?: Array | undefined
@@ -63,15 +128,56 @@ export function registerStartCompilerTransforms(
serverFnsById: Record
} {
const compilers = new Map>()
+ // Serialize access to each StartCompiler's mutable per-environment caches.
+ const compilerQueues = new Map>()
const inputFileSystems = new Map()
const transformContextStorage =
new AsyncLocalStorage()
+ const serverFnMetadataByEnvironment = new Map()
+ const serverFnsByEnvironment = new Map>()
const serverFnsById = opts.serverFnsById ?? {}
const getRoot = () =>
typeof opts.root === 'function' ? opts.root() : opts.root
+ const getServerFnMetadata = (environmentName: string) => {
+ let metadataById = serverFnMetadataByEnvironment.get(environmentName)
- const onServerFnsById = (d: Record) => {
- mergeServerFnsById(serverFnsById, d)
+ if (!metadataById) {
+ metadataById = new Map()
+ serverFnMetadataByEnvironment.set(environmentName, metadataById)
+ }
+
+ return metadataById
+ }
+ const runCompilerTask = async (
+ environmentName: string,
+ task: () => Promise,
+ ): Promise => {
+ const previous = compilerQueues.get(environmentName) ?? Promise.resolve()
+ const next = previous.catch(() => undefined).then(task)
+
+ compilerQueues.set(
+ environmentName,
+ next.then(
+ () => undefined,
+ () => undefined,
+ ),
+ )
+
+ return next
+ }
+
+ const replaceServerFnsByIdFromEnvironmentSnapshots = () => {
+ const nextServerFnsById: Record = {}
+
+ for (const snapshot of serverFnsByEnvironment.values()) {
+ mergeServerFnsById(nextServerFnsById, snapshot)
+ }
+
+ for (const key of Object.keys(serverFnsById)) {
+ delete serverFnsById[key]
+ }
+
+ Object.assign(serverFnsById, nextServerFnsById)
opts.onServerFnsByIdChange?.()
}
const compilerPlugins = [
@@ -81,36 +187,55 @@ export function registerStartCompilerTransforms(
const isDev = api.context.action === 'dev'
const mode = isDev ? 'dev' : 'build'
+ const metadataLoader = resolveMetadataLoader()
- const environments: Array<{
- name: string
- type: 'client' | 'server'
- }> = [
- { name: RSBUILD_ENVIRONMENT_NAMES.client, type: 'client' },
- { name: RSBUILD_ENVIRONMENT_NAMES.server, type: 'server' },
- ]
+ const environments = opts.environments
- // Pre-compute code filter patterns per environment type
- const codeFilters: Record<'client' | 'server', Array> = {
- client: getTransformCodeFilterForEnv('client', {
- compilerPlugins,
- }),
- server: getTransformCodeFilterForEnv('server', {
- compilerTransforms: opts.compilerTransforms,
- compilerPlugins,
- }),
- }
+ // Rspack persistent cache restores modules without re-running api.transform.
+ // Keep server function modules cacheable by writing discovered metadata into
+ // buildInfo from a real loader, then replaying it from cached modules.
+ api.modifyRspackConfig((config, utils) => {
+ if (!environments.some((env) => env.name === utils.environment.name)) {
+ return
+ }
+
+ const rules = config.module.rules ?? []
+ rules.push({
+ test: TRANSFORM_ID_REGEX[0],
+ enforce: 'post',
+ use: [
+ {
+ loader: metadataLoader,
+ options: {
+ metadataById: getServerFnMetadata(utils.environment.name),
+ },
+ },
+ ],
+ })
+ config.module.rules = rules
+ })
for (const env of environments) {
- const envCodeFilters = codeFilters[env.type]
const compilerTransforms =
- env.name === RSBUILD_ENVIRONMENT_NAMES.server
- ? opts.compilerTransforms
- : undefined
+ env.name === opts.providerEnvName ? opts.compilerTransforms : undefined
+ const envCodeFilters = getTransformCodeFilterForEnv(env.type, {
+ compilerTransforms,
+ compilerPlugins,
+ })
const serverFnProviderModuleDirectives =
env.name === opts.providerEnvName
? opts.serverFnProviderModuleDirectives
: undefined
+ let activeServerFnMetadata: Record | undefined
+ const onServerFnsById = (d: Record) => {
+ mergeServerFnsById(serverFnsById, d)
+
+ if (activeServerFnMetadata) {
+ mergeServerFnsById(activeServerFnMetadata, d)
+ }
+
+ opts.onServerFnsByIdChange?.()
+ }
api.transform(
{
@@ -126,7 +251,7 @@ export function registerStartCompilerTransforms(
code: string
map: StartCompilerTransformResult['map']
} | null = null
- const id = ctx.resourcePath + (ctx.resourceQuery || '')
+ const id = ctx.resource
const root = getRoot()
const virtualResult = loadCompilerVirtualModule(compilerPlugins, {
@@ -232,10 +357,24 @@ export function registerStartCompilerTransforms(
const detectedKinds = detectKindsInCode(nextCode, env.type, {
compilerTransforms,
})
- const result = await compiler.compile({
- id,
- code: nextCode,
- detectedKinds,
+ const discoveredServerFnsById: Record = {}
+ const result = await runCompilerTask(env.name, async () => {
+ activeServerFnMetadata = discoveredServerFnsById
+
+ try {
+ return await compiler.compile({
+ id,
+ code: nextCode,
+ detectedKinds,
+ })
+ } finally {
+ activeServerFnMetadata = undefined
+ }
+ })
+
+ getServerFnMetadata(env.name).set(id, {
+ version: 1,
+ serverFnsById: discoveredServerFnsById,
})
if (result) {
@@ -252,12 +391,59 @@ export function registerStartCompilerTransforms(
}
api.modifyRspackConfig((config, utils) => {
+ if (!environments.some((env) => env.name === utils.environment.name)) {
+ return
+ }
+
config.plugins.push({
apply(compiler: Rspack.Compiler) {
if (compiler.inputFileSystem) {
inputFileSystems.set(utils.environment.name, compiler.inputFileSystem)
}
+ compiler.hooks.compilation.tap(
+ 'TanStackStartCompilerMetadataLoaderContext',
+ (compilation) => {
+ utils.rspack.NormalModule.getCompilationHooks(
+ compilation,
+ ).loader.tap(
+ 'TanStackStartCompilerMetadataLoaderContext',
+ (loaderContext, module) => {
+ setServerFnBuildInfoLoaderContext(loaderContext, module)
+ },
+ )
+ },
+ )
+
+ compiler.hooks.compile.tap('TanStackStartCompilerMetadataCleanup', () =>
+ getServerFnMetadata(utils.environment.name).clear(),
+ )
+
+ compiler.hooks.finishMake.tap(
+ {
+ name: 'TanStackStartCompilerCachedServerFnMetadata',
+ stage: -20,
+ },
+ (compilation) => {
+ const restoredServerFnsById: Record = {}
+
+ for (const module of compilation.modules) {
+ const metadata = readServerFnBuildInfo(module)
+ if (!metadata) {
+ continue
+ }
+
+ mergeServerFnsById(restoredServerFnsById, metadata)
+ }
+
+ serverFnsByEnvironment.set(
+ utils.environment.name,
+ restoredServerFnsById,
+ )
+ replaceServerFnsByIdFromEnvironmentSnapshots()
+ },
+ )
+
compiler.hooks.watchRun.tap(
'TanStackStartCompilerModuleInvalidation',
(watchCompiler) => {
diff --git a/packages/start-plugin-core/src/rsbuild/start-compiler-metadata-loader.ts b/packages/start-plugin-core/src/rsbuild/start-compiler-metadata-loader.ts
new file mode 100644
index 0000000000..89a22d82cd
--- /dev/null
+++ b/packages/start-plugin-core/src/rsbuild/start-compiler-metadata-loader.ts
@@ -0,0 +1,22 @@
+import { SERVER_FN_BUILD_INFO_CONTEXT_KEY } from './start-compiler-metadata'
+import type { Rspack } from '@rsbuild/core'
+import type {
+ ServerFnBuildInfoLoaderContext,
+ ServerFnMetadataLoaderOptions,
+} from './start-compiler-metadata'
+
+const tanStackStartCompilerMetadataLoader: Rspack.LoaderDefinition<
+ ServerFnMetadataLoaderOptions,
+ ServerFnBuildInfoLoaderContext
+> = function (source, map): void {
+ const { metadataById } = this.getOptions()
+ const id = this.resource
+ const metadata = metadataById.get(id)
+ const setBuildInfo = this[SERVER_FN_BUILD_INFO_CONTEXT_KEY]
+
+ setBuildInfo?.(metadata ?? null)
+
+ this.callback(null, source, map)
+}
+
+export default tanStackStartCompilerMetadataLoader
diff --git a/packages/start-plugin-core/src/rsbuild/start-compiler-metadata.ts b/packages/start-plugin-core/src/rsbuild/start-compiler-metadata.ts
new file mode 100644
index 0000000000..dfa6119246
--- /dev/null
+++ b/packages/start-plugin-core/src/rsbuild/start-compiler-metadata.ts
@@ -0,0 +1,20 @@
+import type { ServerFn } from '../start-compiler/types'
+
+export const SERVER_FN_BUILD_INFO_FIELD = 'tanstack.start.serverFns'
+export const SERVER_FN_BUILD_INFO_CONTEXT_KEY =
+ 'tanstack.start.setServerFnBuildInfo'
+
+export type ServerFnBuildInfo = {
+ version: 1
+ serverFnsById: Record
+}
+
+export type SetServerFnBuildInfo = (metadata: ServerFnBuildInfo | null) => void
+
+export type ServerFnBuildInfoLoaderContext = {
+ [SERVER_FN_BUILD_INFO_CONTEXT_KEY]?: SetServerFnBuildInfo
+}
+
+export type ServerFnMetadataLoaderOptions = {
+ metadataById: Map
+}
diff --git a/packages/start-plugin-core/src/rsbuild/virtual-modules.ts b/packages/start-plugin-core/src/rsbuild/virtual-modules.ts
index 766141d487..056a3e9bfc 100644
--- a/packages/start-plugin-core/src/rsbuild/virtual-modules.ts
+++ b/packages/start-plugin-core/src/rsbuild/virtual-modules.ts
@@ -14,6 +14,7 @@ import type {
} from '../types'
import type { InlineCssOptions } from '../start-manifest-plugin/manifestBuilder'
import type { ServerFn } from '../start-compiler/types'
+import type { ScriptFormat } from '@tanstack/router-core'
type RspackNamespace = typeof rspackNamespaceType
type RspackVirtualModulesPlugin = InstanceType<
@@ -66,9 +67,17 @@ export interface VirtualModuleState {
// Manifest module codegen
// ---------------------------------------------------------------------------
-function generateManifestModuleDev(devClientEntryUrl: string): string {
+function getScriptFormatProperty(scriptFormat: ScriptFormat): string {
+ return scriptFormat === 'iife' ? ` scriptFormat: 'iife',\n` : ''
+}
+
+function generateManifestModuleDev(
+ devClientEntryUrl: string,
+ scriptFormat: ScriptFormat,
+): string {
+ const scriptFormatProperty = getScriptFormatProperty(scriptFormat)
return `const fallbackManifest = {
- routes: {},
+${scriptFormatProperty} routes: {},
clientEntry: '${devClientEntryUrl}',
}
export const tsrStartManifest = () => globalThis[${JSON.stringify(DEV_START_MANIFEST_GLOBAL)}] ?? fallbackManifest`
@@ -78,6 +87,7 @@ function buildStartManifestData(
clientBuild: NormalizedClientBuild,
publicBase: string,
inlineCss: InlineCssOptions,
+ scriptFormat: ScriptFormat,
) {
const routeTreeRoutes = globalThis.TSS_ROUTES_MANIFEST
return buildStartManifest({
@@ -85,6 +95,7 @@ function buildStartManifestData(
routeTreeRoutes,
basePath: publicBase,
inlineCss,
+ scriptFormat,
})
}
@@ -92,9 +103,10 @@ function serializeStartManifestData(
clientBuild: NormalizedClientBuild,
publicBase: string,
inlineCss: InlineCssOptions,
+ scriptFormat: ScriptFormat,
): string {
return JSON.stringify(
- buildStartManifestData(clientBuild, publicBase, inlineCss),
+ buildStartManifestData(clientBuild, publicBase, inlineCss, scriptFormat),
)
}
@@ -103,13 +115,14 @@ function generateManifestModuleBuild(
publicBase: string,
_devClientEntryUrl: string,
inlineCss: InlineCssOptions,
+ scriptFormat: ScriptFormat,
): string {
if (!clientBuild) {
return `const tsrStartManifestData = ${JSON.stringify(START_MANIFEST_PLACEHOLDER)}
export const tsrStartManifest = () => tsrStartManifestData`
}
- return `export const tsrStartManifest = () => (${serializeStartManifestData(clientBuild, publicBase, inlineCss)})`
+ return `export const tsrStartManifest = () => (${serializeStartManifestData(clientBuild, publicBase, inlineCss, scriptFormat)})`
}
// ---------------------------------------------------------------------------
@@ -220,6 +233,7 @@ export interface RegisterVirtualModulesOptions {
getDevClientEntryUrl: (publicBase: string) => string
/** Whether RSC virtual modules should be registered. */
rscEnabled?: boolean | undefined
+ scriptFormat: ScriptFormat
}
/**
@@ -363,12 +377,13 @@ export function registerVirtualModules(
resolvedStartConfig.basePaths.publicBase,
)
content[paths.manifest] = isDev
- ? generateManifestModuleDev(devClientEntryUrl)
+ ? generateManifestModuleDev(devClientEntryUrl, opts.scriptFormat)
: generateManifestModuleBuild(
clientBuild,
resolvedStartConfig.basePaths.publicBase,
devClientEntryUrl,
startConfig.server.build.inlineCss,
+ opts.scriptFormat,
)
} else {
content[paths.manifest] = 'export default {}'
@@ -514,6 +529,7 @@ export function createFromReadableStream() { throw new Error('RSC SSR decode is
!isDev
? startConfig.server.build.inlineCss
: { enabled: false, transformAssets: false },
+ opts.scriptFormat,
)
},
@@ -527,6 +543,7 @@ export function createFromReadableStream() { throw new Error('RSC SSR decode is
!isDev
? startConfig.server.build.inlineCss
: { enabled: false, transformAssets: false },
+ opts.scriptFormat,
)
},
@@ -543,17 +560,15 @@ export function createFromReadableStream() { throw new Error('RSC SSR decode is
clientBuild,
resolvedStartConfig.basePaths.publicBase,
{ enabled: false, transformAssets: false },
+ opts.scriptFormat,
)
}
},
updateServerFnResolver() {
- for (const environmentName of new Set([
- RSBUILD_ENVIRONMENT_NAMES.server,
- ...(hasSeparateProviderEnvironment ? [opts.providerEnvName] : []),
- ])) {
+ const updateEnvironment = (environmentName: string) => {
if (!needsServerFnResolver(environmentName)) {
- continue
+ return
}
writeResolverContent(
@@ -561,6 +576,11 @@ export function createFromReadableStream() { throw new Error('RSC SSR decode is
generateResolverContent(environmentName),
)
}
+
+ updateEnvironment(RSBUILD_ENVIRONMENT_NAMES.server)
+ if (hasSeparateProviderEnvironment) {
+ updateEnvironment(opts.providerEnvName)
+ }
},
tryUpdateServerFnResolver(content: string) {
diff --git a/packages/start-plugin-core/src/start-manifest-plugin/manifestBuilder.ts b/packages/start-plugin-core/src/start-manifest-plugin/manifestBuilder.ts
index 6f27f37d4d..a07237fe03 100644
--- a/packages/start-plugin-core/src/start-manifest-plugin/manifestBuilder.ts
+++ b/packages/start-plugin-core/src/start-manifest-plugin/manifestBuilder.ts
@@ -4,6 +4,7 @@ import { joinURL } from 'ufo'
import {
getStylesheetHref,
resolveManifestAssetLink,
+ resolveManifestCssLink,
rootRouteId,
} from '@tanstack/router-core'
import {
@@ -12,7 +13,12 @@ import {
normalizeViteClientChunk,
} from '../vite/start-manifest-plugin/normalized-client-build'
import { processInlineCssUrls } from './inlineCss'
-import type { ManifestAssetLink, RouterManagedTag } from '@tanstack/router-core'
+import type {
+ ManifestAssetLink,
+ ManifestCssLink,
+ ManifestScript,
+ ScriptFormat,
+} from '@tanstack/router-core'
import type { InlineCssTemplate } from './inlineCss'
import type { NormalizedClientBuild, NormalizedClientChunk } from '../types'
@@ -21,12 +27,15 @@ const VISITING_CHUNK = 1
type RouteTreeRoute = {
filePath?: string
preloads?: Array
- assets?: Array
+ scripts?: Array
+ css?: Array
children?: Array
}
type RouteTreeRoutes = Record
+type AdditionalRouteManifestEntry = ManifestCssLink | ManifestScript
+
interface ScannedClientChunks {
entryChunk: NormalizedClientChunk
chunksByFileName: ReadonlyMap
@@ -36,16 +45,18 @@ interface ScannedClientChunks {
interface ManifestAssetResolvers {
getAssetPath: (fileName: string) => string
getChunkPreloads: (chunk: NormalizedClientChunk) => Array
- getStylesheetAsset: (cssFile: string) => RouterManagedTag
+ getStylesheetLink: (cssFile: string) => ManifestCssLink
}
type DedupeRoute = {
preloads?: Array
- assets?: Array
+ scripts?: Array
+ css?: Array
children?: Array
}
export interface StartManifest {
+ scriptFormat?: ScriptFormat
routes: Record
clientEntry: string
inlineCss?: {
@@ -92,12 +103,10 @@ export function appendUniqueStrings(
return result ?? target
}
-export function appendUniqueAssets(
- target: Array | undefined,
- source: Array,
+function appendUniqueStylesheets(
+ target: Array | undefined,
+ source: Array,
) {
- // Same semantics as appendUniqueStrings, but uniqueness is based on the
- // serialized asset identity instead of object reference.
if (source.length === 0) {
return target
}
@@ -106,11 +115,11 @@ export function appendUniqueAssets(
return source
}
- const seen = new Set(target.map(getAssetIdentity))
- let result: Array | undefined
+ const seen = new Set(target.map(getStylesheetIdentity))
+ let result: Array | undefined
- for (const asset of source) {
- const identity = getAssetIdentity(asset)
+ for (const stylesheet of source) {
+ const identity = getStylesheetIdentity(stylesheet)
if (seen.has(identity)) {
continue
}
@@ -119,21 +128,25 @@ export function appendUniqueAssets(
if (!result) {
result = target.slice()
}
- result.push(asset)
+ result.push(stylesheet)
}
return result ?? target
}
-function getAssetIdentity(asset: RouterManagedTag) {
+function getStylesheetIdentity(attrs: ManifestCssLink) {
+ const resolved = resolveManifestCssLink(attrs)
+ return `${resolved.href}\0${resolved.crossOrigin ?? ''}`
+}
+
+function getScriptIdentity(script: ManifestScript) {
return JSON.stringify({
- tag: asset.tag,
- attrs: normalizeAssetAttrs(asset.attrs),
- children: 'children' in asset ? (asset.children ?? null) : null,
+ attrs: normalizeAttrs(script.attrs),
+ children: script.children ?? null,
})
}
-function normalizeAssetAttrs(attrs: Record | undefined) {
+function normalizeAttrs(attrs: Record | undefined) {
if (!attrs) {
return null
}
@@ -150,26 +163,63 @@ function normalizeAssetAttrs(attrs: Record | undefined) {
function mergeRouteChunkData(options: {
route: RouteTreeRoute
chunk: NormalizedClientChunk
- getChunkCssAssets: (chunk: NormalizedClientChunk) => Array
+ getChunkCssAssets: (chunk: NormalizedClientChunk) => Array
getChunkPreloads: (chunk: NormalizedClientChunk) => Array
}) {
- const chunkAssets = options.getChunkCssAssets(options.chunk)
+ const stylesheets = options.getChunkCssAssets(options.chunk)
const chunkPreloads = options.getChunkPreloads(options.chunk)
- options.route.assets = appendUniqueAssets(options.route.assets, chunkAssets)
+ appendRouteStylesheets(options.route, stylesheets)
options.route.preloads = appendUniqueStrings(
options.route.preloads,
chunkPreloads,
)
}
+function appendRouteStylesheets(
+ route: RouteTreeRoute,
+ stylesheets: Array,
+) {
+ if (stylesheets.length === 0) {
+ return
+ }
+
+ route.css = appendUniqueStylesheets(route.css, stylesheets)
+}
+
+function appendAdditionalRouteEntries(
+ route: RouteTreeRoute,
+ entries: ReadonlyArray,
+) {
+ if (entries.length === 0) {
+ return
+ }
+
+ const stylesheets: Array = []
+ const scripts: Array = []
+
+ for (const entry of entries) {
+ if (typeof entry === 'string' || 'href' in entry) {
+ stylesheets.push(entry)
+ } else {
+ scripts.push(entry)
+ }
+ }
+
+ appendRouteStylesheets(route, stylesheets)
+ if (scripts.length > 0) {
+ route.scripts = [...(route.scripts ?? []), ...scripts]
+ }
+}
+
export function buildStartManifest(options: {
clientBuild: NormalizedClientBuild
routeTreeRoutes: RouteTreeRoutes
basePath: string
inlineCss?: InlineCssOptions
+ scriptFormat?: ScriptFormat
additionalRouteAssets?: Partial<
- Record>
+ Record>
>
}): StartManifest {
const scannedChunks = scanClientChunks(options.clientBuild)
@@ -186,12 +236,13 @@ export function buildStartManifest(options: {
dedupeNestedRouteManifestEntries(rootRouteId, routes[rootRouteId]!, routes)
- // Prune routes with no assets or preloads from the manifest
- for (const routeId of Object.keys(routes)) {
+ // Prune routes with no manifest data
+ for (const routeId in routes) {
const route = routes[routeId]!
- const hasAssets = route.assets && route.assets.length > 0
+ const hasScripts = route.scripts && route.scripts.length > 0
+ const hasCssLinks = route.css && route.css.length > 0
const hasPreloads = route.preloads && route.preloads.length > 0
- if (!hasAssets && !hasPreloads) {
+ if (!hasScripts && !hasCssLinks && !hasPreloads) {
delete routes[routeId]
}
}
@@ -201,6 +252,10 @@ export function buildStartManifest(options: {
clientEntry: assetResolvers.getAssetPath(scannedChunks.entryChunk.fileName),
}
+ if (options.scriptFormat === 'iife') {
+ result.scriptFormat = 'iife'
+ }
+
if (options.inlineCss?.enabled) {
result.inlineCss = buildInlineCssManifestData({
routes,
@@ -254,7 +309,7 @@ export function createManifestAssetResolvers(
basePath: string,
): ManifestAssetResolvers {
const assetPathByFileName = new Map()
- const stylesheetAssetByFileName = new Map()
+ const stylesheetLinkByFileName = new Map()
const preloadsByChunk = new Map>()
const getAssetPath = (fileName: string) => {
@@ -268,24 +323,17 @@ export function createManifestAssetResolvers(
return assetPath
}
- const getStylesheetAsset = (cssFile: string) => {
- const cachedAsset = stylesheetAssetByFileName.get(cssFile)
- if (cachedAsset) {
- return cachedAsset
+ const getStylesheetLink = (cssFile: string) => {
+ const cachedLink = stylesheetLinkByFileName.get(cssFile)
+ if (cachedLink) {
+ return cachedLink
}
const href = getAssetPath(cssFile)
- const asset = {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href,
- type: 'text/css',
- },
- } satisfies RouterManagedTag
+ const link = href satisfies ManifestCssLink
- stylesheetAssetByFileName.set(cssFile, asset)
- return asset
+ stylesheetLinkByFileName.set(cssFile, link)
+ return link
}
const getChunkPreloads = (chunk: NormalizedClientChunk) => {
@@ -307,39 +355,36 @@ export function createManifestAssetResolvers(
return {
getAssetPath,
getChunkPreloads,
- getStylesheetAsset,
+ getStylesheetLink,
}
}
export function createChunkCssAssetCollector(options: {
chunksByFileName: ReadonlyMap
- getStylesheetAsset: (cssFile: string) => RouterManagedTag
+ getStylesheetLink: (cssFile: string) => ManifestCssLink
}) {
- const assetsByChunk = new Map<
- NormalizedClientChunk,
- Array
- >()
+ const linksByChunk = new Map>()
const stateByChunk = new Map()
const appendAsset = (
- assets: Array,
- seenAssets: Set,
- asset: RouterManagedTag,
+ links: Array,
+ seenLinks: Set,
+ link: ManifestCssLink,
) => {
- if (seenAssets.has(asset)) {
+ if (seenLinks.has(link)) {
return
}
- seenAssets.add(asset)
- assets.push(asset)
+ seenLinks.add(link)
+ links.push(link)
}
const getChunkCssAssets = (
chunk: NormalizedClientChunk,
- ): Array => {
- const cachedAssets = assetsByChunk.get(chunk)
- if (cachedAssets) {
- return cachedAssets
+ ): Array => {
+ const cachedLinks = linksByChunk.get(chunk)
+ if (cachedLinks) {
+ return cachedLinks
}
if (stateByChunk.get(chunk) === VISITING_CHUNK) {
@@ -347,8 +392,8 @@ export function createChunkCssAssetCollector(options: {
}
stateByChunk.set(chunk, VISITING_CHUNK)
- const assets: Array = []
- const seenAssets = new Set()
+ const links: Array = []
+ const seenLinks = new Set()
for (let i = 0; i < chunk.imports.length; i++) {
const importedChunk = options.chunksByFileName.get(chunk.imports[i]!)
@@ -356,19 +401,19 @@ export function createChunkCssAssetCollector(options: {
continue
}
- const importedAssets = getChunkCssAssets(importedChunk)
- for (let j = 0; j < importedAssets.length; j++) {
- appendAsset(assets, seenAssets, importedAssets[j]!)
+ const importedLinks = getChunkCssAssets(importedChunk)
+ for (let j = 0; j < importedLinks.length; j++) {
+ appendAsset(links, seenLinks, importedLinks[j]!)
}
}
for (const cssFile of chunk.css) {
- appendAsset(assets, seenAssets, options.getStylesheetAsset(cssFile))
+ appendAsset(links, seenLinks, options.getStylesheetLink(cssFile))
}
stateByChunk.delete(chunk)
- assetsByChunk.set(chunk, assets)
- return assets
+ linksByChunk.set(chunk, links)
+ return links
}
return { getChunkCssAssets }
@@ -383,11 +428,8 @@ function buildInlineCssManifestData(options: {
const stylesheetHrefs = new Set()
for (const route of Object.values(options.routes)) {
- for (const asset of route.assets ?? []) {
- const href = getStylesheetHref(asset)
- if (href) {
- stylesheetHrefs.add(href)
- }
+ for (const link of route.css ?? []) {
+ stylesheetHrefs.add(getStylesheetHref(link))
}
}
@@ -403,7 +445,7 @@ function buildInlineCssManifestData(options: {
const { getAssetPath } = createManifestAssetResolvers(options.basePath)
const styles: Record = {}
- const templates: Record = {}
+ let templates: Record | undefined
const missingHrefs = new Set(stylesheetHrefs)
for (const [cssFile, css] of options.cssContentByFileName) {
@@ -420,6 +462,7 @@ function buildInlineCssManifestData(options: {
styles[cssHref] = result.css
if (result.template) {
+ templates ||= {}
templates[cssHref] = result.template
}
missingHrefs.delete(cssHref)
@@ -435,7 +478,7 @@ function buildInlineCssManifestData(options: {
return {
styles,
- ...(Object.keys(templates).length ? { templates } : {}),
+ ...(templates ? { templates } : {}),
}
}
@@ -449,13 +492,13 @@ export function buildRouteManifestRoutes(options: {
entryChunk: NormalizedClientChunk
assetResolvers: ManifestAssetResolvers
additionalRouteAssets?: Partial<
- Record>
+ Record>
>
}) {
const routes: Record = {}
const getChunkCssAssets = createChunkCssAssetCollector({
chunksByFileName: options.chunksByFileName,
- getStylesheetAsset: options.assetResolvers.getStylesheetAsset,
+ getStylesheetLink: options.assetResolvers.getStylesheetLink,
}).getChunkCssAssets
for (const [routeId, route] of Object.entries(options.routeTreeRoutes)) {
@@ -535,7 +578,7 @@ export function buildRouteManifestRoutes(options: {
}
const route = (routes[routeId] = routes[routeId] || {})
- route.assets = appendUniqueAssets(route.assets, [...assets])
+ appendAdditionalRouteEntries(route, assets)
}
}
@@ -546,19 +589,18 @@ function mergeReachableHydrationChunkData(options: {
route: RouteTreeRoute
chunk: NormalizedClientChunk
chunksByFileName: ReadonlyMap
- getChunkCssAssets: (chunk: NormalizedClientChunk) => Array
+ getChunkCssAssets: (chunk: NormalizedClientChunk) => Array
}) {
const visitedStaticChunks = new Set()
const mergedHydrationChunks = new Set()
const mergeHydrationChunk = (chunk: NormalizedClientChunk) => {
- if (mergedHydrationChunks.has(chunk.fileName)) return
+ if (mergedHydrationChunks.has(chunk.fileName)) {
+ return
+ }
mergedHydrationChunks.add(chunk.fileName)
- options.route.assets = appendUniqueAssets(
- options.route.assets,
- options.getChunkCssAssets(chunk),
- )
+ appendRouteStylesheets(options.route, options.getChunkCssAssets(chunk))
for (const dynamicImport of chunk.dynamicImports) {
const dynamicChunk = options.chunksByFileName.get(dynamicImport)
@@ -569,7 +611,9 @@ function mergeReachableHydrationChunkData(options: {
}
const visitStaticChunk = (chunk: NormalizedClientChunk) => {
- if (visitedStaticChunks.has(chunk.fileName)) return
+ if (visitedStaticChunks.has(chunk.fileName)) {
+ return
+ }
visitedStaticChunks.add(chunk.fileName)
for (const importedFileName of chunk.imports) {
@@ -601,10 +645,12 @@ function dedupeNestedRouteManifestEntries(
route: DedupeRoute,
routesById: Record,
seenPreloads = new Set(),
- seenAssets = new Set(),
+ seenScripts = new Set(),
+ seenStylesheets = new Set(),
) {
let routePreloads = route.preloads
- let routeAssets = route.assets
+ let routeScripts = route.scripts
+ let routeStylesheets = route.css
if (routePreloads && routePreloads.length > 0) {
let dedupedPreloads: Array | undefined
@@ -633,30 +679,65 @@ function dedupeNestedRouteManifestEntries(
}
}
- if (routeAssets && routeAssets.length > 0) {
- let dedupedAssets: Array | undefined
+ if (routeScripts && routeScripts.length > 0) {
+ let dedupedScripts: Array | undefined
- for (let i = 0; i < routeAssets.length; i++) {
- const asset = routeAssets[i]!
- const identity = getAssetIdentity(asset)
+ for (let i = 0; i < routeScripts.length; i++) {
+ const script = routeScripts[i]!
+ const identity = getScriptIdentity(script)
- if (seenAssets.has(identity)) {
- if (dedupedAssets === undefined) {
- dedupedAssets = routeAssets.slice(0, i)
+ if (seenScripts.has(identity)) {
+ if (dedupedScripts === undefined) {
+ dedupedScripts = routeScripts.slice(0, i)
}
continue
}
- seenAssets.add(identity)
+ seenScripts.add(identity)
- if (dedupedAssets) {
- dedupedAssets.push(asset)
+ if (dedupedScripts) {
+ dedupedScripts.push(script)
}
}
- if (dedupedAssets) {
- routeAssets = dedupedAssets
- route.assets = dedupedAssets
+ if (dedupedScripts) {
+ routeScripts = dedupedScripts
+ if (dedupedScripts.length > 0) {
+ route.scripts = dedupedScripts
+ } else {
+ delete route.scripts
+ }
+ }
+ }
+
+ if (routeStylesheets && routeStylesheets.length > 0) {
+ let dedupedStylesheets: Array | undefined
+
+ for (let i = 0; i < routeStylesheets.length; i++) {
+ const stylesheet = routeStylesheets[i]!
+ const identity = getStylesheetIdentity(stylesheet)
+
+ if (seenStylesheets.has(identity)) {
+ if (dedupedStylesheets === undefined) {
+ dedupedStylesheets = routeStylesheets.slice(0, i)
+ }
+ continue
+ }
+
+ seenStylesheets.add(identity)
+
+ if (dedupedStylesheets) {
+ dedupedStylesheets.push(stylesheet)
+ }
+ }
+
+ if (dedupedStylesheets) {
+ routeStylesheets = dedupedStylesheets
+ if (dedupedStylesheets.length > 0) {
+ route.css = dedupedStylesheets
+ } else {
+ delete route.css
+ }
}
}
@@ -675,7 +756,8 @@ function dedupeNestedRouteManifestEntries(
childRoute,
routesById,
seenPreloads,
- seenAssets,
+ seenScripts,
+ seenStylesheets,
)
}
}
@@ -686,9 +768,15 @@ function dedupeNestedRouteManifestEntries(
}
}
- if (routeAssets) {
- for (let i = routeAssets.length - 1; i >= 0; i--) {
- seenAssets.delete(getAssetIdentity(routeAssets[i]!))
+ if (routeScripts) {
+ for (let i = routeScripts.length - 1; i >= 0; i--) {
+ seenScripts.delete(getScriptIdentity(routeScripts[i]!))
+ }
+ }
+
+ if (routeStylesheets) {
+ for (let i = routeStylesheets.length - 1; i >= 0; i--) {
+ seenStylesheets.delete(getStylesheetIdentity(routeStylesheets[i]!))
}
}
}
diff --git a/packages/start-plugin-core/src/vite/start-manifest-plugin/plugin.ts b/packages/start-plugin-core/src/vite/start-manifest-plugin/plugin.ts
index dc027cf32f..aa2ac40936 100644
--- a/packages/start-plugin-core/src/vite/start-manifest-plugin/plugin.ts
+++ b/packages/start-plugin-core/src/vite/start-manifest-plugin/plugin.ts
@@ -99,10 +99,10 @@ function getViteAdditionalRouteAssets(options: {
)
}
- const { getStylesheetAsset } = createManifestAssetResolvers(options.basePath)
+ const { getStylesheetLink } = createManifestAssetResolvers(options.basePath)
return {
- [rootRouteId]: [getStylesheetAsset(options.cssCodeSplitDisabledFileName)],
+ [rootRouteId]: [getStylesheetLink(options.cssCodeSplitDisabledFileName)],
}
}
diff --git a/packages/start-plugin-core/tests/importProtection/virtualModules.test.ts b/packages/start-plugin-core/tests/importProtection/virtualModules.test.ts
index 10c5783259..70f174650c 100644
--- a/packages/start-plugin-core/tests/importProtection/virtualModules.test.ts
+++ b/packages/start-plugin-core/tests/importProtection/virtualModules.test.ts
@@ -14,6 +14,26 @@ import {
} from '../../src/vite/import-protection-plugin/virtualModules'
import type { ViolationInfo } from '../../src/import-protection/trace'
+type MockValue = {
+ toString: () => string
+ valueOf: () => string
+ toJSON: () => string
+}
+
+type MockFunction = {
+ (): MockValue
+}
+
+function evaluateGeneratedModule(code: string): T {
+ const exports: Record = {}
+ const runnableCode = code
+ .replace(/export default mock;?/g, 'exports.default = mock;')
+ .replace(/export const ([A-Za-z_$][\w$]*) = ([^;]+);/g, 'exports.$1 = $2;')
+
+ new Function('exports', runnableCode)(exports)
+ return exports as T
+}
+
describe('loadSilentMockModule', () => {
test('returns mock code', () => {
const result = loadSilentMockModule()
@@ -23,6 +43,17 @@ describe('loadSilentMockModule', () => {
expect(result.code).toContain('@__NO_SIDE_EFFECTS__')
expect(result.code).toContain('@__PURE__')
})
+
+ test('supports primitive conversion for called mocks', () => {
+ const result = loadSilentMockModule()
+ const mod = evaluateGeneratedModule<{ default: MockFunction }>(result.code)
+ const value = mod.default()
+
+ expect(String(value)).toBe('[import-protection mock]')
+ expect(value.toString()).toBe('[import-protection mock]')
+ expect(value.valueOf()).toBe('[import-protection mock]')
+ expect(JSON.stringify(value)).toBe('"[import-protection mock]"')
+ })
})
describe('loadMarkerModule', () => {
@@ -268,7 +299,16 @@ describe('generateSelfContainedMockModule', () => {
test('is self-contained (no imports)', () => {
const result = generateSelfContainedMockModule(['foo'])
// Should not import from any other module
- expect(result.code).not.toMatch(/\bimport\b/)
+ expect(result.code).not.toMatch(/^\s*import\s/m)
+ })
+
+ test('supports primitive conversion for named export calls', () => {
+ const result = generateSelfContainedMockModule(['getSecret'])
+ const mod = evaluateGeneratedModule<{ getSecret: MockFunction }>(
+ result.code,
+ )
+
+ expect(String(mod.getSecret())).toBe('[import-protection mock]')
})
})
diff --git a/packages/start-plugin-core/tests/rsbuild-output-directory.test.ts b/packages/start-plugin-core/tests/rsbuild-output-directory.test.ts
index 7d5414f22c..90e33fd019 100644
--- a/packages/start-plugin-core/tests/rsbuild-output-directory.test.ts
+++ b/packages/start-plugin-core/tests/rsbuild-output-directory.test.ts
@@ -1,5 +1,8 @@
import { describe, expect, test } from 'vitest'
-import { resolveRsbuildOutputDirectory } from '../src/rsbuild/planning'
+import {
+ createRsbuildEnvironmentPlan,
+ resolveRsbuildOutputDirectory,
+} from '../src/rsbuild/planning'
describe('resolveRsbuildOutputDirectory', () => {
test('uses explicit environment distPath string', () => {
@@ -57,3 +60,77 @@ describe('resolveRsbuildOutputDirectory', () => {
).toBe('dist/client')
})
})
+
+describe('createRsbuildEnvironmentPlan client output', () => {
+ const baseOptions = {
+ root: '/app',
+ entryAliases: {
+ client: '/app/src/client.tsx',
+ server: '/app/src/server.ts',
+ start: '/app/src/start.ts',
+ router: '/app/src/router.tsx',
+ alias: {
+ 'virtual:tanstack-start-client-entry': '/app/src/client.tsx',
+ 'virtual:tanstack-start-server-entry': '/app/src/server.ts',
+ '#tanstack-start-entry': '/app/src/start.ts',
+ '#tanstack-router-entry': '/app/src/router.tsx',
+ },
+ },
+ clientOutputDirectory: 'dist/client',
+ serverOutputDirectory: 'dist/server',
+ publicBase: '/_build/',
+ serverFnProviderEnv: 'ssr',
+ }
+
+ test('sets client output.module from scriptFormat', () => {
+ expect(
+ createRsbuildEnvironmentPlan({
+ ...baseOptions,
+ scriptFormat: 'iife',
+ }).environments.client!.output?.module,
+ ).toBe(false)
+
+ expect(
+ createRsbuildEnvironmentPlan({
+ ...baseOptions,
+ scriptFormat: 'module',
+ }).environments.client!.output?.module,
+ ).toBe(true)
+ })
+
+ test('throws when client output.module conflicts with scriptFormat', () => {
+ expect(() =>
+ createRsbuildEnvironmentPlan({
+ ...baseOptions,
+ scriptFormat: 'iife',
+ environmentOverrides: {
+ client: {
+ output: {
+ module: true,
+ },
+ },
+ },
+ }),
+ ).toThrow(
+ 'TanStack Start rsbuild.client.output controls environments.client.output.module',
+ )
+ })
+
+ test('throws when shared output.module conflicts with scriptFormat', () => {
+ expect(() =>
+ createRsbuildEnvironmentPlan({
+ ...baseOptions,
+ scriptFormat: 'iife',
+ environmentOverrides: {
+ all: {
+ output: {
+ module: true,
+ },
+ },
+ },
+ }),
+ ).toThrow(
+ 'TanStack Start rsbuild.client.output controls environments.client.output.module',
+ )
+ })
+})
diff --git a/packages/start-plugin-core/tests/start-manifest-plugin/manifestBuilder.test.ts b/packages/start-plugin-core/tests/start-manifest-plugin/manifestBuilder.test.ts
index 1b156c2af5..91bf8ff90d 100644
--- a/packages/start-plugin-core/tests/start-manifest-plugin/manifestBuilder.test.ts
+++ b/packages/start-plugin-core/tests/start-manifest-plugin/manifestBuilder.test.ts
@@ -2,7 +2,6 @@ import { describe, expect, test } from 'vitest'
import { deserialize } from 'seroval'
import { shouldRebaseInlineCssUrls } from '../../src/start-manifest-plugin/inlineCss'
import {
- appendUniqueAssets,
appendUniqueStrings,
buildStartManifest,
createChunkCssAssetCollector,
@@ -14,6 +13,7 @@ import {
scanClientChunks,
type StartManifest,
} from '../../src/start-manifest-plugin/manifestBuilder'
+import type { ManifestCssLink } from '@tanstack/router-core'
import type { Rollup } from 'vite'
function normalizeTestBuild(bundle: Rollup.OutputBundle) {
@@ -73,6 +73,14 @@ function makeCssAsset(fileName: string, source: string): Rollup.OutputAsset {
} as unknown as Rollup.OutputAsset
}
+function makeStylesheetLink(href: string): ManifestCssLink {
+ return href
+}
+
+function getManifestCssHref(link: ManifestCssLink) {
+ return typeof link === 'string' ? link : link.href
+}
+
describe('getRouteFilePathsFromModuleIds', () => {
test('returns unique route file paths only for tsr split modules', () => {
expect(
@@ -131,112 +139,6 @@ describe('appendUniqueStrings', () => {
})
})
-describe('appendUniqueAssets', () => {
- test('dedupes by asset identity while preserving order', () => {
- const baseAsset = {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/a.css',
- type: 'text/css',
- },
- } as const
- const duplicateAsset = {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/a.css',
- type: 'text/css',
- },
- } as const
- const newAsset = {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/b.css',
- type: 'text/css',
- },
- } as const
-
- expect(appendUniqueAssets([baseAsset], [duplicateAsset, newAsset])).toEqual(
- [baseAsset, newAsset],
- )
- })
-
- test('returns original target array when nothing new is appended', () => {
- const target = [
- {
- tag: 'link' as const,
- attrs: {
- rel: 'stylesheet',
- href: '/assets/a.css',
- type: 'text/css',
- },
- },
- ]
-
- expect(
- appendUniqueAssets(target, [
- {
- tag: 'link' as const,
- attrs: {
- rel: 'stylesheet',
- href: '/assets/a.css',
- type: 'text/css',
- },
- },
- ]),
- ).toBe(target)
- })
-
- test('keeps distinct link assets with different attributes', () => {
- const stylesheetA = {
- tag: 'link' as const,
- attrs: {
- rel: 'stylesheet',
- href: '/assets/a.css',
- media: 'screen',
- type: 'text/css',
- },
- }
- const stylesheetB = {
- tag: 'link' as const,
- attrs: {
- rel: 'stylesheet',
- href: '/assets/a.css',
- media: 'print',
- type: 'text/css',
- },
- }
-
- expect(appendUniqueAssets([stylesheetA], [stylesheetB])).toEqual([
- stylesheetA,
- stylesheetB,
- ])
- })
-
- test('keeps distinct script assets with different attributes', () => {
- const scriptA = {
- tag: 'script' as const,
- attrs: {
- src: '/assets/app.js',
- type: 'module',
- async: true,
- },
- }
- const scriptB = {
- tag: 'script' as const,
- attrs: {
- src: '/assets/app.js',
- type: 'module',
- defer: true,
- },
- }
-
- expect(appendUniqueAssets([scriptA], [scriptB])).toEqual([scriptA, scriptB])
- })
-})
-
describe('scanClientChunks', () => {
test('collects entry chunk and route chunk mappings', () => {
const entryChunk = makeChunk({ fileName: 'entry.js', isEntry: true })
@@ -283,7 +185,7 @@ describe('scanClientChunks', () => {
})
describe('createManifestAssetResolvers + createChunkCssAssetCollector', () => {
- test('reuses cached stylesheet assets', () => {
+ test('reuses cached stylesheet links', () => {
const entryChunk = makeChunk({
fileName: 'entry.js',
imports: ['shared.js'],
@@ -298,37 +200,20 @@ describe('createManifestAssetResolvers + createChunkCssAssetCollector', () => {
['shared.js', normalizeTestChunk(sharedChunk)],
])
- const resolvers = createManifestAssetResolvers('/assets')
- const cssAssetCollector = createChunkCssAssetCollector({
+ const linkResolvers = createManifestAssetResolvers('/assets')
+ const cssLinkCollector = createChunkCssAssetCollector({
chunksByFileName,
- getStylesheetAsset: resolvers.getStylesheetAsset,
+ getStylesheetLink: linkResolvers.getStylesheetLink,
})
- const assets = cssAssetCollector.getChunkCssAssets(
+ const links = cssLinkCollector.getChunkCssAssets(
chunksByFileName.get('entry.js')!,
)
- expect(assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/shared.css',
- type: 'text/css',
- },
- },
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/entry.css',
- type: 'text/css',
- },
- },
- ])
+ expect(links).toEqual(['/assets/shared.css', '/assets/entry.css'])
- expect(resolvers.getStylesheetAsset('shared.css')).toBe(
- resolvers.getStylesheetAsset('shared.css'),
+ expect(linkResolvers.getStylesheetLink('shared.css')).toBe(
+ linkResolvers.getStylesheetLink('shared.css'),
)
})
})
@@ -363,15 +248,14 @@ describe('createChunkCssAssetCollector', () => {
const { getChunkCssAssets } = createChunkCssAssetCollector({
chunksByFileName,
- getStylesheetAsset: (cssFile) => ({
- tag: 'link',
- attrs: { rel: 'stylesheet', href: `/${cssFile}`, type: 'text/css' },
+ getStylesheetLink: (cssFile) => ({
+ href: `/${cssFile}`,
}),
})
- const assets = getChunkCssAssets(chunksByFileName.get('a.js')!)
+ const links = getChunkCssAssets(chunksByFileName.get('a.js')!)
- expect(assets.map((asset: any) => asset.attrs.href)).toEqual([
+ expect(links.map(getManifestCssHref)).toEqual([
'/shared.css',
'/b.css',
'/c.css',
@@ -397,14 +281,13 @@ describe('createChunkCssAssetCollector', () => {
const { getChunkCssAssets } = createChunkCssAssetCollector({
chunksByFileName,
- getStylesheetAsset: (cssFile) => ({
- tag: 'link',
- attrs: { rel: 'stylesheet', href: `/${cssFile}`, type: 'text/css' },
+ getStylesheetLink: (cssFile) => ({
+ href: `/${cssFile}`,
}),
})
- const assets = getChunkCssAssets(chunksByFileName.get('a.js')!)
- const hrefs = assets.map((a: any) => a.attrs.href)
+ const links = getChunkCssAssets(chunksByFileName.get('a.js')!)
+ const hrefs = links.map(getManifestCssHref)
expect(hrefs).toContain('/a.css')
expect(hrefs).toContain('/b.css')
@@ -502,7 +385,7 @@ describe('buildStartManifest', () => {
})
})
- test('throws when inline CSS content is missing for a stylesheet asset', () => {
+ test('throws when inline CSS content is missing for a stylesheet link', () => {
const entryChunk = makeChunk({
fileName: 'entry.js',
isEntry: true,
@@ -523,14 +406,14 @@ describe('buildStartManifest', () => {
).toThrow('could not find CSS content')
})
- test('allows callers to attach additional route assets', () => {
+ test('allows callers to attach additional route stylesheet links', () => {
const entryChunk = makeChunk({
fileName: 'entry.js',
isEntry: true,
moduleIds: ['/src/entry.tsx'],
})
- const assetResolvers = createManifestAssetResolvers('/assets')
+ const linkResolvers = createManifestAssetResolvers('/assets')
const manifest = buildStartManifest({
clientBuild: normalizeViteClientBuild({
@@ -542,30 +425,85 @@ describe('buildStartManifest', () => {
},
basePath: '/assets',
additionalRouteAssets: {
- __root__: [assetResolvers.getStylesheetAsset('style.css')],
+ __root__: [linkResolvers.getStylesheetLink('style.css')],
},
})
- expect(manifest.routes.__root__!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/style.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes.__root__!.css).toEqual([
+ makeStylesheetLink('/assets/style.css'),
])
})
- test('rejects additional route assets for unknown route ids', () => {
+ test('dedupes duplicate additional route scripts on the same route', () => {
+ const entryChunk = makeChunk({
+ fileName: 'entry.js',
+ isEntry: true,
+ moduleIds: ['/src/entry.tsx'],
+ })
+ const script = {
+ attrs: {
+ src: '/assets/custom.js',
+ type: 'module',
+ },
+ } as const
+
+ const manifest = buildStartManifest({
+ clientBuild: normalizeViteClientBuild({
+ 'entry.js': entryChunk,
+ }),
+ routeTreeRoutes: {
+ __root__: { children: ['/about'] } as any,
+ '/about': { filePath: '/routes/about.tsx' },
+ },
+ basePath: '/assets',
+ additionalRouteAssets: {
+ __root__: [script, script],
+ },
+ })
+
+ expect(manifest.routes.__root__!.scripts).toEqual([script])
+ })
+
+ test('dedupes additional route scripts already owned by ancestor routes', () => {
+ const entryChunk = makeChunk({
+ fileName: 'entry.js',
+ isEntry: true,
+ moduleIds: ['/src/entry.tsx'],
+ })
+ const script = {
+ attrs: {
+ src: '/assets/custom.js',
+ type: 'module',
+ },
+ } as const
+
+ const manifest = buildStartManifest({
+ clientBuild: normalizeViteClientBuild({
+ 'entry.js': entryChunk,
+ }),
+ routeTreeRoutes: {
+ __root__: { children: ['/about'] } as any,
+ '/about': { filePath: '/routes/about.tsx' },
+ },
+ basePath: '/assets',
+ additionalRouteAssets: {
+ __root__: [script],
+ '/about': [script],
+ },
+ })
+
+ expect(manifest.routes.__root__!.scripts).toEqual([script])
+ expect(manifest.routes['/about']?.scripts).toBeUndefined()
+ })
+
+ test('rejects additional route entries for unknown route ids', () => {
const entryChunk = makeChunk({
fileName: 'entry.js',
isEntry: true,
moduleIds: ['/src/entry.tsx'],
})
- const assetResolvers = createManifestAssetResolvers('/assets')
+ const linkResolvers = createManifestAssetResolvers('/assets')
expect(() =>
buildStartManifest({
@@ -578,7 +516,7 @@ describe('buildStartManifest', () => {
},
basePath: '/assets',
additionalRouteAssets: {
- '/missing': [assetResolvers.getStylesheetAsset('style.css')],
+ '/missing': [linkResolvers.getStylesheetLink('style.css')],
},
}),
).toThrow(
@@ -586,7 +524,7 @@ describe('buildStartManifest', () => {
)
})
- test('dedupes route css gathered through overlapping chunk imports', () => {
+ test('dedupes route CSS gathered through overlapping chunk imports', () => {
const entryChunk = makeChunk({
fileName: 'entry.js',
isEntry: true,
@@ -626,31 +564,10 @@ describe('buildStartManifest', () => {
basePath: '/assets',
})
- expect(manifest.routes['/about']!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/shared.css',
- type: 'text/css',
- },
- },
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/branch-a.css',
- type: 'text/css',
- },
- },
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/branch-b.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes['/about']!.css).toEqual([
+ makeStylesheetLink('/assets/shared.css'),
+ makeStylesheetLink('/assets/branch-a.css'),
+ makeStylesheetLink('/assets/branch-b.css'),
])
})
@@ -683,15 +600,8 @@ describe('buildStartManifest', () => {
basePath: '/assets',
})
- expect(manifest.routes['/about']!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/about-widget.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes['/about']!.css).toEqual([
+ makeStylesheetLink('/assets/about-widget.css'),
])
expect(manifest.routes['/about']!.preloads).toEqual(['/assets/about.js'])
})
@@ -732,23 +642,9 @@ describe('buildStartManifest', () => {
basePath: '/assets',
})
- expect(manifest.routes['/about']!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/parent-widget.css',
- type: 'text/css',
- },
- },
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/child-widget.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes['/about']!.css).toEqual([
+ makeStylesheetLink('/assets/parent-widget.css'),
+ makeStylesheetLink('/assets/child-widget.css'),
])
expect(manifest.routes['/about']!.preloads).toEqual(['/assets/about.js'])
})
@@ -794,16 +690,9 @@ describe('buildStartManifest', () => {
basePath: '/assets',
})
- const expectedAsset = {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/shared-hydrate.css',
- type: 'text/css',
- },
- }
- expect(manifest.routes['/about']!.assets).toEqual([expectedAsset])
- expect(manifest.routes['/posts']!.assets).toEqual([expectedAsset])
+ const expectedLink = makeStylesheetLink('/assets/shared-hydrate.css')
+ expect(manifest.routes['/about']!.css).toEqual([expectedLink])
+ expect(manifest.routes['/posts']!.css).toEqual([expectedLink])
expect(manifest.routes['/about']!.preloads).toEqual([
'/assets/about.js',
'/assets/shared-widget.js',
@@ -843,7 +732,7 @@ describe('buildStartManifest', () => {
basePath: '/assets',
})
- expect(manifest.routes.__root__!.assets).toBeUndefined()
+ expect(manifest.routes.__root__!.css).toBeUndefined()
expect(manifest.routes.__root__!.preloads).toEqual([
'/assets/entry.js',
'/assets/app-shell.js',
@@ -894,15 +783,8 @@ describe('buildStartManifest', () => {
basePath: '/assets',
})
- expect(manifest.routes.__root__!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/root-widget.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes.__root__!.css).toEqual([
+ makeStylesheetLink('/assets/root-widget.css'),
])
expect(manifest.routes.__root__!.preloads).toEqual([
'/assets/root.js',
@@ -943,13 +825,11 @@ describe('buildStartManifest', () => {
})
expect(
- manifest.routes['/field-detail-panel']!.assets!.map(
- (asset: any) => asset.attrs.href,
- ),
+ manifest.routes['/field-detail-panel']!.css!.map(getManifestCssHref),
).toEqual(['/assets/tabs.css', '/assets/field-detail-panel.css'])
})
- test('dedupes route css already owned by ancestor routes', () => {
+ test('dedupes route CSS already owned by ancestor routes', () => {
const entryChunk = makeChunk({
fileName: 'entry.js',
isEntry: true,
@@ -980,46 +860,37 @@ describe('buildStartManifest', () => {
basePath: '/assets',
})
- expect(manifest.routes.__root__!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/main.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes.__root__!.css).toEqual([
+ makeStylesheetLink('/assets/main.css'),
])
- expect(manifest.routes['/about']!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/about.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes['/about']!.css).toEqual([
+ makeStylesheetLink('/assets/about.css'),
])
})
- test('serializeStartManifest preserves shared asset identity across routes', () => {
- const sharedAsset = {
- tag: 'link' as const,
- attrs: {
- rel: 'stylesheet',
- href: '/assets/shared.css',
- type: 'text/css',
- },
- }
+ test('serializeStartManifest preserves shared link identity across routes', () => {
+ const sharedLink = {
+ href: '/assets/shared.css',
+ crossOrigin: 'anonymous',
+ } satisfies ManifestCssLink
const manifest: StartManifest = {
routes: {
__root__: {
children: ['/a', '/b', '/c'],
},
- '/a': { assets: [sharedAsset], preloads: ['/assets/a.js'] },
- '/b': { assets: [sharedAsset], preloads: ['/assets/b.js'] },
- '/c': { assets: [sharedAsset], preloads: ['/assets/c.js'] },
+ '/a': {
+ css: [sharedLink],
+ preloads: ['/assets/a.js'],
+ },
+ '/b': {
+ css: [sharedLink],
+ preloads: ['/assets/b.js'],
+ },
+ '/c': {
+ css: [sharedLink],
+ preloads: ['/assets/c.js'],
+ },
},
clientEntry: '/assets/entry.js',
}
@@ -1028,16 +899,16 @@ describe('buildStartManifest', () => {
serializeStartManifest(manifest),
)
- const aAsset = evaluated.routes['/a']?.assets?.[0]
- const bAsset = evaluated.routes['/b']?.assets?.[0]
- const cAsset = evaluated.routes['/c']?.assets?.[0]
+ const aLink = evaluated.routes['/a']?.css?.[0]
+ const bLink = evaluated.routes['/b']?.css?.[0]
+ const cLink = evaluated.routes['/c']?.css?.[0]
- expect(aAsset).toBeDefined()
- expect(aAsset).toBe(bAsset)
- expect(bAsset).toBe(cAsset)
+ expect(aLink).toBeDefined()
+ expect(aLink).toBe(bLink)
+ expect(bLink).toBe(cLink)
})
- test('serializeStartManifest preserves non-asset fields unchanged', () => {
+ test('serializeStartManifest preserves non-link fields unchanged', () => {
const manifest: StartManifest = {
routes: {
__root__: {
@@ -1048,9 +919,8 @@ describe('buildStartManifest', () => {
filePath: '/routes/posts.tsx',
children: ['/posts/$postId'],
preloads: ['/assets/posts.js'],
- assets: [
+ scripts: [
{
- tag: 'script' as const,
attrs: {
src: '/assets/posts.js',
type: 'module',
@@ -1068,7 +938,7 @@ describe('buildStartManifest', () => {
).toEqual(manifest)
})
- test('serializeStartManifest handles manifests without route assets', () => {
+ test('serializeStartManifest handles manifests without route links', () => {
const manifest: StartManifest = {
routes: {
__root__: {
@@ -1087,10 +957,40 @@ describe('buildStartManifest', () => {
deserializeSerializedManifest(serializeStartManifest(manifest)),
).toEqual(manifest)
})
+
+ test('buildStartManifest includes scriptFormat only for iife output', () => {
+ const entryChunk = makeChunk({
+ fileName: 'entry.js',
+ isEntry: true,
+ })
+ const routeTreeRoutes = {
+ __root__: {
+ filePath: '/routes/__root.tsx',
+ },
+ }
+
+ expect(
+ buildStartManifest({
+ clientBuild: normalizeTestBuild({ 'entry.js': entryChunk }),
+ routeTreeRoutes,
+ basePath: '/assets',
+ scriptFormat: 'module',
+ }).scriptFormat,
+ ).toBeUndefined()
+
+ expect(
+ buildStartManifest({
+ clientBuild: normalizeTestBuild({ 'entry.js': entryChunk }),
+ routeTreeRoutes,
+ basePath: '/assets',
+ scriptFormat: 'iife',
+ }).scriptFormat,
+ ).toBe('iife')
+ })
})
describe('route tree dedupe in buildStartManifest', () => {
- test('dedupes assets and preloads only along the active ancestor path', () => {
+ test('dedupes stylesheet links and preloads only along the active ancestor path', () => {
const entryChunk = makeChunk({
fileName: 'entry.js',
isEntry: true,
@@ -1149,65 +1049,30 @@ describe('route tree dedupe in buildStartManifest', () => {
basePath: '/assets',
})
- expect(manifest.routes.__root__!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/shared.css',
- type: 'text/css',
- },
- },
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/root.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes.__root__!.css).toEqual([
+ makeStylesheetLink('/assets/shared.css'),
+ makeStylesheetLink('/assets/root.css'),
])
expect(manifest.routes.__root__!.preloads).toEqual([
'/assets/entry.js',
'/assets/root-shared.js',
])
- expect(manifest.routes['/parent']!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/parent.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes['/parent']!.css).toEqual([
+ makeStylesheetLink('/assets/parent.css'),
])
expect(manifest.routes['/parent']!.preloads).toEqual([
'/assets/parent.js',
'/assets/parent-only.js',
])
- expect(manifest.routes['/child']!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/child.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes['/child']!.css).toEqual([
+ makeStylesheetLink('/assets/child.css'),
])
expect(manifest.routes['/child']!.preloads).toEqual([
'/assets/child.js',
'/assets/child-only.js',
])
- expect(manifest.routes['/sibling']!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/sibling.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes['/sibling']!.css).toEqual([
+ makeStylesheetLink('/assets/sibling.css'),
])
expect(manifest.routes['/sibling']!.preloads).toEqual([
'/assets/sibling.js',
@@ -1267,37 +1132,16 @@ describe('route tree dedupe in buildStartManifest', () => {
basePath: '/assets',
})
- expect(manifest.routes['/a-child']!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/deep.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes['/a-child']!.css).toEqual([
+ makeStylesheetLink('/assets/deep.css'),
])
expect(manifest.routes['/a-child']!.preloads).toEqual([
'/assets/a-child.js',
'/assets/deep.js',
])
- expect(manifest.routes['/b-child']!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/deep.css',
- type: 'text/css',
- },
- },
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/b-child.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes['/b-child']!.css).toEqual([
+ makeStylesheetLink('/assets/deep.css'),
+ makeStylesheetLink('/assets/b-child.css'),
])
expect(manifest.routes['/b-child']!.preloads).toEqual([
'/assets/b-child.js',
@@ -1376,65 +1220,30 @@ describe('route tree dedupe in buildStartManifest', () => {
basePath: '/assets',
})
- expect(manifest.routes.__root__!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/shared-root.css',
- type: 'text/css',
- },
- },
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/root.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes.__root__!.css).toEqual([
+ makeStylesheetLink('/assets/shared-root.css'),
+ makeStylesheetLink('/assets/root.css'),
])
expect(manifest.routes.__root__!.preloads).toEqual([
'/assets/entry.js',
'/assets/shared-root.js',
])
- expect(manifest.routes['/level-one']!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/level-one.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes['/level-one']!.css).toEqual([
+ makeStylesheetLink('/assets/level-one.css'),
])
expect(manifest.routes['/level-one']!.preloads).toEqual([
'/assets/level-one.js',
'/assets/level-one-only.js',
])
- expect(manifest.routes['/level-two']!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/level-two.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes['/level-two']!.css).toEqual([
+ makeStylesheetLink('/assets/level-two.css'),
])
expect(manifest.routes['/level-two']!.preloads).toEqual([
'/assets/level-two.js',
'/assets/level-two-only.js',
])
- expect(manifest.routes['/level-three']!.assets).toEqual([
- {
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: '/assets/level-three.css',
- type: 'text/css',
- },
- },
+ expect(manifest.routes['/level-three']!.css).toEqual([
+ makeStylesheetLink('/assets/level-three.css'),
])
expect(manifest.routes['/level-three']!.preloads).toEqual([
'/assets/level-three.js',
@@ -1526,7 +1335,7 @@ describe('multi-chunk routes must merge assets and preloads', () => {
const postsRoute = manifest.routes['/posts']!
// Both chunks' CSS should be present
- const cssHrefs = postsRoute.assets!.map((a: any) => a.attrs.href)
+ const cssHrefs = postsRoute.css!.map(getManifestCssHref)
expect(cssHrefs).toContain('/assets/component.css')
expect(cssHrefs).toContain('/assets/loader.css')
@@ -1573,7 +1382,7 @@ describe('multi-chunk routes must merge assets and preloads', () => {
})
const postsRoute = manifest.routes['/posts']!
- const cssHrefs = postsRoute.assets!.map((a: any) => a.attrs.href)
+ const cssHrefs = postsRoute.css!.map(getManifestCssHref)
const preloadHrefs = postsRoute.preloads!
expect(
@@ -1586,7 +1395,7 @@ describe('multi-chunk routes must merge assets and preloads', () => {
})
describe('buildStartManifest route pruning', () => {
- test('routes with no assets or preloads are pruned from returned manifest', () => {
+ test('routes with no manifest data are pruned from returned manifest', () => {
const entryChunk = makeChunk({
fileName: 'entry.js',
isEntry: true,
@@ -1604,7 +1413,7 @@ describe('buildStartManifest route pruning', () => {
basePath: '/assets',
})
- // /about has no matching chunks, so no assets or preloads.
+ // /about has no matching chunks, so no manifest data.
// It should be pruned from the manifest.
expect(manifest.routes['/about']).toBeUndefined()
})
diff --git a/packages/start-plugin-core/vite.config.ts b/packages/start-plugin-core/vite.config.ts
index 5f52ed13b3..fc76204069 100644
--- a/packages/start-plugin-core/vite.config.ts
+++ b/packages/start-plugin-core/vite.config.ts
@@ -21,6 +21,7 @@ export default mergeConfig(
'./src/vite/index.ts',
'./src/rsbuild/index.ts',
'./src/rsbuild/types.ts',
+ './src/rsbuild/start-compiler-metadata-loader.ts',
],
srcDir: './src',
outDir: './dist',
diff --git a/packages/start-server-core/src/createStartHandler.ts b/packages/start-server-core/src/createStartHandler.ts
index 7d47388a3c..0952576051 100644
--- a/packages/start-server-core/src/createStartHandler.ts
+++ b/packages/start-server-core/src/createStartHandler.ts
@@ -497,7 +497,6 @@ export function createStartHandler(
manifest,
getRequestAssets: () =>
getStartContext({ throwIfNotFound: false })?.requestAssets,
- includeUnmatchedRouteAssets: false,
})
routerInstance.update({ additionalContext: { serverContext } })
diff --git a/packages/start-server-core/src/early-hints.ts b/packages/start-server-core/src/early-hints.ts
index 3504150929..f46cf5f587 100644
--- a/packages/start-server-core/src/early-hints.ts
+++ b/packages/start-server-core/src/early-hints.ts
@@ -1,13 +1,14 @@
import {
+ getScriptPreloadAttrs,
getStylesheetHref,
- resolveManifestAssetLink,
+ resolveManifestCssLink,
} from '@tanstack/router-core'
import type {
AnyRoute,
AnyRouteMatch,
AssetCrossOrigin,
- Manifest,
RouterManagedTag,
+ ServerManifest,
} from '@tanstack/router-core'
export type EarlyHint = {
@@ -49,7 +50,7 @@ export type ResponseLinkHeaderOptions = {
export interface EarlyHintsCollector {
collectStatic: (opts: {
- manifest: Manifest
+ manifest: ServerManifest
matchedRoutes?: ReadonlyArray
}) => void
collectDynamic: (matches: ReadonlyArray) => void
@@ -174,7 +175,7 @@ function linkAttrsToEarlyHint(
}
export function collectStaticHintsFromManifest(
- manifest: Manifest,
+ manifest: ServerManifest,
matchedRoutes: ReadonlyArray,
): Array {
const hints: Array = []
@@ -184,33 +185,32 @@ export function collectStaticHintsFromManifest(
if (!routeManifest) continue
for (const link of routeManifest.preloads ?? []) {
- const { href, crossOrigin } = resolveManifestAssetLink(link)
- const hint: EarlyHint = { href, rel: 'modulepreload', as: 'script' }
- if (crossOrigin !== undefined) hint.crossOrigin = crossOrigin
+ const attrs = getScriptPreloadAttrs(manifest, link)
+ const hint: EarlyHint = {
+ href: attrs.href,
+ rel: attrs.rel,
+ as: 'script',
+ }
+ if (attrs.crossOrigin !== undefined) hint.crossOrigin = attrs.crossOrigin
hints.push(hint)
}
- for (const asset of routeManifest.assets ?? []) {
- if (asset.tag !== 'link') continue
-
- const stylesheetHref = getStylesheetHref(asset)
- if (stylesheetHref) {
- if (manifest.inlineCss?.styles[stylesheetHref] !== undefined) continue
-
- const hint: EarlyHint = {
- href: stylesheetHref,
- rel: 'preload',
- as: 'style',
- }
- addEarlyHintFetchAttrs(hint, asset.attrs)
- hints.push(hint)
+ for (const link of routeManifest.css ?? []) {
+ const stylesheetHref = getStylesheetHref(link)
+ if (manifest.inlineCss?.styles[stylesheetHref] !== undefined) {
continue
}
+ const resolvedLink = resolveManifestCssLink(link)
- const hint = linkAttrsToEarlyHint(asset.attrs)
- if (hint) {
- hints.push(hint)
+ const hint: EarlyHint = {
+ href: stylesheetHref,
+ rel: 'preload',
+ as: 'style',
}
+ if (resolvedLink.crossOrigin !== undefined) {
+ hint.crossOrigin = resolvedLink.crossOrigin
+ }
+ hints.push(hint)
}
}
diff --git a/packages/start-server-core/src/finalManifest.ts b/packages/start-server-core/src/finalManifest.ts
index 09976ee631..a1edd4fd79 100644
--- a/packages/start-server-core/src/finalManifest.ts
+++ b/packages/start-server-core/src/finalManifest.ts
@@ -7,7 +7,7 @@ import {
getStaticHandlerInlineCssDefault,
resolveInlineCssForRequest,
} from './inlineCss'
-import type { Manifest } from '@tanstack/router-core'
+import type { ServerManifest } from '@tanstack/router-core'
import type { HandlerInlineCssOption } from './inlineCss'
import type {
CreateTransformAssetsContext,
@@ -45,7 +45,7 @@ export interface FinalManifestOptions {
}
type FinalManifestCacheKey = 'inline-css' | 'linked-css'
-type FinalManifestCache = Map>
+type FinalManifestCache = Map>
export type GetBaseManifest = () => Promise
export interface FinalManifestRequestOptions {
@@ -66,9 +66,11 @@ interface FinalManifestTransformResolver {
export interface FinalManifestResolver {
warmup: (opts: {
getBaseManifest: GetBaseManifest
- }) => Promise | undefined
- resolveCached: (opts: FinalManifestRequestOptions) => Promise
- resolveUncached: (opts: FinalManifestRequestOptions) => Promise
+ }) => Promise | undefined
+ resolveCached: (opts: FinalManifestRequestOptions) => Promise
+ resolveUncached: (
+ opts: FinalManifestRequestOptions,
+ ) => Promise
}
export function createCachedBaseManifestLoader(
@@ -206,8 +208,8 @@ function getFinalManifestCacheKey(inlineCss: boolean): FinalManifestCacheKey {
function cacheFinalManifestPromise(
cachedFinalManifestPromises: FinalManifestCache,
cacheKey: FinalManifestCacheKey,
- promise: Promise,
-): Promise {
+ promise: Promise,
+): Promise {
const cachedFinalManifestPromise = promise.catch((error) => {
if (
cachedFinalManifestPromises.get(cacheKey) === cachedFinalManifestPromise
@@ -224,8 +226,8 @@ function cacheFinalManifestPromise(
function getOrCreateCachedFinalManifestPromise(
cachedFinalManifestPromises: FinalManifestCache,
cacheKey: FinalManifestCacheKey,
- computeFinalManifest: () => Promise,
-): Promise {
+ computeFinalManifest: () => Promise,
+): Promise {
const cachedFinalManifestPromise = cachedFinalManifestPromises.get(cacheKey)
if (cachedFinalManifestPromise) {
return cachedFinalManifestPromise
@@ -242,7 +244,7 @@ async function buildFinalManifest(opts: {
base: StartManifestWithClientEntry
transformFn: TransformAssetsFn | undefined
inlineCss: boolean
-}): Promise {
+}): Promise {
return opts.transformFn
? await transformManifestAssets(opts.base, opts.transformFn, {
inlineCss: opts.inlineCss,
@@ -256,7 +258,7 @@ async function resolveFinalManifest(opts: {
cache: boolean
inlineCss: boolean
finalManifestCache?: FinalManifestCache
-}): Promise {
+}): Promise {
const computeFinalManifest = async () => {
return buildFinalManifest({
base: await opts.getBaseManifest(),
@@ -284,7 +286,7 @@ function warmupFinalManifest(opts: {
getBaseManifest: () => Promise
getTransformFn: () => Promise
onError?: () => void
-}): Promise | undefined {
+}): Promise | undefined {
if (
!opts.enabled ||
opts.handlerDefaultInlineCss === undefined ||
diff --git a/packages/start-server-core/src/request-handler.ts b/packages/start-server-core/src/request-handler.ts
index e6729cd137..0c491e00c9 100644
--- a/packages/start-server-core/src/request-handler.ts
+++ b/packages/start-server-core/src/request-handler.ts
@@ -9,7 +9,8 @@ type EarlyHintsOptions = {
* Fire-and-forget callback for HTTP 103 Early Hints.
* Only invoked in production (when TSS_DEV_SERVER !== 'true').
*
- * The `static` phase contains transformed manifest assets for matched routes.
+ * The `static` phase contains transformed manifest preloads and stylesheets
+ * for matched routes.
* The `dynamic` phase runs after route load, is skipped for redirects, and
* can contain route `head().links` or empty `hints` and `links` arrays.
* `hints` and `links` contain only values not emitted in earlier phases.
diff --git a/packages/start-server-core/src/router-manifest.ts b/packages/start-server-core/src/router-manifest.ts
index f15b689c7d..451decd6a8 100644
--- a/packages/start-server-core/src/router-manifest.ts
+++ b/packages/start-server-core/src/router-manifest.ts
@@ -1,16 +1,15 @@
-import { buildDevStylesUrl, rootRouteId } from '@tanstack/router-core'
-import type {
- AnyRoute,
- ManifestAssetLink,
- RouterManagedTag,
+import {
+ DEV_STYLES_ATTR,
+ buildDevStylesUrl,
+ rootRouteId,
} from '@tanstack/router-core'
+import type { AnyRoute, ServerManifestRoute } from '@tanstack/router-core'
import type { StartManifestWithClientEntry } from './transformAssetUrls'
// Pre-computed constant for dev styles URL basepath.
// Defaults to vite `base` (set via TSS_DEV_SSR_STYLES_BASEPATH in the plugin),
// aligning dev styles with how other CSS/JS assets are served.
const DEV_SSR_STYLES_BASEPATH = process.env.TSS_DEV_SSR_STYLES_BASEPATH || '/'
-
/**
* @description Returns the router manifest data that should be sent to the client.
* This includes only the assets and preloads for the current route and any
@@ -28,11 +27,16 @@ export async function getStartManifest(
): Promise {
const { tsrStartManifest } = await import('tanstack-start-manifest:v')
const startManifest = tsrStartManifest()
+ let routes = startManifest.routes
+ let rootRoute = routes[rootRouteId]
- const rootRoute = (startManifest.routes[rootRouteId] =
- startManifest.routes[rootRouteId] || {})
-
- rootRoute.assets = rootRoute.assets || []
+ const updateRootRoute = (nextRootRoute: ServerManifestRoute) => {
+ rootRoute = nextRootRoute
+ routes = {
+ ...routes,
+ [rootRouteId]: rootRoute,
+ }
+ }
// Inject dev styles link in dev mode (when SSR styles are enabled)
if (
@@ -41,54 +45,66 @@ export async function getStartManifest(
matchedRoutes
) {
const matchedRouteIds = matchedRoutes.map((route) => route.id)
- rootRoute.assets.push({
- tag: 'link',
- attrs: {
- rel: 'stylesheet',
- href: buildDevStylesUrl(DEV_SSR_STYLES_BASEPATH, matchedRouteIds),
- 'data-tanstack-router-dev-styles': 'true',
- },
+ updateRootRoute({
+ ...rootRoute,
+ css: [
+ ...(rootRoute?.css ?? []),
+ {
+ href: buildDevStylesUrl(DEV_SSR_STYLES_BASEPATH, matchedRouteIds),
+ [DEV_STYLES_ATTR]: true,
+ },
+ ],
})
}
- // Collect injected head scripts in dev mode (returned separately so we can
- // build the client entry script tag after URL transforms are applied)
- let injectedHeadScripts: string | undefined
if (process.env.TSS_DEV_SERVER === 'true') {
const mod = await import('tanstack-start-injected-head-scripts:v')
if (mod.injectedHeadScripts) {
- injectedHeadScripts = mod.injectedHeadScripts
+ updateRootRoute({
+ ...rootRoute,
+ scripts: [
+ ...(rootRoute?.scripts ?? []),
+ {
+ attrs: {
+ type: 'module',
+ },
+ children: mod.injectedHeadScripts,
+ },
+ ],
+ })
+ }
+ }
+
+ const manifestRoutes: Record = {}
+
+ for (const k in routes) {
+ const v = routes[k]!
+ const result = {} as ServerManifestRoute
+
+ if (v.preloads && v.preloads.length > 0) {
+ result.preloads = v.preloads
+ }
+ if (v.scripts && v.scripts.length > 0) {
+ result.scripts = v.scripts
+ }
+ if (v.css?.length) {
+ result.css = v.css
+ }
+ if (result.preloads || result.scripts || result.css) {
+ manifestRoutes[k] = result
}
}
const manifest = {
- inlineCss: startManifest.inlineCss,
- routes: Object.fromEntries(
- Object.entries(startManifest.routes).flatMap(([k, v]) => {
- const result = {} as {
- preloads?: Array
- assets?: Array
- }
- let hasData = false
- if (v.preloads && v.preloads.length > 0) {
- result['preloads'] = v.preloads
- hasData = true
- }
- if (v.assets && v.assets.length > 0) {
- result['assets'] = v.assets
- hasData = true
- }
- if (!hasData) {
- return []
- }
- return [[k, result]]
- }),
- ),
+ ...(startManifest.scriptFormat
+ ? { scriptFormat: startManifest.scriptFormat }
+ : {}),
+ ...(startManifest.inlineCss ? { inlineCss: startManifest.inlineCss } : {}),
+ routes: manifestRoutes,
}
return {
manifest: manifest as StartManifestWithClientEntry['manifest'],
clientEntry: startManifest.clientEntry,
- injectedHeadScripts,
}
}
diff --git a/packages/start-server-core/src/tanstack-start.d.ts b/packages/start-server-core/src/tanstack-start.d.ts
index 3cf079c02a..d4aa2b6d42 100644
--- a/packages/start-server-core/src/tanstack-start.d.ts
+++ b/packages/start-server-core/src/tanstack-start.d.ts
@@ -1,7 +1,7 @@
declare module 'tanstack-start-manifest:v' {
- import type { Manifest } from '@tanstack/router-core'
+ import type { ServerManifest } from '@tanstack/router-core'
- export const tsrStartManifest: () => Manifest & { clientEntry: string }
+ export const tsrStartManifest: () => ServerManifest & { clientEntry: string }
}
declare module 'tanstack-start-route-tree:v' {
diff --git a/packages/start-server-core/src/transformAssetUrls.ts b/packages/start-server-core/src/transformAssetUrls.ts
index 2b387fbb7a..c2b03ad9e3 100644
--- a/packages/start-server-core/src/transformAssetUrls.ts
+++ b/packages/start-server-core/src/transformAssetUrls.ts
@@ -1,11 +1,17 @@
-import { resolveManifestAssetLink, rootRouteId } from '@tanstack/router-core'
+import {
+ getManifestScriptFormat,
+ resolveManifestAssetLink,
+ resolveManifestCssLink,
+} from '@tanstack/router-core'
import type {
AssetCrossOrigin,
Awaitable,
- Manifest,
ManifestAssetLink,
- RouterManagedTag,
+ ManifestCssLink,
+ ManifestScript,
+ ScriptFormat,
+ ServerManifest,
} from '@tanstack/router-core'
export type { AssetCrossOrigin }
@@ -13,16 +19,12 @@ export type { AssetCrossOrigin }
export type TransformAssetsContext =
| {
url: string
- kind: 'modulepreload'
+ kind: 'script'
}
| {
url: string
kind: 'stylesheet'
}
- | {
- url: string
- kind: 'clientEntry'
- }
| {
url: string
kind: 'css-url'
@@ -33,7 +35,7 @@ export type TransformAssetKind = TransformAssetsContext['kind']
type TransformAssetsShorthandCrossOriginKind = Exclude<
TransformAssetKind,
- 'clientEntry' | 'css-url'
+ 'css-url'
>
export type TransformAssetResult =
@@ -114,7 +116,7 @@ export type TransformAssetsOptions =
* crossOrigin: 'anonymous'
*
* // Different values per kind
- * crossOrigin: { modulepreload: 'anonymous', stylesheet: 'use-credentials' }
+ * crossOrigin: { script: 'anonymous', stylesheet: 'use-credentials' }
* ```
*/
export type TransformAssetsCrossOriginConfig =
@@ -136,7 +138,7 @@ export interface TransformAssetsObjectShorthand {
/** URL prefix prepended to every asset URL. */
prefix: string
/**
- * Optional crossOrigin attribute applied to manifest-managed `` assets.
+ * Optional crossOrigin attribute applied to transformed script and stylesheet assets.
*
* Accepts a single value or a per-kind record.
*/
@@ -211,7 +213,7 @@ async function transformInlineCssTemplate(options: {
}
async function transformInlineCssStyles(
- inlineCss: NonNullable,
+ inlineCss: NonNullable,
transformFn: TransformAssetsFn,
) {
const transformedStyles: Record = {}
@@ -287,7 +289,7 @@ export function resolveTransformAssetsConfig(
transformFn: ({ url, kind }) => {
const href = `${prefix}${url}`
- if (kind === 'clientEntry' || kind === 'css-url') {
+ if (kind === 'css-url') {
return { href }
}
@@ -321,44 +323,104 @@ export function resolveTransformAssetsConfig(
}
export interface StartManifestWithClientEntry {
- manifest: Manifest
+ manifest: ServerManifest
clientEntry: string
- /** Script content prepended before the client entry import (dev only) */
- injectedHeadScripts?: string
}
/**
* Builds the client entry `', endIndex)
+
+ expect(endIndex).toBeGreaterThan(-1)
+ expect(lastScriptOpen).toBeGreaterThan(lastScriptClose)
+ expect(slowAsyncPayloadIndex).toBeGreaterThan(-1)
+ expect(slowAsyncPayloadIndex).toBeLessThan(endIndex)
+ expect(html.slice(lastScriptOpen, endIndex)).toContain('.return(void 0)')
+ expect(endIndex).toBeLessThan(html.indexOf(''))
+ })
})
diff --git a/e2e/vue-router/scroll-restoration-sandbox-vite/dist-hash/assets/index-BwsVWHwV.js b/e2e/vue-router/scroll-restoration-sandbox-vite/dist-hash/assets/index-BwsVWHwV.js
deleted file mode 100644
index 1f78534259..0000000000
--- a/e2e/vue-router/scroll-restoration-sandbox-vite/dist-hash/assets/index-BwsVWHwV.js
+++ /dev/null
@@ -1,18 +0,0 @@
-const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/page-with-search-BhJv4yJI.js","assets/scroll-block-BAas_Ct-.js","assets/normal-page-BPOVyYTF.js","assets/virtual-page.lazy-BCqvdivF.js","assets/lazy-with-loader-page.lazy-BzLmn584.js","assets/lazy-page.lazy-BzoMuhUY.js"])))=>i.map(i=>d[i]);
-(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function s(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(r){if(r.ep)return;r.ep=!0;const i=s(r);fetch(r.href,i)}})();/**
-* @vue/shared v3.5.25
-* (c) 2018-present Yuxi (Evan) You and Vue contributors
-* @license MIT
-**/function Or(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const me={},_s=[],Xe=()=>{},Eo=()=>!1,In=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ar=e=>e.startsWith("onUpdate:"),be=Object.assign,Nr=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},tc=Object.prototype.hasOwnProperty,le=(e,t)=>tc.call(e,t),X=Array.isArray,bs=e=>Ln(e)==="[object Map]",sc=e=>Ln(e)==="[object Set]",Y=e=>typeof e=="function",xe=e=>typeof e=="string",as=e=>typeof e=="symbol",ge=e=>e!==null&&typeof e=="object",Oo=e=>(ge(e)||Y(e))&&Y(e.then)&&Y(e.catch),nc=Object.prototype.toString,Ln=e=>nc.call(e),rc=e=>Ln(e).slice(8,-1),ic=e=>Ln(e)==="[object Object]",Fr=e=>xe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,xs=Or(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Mn=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},oc=/-\w/g,Pt=Mn(e=>e.replace(oc,t=>t.slice(1).toUpperCase())),ac=/\B([A-Z])/g,Zt=Mn(e=>e.replace(ac,"-$1").toLowerCase()),Ao=Mn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Un=Mn(e=>e?`on${Ao(e)}`:""),xt=(e,t)=>!Object.is(e,t),Hn=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},cc=e=>{const t=parseFloat(e);return isNaN(t)?e:t},lc=e=>{const t=xe(e)?Number(e):NaN;return isNaN(t)?e:t};let Ri;const En=()=>Ri||(Ri=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function $r(e){if(X(e)){const t={};for(let s=0;s{if(s){const n=s.split(fc);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Br(e){let t="";if(xe(e))t=e;else if(X(e))for(let s=0;s0&&--this._on===0&&(Ee=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s0)return;if(Ss){let t=Ss;for(Ss=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;ws;){let t=ws;for(ws=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function jo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Do(e){let t,s=e.depsTail,n=s;for(;n;){const r=n.prevDep;n.version===-1?(n===s&&(s=r),Vr(n),yc(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}e.deps=t,e.depsTail=s}function lr(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Vo(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Vo(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ms)||(e.globalVersion=Ms,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!lr(e))))return;e.flags|=2;const t=e.dep,s=pe,n=He;pe=e,He=!0;try{jo(e);const r=e.fn(e._value);(t.version===0||xt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{pe=s,He=n,Do(e),e.flags&=-3}}function Vr(e,t=!1){const{dep:s,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)Vr(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function yc(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}function _c(e,t){e.effect instanceof an&&(e=e.effect.fn);const s=new an(e);t&&be(s,t);try{s.run()}catch(r){throw s.stop(),r}const n=s.run.bind(s);return n.effect=s,n}let He=!0;const Uo=[];function ct(){Uo.push(He),He=!1}function lt(){const e=Uo.pop();He=e===void 0?!0:e}function Ci(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=pe;pe=void 0;try{t()}finally{pe=s}}}let Ms=0,bc=class{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class Ur{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!pe||!He||pe===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==pe)s=this.activeLink=new bc(pe,this),pe.deps?(s.prevDep=pe.depsTail,pe.depsTail.nextDep=s,pe.depsTail=s):pe.deps=pe.depsTail=s,Ho(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=pe.depsTail,s.nextDep=void 0,pe.depsTail.nextDep=s,pe.depsTail=s,pe.deps===s&&(pe.deps=n)}return s}trigger(t){this.version++,Ms++,this.notify(t)}notify(t){jr();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Dr()}}}function Ho(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Ho(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const ur=new WeakMap,Ft=Symbol(""),fr=Symbol(""),Es=Symbol("");function Se(e,t,s){if(He&&pe){let n=ur.get(e);n||ur.set(e,n=new Map);let r=n.get(s);r||(n.set(s,r=new Ur),r.map=n,r.key=s),r.track()}}function ot(e,t,s,n,r,i){const o=ur.get(e);if(!o){Ms++;return}const a=c=>{c&&c.trigger()};if(jr(),t==="clear")o.forEach(a);else{const c=X(e),u=c&&Fr(s);if(c&&s==="length"){const f=Number(n);o.forEach((l,d)=>{(d==="length"||d===Es||!as(d)&&d>=f)&&a(l)})}else switch((s!==void 0||o.has(void 0))&&a(o.get(s)),u&&a(o.get(Es)),t){case"add":c?u&&a(o.get("length")):(a(o.get(Ft)),bs(e)&&a(o.get(fr)));break;case"delete":c||(a(o.get(Ft)),bs(e)&&a(o.get(fr)));break;case"set":bs(e)&&a(o.get(Ft));break}}Dr()}function zt(e){const t=ae(e);return t===e?t:(Se(t,"iterate",Es),Ze(e)?t:t.map(ut))}function Hr(e){return Se(e=ae(e),"iterate",Es),e}function ht(e,t){return kt(e)?Jt(e)?Os(ut(t)):Os(t):ut(t)}const xc={__proto__:null,[Symbol.iterator](){return Wn(this,Symbol.iterator,e=>ht(this,e))},concat(...e){return zt(this).concat(...e.map(t=>X(t)?zt(t):t))},entries(){return Wn(this,"entries",e=>(e[1]=ht(this,e[1]),e))},every(e,t){return rt(this,"every",e,t,void 0,arguments)},filter(e,t){return rt(this,"filter",e,t,s=>s.map(n=>ht(this,n)),arguments)},find(e,t){return rt(this,"find",e,t,s=>ht(this,s),arguments)},findIndex(e,t){return rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return rt(this,"findLast",e,t,s=>ht(this,s),arguments)},findLastIndex(e,t){return rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return zn(this,"includes",e)},indexOf(...e){return zn(this,"indexOf",e)},join(e){return zt(this).join(e)},lastIndexOf(...e){return zn(this,"lastIndexOf",e)},map(e,t){return rt(this,"map",e,t,void 0,arguments)},pop(){return hs(this,"pop")},push(...e){return hs(this,"push",e)},reduce(e,...t){return Pi(this,"reduce",e,t)},reduceRight(e,...t){return Pi(this,"reduceRight",e,t)},shift(){return hs(this,"shift")},some(e,t){return rt(this,"some",e,t,void 0,arguments)},splice(...e){return hs(this,"splice",e)},toReversed(){return zt(this).toReversed()},toSorted(e){return zt(this).toSorted(e)},toSpliced(...e){return zt(this).toSpliced(...e)},unshift(...e){return hs(this,"unshift",e)},values(){return Wn(this,"values",e=>ht(this,e))}};function Wn(e,t,s){const n=Hr(e),r=n[t]();return n!==e&&!Ze(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=s(i.value)),i}),r}const wc=Array.prototype;function rt(e,t,s,n,r,i){const o=Hr(e),a=o!==e&&!Ze(e),c=o[t];if(c!==wc[t]){const l=c.apply(e,i);return a?ut(l):l}let u=s;o!==e&&(a?u=function(l,d){return s.call(this,ht(e,l),d,e)}:s.length>2&&(u=function(l,d){return s.call(this,l,d,e)}));const f=c.call(o,u,n);return a&&r?r(f):f}function Pi(e,t,s,n){const r=Hr(e);let i=s;return r!==e&&(Ze(e)?s.length>3&&(i=function(o,a,c){return s.call(this,o,a,c,e)}):i=function(o,a,c){return s.call(this,o,ht(e,a),c,e)}),r[t](i,...n)}function zn(e,t,s){const n=ae(e);Se(n,"iterate",Es);const r=n[t](...s);return(r===-1||r===!1)&&Kr(s[0])?(s[0]=ae(s[0]),n[t](...s)):r}function hs(e,t,s=[]){ct(),jr();const n=ae(e)[t].apply(e,s);return Dr(),lt(),n}const Sc=Or("__proto__,__v_isRef,__isVue"),Zo=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(as));function Rc(e){as(e)||(e=String(e));const t=ae(this);return Se(t,"has",e),t.hasOwnProperty(e)}class Wo{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!r;if(s==="__v_isReadonly")return r;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(r?i?Ac:Go:i?qo:Ko).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const o=X(t);if(!r){let c;if(o&&(c=xc[s]))return c;if(s==="hasOwnProperty")return Rc}const a=Reflect.get(t,s,Re(t)?t:n);if((as(s)?Zo.has(s):Sc(s))||(r||Se(t,"get",s),i))return a;if(Re(a)){const c=o&&Fr(s)?a:a.value;return r&&ge(c)?cn(c):c}return ge(a)?r?cn(a):Wr(a):a}}class zo extends Wo{constructor(t=!1){super(!1,t)}set(t,s,n,r){let i=t[s];const o=X(t)&&Fr(s);if(!this._isShallow){const u=kt(i);if(!Ze(n)&&!kt(n)&&(i=ae(i),n=ae(n)),!o&&Re(i)&&!Re(n))return u||(i.value=n),!0}const a=o?Number(s)e,Gs=e=>Reflect.getPrototypeOf(e);function Ic(e,t,s){return function(...n){const r=this.__v_raw,i=ae(r),o=bs(i),a=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,u=r[e](...n),f=s?dr:t?Os:ut;return!t&&Se(i,"iterate",c?fr:Ft),{next(){const{value:l,done:d}=u.next();return d?{value:l,done:d}:{value:a?[f(l[0]),f(l[1])]:f(l),done:d}},[Symbol.iterator](){return this}}}}function Js(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Lc(e,t){const s={get(r){const i=this.__v_raw,o=ae(i),a=ae(r);e||(xt(r,a)&&Se(o,"get",r),Se(o,"get",a));const{has:c}=Gs(o),u=t?dr:e?Os:ut;if(c.call(o,r))return u(i.get(r));if(c.call(o,a))return u(i.get(a));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&Se(ae(r),"iterate",Ft),r.size},has(r){const i=this.__v_raw,o=ae(i),a=ae(r);return e||(xt(r,a)&&Se(o,"has",r),Se(o,"has",a)),r===a?i.has(r):i.has(r)||i.has(a)},forEach(r,i){const o=this,a=o.__v_raw,c=ae(a),u=t?dr:e?Os:ut;return!e&&Se(c,"iterate",Ft),a.forEach((f,l)=>r.call(i,u(f),u(l),o))}};return be(s,e?{add:Js("add"),set:Js("set"),delete:Js("delete"),clear:Js("clear")}:{add(r){!t&&!Ze(r)&&!kt(r)&&(r=ae(r));const i=ae(this);return Gs(i).has.call(i,r)||(i.add(r),ot(i,"add",r,r)),this},set(r,i){!t&&!Ze(i)&&!kt(i)&&(i=ae(i));const o=ae(this),{has:a,get:c}=Gs(o);let u=a.call(o,r);u||(r=ae(r),u=a.call(o,r));const f=c.call(o,r);return o.set(r,i),u?xt(i,f)&&ot(o,"set",r,i):ot(o,"add",r,i),this},delete(r){const i=ae(this),{has:o,get:a}=Gs(i);let c=o.call(i,r);c||(r=ae(r),c=o.call(i,r)),a&&a.call(i,r);const u=i.delete(r);return c&&ot(i,"delete",r,void 0),u},clear(){const r=ae(this),i=r.size!==0,o=r.clear();return i&&ot(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{s[r]=Ic(r,e,t)}),s}function Zr(e,t){const s=Lc(e,t);return(n,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?n:Reflect.get(le(s,r)&&r in n?s:n,r,i)}const Mc={get:Zr(!1,!1)},Ec={get:Zr(!1,!0)},Oc={get:Zr(!0,!1)};const Ko=new WeakMap,qo=new WeakMap,Go=new WeakMap,Ac=new WeakMap;function Nc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Fc(e){return e.__v_skip||!Object.isExtensible(e)?0:Nc(rc(e))}function Wr(e){return kt(e)?e:zr(e,!1,Pc,Mc,Ko)}function $c(e){return zr(e,!1,Tc,Ec,qo)}function cn(e){return zr(e,!0,kc,Oc,Go)}function zr(e,t,s,n,r){if(!ge(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Fc(e);if(i===0)return e;const o=r.get(e);if(o)return o;const a=new Proxy(e,i===2?n:s);return r.set(e,a),a}function Jt(e){return kt(e)?Jt(e.__v_raw):!!(e&&e.__v_isReactive)}function kt(e){return!!(e&&e.__v_isReadonly)}function Ze(e){return!!(e&&e.__v_isShallow)}function Kr(e){return e?!!e.__v_raw:!1}function ae(e){const t=e&&e.__v_raw;return t?ae(t):e}function hr(e){return!le(e,"__v_skip")&&Object.isExtensible(e)&&No(e,"__v_skip",!0),e}const ut=e=>ge(e)?Wr(e):e,Os=e=>ge(e)?cn(e):e;function Re(e){return e?e.__v_isRef===!0:!1}function we(e){return Jo(e,!1)}function Bc(e){return Jo(e,!0)}function Jo(e,t){return Re(e)?e:new jc(e,t)}class jc{constructor(t,s){this.dep=new Ur,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:ae(t),this._value=s?t:ut(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Ze(t)||kt(t);t=n?t:ae(t),xt(t,s)&&(this._rawValue=t,this._value=n?t:ut(t),this.dep.trigger())}}function Dc(e){return Re(e)?e.value:e}const Vc={get:(e,t,s)=>t==="__v_raw"?e:Dc(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const r=e[t];return Re(r)&&!Re(s)?(r.value=s,!0):Reflect.set(e,t,s,n)}};function Yo(e){return Jt(e)?e:new Proxy(e,Vc)}class Uc{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Ur(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ms-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&pe!==this)return Bo(this,!0),!0}get value(){const t=this.dep.track();return Vo(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Hc(e,t,s=!1){let n,r;return Y(e)?n=e:(n=e.get,r=e.set),new Uc(n,r,s)}const Ys={},ln=new WeakMap;let At;function Zc(e,t=!1,s=At){if(s){let n=ln.get(s);n||ln.set(s,n=[]),n.push(e)}}function Wc(e,t,s=me){const{immediate:n,deep:r,once:i,scheduler:o,augmentJob:a,call:c}=s,u=C=>r?C:Ze(C)||r===!1||r===0?vt(C,1):vt(C);let f,l,d,h,g=!1,y=!1;if(Re(e)?(l=()=>e.value,g=Ze(e)):Jt(e)?(l=()=>u(e),g=!0):X(e)?(y=!0,g=e.some(C=>Jt(C)||Ze(C)),l=()=>e.map(C=>{if(Re(C))return C.value;if(Jt(C))return u(C);if(Y(C))return c?c(C,2):C()})):Y(e)?t?l=c?()=>c(e,2):e:l=()=>{if(d){ct();try{d()}finally{lt()}}const C=At;At=f;try{return c?c(e,3,[h]):e(h)}finally{At=C}}:l=Xe,t&&r){const C=l,k=r===!0?1/0:r;l=()=>vt(C(),k)}const x=vc(),b=()=>{f.stop(),x&&x.active&&Nr(x.effects,f)};if(i&&t){const C=t;t=(...k)=>{C(...k),b()}}let L=y?new Array(e.length).fill(Ys):Ys;const $=C=>{if(!(!(f.flags&1)||!f.dirty&&!C))if(t){const k=f.run();if(r||g||(y?k.some((_,D)=>xt(_,L[D])):xt(k,L))){d&&d();const _=At;At=f;try{const D=[k,L===Ys?void 0:y&&L[0]===Ys?[]:L,h];L=k,c?c(t,3,D):t(...D)}finally{At=_}}}else f.run()};return a&&a($),f=new an(l),f.scheduler=o?()=>o($,!1):$,h=C=>Zc(C,!1,f),d=f.onStop=()=>{const C=ln.get(f);if(C){if(c)c(C,4);else for(const k of C)k();ln.delete(f)}},t?n?$(!0):L=f.run():o?o($.bind(null,!0),!0):f.run(),b.pause=f.pause.bind(f),b.resume=f.resume.bind(f),b.stop=b,b}function vt(e,t=1/0,s){if(t<=0||!ge(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Re(e))vt(e.value,t,s);else if(X(e))for(let n=0;n{vt(n,t,s)});else if(ic(e)){for(const n in e)vt(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&vt(e[n],t,s)}return e}/**
-* @vue/runtime-core v3.5.25
-* (c) 2018-present Yuxi (Evan) You and Vue contributors
-* @license MIT
-**/function Zs(e,t,s,n){try{return n?e(...n):e()}catch(r){Ws(r,t,s)}}function tt(e,t,s,n){if(Y(e)){const r=Zs(e,t,s,n);return r&&Oo(r)&&r.catch(i=>{Ws(i,t,s)}),r}if(X(e)){const r=[];for(let i=0;i>>1,r=ke[n],i=As(r);i=As(s)?ke.push(e):ke.splice(Kc(t),0,e),e.flags|=1,Qo()}}function Qo(){un||(un=Xo.then(ta))}function mr(e){X(e)?Yt.push(...e):pt&&e.id===-1?pt.splice(Kt+1,0,e):e.flags&1||(Yt.push(e),e.flags|=1),Qo()}function ki(e,t,s=Je+1){for(;sAs(s)-As(n));if(Yt.length=0,pt){pt.push(...t);return}for(pt=t,Kt=0;Kte.id==null?e.flags&2?-1:1/0:e.id;function ta(e){try{for(Je=0;Je{n._d&&pn(-1);const i=fn(t);let o;try{o=e(...r)}finally{fn(i),n._d&&pn(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Et(e,t,s,n){const r=e.dirs,i=t&&t.dirs;for(let o=0;oe.__isTeleport,Yc=Symbol("_leaveCb");function Gr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Gr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ve(e,t){return Y(e)?be({name:e.name},t,{setup:e}):e}function na(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const dn=new WeakMap;function Rs(e,t,s,n,r=!1){if(X(e)){e.forEach((g,y)=>Rs(g,t&&(X(t)?t[y]:t),s,n,r));return}if(Cs(n)&&!r){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Rs(e,t,s,n.component.subTree);return}const i=n.shapeFlag&4?ii(n.component):n.el,o=r?null:i,{i:a,r:c}=e,u=t&&t.r,f=a.refs===me?a.refs={}:a.refs,l=a.setupState,d=ae(l),h=l===me?Eo:g=>le(d,g);if(u!=null&&u!==c){if(Ti(t),xe(u))f[u]=null,h(u)&&(l[u]=null);else if(Re(u)){u.value=null;const g=t;g.k&&(f[g.k]=null)}}if(Y(c))Zs(c,a,12,[o,f]);else{const g=xe(c),y=Re(c);if(g||y){const x=()=>{if(e.f){const b=g?h(c)?l[c]:f[c]:c.value;if(r)X(b)&&Nr(b,i);else if(X(b))b.includes(i)||b.push(i);else if(g)f[c]=[i],h(c)&&(l[c]=f[c]);else{const L=[i];c.value=L,e.k&&(f[e.k]=L)}}else g?(f[c]=o,h(c)&&(l[c]=o)):y&&(c.value=o,e.k&&(f[e.k]=o))};if(o){const b=()=>{x(),dn.delete(e)};b.id=-1,dn.set(e,b),Me(b,s)}else Ti(e),x()}}}function Ti(e){const t=dn.get(e);t&&(t.flags|=8,dn.delete(e))}En().requestIdleCallback;En().cancelIdleCallback;const Cs=e=>!!e.type.__asyncLoader,ra=e=>e.type.__isKeepAlive;function Xc(e,t){ia(e,"a",t)}function Qc(e,t){ia(e,"da",t)}function ia(e,t,s=Te){const n=e.__wdc||(e.__wdc=()=>{let r=s;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(On(t,n,s),s){let r=s.parent;for(;r&&r.parent;)ra(r.parent.vnode)&&el(n,t,s,r),r=r.parent}}function el(e,t,s,n){const r=On(t,e,n,!0);Jr(()=>{Nr(n[t],r)},s)}function On(e,t,s=Te,n=!1){if(s){const r=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...o)=>{ct();const a=zs(s),c=tt(t,s,e,o);return a(),lt(),c});return n?r.unshift(i):r.push(i),i}}const dt=e=>(t,s=Te)=>{(!$s||e==="sp")&&On(e,(...n)=>t(...n),s)},tl=dt("bm"),at=dt("m"),sl=dt("bu"),nl=dt("u"),rl=dt("bum"),Jr=dt("um"),il=dt("sp"),ol=dt("rtg"),al=dt("rtc");function oa(e,t=Te){On("ec",e,t)}const cl=Symbol.for("v-ndc"),gr=e=>e?Ca(e)?ii(e):gr(e.parent):null,Ps=be(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>gr(e.parent),$root:e=>gr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Yr(e),$forceUpdate:e=>e.f||(e.f=()=>{qr(e.update)}),$nextTick:e=>e.n||(e.n=pr.bind(e.proxy)),$watch:e=>_l.bind(e)}),Kn=(e,t)=>e!==me&&!e.__isScriptSetup&&le(e,t),ll={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:r,props:i,accessCache:o,type:a,appContext:c}=e;if(t[0]!=="$"){const d=o[t];if(d!==void 0)switch(d){case 1:return n[t];case 2:return r[t];case 4:return s[t];case 3:return i[t]}else{if(Kn(n,t))return o[t]=1,n[t];if(r!==me&&le(r,t))return o[t]=2,r[t];if(le(i,t))return o[t]=3,i[t];if(s!==me&&le(s,t))return o[t]=4,s[t];vr&&(o[t]=0)}}const u=Ps[t];let f,l;if(u)return t==="$attrs"&&Se(e.attrs,"get",""),u(e);if((f=a.__cssModules)&&(f=f[t]))return f;if(s!==me&&le(s,t))return o[t]=4,s[t];if(l=c.config.globalProperties,le(l,t))return l[t]},set({_:e},t,s){const{data:n,setupState:r,ctx:i}=e;return Kn(r,t)?(r[t]=s,!0):n!==me&&le(n,t)?(n[t]=s,!0):le(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:r,props:i,type:o}},a){let c;return!!(s[a]||e!==me&&a[0]!=="$"&&le(e,a)||Kn(t,a)||le(i,a)||le(n,a)||le(Ps,a)||le(r.config.globalProperties,a)||(c=o.__cssModules)&&c[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:le(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Ii(e){return X(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let vr=!0;function ul(e){const t=Yr(e),s=e.proxy,n=e.ctx;vr=!1,t.beforeCreate&&Li(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:a,provide:c,inject:u,created:f,beforeMount:l,mounted:d,beforeUpdate:h,updated:g,activated:y,deactivated:x,beforeDestroy:b,beforeUnmount:L,destroyed:$,unmounted:C,render:k,renderTracked:_,renderTriggered:D,errorCaptured:M,serverPrefetch:B,expose:W,inheritAttrs:J,components:de,directives:P,filters:H}=t;if(u&&fl(u,n,null),o)for(const ie in o){const oe=o[ie];Y(oe)&&(n[ie]=oe.bind(s))}if(r){const ie=r.call(s,s);ge(ie)&&(e.data=Wr(ie))}if(vr=!0,i)for(const ie in i){const oe=i[ie],nt=Y(oe)?oe.bind(s,s):Y(oe.get)?oe.get.bind(s,s):Xe,Ks=!Y(oe)&&Y(oe.set)?oe.set.bind(s):Xe,Mt=fe({get:nt,set:Ks});Object.defineProperty(n,ie,{enumerable:!0,configurable:!0,get:()=>Mt.value,set:We=>Mt.value=We})}if(a)for(const ie in a)aa(a[ie],n,s,ie);if(c){const ie=Y(c)?c.call(s):c;Reflect.ownKeys(ie).forEach(oe=>{An(oe,ie[oe])})}f&&Li(f,e,"c");function Q(ie,oe){X(oe)?oe.forEach(nt=>ie(nt.bind(s))):oe&&ie(oe.bind(s))}if(Q(tl,l),Q(at,d),Q(sl,h),Q(nl,g),Q(Xc,y),Q(Qc,x),Q(oa,M),Q(al,_),Q(ol,D),Q(rl,L),Q(Jr,C),Q(il,B),X(W))if(W.length){const ie=e.exposed||(e.exposed={});W.forEach(oe=>{Object.defineProperty(ie,oe,{get:()=>s[oe],set:nt=>s[oe]=nt,enumerable:!0})})}else e.exposed||(e.exposed={});k&&e.render===Xe&&(e.render=k),J!=null&&(e.inheritAttrs=J),de&&(e.components=de),P&&(e.directives=P),B&&na(e)}function fl(e,t,s=Xe){X(e)&&(e=yr(e));for(const n in e){const r=e[n];let i;ge(r)?"default"in r?i=wt(r.from||n,r.default,!0):i=wt(r.from||n):i=wt(r),Re(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function Li(e,t,s){tt(X(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function aa(e,t,s,n){let r=n.includes(".")?ua(s,n):()=>s[n];if(xe(e)){const i=t[e];Y(i)&&Qe(r,i)}else if(Y(e))Qe(r,e.bind(s));else if(ge(e))if(X(e))e.forEach(i=>aa(i,t,s,n));else{const i=Y(e.handler)?e.handler.bind(s):t[e.handler];Y(i)&&Qe(r,i,e)}}function Yr(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let c;return a?c=a:!r.length&&!s&&!n?c=t:(c={},r.length&&r.forEach(u=>hn(c,u,o,!0)),hn(c,t,o)),ge(t)&&i.set(t,c),c}function hn(e,t,s,n=!1){const{mixins:r,extends:i}=t;i&&hn(e,i,s,!0),r&&r.forEach(o=>hn(e,o,s,!0));for(const o in t)if(!(n&&o==="expose")){const a=dl[o]||s&&s[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const dl={data:Mi,props:Ei,emits:Ei,methods:gs,computed:gs,beforeCreate:Pe,created:Pe,beforeMount:Pe,mounted:Pe,beforeUpdate:Pe,updated:Pe,beforeDestroy:Pe,beforeUnmount:Pe,destroyed:Pe,unmounted:Pe,activated:Pe,deactivated:Pe,errorCaptured:Pe,serverPrefetch:Pe,components:gs,directives:gs,watch:pl,provide:Mi,inject:hl};function Mi(e,t){return t?e?function(){return be(Y(e)?e.call(this,this):e,Y(t)?t.call(this,this):t)}:t:e}function hl(e,t){return gs(yr(e),yr(t))}function yr(e){if(X(e)){const t={};for(let s=0;s1)return s&&Y(t)?t.call(n&&n.proxy):t}}const vl=Symbol.for("v-scx"),yl=()=>wt(vl);function la(e,t){return Xr(e,null,t)}function Qe(e,t,s){return Xr(e,t,s)}function Xr(e,t,s=me){const{immediate:n,deep:r,flush:i,once:o}=s,a=be({},s),c=t&&n||!t&&i!=="post";let u;if($s){if(i==="sync"){const h=yl();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!c){const h=()=>{};return h.stop=Xe,h.resume=Xe,h.pause=Xe,h}}const f=Te;a.call=(h,g,y)=>tt(h,f,g,y);let l=!1;i==="post"?a.scheduler=h=>{Me(h,f&&f.suspense)}:i!=="sync"&&(l=!0,a.scheduler=(h,g)=>{g?h():qr(h)}),a.augmentJob=h=>{t&&(h.flags|=4),l&&(h.flags|=2,f&&(h.id=f.uid,h.i=f))};const d=Wc(e,t,a);return $s&&(u?u.push(d):c&&d()),d}function _l(e,t,s){const n=this.proxy,r=xe(e)?e.includes(".")?ua(n,e):()=>n[e]:e.bind(n,n);let i;Y(t)?i=t:(i=t.handler,s=t);const o=zs(this),a=Xr(r,i.bind(n),s);return o(),a}function ua(e,t){const s=t.split(".");return()=>{let n=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Pt(t)}Modifiers`]||e[`${Zt(t)}Modifiers`];function xl(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||me;let r=s;const i=t.startsWith("update:"),o=i&&bl(n,t.slice(7));o&&(o.trim&&(r=s.map(f=>xe(f)?f.trim():f)),o.number&&(r=s.map(cc)));let a,c=n[a=Un(t)]||n[a=Un(Pt(t))];!c&&i&&(c=n[a=Un(Zt(t))]),c&&tt(c,e,6,r);const u=n[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,tt(u,e,6,r)}}const wl=new WeakMap;function fa(e,t,s=!1){const n=s?wl:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const i=e.emits;let o={},a=!1;if(!Y(e)){const c=u=>{const f=fa(u,t,!0);f&&(a=!0,be(o,f))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!a?(ge(e)&&n.set(e,null),null):(X(i)?i.forEach(c=>o[c]=null):be(o,i),ge(e)&&n.set(e,o),o)}function Nn(e,t){return!e||!In(t)?!1:(t=t.slice(2).replace(/Once$/,""),le(e,t[0].toLowerCase()+t.slice(1))||le(e,Zt(t))||le(e,t))}function Oi(e){const{type:t,vnode:s,proxy:n,withProxy:r,propsOptions:[i],slots:o,attrs:a,emit:c,render:u,renderCache:f,props:l,data:d,setupState:h,ctx:g,inheritAttrs:y}=e,x=fn(e);let b,L;try{if(s.shapeFlag&4){const C=r||n,k=C;b=De(u.call(k,C,f,l,h,d,g)),L=a}else{const C=t;b=De(C.length>1?C(l,{attrs:a,slots:o,emit:c}):C(l,null)),L=t.props?a:Rl(a)}}catch(C){ks.length=0,Ws(C,e,1),b=ce(Tt)}let $=b;if(L&&y!==!1){const C=Object.keys(L),{shapeFlag:k}=$;C.length&&k&7&&(i&&C.some(Ar)&&(L=Cl(L,i)),$=es($,L,!1,!0))}return s.dirs&&($=es($,null,!1,!0),$.dirs=$.dirs?$.dirs.concat(s.dirs):s.dirs),s.transition&&Gr($,s.transition),b=$,fn(x),b}function Sl(e,t=!0){let s;for(let n=0;n{let t;for(const s in e)(s==="class"||s==="style"||In(s))&&((t||(t={}))[s]=e[s]);return t},Cl=(e,t)=>{const s={};for(const n in e)(!Ar(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Pl(e,t,s){const{props:n,children:r,component:i}=e,{props:o,children:a,patchFlag:c}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?Ai(n,o,u):!!o;if(c&8){const f=t.dynamicProps;for(let l=0;lObject.create(da),pa=e=>Object.getPrototypeOf(e)===da;function kl(e,t,s,n=!1){const r={},i=ha();e.propsDefaults=Object.create(null),ma(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);s?e.props=n?r:$c(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function Tl(e,t,s,n){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,a=ae(r),[c]=e.propsOptions;let u=!1;if((n||o>0)&&!(o&16)){if(o&8){const f=e.vnode.dynamicProps;for(let l=0;l{c=!0;const[d,h]=ga(l,t,!0);be(o,d),h&&a.push(...h)};!s&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!i&&!c)return ge(e)&&n.set(e,_s),_s;if(X(i))for(let f=0;fe==="_"||e==="_ctx"||e==="$stable",ti=e=>X(e)?e.map(De):[De(e)],Ll=(e,t,s)=>{if(t._n)return t;const n=qc((...r)=>ti(t(...r)),s);return n._c=!1,n},va=(e,t,s)=>{const n=e._ctx;for(const r in e){if(ei(r))continue;const i=e[r];if(Y(i))t[r]=Ll(r,i,n);else if(i!=null){const o=ti(i);t[r]=()=>o}}},ya=(e,t)=>{const s=ti(t);e.slots.default=()=>s},_a=(e,t,s)=>{for(const n in t)(s||!ei(n))&&(e[n]=t[n])},Ml=(e,t,s)=>{const n=e.slots=ha();if(e.vnode.shapeFlag&32){const r=t._;r?(_a(n,t,s),s&&No(n,"_",r,!0)):va(t,n)}else t&&ya(e,t)},El=(e,t,s)=>{const{vnode:n,slots:r}=e;let i=!0,o=me;if(n.shapeFlag&32){const a=t._;a?s&&a===1?i=!1:_a(r,t,s):(i=!t.$stable,va(t,r)),o=t}else t&&(ya(e,t),o={default:1});if(i)for(const a in r)!ei(a)&&o[a]==null&&delete r[a]},Me=Ul;function Ol(e){return Al(e)}function Al(e,t){const s=En();s.__VUE__=!0;const{insert:n,remove:r,patchProp:i,createElement:o,createText:a,createComment:c,setText:u,setElementText:f,parentNode:l,nextSibling:d,setScopeId:h=Xe,insertStaticContent:g}=e,y=(p,m,v,T=null,w=null,S=null,A=void 0,O=null,E=!!m.dynamicChildren)=>{if(p===m)return;p&&!yt(p,m)&&(T=qs(p),We(p,w,S,!0),p=null),m.patchFlag===-2&&(E=!1,m.dynamicChildren=null);const{type:R,ref:z,shapeFlag:F}=m;switch(R){case Fn:x(p,m,v,T);break;case Tt:b(p,m,v,T);break;case Gn:p==null&&L(m,v,T,A);break;case Fe:de(p,m,v,T,w,S,A,O,E);break;default:F&1?k(p,m,v,T,w,S,A,O,E):F&6?P(p,m,v,T,w,S,A,O,E):(F&64||F&128)&&R.process(p,m,v,T,w,S,A,O,E,fs)}z!=null&&w?Rs(z,p&&p.ref,S,m||p,!m):z==null&&p&&p.ref!=null&&Rs(p.ref,null,S,p,!0)},x=(p,m,v,T)=>{if(p==null)n(m.el=a(m.children),v,T);else{const w=m.el=p.el;m.children!==p.children&&u(w,m.children)}},b=(p,m,v,T)=>{p==null?n(m.el=c(m.children||""),v,T):m.el=p.el},L=(p,m,v,T)=>{[p.el,p.anchor]=g(p.children,m,v,T,p.el,p.anchor)},$=({el:p,anchor:m},v,T)=>{let w;for(;p&&p!==m;)w=d(p),n(p,v,T),p=w;n(m,v,T)},C=({el:p,anchor:m})=>{let v;for(;p&&p!==m;)v=d(p),r(p),p=v;r(m)},k=(p,m,v,T,w,S,A,O,E)=>{if(m.type==="svg"?A="svg":m.type==="math"&&(A="mathml"),p==null)_(m,v,T,w,S,A,O,E);else{const R=p.el&&p.el._isVueCE?p.el:null;try{R&&R._beginPatch(),B(p,m,w,S,A,O,E)}finally{R&&R._endPatch()}}},_=(p,m,v,T,w,S,A,O)=>{let E,R;const{props:z,shapeFlag:F,transition:Z,dirs:K}=p;if(E=p.el=o(p.type,S,z&&z.is,z),F&8?f(E,p.children):F&16&&M(p.children,E,null,T,w,qn(p,S),A,O),K&&Et(p,null,T,"created"),D(E,p,p.scopeId,A,T),z){for(const he in z)he!=="value"&&!xs(he)&&i(E,he,null,z[he],S,T);"value"in z&&i(E,"value",null,z.value,S),(R=z.onVnodeBeforeMount)&&Ge(R,T,p)}K&&Et(p,null,T,"beforeMount");const se=Nl(w,Z);se&&Z.beforeEnter(E),n(E,m,v),((R=z&&z.onVnodeMounted)||se||K)&&Me(()=>{R&&Ge(R,T,p),se&&Z.enter(E),K&&Et(p,null,T,"mounted")},w)},D=(p,m,v,T,w)=>{if(v&&h(p,v),T)for(let S=0;S{for(let R=E;R{const O=m.el=p.el;let{patchFlag:E,dynamicChildren:R,dirs:z}=m;E|=p.patchFlag&16;const F=p.props||me,Z=m.props||me;let K;if(v&&Ot(v,!1),(K=Z.onVnodeBeforeUpdate)&&Ge(K,v,m,p),z&&Et(m,p,v,"beforeUpdate"),v&&Ot(v,!0),(F.innerHTML&&Z.innerHTML==null||F.textContent&&Z.textContent==null)&&f(O,""),R?W(p.dynamicChildren,R,O,v,T,qn(m,w),S):A||oe(p,m,O,null,v,T,qn(m,w),S,!1),E>0){if(E&16)J(O,F,Z,v,w);else if(E&2&&F.class!==Z.class&&i(O,"class",null,Z.class,w),E&4&&i(O,"style",F.style,Z.style,w),E&8){const se=m.dynamicProps;for(let he=0;he{K&&Ge(K,v,m,p),z&&Et(m,p,v,"updated")},T)},W=(p,m,v,T,w,S,A)=>{for(let O=0;O{if(m!==v){if(m!==me)for(const S in m)!xs(S)&&!(S in v)&&i(p,S,m[S],null,w,T);for(const S in v){if(xs(S))continue;const A=v[S],O=m[S];A!==O&&S!=="value"&&i(p,S,O,A,w,T)}"value"in v&&i(p,"value",m.value,v.value,w)}},de=(p,m,v,T,w,S,A,O,E)=>{const R=m.el=p?p.el:a(""),z=m.anchor=p?p.anchor:a("");let{patchFlag:F,dynamicChildren:Z,slotScopeIds:K}=m;K&&(O=O?O.concat(K):K),p==null?(n(R,v,T),n(z,v,T),M(m.children||[],v,z,w,S,A,O,E)):F>0&&F&64&&Z&&p.dynamicChildren?(W(p.dynamicChildren,Z,v,w,S,A,O),(m.key!=null||w&&m===w.subTree)&&ba(p,m,!0)):oe(p,m,v,z,w,S,A,O,E)},P=(p,m,v,T,w,S,A,O,E)=>{m.slotScopeIds=O,p==null?m.shapeFlag&512?w.ctx.activate(m,v,T,A,E):H(m,v,T,w,S,A,E):te(p,m,E)},H=(p,m,v,T,w,S,A)=>{const O=p.component=Yl(p,T,w);if(ra(p)&&(O.ctx.renderer=fs),Ql(O,!1,A),O.asyncDep){if(w&&w.registerDep(O,Q,A),!p.el){const E=O.subTree=ce(Tt);b(null,E,m,v),p.placeholder=E.el}}else Q(O,p,m,v,w,S,A)},te=(p,m,v)=>{const T=m.component=p.component;if(Pl(p,m,v))if(T.asyncDep&&!T.asyncResolved){ie(T,m,v);return}else T.next=m,T.update();else m.el=p.el,T.vnode=m},Q=(p,m,v,T,w,S,A)=>{const O=()=>{if(p.isMounted){let{next:F,bu:Z,u:K,parent:se,vnode:he}=p;{const Ke=xa(p);if(Ke){F&&(F.el=he.el,ie(p,F,A)),Ke.asyncDep.then(()=>{p.isUnmounted||O()});return}}let ue=F,Ie;Ot(p,!1),F?(F.el=he.el,ie(p,F,A)):F=he,Z&&Hn(Z),(Ie=F.props&&F.props.onVnodeBeforeUpdate)&&Ge(Ie,se,F,he),Ot(p,!0);const Le=Oi(p),ze=p.subTree;p.subTree=Le,y(ze,Le,l(ze.el),qs(ze),p,w,S),F.el=Le.el,ue===null&&Qr(p,Le.el),K&&Me(K,w),(Ie=F.props&&F.props.onVnodeUpdated)&&Me(()=>Ge(Ie,se,F,he),w)}else{let F;const{el:Z,props:K}=m,{bm:se,m:he,parent:ue,root:Ie,type:Le}=p,ze=Cs(m);Ot(p,!1),se&&Hn(se),!ze&&(F=K&&K.onVnodeBeforeMount)&&Ge(F,ue,m),Ot(p,!0);{Ie.ce&&Ie.ce._def.shadowRoot!==!1&&Ie.ce._injectChildStyle(Le);const Ke=p.subTree=Oi(p);y(null,Ke,v,T,p,w,S),m.el=Ke.el}if(he&&Me(he,w),!ze&&(F=K&&K.onVnodeMounted)){const Ke=m;Me(()=>Ge(F,ue,Ke),w)}(m.shapeFlag&256||ue&&Cs(ue.vnode)&&ue.vnode.shapeFlag&256)&&p.a&&Me(p.a,w),p.isMounted=!0,m=v=T=null}};p.scope.on();const E=p.effect=new an(O);p.scope.off();const R=p.update=E.run.bind(E),z=p.job=E.runIfDirty.bind(E);z.i=p,z.id=p.uid,E.scheduler=()=>qr(z),Ot(p,!0),R()},ie=(p,m,v)=>{m.component=p;const T=p.vnode.props;p.vnode=m,p.next=null,Tl(p,m.props,T,v),El(p,m.children,v),ct(),ki(p),lt()},oe=(p,m,v,T,w,S,A,O,E=!1)=>{const R=p&&p.children,z=p?p.shapeFlag:0,F=m.children,{patchFlag:Z,shapeFlag:K}=m;if(Z>0){if(Z&128){Ks(R,F,v,T,w,S,A,O,E);return}else if(Z&256){nt(R,F,v,T,w,S,A,O,E);return}}K&8?(z&16&&us(R,w,S),F!==R&&f(v,F)):z&16?K&16?Ks(R,F,v,T,w,S,A,O,E):us(R,w,S,!0):(z&8&&f(v,""),K&16&&M(F,v,T,w,S,A,O,E))},nt=(p,m,v,T,w,S,A,O,E)=>{p=p||_s,m=m||_s;const R=p.length,z=m.length,F=Math.min(R,z);let Z;for(Z=0;Zz?us(p,w,S,!0,!1,F):M(m,v,T,w,S,A,O,E,F)},Ks=(p,m,v,T,w,S,A,O,E)=>{let R=0;const z=m.length;let F=p.length-1,Z=z-1;for(;R<=F&&R<=Z;){const K=p[R],se=m[R]=E?mt(m[R]):De(m[R]);if(yt(K,se))y(K,se,v,null,w,S,A,O,E);else break;R++}for(;R<=F&&R<=Z;){const K=p[F],se=m[Z]=E?mt(m[Z]):De(m[Z]);if(yt(K,se))y(K,se,v,null,w,S,A,O,E);else break;F--,Z--}if(R>F){if(R<=Z){const K=Z+1,se=KZ)for(;R<=F;)We(p[R],w,S,!0),R++;else{const K=R,se=R,he=new Map;for(R=se;R<=Z;R++){const Oe=m[R]=E?mt(m[R]):De(m[R]);Oe.key!=null&&he.set(Oe.key,R)}let ue,Ie=0;const Le=Z-se+1;let ze=!1,Ke=0;const ds=new Array(Le);for(R=0;R=Le){We(Oe,w,S,!0);continue}let qe;if(Oe.key!=null)qe=he.get(Oe.key);else for(ue=se;ue<=Z;ue++)if(ds[ue-se]===0&&yt(Oe,m[ue])){qe=ue;break}qe===void 0?We(Oe,w,S,!0):(ds[qe-se]=R+1,qe>=Ke?Ke=qe:ze=!0,y(Oe,m[qe],v,null,w,S,A,O,E),Ie++)}const xi=ze?Fl(ds):_s;for(ue=xi.length-1,R=Le-1;R>=0;R--){const Oe=se+R,qe=m[Oe],wi=m[Oe+1],Si=Oe+1{const{el:S,type:A,transition:O,children:E,shapeFlag:R}=p;if(R&6){Mt(p.component.subTree,m,v,T);return}if(R&128){p.suspense.move(m,v,T);return}if(R&64){A.move(p,m,v,fs);return}if(A===Fe){n(S,m,v);for(let F=0;FO.enter(S),w);else{const{leave:F,delayLeave:Z,afterLeave:K}=O,se=()=>{p.ctx.isUnmounted?r(S):n(S,m,v)},he=()=>{S._isLeaving&&S[Yc](!0),F(S,()=>{se(),K&&K()})};Z?Z(S,se,he):he()}else n(S,m,v)},We=(p,m,v,T=!1,w=!1)=>{const{type:S,props:A,ref:O,children:E,dynamicChildren:R,shapeFlag:z,patchFlag:F,dirs:Z,cacheIndex:K}=p;if(F===-2&&(w=!1),O!=null&&(ct(),Rs(O,null,v,p,!0),lt()),K!=null&&(m.renderCache[K]=void 0),z&256){m.ctx.deactivate(p);return}const se=z&1&&Z,he=!Cs(p);let ue;if(he&&(ue=A&&A.onVnodeBeforeUnmount)&&Ge(ue,m,p),z&6)ec(p.component,v,T);else{if(z&128){p.suspense.unmount(v,T);return}se&&Et(p,null,m,"beforeUnmount"),z&64?p.type.remove(p,m,v,fs,T):R&&!R.hasOnce&&(S!==Fe||F>0&&F&64)?us(R,m,v,!1,!0):(S===Fe&&F&384||!w&&z&16)&&us(E,m,v),T&&_i(p)}(he&&(ue=A&&A.onVnodeUnmounted)||se)&&Me(()=>{ue&&Ge(ue,m,p),se&&Et(p,null,m,"unmounted")},v)},_i=p=>{const{type:m,el:v,anchor:T,transition:w}=p;if(m===Fe){Qa(v,T);return}if(m===Gn){C(p);return}const S=()=>{r(v),w&&!w.persisted&&w.afterLeave&&w.afterLeave()};if(p.shapeFlag&1&&w&&!w.persisted){const{leave:A,delayLeave:O}=w,E=()=>A(v,S);O?O(p.el,S,E):E()}else S()},Qa=(p,m)=>{let v;for(;p!==m;)v=d(p),r(p),p=v;r(m)},ec=(p,m,v)=>{const{bum:T,scope:w,job:S,subTree:A,um:O,m:E,a:R}=p;Fi(E),Fi(R),T&&Hn(T),w.stop(),S&&(S.flags|=8,We(A,p,m,v)),O&&Me(O,m),Me(()=>{p.isUnmounted=!0},m)},us=(p,m,v,T=!1,w=!1,S=0)=>{for(let A=S;A{if(p.shapeFlag&6)return qs(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const m=d(p.anchor||p.el),v=m&&m[Gc];return v?d(v):m};let Vn=!1;const bi=(p,m,v)=>{p==null?m._vnode&&We(m._vnode,null,null,!0):y(m._vnode||null,p,m,null,null,null,v),m._vnode=p,Vn||(Vn=!0,ki(),ea(),Vn=!1)},fs={p:y,um:We,m:Mt,r:_i,mt:H,mc:M,pc:oe,pbc:W,n:qs,o:e};return{render:bi,hydrate:void 0,createApp:gl(bi)}}function qn({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function Ot({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Nl(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ba(e,t,s=!1){const n=e.children,r=t.children;if(X(n)&&X(r))for(let i=0;i>1,e[s[a]]0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,o=s[i-1];i-- >0;)s[i]=o,o=t[o];return s}function xa(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:xa(t)}function Fi(e){if(e)for(let t=0;te.__isSuspense;let br=0;const $l={name:"Suspense",__isSuspense:!0,process(e,t,s,n,r,i,o,a,c,u){if(e==null)Bl(t,s,n,r,i,o,a,c,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}jl(e,t,s,n,r,o,a,c,u)}},hydrate:Dl,normalize:Vl},si=$l;function Ns(e,t){const s=e.props&&e.props[t];Y(s)&&s()}function Bl(e,t,s,n,r,i,o,a,c){const{p:u,o:{createElement:f}}=c,l=f("div"),d=e.suspense=Sa(e,r,n,t,l,s,i,o,a,c);u(null,d.pendingBranch=e.ssContent,l,null,n,d,i,o),d.deps>0?(Ns(e,"onPending"),Ns(e,"onFallback"),u(null,e.ssFallback,t,s,n,null,i,o),Qt(d,e.ssFallback)):d.resolve(!1,!0)}function jl(e,t,s,n,r,i,o,a,{p:c,um:u,o:{createElement:f}}){const l=t.suspense=e.suspense;l.vnode=t,t.el=e.el;const d=t.ssContent,h=t.ssFallback,{activeBranch:g,pendingBranch:y,isInFallback:x,isHydrating:b}=l;if(y)l.pendingBranch=d,yt(y,d)?(c(y,d,l.hiddenContainer,null,r,l,i,o,a),l.deps<=0?l.resolve():x&&(b||(c(g,h,s,n,r,null,i,o,a),Qt(l,h)))):(l.pendingId=br++,b?(l.isHydrating=!1,l.activeBranch=y):u(y,r,l),l.deps=0,l.effects.length=0,l.hiddenContainer=f("div"),x?(c(null,d,l.hiddenContainer,null,r,l,i,o,a),l.deps<=0?l.resolve():(c(g,h,s,n,r,null,i,o,a),Qt(l,h))):g&&yt(g,d)?(c(g,d,s,n,r,l,i,o,a),l.resolve(!0)):(c(null,d,l.hiddenContainer,null,r,l,i,o,a),l.deps<=0&&l.resolve()));else if(g&&yt(g,d))c(g,d,s,n,r,l,i,o,a),Qt(l,d);else if(Ns(t,"onPending"),l.pendingBranch=d,d.shapeFlag&512?l.pendingId=d.component.suspenseId:l.pendingId=br++,c(null,d,l.hiddenContainer,null,r,l,i,o,a),l.deps<=0)l.resolve();else{const{timeout:L,pendingId:$}=l;L>0?setTimeout(()=>{l.pendingId===$&&l.fallback(h)},L):L===0&&l.fallback(h)}}function Sa(e,t,s,n,r,i,o,a,c,u,f=!1){const{p:l,m:d,um:h,n:g,o:{parentNode:y,remove:x}}=u;let b;const L=Hl(e);L&&t&&t.pendingBranch&&(b=t.pendingId,t.deps++);const $=e.props?lc(e.props.timeout):void 0,C=i,k={vnode:e,parent:t,parentComponent:s,namespace:o,container:n,hiddenContainer:r,deps:0,pendingId:br++,timeout:typeof $=="number"?$:-1,activeBranch:null,pendingBranch:null,isInFallback:!f,isHydrating:f,isUnmounted:!1,effects:[],resolve(_=!1,D=!1){const{vnode:M,activeBranch:B,pendingBranch:W,pendingId:J,effects:de,parentComponent:P,container:H,isInFallback:te}=k;let Q=!1;k.isHydrating?k.isHydrating=!1:_||(Q=B&&W.transition&&W.transition.mode==="out-in",Q&&(B.transition.afterLeave=()=>{J===k.pendingId&&(d(W,H,i===C?g(B):i,0),mr(de),te&&M.ssFallback&&(M.ssFallback.el=null))}),B&&(y(B.el)===H&&(i=g(B)),h(B,P,k,!0),!Q&&te&&M.ssFallback&&Me(()=>M.ssFallback.el=null,k)),Q||d(W,H,i,0)),Qt(k,W),k.pendingBranch=null,k.isInFallback=!1;let ie=k.parent,oe=!1;for(;ie;){if(ie.pendingBranch){ie.effects.push(...de),oe=!0;break}ie=ie.parent}!oe&&!Q&&mr(de),k.effects=[],L&&t&&t.pendingBranch&&b===t.pendingId&&(t.deps--,t.deps===0&&!D&&t.resolve()),Ns(M,"onResolve")},fallback(_){if(!k.pendingBranch)return;const{vnode:D,activeBranch:M,parentComponent:B,container:W,namespace:J}=k;Ns(D,"onFallback");const de=g(M),P=()=>{k.isInFallback&&(l(null,_,W,de,B,null,J,a,c),Qt(k,_))},H=_.transition&&_.transition.mode==="out-in";H&&(M.transition.afterLeave=P),k.isInFallback=!0,h(M,B,null,!0),H||P()},move(_,D,M){k.activeBranch&&d(k.activeBranch,_,D,M),k.container=_},next(){return k.activeBranch&&g(k.activeBranch)},registerDep(_,D,M){const B=!!k.pendingBranch;B&&k.deps++;const W=_.vnode.el;_.asyncDep.catch(J=>{Ws(J,_,0)}).then(J=>{if(_.isUnmounted||k.isUnmounted||k.pendingId!==_.suspenseId)return;_.asyncResolved=!0;const{vnode:de}=_;Sr(_,J,!1),W&&(de.el=W);const P=!W&&_.subTree.el;D(_,de,y(W||_.subTree.el),W?null:g(_.subTree),k,o,M),P&&(de.placeholder=null,x(P)),Qr(_,de.el),B&&--k.deps===0&&k.resolve()})},unmount(_,D){k.isUnmounted=!0,k.activeBranch&&h(k.activeBranch,s,_,D),k.pendingBranch&&h(k.pendingBranch,s,_,D)}};return k}function Dl(e,t,s,n,r,i,o,a,c){const u=t.suspense=Sa(t,n,s,e.parentNode,document.createElement("div"),null,r,i,o,a,!0),f=c(e,u.pendingBranch=t.ssContent,s,u,i,o);return u.deps===0&&u.resolve(!1,!0),f}function Vl(e){const{shapeFlag:t,children:s}=e,n=t&32;e.ssContent=$i(n?s.default:s),e.ssFallback=n?$i(s.fallback):ce(Tt)}function $i(e){let t;if(Y(e)){const s=$n&&e._c;s&&(e._d=!1,Zl()),e=e(),s&&(e._d=!0,t=Ve,Wl())}return X(e)&&(e=Sl(e)),e=De(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(s=>s!==e)),e}function Ul(e,t){t&&t.pendingBranch?X(e)?t.effects.push(...e):t.effects.push(e):mr(e)}function Qt(e,t){e.activeBranch=t;const{vnode:s,parentComponent:n}=e;let r=t.el;for(;!r&&t.component;)t=t.component.subTree,r=t.el;s.el=r,n&&n.subTree===s&&(n.vnode.el=r,Qr(n,r))}function Hl(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Fe=Symbol.for("v-fgt"),Fn=Symbol.for("v-txt"),Tt=Symbol.for("v-cmt"),Gn=Symbol.for("v-stc"),ks=[];let Ve=null;function Zl(e=!1){ks.push(Ve=e?null:[])}function Wl(){ks.pop(),Ve=ks[ks.length-1]||null}let $n=1;function pn(e,t=!1){$n+=e,e<0&&Ve&&t&&(Ve.hasOnce=!0)}function Fs(e){return e?e.__v_isVNode===!0:!1}function yt(e,t){return e.type===t.type&&e.key===t.key}const Ra=({key:e})=>e??null,sn=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?xe(e)||Re(e)||Y(e)?{i:Ye,r:e,k:t,f:!!s}:e:null);function zl(e,t=null,s=null,n=0,r=null,i=e===Fe?0:1,o=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ra(t),ref:t&&sn(t),scopeId:sa,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ye};return a?(ni(c,s),i&128&&e.normalize(c)):s&&(c.shapeFlag|=xe(s)?8:16),$n>0&&!o&&Ve&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Ve.push(c),c}const ce=Kl;function Kl(e,t=null,s=null,n=0,r=null,i=!1){if((!e||e===cl)&&(e=Tt),Fs(e)){const a=es(e,t,!0);return s&&ni(a,s),$n>0&&!i&&Ve&&(a.shapeFlag&6?Ve[Ve.indexOf(e)]=a:Ve.push(a)),a.patchFlag=-2,a}if(nu(e)&&(e=e.__vccOpts),t){t=ql(t);let{class:a,style:c}=t;a&&!xe(a)&&(t.class=Br(a)),ge(c)&&(Kr(c)&&!X(c)&&(c=be({},c)),t.style=$r(c))}const o=xe(e)?1:wa(e)?128:Jc(e)?64:ge(e)?4:Y(e)?2:0;return zl(e,t,s,n,r,o,i,!0)}function ql(e){return e?Kr(e)||pa(e)?be({},e):e:null}function es(e,t,s=!1,n=!1){const{props:r,ref:i,patchFlag:o,children:a,transition:c}=e,u=t?ri(r||{},t):r,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Ra(u),ref:t&&t.ref?s&&i?X(i)?i.concat(sn(t)):[i,sn(t)]:sn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Fe?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&es(e.ssContent),ssFallback:e.ssFallback&&es(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&Gr(f,c.clone(f)),f}function xr(e=" ",t=0){return ce(Fn,null,e,t)}function De(e){return e==null||typeof e=="boolean"?ce(Tt):X(e)?ce(Fe,null,e.slice()):Fs(e)?mt(e):ce(Fn,null,String(e))}function mt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:es(e)}function ni(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(X(t))s=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),ni(e,r()),r._c&&(r._d=!0));return}else{s=32;const r=t._;!r&&!pa(t)?t._ctx=Ye:r===3&&Ye&&(Ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Y(t)?(t={default:t,_ctx:Ye},s=32):(t=String(t),n&64?(s=16,t=[xr(t)]):s=8);e.children=t,e.shapeFlag|=s}function ri(...e){const t={};for(let s=0;sTe||Ye;let mn,wr;{const e=En(),t=(s,n)=>{let r;return(r=e[s])||(r=e[s]=[]),r.push(n),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};mn=t("__VUE_INSTANCE_SETTERS__",s=>Te=s),wr=t("__VUE_SSR_SETTERS__",s=>$s=s)}const zs=e=>{const t=Te;return mn(e),e.scope.on(),()=>{e.scope.off(),mn(t)}},Bi=()=>{Te&&Te.scope.off(),mn(null)};function Ca(e){return e.vnode.shapeFlag&4}let $s=!1;function Ql(e,t=!1,s=!1){t&&wr(t);const{props:n,children:r}=e.vnode,i=Ca(e);kl(e,n,i,t),Ml(e,r,s||t);const o=i?eu(e,t):void 0;return t&&wr(!1),o}function eu(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ll);const{setup:n}=s;if(n){ct();const r=e.setupContext=n.length>1?su(e):null,i=zs(e),o=Zs(n,e,0,[e.props,r]),a=Oo(o);if(lt(),i(),(a||e.sp)&&!Cs(e)&&na(e),a){if(o.then(Bi,Bi),t)return o.then(c=>{Sr(e,c,t)}).catch(c=>{Ws(c,e,0)});e.asyncDep=o}else Sr(e,o,t)}else Pa(e,t)}function Sr(e,t,s){Y(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ge(t)&&(e.setupState=Yo(t)),Pa(e,s)}let ji;function Pa(e,t,s){const n=e.type;if(!e.render){if(!t&&ji&&!n.render){const r=n.template||Yr(e).template;if(r){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:c}=n,u=be(be({isCustomElement:i,delimiters:a},o),c);n.render=ji(r,u)}}e.render=n.render||Xe}{const r=zs(e);ct();try{ul(e)}finally{lt(),r()}}}const tu={get(e,t){return Se(e,"get",""),e[t]}};function su(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,tu),slots:e.slots,emit:e.emit,expose:t}}function ii(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Yo(hr(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Ps)return Ps[s](e)},has(t,s){return s in t||s in Ps}})):e.proxy}function nu(e){return Y(e)&&"__vccOpts"in e}const fe=(e,t)=>Hc(e,t,$s);function j(e,t,s){try{pn(-1);const n=arguments.length;return n===2?ge(t)&&!X(t)?Fs(t)?ce(e,null,[t]):ce(e,t):ce(e,null,t):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&Fs(s)&&(s=[s]),ce(e,t,s))}finally{pn(1)}}const ru="3.5.25";/**
-* @vue/runtime-dom v3.5.25
-* (c) 2018-present Yuxi (Evan) You and Vue contributors
-* @license MIT
-**/let Rr;const Di=typeof window<"u"&&window.trustedTypes;if(Di)try{Rr=Di.createPolicy("vue",{createHTML:e=>e})}catch{}const ka=Rr?e=>Rr.createHTML(e):e=>e,iu="http://www.w3.org/2000/svg",ou="http://www.w3.org/1998/Math/MathML",it=typeof document<"u"?document:null,Vi=it&&it.createElement("template"),au={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?it.createElementNS(iu,e):t==="mathml"?it.createElementNS(ou,e):s?it.createElement(e,{is:s}):it.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>it.createTextNode(e),createComment:e=>it.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>it.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,i){const o=s?s.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===i||!(r=r.nextSibling)););else{Vi.innerHTML=ka(n==="svg"?``:n==="mathml"?``:e);const a=Vi.content;if(n==="svg"||n==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},cu=Symbol("_vtc");function lu(e,t,s){const n=e[cu];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Ui=Symbol("_vod"),uu=Symbol("_vsh"),fu=Symbol(""),du=/(?:^|;)\s*display\s*:/;function hu(e,t,s){const n=e.style,r=xe(s);let i=!1;if(s&&!r){if(t)if(xe(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();s[a]==null&&nn(n,a,"")}else for(const o in t)s[o]==null&&nn(n,o,"");for(const o in s)o==="display"&&(i=!0),nn(n,o,s[o])}else if(r){if(t!==s){const o=n[fu];o&&(s+=";"+o),n.cssText=s,i=du.test(s)}}else t&&e.removeAttribute("style");Ui in e&&(e[Ui]=i?n.display:"",e[uu]&&(n.display="none"))}const Hi=/\s*!important$/;function nn(e,t,s){if(X(s))s.forEach(n=>nn(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=pu(e,t);Hi.test(s)?e.setProperty(Zt(n),s.replace(Hi,""),"important"):e[n]=s}}const Zi=["Webkit","Moz","ms"],Jn={};function pu(e,t){const s=Jn[t];if(s)return s;let n=Pt(t);if(n!=="filter"&&n in e)return Jn[t]=n;n=Ao(n);for(let r=0;rYn||(_u.then(()=>Yn=0),Yn=Date.now());function xu(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;tt(wu(n,s.value),t,5,[n])};return s.value=e,s.attached=bu(),s}function wu(e,t){if(X(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const Ji=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Su=(e,t,s,n,r,i)=>{const o=r==="svg";t==="class"?lu(e,n,o):t==="style"?hu(e,s,n):In(t)?Ar(t)||vu(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ru(e,t,n,o))?(Ki(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&zi(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!xe(n))?Ki(e,Pt(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),zi(e,t,n,o))};function Ru(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ji(t)&&Y(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Ji(t)&&xe(s)?!1:t in e}const Cu=be({patchProp:Su},au);let Yi;function Pu(){return Yi||(Yi=Ol(Cu))}const ku=((...e)=>{const t=Pu().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=Iu(n);if(!r)return;const i=t._component;!Y(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=s(r,!1,Tu(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t});function Tu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Iu(e){return xe(e)?document.querySelector(e):e}const Cr=new WeakMap,Lu=new WeakMap,gn={current:[]};let Xn=!1,Ts=0;const vs=new Set,Xs=new Map;function Ta(e){for(const t of e){if(gn.current.includes(t))continue;gn.current.push(t),t.recompute();const s=Lu.get(t);if(s)for(const n of s){const r=Cr.get(n);r?.length&&Ta(r)}}}function Mu(e){const t={prevVal:e.prevState,currentVal:e.state};for(const s of e.listeners)s(t)}function Eu(e){const t={prevVal:e.prevState,currentVal:e.state};for(const s of e.listeners)s(t)}function Ia(e){if(Ts>0&&!Xs.has(e)&&Xs.set(e,e.prevState),vs.add(e),!(Ts>0)&&!Xn)try{for(Xn=!0;vs.size>0;){const t=Array.from(vs);vs.clear();for(const s of t){const n=Xs.get(s)??s.prevState;s.prevState=n,Mu(s)}for(const s of t){const n=Cr.get(s);n&&(gn.current.push(s),Ta(n))}for(const s of t){const n=Cr.get(s);if(n)for(const r of n)Eu(r)}}}finally{Xn=!1,gn.current=[],Xs.clear()}}function Is(e){Ts++;try{e()}finally{if(Ts--,Ts===0){const t=vs.values().next().value;t&&Ia(t)}}}function Ou(e){return typeof e=="function"}class Au{constructor(t,s){this.listeners=new Set,this.subscribe=n=>{var r,i;this.listeners.add(n);const o=(i=(r=this.options)==null?void 0:r.onSubscribe)==null?void 0:i.call(r,n,this);return()=>{this.listeners.delete(n),o?.()}},this.prevState=t,this.state=t,this.options=s}setState(t){var s,n,r;this.prevState=this.state,(s=this.options)!=null&&s.updateFn?this.state=this.options.updateFn(this.prevState)(t):Ou(t)?this.state=t(this.prevState):this.state=t,(r=(n=this.options)==null?void 0:n.onUpdate)==null||r.call(n),Ia(this)}}const St="__TSR_index",Xi="popstate",Qi="beforeunload";function Nu(e){let t=e.getLocation();const s=new Set,n=o=>{t=e.getLocation(),s.forEach(a=>a({location:t,action:o}))},r=o=>{e.notifyOnIndexChange??!0?n(o):t=e.getLocation()},i=async({task:o,navigateOpts:a,...c})=>{if(a?.ignoreBlocker??!1){o();return}const f=e.getBlockers?.()??[],l=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&l)for(const d of f){const h=Bs(c.path,c.state);if(await d.blockerFn({currentLocation:t,nextLocation:h,action:c.type})){e.onBlocked?.();return}}o()};return{get location(){return t},get length(){return e.getLength()},subscribers:s,subscribe:o=>(s.add(o),()=>{s.delete(o)}),push:(o,a,c)=>{const u=t.state[St];a=eo(u+1,a),i({task:()=>{e.pushState(o,a),n({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:o,state:a})},replace:(o,a,c)=>{const u=t.state[St];a=eo(u,a),i({task:()=>{e.replaceState(o,a),n({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:o,state:a})},go:(o,a)=>{i({task:()=>{e.go(o),r({type:"GO",index:o})},navigateOpts:a,type:"GO"})},back:o=>{i({task:()=>{e.back(o?.ignoreBlocker??!1),r({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{i({task:()=>{e.forward(o?.ignoreBlocker??!1),r({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[St]!==0,createHref:o=>e.createHref(o),block:o=>{if(!e.setBlockers)return()=>{};const a=e.getBlockers?.()??[];return e.setBlockers([...a,o]),()=>{const c=e.getBlockers?.()??[];e.setBlockers?.(c.filter(u=>u!==o))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:n}}function eo(e,t){t||(t={});const s=oi();return{...t,key:s,__TSR_key:s,[St]:e}}function La(e){const t=e?.window??(typeof document<"u"?window:void 0),s=t.history.pushState,n=t.history.replaceState;let r=[];const i=()=>r,o=M=>r=M,a=e?.createHref??(M=>M),c=e?.parseLocation??(()=>Bs(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const M=oi();t.history.replaceState({[St]:0,key:M,__TSR_key:M},"")}let u=c(),f,l=!1,d=!1,h=!1,g=!1;const y=()=>u;let x,b;const L=()=>{x&&(D._ignoreSubscribers=!0,(x.isPush?t.history.pushState:t.history.replaceState)(x.state,"",x.href),D._ignoreSubscribers=!1,x=void 0,b=void 0,f=void 0)},$=(M,B,W)=>{const J=a(B);b||(f=u),u=Bs(B,W),x={href:J,state:W,isPush:x?.isPush||M==="push"},b||(b=Promise.resolve().then(()=>L()))},C=M=>{u=c(),D.notify({type:M})},k=async()=>{if(d){d=!1;return}const M=c(),B=M.state[St]-u.state[St],W=B===1,J=B===-1,de=!W&&!J||l;l=!1;const P=de?"GO":J?"BACK":"FORWARD",H=de?{type:"GO",index:B}:{type:J?"BACK":"FORWARD"};if(h)h=!1;else{const te=i();if(typeof document<"u"&&te.length){for(const Q of te)if(await Q.blockerFn({currentLocation:u,nextLocation:M,action:P})){d=!0,t.history.go(1),D.notify(H);return}}}u=c(),D.notify(H)},_=M=>{if(g){g=!1;return}let B=!1;const W=i();if(typeof document<"u"&&W.length)for(const J of W){const de=J.enableBeforeUnload??!0;if(de===!0){B=!0;break}if(typeof de=="function"&&de()===!0){B=!0;break}}if(B)return M.preventDefault(),M.returnValue=""},D=Nu({getLocation:y,getLength:()=>t.history.length,pushState:(M,B)=>$("push",M,B),replaceState:(M,B)=>$("replace",M,B),back:M=>(M&&(h=!0),g=!0,t.history.back()),forward:M=>{M&&(h=!0),g=!0,t.history.forward()},go:M=>{l=!0,t.history.go(M)},createHref:M=>a(M),flush:L,destroy:()=>{t.history.pushState=s,t.history.replaceState=n,t.removeEventListener(Qi,_,{capture:!0}),t.removeEventListener(Xi,k)},onBlocked:()=>{f&&u!==f&&(u=f)},getBlockers:i,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Qi,_,{capture:!0}),t.addEventListener(Xi,k),t.history.pushState=function(...M){const B=s.apply(t.history,M);return D._ignoreSubscribers||C("PUSH"),B},t.history.replaceState=function(...M){const B=n.apply(t.history,M);return D._ignoreSubscribers||C("REPLACE"),B},D}function Fu(e){const t=typeof document<"u"?window:void 0;return La({window:t,parseLocation:()=>{const s=t.location.hash.split("#").slice(1),n=s[0]??"/",r=t.location.search,i=s.slice(1),o=i.length===0?"":`#${i.join("#")}`,a=`${n}${r}${o}`;return Bs(a,t.history.state)},createHref:s=>`${t.location.pathname}${t.location.search}#${s}`})}function Bs(e,t){const s=e.indexOf("#"),n=e.indexOf("?"),r=oi();return{href:e,pathname:e.substring(0,s>0?n>0?Math.min(s,n):s:n>0?n:e.length),hash:s>-1?e.substring(s):"",search:n>-1?e.slice(n,s===-1?void 0:s):"",state:t||{[St]:0,key:r,__TSR_key:r}}}function oi(){return(Math.random()+1).toString(36).substring(7)}function vn(e){return e[e.length-1]}function $u(e){return typeof e=="function"}function Gt(e,t){return $u(e)?e(t):e}const Bu=Object.prototype.hasOwnProperty;function je(e,t){if(e===t)return e;const s=t,n=no(e)&&no(s);if(!n&&!(yn(e)&&yn(s)))return s;const r=n?e:to(e);if(!r)return s;const i=n?s:to(s);if(!i)return s;const o=r.length,a=i.length,c=n?new Array(a):{};let u=0;for(let f=0;f"u")return!0;const s=t.prototype;return!(!so(s)||!s.hasOwnProperty("isPrototypeOf"))}function so(e){return Object.prototype.toString.call(e)==="[object Object]"}function no(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function $t(e,t,s){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;nr||!$t(e[o],t[o],s)))return!1;return r===i}return!1}function ts(e){let t,s;const n=new Promise((r,i)=>{t=r,s=i});return n.status="pending",n.resolve=r=>{n.status="resolved",n.value=r,t(r),e?.(r)},n.reject=r=>{n.status="rejected",s(r)},n}function Rt(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function ro(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function io(e,t){if(!e)return e;const s=/%25|%5C/gi;let n=0,r="",i;for(;(i=s.exec(e))!==null;)r+=ro(e.slice(n,i.index))+i[0],n=s.lastIndex;return r+ro(n?e.slice(n):e)}var ju="Invariant failed";function Dt(e,t){if(!e)throw new Error(ju)}function _n(e){const t=new Map;let s,n;const r=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,n&&(n.next=i,i.prev=n)):(i.next.prev=void 0,s=i.next,i.next=void 0,n&&(i.prev=n,n.next=i)),n=i)};return{get(i){const o=t.get(i);if(o)return r(o),o.value},set(i,o){if(t.size>=e&&s){const c=s;t.delete(c.key),c.next&&(s=c.next,c.next.prev=void 0),c===n&&(n=void 0)}const a=t.get(i);if(a)a.value=o,r(a);else{const c={key:i,value:o,prev:n};n&&(n.next=c),n=c,s||(s=c),t.set(i,c)}},clear(){t.clear(),s=void 0,n=void 0}}}const ss=0,Vt=1,Ut=2,js=3,Du=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,Vu=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,Uu=/^([^{]*)\{\$\}([^}]*)$/;function ai(e,t,s=new Uint16Array(6)){const n=e.indexOf("/",t),r=n===-1?e.length:n,i=e.substring(t,r);if(!i||!i.includes("$"))return s[0]=ss,s[1]=t,s[2]=t,s[3]=r,s[4]=r,s[5]=r,s;if(i==="$"){const u=e.length;return s[0]=Ut,s[1]=t,s[2]=t,s[3]=u,s[4]=u,s[5]=u,s}if(i.charCodeAt(0)===36)return s[0]=Vt,s[1]=t,s[2]=t+1,s[3]=r,s[4]=r,s[5]=r,s;const o=i.match(Uu);if(o){const f=o[1].length;return s[0]=Ut,s[1]=t+f,s[2]=t+f+1,s[3]=t+f+2,s[4]=t+f+3,s[5]=e.length,s}const a=i.match(Vu);if(a){const u=a[1],f=a[2],l=a[3],d=u.length;return s[0]=js,s[1]=t+d,s[2]=t+d+3,s[3]=t+d+3+f.length,s[4]=r-l.length,s[5]=r,s}const c=i.match(Du);if(c){const u=c[1],f=c[2],l=c[3],d=u.length;return s[0]=Vt,s[1]=t+d,s[2]=t+d+2,s[3]=t+d+2+f.length,s[4]=r-l.length,s[5]=r,s}return s[0]=ss,s[1]=t,s[2]=t,s[3]=r,s[4]=r,s[5]=r,s}function Bn(e,t,s,n,r,i,o){o?.(s);let a=n;{const c=s.fullPath??s.from,u=c.length,f=s.options?.caseSensitive??e;for(;a_.caseSensitive===L&&_.prefix===$&&_.suffix===C);if(k)d=k;else{const _=er(Vt,s.fullPath??s.from,L,$,C);d=_,_.depth=i,_.parent=r,r.dynamic??=[],r.dynamic.push(_)}break}case js:{const x=c.substring(h,l[1]),b=c.substring(l[4],g),L=f&&!!(x||b),$=x?L?x:x.toLowerCase():void 0,C=b?L?b:b.toLowerCase():void 0,k=r.optional?.find(_=>_.caseSensitive===L&&_.prefix===$&&_.suffix===C);if(k)d=k;else{const _=er(js,s.fullPath??s.from,L,$,C);d=_,_.parent=r,_.depth=i,r.optional??=[],r.optional.push(_)}break}case Ut:{const x=c.substring(h,l[1]),b=c.substring(l[4],g),L=f&&!!(x||b),$=x?L?x:x.toLowerCase():void 0,C=b?L?b:b.toLowerCase():void 0,k=er(Ut,s.fullPath??s.from,L,$,C);d=k,k.parent=r,k.depth=i,r.wildcard??=[],r.wildcard.push(k)}}r=d}if((s.path||!s.children)&&!s.isRoot){const l=c.endsWith("/");l||(r.notFound=s),(!r.route||!r.isIndex&&l)&&(r.route=s,r.fullPath=s.fullPath??s.from),r.isIndex||=l}}if(s.children)for(const c of s.children)Bn(e,t,c,a,r,i,o)}function Qn(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Nt(e){if(e.static)for(const t of e.static.values())Nt(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Nt(t);if(e.dynamic?.length){e.dynamic.sort(Qn);for(const t of e.dynamic)Nt(t)}if(e.optional?.length){e.optional.sort(Qn);for(const t of e.optional)Nt(t)}if(e.wildcard?.length){e.wildcard.sort(Qn);for(const t of e.wildcard)Nt(t)}}function Ds(e){return{kind:ss,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function er(e,t,s,n,r){return{kind:e,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null,caseSensitive:s,prefix:n,suffix:r}}function Hu(e,t){const s=Ds("/"),n=new Uint16Array(6);for(const r of e)Bn(!1,n,r,1,s,0);Nt(s),t.masksTree=s,t.flatCache=_n(1e3)}function Zu(e,t){e||="/";const s=t.flatCache.get(e);if(s)return s;const n=ci(e,t.masksTree);return t.flatCache.set(e,n),n}function Wu(e,t,s,n,r){e||="/",n||="/";const i=t?`case\0${e}`:e;let o=r.singleCache.get(i);if(!o){o=Ds("/");const a=new Uint16Array(6);Bn(t,a,{from:e},1,o,0),r.singleCache.set(i,o)}return ci(n,o,s)}function zu(e,t,s=!1){const n=s?e:`nofuzz\0${e}`,r=t.matchCache.get(n);if(r!==void 0)return r;e||="/";const i=ci(e,t.segmentTree,s);return i&&(i.branch=Ju(i.route)),t.matchCache.set(n,i),i}function Ku(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function qu(e,t=!1,s){const n=Ds(e.fullPath),r=new Uint16Array(6),i={},o={};let a=0;return Bn(t,r,e,1,n,0,u=>{if(s?.(u,a),Dt(!(u.id in i),`Duplicate routes found with id: ${String(u.id)}`),i[u.id]=u,a!==0&&u.path){const f=Ku(u.fullPath);(!o[f]||u.fullPath.endsWith("/"))&&(o[f]=u)}a++}),Nt(n),{processedTree:{segmentTree:n,singleCache:_n(1e3),matchCache:_n(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:o}}function ci(e,t,s=!1){const n=e.split("/"),r=Xu(e,n,t,s);if(!r)return null;const i=Gu(e,n,r),o="**"in r;return o&&(i["**"]=r["**"]),{route:o?r.node.notFound??r.node.route:r.node.route,params:i}}function Gu(e,t,s){const n=Yu(s.node);let r=null;const i={};for(let o=0,a=0,c=0;a=0;M--){const B=d.optional[M];a.push({node:B,index:h,skipped:_,depth:D,statics:x,dynamics:b,optionals:L})}if(!$)for(let M=d.optional.length-1;M>=0;M--){const B=d.optional[M],{prefix:W,suffix:J}=B;if(W||J){const de=B.caseSensitive?C:k??=C.toLowerCase();if(W&&!de.startsWith(W)||J&&!de.endsWith(J))continue}a.push({node:B,index:h+1,skipped:g,depth:D,statics:x,dynamics:b,optionals:L+1})}}if(!$&&d.dynamic&&C)for(let _=d.dynamic.length-1;_>=0;_--){const D=d.dynamic[_],{prefix:M,suffix:B}=D;if(M||B){const W=D.caseSensitive?C:k??=C.toLowerCase();if(M&&!W.startsWith(M)||B&&!W.endsWith(B))continue}a.push({node:D,index:h+1,skipped:g,depth:y+1,statics:x,dynamics:b+1,optionals:L})}if(!$&&d.staticInsensitive){const _=d.staticInsensitive.get(k??=C.toLowerCase());_&&a.push({node:_,index:h+1,skipped:g,depth:y+1,statics:x+1,dynamics:b,optionals:L})}if(!$&&d.static){const _=d.static.get(C);_&&a.push({node:_,index:h+1,skipped:g,depth:y+1,statics:x+1,dynamics:b,optionals:L})}}if(f&&c)return Qs(c,f)?f:c;if(f)return f;if(c)return c;if(n&&u){let l=u.index;for(let h=0;he.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&(t.node.isIndex>e.node.isIndex||t.node.isIndex===e.node.isIndex&&t.depth>e.depth))):!0}function rn(e){return li(e.filter(t=>t!==void 0).join("/"))}function li(e){return e.replace(/\/{2,}/g,"/")}function Ma(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Bt(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Ea(e){return Bt(Ma(e))}function bn(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Qu(e,t,s){return bn(e,s)===bn(t,s)}function ef({base:e,to:t,trailingSlash:s="never",cache:n}){const r=t.startsWith("/"),i=!r&&t===".";let o;if(n){o=r?t:i?e:e+"\0"+t;const l=n.get(o);if(l)return l}let a;if(i)a=e.split("/");else if(r)a=t.split("/");else{for(a=e.split("/");a.length>1&&vn(a)==="";)a.pop();const l=t.split("/");for(let d=0,h=l.length;d1&&(vn(a)===""?s==="never"&&a.pop():s==="always"&&a.push(""));let c,u="";for(let l=0;l0&&(u+="/");const d=a[l];if(!d)continue;c=ai(d,0,c);const h=c[0];if(h===ss){u+=d;continue}const g=c[5],y=d.substring(0,c[1]),x=d.substring(c[4],g),b=d.substring(c[2],c[3]);h===Vt?u+=y||x?`${y}{$${b}}${x}`:`$${b}`:h===Ut?u+=y||x?`${y}{$}${x}`:"$":u+=`${y}{-$${b}}${x}`}u=li(u);const f=u||"/";return o&&n&&n.set(o,f),f}function tr(e,t,s){const n=t[e];return typeof n!="string"?n:e==="_splat"?encodeURI(n):tf(n,s)}function sr({path:e,params:t,decodeCharMap:s}){let n=!1;const r={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:r,isMissingParams:n};if(!e.includes("$"))return{interpolatedPath:e,usedParams:r,isMissingParams:n};const i=e.length;let o=0,a,c="";for(;o{let s;return(...n)=>{s||(s=setTimeout(()=>{e(...n),s=null},t))}};function rf(){const e=sf();if(!e)return null;const t=e.getItem(xn);let s=t?JSON.parse(t):{};return{state:s,set:n=>(s=Gt(n,s)||s,e.setItem(xn,JSON.stringify(s)))}}const en=rf(),Pr=e=>e.state.__TSR_key||e.href;function of(e){const t=[];let s;for(;s=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(s.children,e)+1})`),e=s;return`${t.reverse().join(" > ")}`.toLowerCase()}let wn=!1;function Oa({storageKey:e,key:t,behavior:s,shouldScrollRestoration:n,scrollToTopSelectors:r,location:i}){let o;try{o=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(u){console.error(u);return}const a=t||window.history.state?.__TSR_key,c=o[a];wn=!0;e:{if(n&&c&&Object.keys(c).length>0){for(const l in c){const d=c[l];if(l==="window")window.scrollTo({top:d.scrollY,left:d.scrollX,behavior:s});else if(l){const h=document.querySelector(l);h&&(h.scrollLeft=d.scrollX,h.scrollTop=d.scrollY)}}break e}const u=(i??window.location).hash.split("#",2)[1];if(u){const l=window.history.state?.__hashScrollIntoViewOptions??!0;if(l){const d=document.getElementById(u);d&&d.scrollIntoView(l)}break e}const f={top:0,left:0,behavior:s};if(window.scrollTo(f),r)for(const l of r){if(l==="window")continue;const d=typeof l=="function"?l():document.querySelector(l);d&&d.scrollTo(f)}}wn=!1}function af(e,t){if(!en&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!en))return;e.isScrollRestorationSetup=!0,wn=!1;const n=e.options.getScrollRestorationKey||Pr;window.history.scrollRestoration="manual";const r=i=>{if(wn||!e.isScrollRestoring)return;let o="";if(i.target===document||i.target===window)o="window";else{const c=i.target.getAttribute("data-scroll-restoration-id");c?o=`[data-scroll-restoration-id="${c}"]`:o=of(i.target)}const a=n(e.state.location);en.set(c=>{const u=c[a]||={},f=u[o]||={};if(o==="window")f.scrollX=window.scrollX||0,f.scrollY=window.scrollY||0;else if(o){const l=document.querySelector(o);l&&(f.scrollX=l.scrollLeft||0,f.scrollY=l.scrollTop||0)}return c})};typeof document<"u"&&document.addEventListener("scroll",nf(r,100),!0),e.subscribe("onRendered",i=>{const o=n(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(Oa({storageKey:xn,key:o,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&en.set(a=>(a[o]||={},a)))})}function cf(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const s=document.getElementById(e.state.location.hash);s&&s.scrollIntoView(t)}}}function lf(e,t=String){const s=new URLSearchParams;for(const n in e){const r=e[n];r!==void 0&&s.set(n,t(r))}return s.toString()}function nr(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function uf(e){const t=new URLSearchParams(e),s={};for(const[n,r]of t.entries()){const i=s[n];i==null?s[n]=nr(r):Array.isArray(i)?i.push(nr(r)):s[n]=[i,nr(r)]}return s}const ff=hf(JSON.parse),df=pf(JSON.stringify,JSON.parse);function hf(e){return t=>{t[0]==="?"&&(t=t.substring(1));const s=uf(t);for(const n in s){const r=s[n];if(typeof r=="string")try{s[n]=e(r)}catch{}}return s}}function pf(e,t){const s=typeof t=="function";function n(r){if(typeof r=="object"&&r!==null)try{return e(r)}catch{}else if(s&&typeof r=="string")try{return t(r),e(r)}catch{}return r}return r=>{const i=lf(r,n);return i?`?${i}`:""}}const Ne="__root__";function mf(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const s=new Response(null,{status:e.statusCode,headers:t});if(s.options=e,e.throw)throw s;return s}function Ue(e){return e instanceof Response&&!!e.options}const on=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},jn=(e,t)=>!!(e.preload&&!e.router.state.matches.some(s=>s.id===t)),ui=(e,t,s=!0)=>{const n={...e.router.options.context??{}},r=s?t:t-1;for(let i=0;i<=r;i++){const o=e.matches[i];if(!o)continue;const a=e.router.getMatch(o.id);a&&Object.assign(n,a.__routeContext,a.__beforeLoadContext)}return n},Aa=(e,t)=>{const s=e.router.routesById[t.routeId??""]??e.router.routeTree;!s.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(s.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Dt(s.options.notFoundComponent);const n=e.matches.find(r=>r.routeId===s.id);Dt(n,"Could not find match for route: "+s.id),e.updateMatch(n.id,r=>({...r,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&s.parentRoute&&(t.routeId=s.parentRoute.id,Aa(e,t))},_t=(e,t,s)=>{if(!(!Ue(s)&&!$e(s))){if(Ue(s)&&s.redirectHandled&&!s.options.reloadDocument)throw s;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const n=Ue(s)?"redirected":"notFound";t._nonReactive.error=s,e.updateMatch(t.id,r=>({...r,status:n,isFetching:!1,error:s})),$e(s)&&!s.routeId&&(s.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Ue(s)?(e.rendered=!0,s.options._fromLocation=e.location,s.redirectHandled=!0,s=e.router.resolveRedirect(s),s):(Aa(e,s),s)}},Na=(e,t)=>{const s=e.router.getMatch(t);return!!(!e.router.isServer&&s._nonReactive.dehydrated||e.router.isServer&&s.ssr===!1)},ps=(e,t,s,n)=>{const{id:r,routeId:i}=e.matches[t],o=e.router.looseRoutesById[i];if(s instanceof Promise)throw s;s.routerCode=n,e.firstBadMatchIndex??=t,_t(e,e.router.getMatch(r),s);try{o.options.onError?.(s)}catch(a){s=a,_t(e,e.router.getMatch(r),s)}e.updateMatch(r,a=>(a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loadPromise?.resolve(),{...a,error:s,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},gf=(e,t,s,n)=>{const r=e.router.getMatch(t),i=e.matches[s-1]?.id,o=i?e.router.getMatch(i):void 0;if(e.router.isShell()){r.ssr=n.id===Ne;return}if(o?.ssr===!1){r.ssr=!1;return}const a=h=>h===!0&&o?.ssr==="data-only"?"data-only":h,c=e.router.options.defaultSsr??!0;if(n.options.ssr===void 0){r.ssr=a(c);return}if(typeof n.options.ssr!="function"){r.ssr=a(n.options.ssr);return}const{search:u,params:f}=r,l={search:tn(u,r.searchError),params:tn(f,r.paramsError),location:e.location,matches:e.matches.map(h=>({index:h.index,pathname:h.pathname,fullPath:h.fullPath,staticData:h.staticData,id:h.id,routeId:h.routeId,search:tn(h.search,h.searchError),params:tn(h.params,h.paramsError),ssr:h.ssr}))},d=n.options.ssr(l);if(Rt(d))return d.then(h=>{r.ssr=a(h??c)});r.ssr=a(d??c)},Fa=(e,t,s,n)=>{if(n._nonReactive.pendingTimeout!==void 0)return;const r=s.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!jn(e,t)&&(s.options.loader||s.options.beforeLoad||ja(s))&&typeof r=="number"&&r!==1/0&&(s.options.pendingComponent??e.router.options?.defaultPendingComponent))){const o=setTimeout(()=>{on(e)},r);n._nonReactive.pendingTimeout=o}},vf=(e,t,s)=>{const n=e.router.getMatch(t);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;Fa(e,t,s,n);const r=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&_t(e,i,i.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(r):r()},yf=(e,t,s,n)=>{const r=e.router.getMatch(t),i=r._nonReactive.loadPromise;r._nonReactive.loadPromise=ts(()=>{i?.resolve()});const{paramsError:o,searchError:a}=r;o&&ps(e,s,o,"PARSE_PARAMS"),a&&ps(e,s,a,"VALIDATE_SEARCH"),Fa(e,t,n,r);const c=new AbortController,u=e.matches[s-1]?.id;(u?e.router.getMatch(u):void 0)?.context??e.router.options.context;let l=!1;const d=()=>{l||(l=!0,e.updateMatch(t,_=>({..._,isFetching:"beforeLoad",fetchCount:_.fetchCount+1,abortController:c})))},h=()=>{r._nonReactive.beforeLoadPromise?.resolve(),r._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,_=>({..._,isFetching:!1}))};if(!n.options.beforeLoad){Is(()=>{d(),h()});return}r._nonReactive.beforeLoadPromise=ts();const g={...ui(e,s,!1),...r.__routeContext},{search:y,params:x,cause:b}=r,L=jn(e,t),$={search:y,abortController:c,params:x,preload:L,context:g,location:e.location,navigate:_=>e.router.navigate({..._,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:L?"preload":b,matches:e.matches,...e.router.options.additionalContext},C=_=>{if(_===void 0){Is(()=>{d(),h()});return}(Ue(_)||$e(_))&&(d(),ps(e,s,_,"BEFORE_LOAD")),Is(()=>{d(),e.updateMatch(t,D=>({...D,__beforeLoadContext:_})),h()})};let k;try{if(k=n.options.beforeLoad($),Rt(k))return d(),k.catch(_=>{ps(e,s,_,"BEFORE_LOAD")}).then(C)}catch(_){d(),ps(e,s,_,"BEFORE_LOAD")}C(k)},_f=(e,t)=>{const{id:s,routeId:n}=e.matches[t],r=e.router.looseRoutesById[n],i=()=>{if(e.router.isServer){const c=gf(e,s,t,r);if(Rt(c))return c.then(a)}return a()},o=()=>yf(e,s,t,r),a=()=>{if(Na(e,s))return;const c=vf(e,s,r);return Rt(c)?c.then(o):o()};return i()},Ls=(e,t,s)=>{const n=e.router.getMatch(t);if(!n||!s.options.head&&!s.options.scripts&&!s.options.headers)return;const r={matches:e.matches,match:n,params:n.params,loaderData:n.loaderData};return Promise.all([s.options.head?.(r),s.options.scripts?.(r),s.options.headers?.(r)]).then(([i,o,a])=>{const c=i?.meta,u=i?.links,f=i?.scripts,l=i?.styles;return{meta:c,links:u,headScripts:f,headers:a,scripts:o,styles:l}})},$a=(e,t,s,n)=>{const r=e.matchPromises[s-1],{params:i,loaderDeps:o,abortController:a,cause:c}=e.router.getMatch(t),u=ui(e,s),f=jn(e,t);return{params:i,deps:o,preload:!!f,parentMatchPromise:r,abortController:a,context:u,location:e.location,navigate:l=>e.router.navigate({...l,_fromLocation:e.location}),cause:f?"preload":c,route:n,...e.router.options.additionalContext}},oo=async(e,t,s,n)=>{try{const r=e.router.getMatch(t);try{(!e.router.isServer||r.ssr===!0)&&Ba(n);const i=n.options.loader?.($a(e,t,s,n)),o=n.options.loader&&Rt(i);if(!!(o||n._lazyPromise||n._componentsPromise||n.options.head||n.options.scripts||n.options.headers||r._nonReactive.minPendingPromise)&&e.updateMatch(t,l=>({...l,isFetching:"loader"})),n.options.loader){const l=o?await i:i;_t(e,e.router.getMatch(t),l),l!==void 0&&e.updateMatch(t,d=>({...d,loaderData:l}))}n._lazyPromise&&await n._lazyPromise;const c=Ls(e,t,n),u=c?await c:void 0,f=r._nonReactive.minPendingPromise;f&&await f,n._componentsPromise&&await n._componentsPromise,e.updateMatch(t,l=>({...l,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...u}))}catch(i){let o=i;const a=r._nonReactive.minPendingPromise;a&&await a,$e(i)&&await n.options.notFoundComponent?.preload?.(),_t(e,e.router.getMatch(t),i);try{n.options.onError?.(i)}catch(f){o=f,_t(e,e.router.getMatch(t),f)}const c=Ls(e,t,n),u=c?await c:void 0;e.updateMatch(t,f=>({...f,error:o,status:"error",isFetching:!1,...u}))}}catch(r){const i=e.router.getMatch(t);if(i){const o=Ls(e,t,n);if(o){const a=await o;e.updateMatch(t,c=>({...c,...a}))}i._nonReactive.loaderPromise=void 0}_t(e,i,r)}},bf=async(e,t)=>{const{id:s,routeId:n}=e.matches[t];let r=!1,i=!1;const o=e.router.looseRoutesById[n],a=()=>{e.updateMatch(s,f=>({...f,context:ui(e,t)}))};if(Na(e,s)){if(e.router.isServer){const f=Ls(e,s,o);if(f){const l=await f;e.updateMatch(s,d=>({...d,...l}))}return e.router.getMatch(s)}}else{const f=e.router.getMatch(s);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const l=e.router.getMatch(s),d=l._nonReactive.error||l.error;d&&_t(e,l,d)}else{const l=Date.now()-f.updatedAt,d=jn(e,s),h=d?o.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:o.options.staleTime??e.router.options.defaultStaleTime??0,g=o.options.shouldReload,y=typeof g=="function"?g($a(e,s,t,o)):g,x=!!d&&!e.router.state.matches.some(C=>C.id===s),b=e.router.getMatch(s);b._nonReactive.loaderPromise=ts(),x!==b.preload&&e.updateMatch(s,C=>({...C,preload:x}));const{status:L,invalid:$}=b;if(r=L==="success"&&($||(y??l>h)),!(d&&o.options.preload===!1))if(r&&!e.sync)i=!0,(async()=>{try{await oo(e,s,t,o),a();const C=e.router.getMatch(s);C._nonReactive.loaderPromise?.resolve(),C._nonReactive.loadPromise?.resolve(),C._nonReactive.loaderPromise=void 0}catch(C){Ue(C)&&await e.router.navigate(C.options)}})();else if(L!=="success"||r&&e.sync)await oo(e,s,t,o);else{const C=Ls(e,s,o);if(C){const k=await C;e.updateMatch(s,_=>({..._,...k}))}}}}const c=e.router.getMatch(s);i||(c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loadPromise?.resolve()),clearTimeout(c._nonReactive.pendingTimeout),c._nonReactive.pendingTimeout=void 0,i||(c._nonReactive.loaderPromise=void 0),c._nonReactive.dehydrated=void 0,i||a();const u=i?c.isFetching:!1;return u!==c.isFetching||c.invalid!==!1?(e.updateMatch(s,f=>({...f,isFetching:u,invalid:!1})),e.router.getMatch(s)):c};async function ao(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(s=>s._forcePending)&&on(t);try{for(let r=0;r{const{id:s,...n}=t.options;Object.assign(e.options,n),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const s=[];for(const n of Da){const r=e.options[n]?.preload;r&&s.push(r())}if(s.length)return Promise.all(s).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function tn(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function ja(e){for(const t of Da)if(e.options[t]?.preload)return!0;return!1}const Da=["component","errorComponent","pendingComponent","notFoundComponent"];function xf(e){return{input:({url:t})=>{for(const s of e)t=Va(s,t);return t},output:({url:t})=>{for(let s=e.length-1;s>=0;s--)t=Ua(e[s],t);return t}}}function wf(e){const t=Ea(e.basepath),s=`/${t}`,n=`${s}/`,r=e.caseSensitive?s:s.toLowerCase(),i=e.caseSensitive?n:n.toLowerCase();return{input:({url:o})=>{const a=e.caseSensitive?o.pathname:o.pathname.toLowerCase();return a===r?o.pathname="/":a.startsWith(i)&&(o.pathname=o.pathname.slice(s.length)),o},output:({url:o})=>(o.pathname=rn(["/",t,o.pathname]),o)}}function Va(e,t){const s=e?.input?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function Ua(e,t){const s=e?.output?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function jt(e){const t=e.resolvedLocation,s=e.location,n=t?.pathname!==s.pathname,r=t?.href!==s.href,i=t?.hash!==s.hash;return{fromLocation:t,toLocation:s,pathChanged:n,hrefChanged:r,hashChanged:i}}class Sf{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=s=>s(),this.update=s=>{s.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const n=this.options,r=this.basepath??n?.basepath??"/",i=this.basepath===void 0,o=n?.rewrite;this.options={...n,...s},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(d=>[encodeURIComponent(d),d])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=La())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new Au(Cf(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(d=>!["redirected"].includes(d.status))}}}),af(this));let a=!1;const c=this.options.basepath??"/",u=this.options.rewrite;if(i||r!==c||o!==u){this.basepath=c;const d=[];Ea(c)!==""&&d.push(wf({basepath:c})),u&&d.push(u),this.rewrite=d.length===0?void 0:d.length===1?d[0]:xf(d),this.history&&this.updateLatestLocation(),a=!0}a&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:s,routesByPath:n,processedTree:r}=qu(this.routeTree,this.options.caseSensitive,(o,a)=>{o.init({originalIndex:a})});this.options.routeMasks&&Hu(this.options.routeMasks,r),this.routesById=s,this.routesByPath=n,this.processedTree=r;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)},this.subscribe=(s,n)=>{const r={eventType:s,fn:n};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=s=>{this.subscribers.forEach(n=>{n.eventType===s.type&&n.fn(s)})},this.parseLocation=(s,n)=>{const r=({href:c,state:u})=>{const f=new URL(c,this.origin),l=Va(this.rewrite,f),d=this.options.parseSearch(l.search),h=this.options.stringifySearch(d);return l.search=h,{href:l.href.replace(l.origin,""),publicHref:c,url:l,pathname:io(l.pathname),searchStr:h,search:je(n?.search,d),hash:l.hash.split("#").reverse()[0]??"",state:je(n?.state,u)}},i=r(s),{__tempLocation:o,__tempKey:a}=i.state;if(o&&(!a||a===this.tempLocationKey)){const c=r(o);return c.state.key=i.state.key,c.state.__TSR_key=i.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:i}}return i},this.resolvePathCache=_n(1e3),this.resolvePathWithBase=(s,n)=>ef({base:s,to:li(n),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,n,r)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:n},r):this.matchRoutesInternal(s,n),this.getMatchedRoutes=s=>Pf({pathname:s,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=s=>{const n=this.getMatch(s);n&&(n.abortController.abort(),clearTimeout(n._nonReactive.pendingTimeout),n._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const s=this.state.matches.filter(i=>i.status==="pending"),n=this.state.matches.filter(i=>i.isFetching==="loader");new Set([...this.state.pendingMatches??[],...s,...n]).forEach(i=>{this.cancelMatch(i.id)})},this.buildLocation=s=>{const n=(i={})=>{const o=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,a=this.matchRoutes(o,{_buildLocation:!0}),c=vn(a);i.from;const u=i.unsafeRelative==="path"?o.pathname:i.from??c.fullPath,f=this.resolvePathWithBase(u,"."),l=c.search,d={...c.params},h=i.to?this.resolvePathWithBase(f,`${i.to}`):this.resolvePathWithBase(f,"."),g=i.params===!1||i.params===null?{}:(i.params??!0)===!0?d:Object.assign(d,Gt(i.params,d)),y=sr({path:h,params:g}).interpolatedPath,x=this.matchRoutes(y,void 0,{_buildLocation:!0}).map(W=>this.looseRoutesById[W.routeId]);if(Object.keys(g).length>0)for(const W of x){const J=W.options.params?.stringify??W.options.stringifyParams;J&&Object.assign(g,J(g))}const b=s.leaveParams?h:io(sr({path:h,params:g,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let L=l;if(s._includeValidateSearch&&this.options.search?.strict){const W={};x.forEach(J=>{if(J.options.validateSearch)try{Object.assign(W,kr(J.options.validateSearch,{...W,...L}))}catch{}}),L=W}L=kf({search:L,dest:i,destRoutes:x,_includeValidateSearch:s._includeValidateSearch}),L=je(l,L);const $=this.options.stringifySearch(L),C=i.hash===!0?o.hash:i.hash?Gt(i.hash,o.hash):void 0,k=C?`#${C}`:"";let _=i.state===!0?o.state:i.state?Gt(i.state,o.state):{};_=je(o.state,_);const D=`${b}${$}${k}`,M=new URL(D,this.origin),B=Ua(this.rewrite,M);return{publicHref:B.pathname+B.search+B.hash,href:D,url:B,pathname:b,search:L,searchStr:$,state:_,hash:C??"",unmaskOnReload:i.unmaskOnReload}},r=(i={},o)=>{const a=n(i);let c=o?n(o):void 0;if(!c){const u={};if(this.options.routeMasks){const f=Zu(a.pathname,this.processedTree);if(f){Object.assign(u,f.params);const{from:l,params:d,...h}=f.route,g=d===!1||d===null?{}:(d??!0)===!0?u:Object.assign(u,Gt(d,u));o={from:s.from,...h,params:g},c=n(o)}}}return c&&(a.maskedLocation=c),a};return s.mask?r(s,{from:s.from,...s.mask}):r(s)},this.commitLocation=({viewTransition:s,ignoreBlocker:n,...r})=>{const i=()=>{const c=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(f=>{r.state[f]=this.latestLocation.state[f]});const u=$t(r.state,this.latestLocation.state);return c.forEach(f=>{delete r.state[f]}),u},o=Bt(this.latestLocation.href)===Bt(r.href),a=this.commitLocationPromise;if(this.commitLocationPromise=ts(()=>{a?.resolve()}),o&&i())this.load();else{let{maskedLocation:c,hashScrollIntoView:u,url:f,...l}=r;c&&(l={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...l,search:l.searchStr,state:{...l.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(l.unmaskOnReload??this.options.unmaskOnReload??!1)&&(l.state.__tempKey=this.tempLocationKey)),l.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[r.replace?"replace":"push"](l.publicHref,l.state,{ignoreBlocker:n})}return this.resetNextScroll=r.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:n,hashScrollIntoView:r,viewTransition:i,ignoreBlocker:o,href:a,...c}={})=>{if(a){const l=this.history.location.state.__TSR_index,d=Bs(a,{__TSR_index:s?l:l+1});c.to=d.pathname,c.search=this.options.parseSearch(d.search),c.hash=d.hash.slice(1)}const u=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const f=this.commitLocation({...u,viewTransition:i,replace:s,resetScroll:n,hashScrollIntoView:r,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),f},this.navigate=async({to:s,reloadDocument:n,href:r,...i})=>{if(!n&&r)try{new URL(`${r}`),n=!0}catch{}if(n){if(r||(r=this.buildLocation({to:s,...i}).url.href),!i.ignoreBlocker){const a=this.history.getBlockers?.()??[];for(const c of a)if(c?.blockerFn&&await c.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(r):window.location.href=r,Promise.resolve()}return this.buildAndCommitLocation({...i,href:r,to:s,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const n=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==n.publicHref||n.url.origin!==this.origin){const r=this.getParsedLocationHref(n);throw mf({href:r})}}const s=this.matchRoutes(this.latestLocation);this.__store.setState(n=>({...n,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:s,cachedMatches:n.cachedMatches.filter(r=>!s.some(i=>i.id===r.id))}))},this.load=async s=>{let n,r,i;for(i=new Promise(a=>{this.startTransition(async()=>{try{this.beforeLoad();const c=this.latestLocation,u=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...jt({resolvedLocation:u,location:c})}),this.emit({type:"onBeforeLoad",...jt({resolvedLocation:u,location:c})}),await ao({router:this,sync:s?.sync,matches:this.state.pendingMatches,location:c,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let f=[],l=[],d=[];Is(()=>{this.__store.setState(h=>{const g=h.matches,y=h.pendingMatches||h.matches;return f=g.filter(x=>!y.some(b=>b.id===x.id)),l=y.filter(x=>!g.some(b=>b.id===x.id)),d=y.filter(x=>g.some(b=>b.id===x.id)),{...h,isLoading:!1,loadedAt:Date.now(),matches:y,pendingMatches:void 0,cachedMatches:[...h.cachedMatches,...f.filter(x=>x.status!=="error"&&x.status!=="notFound")]}}),this.clearExpiredCache()}),[[f,"onLeave"],[l,"onEnter"],[d,"onStay"]].forEach(([h,g])=>{h.forEach(y=>{this.looseRoutesById[y.routeId].options[g]?.(y)})})})})}})}catch(c){Ue(c)?(n=c,this.isServer||this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):$e(c)&&(r=c),this.__store.setState(u=>({...u,statusCode:n?n.status:r?404:u.matches.some(f=>f.status==="error")?500:200,redirect:n}))}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),a()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.__store.state.matches.some(a=>a.status==="error")&&(o=500),o!==void 0&&this.__store.setState(a=>({...a,statusCode:o}))},this.startViewTransition=s=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;if(typeof n=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,o=this.state.resolvedLocation,a=typeof n.types=="function"?n.types(jt({resolvedLocation:o,location:i})):n.types;if(a===!1){s();return}r={update:s,types:a}}else r=s;document.startViewTransition(r)}else s()},this.updateMatch=(s,n)=>{this.startTransition(()=>{const r=this.state.pendingMatches?.some(i=>i.id===s)?"pendingMatches":this.state.matches.some(i=>i.id===s)?"matches":this.state.cachedMatches.some(i=>i.id===s)?"cachedMatches":"";r&&this.__store.setState(i=>({...i,[r]:i[r]?.map(o=>o.id===s?n(o):o)}))})},this.getMatch=s=>{const n=r=>r.id===s;return this.state.cachedMatches.find(n)??this.state.pendingMatches?.find(n)??this.state.matches.find(n)},this.invalidate=s=>{const n=r=>s?.filter?.(r)??!0?{...r,invalid:!0,...s?.forcePending||r.status==="error"||r.status==="notFound"?{status:"pending",error:void 0}:void 0}:r;return this.__store.setState(r=>({...r,matches:r.matches.map(n),cachedMatches:r.cachedMatches.map(n),pendingMatches:r.pendingMatches?.map(n)})),this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.getParsedLocationHref=s=>{let n=s.url.href;return this.origin&&s.url.origin===this.origin&&(n=n.replace(this.origin,"")||"/"),n},this.resolveRedirect=s=>{if(!s.options.href){const n=this.buildLocation(s.options),r=this.getParsedLocationHref(n);s.options.href=n.href,s.headers.set("Location",r)}return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{const n=s?.filter;n!==void 0?this.__store.setState(r=>({...r,cachedMatches:r.cachedMatches.filter(i=>!n(i))})):this.__store.setState(r=>({...r,cachedMatches:[]}))},this.clearExpiredCache=()=>{const s=n=>{const r=this.looseRoutesById[n.routeId];if(!r.options.loader)return!0;const i=(n.preload?r.options.preloadGcTime??this.options.defaultPreloadGcTime:r.options.gcTime??this.options.defaultGcTime)??300*1e3;return n.status==="error"?!0:Date.now()-n.updatedAt>=i};this.clearCache({filter:s})},this.loadRouteChunk=Ba,this.preloadRoute=async s=>{const n=this.buildLocation(s);let r=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:s});const i=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(a=>a.id)),o=new Set([...i,...this.state.cachedMatches.map(a=>a.id)]);Is(()=>{r.forEach(a=>{o.has(a.id)||this.__store.setState(c=>({...c,cachedMatches:[...c.cachedMatches,a]}))})});try{return r=await ao({router:this,matches:r,location:n,preload:!0,updateMatch:(a,c)=>{i.has(a)?r=r.map(u=>u.id===a?c(u):u):this.updateMatch(a,c)}}),r}catch(a){if(Ue(a))return a.options.reloadDocument?void 0:await this.preloadRoute({...a.options,_fromLocation:n});$e(a)||console.error(a);return}},this.matchRoute=(s,n)=>{const r={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},i=this.buildLocation(r);if(n?.pending&&this.state.status!=="pending")return!1;const a=(n?.pending===void 0?!this.state.isLoading:n.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,c=Wu(i.pathname,n?.caseSensitive??!1,n?.fuzzy??!1,a.pathname,this.processedTree);return!c||s.params&&!$t(c.params,s.params,{partial:!0})?!1:n?.includeSearch??!0?$t(a.search,i.search,{partial:!0})?c.params:!1:c.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(s=>s.status==="notFound"||s.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??df,parseSearch:t.parseSearch??ff}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,s){const n=this.getMatchedRoutes(t.pathname),{foundRoute:r,routeParams:i}=n;let{matchedRoutes:o}=n,a=!1;(r?r.path!=="/"&&i["**"]:Bt(t.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const c=(()=>{if(a){if(this.options.notFoundMode!=="root")for(let l=o.length-1;l>=0;l--){const d=o[l];if(d.children)return d.id}return Ne}})(),u=[],f=l=>l?.id?l.context??this.options.context??void 0:this.options.context??void 0;return o.forEach((l,d)=>{const h=u[d-1],[g,y,x]=(()=>{const P=h?.search??t.search,H=h?._strictSearch??void 0;try{const te=kr(l.options.validateSearch,{...P})??void 0;return[{...P,...te},{...H,...te},void 0]}catch(te){let Q=te;if(te instanceof Sn||(Q=new Sn(te.message,{cause:te})),s?.throwOnError)throw Q;return[P,{},Q]}})(),b=l.options.loaderDeps?.({search:g})??"",L=b?JSON.stringify(b):"",{interpolatedPath:$,usedParams:C}=sr({path:l.fullPath,params:i,decodeCharMap:this.pathParamsDecodeCharMap}),k=l.id+$+L,_=this.getMatch(k),D=this.state.matches.find(P=>P.routeId===l.id),M=_?._strictParams??C;let B;if(!_){const P=l.options.params?.parse??l.options.parseParams;if(P)try{Object.assign(M,P(M))}catch(H){if($e(H)||Ue(H)?B=H:B=new Rf(H.message,{cause:H}),s?.throwOnError)throw B}}Object.assign(i,M);const W=D?"stay":"enter";let J;if(_)J={..._,cause:W,params:D?je(D.params,i):i,_strictParams:M,search:je(D?D.search:_.search,g),_strictSearch:y};else{const P=l.options.loader||l.options.beforeLoad||l.lazyFn||ja(l)?"pending":"success";J={id:k,ssr:this.isServer?void 0:l.options.ssr,index:d,routeId:l.id,params:D?je(D.params,i):i,_strictParams:M,pathname:$,updatedAt:Date.now(),search:D?je(D.search,g):g,_strictSearch:y,searchError:void 0,status:P,isFetching:!1,error:void 0,paramsError:B,__routeContext:void 0,_nonReactive:{loadPromise:ts()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:W,loaderDeps:D?je(D.loaderDeps,b):b,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:l.options.staticData||{},fullPath:l.fullPath}}s?.preload||(J.globalNotFound=c===l.id),J.searchError=x;const de=f(h);J.context={...de,...J.__routeContext,...J.__beforeLoadContext},u.push(J)}),u.forEach((l,d)=>{const h=this.looseRoutesById[l.routeId];if(!this.getMatch(l.id)&&s?._buildLocation!==!0){const y=u[d-1],x=f(y);if(h.options.context){const b={deps:l.loaderDeps,params:l.params,context:x??{},location:t,navigate:L=>this.navigate({...L,_fromLocation:t}),buildLocation:this.buildLocation,cause:l.cause,abortController:l.abortController,preload:!!l.preload,matches:u};l.__routeContext=h.options.context(b)??void 0}l.context={...x,...l.__routeContext,...l.__beforeLoadContext}}}),u}}class Sn extends Error{}class Rf extends Error{}function Cf(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function kr(e,t){if(e==null)return{};if("~standard"in e){const s=e["~standard"].validate(t);if(s instanceof Promise)throw new Sn("Async validation not supported");if(s.issues)throw new Sn(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function Pf({pathname:e,routesById:t,processedTree:s}){const n={},r=Bt(e);let i;const o=zu(r,s,!0);return o&&(i=o.route,Object.assign(n,o.params)),{matchedRoutes:o?.branch||[t[Ne]],routeParams:n,foundRoute:i}}function kf({search:e,dest:t,destRoutes:s,_includeValidateSearch:n}){const r=s.reduce((a,c)=>{const u=[];if("search"in c.options)c.options.search?.middlewares&&u.push(...c.options.search.middlewares);else if(c.options.preSearchFilters||c.options.postSearchFilters){const f=({search:l,next:d})=>{let h=l;"preSearchFilters"in c.options&&c.options.preSearchFilters&&(h=c.options.preSearchFilters.reduce((y,x)=>x(y),l));const g=d(h);return"postSearchFilters"in c.options&&c.options.postSearchFilters?c.options.postSearchFilters.reduce((y,x)=>x(y),g):g};u.push(f)}if(n&&c.options.validateSearch){const f=({search:l,next:d})=>{const h=d(l);try{return{...h,...kr(c.options.validateSearch,h)??void 0}}catch{return h}};u.push(f)}return a.concat(u)},[])??[],i=({search:a})=>t.search?t.search===!0?a:Gt(t.search,a):{};r.push(i);const o=(a,c)=>{if(a>=r.length)return c;const u=r[a];return u({search:c,next:l=>o(a+1,l)})};return o(0,e)}const Tf="Error preloading route! ☝️";class Ha{constructor(t){if(this.init=s=>{this.originalIndex=s.originalIndex;const n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Ne:this.parentRoute||Dt(!1);let i=r?Ne:n?.path;i&&i!=="/"&&(i=Ma(i));const o=n?.id||i;let a=r?Ne:rn([this.parentRoute.id===Ne?"":this.parentRoute.id,o]);i===Ne&&(i="/"),a!==Ne&&(a=rn(["/",a]));const c=a===Ne?"/":rn([this.parentRoute.fullPath,i]);this._path=i,this._id=a,this._fullPath=c,this._to=c},this.addChildren=s=>this._addFileChildren(s),this._addFileChildren=s=>(Array.isArray(s)&&(this.children=s),typeof s=="object"&&s!==null&&(this.children=Object.values(s)),this),this._addFileTypes=()=>this,this.updateLoader=s=>(Object.assign(this.options,s),this),this.update=s=>(Object.assign(this.options,s),this),this.lazy=s=>(this.lazyFn=s,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class If extends Ha{constructor(t){super(t)}}const Lf=ve({name:"VueErrorBoundary",props:{onError:Function,resetKey:[String,Number]},emits:["catch"],setup(e,{slots:t}){const s=we(null),n=we(null),r=()=>{s.value=null};return Qe(()=>e.resetKey,(i,o)=>{i!==o&&s.value&&r()}),oa(i=>(i instanceof Promise||i&&typeof i.then=="function"||(s.value=i,n.value=r,e.onError&&e.onError(i)),!1)),()=>{if(s.value&&t.fallback){const o=t.fallback({error:s.value,reset:r});return Array.isArray(o)&&o.length===1?o[0]:o}const i=t.default&&t.default();return Array.isArray(i)&&i.length===1?i[0]:i}}}),Mf=ve({name:"CatchBoundary",inheritAttrs:!1,props:["getResetKey","children","errorComponent","onCatch"],setup(e){const t=fe(()=>e.getResetKey());return()=>j(Lf,{resetKey:t.value,onError:e.onCatch},{default:()=>e.children,fallback:({error:s,reset:n})=>e.errorComponent?j(e.errorComponent,{error:s,reset:n}):j(Za,{error:s,reset:n})})}});function fi(e){return j(Mf,e)}const Za=ve({name:"ErrorComponent",props:{error:Object,reset:Function},setup(e){const t=we(!1),s=()=>{t.value=!t.value};return()=>j("div",{style:{padding:".5rem",maxWidth:"100%"}},[j("div",{style:{display:"flex",alignItems:"center",gap:".5rem"}},[j("strong",{style:{fontSize:"1rem"}},"Something went wrong!"),j("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:s},t.value?"Hide Error":"Show Error")]),j("div",{style:{height:".25rem"}}),t.value?j("div",{},[j("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"}},[e.error?.message?j("code",{},e.error.message):null])]):null])}});function Ef(e,t=n=>n,s={}){const n=we(t(e.state)),r=s.equal??Of;return Qe(()=>e,(i,o,a)=>{const c=i.subscribe(()=>{const u=t(i.state);r(ae(n.value),u)||(n.value=u)});a(()=>{c()})},{immediate:!0}),cn(n)}function Of(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const s=Object.keys(e);if(s.length!==Object.keys(t).length)return!1;for(let n=0;n"u"?rr:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=rr,rr)}function Af(e){An(Wa(),e)}function Ce(e){const t=wt(Wa(),null);return e?.warn,t}function _e(e){const t=Ce({warn:e?.router===void 0}),s=e?.router||t;return!s||!s.__store?we(void 0):Ef(s.__store,n=>e?.select?e.select(n):n)}const Dn=Symbol("TanStackRouterMatch"),Nf=Symbol("TanStackRouterDummyMatch");function Ff(){return wt(Dn,we(void 0))}function $f(){return wt(Nf,we(void 0))}function st(e){const t=e.from?$f():Ff(),s=we(null),n=_e({select:i=>{const o=i.matches.find(a=>e.from?e.from===a.routeId:a.id===t.value);if(o===void 0){if(i.pendingMatches?.find(c=>e.from?e.from===c.routeId:c.id===t.value)||i.isTransitioning){s.value=null;return}(e.shouldThrow??!0)&&(s.value=new Error(`Invariant failed: Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`));return}return s.value=null,e.select?e.select(o):o}}),r=fe(()=>{if(s.value)throw s.value;return n.value});if(s.value)throw s.value;return r}function di(e){return st({from:e.from,strict:e.strict,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function hi(e){const{select:t,...s}=e;return st({...s,select:n=>t?t(n.loaderDeps):n.loaderDeps})}function pi(e){return st({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,select:t=>e.select?e.select(t.params):t.params})}function mi(e){return st({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,select:t=>e.select?e.select(t.search):t.search})}function gi(e){const{navigate:t}=Ce();return s=>t({from:e?.from,...s})}let Bf=class extends Ha{constructor(t){super(t),this.useMatch=s=>st({select:s?.select,from:this.id}),this.useRouteContext=s=>st({...s,from:this.id,select:n=>s?.select?s.select(n.context):n.context}),this.useSearch=s=>mi({select:s?.select,from:this.id}),this.useParams=s=>pi({select:s?.select,from:this.id}),this.useLoaderDeps=s=>hi({...s,from:this.id}),this.useLoaderData=s=>di({...s,from:this.id}),this.useNavigate=()=>gi({from:this.fullPath})}};function jf(e){return new Bf(e)}class Df extends If{constructor(t){super(t),this.useMatch=s=>st({select:s?.select,from:this.id}),this.useRouteContext=s=>st({...s,from:this.id,select:n=>s?.select?s.select(n.context):n.context}),this.useSearch=s=>mi({select:s?.select,from:this.id}),this.useParams=s=>pi({select:s?.select,from:this.id}),this.useLoaderDeps=s=>hi({...s,from:this.id}),this.useLoaderData=s=>di({...s,from:this.id}),this.useNavigate=()=>gi({from:this.fullPath})}}function Vf(e){return new Df(e)}function cs(e){return typeof e=="object"?new co(e,{silent:!0}).createRoute(e):new co(e,{silent:!0}).createRoute}class co{constructor(t,s){this.path=t,this.createRoute=n=>{this.silent;const r=jf(n);return r.isRoot=!1,r},this.silent=s?.silent}}class lo{constructor(t){this.useMatch=s=>st({select:s?.select,from:this.options.id}),this.useRouteContext=s=>st({from:this.options.id,select:n=>s?.select?s.select(n.context):n.context}),this.useSearch=s=>mi({select:s?.select,from:this.options.id}),this.useParams=s=>pi({select:s?.select,from:this.options.id}),this.useLoaderDeps=s=>hi({...s,from:this.options.id}),this.useLoaderData=s=>di({...s,from:this.options.id}),this.useNavigate=()=>{const s=Ce();return gi({from:s.routesById[this.options.id].fullPath})},this.options=t}}function mh(e){return typeof e=="object"?new lo(e):t=>new lo({id:e,...t})}function Uf(e){const t=_e({select:n=>`not-found-${n.location.pathname}-${n.status}`});return j(fi,{getResetKey:()=>t.value,onCatch:n=>{if($e(n))e.onCatch&&e.onCatch(n);else throw n},errorComponent:n=>{const r=n.error;if($e(r))return e.fallback?e.fallback(r):j("p",null,"Not Found");throw r},children:e.children})}const Hf=ve({name:"DefaultGlobalNotFound",setup(){return()=>j("p",null,"Not Found")}});function za(e,t,s){return t.options.notFoundComponent?j(t.options.notFoundComponent,s):e.options.defaultNotFoundComponent?j(e.options.defaultNotFoundComponent,s):j(Hf)}const uo=ve({name:"ScriptOnce",props:{children:{type:String,required:!0}},setup(e){const t=Ce();if(t.isServer)return()=>ce("script",{nonce:t.options.ssr?.nonce,class:"$tsr",innerHTML:e.children},null);const s=we(!1);return at(()=>{s.value=!0}),()=>s.value?null:ce("script",{nonce:t.options.ssr?.nonce,class:"$tsr","data-allow-mismatch":!0,innerHTML:""},null)}}),Zf=ve({name:"ScrollRestoration",setup(){const e=Ce(),t=we(!1);return at(()=>{t.value=!0}),()=>{if(t.value||!e.isScrollRestoring||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||Pr)(e.latestLocation),r=n!==Pr(e.latestLocation)?n:void 0,i={storageKey:xn,shouldScrollRestoration:!0};return r&&(i.key=r),e.isServer?ce(uo,{children:`(${Oa.toString()})(${JSON.stringify(i)})`},null):ce(uo,{children:""},null)}}}),Ka=ve({name:"Match",props:{matchId:{type:String,required:!0}},setup(e){const t=Ce();let s=null;const n=_e({select:f=>{let l=f.matches.find(y=>y.id===e.matchId),d=l?f.matches.findIndex(y=>y.id===e.matchId):-1;if(l?s=l.routeId:s&&(l=f.matches.find(y=>y.routeId===s),d=l?f.matches.findIndex(y=>y.routeId===s):-1),!l)return null;const h=l.routeId,g=d>0?f.matches[d-1]?.routeId:null;return{matchId:l.id,routeId:h,parentRouteId:g,loadedAt:f.loadedAt}}});Dt(n.value,`Could not find routeId for matchId "${e.matchId}". Please file an issue!`);const r=fe(()=>n.value?t.routesById[n.value.routeId]:null),i=fe(()=>r.value?.options?.pendingComponent??t?.options?.defaultPendingComponent),o=fe(()=>r.value?.options?.errorComponent??t?.options?.defaultErrorComponent),a=fe(()=>r.value?.options?.onCatch??t?.options?.defaultOnCatch),c=fe(()=>r.value?.isRoot?r.value?.options?.notFoundComponent??t?.options?.notFoundRoute?.options?.component:r.value?.options?.notFoundComponent),u=we(n.value?.matchId??e.matchId);return Qe([()=>e.matchId,()=>n.value?.matchId],([f,l])=>{u.value=l??f},{immediate:!0}),An(Dn,u),()=>{const f=n.value?.matchId??e.matchId;let l=j(zf,{matchId:f});c.value&&(l=j(Uf,{fallback:g=>{if(!c.value||g.routeId&&g.routeId!==n.value?.routeId||!g.routeId&&r.value&&!r.value.isRoot)throw g;return j(c.value,g)},children:l})),o.value&&(l=fi({getResetKey:()=>n.value?.loadedAt??0,errorComponent:o.value||Za,onCatch:g=>{if($e(g))throw g;a.value?.(g)},children:l})),r.value&&(r.value?.options?.wrapInSuspense??i.value??!1)&&(l=j(si,{fallback:i.value?j(i.value):null},{default:()=>l}));const h=[l,n.value?.parentRouteId===Ne&&t.options.scrollRestoration?j(Fe,null,[j(Wf),j(Zf)]):null].filter(Boolean);return h.length===1?h[0]:j(Fe,null,h)}}}),Wf=ve({name:"OnRendered",setup(){const e=Ce(),t=_e({select:s=>s.resolvedLocation?.state.key});return la(()=>{t.value&&e.emit({type:"onRendered",...jt(e.state)})}),()=>null}}),zf=ve({name:"MatchInner",props:{matchId:{type:String,required:!0}},setup(e){const t=Ce();let s=null;const n=_e({select:a=>{let c=a.matches.find(d=>d.id===e.matchId);if(c)s=c.routeId;else if(s){const d=a.matches.find(h=>h.routeId===s);d&&(c=d)}if(!c)return null;const u=c.routeId,f=t.routesById[u].options.remountDeps??t.options.defaultRemountDeps;let l;if(f){const d=f({routeId:u,loaderDeps:c.loaderDeps,params:c._strictParams,search:c._strictSearch});l=d?JSON.stringify(d):void 0}return{routeId:u,match:{id:c.id,status:c.status,error:c.error},remountKey:l}}}),r=fe(()=>n.value?t.routesById[n.value.routeId]:null),i=fe(()=>n.value?.match),o=fe(()=>n.value?.remountKey);return()=>{if(!n.value||!i.value||!r.value)return null;if(i.value.status==="notFound")return Dt($e(i.value.error)),za(t,r.value,i.value.error);if(i.value.status==="redirected")throw Dt(Ue(i.value.error)),t.getMatch(i.value.id)?._nonReactive.loadPromise;if(i.value.status==="error"){const u=r.value.options.errorComponent??t.options.defaultErrorComponent;if(u)return j(u,{error:i.value.error,reset:()=>{t.invalidate()},info:{componentStack:""}});throw i.value.error}if(i.value.status==="pending"){const u=r.value.options.pendingMinMs??t.options.defaultPendingMinMs,f=t.getMatch(i.value.id);if(u&&f&&!f._nonReactive.minPendingPromise&&!t.isServer){const d=ts();f._nonReactive.minPendingPromise=d,setTimeout(()=>{d.resolve(),f._nonReactive.minPendingPromise=void 0},u)}const l=r.value.options.pendingComponent??t.options.defaultPendingComponent;return l?j(l):null}const a=r.value.options.component??t.options.defaultComponent,c=o.value;return a?j(a,c!==void 0?{key:c}:void 0):j(qa,c!==void 0?{key:c}:void 0)}}}),qa=ve({name:"Outlet",setup(){const e=Ce(),t=wt(Dn),s=fe(()=>t?.value||""),n=_e({select:a=>a.matches.find(c=>c.id===s.value)?.routeId}),r=fe(()=>e.routesById[n.value]),i=_e({select:a=>{const u=a.matches.find(f=>f.id===s.value);return u?u.globalNotFound:!1}}),o=_e({select:a=>{const c=a.matches,u=c.findIndex(l=>l.id===s.value),f=c[u+1];return f?{id:f.id,paramsKey:f.routeId+JSON.stringify(f._strictParams)}:null}});return()=>{if(i.value)return za(e,r.value,void 0);if(!o.value)return null;const a=j(Ka,{matchId:o.value.id,key:o.value.paramsKey});return s.value===Ne?j(si,{fallback:e.options.defaultPendingComponent?j(e.options.defaultPendingComponent):null},{default:()=>a}):a}}});function ir(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function vi(e,t,s){let n,r=null,i=null,o=!1;const a=()=>(n||(n=e().then(u=>(n=void 0,r=u[t],r)).catch(u=>{if(i=u,n=void 0,ir(i))return null;throw u})),n),c=ve({name:"LazyRouteComponent",setup(u){const f=Bc(r&&hr(r)),l=we(i),d=we(!f.value&&!l.value);if(at(()=>{!f.value&&!l.value&&(d.value=!0,a().then(h=>{f.value=h&&hr(h),d.value=!1}).catch(h=>{l.value=h,d.value=!1}))}),l.value&&ir(l.value)&&!o&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${l.value.message}`;if(!sessionStorage.getItem(h))return sessionStorage.setItem(h,"1"),o=!0,window.location.reload(),()=>null}if(l.value&&!ir(l.value))throw l.value;return()=>d.value||!f.value?j("div",null):j(f.value,u)}});return c.preload=a,c}const or=e=>fe((t={current:null,previous:null})=>{const s=e();return t.current!==s&&(t.previous=t.current,t.current=s),t});function Kf(e,t,s={},n={}){const r=typeof IntersectionObserver=="function",i=we(null);return la(o=>{const a=e.value,c=typeof n.disabled=="function"?n.disabled():n.disabled;if(!a||!r||c)return;const u=new IntersectionObserver(([f])=>{t(f)},s);i.value=u,u.observe(a),o(()=>{u.disconnect(),i.value=null})}),i}let ar={router:null,mounted:!1};function qf(){const e=Ce();if(e.isServer)return;const t=_e({select:({isLoading:d})=>d}),s=we(!1),n=_e({select:d=>d.matches.some(h=>h.status==="pending")}),r=or(()=>t.value),i=fe(()=>t.value||s.value||n.value),o=or(()=>i.value),a=fe(()=>t.value||n.value),c=or(()=>a.value);e.startTransition=d=>{s.value=!0;try{e.__store.setState(g=>({...g,isTransitioning:!0}))}catch{}const h=()=>{pr(()=>{try{s.value=!1,e.__store.setState(g=>({...g,isTransitioning:!1}))}catch{}})};d(),h()};const u=e.__tsrOriginalStartViewTransition??e.startViewTransition;e.__tsrOriginalStartViewTransition=u,e.startViewTransition=d=>u?.(async()=>{await d(),await pr()});let f;at(()=>{f=e.history.subscribe(e.load);const d=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});Bt(e.latestLocation.href)!==Bt(d.href)&&e.commitLocation({...d,replace:!0})});const l=we(!1);at(()=>{l.value=!0}),Jr(()=>{l.value=!1,f&&f()}),at(()=>{if(typeof window<"u"&&e.ssr||ar.router===e&&ar.mounted)return;ar={router:e,mounted:!0},(async()=>{try{await e.load()}catch(h){console.error(h)}})()}),Qe(()=>t.value,d=>{if(l.value)try{r.value.previous&&!d&&e.emit({type:"onLoad",...jt(e.state)})}catch{}}),Qe(a,d=>{if(l.value)try{c.value.previous&&!d&&e.emit({type:"onBeforeRouteMount",...jt(e.state)})}catch{}}),Qe(i,d=>{if(l.value)try{if(o.value.previous&&!d){const h=jt(e.state);e.emit({type:"onResolved",...h}),e.__store.setState(g=>({...g,status:"idle",resolvedLocation:g.location})),h.hrefChanged&&cf(e)}}catch{}})}const fo=ve({name:"MatchesContent",setup(){return qf(),()=>j(Yf)}}),Gf=ve({name:"Matches",setup(){const e=Ce();return()=>{const t=e?.options?.defaultPendingComponent?j(e.options.defaultPendingComponent):null,s=e?.isServer||typeof document<"u"&&e?.ssr?j(fo):j(si,{fallback:t},{default:()=>j(fo)});return e?.options?.InnerWrap?j(e.options.InnerWrap,null,{default:()=>s}):s}}}),Jf=e=>j("div",{class:"error"},[j("h1",null,"Error"),j("p",null,e.error.message||String(e.error)),j("button",{onClick:e.reset},"Try Again")]),Yf=ve({name:"MatchesInner",setup(){const e=Ce(),t=_e({select:r=>r.matches[0]?.id}),s=_e({select:r=>r.loadedAt}),n=fe(()=>t.value);return An(Dn,n),()=>{const r=t.value?j(Ka,{matchId:t.value}):j("div");return e.options.disableGlobalCatchBoundary?r:j(fi,{getResetKey:()=>s.value,errorComponent:Jf,onCatch:i=>{i.message||i.toString()},children:r})}}});function Xf(e){return _e({select:t=>{const s=t?.matches||[];return e?.select?e.select(s):s}})}function Qf(e){const t=Ce(),s=we(!1);let n=!1;if(!t)return console.warn("useRouter must be used inside a component!"),{};const r=fe(()=>{try{return new URL(`${e.to}`),"external"}catch{return"internal"}}),i=_e({select:P=>P.location.searchStr}),o=Xf({select:P=>e.from??P[P.length-1]?.fullPath}),a=fe(()=>({...e,from:o.value})),c=fe(()=>(i.value,t.buildLocation(a.value))),u=fe(()=>a.value.reloadDocument?!1:e.preload??t.options.defaultPreload),f=fe(()=>e.preloadDelay??t.options.defaultPreloadDelay??0),l=_e({select:P=>{const H=e.activeOptions;if(H?.exact){if(!Qu(P.location.pathname,c.value.pathname,t.basepath))return!1}else{const te=bn(P.location.pathname,t.basepath).split("/");if(!bn(c.value?.pathname,t.basepath)?.split("/")?.every((oe,nt)=>oe===te[nt]))return!1}return(H?.includeSearch??!0)&&!$t(P.location.search,c.value.search,{partial:!H?.exact,ignoreUndefined:!H?.explicitUndefined})?!1:H?.includeHash?P.location.hash===c.value.hash:!0}}),d=()=>t.preloadRoute(a.value).catch(P=>{console.warn(P),console.warn(Tf)}),h=P=>{P?.isIntersecting&&d()},g=we(null);Kf(g,h,{rootMargin:"100px"},{disabled:()=>!!e.disabled||u.value!=="viewport"}),_c(()=>{n||!e.disabled&&u.value==="render"&&(d(),n=!0)});const y=()=>{const P={};for(const H in e)["activeProps","inactiveProps","activeOptions","to","preload","preloadDelay","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","children","target","disabled","style","class","onClick","onFocus","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","onTouchStart","ignoreBlocker","params","search","hash","state","mask","reloadDocument","_asChild","from","additionalProps"].includes(H)||(P[H]=e[H]);return P};if(r.value==="external"){const P={...y(),ref:g,href:e.to,target:e.target,disabled:e.disabled,style:e.style,class:e.class,onClick:e.onClick,onFocus:e.onFocus,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onMouseOver:e.onMouseOver,onMouseOut:e.onMouseOut,onTouchStart:e.onTouchStart};return Object.keys(P).forEach(H=>{P[H]===void 0&&delete P[H]}),P}const x=P=>{const H=P.currentTarget?.getAttribute("target"),te=e.target!==void 0?e.target:H;if(!e.disabled&&!td(P)&&!P.defaultPrevented&&(!te||te==="_self")&&P.button===0){if(a.value.reloadDocument)return;P.preventDefault(),s.value=!0;const Q=t.subscribe("onResolved",()=>{Q(),s.value=!1});t.navigate({...a.value,replace:e.replace,resetScroll:e.resetScroll,hashScrollIntoView:e.hashScrollIntoView,startTransition:e.startTransition,viewTransition:e.viewTransition,ignoreBlocker:e.ignoreBlocker})}},b=P=>{e.disabled||u.value&&d()},L=P=>{e.disabled||u.value&&d()},$=P=>{if(e.disabled)return;const H=P.currentTarget||P.target||{};if(u.value){if(H.preloadTimeout)return;H.preloadTimeout=setTimeout(()=>{H.preloadTimeout=null,d()},f.value)}},C=P=>{if(e.disabled)return;const H=P.currentTarget||P.target||{};H.preloadTimeout&&(clearTimeout(H.preloadTimeout),H.preloadTimeout=null)};function k(P){return H=>{for(const te of P)te&&te(H)}}const _=fe(()=>{const P=e.activeProps||(()=>({class:"active"}));return(l.value?typeof P=="function"?P():P:{})||{class:void 0,style:void 0}}),D=fe(()=>{const P=e.inactiveProps||(()=>({}));return(l.value?{}:typeof P=="function"?P():P)||{class:void 0,style:void 0}}),M=fe(()=>{const P=[e.class,_.value?.class,D.value?.class].filter(Boolean);return P.length?P.join(" "):void 0}),B=fe(()=>{const P={};return e.style&&Object.assign(P,e.style),_.value?.style&&Object.assign(P,_.value.style),D.value?.style&&Object.assign(P,D.value.style),Object.keys(P).length>0?P:void 0}),W=fe(()=>{if(e.disabled)return;const P=c.value,H=P?.maskedLocation;let te;return H?te=H.url.href:te=P?.url.href,t.origin&&te?.startsWith(t.origin)&&(te=t.history.createHref(te.replace(t.origin,""))),te}),J={onClick:k([e.onClick,x]),onFocus:k([e.onFocus,b]),onMouseenter:k([e.onMouseEnter,$]),onMouseover:k([e.onMouseOver,$]),onMouseleave:k([e.onMouseLeave,C]),onMouseout:k([e.onMouseOut,C]),onTouchstart:k([e.onTouchStart,L])};return fe(()=>{const P={...y(),href:W.value,ref:g,...J,disabled:!!e.disabled,target:e.target};B.value&&(P.style=B.value),M.value&&(P.class=M.value),e.disabled&&(P.role="link",P["aria-disabled"]=!0),l.value&&(P["data-status"]="active",P["aria-current"]="page"),s.value&&(P["data-transitioning"]="transitioning");const H=_.value,te=D.value;for(const Q of Object.keys(H))Q!=="class"&&Q!=="style"&&(P[Q]=H[Q]);for(const Q of Object.keys(te))Q!=="class"&&Q!=="style"&&(P[Q]=te[Q]);return P})}const ed=ve({name:"Link",inheritAttrs:!1,props:["_asChild","to","preload","preloadDelay","activeProps","inactiveProps","activeOptions","from","search","params","hash","state","mask","reloadDocument","disabled","additionalProps","viewTransition","resetScroll","startTransition","hashScrollIntoView","replace","ignoreBlocker","target"],setup(e,{attrs:t,slots:s}){const n={...e,...t},r=Qf(n);return()=>{const i=e._asChild||"a",o=r.value,a=o["data-status"]==="active",c=o["data-transitioning"]==="transitioning",u=s.default?s.default({isActive:a,isTransitioning:c}):[];if(i==="svg"){const f={...o};return delete f.class,j("svg",{},[j("a",f,u)])}return typeof i!="string"?j(i,{...o,children:u},u):j(i,o,u)}}}),ho=ed;function td(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const ms=e=>e,sd=e=>new nd(e);class nd extends Sf{constructor(t){super(t)}}const rd=ve({name:"RouterContextProvider",props:{router:{type:Object,required:!0}},setup(e,{attrs:t,slots:s}){const n=e.router,r=t;return n.update({...n.options,...r,context:{...n.options.context,...r.context||{}}}),Af(n),()=>{const i=s.default?.();if(n.options.Wrap){const o=n.options.Wrap;return j(o,null,()=>i)}return Array.isArray(i)&&i.length===1?i[0]:i}}}),id=ve({name:"RouterProvider",props:{router:{type:Object,required:!0}},setup(e,{attrs:t}){const s=t;return()=>j(rd,{router:e.router,...s},{default:()=>j(Gf)})}}),od=ve({name:"Title",props:{children:{type:String,default:""}},setup(e){return Ce().isServer||(at(()=>{e.children&&(document.title=e.children)}),Qe(()=>e.children,s=>{s&&(document.title=s)})),()=>j("title",{},e.children)}}),ad=ve({name:"Script",props:{attrs:{type:Object,default:()=>({})},children:{type:String,default:void 0}},setup(e){const t=Ce();return t.isServer||at(()=>{const s=e.attrs,n=e.children;if(s?.src){const r=(()=>{try{const a=document.baseURI||window.location.href;return new URL(s.src,a).href}catch{return s.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(a=>a.src===r))return;const o=document.createElement("script");for(const[a,c]of Object.entries(s))c!==void 0&&c!==!1&&o.setAttribute(a,typeof c=="boolean"?"":String(c));document.head.appendChild(o)}else if(typeof n=="string"){const r=typeof s?.type=="string"?s.type:"text/javascript",i=typeof s?.nonce=="string"?s.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(c=>{if(!(c instanceof HTMLScriptElement))return!1;const u=c.getAttribute("type")??"text/javascript",f=c.getAttribute("nonce")??void 0;return c.textContent===n&&u===r&&f===i}))return;const a=document.createElement("script");if(a.textContent=n,s)for(const[c,u]of Object.entries(s))u!==void 0&&u!==!1&&a.setAttribute(c,typeof u=="boolean"?"":String(u));document.head.appendChild(a)}}),()=>{if(!t.isServer){const{src:s,...n}=e.attrs||{};return j("script",{...n,"data-allow-mismatch":!0,innerHTML:""})}return e.attrs?.src&&typeof e.attrs.src=="string"?j("script",e.attrs):typeof e.children=="string"?j("script",{...e.attrs,innerHTML:e.children}):null}}});function cd({tag:e,attrs:t,children:s}){switch(e){case"title":return j(od,{children:s});case"meta":return ce("meta",t,null);case"link":return ce("link",t,null);case"style":return ce("style",ri(t,{innerHTML:s}),null);case"script":return j(ad,{attrs:t,children:s});default:return null}}const ld=()=>{const e=Ce(),t=_e({select:o=>o.matches.map(a=>a.meta).filter(Boolean)}),s=fe(()=>{const o=[],a={};let c;return[...t.value].reverse().forEach(u=>{[...u].reverse().forEach(f=>{if(f)if(f.title)c||(c={tag:"title",children:f.title});else{const l=f.name??f.property;if(l){if(a[l])return;a[l]=!0}o.push({tag:"meta",attrs:{...f}})}})}),c&&o.push(c),o.reverse(),o}),n=_e({select:o=>o.matches.map(a=>a.links).filter(Boolean).flat(1).map(a=>({tag:"link",attrs:{...a}}))}),r=_e({select:o=>{const a=[];return o.matches.map(c=>e.looseRoutesById[c.routeId]).forEach(c=>e.ssr?.manifest?.routes[c.id]?.preloads?.filter(Boolean).forEach(u=>{a.push({tag:"link",attrs:{rel:"modulepreload",href:u}})})),a}}),i=_e({select:o=>o.matches.map(a=>a.headScripts).flat(1).filter(Boolean).map(({children:a,...c})=>({tag:"script",attrs:{...c},children:a}))});return()=>fd([...s.value,...r.value,...n.value,...i.value],o=>JSON.stringify(o))},ud=ve({name:"HeadContent",setup(){const e=ld();return()=>e().map(t=>j(cd,{...t,key:`tsr-meta-${JSON.stringify(t)}`}))}});function fd(e,t){const s=new Set;return e.filter(n=>{const r=t(n);return s.has(r)?!1:(s.add(r),!0)})}const dd="modulepreload",hd=function(e){return"/"+e},po={},ls=function(t,s,n){let r=Promise.resolve();if(s&&s.length>0){let c=function(u){return Promise.all(u.map(f=>Promise.resolve(f).then(l=>({status:"fulfilled",value:l}),l=>({status:"rejected",reason:l}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=o?.nonce||o?.getAttribute("nonce");r=c(s.map(u=>{if(u=hd(u),u in po)return;po[u]=!0;const f=u.endsWith(".css"),l=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${l}`))return;const d=document.createElement("link");if(d.rel=f?"stylesheet":dd,f||(d.as="script"),d.crossOrigin="",d.href=u,a&&d.setAttribute("nonce",a),document.head.appendChild(d),f)return new Promise((h,g)=>{d.addEventListener("load",h),d.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return r.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})},pd=ve({name:"NullTanStackRouterDevtools",setup(){return()=>null}}),md=pd,Wt=Vf({component:gd});function gd(){return ce(Fe,null,[ce(ud,null,null),ce(mo,{type:"header"},null),ce("hr",null,null),ce(qa,null,null),ce("hr",null,null),ce(mo,{type:"footer"},null),ce(md,{position:"bottom-right"},null)])}function mo({type:e}){const t=e==="header"?"header":"footer",s=e==="header"?"Head":"Foot";return ce(t,{class:"p-2 flex gap-2 text-lg"},{default:()=>[ce(ho,{to:"/",activeProps:{class:"font-bold"},activeOptions:{exact:!0}},{default:()=>[s,xr("-/")]})," ",[ms({to:"/normal-page"}),ms({to:"/lazy-page"}),ms({to:"/virtual-page"}),ms({to:"/lazy-with-loader-page"}),ms({to:"/page-with-search",search:{where:e}})].map(n=>ce(ho,ri(n,{activeProps:{class:"font-bold"}}),{default:()=>[s,xr("-"),n.to]}))]})}const vd=()=>ls(()=>import("./index-rPfEOKs3.js"),[]),yd=cs("/")({component:vi(vd,"component")});var re;(function(e){e.assertEqual=r=>{};function t(r){}e.assertIs=t;function s(r){throw new Error}e.assertNever=s,e.arrayToEnum=r=>{const i={};for(const o of r)i[o]=o;return i},e.getValidEnumValues=r=>{const i=e.objectKeys(r).filter(a=>typeof r[r[a]]!="number"),o={};for(const a of i)o[a]=r[a];return e.objectValues(o)},e.objectValues=r=>e.objectKeys(r).map(function(i){return r[i]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const i=[];for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&i.push(o);return i},e.find=(r,i)=>{for(const o of r)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function n(r,i=" | "){return r.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(r,i)=>typeof i=="bigint"?i.toString():i})(re||(re={}));var go;(function(e){e.mergeShapes=(t,s)=>({...t,...s})})(go||(go={}));const V=re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),gt=e=>{switch(typeof e){case"undefined":return V.undefined;case"string":return V.string;case"number":return Number.isNaN(e)?V.nan:V.number;case"boolean":return V.boolean;case"function":return V.function;case"bigint":return V.bigint;case"symbol":return V.symbol;case"object":return Array.isArray(e)?V.array:e===null?V.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?V.promise:typeof Map<"u"&&e instanceof Map?V.map:typeof Set<"u"&&e instanceof Set?V.set:typeof Date<"u"&&e instanceof Date?V.date:V.object;default:return V.unknown}},I=re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ft extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=t}format(t){const s=t||function(i){return i.message},n={_errors:[]},r=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(r);else if(o.code==="invalid_return_type")r(o.returnTypeError);else if(o.code==="invalid_arguments")r(o.argumentsError);else if(o.path.length===0)n._errors.push(s(o));else{let a=n,c=0;for(;cs.message){const s={},n=[];for(const r of this.issues)r.path.length>0?(s[r.path[0]]=s[r.path[0]]||[],s[r.path[0]].push(t(r))):n.push(t(r));return{formErrors:n,fieldErrors:s}}get formErrors(){return this.flatten()}}ft.create=e=>new ft(e);const Tr=(e,t)=>{let s;switch(e.code){case I.invalid_type:e.received===V.undefined?s="Required":s=`Expected ${e.expected}, received ${e.received}`;break;case I.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(e.expected,re.jsonStringifyReplacer)}`;break;case I.unrecognized_keys:s=`Unrecognized key(s) in object: ${re.joinValues(e.keys,", ")}`;break;case I.invalid_union:s="Invalid input";break;case I.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${re.joinValues(e.options)}`;break;case I.invalid_enum_value:s=`Invalid enum value. Expected ${re.joinValues(e.options)}, received '${e.received}'`;break;case I.invalid_arguments:s="Invalid function arguments";break;case I.invalid_return_type:s="Invalid function return type";break;case I.invalid_date:s="Invalid date";break;case I.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(s=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(s=`${s} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?s=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?s=`Invalid input: must end with "${e.validation.endsWith}"`:re.assertNever(e.validation):e.validation!=="regex"?s=`Invalid ${e.validation}`:s="Invalid";break;case I.too_small:e.type==="array"?s=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?s=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?s=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?s=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:s="Invalid input";break;case I.too_big:e.type==="array"?s=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?s=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?s=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?s=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?s=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:s="Invalid input";break;case I.custom:s="Invalid input";break;case I.invalid_intersection_types:s="Intersection results could not be merged";break;case I.not_multiple_of:s=`Number must be a multiple of ${e.multipleOf}`;break;case I.not_finite:s="Number must be finite";break;default:s=t.defaultError,re.assertNever(e)}return{message:s}};let _d=Tr;function bd(){return _d}const xd=e=>{const{data:t,path:s,errorMaps:n,issueData:r}=e,i=[...s,...r.path||[]],o={...r,path:i};if(r.message!==void 0)return{...r,path:i,message:r.message};let a="";const c=n.filter(u=>!!u).slice().reverse();for(const u of c)a=u(o,{data:t,defaultError:a}).message;return{...r,path:i,message:a}};function N(e,t){const s=bd(),n=xd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,s,s===Tr?void 0:Tr].filter(r=>!!r)});e.common.issues.push(n)}class Ae{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,s){const n=[];for(const r of s){if(r.status==="aborted")return q;r.status==="dirty"&&t.dirty(),n.push(r.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,s){const n=[];for(const r of s){const i=await r.key,o=await r.value;n.push({key:i,value:o})}return Ae.mergeObjectSync(t,n)}static mergeObjectSync(t,s){const n={};for(const r of s){const{key:i,value:o}=r;if(i.status==="aborted"||o.status==="aborted")return q;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||r.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}}const q=Object.freeze({status:"aborted"}),ys=e=>({status:"dirty",value:e}),Be=e=>({status:"valid",value:e}),vo=e=>e.status==="aborted",yo=e=>e.status==="dirty",ns=e=>e.status==="valid",Rn=e=>typeof Promise<"u"&&e instanceof Promise;var U;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(U||(U={}));class It{constructor(t,s,n,r){this._cachedPath=[],this.parent=t,this.data=s,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const _o=(e,t)=>{if(ns(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const s=new ft(e.common.issues);return this._error=s,this._error}}};function ee(e){if(!e)return{};const{errorMap:t,invalid_type_error:s,required_error:n,description:r}=e;if(t&&(s||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(o,a)=>{const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:c??s??a.defaultError}},description:r}}class ne{get description(){return this._def.description}_getType(t){return gt(t.data)}_getOrReturnCtx(t,s){return s||{common:t.parent.common,data:t.data,parsedType:gt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ae,ctx:{common:t.parent.common,data:t.data,parsedType:gt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const s=this._parse(t);if(Rn(s))throw new Error("Synchronous parse encountered promise.");return s}_parseAsync(t){const s=this._parse(t);return Promise.resolve(s)}parse(t,s){const n=this.safeParse(t,s);if(n.success)return n.data;throw n.error}safeParse(t,s){const n={common:{issues:[],async:s?.async??!1,contextualErrorMap:s?.errorMap},path:s?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:gt(t)},r=this._parseSync({data:t,path:n.path,parent:n});return _o(n,r)}"~validate"(t){const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:gt(t)};if(!this["~standard"].async)try{const n=this._parseSync({data:t,path:[],parent:s});return ns(n)?{value:n.value}:{issues:s.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:s}).then(n=>ns(n)?{value:n.value}:{issues:s.common.issues})}async parseAsync(t,s){const n=await this.safeParseAsync(t,s);if(n.success)return n.data;throw n.error}async safeParseAsync(t,s){const n={common:{issues:[],contextualErrorMap:s?.errorMap,async:!0},path:s?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:gt(t)},r=this._parse({data:t,path:n.path,parent:n}),i=await(Rn(r)?r:Promise.resolve(r));return _o(n,i)}refine(t,s){const n=r=>typeof s=="string"||typeof s>"u"?{message:s}:typeof s=="function"?s(r):s;return this._refinement((r,i)=>{const o=t(r),a=()=>i.addIssue({code:I.custom,...n(r)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,s){return this._refinement((n,r)=>t(n)?!0:(r.addIssue(typeof s=="function"?s(n,r):s),!1))}_refinement(t){return new is({schema:this,typeName:G.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:s=>this["~validate"](s)}}optional(){return Ct.create(this,this._def)}nullable(){return os.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return et.create(this)}promise(){return Tn.create(this,this._def)}or(t){return Pn.create([this,t],this._def)}and(t){return kn.create(this,t,this._def)}transform(t){return new is({...ee(this._def),schema:this,typeName:G.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const s=typeof t=="function"?t:()=>t;return new Lr({...ee(this._def),innerType:this,defaultValue:s,typeName:G.ZodDefault})}brand(){return new Zd({typeName:G.ZodBranded,type:this,...ee(this._def)})}catch(t){const s=typeof t=="function"?t:()=>t;return new Mr({...ee(this._def),innerType:this,catchValue:s,typeName:G.ZodCatch})}describe(t){const s=this.constructor;return new s({...this._def,description:t})}pipe(t){return yi.create(this,t)}readonly(){return Er.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const wd=/^c[^\s-]{8,}$/i,Sd=/^[0-9a-z]+$/,Rd=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Cd=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Pd=/^[a-z0-9_-]{21}$/i,kd=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Td=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Id=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ld="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let cr;const Md=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ed=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Od=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ad=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Nd=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Fd=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ga="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",$d=new RegExp(`^${Ga}$`);function Ja(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const s=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${s}`}function Bd(e){return new RegExp(`^${Ja(e)}$`)}function jd(e){let t=`${Ga}T${Ja(e)}`;const s=[];return s.push(e.local?"Z?":"Z"),e.offset&&s.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${s.join("|")})`,new RegExp(`^${t}$`)}function Dd(e,t){return!!((t==="v4"||!t)&&Md.test(e)||(t==="v6"||!t)&&Od.test(e))}function Vd(e,t){if(!kd.test(e))return!1;try{const[s]=e.split("."),n=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),r=JSON.parse(atob(n));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||t&&r.alg!==t)}catch{return!1}}function Ud(e,t){return!!((t==="v4"||!t)&&Ed.test(e)||(t==="v6"||!t)&&Ad.test(e))}class bt extends ne{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==V.string){const i=this._getOrReturnCtx(t);return N(i,{code:I.invalid_type,expected:V.string,received:i.parsedType}),q}const n=new Ae;let r;for(const i of this._def.checks)if(i.kind==="min")t.data.lengthi.value&&(r=this._getOrReturnCtx(t,r),N(r,{code:I.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,a=t.data.lengtht.test(r),{validation:s,code:I.invalid_string,...U.errToObj(n)})}_addCheck(t){return new bt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...U.errToObj(t)})}url(t){return this._addCheck({kind:"url",...U.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...U.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...U.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...U.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...U.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...U.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...U.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...U.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...U.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...U.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...U.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...U.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...U.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...U.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...U.errToObj(t)})}regex(t,s){return this._addCheck({kind:"regex",regex:t,...U.errToObj(s)})}includes(t,s){return this._addCheck({kind:"includes",value:t,position:s?.position,...U.errToObj(s?.message)})}startsWith(t,s){return this._addCheck({kind:"startsWith",value:t,...U.errToObj(s)})}endsWith(t,s){return this._addCheck({kind:"endsWith",value:t,...U.errToObj(s)})}min(t,s){return this._addCheck({kind:"min",value:t,...U.errToObj(s)})}max(t,s){return this._addCheck({kind:"max",value:t,...U.errToObj(s)})}length(t,s){return this._addCheck({kind:"length",value:t,...U.errToObj(s)})}nonempty(t){return this.min(1,U.errToObj(t))}trim(){return new bt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new bt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new bt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t}get maxLength(){let t=null;for(const s of this._def.checks)s.kind==="max"&&(t===null||s.valuenew bt({checks:[],typeName:G.ZodString,coerce:e?.coerce??!1,...ee(e)});function Hd(e,t){const s=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,r=s>n?s:n,i=Number.parseInt(e.toFixed(r).replace(".","")),o=Number.parseInt(t.toFixed(r).replace(".",""));return i%o/10**r}class Vs extends ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==V.number){const i=this._getOrReturnCtx(t);return N(i,{code:I.invalid_type,expected:V.number,received:i.parsedType}),q}let n;const r=new Ae;for(const i of this._def.checks)i.kind==="int"?re.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),N(n,{code:I.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),N(n,{code:I.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="multipleOf"?Hd(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),N(n,{code:I.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),N(n,{code:I.not_finite,message:i.message}),r.dirty()):re.assertNever(i);return{status:r.value,value:t.data}}gte(t,s){return this.setLimit("min",t,!0,U.toString(s))}gt(t,s){return this.setLimit("min",t,!1,U.toString(s))}lte(t,s){return this.setLimit("max",t,!0,U.toString(s))}lt(t,s){return this.setLimit("max",t,!1,U.toString(s))}setLimit(t,s,n,r){return new Vs({...this._def,checks:[...this._def.checks,{kind:t,value:s,inclusive:n,message:U.toString(r)}]})}_addCheck(t){return new Vs({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:U.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:U.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:U.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:U.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:U.toString(t)})}multipleOf(t,s){return this._addCheck({kind:"multipleOf",value:t,message:U.toString(s)})}finite(t){return this._addCheck({kind:"finite",message:U.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:U.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:U.toString(t)})}get minValue(){let t=null;for(const s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t}get maxValue(){let t=null;for(const s of this._def.checks)s.kind==="max"&&(t===null||s.valuet.kind==="int"||t.kind==="multipleOf"&&re.isInteger(t.value))}get isFinite(){let t=null,s=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(s===null||n.value>s)&&(s=n.value):n.kind==="max"&&(t===null||n.valuenew Vs({checks:[],typeName:G.ZodNumber,coerce:e?.coerce||!1,...ee(e)});class Us extends ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==V.bigint)return this._getInvalidInput(t);let n;const r=new Ae;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),N(n,{code:I.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),N(n,{code:I.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):re.assertNever(i);return{status:r.value,value:t.data}}_getInvalidInput(t){const s=this._getOrReturnCtx(t);return N(s,{code:I.invalid_type,expected:V.bigint,received:s.parsedType}),q}gte(t,s){return this.setLimit("min",t,!0,U.toString(s))}gt(t,s){return this.setLimit("min",t,!1,U.toString(s))}lte(t,s){return this.setLimit("max",t,!0,U.toString(s))}lt(t,s){return this.setLimit("max",t,!1,U.toString(s))}setLimit(t,s,n,r){return new Us({...this._def,checks:[...this._def.checks,{kind:t,value:s,inclusive:n,message:U.toString(r)}]})}_addCheck(t){return new Us({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:U.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:U.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:U.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:U.toString(t)})}multipleOf(t,s){return this._addCheck({kind:"multipleOf",value:t,message:U.toString(s)})}get minValue(){let t=null;for(const s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t}get maxValue(){let t=null;for(const s of this._def.checks)s.kind==="max"&&(t===null||s.valuenew Us({checks:[],typeName:G.ZodBigInt,coerce:e?.coerce??!1,...ee(e)});class bo extends ne{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==V.boolean){const n=this._getOrReturnCtx(t);return N(n,{code:I.invalid_type,expected:V.boolean,received:n.parsedType}),q}return Be(t.data)}}bo.create=e=>new bo({typeName:G.ZodBoolean,coerce:e?.coerce||!1,...ee(e)});class Cn extends ne{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==V.date){const i=this._getOrReturnCtx(t);return N(i,{code:I.invalid_type,expected:V.date,received:i.parsedType}),q}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return N(i,{code:I.invalid_date}),q}const n=new Ae;let r;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()i.value&&(r=this._getOrReturnCtx(t,r),N(r,{code:I.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):re.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Cn({...this._def,checks:[...this._def.checks,t]})}min(t,s){return this._addCheck({kind:"min",value:t.getTime(),message:U.toString(s)})}max(t,s){return this._addCheck({kind:"max",value:t.getTime(),message:U.toString(s)})}get minDate(){let t=null;for(const s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const s of this._def.checks)s.kind==="max"&&(t===null||s.valuenew Cn({checks:[],coerce:e?.coerce||!1,typeName:G.ZodDate,...ee(e)});class xo extends ne{_parse(t){if(this._getType(t)!==V.symbol){const n=this._getOrReturnCtx(t);return N(n,{code:I.invalid_type,expected:V.symbol,received:n.parsedType}),q}return Be(t.data)}}xo.create=e=>new xo({typeName:G.ZodSymbol,...ee(e)});class wo extends ne{_parse(t){if(this._getType(t)!==V.undefined){const n=this._getOrReturnCtx(t);return N(n,{code:I.invalid_type,expected:V.undefined,received:n.parsedType}),q}return Be(t.data)}}wo.create=e=>new wo({typeName:G.ZodUndefined,...ee(e)});class So extends ne{_parse(t){if(this._getType(t)!==V.null){const n=this._getOrReturnCtx(t);return N(n,{code:I.invalid_type,expected:V.null,received:n.parsedType}),q}return Be(t.data)}}So.create=e=>new So({typeName:G.ZodNull,...ee(e)});class Ro extends ne{constructor(){super(...arguments),this._any=!0}_parse(t){return Be(t.data)}}Ro.create=e=>new Ro({typeName:G.ZodAny,...ee(e)});class Co extends ne{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Be(t.data)}}Co.create=e=>new Co({typeName:G.ZodUnknown,...ee(e)});class Lt extends ne{_parse(t){const s=this._getOrReturnCtx(t);return N(s,{code:I.invalid_type,expected:V.never,received:s.parsedType}),q}}Lt.create=e=>new Lt({typeName:G.ZodNever,...ee(e)});class Po extends ne{_parse(t){if(this._getType(t)!==V.undefined){const n=this._getOrReturnCtx(t);return N(n,{code:I.invalid_type,expected:V.void,received:n.parsedType}),q}return Be(t.data)}}Po.create=e=>new Po({typeName:G.ZodVoid,...ee(e)});class et extends ne{_parse(t){const{ctx:s,status:n}=this._processInputParams(t),r=this._def;if(s.parsedType!==V.array)return N(s,{code:I.invalid_type,expected:V.array,received:s.parsedType}),q;if(r.exactLength!==null){const o=s.data.length>r.exactLength.value,a=s.data.lengthr.maxLength.value&&(N(s,{code:I.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),s.common.async)return Promise.all([...s.data].map((o,a)=>r.type._parseAsync(new It(s,o,s.path,a)))).then(o=>Ae.mergeArray(n,o));const i=[...s.data].map((o,a)=>r.type._parseSync(new It(s,o,s.path,a)));return Ae.mergeArray(n,i)}get element(){return this._def.type}min(t,s){return new et({...this._def,minLength:{value:t,message:U.toString(s)}})}max(t,s){return new et({...this._def,maxLength:{value:t,message:U.toString(s)}})}length(t,s){return new et({...this._def,exactLength:{value:t,message:U.toString(s)}})}nonempty(t){return this.min(1,t)}}et.create=(e,t)=>new et({type:e,minLength:null,maxLength:null,exactLength:null,typeName:G.ZodArray,...ee(t)});function qt(e){if(e instanceof ye){const t={};for(const s in e.shape){const n=e.shape[s];t[s]=Ct.create(qt(n))}return new ye({...e._def,shape:()=>t})}else return e instanceof et?new et({...e._def,type:qt(e.element)}):e instanceof Ct?Ct.create(qt(e.unwrap())):e instanceof os?os.create(qt(e.unwrap())):e instanceof Ht?Ht.create(e.items.map(t=>qt(t))):e}class ye extends ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),s=re.objectKeys(t);return this._cached={shape:t,keys:s},this._cached}_parse(t){if(this._getType(t)!==V.object){const u=this._getOrReturnCtx(t);return N(u,{code:I.invalid_type,expected:V.object,received:u.parsedType}),q}const{status:n,ctx:r}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Lt&&this._def.unknownKeys==="strip"))for(const u in r.data)o.includes(u)||a.push(u);const c=[];for(const u of o){const f=i[u],l=r.data[u];c.push({key:{status:"valid",value:u},value:f._parse(new It(r,l,r.path,u)),alwaysSet:u in r.data})}if(this._def.catchall instanceof Lt){const u=this._def.unknownKeys;if(u==="passthrough")for(const f of a)c.push({key:{status:"valid",value:f},value:{status:"valid",value:r.data[f]}});else if(u==="strict")a.length>0&&(N(r,{code:I.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const f of a){const l=r.data[f];c.push({key:{status:"valid",value:f},value:u._parse(new It(r,l,r.path,f)),alwaysSet:f in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const u=[];for(const f of c){const l=await f.key,d=await f.value;u.push({key:l,value:d,alwaysSet:f.alwaysSet})}return u}).then(u=>Ae.mergeObjectSync(n,u)):Ae.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return U.errToObj,new ye({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(s,n)=>{const r=this._def.errorMap?.(s,n).message??n.defaultError;return s.code==="unrecognized_keys"?{message:U.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new ye({...this._def,unknownKeys:"strip"})}passthrough(){return new ye({...this._def,unknownKeys:"passthrough"})}extend(t){return new ye({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ye({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:G.ZodObject})}setKey(t,s){return this.augment({[t]:s})}catchall(t){return new ye({...this._def,catchall:t})}pick(t){const s={};for(const n of re.objectKeys(t))t[n]&&this.shape[n]&&(s[n]=this.shape[n]);return new ye({...this._def,shape:()=>s})}omit(t){const s={};for(const n of re.objectKeys(this.shape))t[n]||(s[n]=this.shape[n]);return new ye({...this._def,shape:()=>s})}deepPartial(){return qt(this)}partial(t){const s={};for(const n of re.objectKeys(this.shape)){const r=this.shape[n];t&&!t[n]?s[n]=r:s[n]=r.optional()}return new ye({...this._def,shape:()=>s})}required(t){const s={};for(const n of re.objectKeys(this.shape))if(t&&!t[n])s[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Ct;)i=i._def.innerType;s[n]=i}return new ye({...this._def,shape:()=>s})}keyof(){return Ya(re.objectKeys(this.shape))}}ye.create=(e,t)=>new ye({shape:()=>e,unknownKeys:"strip",catchall:Lt.create(),typeName:G.ZodObject,...ee(t)});ye.strictCreate=(e,t)=>new ye({shape:()=>e,unknownKeys:"strict",catchall:Lt.create(),typeName:G.ZodObject,...ee(t)});ye.lazycreate=(e,t)=>new ye({shape:e,unknownKeys:"strip",catchall:Lt.create(),typeName:G.ZodObject,...ee(t)});class Pn extends ne{_parse(t){const{ctx:s}=this._processInputParams(t),n=this._def.options;function r(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return s.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new ft(a.ctx.common.issues));return N(s,{code:I.invalid_union,unionErrors:o}),q}if(s.common.async)return Promise.all(n.map(async i=>{const o={...s,common:{...s.common,issues:[]},parent:null};return{result:await i._parseAsync({data:s.data,path:s.path,parent:o}),ctx:o}})).then(r);{let i;const o=[];for(const c of n){const u={...s,common:{...s.common,issues:[]},parent:null},f=c._parseSync({data:s.data,path:s.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!i&&(i={result:f,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return s.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(c=>new ft(c));return N(s,{code:I.invalid_union,unionErrors:a}),q}}get options(){return this._def.options}}Pn.create=(e,t)=>new Pn({options:e,typeName:G.ZodUnion,...ee(t)});function Ir(e,t){const s=gt(e),n=gt(t);if(e===t)return{valid:!0,data:e};if(s===V.object&&n===V.object){const r=re.objectKeys(t),i=re.objectKeys(e).filter(a=>r.indexOf(a)!==-1),o={...e,...t};for(const a of i){const c=Ir(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(s===V.array&&n===V.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let i=0;i{if(vo(i)||vo(o))return q;const a=Ir(i.value,o.value);return a.valid?((yo(i)||yo(o))&&s.dirty(),{status:s.value,value:a.data}):(N(n,{code:I.invalid_intersection_types}),q)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>r(i,o)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}kn.create=(e,t,s)=>new kn({left:e,right:t,typeName:G.ZodIntersection,...ee(s)});class Ht extends ne{_parse(t){const{status:s,ctx:n}=this._processInputParams(t);if(n.parsedType!==V.array)return N(n,{code:I.invalid_type,expected:V.array,received:n.parsedType}),q;if(n.data.length