@tanstack/react-router 0.0.1-beta.60 → 0.0.1-beta.61
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/stats-html.html
CHANGED
|
@@ -4024,7 +4024,7 @@ var drawChart = (function (exports) {
|
|
|
4024
4024
|
</script>
|
|
4025
4025
|
<script>
|
|
4026
4026
|
/*<!--*/
|
|
4027
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"uid":"
|
|
4027
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"uid":"eda2-85","name":"\u0000rollupPluginBabelHelpers.js"},{"name":"node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js","uid":"eda2-87"},{"name":"packages","children":[{"name":"store/build/esm/index.js","uid":"eda2-89"},{"name":"router/build/esm/index.js","uid":"eda2-91"},{"name":"react-store/build/esm/index.js","uid":"eda2-93"},{"name":"react-router/src/index.tsx","uid":"eda2-95"}]}]}],"isRoot":true},"nodeParts":{"eda2-85":{"renderedLength":429,"gzipLength":238,"brotliLength":0,"mainUid":"eda2-84"},"eda2-87":{"renderedLength":181,"gzipLength":129,"brotliLength":0,"mainUid":"eda2-86"},"eda2-89":{"renderedLength":1290,"gzipLength":496,"brotliLength":0,"mainUid":"eda2-88"},"eda2-91":{"renderedLength":44177,"gzipLength":10709,"brotliLength":0,"mainUid":"eda2-90"},"eda2-93":{"renderedLength":1571,"gzipLength":594,"brotliLength":0,"mainUid":"eda2-92"},"eda2-95":{"renderedLength":11729,"gzipLength":3116,"brotliLength":0,"mainUid":"eda2-94"}},"nodeMetas":{"eda2-84":{"id":"\u0000rollupPluginBabelHelpers.js","moduleParts":{"index.production.js":"eda2-85"},"imported":[],"importedBy":[{"uid":"eda2-94"}]},"eda2-86":{"id":"/node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js","moduleParts":{"index.production.js":"eda2-87"},"imported":[],"importedBy":[{"uid":"eda2-90"}]},"eda2-88":{"id":"/packages/store/build/esm/index.js","moduleParts":{"index.production.js":"eda2-89"},"imported":[],"importedBy":[{"uid":"eda2-90"}]},"eda2-90":{"id":"/packages/router/build/esm/index.js","moduleParts":{"index.production.js":"eda2-91"},"imported":[{"uid":"eda2-86"},{"uid":"eda2-88"}],"importedBy":[{"uid":"eda2-94"}]},"eda2-92":{"id":"/packages/react-store/build/esm/index.js","moduleParts":{"index.production.js":"eda2-93"},"imported":[{"uid":"eda2-97"}],"importedBy":[{"uid":"eda2-94"}]},"eda2-94":{"id":"/packages/react-router/src/index.tsx","moduleParts":{"index.production.js":"eda2-95"},"imported":[{"uid":"eda2-84"},{"uid":"eda2-96"},{"uid":"eda2-90"},{"uid":"eda2-92"}],"importedBy":[],"isEntry":true},"eda2-96":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"eda2-94"}],"isExternal":true},"eda2-97":{"id":"use-sync-external-store/shim/with-selector","moduleParts":{},"imported":[],"importedBy":[{"uid":"eda2-92"}],"isExternal":true}},"env":{"rollup":"2.79.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
4028
4028
|
|
|
4029
4029
|
const run = () => {
|
|
4030
4030
|
const width = window.innerWidth;
|
package/build/stats-react.json
CHANGED
|
@@ -7,31 +7,31 @@
|
|
|
7
7
|
"name": "index.production.js",
|
|
8
8
|
"children": [
|
|
9
9
|
{
|
|
10
|
-
"uid": "
|
|
10
|
+
"uid": "eda2-99",
|
|
11
11
|
"name": "\u0000rollupPluginBabelHelpers.js"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"name": "node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
|
|
15
|
-
"uid": "
|
|
15
|
+
"uid": "eda2-101"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"name": "packages",
|
|
19
19
|
"children": [
|
|
20
20
|
{
|
|
21
21
|
"name": "store/build/esm/index.js",
|
|
22
|
-
"uid": "
|
|
22
|
+
"uid": "eda2-103"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"name": "router/build/esm/index.js",
|
|
26
|
-
"uid": "
|
|
26
|
+
"uid": "eda2-105"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"name": "react-store/build/esm/index.js",
|
|
30
|
-
"uid": "
|
|
30
|
+
"uid": "eda2-107"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"name": "react-router/src/index.tsx",
|
|
34
|
-
"uid": "
|
|
34
|
+
"uid": "eda2-109"
|
|
35
35
|
}
|
|
36
36
|
]
|
|
37
37
|
}
|
|
@@ -41,155 +41,155 @@
|
|
|
41
41
|
"isRoot": true
|
|
42
42
|
},
|
|
43
43
|
"nodeParts": {
|
|
44
|
-
"
|
|
44
|
+
"eda2-99": {
|
|
45
45
|
"renderedLength": 429,
|
|
46
46
|
"gzipLength": 238,
|
|
47
47
|
"brotliLength": 0,
|
|
48
|
-
"mainUid": "
|
|
48
|
+
"mainUid": "eda2-98"
|
|
49
49
|
},
|
|
50
|
-
"
|
|
50
|
+
"eda2-101": {
|
|
51
51
|
"renderedLength": 181,
|
|
52
52
|
"gzipLength": 129,
|
|
53
53
|
"brotliLength": 0,
|
|
54
|
-
"mainUid": "
|
|
54
|
+
"mainUid": "eda2-100"
|
|
55
55
|
},
|
|
56
|
-
"
|
|
56
|
+
"eda2-103": {
|
|
57
57
|
"renderedLength": 1290,
|
|
58
58
|
"gzipLength": 496,
|
|
59
59
|
"brotliLength": 0,
|
|
60
|
-
"mainUid": "
|
|
60
|
+
"mainUid": "eda2-102"
|
|
61
61
|
},
|
|
62
|
-
"
|
|
63
|
-
"renderedLength":
|
|
64
|
-
"gzipLength":
|
|
62
|
+
"eda2-105": {
|
|
63
|
+
"renderedLength": 44177,
|
|
64
|
+
"gzipLength": 10709,
|
|
65
65
|
"brotliLength": 0,
|
|
66
|
-
"mainUid": "
|
|
66
|
+
"mainUid": "eda2-104"
|
|
67
67
|
},
|
|
68
|
-
"
|
|
68
|
+
"eda2-107": {
|
|
69
69
|
"renderedLength": 1571,
|
|
70
70
|
"gzipLength": 594,
|
|
71
71
|
"brotliLength": 0,
|
|
72
|
-
"mainUid": "
|
|
72
|
+
"mainUid": "eda2-106"
|
|
73
73
|
},
|
|
74
|
-
"
|
|
74
|
+
"eda2-109": {
|
|
75
75
|
"renderedLength": 11729,
|
|
76
76
|
"gzipLength": 3116,
|
|
77
77
|
"brotliLength": 0,
|
|
78
|
-
"mainUid": "
|
|
78
|
+
"mainUid": "eda2-108"
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"nodeMetas": {
|
|
82
|
-
"
|
|
82
|
+
"eda2-98": {
|
|
83
83
|
"id": "\u0000rollupPluginBabelHelpers.js",
|
|
84
84
|
"moduleParts": {
|
|
85
|
-
"index.production.js": "
|
|
85
|
+
"index.production.js": "eda2-99"
|
|
86
86
|
},
|
|
87
87
|
"imported": [],
|
|
88
88
|
"importedBy": [
|
|
89
89
|
{
|
|
90
|
-
"uid": "
|
|
90
|
+
"uid": "eda2-108"
|
|
91
91
|
}
|
|
92
92
|
]
|
|
93
93
|
},
|
|
94
|
-
"
|
|
94
|
+
"eda2-100": {
|
|
95
95
|
"id": "/node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
|
|
96
96
|
"moduleParts": {
|
|
97
|
-
"index.production.js": "
|
|
97
|
+
"index.production.js": "eda2-101"
|
|
98
98
|
},
|
|
99
99
|
"imported": [],
|
|
100
100
|
"importedBy": [
|
|
101
101
|
{
|
|
102
|
-
"uid": "
|
|
102
|
+
"uid": "eda2-104"
|
|
103
103
|
}
|
|
104
104
|
]
|
|
105
105
|
},
|
|
106
|
-
"
|
|
106
|
+
"eda2-102": {
|
|
107
107
|
"id": "/packages/store/build/esm/index.js",
|
|
108
108
|
"moduleParts": {
|
|
109
|
-
"index.production.js": "
|
|
109
|
+
"index.production.js": "eda2-103"
|
|
110
110
|
},
|
|
111
111
|
"imported": [],
|
|
112
112
|
"importedBy": [
|
|
113
113
|
{
|
|
114
|
-
"uid": "
|
|
114
|
+
"uid": "eda2-104"
|
|
115
115
|
}
|
|
116
116
|
]
|
|
117
117
|
},
|
|
118
|
-
"
|
|
118
|
+
"eda2-104": {
|
|
119
119
|
"id": "/packages/router/build/esm/index.js",
|
|
120
120
|
"moduleParts": {
|
|
121
|
-
"index.production.js": "
|
|
121
|
+
"index.production.js": "eda2-105"
|
|
122
122
|
},
|
|
123
123
|
"imported": [
|
|
124
124
|
{
|
|
125
|
-
"uid": "
|
|
125
|
+
"uid": "eda2-100"
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
|
-
"uid": "
|
|
128
|
+
"uid": "eda2-102"
|
|
129
129
|
}
|
|
130
130
|
],
|
|
131
131
|
"importedBy": [
|
|
132
132
|
{
|
|
133
|
-
"uid": "
|
|
133
|
+
"uid": "eda2-108"
|
|
134
134
|
}
|
|
135
135
|
]
|
|
136
136
|
},
|
|
137
|
-
"
|
|
137
|
+
"eda2-106": {
|
|
138
138
|
"id": "/packages/react-store/build/esm/index.js",
|
|
139
139
|
"moduleParts": {
|
|
140
|
-
"index.production.js": "
|
|
140
|
+
"index.production.js": "eda2-107"
|
|
141
141
|
},
|
|
142
142
|
"imported": [
|
|
143
143
|
{
|
|
144
|
-
"uid": "
|
|
144
|
+
"uid": "eda2-111"
|
|
145
145
|
}
|
|
146
146
|
],
|
|
147
147
|
"importedBy": [
|
|
148
148
|
{
|
|
149
|
-
"uid": "
|
|
149
|
+
"uid": "eda2-108"
|
|
150
150
|
}
|
|
151
151
|
]
|
|
152
152
|
},
|
|
153
|
-
"
|
|
153
|
+
"eda2-108": {
|
|
154
154
|
"id": "/packages/react-router/src/index.tsx",
|
|
155
155
|
"moduleParts": {
|
|
156
|
-
"index.production.js": "
|
|
156
|
+
"index.production.js": "eda2-109"
|
|
157
157
|
},
|
|
158
158
|
"imported": [
|
|
159
159
|
{
|
|
160
|
-
"uid": "
|
|
160
|
+
"uid": "eda2-98"
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
|
-
"uid": "
|
|
163
|
+
"uid": "eda2-110"
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
|
-
"uid": "
|
|
166
|
+
"uid": "eda2-104"
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
|
-
"uid": "
|
|
169
|
+
"uid": "eda2-106"
|
|
170
170
|
}
|
|
171
171
|
],
|
|
172
172
|
"importedBy": [],
|
|
173
173
|
"isEntry": true
|
|
174
174
|
},
|
|
175
|
-
"
|
|
175
|
+
"eda2-110": {
|
|
176
176
|
"id": "react",
|
|
177
177
|
"moduleParts": {},
|
|
178
178
|
"imported": [],
|
|
179
179
|
"importedBy": [
|
|
180
180
|
{
|
|
181
|
-
"uid": "
|
|
181
|
+
"uid": "eda2-108"
|
|
182
182
|
}
|
|
183
183
|
],
|
|
184
184
|
"isExternal": true
|
|
185
185
|
},
|
|
186
|
-
"
|
|
186
|
+
"eda2-111": {
|
|
187
187
|
"id": "use-sync-external-store/shim/with-selector",
|
|
188
188
|
"moduleParts": {},
|
|
189
189
|
"imported": [],
|
|
190
190
|
"importedBy": [
|
|
191
191
|
{
|
|
192
|
-
"uid": "
|
|
192
|
+
"uid": "eda2-106"
|
|
193
193
|
}
|
|
194
194
|
],
|
|
195
195
|
"isExternal": true
|
|
@@ -603,6 +603,7 @@
|
|
|
603
603
|
id = joinPaths(['/', id]);
|
|
604
604
|
}
|
|
605
605
|
const fullPath = id === rootRouteId ? '/' : trimPathRight(joinPaths([parent.fullPath, path]));
|
|
606
|
+
this.path = path;
|
|
606
607
|
this.id = id;
|
|
607
608
|
// this.customId = customId as TCustomId
|
|
608
609
|
this.fullPath = fullPath;
|
|
@@ -1116,7 +1117,7 @@
|
|
|
1116
1117
|
if (!route.path && children?.length) {
|
|
1117
1118
|
return findMatchInRoutes([...matchingRoutes, route], children);
|
|
1118
1119
|
}
|
|
1119
|
-
const fuzzy = route.path
|
|
1120
|
+
const fuzzy = !!(route.path !== '/' || children?.length);
|
|
1120
1121
|
const matchParams = matchPathname(this.basepath, pathname, {
|
|
1121
1122
|
to: route.fullPath,
|
|
1122
1123
|
fuzzy,
|
|
@@ -1166,10 +1167,11 @@
|
|
|
1166
1167
|
}
|
|
1167
1168
|
};
|
|
1168
1169
|
findInRouteTree([this.routeTree]);
|
|
1169
|
-
linkMatches(matches);
|
|
1170
1170
|
return matches;
|
|
1171
1171
|
};
|
|
1172
1172
|
loadMatches = async (resolvedMatches, loaderOpts) => {
|
|
1173
|
+
linkMatches(resolvedMatches);
|
|
1174
|
+
|
|
1173
1175
|
// this.cleanMatchCache()
|
|
1174
1176
|
resolvedMatches.forEach(async match => {
|
|
1175
1177
|
// Validate the match (loads search params etc)
|
|
@@ -1536,23 +1538,8 @@
|
|
|
1536
1538
|
currentLocation: null,
|
|
1537
1539
|
currentMatches: [],
|
|
1538
1540
|
lastUpdated: Date.now()
|
|
1539
|
-
// matchCache: {}, // TODO:
|
|
1540
|
-
// get isFetching() {
|
|
1541
|
-
// return (
|
|
1542
|
-
// this.status === 'loading' ||
|
|
1543
|
-
// this.currentMatches.some((d) => d.store.state.isFetching)
|
|
1544
|
-
// )
|
|
1545
|
-
// },
|
|
1546
|
-
// get isPreloading() {
|
|
1547
|
-
// return Object.values(this.matchCache).some(
|
|
1548
|
-
// (d) =>
|
|
1549
|
-
// d.match.store.state.isFetching &&
|
|
1550
|
-
// !this.currentMatches.find((dd) => dd.id === d.match.id),
|
|
1551
|
-
// )
|
|
1552
|
-
// },
|
|
1553
1541
|
};
|
|
1554
1542
|
}
|
|
1555
|
-
|
|
1556
1543
|
function isCtrlEvent(e) {
|
|
1557
1544
|
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
1558
1545
|
}
|