@tanstack/react-router 1.17.3 → 1.17.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.
@@ -1 +1 @@
1
- {"version":3,"file":"useSearch.cjs","sources":["../../src/useSearch.tsx"],"sourcesContent":["import { AnyRoute, RootSearchSchema } from './route'\nimport { RouteIds, RouteById, FullSearchSchema } from './routeInfo'\nimport { RegisteredRouter } from './router'\nimport { RouteMatch } from './Matches'\nimport { useMatch } from './Matches'\nimport { Expand, StrictOrFrom } from './utils'\n\nexport function useSearch<\n TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],\n TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>,\n TReturnIntersection extends boolean = false,\n TSearch = TReturnIntersection extends false\n ? Exclude<\n RouteById<TRouteTree, TFrom>['types']['fullSearchSchema'],\n RootSearchSchema\n >\n : Expand<\n Partial<Omit<FullSearchSchema<TRouteTree>, keyof RootSearchSchema>>\n >,\n TSelected = TSearch,\n>(\n opts: StrictOrFrom<TFrom, TReturnIntersection> & {\n select?: (search: TSearch) => TSelected\n },\n): TSelected {\n return useMatch({\n ...opts,\n select: (match: RouteMatch) => {\n return opts?.select ? opts.select(match.search as TSearch) : match.search\n },\n })\n}\n"],"names":["useMatch"],"mappings":";;;AAOO,SAAS,UAcd,MAGW;AACX,SAAOA,iBAAS;AAAA,IACd,GAAG;AAAA,IACH,QAAQ,CAAC,UAAsB;AAC7B,cAAO,6BAAM,UAAS,KAAK,OAAO,MAAM,MAAiB,IAAI,MAAM;AAAA,IACrE;AAAA,EAAA,CACD;AACH;;"}
1
+ {"version":3,"file":"useSearch.cjs","sources":["../../src/useSearch.tsx"],"sourcesContent":["import { AnyRoute, RootSearchSchema } from './route'\nimport { RouteIds, RouteById, FullSearchSchema } from './routeInfo'\nimport { RegisteredRouter } from './router'\nimport { RouteMatch } from './Matches'\nimport { useMatch } from './Matches'\nimport { Expand, StrictOrFrom } from './utils'\n\nexport function useSearch<\n TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],\n TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>,\n TReturnIntersection extends boolean = false,\n TSearch = TReturnIntersection extends false\n ? Exclude<\n RouteById<TRouteTree, TFrom>['types']['fullSearchSchema'],\n RootSearchSchema\n >\n : Partial<Omit<FullSearchSchema<TRouteTree>, keyof RootSearchSchema>>,\n TSelected = TSearch,\n>(\n opts: StrictOrFrom<TFrom, TReturnIntersection> & {\n select?: (search: TSearch) => TSelected\n },\n): TSelected {\n return useMatch({\n ...opts,\n select: (match: RouteMatch) => {\n return opts?.select ? opts.select(match.search as TSearch) : match.search\n },\n })\n}\n"],"names":["useMatch"],"mappings":";;;AAOO,SAAS,UAYd,MAGW;AACX,SAAOA,iBAAS;AAAA,IACd,GAAG;AAAA,IACH,QAAQ,CAAC,UAAsB;AAC7B,cAAO,6BAAM,UAAS,KAAK,OAAO,MAAM,MAAiB,IAAI,MAAM;AAAA,IACrE;AAAA,EAAA,CACD;AACH;;"}
@@ -1,7 +1,7 @@
1
1
  import { AnyRoute, RootSearchSchema } from './route.cjs';
2
2
  import { RouteIds, RouteById, FullSearchSchema } from './routeInfo.cjs';
3
3
  import { RegisteredRouter } from './router.cjs';
4
- import { Expand, StrictOrFrom } from './utils.cjs';
5
- export declare function useSearch<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>, TReturnIntersection extends boolean = false, TSearch = TReturnIntersection extends false ? Exclude<RouteById<TRouteTree, TFrom>['types']['fullSearchSchema'], RootSearchSchema> : Expand<Partial<Omit<FullSearchSchema<TRouteTree>, keyof RootSearchSchema>>>, TSelected = TSearch>(opts: StrictOrFrom<TFrom, TReturnIntersection> & {
4
+ import { StrictOrFrom } from './utils.cjs';
5
+ export declare function useSearch<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>, TReturnIntersection extends boolean = false, TSearch = TReturnIntersection extends false ? Exclude<RouteById<TRouteTree, TFrom>['types']['fullSearchSchema'], RootSearchSchema> : Partial<Omit<FullSearchSchema<TRouteTree>, keyof RootSearchSchema>>, TSelected = TSearch>(opts: StrictOrFrom<TFrom, TReturnIntersection> & {
6
6
  select?: (search: TSearch) => TSelected;
7
7
  }): TSelected;
@@ -1,7 +1,7 @@
1
1
  import { AnyRoute, RootSearchSchema } from './route.js';
2
2
  import { RouteIds, RouteById, FullSearchSchema } from './routeInfo.js';
3
3
  import { RegisteredRouter } from './router.js';
4
- import { Expand, StrictOrFrom } from './utils.js';
5
- export declare function useSearch<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>, TReturnIntersection extends boolean = false, TSearch = TReturnIntersection extends false ? Exclude<RouteById<TRouteTree, TFrom>['types']['fullSearchSchema'], RootSearchSchema> : Expand<Partial<Omit<FullSearchSchema<TRouteTree>, keyof RootSearchSchema>>>, TSelected = TSearch>(opts: StrictOrFrom<TFrom, TReturnIntersection> & {
4
+ import { StrictOrFrom } from './utils.js';
5
+ export declare function useSearch<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>, TReturnIntersection extends boolean = false, TSearch = TReturnIntersection extends false ? Exclude<RouteById<TRouteTree, TFrom>['types']['fullSearchSchema'], RootSearchSchema> : Partial<Omit<FullSearchSchema<TRouteTree>, keyof RootSearchSchema>>, TSelected = TSearch>(opts: StrictOrFrom<TFrom, TReturnIntersection> & {
6
6
  select?: (search: TSearch) => TSelected;
7
7
  }): TSelected;
@@ -1 +1 @@
1
- {"version":3,"file":"useSearch.js","sources":["../../src/useSearch.tsx"],"sourcesContent":["import { AnyRoute, RootSearchSchema } from './route'\nimport { RouteIds, RouteById, FullSearchSchema } from './routeInfo'\nimport { RegisteredRouter } from './router'\nimport { RouteMatch } from './Matches'\nimport { useMatch } from './Matches'\nimport { Expand, StrictOrFrom } from './utils'\n\nexport function useSearch<\n TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],\n TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>,\n TReturnIntersection extends boolean = false,\n TSearch = TReturnIntersection extends false\n ? Exclude<\n RouteById<TRouteTree, TFrom>['types']['fullSearchSchema'],\n RootSearchSchema\n >\n : Expand<\n Partial<Omit<FullSearchSchema<TRouteTree>, keyof RootSearchSchema>>\n >,\n TSelected = TSearch,\n>(\n opts: StrictOrFrom<TFrom, TReturnIntersection> & {\n select?: (search: TSearch) => TSelected\n },\n): TSelected {\n return useMatch({\n ...opts,\n select: (match: RouteMatch) => {\n return opts?.select ? opts.select(match.search as TSearch) : match.search\n },\n })\n}\n"],"names":[],"mappings":";AAOO,SAAS,UAcd,MAGW;AACX,SAAO,SAAS;AAAA,IACd,GAAG;AAAA,IACH,QAAQ,CAAC,UAAsB;AAC7B,cAAO,6BAAM,UAAS,KAAK,OAAO,MAAM,MAAiB,IAAI,MAAM;AAAA,IACrE;AAAA,EAAA,CACD;AACH;"}
1
+ {"version":3,"file":"useSearch.js","sources":["../../src/useSearch.tsx"],"sourcesContent":["import { AnyRoute, RootSearchSchema } from './route'\nimport { RouteIds, RouteById, FullSearchSchema } from './routeInfo'\nimport { RegisteredRouter } from './router'\nimport { RouteMatch } from './Matches'\nimport { useMatch } from './Matches'\nimport { Expand, StrictOrFrom } from './utils'\n\nexport function useSearch<\n TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],\n TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>,\n TReturnIntersection extends boolean = false,\n TSearch = TReturnIntersection extends false\n ? Exclude<\n RouteById<TRouteTree, TFrom>['types']['fullSearchSchema'],\n RootSearchSchema\n >\n : Partial<Omit<FullSearchSchema<TRouteTree>, keyof RootSearchSchema>>,\n TSelected = TSearch,\n>(\n opts: StrictOrFrom<TFrom, TReturnIntersection> & {\n select?: (search: TSearch) => TSelected\n },\n): TSelected {\n return useMatch({\n ...opts,\n select: (match: RouteMatch) => {\n return opts?.select ? opts.select(match.search as TSearch) : match.search\n },\n })\n}\n"],"names":[],"mappings":";AAOO,SAAS,UAYd,MAGW;AACX,SAAO,SAAS;AAAA,IACd,GAAG;AAAA,IACH,QAAQ,CAAC,UAAsB;AAC7B,cAAO,6BAAM,UAAS,KAAK,OAAO,MAAM,MAAiB,IAAI,MAAM;AAAA,IACrE;AAAA,EAAA,CACD;AACH;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-router",
3
- "version": "1.17.3",
3
+ "version": "1.17.4",
4
4
  "description": "",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
package/src/useSearch.tsx CHANGED
@@ -14,9 +14,7 @@ export function useSearch<
14
14
  RouteById<TRouteTree, TFrom>['types']['fullSearchSchema'],
15
15
  RootSearchSchema
16
16
  >
17
- : Expand<
18
- Partial<Omit<FullSearchSchema<TRouteTree>, keyof RootSearchSchema>>
19
- >,
17
+ : Partial<Omit<FullSearchSchema<TRouteTree>, keyof RootSearchSchema>>,
20
18
  TSelected = TSearch,
21
19
  >(
22
20
  opts: StrictOrFrom<TFrom, TReturnIntersection> & {