@tanstack/react-router 0.0.1-beta.12 → 0.0.1-beta.14

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":"2ef3-59","name":"\u0000rollupPluginBabelHelpers.js"},{"name":"packages","children":[{"name":"router-core/build/esm/index.js","uid":"2ef3-61"},{"name":"react-router/src/index.tsx","uid":"2ef3-63"}]}]}],"isRoot":true},"nodeParts":{"2ef3-59":{"renderedLength":798,"gzipLength":366,"brotliLength":0,"mainUid":"2ef3-58"},"2ef3-61":{"renderedLength":75522,"gzipLength":15692,"brotliLength":0,"mainUid":"2ef3-60"},"2ef3-63":{"renderedLength":11941,"gzipLength":3092,"brotliLength":0,"mainUid":"2ef3-62"}},"nodeMetas":{"2ef3-58":{"id":"\u0000rollupPluginBabelHelpers.js","moduleParts":{"index.production.js":"2ef3-59"},"imported":[],"importedBy":[{"uid":"2ef3-62"}]},"2ef3-60":{"id":"/packages/router-core/build/esm/index.js","moduleParts":{"index.production.js":"2ef3-61"},"imported":[],"importedBy":[{"uid":"2ef3-62"}]},"2ef3-62":{"id":"/packages/react-router/src/index.tsx","moduleParts":{"index.production.js":"2ef3-63"},"imported":[{"uid":"2ef3-58"},{"uid":"2ef3-64"},{"uid":"2ef3-65"},{"uid":"2ef3-60"}],"importedBy":[],"isEntry":true},"2ef3-64":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"2ef3-62"}],"isExternal":true},"2ef3-65":{"id":"use-sync-external-store/shim","moduleParts":{},"imported":[],"importedBy":[{"uid":"2ef3-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":"45db-59","name":"\u0000rollupPluginBabelHelpers.js"},{"name":"packages","children":[{"name":"router-core/build/esm/index.js","uid":"45db-61"},{"name":"react-router/src/index.tsx","uid":"45db-63"}]}]}],"isRoot":true},"nodeParts":{"45db-59":{"renderedLength":798,"gzipLength":366,"brotliLength":0,"mainUid":"45db-58"},"45db-61":{"renderedLength":74071,"gzipLength":15445,"brotliLength":0,"mainUid":"45db-60"},"45db-63":{"renderedLength":11304,"gzipLength":2961,"brotliLength":0,"mainUid":"45db-62"}},"nodeMetas":{"45db-58":{"id":"\u0000rollupPluginBabelHelpers.js","moduleParts":{"index.production.js":"45db-59"},"imported":[],"importedBy":[{"uid":"45db-62"}]},"45db-60":{"id":"/packages/router-core/build/esm/index.js","moduleParts":{"index.production.js":"45db-61"},"imported":[],"importedBy":[{"uid":"45db-62"}]},"45db-62":{"id":"/packages/react-router/src/index.tsx","moduleParts":{"index.production.js":"45db-63"},"imported":[{"uid":"45db-58"},{"uid":"45db-64"},{"uid":"45db-65"},{"uid":"45db-60"},{"uid":"45db-66"}],"importedBy":[],"isEntry":true},"45db-64":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"45db-62"}],"isExternal":true},"45db-65":{"id":"use-sync-external-store/shim","moduleParts":{},"imported":[],"importedBy":[{"uid":"45db-62"}],"isExternal":true},"45db-66":{"id":"react-lazy-with-preload/lib/index","moduleParts":{},"imported":[],"importedBy":[{"uid":"45db-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": "2ef3-67",
10
+ "uid": "45db-68",
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": "2ef3-69"
18
+ "uid": "45db-70"
19
19
  },
20
20
  {
21
21
  "name": "react-router/src/index.tsx",
22
- "uid": "2ef3-71"
22
+ "uid": "45db-72"
23
23
  }
24
24
  ]
25
25
  }
@@ -29,90 +29,104 @@
29
29
  "isRoot": true
30
30
  },
31
31
  "nodeParts": {
32
- "2ef3-67": {
32
+ "45db-68": {
33
33
  "renderedLength": 798,
34
34
  "gzipLength": 366,
35
35
  "brotliLength": 0,
36
- "mainUid": "2ef3-66"
36
+ "mainUid": "45db-67"
37
37
  },
38
- "2ef3-69": {
39
- "renderedLength": 75522,
40
- "gzipLength": 15692,
38
+ "45db-70": {
39
+ "renderedLength": 74071,
40
+ "gzipLength": 15445,
41
41
  "brotliLength": 0,
42
- "mainUid": "2ef3-68"
42
+ "mainUid": "45db-69"
43
43
  },
44
- "2ef3-71": {
45
- "renderedLength": 11941,
46
- "gzipLength": 3092,
44
+ "45db-72": {
45
+ "renderedLength": 11304,
46
+ "gzipLength": 2961,
47
47
  "brotliLength": 0,
48
- "mainUid": "2ef3-70"
48
+ "mainUid": "45db-71"
49
49
  }
50
50
  },
51
51
  "nodeMetas": {
52
- "2ef3-66": {
52
+ "45db-67": {
53
53
  "id": "\u0000rollupPluginBabelHelpers.js",
54
54
  "moduleParts": {
55
- "index.production.js": "2ef3-67"
55
+ "index.production.js": "45db-68"
56
56
  },
57
57
  "imported": [],
58
58
  "importedBy": [
59
59
  {
60
- "uid": "2ef3-70"
60
+ "uid": "45db-71"
61
61
  }
62
62
  ]
63
63
  },
64
- "2ef3-68": {
64
+ "45db-69": {
65
65
  "id": "/packages/router-core/build/esm/index.js",
66
66
  "moduleParts": {
67
- "index.production.js": "2ef3-69"
67
+ "index.production.js": "45db-70"
68
68
  },
69
69
  "imported": [],
70
70
  "importedBy": [
71
71
  {
72
- "uid": "2ef3-70"
72
+ "uid": "45db-71"
73
73
  }
74
74
  ]
75
75
  },
76
- "2ef3-70": {
76
+ "45db-71": {
77
77
  "id": "/packages/react-router/src/index.tsx",
78
78
  "moduleParts": {
79
- "index.production.js": "2ef3-71"
79
+ "index.production.js": "45db-72"
80
80
  },
81
81
  "imported": [
82
82
  {
83
- "uid": "2ef3-66"
83
+ "uid": "45db-67"
84
84
  },
85
85
  {
86
- "uid": "2ef3-72"
86
+ "uid": "45db-73"
87
87
  },
88
88
  {
89
- "uid": "2ef3-73"
89
+ "uid": "45db-74"
90
90
  },
91
91
  {
92
- "uid": "2ef3-68"
92
+ "uid": "45db-69"
93
+ },
94
+ {
95
+ "uid": "45db-75"
93
96
  }
94
97
  ],
95
98
  "importedBy": [],
96
99
  "isEntry": true
97
100
  },
98
- "2ef3-72": {
101
+ "45db-73": {
99
102
  "id": "react",
100
103
  "moduleParts": {},
101
104
  "imported": [],
102
105
  "importedBy": [
103
106
  {
104
- "uid": "2ef3-70"
107
+ "uid": "45db-71"
105
108
  }
106
109
  ],
107
110
  "isExternal": true
108
111
  },
109
- "2ef3-73": {
112
+ "45db-74": {
110
113
  "id": "use-sync-external-store/shim",
111
114
  "moduleParts": {},
112
115
  "imported": [],
113
116
  "importedBy": [
114
117
  {
115
- "uid": "2ef3-70"
118
+ "uid": "45db-71"
119
+ }
120
+ ],
121
+ "isExternal": true
122
+ },
123
+ "45db-75": {
124
+ "id": "react-lazy-with-preload/lib/index",
125
+ "moduleParts": {},
126
+ "imported": [],
127
+ "importedBy": [
128
+ {
129
+ "uid": "45db-71"
116
130
  }
117
131
  ],
118
132
  "isExternal": true
@@ -11,11 +11,18 @@
11
11
  import * as React from 'react';
12
12
  import { AnyRouteConfig, RouteConfig, AnyAllRouteInfo, AllRouteInfo, RouterState, RouteMatch, ToOptions, MatchRouteOptions, RouteInfoByPath, ResolveRelativePath, NoInfer, DefaultAllRouteInfo, AnyRouteInfo, RouteInfo, CheckId, ToIdOption, ValidFromPath, LinkOptions, RouterOptions, Router } from '@tanstack/router-core';
13
13
  export * from '@tanstack/router-core';
14
+ export { lazyWithPreload as lazy } from 'react-lazy-with-preload/lib/index';
15
+ export { PreloadableComponent as LazyComponent } from 'react-lazy-with-preload';
14
16
 
17
+ declare type SyncRouteComponent = (props?: {}) => React.ReactNode;
18
+ declare type RouteComponent = SyncRouteComponent & {
19
+ preload?: () => Promise<{
20
+ default: SyncRouteComponent;
21
+ }>;
22
+ };
15
23
  declare module '@tanstack/router-core' {
16
24
  interface FrameworkGenerics {
17
- Element: React.ReactNode;
18
- SyncOrAsyncElement: React.ReactNode | (() => Promise<any>);
25
+ Component: RouteComponent;
19
26
  }
20
27
  interface Router<TRouteConfig extends AnyRouteConfig = RouteConfig, TAllRouteInfo extends AnyAllRouteInfo = AllRouteInfo<TRouteConfig>> {
21
28
  useState: () => RouterState;
@@ -77,4 +84,4 @@ declare function DefaultErrorBoundary({ error }: {
77
84
  declare function usePrompt(message: string, when: boolean | any): void;
78
85
  declare function Prompt({ message, when, children }: PromptProps): React.ReactNode;
79
86
 
80
- export { DefaultErrorBoundary, MatchesProvider, MatchesProviderProps, Outlet, Prompt, PromptProps, RouterProps, RouterProvider, createReactRouter, useMatches, usePrompt, useRouter };
87
+ export { DefaultErrorBoundary, MatchesProvider, MatchesProviderProps, Outlet, Prompt, PromptProps, RouteComponent, RouterProps, RouterProvider, createReactRouter, useMatches, usePrompt, useRouter };