@tanstack/solid-router 1.121.40 → 1.122.0

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/src/Match.tsx CHANGED
@@ -18,7 +18,7 @@ import { matchContext } from './matchContext'
18
18
  import { SafeFragment } from './SafeFragment'
19
19
  import { renderRouteNotFound } from './renderRouteNotFound'
20
20
  import { ScrollRestoration } from './scroll-restoration'
21
- import type { AnyRoute } from '@tanstack/router-core'
21
+ import type { AnyRoute, RootRouteOptions } from '@tanstack/router-core'
22
22
 
23
23
  export const Match = (props: { matchId: string }) => {
24
24
  const router = useRouter()
@@ -77,8 +77,12 @@ export const Match = (props: { matchId: string }) => {
77
77
  },
78
78
  })
79
79
 
80
+ const ShellComponent = route().isRoot
81
+ ? ((route().options as RootRouteOptions).shellComponent ?? SafeFragment)
82
+ : SafeFragment
83
+
80
84
  return (
81
- <>
85
+ <ShellComponent>
82
86
  <matchContext.Provider value={() => props.matchId}>
83
87
  <Dynamic
84
88
  component={ResolvedSuspenseBoundary()}
@@ -124,7 +128,7 @@ export const Match = (props: { matchId: string }) => {
124
128
  <ScrollRestoration />
125
129
  </>
126
130
  ) : null}
127
- </>
131
+ </ShellComponent>
128
132
  )
129
133
  }
130
134
 
package/src/link.tsx CHANGED
@@ -112,6 +112,7 @@ export function useLinkProps<
112
112
  'state',
113
113
  'mask',
114
114
  'reloadDocument',
115
+ 'unsafeRelative',
115
116
  ])
116
117
 
117
118
  // If this link simply reloads the current route,
package/src/route.tsx CHANGED
@@ -54,6 +54,14 @@ declare module '@tanstack/router-core' {
54
54
  pendingComponent?: RouteComponent
55
55
  }
56
56
 
57
+ export interface RootRouteOptionsExtensions {
58
+ shellComponent?: ({
59
+ children,
60
+ }: {
61
+ children: Solid.JSX.Element
62
+ }) => Solid.JSX.Element
63
+ }
64
+
57
65
  export interface RouteExtensions<
58
66
  in out TId extends string,
59
67
  in out TFullPath extends string,