@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.
- package/dist/cjs/Asset.cjs +2 -2
- package/dist/cjs/Asset.cjs.map +1 -1
- package/dist/cjs/Match.cjs +3 -2
- package/dist/cjs/Match.cjs.map +1 -1
- package/dist/cjs/Matches.cjs +3 -2
- package/dist/cjs/Matches.cjs.map +1 -1
- package/dist/cjs/ScriptOnce.cjs +2 -2
- package/dist/cjs/ScriptOnce.cjs.map +1 -1
- package/dist/cjs/link.cjs +2 -1
- package/dist/cjs/link.cjs.map +1 -1
- package/dist/cjs/scroll-restoration.cjs +2 -1
- package/dist/cjs/scroll-restoration.cjs.map +1 -1
- package/dist/esm/Asset.js +1 -1
- package/dist/esm/Asset.js.map +1 -1
- package/dist/esm/Match.js +2 -1
- package/dist/esm/Match.js.map +1 -1
- package/dist/esm/Matches.js +2 -1
- package/dist/esm/Matches.js.map +1 -1
- package/dist/esm/ScriptOnce.js +1 -1
- package/dist/esm/ScriptOnce.js.map +1 -1
- package/dist/esm/link.js +2 -1
- package/dist/esm/link.js.map +1 -1
- package/dist/esm/scroll-restoration.js +2 -1
- package/dist/esm/scroll-restoration.js.map +1 -1
- package/dist/llms/rules/api.d.ts +1 -1
- package/dist/llms/rules/api.js +18 -0
- package/package.json +2 -2
- package/src/Asset.tsx +1 -1
- package/src/Match.tsx +1 -1
- package/src/Matches.tsx +2 -1
- package/src/ScriptOnce.tsx +1 -1
- package/src/link.tsx +1 -1
- package/src/scroll-restoration.tsx +1 -1
package/dist/llms/rules/api.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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
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 {
|
|
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'
|
package/src/ScriptOnce.tsx
CHANGED
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
|
|