@tanstack/react-router 1.162.8 → 1.163.2

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.
@@ -1699,7 +1699,7 @@ When both \`basepath\` and \`rewrite\` are configured, they are automatically co
1699
1699
  - Type: \`boolean\`
1700
1700
  - Optional
1701
1701
  - Defaults to \`false\`
1702
- - If \`true\`, route masks will, by default, be removed when the page is reloaded. This can be overridden on a per-mask basis by setting the \`unmaskOnReload\` option on the mask, or on a per-navigation basis by setting the \`unmaskOnReload\` option in the \`Navigate\` options.
1702
+ - If \`true\`, route masks will, by default, be removed when the page is reloaded. This can be overridden on a per-mask basis by setting \`unmaskOnReload\` on the mask, or on a per-navigation basis by setting \`mask.unmaskOnReload\` in [\`NavigateOptions\`](./NavigateOptionsType.md).
1703
1703
 
1704
1704
  ### \`Wrap\` property
1705
1705
 
@@ -1947,7 +1947,7 @@ Builds a new parsed location object that can be used later to navigate to a new
1947
1947
  - \`unmaskOnReload\`
1948
1948
  - Type: \`boolean\`
1949
1949
  - Optional
1950
- - If \`true\`, the route mask will be removed when the page is reloaded. This can be overridden on a per-navigation basis by setting the \`unmaskOnReload\` option in the \`Navigate\` options.
1950
+ - If \`true\`, the route mask will be removed when the page is reloaded. This can be overridden on a per-navigation basis by setting \`mask.unmaskOnReload\` in [\`NavigateOptions\`](./NavigateOptionsType.md).
1951
1951
 
1952
1952
  ### \`.commitLocation\` method
1953
1953
 
@@ -2091,19 +2091,25 @@ Hydrates the router's critical state from a serializable object that was sent fr
2091
2091
 
2092
2092
  # ToMaskOptions type
2093
2093
 
2094
- The \`ToMaskOptions\` type extends the [\`ToOptions\`](./ToOptionsType.md) type and describes additional options available when using route masks.
2094
+ The \`ToMaskOptions\` type includes the same destination fields as [\`ToOptions\`](./ToOptionsType.md), excluding \`mask\`, and adds options specific to route masking.
2095
2095
 
2096
2096
  \`\`\`tsx
2097
- type ToMaskOptions = ToOptions & {
2098
- unmaskOnReload?: boolean
2099
- }
2097
+ type ToMaskOptions = {
2098
+ from?: ValidRoutePath | string
2099
+ to?: ValidRoutePath | string
2100
+ hash?: true | string | ((prev?: string) => string)
2101
+ state?: true | HistoryState | ((prev: HistoryState) => HistoryState)
2102
+ } & SearchParamOptions &
2103
+ PathParamOptions & {
2104
+ unmaskOnReload?: boolean
2105
+ }
2100
2106
  \`\`\`
2101
2107
 
2102
2108
  - [\`ToOptions\`](./ToOptionsType.md)
2103
2109
 
2104
2110
  # ToOptions type
2105
2111
 
2106
- The \`ToOptions\` type contains several properties that can be used to describe a router destination.
2112
+ The \`ToOptions\` type contains several properties that can be used to describe a router destination, including \`mask\` for route masking.
2107
2113
 
2108
2114
  \`\`\`tsx
2109
2115
  type ToOptions = {
@@ -2112,7 +2118,8 @@ type ToOptions = {
2112
2118
  hash?: true | string | ((prev?: string) => string)
2113
2119
  state?: true | HistoryState | ((prev: HistoryState) => HistoryState)
2114
2120
  } & SearchParamOptions &
2115
- PathParamOptions
2121
+ PathParamOptions &
2122
+ MaskOptions
2116
2123
 
2117
2124
  type SearchParamOptions = {
2118
2125
  search?: true | TToSearch | ((prev: TFromSearch) => TToSearch)
@@ -2124,6 +2131,10 @@ type PathParamOptions = {
2124
2131
  | Record<string, TPathParam>
2125
2132
  | ((prev: TFromParams) => TToParams)
2126
2133
  }
2134
+
2135
+ type MaskOptions = {
2136
+ mask?: ToMaskOptions<TRouter, TMaskFrom, TMaskTo>
2137
+ }
2127
2138
  \`\`\`
2128
2139
 
2129
2140
  # UseMatchRouteOptions type