@tanstack/react-router 1.33.7 → 1.33.8
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/dist/cjs/index.d.cts +1 -0
- package/dist/cjs/manifest.d.cts +23 -0
- package/dist/cjs/router.cjs +3 -1
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +3 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/manifest.d.ts +23 -0
- package/dist/esm/router.d.ts +3 -0
- package/dist/esm/router.js +3 -1
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +1 -0
- package/src/manifest.ts +31 -0
- package/src/router.ts +6 -0
package/src/router.ts
CHANGED
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
} from './path'
|
|
28
28
|
import { isRedirect, isResolvedRedirect } from './redirects'
|
|
29
29
|
import { isNotFound } from './not-found'
|
|
30
|
+
import type { Manifest } from './manifest'
|
|
30
31
|
import type * as React from 'react'
|
|
31
32
|
import type {
|
|
32
33
|
HistoryLocation,
|
|
@@ -393,6 +394,7 @@ export type DehydratedRouteMatch = Pick<
|
|
|
393
394
|
|
|
394
395
|
export interface DehydratedRouter {
|
|
395
396
|
state: DehydratedRouterState
|
|
397
|
+
manifest?: Manifest
|
|
396
398
|
}
|
|
397
399
|
|
|
398
400
|
export type RouterConstructorOptions<
|
|
@@ -484,6 +486,7 @@ export class Router<
|
|
|
484
486
|
injectedHtml: Array<InjectedHtmlEntry> = []
|
|
485
487
|
dehydratedData?: TDehydrated
|
|
486
488
|
viewTransitionPromise?: ControlledPromise<true>
|
|
489
|
+
manifest?: Manifest
|
|
487
490
|
|
|
488
491
|
// Must build in constructor
|
|
489
492
|
__store!: Store<RouterState<TRouteTree>>
|
|
@@ -2314,6 +2317,7 @@ export class Router<
|
|
|
2314
2317
|
: undefined,
|
|
2315
2318
|
})),
|
|
2316
2319
|
},
|
|
2320
|
+
manifest: this.manifest,
|
|
2317
2321
|
}
|
|
2318
2322
|
}
|
|
2319
2323
|
|
|
@@ -2376,6 +2380,8 @@ export class Router<
|
|
|
2376
2380
|
matches: matches as any,
|
|
2377
2381
|
}
|
|
2378
2382
|
})
|
|
2383
|
+
|
|
2384
|
+
this.manifest = ctx.router.manifest
|
|
2379
2385
|
}
|
|
2380
2386
|
|
|
2381
2387
|
handleNotFound = (matches: Array<AnyRouteMatch>, err: NotFoundError) => {
|