@tanstack/router-core 0.0.1-beta.183 → 0.0.1-beta.185

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tanstack/router-core",
3
3
  "author": "Tanner Linsley",
4
- "version": "0.0.1-beta.183",
4
+ "version": "0.0.1-beta.185",
5
5
  "license": "MIT",
6
6
  "repository": "tanstack/router",
7
7
  "homepage": "https://tanstack.com/router",
package/src/history.ts CHANGED
@@ -22,7 +22,7 @@ export interface ParsedPath {
22
22
  }
23
23
 
24
24
  export interface RouterLocation extends ParsedPath {
25
- state: any
25
+ state: Record<string, any>
26
26
  }
27
27
 
28
28
  type BlockerFn = (retry: () => void, cancel: () => void) => void
@@ -162,7 +162,7 @@ export function createBrowserHistory(opts?: {
162
162
  (() =>
163
163
  `${window.location.pathname}${window.location.search}${window.location.hash}`)
164
164
  const createHref = opts?.createHref ?? ((path) => path)
165
- const getLocation = () => parseLocation(getHref(), history.state)
165
+ const getLocation = () => parseLocation(getHref(), window.history.state)
166
166
 
167
167
  return createHistory({
168
168
  getLocation,
package/src/router.ts CHANGED
@@ -194,10 +194,7 @@ export interface RouterOptions<
194
194
  hydrate?: (dehydrated: TDehydrated) => void
195
195
  }
196
196
 
197
- export interface RouterState<
198
- TRouteTree extends AnyRoute = AnyRoute,
199
- // TState extends LocationState = LocationState,
200
- > {
197
+ export interface RouterState<TRouteTree extends AnyRoute = AnyRoute> {
201
198
  status: 'idle' | 'pending'
202
199
  isFetching: boolean
203
200
  matchesById: Record<string, RouteMatch<TRouteTree>>
@@ -63,8 +63,6 @@ export function stringifySearchWith(
63
63
  const val = search[key]
64
64
  if (typeof val === 'undefined' || val === undefined) {
65
65
  delete search[key]
66
- } else if (Array.isArray(val)) {
67
- search[key] = val.map(stringifyValue)
68
66
  } else {
69
67
  search[key] = stringifyValue(val)
70
68
  }