@tanstack/router-core 0.0.1-alpha.0
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/cjs/_virtual/_rollupPluginBabelHelpers.js +33 -0
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
- package/build/cjs/packages/location-core/src/index.js +1313 -0
- package/build/cjs/packages/location-core/src/index.js.map +1 -0
- package/build/cjs/packages/location-core/src/qss.js +70 -0
- package/build/cjs/packages/location-core/src/qss.js.map +1 -0
- package/build/cjs/packages/router-core/src/createRoutes.js +106 -0
- package/build/cjs/packages/router-core/src/createRoutes.js.map +1 -0
- package/build/cjs/packages/router-core/src/createRoutes.test.js +160 -0
- package/build/cjs/packages/router-core/src/createRoutes.test.js.map +1 -0
- package/build/cjs/packages/router-core/src/index.js +1444 -0
- package/build/cjs/packages/router-core/src/index.js.map +1 -0
- package/build/cjs/packages/router-core/src/qss.js +70 -0
- package/build/cjs/packages/router-core/src/qss.js.map +1 -0
- package/build/esm/index.js +2297 -0
- package/build/esm/index.js.map +1 -0
- package/build/stats-html.html +4034 -0
- package/build/stats-react.json +157 -0
- package/build/types/createRoutes.d.ts +10 -0
- package/build/types/createRoutes.test.d.ts +1 -0
- package/build/types/index.d.ts +517 -0
- package/build/types/qss.d.ts +2 -0
- package/build/types/react-router/src/createRoutes.test.d.ts +0 -0
- package/build/types/react-router/src/index.d.ts +59 -0
- package/build/types/router-core/src/createRoutes.test.d.ts +1 -0
- package/build/types/router-core/src/index.d.ts +504 -0
- package/build/types/router-core/src/qss.d.ts +2 -0
- package/build/umd/index.development.js +2322 -0
- package/build/umd/index.development.js.map +1 -0
- package/build/umd/index.production.js +12 -0
- package/build/umd/index.production.js.map +1 -0
- package/package.json +48 -0
- package/src/createRoutes.test.ts +318 -0
- package/src/index.ts +2974 -0
- package/src/package.json +48 -0
- package/src/qss.ts +53 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"tree": {
|
|
4
|
+
"name": "root",
|
|
5
|
+
"children": [
|
|
6
|
+
{
|
|
7
|
+
"name": "index.production.js",
|
|
8
|
+
"children": [
|
|
9
|
+
{
|
|
10
|
+
"uid": "9dec-11",
|
|
11
|
+
"name": "\u0000rollupPluginBabelHelpers.js"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "node_modules",
|
|
15
|
+
"children": [
|
|
16
|
+
{
|
|
17
|
+
"name": "@babel/runtime/helpers/esm/extends.js",
|
|
18
|
+
"uid": "9dec-13"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "history/index.js",
|
|
22
|
+
"uid": "9dec-15"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "packages/router-core/src",
|
|
28
|
+
"children": [
|
|
29
|
+
{
|
|
30
|
+
"uid": "9dec-17",
|
|
31
|
+
"name": "qss.ts"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"uid": "9dec-19",
|
|
35
|
+
"name": "index.ts"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"isRoot": true
|
|
43
|
+
},
|
|
44
|
+
"nodeParts": {
|
|
45
|
+
"9dec-11": {
|
|
46
|
+
"renderedLength": 437,
|
|
47
|
+
"gzipLength": 243,
|
|
48
|
+
"brotliLength": 0,
|
|
49
|
+
"mainUid": "9dec-10"
|
|
50
|
+
},
|
|
51
|
+
"9dec-13": {
|
|
52
|
+
"renderedLength": 431,
|
|
53
|
+
"gzipLength": 240,
|
|
54
|
+
"brotliLength": 0,
|
|
55
|
+
"mainUid": "9dec-12"
|
|
56
|
+
},
|
|
57
|
+
"9dec-15": {
|
|
58
|
+
"renderedLength": 20618,
|
|
59
|
+
"gzipLength": 3797,
|
|
60
|
+
"brotliLength": 0,
|
|
61
|
+
"mainUid": "9dec-14"
|
|
62
|
+
},
|
|
63
|
+
"9dec-17": {
|
|
64
|
+
"renderedLength": 1241,
|
|
65
|
+
"gzipLength": 523,
|
|
66
|
+
"brotliLength": 0,
|
|
67
|
+
"mainUid": "9dec-16"
|
|
68
|
+
},
|
|
69
|
+
"9dec-19": {
|
|
70
|
+
"renderedLength": 45660,
|
|
71
|
+
"gzipLength": 10084,
|
|
72
|
+
"brotliLength": 0,
|
|
73
|
+
"mainUid": "9dec-18"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"nodeMetas": {
|
|
77
|
+
"9dec-10": {
|
|
78
|
+
"id": "\u0000rollupPluginBabelHelpers.js",
|
|
79
|
+
"moduleParts": {
|
|
80
|
+
"index.production.js": "9dec-11"
|
|
81
|
+
},
|
|
82
|
+
"imported": [],
|
|
83
|
+
"importedBy": [
|
|
84
|
+
{
|
|
85
|
+
"uid": "9dec-18"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"9dec-12": {
|
|
90
|
+
"id": "/node_modules/@babel/runtime/helpers/esm/extends.js",
|
|
91
|
+
"moduleParts": {
|
|
92
|
+
"index.production.js": "9dec-13"
|
|
93
|
+
},
|
|
94
|
+
"imported": [],
|
|
95
|
+
"importedBy": [
|
|
96
|
+
{
|
|
97
|
+
"uid": "9dec-14"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
"9dec-14": {
|
|
102
|
+
"id": "/node_modules/history/index.js",
|
|
103
|
+
"moduleParts": {
|
|
104
|
+
"index.production.js": "9dec-15"
|
|
105
|
+
},
|
|
106
|
+
"imported": [
|
|
107
|
+
{
|
|
108
|
+
"uid": "9dec-12"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"importedBy": [
|
|
112
|
+
{
|
|
113
|
+
"uid": "9dec-18"
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
"9dec-16": {
|
|
118
|
+
"id": "/packages/router-core/src/qss.ts",
|
|
119
|
+
"moduleParts": {
|
|
120
|
+
"index.production.js": "9dec-17"
|
|
121
|
+
},
|
|
122
|
+
"imported": [],
|
|
123
|
+
"importedBy": [
|
|
124
|
+
{
|
|
125
|
+
"uid": "9dec-18"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"9dec-18": {
|
|
130
|
+
"id": "/packages/router-core/src/index.ts",
|
|
131
|
+
"moduleParts": {
|
|
132
|
+
"index.production.js": "9dec-19"
|
|
133
|
+
},
|
|
134
|
+
"imported": [
|
|
135
|
+
{
|
|
136
|
+
"uid": "9dec-10"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"uid": "9dec-14"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"uid": "9dec-16"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"importedBy": [],
|
|
146
|
+
"isEntry": true
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"env": {
|
|
150
|
+
"rollup": "2.77.2"
|
|
151
|
+
},
|
|
152
|
+
"options": {
|
|
153
|
+
"gzip": true,
|
|
154
|
+
"brotli": false,
|
|
155
|
+
"sourcemap": false
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Route } from '.';
|
|
2
|
+
export declare function createRoutes<TRoutes extends Route[]>(routes: Narrow<TRoutes>): Try<TRoutes, [], NarrowRaw<TRoutes>>;
|
|
3
|
+
declare type Narrow<T> = Try<T, [], NarrowRaw<T>>;
|
|
4
|
+
declare type Try<A, B, C> = A extends B ? A : C;
|
|
5
|
+
declare type NarrowRaw<T> = (T extends [] ? [] : never) | (T extends string | number | bigint | boolean ? T : never) | {
|
|
6
|
+
[K in keyof T]: T[K] extends Function ? T[K] : NarrowRaw<T[K]>;
|
|
7
|
+
};
|
|
8
|
+
declare type TrimPath<T extends string> = '' extends T ? '' : T extends `/${infer U}` ? TrimPath<U> : T extends `${infer U}/` ? TrimPath<U> : T;
|
|
9
|
+
export declare type ParsePathParam<T, N = never> = T extends string ? TrimPath<T> extends `:${infer U}` ? U : N : never;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|