@tanstack/react-router 0.0.1-beta.23 → 0.0.1-beta.25

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.
@@ -4014,7 +4014,7 @@ var drawChart = (function (exports) {
4014
4014
  </script>
4015
4015
  <script>
4016
4016
  /*<!--*/
4017
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"uid":"db96-59","name":"\u0000rollupPluginBabelHelpers.js"},{"name":"packages","children":[{"name":"router-core/build/esm/index.js","uid":"db96-61"},{"name":"react-router/src/index.tsx","uid":"db96-63"}]}]}],"isRoot":true},"nodeParts":{"db96-59":{"renderedLength":798,"gzipLength":366,"brotliLength":0,"mainUid":"db96-58"},"db96-61":{"renderedLength":75369,"gzipLength":15785,"brotliLength":0,"mainUid":"db96-60"},"db96-63":{"renderedLength":13128,"gzipLength":3268,"brotliLength":0,"mainUid":"db96-62"}},"nodeMetas":{"db96-58":{"id":"\u0000rollupPluginBabelHelpers.js","moduleParts":{"index.production.js":"db96-59"},"imported":[],"importedBy":[{"uid":"db96-62"}]},"db96-60":{"id":"/packages/router-core/build/esm/index.js","moduleParts":{"index.production.js":"db96-61"},"imported":[],"importedBy":[{"uid":"db96-62"}]},"db96-62":{"id":"/packages/react-router/src/index.tsx","moduleParts":{"index.production.js":"db96-63"},"imported":[{"uid":"db96-58"},{"uid":"db96-64"},{"uid":"db96-65"},{"uid":"db96-60"}],"importedBy":[],"isEntry":true},"db96-64":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"db96-62"}],"isExternal":true},"db96-65":{"id":"use-sync-external-store/shim","moduleParts":{},"imported":[],"importedBy":[{"uid":"db96-62"}],"isExternal":true}},"env":{"rollup":"2.77.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
4017
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"uid":"ce39-59","name":"\u0000rollupPluginBabelHelpers.js"},{"name":"packages","children":[{"name":"router-core/build/esm/index.js","uid":"ce39-61"},{"name":"react-router/src/index.tsx","uid":"ce39-63"}]}]}],"isRoot":true},"nodeParts":{"ce39-59":{"renderedLength":798,"gzipLength":366,"brotliLength":0,"mainUid":"ce39-58"},"ce39-61":{"renderedLength":75397,"gzipLength":15789,"brotliLength":0,"mainUid":"ce39-60"},"ce39-63":{"renderedLength":13128,"gzipLength":3268,"brotliLength":0,"mainUid":"ce39-62"}},"nodeMetas":{"ce39-58":{"id":"\u0000rollupPluginBabelHelpers.js","moduleParts":{"index.production.js":"ce39-59"},"imported":[],"importedBy":[{"uid":"ce39-62"}]},"ce39-60":{"id":"/packages/router-core/build/esm/index.js","moduleParts":{"index.production.js":"ce39-61"},"imported":[],"importedBy":[{"uid":"ce39-62"}]},"ce39-62":{"id":"/packages/react-router/src/index.tsx","moduleParts":{"index.production.js":"ce39-63"},"imported":[{"uid":"ce39-58"},{"uid":"ce39-64"},{"uid":"ce39-65"},{"uid":"ce39-60"}],"importedBy":[],"isEntry":true},"ce39-64":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"ce39-62"}],"isExternal":true},"ce39-65":{"id":"use-sync-external-store/shim","moduleParts":{},"imported":[],"importedBy":[{"uid":"ce39-62"}],"isExternal":true}},"env":{"rollup":"2.77.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
4018
4018
 
4019
4019
  const run = () => {
4020
4020
  const width = window.innerWidth;
@@ -7,7 +7,7 @@
7
7
  "name": "index.production.js",
8
8
  "children": [
9
9
  {
10
- "uid": "db96-67",
10
+ "uid": "ce39-67",
11
11
  "name": "\u0000rollupPluginBabelHelpers.js"
12
12
  },
13
13
  {
@@ -15,11 +15,11 @@
15
15
  "children": [
16
16
  {
17
17
  "name": "router-core/build/esm/index.js",
18
- "uid": "db96-69"
18
+ "uid": "ce39-69"
19
19
  },
20
20
  {
21
21
  "name": "react-router/src/index.tsx",
22
- "uid": "db96-71"
22
+ "uid": "ce39-71"
23
23
  }
24
24
  ]
25
25
  }
@@ -29,90 +29,90 @@
29
29
  "isRoot": true
30
30
  },
31
31
  "nodeParts": {
32
- "db96-67": {
32
+ "ce39-67": {
33
33
  "renderedLength": 798,
34
34
  "gzipLength": 366,
35
35
  "brotliLength": 0,
36
- "mainUid": "db96-66"
36
+ "mainUid": "ce39-66"
37
37
  },
38
- "db96-69": {
39
- "renderedLength": 75369,
40
- "gzipLength": 15785,
38
+ "ce39-69": {
39
+ "renderedLength": 75397,
40
+ "gzipLength": 15789,
41
41
  "brotliLength": 0,
42
- "mainUid": "db96-68"
42
+ "mainUid": "ce39-68"
43
43
  },
44
- "db96-71": {
44
+ "ce39-71": {
45
45
  "renderedLength": 13128,
46
46
  "gzipLength": 3268,
47
47
  "brotliLength": 0,
48
- "mainUid": "db96-70"
48
+ "mainUid": "ce39-70"
49
49
  }
50
50
  },
51
51
  "nodeMetas": {
52
- "db96-66": {
52
+ "ce39-66": {
53
53
  "id": "\u0000rollupPluginBabelHelpers.js",
54
54
  "moduleParts": {
55
- "index.production.js": "db96-67"
55
+ "index.production.js": "ce39-67"
56
56
  },
57
57
  "imported": [],
58
58
  "importedBy": [
59
59
  {
60
- "uid": "db96-70"
60
+ "uid": "ce39-70"
61
61
  }
62
62
  ]
63
63
  },
64
- "db96-68": {
64
+ "ce39-68": {
65
65
  "id": "/packages/router-core/build/esm/index.js",
66
66
  "moduleParts": {
67
- "index.production.js": "db96-69"
67
+ "index.production.js": "ce39-69"
68
68
  },
69
69
  "imported": [],
70
70
  "importedBy": [
71
71
  {
72
- "uid": "db96-70"
72
+ "uid": "ce39-70"
73
73
  }
74
74
  ]
75
75
  },
76
- "db96-70": {
76
+ "ce39-70": {
77
77
  "id": "/packages/react-router/src/index.tsx",
78
78
  "moduleParts": {
79
- "index.production.js": "db96-71"
79
+ "index.production.js": "ce39-71"
80
80
  },
81
81
  "imported": [
82
82
  {
83
- "uid": "db96-66"
83
+ "uid": "ce39-66"
84
84
  },
85
85
  {
86
- "uid": "db96-72"
86
+ "uid": "ce39-72"
87
87
  },
88
88
  {
89
- "uid": "db96-73"
89
+ "uid": "ce39-73"
90
90
  },
91
91
  {
92
- "uid": "db96-68"
92
+ "uid": "ce39-68"
93
93
  }
94
94
  ],
95
95
  "importedBy": [],
96
96
  "isEntry": true
97
97
  },
98
- "db96-72": {
98
+ "ce39-72": {
99
99
  "id": "react",
100
100
  "moduleParts": {},
101
101
  "imported": [],
102
102
  "importedBy": [
103
103
  {
104
- "uid": "db96-70"
104
+ "uid": "ce39-70"
105
105
  }
106
106
  ],
107
107
  "isExternal": true
108
108
  },
109
- "db96-73": {
109
+ "ce39-73": {
110
110
  "id": "use-sync-external-store/shim",
111
111
  "moduleParts": {},
112
112
  "imported": [],
113
113
  "importedBy": [
114
114
  {
115
- "uid": "db96-70"
115
+ "uid": "ce39-70"
116
116
  }
117
117
  ],
118
118
  "isExternal": true
@@ -20,9 +20,9 @@ type RegisteredRouter = RegisterRouter extends {
20
20
  type RegisteredAllRouteInfo = RegisterRouter extends {
21
21
  router: Router<infer TRouteConfig, infer TAllRouteInfo>;
22
22
  } ? TAllRouteInfo : AnyAllRouteInfo;
23
- type SyncRouteComponent = (props?: {}) => JSX.Element | React.ReactNode;
24
- type RouteComponent = SyncRouteComponent & {
25
- preload?: () => Promise<SyncRouteComponent>;
23
+ type SyncRouteComponent<TProps = {}> = (props: TProps) => JSX.Element | React.ReactNode;
24
+ type RouteComponent<TProps = {}> = SyncRouteComponent<TProps> & {
25
+ preload?: () => Promise<SyncRouteComponent<TProps>>;
26
26
  };
27
27
  declare function lazy(importer: () => Promise<{
28
28
  default: SyncRouteComponent;
@@ -43,6 +43,12 @@ type MakeLinkOptions<TAllRouteInfo extends AnyAllRouteInfo, TFrom extends ValidF
43
43
  declare module '@tanstack/router-core' {
44
44
  interface FrameworkGenerics {
45
45
  Component: RouteComponent;
46
+ ErrorComponent: RouteComponent<{
47
+ error: unknown;
48
+ info: {
49
+ componentStack: string;
50
+ };
51
+ }>;
46
52
  }
47
53
  interface RouterOptions<TRouteConfig extends AnyRouteConfig> {
48
54
  useContext?: () => RouterContext;
@@ -1351,6 +1351,7 @@
1351
1351
  })();
1352
1352
 
1353
1353
  let route = {
1354
+ routeInfo: undefined,
1354
1355
  routeId: id,
1355
1356
  routeRouteId: routeId,
1356
1357
  routePath,