@tanstack/react-router 1.45.10 → 1.45.11
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/path.cjs +5 -1
- package/dist/cjs/path.cjs.map +1 -1
- package/dist/cjs/path.d.cts +1 -1
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +2 -0
- package/dist/esm/path.d.ts +1 -1
- package/dist/esm/path.js +5 -1
- package/dist/esm/path.js.map +1 -1
- package/dist/esm/router.d.ts +2 -0
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/path.ts +8 -2
- package/src/router.ts +2 -0
package/src/path.ts
CHANGED
|
@@ -8,7 +8,13 @@ export interface Segment {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export function joinPaths(paths: Array<string | undefined>) {
|
|
11
|
-
return cleanPath(
|
|
11
|
+
return cleanPath(
|
|
12
|
+
paths
|
|
13
|
+
.filter((val) => {
|
|
14
|
+
return val !== undefined
|
|
15
|
+
})
|
|
16
|
+
.join('/'),
|
|
17
|
+
)
|
|
12
18
|
}
|
|
13
19
|
|
|
14
20
|
export function cleanPath(path: string) {
|
|
@@ -193,7 +199,7 @@ export function parsePathname(pathname?: string): Array<Segment> {
|
|
|
193
199
|
|
|
194
200
|
interface InterpolatePathOptions {
|
|
195
201
|
path?: string
|
|
196
|
-
params:
|
|
202
|
+
params: Record<string, unknown>
|
|
197
203
|
leaveWildcards?: boolean
|
|
198
204
|
leaveParams?: boolean
|
|
199
205
|
}
|
package/src/router.ts
CHANGED
|
@@ -323,12 +323,14 @@ export interface RouterOptions<
|
|
|
323
323
|
/**
|
|
324
324
|
* A component that will be used to wrap the entire router.
|
|
325
325
|
* This is useful for providing a context to the entire router.
|
|
326
|
+
* Only non-DOM-rendering components like providers should be used, anything else will cause a hydration error.
|
|
326
327
|
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#wrap-property)
|
|
327
328
|
*/
|
|
328
329
|
Wrap?: (props: { children: any }) => React.JSX.Element
|
|
329
330
|
/**
|
|
330
331
|
* A component that will be used to wrap the inner contents of the router.
|
|
331
332
|
* This is useful for providing a context to the inner contents of the router where you also need access to the router context and hooks.
|
|
333
|
+
* Only non-DOM-rendering components like providers should be used, anything else will cause a hydration error.
|
|
332
334
|
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#innerwrap-property)
|
|
333
335
|
*/
|
|
334
336
|
InnerWrap?: (props: { children: any }) => React.JSX.Element
|