@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/build/cjs/history.js +1 -1
- package/build/cjs/history.js.map +1 -1
- package/build/cjs/router.js.map +1 -1
- package/build/cjs/searchParams.js +0 -2
- package/build/cjs/searchParams.js.map +1 -1
- package/build/esm/index.js +1 -3
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +125 -125
- package/build/types/history.d.ts +1 -1
- package/build/umd/index.development.js +1 -3
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +2 -2
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/history.ts +2 -2
- package/src/router.ts +1 -4
- package/src/searchParams.ts +0 -2
package/package.json
CHANGED
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>>
|
package/src/searchParams.ts
CHANGED
|
@@ -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
|
}
|