@tanstack/react-router 1.121.16 → 1.121.17
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 +2 -2
- package/dist/cjs/Asset.cjs +0 -41
- package/dist/cjs/Asset.cjs.map +0 -1
- package/dist/cjs/Asset.d.cts +0 -2
- package/dist/cjs/CatchBoundary.cjs +0 -114
- package/dist/cjs/CatchBoundary.cjs.map +0 -1
- package/dist/cjs/CatchBoundary.d.cts +0 -12
- package/dist/cjs/ClientOnly.cjs +0 -20
- package/dist/cjs/ClientOnly.cjs.map +0 -1
- package/dist/cjs/ClientOnly.d.cts +0 -29
- package/dist/cjs/HeadContent.cjs +0 -155
- package/dist/cjs/HeadContent.cjs.map +0 -1
- package/dist/cjs/HeadContent.d.cts +0 -7
- package/dist/cjs/Match.cjs +0 -257
- package/dist/cjs/Match.cjs.map +0 -1
- package/dist/cjs/Match.d.cts +0 -8
- package/dist/cjs/Matches.cjs +0 -136
- package/dist/cjs/Matches.cjs.map +0 -1
- package/dist/cjs/Matches.d.cts +0 -26
- package/dist/cjs/RouterProvider.cjs +0 -33
- package/dist/cjs/RouterProvider.cjs.map +0 -1
- package/dist/cjs/RouterProvider.d.cts +0 -10
- package/dist/cjs/SafeFragment.cjs +0 -8
- package/dist/cjs/SafeFragment.cjs.map +0 -1
- package/dist/cjs/SafeFragment.d.cts +0 -1
- package/dist/cjs/ScriptOnce.cjs +0 -28
- package/dist/cjs/ScriptOnce.cjs.map +0 -1
- package/dist/cjs/ScriptOnce.d.cts +0 -5
- package/dist/cjs/Scripts.cjs +0 -51
- package/dist/cjs/Scripts.cjs.map +0 -1
- package/dist/cjs/Scripts.d.cts +0 -1
- package/dist/cjs/ScrollRestoration.cjs +0 -39
- package/dist/cjs/ScrollRestoration.cjs.map +0 -1
- package/dist/cjs/ScrollRestoration.d.cts +0 -14
- package/dist/cjs/Transitioner.cjs +0 -115
- package/dist/cjs/Transitioner.cjs.map +0 -1
- package/dist/cjs/Transitioner.d.cts +0 -1
- package/dist/cjs/awaited.cjs +0 -48
- package/dist/cjs/awaited.cjs.map +0 -1
- package/dist/cjs/awaited.d.cts +0 -10
- package/dist/cjs/fileRoute.cjs +0 -107
- package/dist/cjs/fileRoute.cjs.map +0 -1
- package/dist/cjs/fileRoute.d.cts +0 -54
- package/dist/cjs/history.d.cts +0 -8
- package/dist/cjs/index.cjs +0 -289
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/cjs/index.d.cts +0 -55
- package/dist/cjs/lazyRouteComponent.cjs +0 -78
- package/dist/cjs/lazyRouteComponent.cjs.map +0 -1
- package/dist/cjs/lazyRouteComponent.d.cts +0 -2
- package/dist/cjs/link.cjs +0 -324
- package/dist/cjs/link.cjs.map +0 -1
- package/dist/cjs/link.d.cts +0 -48
- package/dist/cjs/matchContext.cjs +0 -27
- package/dist/cjs/matchContext.cjs.map +0 -1
- package/dist/cjs/matchContext.d.cts +0 -3
- package/dist/cjs/not-found.cjs +0 -40
- package/dist/cjs/not-found.cjs.map +0 -1
- package/dist/cjs/not-found.d.cts +0 -9
- package/dist/cjs/renderRouteNotFound.cjs +0 -22
- package/dist/cjs/renderRouteNotFound.cjs.map +0 -1
- package/dist/cjs/renderRouteNotFound.d.cts +0 -2
- package/dist/cjs/route.cjs +0 -205
- package/dist/cjs/route.cjs.map +0 -1
- package/dist/cjs/route.d.cts +0 -95
- package/dist/cjs/router.cjs +0 -22
- package/dist/cjs/router.cjs.map +0 -1
- package/dist/cjs/router.d.cts +0 -72
- package/dist/cjs/routerContext.cjs +0 -33
- package/dist/cjs/routerContext.cjs.map +0 -1
- package/dist/cjs/routerContext.d.cts +0 -8
- package/dist/cjs/scroll-restoration.cjs +0 -24
- package/dist/cjs/scroll-restoration.cjs.map +0 -1
- package/dist/cjs/scroll-restoration.d.cts +0 -1
- package/dist/cjs/serializer.d.cts +0 -6
- package/dist/cjs/structuralSharing.d.cts +0 -8
- package/dist/cjs/typePrimitives.d.cts +0 -16
- package/dist/cjs/useBlocker.cjs +0 -165
- package/dist/cjs/useBlocker.cjs.map +0 -1
- package/dist/cjs/useBlocker.d.cts +0 -66
- package/dist/cjs/useCanGoBack.cjs +0 -8
- package/dist/cjs/useCanGoBack.cjs.map +0 -1
- package/dist/cjs/useCanGoBack.d.cts +0 -1
- package/dist/cjs/useLoaderData.cjs +0 -15
- package/dist/cjs/useLoaderData.cjs.map +0 -1
- package/dist/cjs/useLoaderData.d.cts +0 -8
- package/dist/cjs/useLoaderDeps.cjs +0 -14
- package/dist/cjs/useLoaderDeps.cjs.map +0 -1
- package/dist/cjs/useLoaderDeps.d.cts +0 -8
- package/dist/cjs/useLocation.cjs +0 -10
- package/dist/cjs/useLocation.cjs.map +0 -1
- package/dist/cjs/useLocation.d.cts +0 -7
- package/dist/cjs/useMatch.cjs +0 -47
- package/dist/cjs/useMatch.cjs.map +0 -1
- package/dist/cjs/useMatch.d.cts +0 -10
- package/dist/cjs/useNavigate.cjs +0 -55
- package/dist/cjs/useNavigate.cjs.map +0 -1
- package/dist/cjs/useNavigate.d.cts +0 -5
- package/dist/cjs/useParams.cjs +0 -16
- package/dist/cjs/useParams.cjs.map +0 -1
- package/dist/cjs/useParams.d.cts +0 -9
- package/dist/cjs/useRouteContext.cjs +0 -11
- package/dist/cjs/useRouteContext.cjs.map +0 -1
- package/dist/cjs/useRouteContext.d.cts +0 -3
- package/dist/cjs/useRouter.cjs +0 -32
- package/dist/cjs/useRouter.cjs.map +0 -1
- package/dist/cjs/useRouter.d.cts +0 -4
- package/dist/cjs/useRouterState.cjs +0 -29
- package/dist/cjs/useRouterState.cjs.map +0 -1
- package/dist/cjs/useRouterState.d.cts +0 -8
- package/dist/cjs/useSearch.cjs +0 -16
- package/dist/cjs/useSearch.cjs.map +0 -1
- package/dist/cjs/useSearch.d.cts +0 -9
- package/dist/cjs/utils.cjs +0 -72
- package/dist/cjs/utils.cjs.map +0 -1
- package/dist/cjs/utils.d.cts +0 -49
- package/dist/esm/Asset.d.ts +0 -2
- package/dist/esm/Asset.js +0 -41
- package/dist/esm/Asset.js.map +0 -1
- package/dist/esm/CatchBoundary.d.ts +0 -12
- package/dist/esm/CatchBoundary.js +0 -97
- package/dist/esm/CatchBoundary.js.map +0 -1
- package/dist/esm/ClientOnly.d.ts +0 -29
- package/dist/esm/ClientOnly.js +0 -20
- package/dist/esm/ClientOnly.js.map +0 -1
- package/dist/esm/HeadContent.d.ts +0 -7
- package/dist/esm/HeadContent.js +0 -139
- package/dist/esm/HeadContent.js.map +0 -1
- package/dist/esm/Match.d.ts +0 -8
- package/dist/esm/Match.js +0 -240
- package/dist/esm/Match.js.map +0 -1
- package/dist/esm/Matches.d.ts +0 -26
- package/dist/esm/Matches.js +0 -119
- package/dist/esm/Matches.js.map +0 -1
- package/dist/esm/RouterProvider.d.ts +0 -10
- package/dist/esm/RouterProvider.js +0 -33
- package/dist/esm/RouterProvider.js.map +0 -1
- package/dist/esm/SafeFragment.d.ts +0 -1
- package/dist/esm/SafeFragment.js +0 -8
- package/dist/esm/SafeFragment.js.map +0 -1
- package/dist/esm/ScriptOnce.d.ts +0 -5
- package/dist/esm/ScriptOnce.js +0 -28
- package/dist/esm/ScriptOnce.js.map +0 -1
- package/dist/esm/Scripts.d.ts +0 -1
- package/dist/esm/Scripts.js +0 -51
- package/dist/esm/Scripts.js.map +0 -1
- package/dist/esm/ScrollRestoration.d.ts +0 -14
- package/dist/esm/ScrollRestoration.js +0 -39
- package/dist/esm/ScrollRestoration.js.map +0 -1
- package/dist/esm/Transitioner.d.ts +0 -1
- package/dist/esm/Transitioner.js +0 -98
- package/dist/esm/Transitioner.js.map +0 -1
- package/dist/esm/awaited.d.ts +0 -10
- package/dist/esm/awaited.js +0 -31
- package/dist/esm/awaited.js.map +0 -1
- package/dist/esm/fileRoute.d.ts +0 -54
- package/dist/esm/fileRoute.js +0 -107
- package/dist/esm/fileRoute.js.map +0 -1
- package/dist/esm/history.d.ts +0 -8
- package/dist/esm/index.d.ts +0 -55
- package/dist/esm/index.js +0 -151
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/lazyRouteComponent.d.ts +0 -2
- package/dist/esm/lazyRouteComponent.js +0 -61
- package/dist/esm/lazyRouteComponent.js.map +0 -1
- package/dist/esm/link.d.ts +0 -48
- package/dist/esm/link.js +0 -307
- package/dist/esm/link.js.map +0 -1
- package/dist/esm/matchContext.d.ts +0 -3
- package/dist/esm/matchContext.js +0 -10
- package/dist/esm/matchContext.js.map +0 -1
- package/dist/esm/not-found.d.ts +0 -9
- package/dist/esm/not-found.js +0 -40
- package/dist/esm/not-found.js.map +0 -1
- package/dist/esm/renderRouteNotFound.d.ts +0 -2
- package/dist/esm/renderRouteNotFound.js +0 -22
- package/dist/esm/renderRouteNotFound.js.map +0 -1
- package/dist/esm/route.d.ts +0 -95
- package/dist/esm/route.js +0 -205
- package/dist/esm/route.js.map +0 -1
- package/dist/esm/router.d.ts +0 -72
- package/dist/esm/router.js +0 -22
- package/dist/esm/router.js.map +0 -1
- package/dist/esm/routerContext.d.ts +0 -8
- package/dist/esm/routerContext.js +0 -16
- package/dist/esm/routerContext.js.map +0 -1
- package/dist/esm/scroll-restoration.d.ts +0 -1
- package/dist/esm/scroll-restoration.js +0 -24
- package/dist/esm/scroll-restoration.js.map +0 -1
- package/dist/esm/serializer.d.ts +0 -6
- package/dist/esm/structuralSharing.d.ts +0 -8
- package/dist/esm/typePrimitives.d.ts +0 -16
- package/dist/esm/useBlocker.d.ts +0 -66
- package/dist/esm/useBlocker.js +0 -148
- package/dist/esm/useBlocker.js.map +0 -1
- package/dist/esm/useCanGoBack.d.ts +0 -1
- package/dist/esm/useCanGoBack.js +0 -8
- package/dist/esm/useCanGoBack.js.map +0 -1
- package/dist/esm/useLoaderData.d.ts +0 -8
- package/dist/esm/useLoaderData.js +0 -15
- package/dist/esm/useLoaderData.js.map +0 -1
- package/dist/esm/useLoaderDeps.d.ts +0 -8
- package/dist/esm/useLoaderDeps.js +0 -14
- package/dist/esm/useLoaderDeps.js.map +0 -1
- package/dist/esm/useLocation.d.ts +0 -7
- package/dist/esm/useLocation.js +0 -10
- package/dist/esm/useLocation.js.map +0 -1
- package/dist/esm/useMatch.d.ts +0 -10
- package/dist/esm/useMatch.js +0 -30
- package/dist/esm/useMatch.js.map +0 -1
- package/dist/esm/useNavigate.d.ts +0 -5
- package/dist/esm/useNavigate.js +0 -38
- package/dist/esm/useNavigate.js.map +0 -1
- package/dist/esm/useParams.d.ts +0 -9
- package/dist/esm/useParams.js +0 -16
- package/dist/esm/useParams.js.map +0 -1
- package/dist/esm/useRouteContext.d.ts +0 -3
- package/dist/esm/useRouteContext.js +0 -11
- package/dist/esm/useRouteContext.js.map +0 -1
- package/dist/esm/useRouter.d.ts +0 -4
- package/dist/esm/useRouter.js +0 -15
- package/dist/esm/useRouter.js.map +0 -1
- package/dist/esm/useRouterState.d.ts +0 -8
- package/dist/esm/useRouterState.js +0 -29
- package/dist/esm/useRouterState.js.map +0 -1
- package/dist/esm/useSearch.d.ts +0 -9
- package/dist/esm/useSearch.js +0 -16
- package/dist/esm/useSearch.js.map +0 -1
- package/dist/esm/utils.d.ts +0 -49
- package/dist/esm/utils.js +0 -55
- package/dist/esm/utils.js.map +0 -1
- package/dist/llms/index.d.ts +0 -3
- package/dist/llms/index.js +0 -35
- package/dist/llms/rules/api.d.ts +0 -2
- package/dist/llms/rules/api.js +0 -4241
- package/dist/llms/rules/guide.d.ts +0 -2
- package/dist/llms/rules/guide.js +0 -6225
- package/dist/llms/rules/routing.d.ts +0 -2
- package/dist/llms/rules/routing.js +0 -1946
- package/dist/llms/rules/setup-and-architecture.d.ts +0 -2
- package/dist/llms/rules/setup-and-architecture.js +0 -932
package/dist/cjs/index.cjs
DELETED
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const invariant = require("tiny-invariant");
|
|
4
|
-
const warning = require("tiny-warning");
|
|
5
|
-
const routerCore = require("@tanstack/router-core");
|
|
6
|
-
const history = require("@tanstack/history");
|
|
7
|
-
const awaited = require("./awaited.cjs");
|
|
8
|
-
const CatchBoundary = require("./CatchBoundary.cjs");
|
|
9
|
-
const ClientOnly = require("./ClientOnly.cjs");
|
|
10
|
-
const fileRoute = require("./fileRoute.cjs");
|
|
11
|
-
const lazyRouteComponent = require("./lazyRouteComponent.cjs");
|
|
12
|
-
const link = require("./link.cjs");
|
|
13
|
-
const Matches = require("./Matches.cjs");
|
|
14
|
-
const matchContext = require("./matchContext.cjs");
|
|
15
|
-
const Match = require("./Match.cjs");
|
|
16
|
-
const useMatch = require("./useMatch.cjs");
|
|
17
|
-
const useLoaderDeps = require("./useLoaderDeps.cjs");
|
|
18
|
-
const useLoaderData = require("./useLoaderData.cjs");
|
|
19
|
-
const route = require("./route.cjs");
|
|
20
|
-
const router = require("./router.cjs");
|
|
21
|
-
const RouterProvider = require("./RouterProvider.cjs");
|
|
22
|
-
const ScrollRestoration = require("./ScrollRestoration.cjs");
|
|
23
|
-
const useBlocker = require("./useBlocker.cjs");
|
|
24
|
-
const useNavigate = require("./useNavigate.cjs");
|
|
25
|
-
const useParams = require("./useParams.cjs");
|
|
26
|
-
const useSearch = require("./useSearch.cjs");
|
|
27
|
-
const routerContext = require("./routerContext.cjs");
|
|
28
|
-
const useRouteContext = require("./useRouteContext.cjs");
|
|
29
|
-
const useRouter = require("./useRouter.cjs");
|
|
30
|
-
const useRouterState = require("./useRouterState.cjs");
|
|
31
|
-
const useLocation = require("./useLocation.cjs");
|
|
32
|
-
const useCanGoBack = require("./useCanGoBack.cjs");
|
|
33
|
-
const utils = require("./utils.cjs");
|
|
34
|
-
const notFound = require("./not-found.cjs");
|
|
35
|
-
const ScriptOnce = require("./ScriptOnce.cjs");
|
|
36
|
-
const Asset = require("./Asset.cjs");
|
|
37
|
-
const HeadContent = require("./HeadContent.cjs");
|
|
38
|
-
const Scripts = require("./Scripts.cjs");
|
|
39
|
-
exports.invariant = invariant;
|
|
40
|
-
exports.warning = warning;
|
|
41
|
-
Object.defineProperty(exports, "PathParamError", {
|
|
42
|
-
enumerable: true,
|
|
43
|
-
get: () => routerCore.PathParamError
|
|
44
|
-
});
|
|
45
|
-
Object.defineProperty(exports, "SearchParamError", {
|
|
46
|
-
enumerable: true,
|
|
47
|
-
get: () => routerCore.SearchParamError
|
|
48
|
-
});
|
|
49
|
-
Object.defineProperty(exports, "TSR_DEFERRED_PROMISE", {
|
|
50
|
-
enumerable: true,
|
|
51
|
-
get: () => routerCore.TSR_DEFERRED_PROMISE
|
|
52
|
-
});
|
|
53
|
-
Object.defineProperty(exports, "cleanPath", {
|
|
54
|
-
enumerable: true,
|
|
55
|
-
get: () => routerCore.cleanPath
|
|
56
|
-
});
|
|
57
|
-
Object.defineProperty(exports, "componentTypes", {
|
|
58
|
-
enumerable: true,
|
|
59
|
-
get: () => routerCore.componentTypes
|
|
60
|
-
});
|
|
61
|
-
Object.defineProperty(exports, "createControlledPromise", {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: () => routerCore.createControlledPromise
|
|
64
|
-
});
|
|
65
|
-
Object.defineProperty(exports, "decode", {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: () => routerCore.decode
|
|
68
|
-
});
|
|
69
|
-
Object.defineProperty(exports, "deepEqual", {
|
|
70
|
-
enumerable: true,
|
|
71
|
-
get: () => routerCore.deepEqual
|
|
72
|
-
});
|
|
73
|
-
Object.defineProperty(exports, "defaultParseSearch", {
|
|
74
|
-
enumerable: true,
|
|
75
|
-
get: () => routerCore.defaultParseSearch
|
|
76
|
-
});
|
|
77
|
-
Object.defineProperty(exports, "defaultSerializeError", {
|
|
78
|
-
enumerable: true,
|
|
79
|
-
get: () => routerCore.defaultSerializeError
|
|
80
|
-
});
|
|
81
|
-
Object.defineProperty(exports, "defaultStringifySearch", {
|
|
82
|
-
enumerable: true,
|
|
83
|
-
get: () => routerCore.defaultStringifySearch
|
|
84
|
-
});
|
|
85
|
-
Object.defineProperty(exports, "defer", {
|
|
86
|
-
enumerable: true,
|
|
87
|
-
get: () => routerCore.defer
|
|
88
|
-
});
|
|
89
|
-
Object.defineProperty(exports, "encode", {
|
|
90
|
-
enumerable: true,
|
|
91
|
-
get: () => routerCore.encode
|
|
92
|
-
});
|
|
93
|
-
Object.defineProperty(exports, "escapeJSON", {
|
|
94
|
-
enumerable: true,
|
|
95
|
-
get: () => routerCore.escapeJSON
|
|
96
|
-
});
|
|
97
|
-
Object.defineProperty(exports, "functionalUpdate", {
|
|
98
|
-
enumerable: true,
|
|
99
|
-
get: () => routerCore.functionalUpdate
|
|
100
|
-
});
|
|
101
|
-
Object.defineProperty(exports, "getInitialRouterState", {
|
|
102
|
-
enumerable: true,
|
|
103
|
-
get: () => routerCore.getInitialRouterState
|
|
104
|
-
});
|
|
105
|
-
Object.defineProperty(exports, "interpolatePath", {
|
|
106
|
-
enumerable: true,
|
|
107
|
-
get: () => routerCore.interpolatePath
|
|
108
|
-
});
|
|
109
|
-
Object.defineProperty(exports, "isMatch", {
|
|
110
|
-
enumerable: true,
|
|
111
|
-
get: () => routerCore.isMatch
|
|
112
|
-
});
|
|
113
|
-
Object.defineProperty(exports, "isNotFound", {
|
|
114
|
-
enumerable: true,
|
|
115
|
-
get: () => routerCore.isNotFound
|
|
116
|
-
});
|
|
117
|
-
Object.defineProperty(exports, "isPlainArray", {
|
|
118
|
-
enumerable: true,
|
|
119
|
-
get: () => routerCore.isPlainArray
|
|
120
|
-
});
|
|
121
|
-
Object.defineProperty(exports, "isPlainObject", {
|
|
122
|
-
enumerable: true,
|
|
123
|
-
get: () => routerCore.isPlainObject
|
|
124
|
-
});
|
|
125
|
-
Object.defineProperty(exports, "isRedirect", {
|
|
126
|
-
enumerable: true,
|
|
127
|
-
get: () => routerCore.isRedirect
|
|
128
|
-
});
|
|
129
|
-
Object.defineProperty(exports, "joinPaths", {
|
|
130
|
-
enumerable: true,
|
|
131
|
-
get: () => routerCore.joinPaths
|
|
132
|
-
});
|
|
133
|
-
Object.defineProperty(exports, "lazyFn", {
|
|
134
|
-
enumerable: true,
|
|
135
|
-
get: () => routerCore.lazyFn
|
|
136
|
-
});
|
|
137
|
-
Object.defineProperty(exports, "matchByPath", {
|
|
138
|
-
enumerable: true,
|
|
139
|
-
get: () => routerCore.matchByPath
|
|
140
|
-
});
|
|
141
|
-
Object.defineProperty(exports, "matchPathname", {
|
|
142
|
-
enumerable: true,
|
|
143
|
-
get: () => routerCore.matchPathname
|
|
144
|
-
});
|
|
145
|
-
Object.defineProperty(exports, "notFound", {
|
|
146
|
-
enumerable: true,
|
|
147
|
-
get: () => routerCore.notFound
|
|
148
|
-
});
|
|
149
|
-
Object.defineProperty(exports, "parsePathname", {
|
|
150
|
-
enumerable: true,
|
|
151
|
-
get: () => routerCore.parsePathname
|
|
152
|
-
});
|
|
153
|
-
Object.defineProperty(exports, "parseSearchWith", {
|
|
154
|
-
enumerable: true,
|
|
155
|
-
get: () => routerCore.parseSearchWith
|
|
156
|
-
});
|
|
157
|
-
Object.defineProperty(exports, "pick", {
|
|
158
|
-
enumerable: true,
|
|
159
|
-
get: () => routerCore.pick
|
|
160
|
-
});
|
|
161
|
-
Object.defineProperty(exports, "redirect", {
|
|
162
|
-
enumerable: true,
|
|
163
|
-
get: () => routerCore.redirect
|
|
164
|
-
});
|
|
165
|
-
Object.defineProperty(exports, "removeBasepath", {
|
|
166
|
-
enumerable: true,
|
|
167
|
-
get: () => routerCore.removeBasepath
|
|
168
|
-
});
|
|
169
|
-
Object.defineProperty(exports, "replaceEqualDeep", {
|
|
170
|
-
enumerable: true,
|
|
171
|
-
get: () => routerCore.replaceEqualDeep
|
|
172
|
-
});
|
|
173
|
-
Object.defineProperty(exports, "resolvePath", {
|
|
174
|
-
enumerable: true,
|
|
175
|
-
get: () => routerCore.resolvePath
|
|
176
|
-
});
|
|
177
|
-
Object.defineProperty(exports, "retainSearchParams", {
|
|
178
|
-
enumerable: true,
|
|
179
|
-
get: () => routerCore.retainSearchParams
|
|
180
|
-
});
|
|
181
|
-
Object.defineProperty(exports, "rootRouteId", {
|
|
182
|
-
enumerable: true,
|
|
183
|
-
get: () => routerCore.rootRouteId
|
|
184
|
-
});
|
|
185
|
-
Object.defineProperty(exports, "shallow", {
|
|
186
|
-
enumerable: true,
|
|
187
|
-
get: () => routerCore.shallow
|
|
188
|
-
});
|
|
189
|
-
Object.defineProperty(exports, "stringifySearchWith", {
|
|
190
|
-
enumerable: true,
|
|
191
|
-
get: () => routerCore.stringifySearchWith
|
|
192
|
-
});
|
|
193
|
-
Object.defineProperty(exports, "stripSearchParams", {
|
|
194
|
-
enumerable: true,
|
|
195
|
-
get: () => routerCore.stripSearchParams
|
|
196
|
-
});
|
|
197
|
-
Object.defineProperty(exports, "trimPath", {
|
|
198
|
-
enumerable: true,
|
|
199
|
-
get: () => routerCore.trimPath
|
|
200
|
-
});
|
|
201
|
-
Object.defineProperty(exports, "trimPathLeft", {
|
|
202
|
-
enumerable: true,
|
|
203
|
-
get: () => routerCore.trimPathLeft
|
|
204
|
-
});
|
|
205
|
-
Object.defineProperty(exports, "trimPathRight", {
|
|
206
|
-
enumerable: true,
|
|
207
|
-
get: () => routerCore.trimPathRight
|
|
208
|
-
});
|
|
209
|
-
Object.defineProperty(exports, "createBrowserHistory", {
|
|
210
|
-
enumerable: true,
|
|
211
|
-
get: () => history.createBrowserHistory
|
|
212
|
-
});
|
|
213
|
-
Object.defineProperty(exports, "createHashHistory", {
|
|
214
|
-
enumerable: true,
|
|
215
|
-
get: () => history.createHashHistory
|
|
216
|
-
});
|
|
217
|
-
Object.defineProperty(exports, "createHistory", {
|
|
218
|
-
enumerable: true,
|
|
219
|
-
get: () => history.createHistory
|
|
220
|
-
});
|
|
221
|
-
Object.defineProperty(exports, "createMemoryHistory", {
|
|
222
|
-
enumerable: true,
|
|
223
|
-
get: () => history.createMemoryHistory
|
|
224
|
-
});
|
|
225
|
-
exports.Await = awaited.Await;
|
|
226
|
-
exports.useAwaited = awaited.useAwaited;
|
|
227
|
-
exports.CatchBoundary = CatchBoundary.CatchBoundary;
|
|
228
|
-
exports.ErrorComponent = CatchBoundary.ErrorComponent;
|
|
229
|
-
exports.ClientOnly = ClientOnly.ClientOnly;
|
|
230
|
-
exports.FileRoute = fileRoute.FileRoute;
|
|
231
|
-
exports.FileRouteLoader = fileRoute.FileRouteLoader;
|
|
232
|
-
exports.LazyRoute = fileRoute.LazyRoute;
|
|
233
|
-
exports.createFileRoute = fileRoute.createFileRoute;
|
|
234
|
-
exports.createLazyFileRoute = fileRoute.createLazyFileRoute;
|
|
235
|
-
exports.createLazyRoute = fileRoute.createLazyRoute;
|
|
236
|
-
exports.lazyRouteComponent = lazyRouteComponent.lazyRouteComponent;
|
|
237
|
-
exports.Link = link.Link;
|
|
238
|
-
exports.createLink = link.createLink;
|
|
239
|
-
exports.linkOptions = link.linkOptions;
|
|
240
|
-
exports.useLinkProps = link.useLinkProps;
|
|
241
|
-
exports.MatchRoute = Matches.MatchRoute;
|
|
242
|
-
exports.Matches = Matches.Matches;
|
|
243
|
-
exports.useChildMatches = Matches.useChildMatches;
|
|
244
|
-
exports.useMatchRoute = Matches.useMatchRoute;
|
|
245
|
-
exports.useMatches = Matches.useMatches;
|
|
246
|
-
exports.useParentMatches = Matches.useParentMatches;
|
|
247
|
-
exports.matchContext = matchContext.matchContext;
|
|
248
|
-
exports.Match = Match.Match;
|
|
249
|
-
exports.Outlet = Match.Outlet;
|
|
250
|
-
exports.useMatch = useMatch.useMatch;
|
|
251
|
-
exports.useLoaderDeps = useLoaderDeps.useLoaderDeps;
|
|
252
|
-
exports.useLoaderData = useLoaderData.useLoaderData;
|
|
253
|
-
exports.NotFoundRoute = route.NotFoundRoute;
|
|
254
|
-
exports.RootRoute = route.RootRoute;
|
|
255
|
-
exports.Route = route.Route;
|
|
256
|
-
exports.RouteApi = route.RouteApi;
|
|
257
|
-
exports.createRootRoute = route.createRootRoute;
|
|
258
|
-
exports.createRootRouteWithContext = route.createRootRouteWithContext;
|
|
259
|
-
exports.createRoute = route.createRoute;
|
|
260
|
-
exports.createRouteMask = route.createRouteMask;
|
|
261
|
-
exports.getRouteApi = route.getRouteApi;
|
|
262
|
-
exports.rootRouteWithContext = route.rootRouteWithContext;
|
|
263
|
-
exports.Router = router.Router;
|
|
264
|
-
exports.createRouter = router.createRouter;
|
|
265
|
-
exports.RouterContextProvider = RouterProvider.RouterContextProvider;
|
|
266
|
-
exports.RouterProvider = RouterProvider.RouterProvider;
|
|
267
|
-
exports.ScrollRestoration = ScrollRestoration.ScrollRestoration;
|
|
268
|
-
exports.useElementScrollRestoration = ScrollRestoration.useElementScrollRestoration;
|
|
269
|
-
exports.Block = useBlocker.Block;
|
|
270
|
-
exports.useBlocker = useBlocker.useBlocker;
|
|
271
|
-
exports.Navigate = useNavigate.Navigate;
|
|
272
|
-
exports.useNavigate = useNavigate.useNavigate;
|
|
273
|
-
exports.useParams = useParams.useParams;
|
|
274
|
-
exports.useSearch = useSearch.useSearch;
|
|
275
|
-
exports.getRouterContext = routerContext.getRouterContext;
|
|
276
|
-
exports.useRouteContext = useRouteContext.useRouteContext;
|
|
277
|
-
exports.useRouter = useRouter.useRouter;
|
|
278
|
-
exports.useRouterState = useRouterState.useRouterState;
|
|
279
|
-
exports.useLocation = useLocation.useLocation;
|
|
280
|
-
exports.useCanGoBack = useCanGoBack.useCanGoBack;
|
|
281
|
-
exports.useLayoutEffect = utils.useLayoutEffect;
|
|
282
|
-
exports.useStableCallback = utils.useStableCallback;
|
|
283
|
-
exports.CatchNotFound = notFound.CatchNotFound;
|
|
284
|
-
exports.DefaultGlobalNotFound = notFound.DefaultGlobalNotFound;
|
|
285
|
-
exports.ScriptOnce = ScriptOnce.ScriptOnce;
|
|
286
|
-
exports.Asset = Asset.Asset;
|
|
287
|
-
exports.HeadContent = HeadContent.HeadContent;
|
|
288
|
-
exports.Scripts = Scripts.Scripts;
|
|
289
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/cjs/index.d.cts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
export { default as invariant } from 'tiny-invariant';
|
|
2
|
-
export { default as warning } from 'tiny-warning';
|
|
3
|
-
export { defer, TSR_DEFERRED_PROMISE, isMatch, joinPaths, cleanPath, trimPathLeft, trimPathRight, trimPath, resolvePath, parsePathname, interpolatePath, matchPathname, removeBasepath, matchByPath, encode, decode, rootRouteId, defaultSerializeError, defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith, escapeJSON, // SSR
|
|
4
|
-
pick, functionalUpdate, replaceEqualDeep, isPlainObject, isPlainArray, deepEqual, shallow, createControlledPromise, retainSearchParams, stripSearchParams, } from '@tanstack/router-core';
|
|
5
|
-
export type { AnyRoute, StartSerializer, Serializable, SerializerParse, SerializerParseBy, SerializerStringify, SerializerStringifyBy, DeferredPromiseState, DeferredPromise, ParsedLocation, RemoveTrailingSlashes, RemoveLeadingSlashes, ActiveOptions, Segment, ResolveRelativePath, RootRouteId, AnyPathParams, ResolveParams, ResolveOptionalParams, ResolveRequiredParams, SearchSchemaInput, AnyContext, RouteContext, PreloadableObj, RoutePathOptions, StaticDataRouteOption, RoutePathOptionsIntersection, UpdatableStaticRouteOption, MetaDescriptor, RouteLinkEntry, ParseParamsFn, SearchFilter, ResolveId, InferFullSearchSchema, InferFullSearchSchemaInput, ErrorRouteProps, ErrorComponentProps, NotFoundRouteProps, TrimPath, TrimPathLeft, TrimPathRight, StringifyParamsFn, ParamsOptions, InferAllParams, InferAllContext, LooseReturnType, LooseAsyncReturnType, ContextReturnType, ContextAsyncReturnType, ResolveLoaderData, ResolveRouteContext, SearchSerializer, SearchParser, TrailingSlashOption, ExtractedEntry, ExtractedStream, ExtractedPromise, StreamState, Manifest, RouterManagedTag, ControlledPromise, Constrain, Expand, MergeAll, Assign, IntersectAssign, ResolveValidatorInput, ResolveValidatorOutput, Register, AnyValidator, DefaultValidator, ValidatorFn, AnySchema, AnyValidatorAdapter, AnyValidatorFn, AnyValidatorObj, ResolveValidatorInputFn, ResolveValidatorOutputFn, ResolveSearchValidatorInput, ResolveSearchValidatorInputFn, Validator, ValidatorAdapter, ValidatorObj, FileRoutesByPath, RouteById, RootRouteOptions, SerializerExtensions, CreateFileRoute, } from '@tanstack/router-core';
|
|
6
|
-
export type * from './serializer.cjs';
|
|
7
|
-
export { createHistory, createBrowserHistory, createHashHistory, createMemoryHistory, } from '@tanstack/history';
|
|
8
|
-
export type { BlockerFn, HistoryLocation, RouterHistory, ParsedPath, HistoryState, } from '@tanstack/history';
|
|
9
|
-
export { useAwaited, Await } from './awaited.cjs';
|
|
10
|
-
export type { AwaitOptions } from './awaited.cjs';
|
|
11
|
-
export { CatchBoundary, ErrorComponent } from './CatchBoundary.cjs';
|
|
12
|
-
export { ClientOnly } from './ClientOnly.cjs';
|
|
13
|
-
export { FileRoute, createFileRoute, FileRouteLoader, LazyRoute, createLazyRoute, createLazyFileRoute, } from './fileRoute.cjs';
|
|
14
|
-
export * from './history.cjs';
|
|
15
|
-
export { lazyRouteComponent } from './lazyRouteComponent.cjs';
|
|
16
|
-
export { useLinkProps, createLink, Link, linkOptions } from './link.cjs';
|
|
17
|
-
export type { InferDescendantToPaths, RelativeToPath, RelativeToParentPath, RelativeToCurrentPath, AbsoluteToPath, RelativeToPathAutoComplete, NavigateOptions, ToOptions, ToMaskOptions, ToSubOptions, ResolveRoute, SearchParamOptions, PathParamOptions, ToPathOption, LinkOptions, MakeOptionalPathParams, FileRouteTypes, RouteContextParameter, BeforeLoadContextParameter, ResolveAllContext, ResolveAllParamsFromParent, ResolveFullSearchSchema, ResolveFullSearchSchemaInput, RouteIds, NavigateFn, BuildLocationFn, FullSearchSchemaOption, MakeRemountDepsOptionsUnion, RemountDepsOptions, ResolveFullPath, AnyRouteWithContext, AnyRouterWithContext, CommitLocationOptions, MatchLocation, UseNavigateResult, AnyRedirect, Redirect, ResolvedRedirect, MakeRouteMatch, MakeRouteMatchUnion, RouteMatch, AnyRouteMatch, RouteContextFn, RouteContextOptions, BeforeLoadFn, BeforeLoadContextOptions, ContextOptions, RouteOptions, FileBaseRouteOptions, BaseRouteOptions, UpdatableRouteOptions, RouteLoaderFn, LoaderFnContext, LazyRouteOptions, AnyRouter, RegisteredRouter, RouterContextOptions, ControllablePromise, InjectedHtmlEntry, RouterOptions, RouterErrorSerializer, RouterState, ListenerFn, BuildNextOptions, RouterConstructorOptions, RouterEvents, RouterEvent, RouterListener, RouteConstraints, RouteMask, MatchRouteOptions, CreateLazyFileRoute, } from '@tanstack/router-core';
|
|
18
|
-
export type { UseLinkPropsOptions, ActiveLinkOptions, LinkProps, LinkComponent, LinkComponentProps, CreateLinkProps, } from './link.cjs';
|
|
19
|
-
export { Matches, useMatchRoute, MatchRoute, useMatches, useParentMatches, useChildMatches, } from './Matches.cjs';
|
|
20
|
-
export type { UseMatchRouteOptions, MakeMatchRouteOptions } from './Matches.cjs';
|
|
21
|
-
export { matchContext } from './matchContext.cjs';
|
|
22
|
-
export { Match, Outlet } from './Match.cjs';
|
|
23
|
-
export { useMatch } from './useMatch.cjs';
|
|
24
|
-
export { useLoaderDeps } from './useLoaderDeps.cjs';
|
|
25
|
-
export { useLoaderData } from './useLoaderData.cjs';
|
|
26
|
-
export { redirect, isRedirect } from '@tanstack/router-core';
|
|
27
|
-
export { RouteApi, getRouteApi, Route, createRoute, RootRoute, rootRouteWithContext, createRootRoute, createRootRouteWithContext, createRouteMask, NotFoundRoute, } from './route.cjs';
|
|
28
|
-
export type { AnyRootRoute, ReactNode, SyncRouteComponent, AsyncRouteComponent, RouteComponent, ErrorRouteComponent, NotFoundRouteComponent, } from './route.cjs';
|
|
29
|
-
export { createRouter, Router } from './router.cjs';
|
|
30
|
-
export { componentTypes, lazyFn, SearchParamError, PathParamError, getInitialRouterState, } from '@tanstack/router-core';
|
|
31
|
-
export { RouterProvider, RouterContextProvider } from './RouterProvider.cjs';
|
|
32
|
-
export type { RouterProps } from './RouterProvider.cjs';
|
|
33
|
-
export { useElementScrollRestoration, ScrollRestoration, } from './ScrollRestoration.cjs';
|
|
34
|
-
export type { UseBlockerOpts, ShouldBlockFn } from './useBlocker.cjs';
|
|
35
|
-
export { useBlocker, Block } from './useBlocker.cjs';
|
|
36
|
-
export { useNavigate, Navigate } from './useNavigate.cjs';
|
|
37
|
-
export { useParams } from './useParams.cjs';
|
|
38
|
-
export { useSearch } from './useSearch.cjs';
|
|
39
|
-
export { getRouterContext, } from './routerContext.cjs';
|
|
40
|
-
export { useRouteContext } from './useRouteContext.cjs';
|
|
41
|
-
export { useRouter } from './useRouter.cjs';
|
|
42
|
-
export { useRouterState } from './useRouterState.cjs';
|
|
43
|
-
export { useLocation } from './useLocation.cjs';
|
|
44
|
-
export { useCanGoBack } from './useCanGoBack.cjs';
|
|
45
|
-
export { useLayoutEffect, // SSR
|
|
46
|
-
useStableCallback, } from './utils.cjs';
|
|
47
|
-
export { CatchNotFound, DefaultGlobalNotFound } from './not-found.cjs';
|
|
48
|
-
export { notFound, isNotFound } from '@tanstack/router-core';
|
|
49
|
-
export type { NotFoundError } from '@tanstack/router-core';
|
|
50
|
-
export type { ValidateLinkOptions, InferStructuralSharing, ValidateUseSearchOptions, ValidateUseParamsOptions, ValidateLinkOptionsArray, } from './typePrimitives.cjs';
|
|
51
|
-
export type { ValidateFromPath, ValidateToPath, ValidateSearch, ValidateParams, InferFrom, InferTo, InferMaskTo, InferMaskFrom, ValidateNavigateOptions, ValidateNavigateOptionsArray, ValidateRedirectOptions, ValidateRedirectOptionsArray, ValidateId, InferStrict, InferShouldThrow, InferSelected, ValidateUseSearchResult, ValidateUseParamsResult, } from '@tanstack/router-core';
|
|
52
|
-
export { ScriptOnce } from './ScriptOnce.cjs';
|
|
53
|
-
export { Asset } from './Asset.cjs';
|
|
54
|
-
export { HeadContent } from './HeadContent.cjs';
|
|
55
|
-
export { Scripts } from './Scripts.cjs';
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const React = require("react");
|
|
5
|
-
const Match = require("./Match.cjs");
|
|
6
|
-
const ClientOnly = require("./ClientOnly.cjs");
|
|
7
|
-
function _interopNamespaceDefault(e) {
|
|
8
|
-
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
9
|
-
if (e) {
|
|
10
|
-
for (const k in e) {
|
|
11
|
-
if (k !== "default") {
|
|
12
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: () => e[k]
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
n.default = e;
|
|
21
|
-
return Object.freeze(n);
|
|
22
|
-
}
|
|
23
|
-
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
24
|
-
function isModuleNotFoundError(error) {
|
|
25
|
-
if (typeof (error == null ? void 0 : error.message) !== "string") return false;
|
|
26
|
-
return error.message.startsWith("Failed to fetch dynamically imported module") || error.message.startsWith("error loading dynamically imported module") || error.message.startsWith("Importing a module script failed");
|
|
27
|
-
}
|
|
28
|
-
function lazyRouteComponent(importer, exportName, ssr) {
|
|
29
|
-
let loadPromise;
|
|
30
|
-
let comp;
|
|
31
|
-
let error;
|
|
32
|
-
let reload;
|
|
33
|
-
const load = () => {
|
|
34
|
-
if (typeof document === "undefined" && (ssr == null ? void 0 : ssr()) === false) {
|
|
35
|
-
comp = () => null;
|
|
36
|
-
return Promise.resolve();
|
|
37
|
-
}
|
|
38
|
-
if (!loadPromise) {
|
|
39
|
-
loadPromise = importer().then((res) => {
|
|
40
|
-
loadPromise = void 0;
|
|
41
|
-
comp = res[exportName ?? "default"];
|
|
42
|
-
}).catch((err) => {
|
|
43
|
-
error = err;
|
|
44
|
-
if (isModuleNotFoundError(error)) {
|
|
45
|
-
if (error instanceof Error && typeof window !== "undefined" && typeof sessionStorage !== "undefined") {
|
|
46
|
-
const storageKey = `tanstack_router_reload:${error.message}`;
|
|
47
|
-
if (!sessionStorage.getItem(storageKey)) {
|
|
48
|
-
sessionStorage.setItem(storageKey, "1");
|
|
49
|
-
reload = true;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
return loadPromise;
|
|
56
|
-
};
|
|
57
|
-
const lazyComp = function Lazy(props) {
|
|
58
|
-
if (reload) {
|
|
59
|
-
window.location.reload();
|
|
60
|
-
throw new Promise(() => {
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
if (error) {
|
|
64
|
-
throw error;
|
|
65
|
-
}
|
|
66
|
-
if (!comp) {
|
|
67
|
-
throw load();
|
|
68
|
-
}
|
|
69
|
-
if ((ssr == null ? void 0 : ssr()) === false) {
|
|
70
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ClientOnly.ClientOnly, { fallback: /* @__PURE__ */ jsxRuntime.jsx(Match.Outlet, {}), children: React__namespace.createElement(comp, props) });
|
|
71
|
-
}
|
|
72
|
-
return React__namespace.createElement(comp, props);
|
|
73
|
-
};
|
|
74
|
-
lazyComp.preload = load;
|
|
75
|
-
return lazyComp;
|
|
76
|
-
}
|
|
77
|
-
exports.lazyRouteComponent = lazyRouteComponent;
|
|
78
|
-
//# sourceMappingURL=lazyRouteComponent.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lazyRouteComponent.cjs","sources":["../../src/lazyRouteComponent.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Outlet } from './Match'\nimport { ClientOnly } from './ClientOnly'\nimport type { AsyncRouteComponent } from './route'\n\n// If the load fails due to module not found, it may mean a new version of\n// the build was deployed and the user's browser is still using an old version.\n// If this happens, the old version in the user's browser would have an outdated\n// URL to the lazy module.\n// In that case, we want to attempt one window refresh to get the latest.\nfunction isModuleNotFoundError(error: any): boolean {\n // chrome: \"Failed to fetch dynamically imported module: http://localhost:5173/src/routes/posts.index.tsx?tsr-split\"\n // firefox: \"error loading dynamically imported module: http://localhost:5173/src/routes/posts.index.tsx?tsr-split\"\n // safari: \"Importing a module script failed.\"\n if (typeof error?.message !== 'string') return false\n return (\n error.message.startsWith('Failed to fetch dynamically imported module') ||\n error.message.startsWith('error loading dynamically imported module') ||\n error.message.startsWith('Importing a module script failed')\n )\n}\n\nexport function lazyRouteComponent<\n T extends Record<string, any>,\n TKey extends keyof T = 'default',\n>(\n importer: () => Promise<T>,\n exportName?: TKey,\n ssr?: () => boolean,\n): T[TKey] extends (props: infer TProps) => any\n ? AsyncRouteComponent<TProps>\n : never {\n let loadPromise: Promise<any> | undefined\n let comp: T[TKey] | T['default']\n let error: any\n let reload: boolean\n\n const load = () => {\n if (typeof document === 'undefined' && ssr?.() === false) {\n comp = (() => null) as any\n return Promise.resolve()\n }\n if (!loadPromise) {\n loadPromise = importer()\n .then((res) => {\n loadPromise = undefined\n comp = res[exportName ?? 'default']\n })\n .catch((err) => {\n // We don't want an error thrown from preload in this case, because\n // there's nothing we want to do about module not found during preload.\n // Record the error, the rest is handled during the render path.\n error = err\n if (isModuleNotFoundError(error)) {\n if (\n error instanceof Error &&\n typeof window !== 'undefined' &&\n typeof sessionStorage !== 'undefined'\n ) {\n // Again, we want to reload one time on module not found error and not enter\n // a reload loop if there is some other issue besides an old deploy.\n // That's why we store our reload attempt in sessionStorage.\n // Use error.message as key because it contains the module path that failed.\n const storageKey = `tanstack_router_reload:${error.message}`\n if (!sessionStorage.getItem(storageKey)) {\n sessionStorage.setItem(storageKey, '1')\n reload = true\n }\n }\n }\n })\n }\n\n return loadPromise\n }\n\n const lazyComp = function Lazy(props: any) {\n // Now that we're out of preload and into actual render path,\n if (reload) {\n // If it was a module loading error,\n // throw eternal suspense while we wait for window to reload\n window.location.reload()\n throw new Promise(() => {})\n }\n if (error) {\n // Otherwise, just throw the error\n throw error\n }\n\n if (!comp) {\n throw load()\n }\n\n if (ssr?.() === false) {\n return (\n <ClientOnly fallback={<Outlet />}>\n {React.createElement(comp, props)}\n </ClientOnly>\n )\n }\n return React.createElement(comp, props)\n }\n\n ;(lazyComp as any).preload = load\n\n return lazyComp as any\n}\n"],"names":["jsx","ClientOnly","Outlet","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAUA,SAAS,sBAAsB,OAAqB;AAIlD,MAAI,QAAO,+BAAO,aAAY,SAAiB,QAAA;AAC/C,SACE,MAAM,QAAQ,WAAW,6CAA6C,KACtE,MAAM,QAAQ,WAAW,2CAA2C,KACpE,MAAM,QAAQ,WAAW,kCAAkC;AAE/D;AAEgB,SAAA,mBAId,UACA,YACA,KAGQ;AACJ,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AAEJ,QAAM,OAAO,MAAM;AACjB,QAAI,OAAO,aAAa,gBAAe,kCAAY,OAAO;AACxD,aAAQ,MAAM;AACd,aAAO,QAAQ,QAAQ;AAAA,IAAA;AAEzB,QAAI,CAAC,aAAa;AAChB,oBAAc,SAAS,EACpB,KAAK,CAAC,QAAQ;AACC,sBAAA;AACP,eAAA,IAAI,cAAc,SAAS;AAAA,MAAA,CACnC,EACA,MAAM,CAAC,QAAQ;AAIN,gBAAA;AACJ,YAAA,sBAAsB,KAAK,GAAG;AAChC,cACE,iBAAiB,SACjB,OAAO,WAAW,eAClB,OAAO,mBAAmB,aAC1B;AAKM,kBAAA,aAAa,0BAA0B,MAAM,OAAO;AAC1D,gBAAI,CAAC,eAAe,QAAQ,UAAU,GAAG;AACxB,6BAAA,QAAQ,YAAY,GAAG;AAC7B,uBAAA;AAAA,YAAA;AAAA,UACX;AAAA,QACF;AAAA,MACF,CACD;AAAA,IAAA;AAGE,WAAA;AAAA,EACT;AAEM,QAAA,WAAW,SAAS,KAAK,OAAY;AAEzC,QAAI,QAAQ;AAGV,aAAO,SAAS,OAAO;AACjB,YAAA,IAAI,QAAQ,MAAM;AAAA,MAAA,CAAE;AAAA,IAAA;AAE5B,QAAI,OAAO;AAEH,YAAA;AAAA,IAAA;AAGR,QAAI,CAAC,MAAM;AACT,YAAM,KAAK;AAAA,IAAA;AAGT,SAAA,kCAAY,OAAO;AAEnB,aAAAA,2BAAA,IAACC,WAAW,YAAA,EAAA,UAAWD,2BAAAA,IAAAE,MAAAA,QAAA,CAAA,CAAO,GAC3B,UAAMC,iBAAA,cAAc,MAAM,KAAK,EAClC,CAAA;AAAA,IAAA;AAGG,WAAAA,iBAAM,cAAc,MAAM,KAAK;AAAA,EACxC;AAEE,WAAiB,UAAU;AAEtB,SAAA;AACT;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { AsyncRouteComponent } from './route.cjs';
|
|
2
|
-
export declare function lazyRouteComponent<T extends Record<string, any>, TKey extends keyof T = 'default'>(importer: () => Promise<T>, exportName?: TKey, ssr?: () => boolean): T[TKey] extends (props: infer TProps) => any ? AsyncRouteComponent<TProps> : never;
|