@tanstack/react-router 1.157.2 → 1.157.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2967,6 +2967,24 @@ function Component() {
2967
2967
  }
2968
2968
  \`\`\`
2969
2969
 
2970
+ By default, param values with characters such as \`@\` will be encoded in the URL:
2971
+
2972
+ \`\`\`tsx
2973
+ // url path will be \`/%40foo\`
2974
+ <Link to="/$username" params={{ username: '@foo' }} />
2975
+ \`\`\`
2976
+
2977
+ To opt-out, update the [pathParamsAllowedCharacters](../router/RouterOptionsType#pathparamsallowedcharacters-property) config on the router
2978
+
2979
+ \`\`\`tsx
2980
+ import { createRouter } from '@tanstack/react-router'
2981
+
2982
+ const router = createRouter({
2983
+ routeTree,
2984
+ pathParamsAllowedCharacters: ['@'],
2985
+ })
2986
+ \`\`\`
2987
+
2970
2988
  # Link options
2971
2989
 
2972
2990
  \`linkOptions\` is a function which type checks an object literal with the intention of being used for \`Link\`, \`navigate\` or \`redirect\`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-router",
3
- "version": "1.157.2",
3
+ "version": "1.157.4",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -82,7 +82,7 @@
82
82
  "tiny-invariant": "^1.3.3",
83
83
  "tiny-warning": "^1.0.3",
84
84
  "@tanstack/history": "1.154.14",
85
- "@tanstack/router-core": "1.157.1"
85
+ "@tanstack/router-core": "1.157.4"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@testing-library/jest-dom": "^6.6.3",
package/src/Asset.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react'
2
- import { isServer } from '@tanstack/router-core'
2
+ import { isServer } from '@tanstack/router-core/isServer'
3
3
  import { useRouter } from './useRouter'
4
4
  import type { RouterManagedTag } from '@tanstack/router-core'
5
5
 
package/src/Match.tsx CHANGED
@@ -6,9 +6,9 @@ import {
6
6
  getLocationChangeInfo,
7
7
  isNotFound,
8
8
  isRedirect,
9
- isServer,
10
9
  rootRouteId,
11
10
  } from '@tanstack/router-core'
11
+ import { isServer } from '@tanstack/router-core/isServer'
12
12
  import { CatchBoundary, ErrorComponent } from './CatchBoundary'
13
13
  import { useRouterState } from './useRouterState'
14
14
  import { useRouter } from './useRouter'
package/src/Matches.tsx CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react'
2
2
  import warning from 'tiny-warning'
3
- import { isServer, rootRouteId } from '@tanstack/router-core'
3
+ import { rootRouteId } from '@tanstack/router-core'
4
+ import { isServer } from '@tanstack/router-core/isServer'
4
5
  import { CatchBoundary, ErrorComponent } from './CatchBoundary'
5
6
  import { useRouterState } from './useRouterState'
6
7
  import { useRouter } from './useRouter'
@@ -1,4 +1,4 @@
1
- import { isServer } from '@tanstack/router-core'
1
+ import { isServer } from '@tanstack/router-core/isServer'
2
2
  import { useRouter } from './useRouter'
3
3
 
4
4
  /**
package/src/link.tsx CHANGED
@@ -5,10 +5,10 @@ import {
5
5
  exactPathTest,
6
6
  functionalUpdate,
7
7
  isDangerousProtocol,
8
- isServer,
9
8
  preloadWarning,
10
9
  removeTrailingSlash,
11
10
  } from '@tanstack/router-core'
11
+ import { isServer } from '@tanstack/router-core/isServer'
12
12
  import { useRouterState } from './useRouterState'
13
13
  import { useRouter } from './useRouter'
14
14
 
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  defaultGetScrollRestorationKey,
3
3
  escapeHtml,
4
- isServer,
5
4
  restoreScroll,
6
5
  storageKey,
7
6
  } from '@tanstack/router-core'
7
+ import { isServer } from '@tanstack/router-core/isServer'
8
8
  import { useRouter } from './useRouter'
9
9
  import { ScriptOnce } from './ScriptOnce'
10
10