@kitbag/router 0.20.11 → 0.21.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/README.md +29 -87
- package/dist/components/routerLink.d.ts +3 -3
- package/dist/errors/contextAbortError.d.ts +2 -2
- package/dist/errors/contextPushError.d.ts +2 -2
- package/dist/errors/contextRejectionError.d.ts +2 -2
- package/dist/keys.d.ts +1 -3
- package/dist/kitbag-router.js +1780 -1847
- package/dist/kitbag-router.umd.cjs +3 -3
- package/dist/main.d.ts +0 -16
- package/dist/models/hooks.d.ts +10 -0
- package/dist/services/createComponentHooks.d.ts +7 -7
- package/dist/services/createExternalRoute.d.ts +3 -2
- package/dist/services/createHooksFactory.d.ts +15 -0
- package/dist/services/createPropStore.d.ts +2 -2
- package/dist/services/createRoute.d.ts +2 -1
- package/dist/services/createRouterAssets.d.ts +5 -5
- package/dist/services/createRouterCallbackContext.d.ts +8 -6
- package/dist/services/createRouterHooks.d.ts +14 -14
- package/dist/services/createRouterPlugin.d.ts +2 -2
- package/dist/services/createUrlParts.d.ts +13 -0
- package/dist/services/getGlobalHooksForRouter.d.ts +2 -3
- package/dist/services/getGlobalRouteHooks.d.ts +3 -3
- package/dist/services/getRouteHooks.d.ts +3 -3
- package/dist/services/hooks.d.ts +2 -2
- package/dist/services/urlCombine.d.ts +2 -1
- package/dist/services/urlCreator.d.ts +2 -1
- package/dist/services/urlParser.d.ts +1 -1
- package/dist/types/callbackContext.d.ts +15 -0
- package/dist/types/createRouteOptions.d.ts +6 -13
- package/dist/types/hooks.d.ts +56 -136
- package/dist/types/params.d.ts +11 -5
- package/dist/types/props.d.ts +8 -8
- package/dist/types/register.d.ts +1 -41
- package/dist/types/rejection.d.ts +6 -2
- package/dist/types/resolved.d.ts +2 -2
- package/dist/types/route.d.ts +5 -4
- package/dist/types/routeContext.d.ts +11 -5
- package/dist/types/router.d.ts +11 -11
- package/dist/types/routerAbort.d.ts +1 -0
- package/dist/types/routerPlugin.d.ts +17 -41
- package/dist/types/routerReject.d.ts +2 -2
- package/dist/types/url.d.ts +0 -9
- package/dist/types/urlParts.d.ts +53 -0
- package/dist/utilities/makeOptional.d.ts +1 -0
- package/dist/utilities/testHelpers.d.ts +279 -11
- package/package.json +4 -2
- package/dist/models/RouteHooks.d.ts +0 -12
- package/dist/models/RouterRouteHooks.d.ts +0 -10
- package/dist/services/createCallbackContext.d.ts +0 -44
- package/dist/services/createRouteHooks.d.ts +0 -15
- package/dist/services/getRouteHooksDeprecated.d.ts +0 -10
package/dist/types/router.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { App, InjectionKey, Ref } from 'vue';
|
|
2
2
|
import { RouterHistoryMode } from '../services/createRouterHistory';
|
|
3
3
|
import { RouterRoute } from './routerRoute';
|
|
4
|
-
import {
|
|
4
|
+
import { AddAfterHook, AddBeforeHook, AddErrorHook } from './hooks';
|
|
5
5
|
import { PrefetchConfig } from './prefetch';
|
|
6
6
|
import { ResolvedRoute } from './resolved';
|
|
7
7
|
import { Route, Routes } from './route';
|
|
@@ -12,11 +12,11 @@ import { RouterReject } from './routerReject';
|
|
|
12
12
|
import { RouterPlugin } from './routerPlugin';
|
|
13
13
|
import { RoutesName } from './routesMap';
|
|
14
14
|
import { ToRouteContext } from './routeContext';
|
|
15
|
-
import { ExtractRejections,
|
|
15
|
+
import { ExtractRejections, Rejections } from './rejection';
|
|
16
16
|
/**
|
|
17
17
|
* Options to initialize a {@link Router} instance.
|
|
18
18
|
*/
|
|
19
|
-
export type RouterOptions =
|
|
19
|
+
export type RouterOptions = {
|
|
20
20
|
/**
|
|
21
21
|
* Initial URL for the router to use. Required if using Node environment. Defaults to window.location when using browser.
|
|
22
22
|
*
|
|
@@ -41,7 +41,7 @@ export type RouterOptions = WithHooks & {
|
|
|
41
41
|
/**
|
|
42
42
|
* Components assigned to each type of rejection your router supports.
|
|
43
43
|
*/
|
|
44
|
-
rejections?:
|
|
44
|
+
rejections?: Rejections;
|
|
45
45
|
/**
|
|
46
46
|
* When false, createRouterAssets must be used for component and hooks. Assets exported by the library
|
|
47
47
|
* will not work with the created router instance.
|
|
@@ -99,32 +99,32 @@ export type Router<TRoutes extends Routes = any, TOptions extends RouterOptions
|
|
|
99
99
|
/**
|
|
100
100
|
* Registers a hook to be called before a route is entered.
|
|
101
101
|
*/
|
|
102
|
-
onBeforeRouteEnter:
|
|
102
|
+
onBeforeRouteEnter: AddBeforeHook<TRoutes[number] | TPlugin['routes'][number], TRoutes | TPlugin['routes'], ToRouteContext<TOptions['rejections']> | ToRouteContext<TPlugin['rejections']>>;
|
|
103
103
|
/**
|
|
104
104
|
* Registers a hook to be called before a route is left.
|
|
105
105
|
*/
|
|
106
|
-
onBeforeRouteLeave:
|
|
106
|
+
onBeforeRouteLeave: AddBeforeHook<TRoutes[number] | TPlugin['routes'][number], TRoutes | TPlugin['routes'], ToRouteContext<TOptions['rejections']> | ToRouteContext<TPlugin['rejections']>>;
|
|
107
107
|
/**
|
|
108
108
|
* Registers a hook to be called before a route is updated.
|
|
109
109
|
*/
|
|
110
|
-
onBeforeRouteUpdate:
|
|
110
|
+
onBeforeRouteUpdate: AddBeforeHook<TRoutes[number] | TPlugin['routes'][number], TRoutes | TPlugin['routes'], ToRouteContext<TOptions['rejections']> | ToRouteContext<TPlugin['rejections']>>;
|
|
111
111
|
/**
|
|
112
112
|
* Registers a hook to be called after a route is entered.
|
|
113
113
|
*/
|
|
114
|
-
onAfterRouteEnter:
|
|
114
|
+
onAfterRouteEnter: AddAfterHook<TRoutes[number] | TPlugin['routes'][number], TRoutes | TPlugin['routes'], ToRouteContext<TOptions['rejections']> | ToRouteContext<TPlugin['rejections']>>;
|
|
115
115
|
/**
|
|
116
116
|
* Registers a hook to be called after a route is left.
|
|
117
117
|
*/
|
|
118
|
-
onAfterRouteLeave:
|
|
118
|
+
onAfterRouteLeave: AddAfterHook<TRoutes[number] | TPlugin['routes'][number], TRoutes | TPlugin['routes'], ToRouteContext<TOptions['rejections']> | ToRouteContext<TPlugin['rejections']>>;
|
|
119
119
|
/**
|
|
120
120
|
* Registers a hook to be called after a route is updated.
|
|
121
121
|
*/
|
|
122
|
-
onAfterRouteUpdate:
|
|
122
|
+
onAfterRouteUpdate: AddAfterHook<TRoutes[number] | TPlugin['routes'][number], TRoutes | TPlugin['routes'], ToRouteContext<TOptions['rejections']> | ToRouteContext<TPlugin['rejections']>>;
|
|
123
123
|
/**
|
|
124
124
|
* Registers a hook to be called when an error occurs.
|
|
125
125
|
* If the hook returns true, the error is considered handled and the other hooks are not run. If all hooks return false the error is rethrown
|
|
126
126
|
*/
|
|
127
|
-
onError:
|
|
127
|
+
onError: AddErrorHook<TRoutes[number] | TPlugin['routes'][number], TRoutes | TPlugin['routes'], ToRouteContext<TOptions['rejections']> | ToRouteContext<TPlugin['rejections']>>;
|
|
128
128
|
/**
|
|
129
129
|
* Given a URL, returns true if host does not match host stored on router instance
|
|
130
130
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type RouterAbort = () => void;
|
|
@@ -1,43 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HookRemove } from './hooks';
|
|
2
2
|
import { Routes } from './route';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { RouterRouteHooks } from '../models/RouterRouteHooks';
|
|
3
|
+
import { Rejections } from './rejection';
|
|
4
|
+
import { Hooks } from '../models/hooks';
|
|
6
5
|
import { ResolvedRoute } from './resolved';
|
|
7
6
|
import { RouterReject } from './routerReject';
|
|
8
7
|
import { RouterPush } from './routerPush';
|
|
9
8
|
import { RouterReplace } from './routerReplace';
|
|
10
9
|
import { CallbackContextAbort } from '../services/createRouterCallbackContext';
|
|
10
|
+
import { MaybePromise } from './utilities';
|
|
11
11
|
export type EmptyRouterPlugin = RouterPlugin<[], []>;
|
|
12
|
-
export type CreateRouterPluginOptions<TRoutes extends Routes = Routes, TRejections extends
|
|
12
|
+
export type CreateRouterPluginOptions<TRoutes extends Routes = Routes, TRejections extends Rejections = Rejections> = {
|
|
13
13
|
routes?: TRoutes;
|
|
14
14
|
rejections?: TRejections;
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated use plugin.onBeforeRouteEnter instead
|
|
17
|
-
*/
|
|
18
|
-
onBeforeRouteEnter?: MaybeArray<BeforeRouteHook>;
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated use plugin.onAfterRouteEnter instead
|
|
21
|
-
*/
|
|
22
|
-
onAfterRouteEnter?: MaybeArray<AfterRouteHook>;
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated use plugin.onBeforeRouteUpdate instead
|
|
25
|
-
*/
|
|
26
|
-
onBeforeRouteUpdate?: MaybeArray<BeforeRouteHook>;
|
|
27
|
-
/**
|
|
28
|
-
* @deprecated use plugin.onAfterRouteUpdate instead
|
|
29
|
-
*/
|
|
30
|
-
onAfterRouteUpdate?: MaybeArray<AfterRouteHook>;
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated use plugin.onBeforeRouteLeave instead
|
|
33
|
-
*/
|
|
34
|
-
onBeforeRouteLeave?: MaybeArray<BeforeRouteHook>;
|
|
35
|
-
/**
|
|
36
|
-
* @deprecated use plugin.onAfterRouteLeave instead
|
|
37
|
-
*/
|
|
38
|
-
onAfterRouteLeave?: MaybeArray<AfterRouteHook>;
|
|
39
15
|
};
|
|
40
|
-
export type RouterPlugin<TRoutes extends Routes = Routes, TRejections extends
|
|
16
|
+
export type RouterPlugin<TRoutes extends Routes = Routes, TRejections extends Rejections = Rejections> = {
|
|
41
17
|
/**
|
|
42
18
|
* The routes supplied by the plugin.
|
|
43
19
|
* @internal
|
|
@@ -52,26 +28,26 @@ export type RouterPlugin<TRoutes extends Routes = Routes, TRejections extends Re
|
|
|
52
28
|
* The hooks supplied by the plugin.
|
|
53
29
|
* @internal
|
|
54
30
|
*/
|
|
55
|
-
hooks:
|
|
31
|
+
hooks: Hooks;
|
|
56
32
|
};
|
|
57
|
-
type PluginBeforeRouteHookContext<TRoutes extends Routes, TRejections extends
|
|
33
|
+
type PluginBeforeRouteHookContext<TRoutes extends Routes, TRejections extends Rejections> = {
|
|
58
34
|
from: ResolvedRoute | null;
|
|
59
35
|
reject: RouterReject<TRejections>;
|
|
60
36
|
push: RouterPush<TRoutes>;
|
|
61
37
|
replace: RouterReplace<TRoutes>;
|
|
62
38
|
abort: CallbackContextAbort;
|
|
63
39
|
};
|
|
64
|
-
type PluginAfterRouteHookContext<TRoutes extends Routes, TRejections extends
|
|
40
|
+
type PluginAfterRouteHookContext<TRoutes extends Routes, TRejections extends Rejections> = {
|
|
65
41
|
from: ResolvedRoute | null;
|
|
66
42
|
reject: RouterReject<TRejections>;
|
|
67
43
|
push: RouterPush<TRoutes>;
|
|
68
44
|
replace: RouterReplace<TRoutes>;
|
|
69
45
|
};
|
|
70
|
-
export type PluginBeforeRouteHook<TRoutes extends Routes = Routes, TRejections extends
|
|
71
|
-
export type PluginAfterRouteHook<TRoutes extends Routes = Routes, TRejections extends
|
|
72
|
-
type AddPluginBeforeRouteHook<TRoutes extends Routes, TRejections extends
|
|
73
|
-
type AddPluginAfterRouteHook<TRoutes extends Routes, TRejections extends
|
|
74
|
-
export type PluginErrorHookContext<TRoutes extends Routes = Routes, TRejections extends
|
|
46
|
+
export type PluginBeforeRouteHook<TRoutes extends Routes = Routes, TRejections extends Rejections = Rejections> = (to: ResolvedRoute, context: PluginBeforeRouteHookContext<TRoutes, TRejections>) => MaybePromise<void>;
|
|
47
|
+
export type PluginAfterRouteHook<TRoutes extends Routes = Routes, TRejections extends Rejections = Rejections> = (to: ResolvedRoute, context: PluginAfterRouteHookContext<TRoutes, TRejections>) => MaybePromise<void>;
|
|
48
|
+
type AddPluginBeforeRouteHook<TRoutes extends Routes, TRejections extends Rejections> = (hook: PluginBeforeRouteHook<TRoutes, TRejections>) => HookRemove;
|
|
49
|
+
type AddPluginAfterRouteHook<TRoutes extends Routes, TRejections extends Rejections> = (hook: PluginAfterRouteHook<TRoutes, TRejections>) => HookRemove;
|
|
50
|
+
export type PluginErrorHookContext<TRoutes extends Routes = Routes, TRejections extends Rejections = Rejections> = {
|
|
75
51
|
to: ResolvedRoute;
|
|
76
52
|
from: ResolvedRoute | null;
|
|
77
53
|
source: 'props' | 'hook' | 'component';
|
|
@@ -79,9 +55,9 @@ export type PluginErrorHookContext<TRoutes extends Routes = Routes, TRejections
|
|
|
79
55
|
push: RouterPush<TRoutes>;
|
|
80
56
|
replace: RouterReplace<TRoutes>;
|
|
81
57
|
};
|
|
82
|
-
export type PluginErrorHook<TRoutes extends Routes = Routes, TRejections extends
|
|
83
|
-
export type AddPluginErrorHook<TRoutes extends Routes = Routes, TRejections extends
|
|
84
|
-
export type PluginRouteHooks<TRoutes extends Routes = Routes, TRejections extends
|
|
58
|
+
export type PluginErrorHook<TRoutes extends Routes = Routes, TRejections extends Rejections = Rejections> = (error: unknown, context: PluginErrorHookContext<TRoutes, TRejections>) => void;
|
|
59
|
+
export type AddPluginErrorHook<TRoutes extends Routes = Routes, TRejections extends Rejections = Rejections> = (hook: PluginErrorHook<TRoutes, TRejections>) => HookRemove;
|
|
60
|
+
export type PluginRouteHooks<TRoutes extends Routes = Routes, TRejections extends Rejections = Rejections> = {
|
|
85
61
|
/**
|
|
86
62
|
* Registers a global hook to be called before a route is entered.
|
|
87
63
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BuiltInRejectionType } from '../services/createRouterReject';
|
|
2
|
-
import {
|
|
3
|
-
export type RouterReject<TRejections extends
|
|
2
|
+
import { Rejections, RejectionType } from './rejection';
|
|
3
|
+
export type RouterReject<TRejections extends Rejections | undefined> = <TSource extends (RejectionType<TRejections> | BuiltInRejectionType)>(type: TSource) => void;
|
package/dist/types/url.d.ts
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import { QuerySource } from './querySource';
|
|
2
1
|
export type Url = `http://${string}` | `https://${string}` | `/${string}`;
|
|
3
|
-
export type UrlParts = {
|
|
4
|
-
protocol?: string;
|
|
5
|
-
host?: string;
|
|
6
|
-
pathname: string;
|
|
7
|
-
searchParams: QuerySource;
|
|
8
|
-
search: string;
|
|
9
|
-
hash: string;
|
|
10
|
-
};
|
|
11
2
|
/**
|
|
12
3
|
* A type guard for determining if a value is a valid URL.
|
|
13
4
|
* @param value - The value to check.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { WithParams } from '../services/withParams';
|
|
2
|
+
import { ExtractRouteParamTypesWriting } from './params';
|
|
3
|
+
/**
|
|
4
|
+
* Represents the structure of a url parts. Can be used to create a url with support for params.
|
|
5
|
+
*/
|
|
6
|
+
export type UrlParts<TProtocol extends WithParams = WithParams, THost extends WithParams = WithParams, TPort extends WithParams = WithParams, TPath extends WithParams = WithParams, TQuery extends WithParams = WithParams, THash extends WithParams = WithParams> = {
|
|
7
|
+
/**
|
|
8
|
+
* Represents the protocol for this route. Used for external routes.
|
|
9
|
+
*/
|
|
10
|
+
protocol: TProtocol;
|
|
11
|
+
/**
|
|
12
|
+
* Represents the host for this route. Used for external routes.
|
|
13
|
+
*/
|
|
14
|
+
host: THost;
|
|
15
|
+
/**
|
|
16
|
+
* Represents the port for this route. Used for external routes.
|
|
17
|
+
*/
|
|
18
|
+
port: TPort;
|
|
19
|
+
/**
|
|
20
|
+
* Represents the structured path of the route, including path params.
|
|
21
|
+
*/
|
|
22
|
+
pathname: TPath;
|
|
23
|
+
/**
|
|
24
|
+
* Represents the structured query of the route, including query params.
|
|
25
|
+
*/
|
|
26
|
+
search: TQuery;
|
|
27
|
+
/**
|
|
28
|
+
* Represents the hash of the route.
|
|
29
|
+
*/
|
|
30
|
+
hash: THash;
|
|
31
|
+
/**
|
|
32
|
+
* Converts the url parts to a full url.
|
|
33
|
+
*/
|
|
34
|
+
assemble: (params: ExtractRouteParamTypesWriting<{
|
|
35
|
+
protocol: TProtocol;
|
|
36
|
+
host: THost;
|
|
37
|
+
port: TPort;
|
|
38
|
+
pathname: TPath;
|
|
39
|
+
search: TQuery;
|
|
40
|
+
hash: THash;
|
|
41
|
+
}>) => string;
|
|
42
|
+
/**
|
|
43
|
+
* Converts the url parts to a full url.
|
|
44
|
+
*/
|
|
45
|
+
href: (params: ExtractRouteParamTypesWriting<{
|
|
46
|
+
protocol: TProtocol;
|
|
47
|
+
host: THost;
|
|
48
|
+
port: TPort;
|
|
49
|
+
pathname: TPath;
|
|
50
|
+
search: TQuery;
|
|
51
|
+
hash: THash;
|
|
52
|
+
}>) => string;
|
|
53
|
+
};
|
|
@@ -15,7 +15,14 @@ export declare const routes: readonly [import('../main').Route<"parentA", import
|
|
|
15
15
|
id: string;
|
|
16
16
|
props: undefined;
|
|
17
17
|
meta: Readonly<{}>;
|
|
18
|
-
}], []> & import('../main').InternalRouteHooks<
|
|
18
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
19
|
+
readonly name: "parentA";
|
|
20
|
+
readonly path: "/parentA/[paramA]";
|
|
21
|
+
}, "meta" | "props"> & {
|
|
22
|
+
id: string;
|
|
23
|
+
props: undefined;
|
|
24
|
+
meta: Readonly<{}>;
|
|
25
|
+
}], []>, []>, import('../main').Route<"parentA.childA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]/childA/[?paramB]", {
|
|
19
26
|
paramA: StringConstructor;
|
|
20
27
|
} & {
|
|
21
28
|
paramB: StringConstructor;
|
|
@@ -34,14 +41,90 @@ export declare const routes: readonly [import('../main').Route<"parentA", import
|
|
|
34
41
|
id: string;
|
|
35
42
|
props: undefined;
|
|
36
43
|
meta: Readonly<{}>;
|
|
37
|
-
}], []> & import('../main').InternalRouteHooks<
|
|
44
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
45
|
+
readonly name: "parentA";
|
|
46
|
+
readonly path: "/parentA/[paramA]";
|
|
47
|
+
}, "meta" | "props"> & {
|
|
48
|
+
id: string;
|
|
49
|
+
props: undefined;
|
|
50
|
+
meta: Readonly<{}>;
|
|
51
|
+
}], []>, []>;
|
|
38
52
|
readonly name: "parentA.childA";
|
|
39
53
|
readonly path: "/childA/[?paramB]";
|
|
40
54
|
}, "meta" | "props"> & {
|
|
41
55
|
id: string;
|
|
42
56
|
props: undefined;
|
|
43
57
|
meta: Readonly<{}>;
|
|
44
|
-
}], []> & import('../main').InternalRouteHooks<
|
|
58
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA.childA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]/childA/[?paramB]", {
|
|
59
|
+
paramA: StringConstructor;
|
|
60
|
+
} & {
|
|
61
|
+
paramB: StringConstructor;
|
|
62
|
+
}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
63
|
+
readonly name: "parentA";
|
|
64
|
+
readonly path: "/parentA/[paramA]";
|
|
65
|
+
}, "meta" | "props"> & {
|
|
66
|
+
id: string;
|
|
67
|
+
props: undefined;
|
|
68
|
+
meta: Readonly<{}>;
|
|
69
|
+
}, Omit<{
|
|
70
|
+
readonly parent: import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
71
|
+
readonly name: "parentA";
|
|
72
|
+
readonly path: "/parentA/[paramA]";
|
|
73
|
+
}, "meta" | "props"> & {
|
|
74
|
+
id: string;
|
|
75
|
+
props: undefined;
|
|
76
|
+
meta: Readonly<{}>;
|
|
77
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
78
|
+
readonly name: "parentA";
|
|
79
|
+
readonly path: "/parentA/[paramA]";
|
|
80
|
+
}, "meta" | "props"> & {
|
|
81
|
+
id: string;
|
|
82
|
+
props: undefined;
|
|
83
|
+
meta: Readonly<{}>;
|
|
84
|
+
}], []>, []>;
|
|
85
|
+
readonly name: "parentA.childA";
|
|
86
|
+
readonly path: "/childA/[?paramB]";
|
|
87
|
+
}, "meta" | "props"> & {
|
|
88
|
+
id: string;
|
|
89
|
+
props: undefined;
|
|
90
|
+
meta: Readonly<{}>;
|
|
91
|
+
}], []>, []>, import('../main').Route<"parentA.childB", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]/childB/[paramD]", {
|
|
92
|
+
paramA: StringConstructor;
|
|
93
|
+
} & {
|
|
94
|
+
paramD: StringConstructor;
|
|
95
|
+
}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
96
|
+
readonly name: "parentA";
|
|
97
|
+
readonly path: "/parentA/[paramA]";
|
|
98
|
+
}, "meta" | "props"> & {
|
|
99
|
+
id: string;
|
|
100
|
+
props: undefined;
|
|
101
|
+
meta: Readonly<{}>;
|
|
102
|
+
}, Omit<{
|
|
103
|
+
readonly parent: import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
104
|
+
readonly name: "parentA";
|
|
105
|
+
readonly path: "/parentA/[paramA]";
|
|
106
|
+
}, "meta" | "props"> & {
|
|
107
|
+
id: string;
|
|
108
|
+
props: undefined;
|
|
109
|
+
meta: Readonly<{}>;
|
|
110
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
111
|
+
readonly name: "parentA";
|
|
112
|
+
readonly path: "/parentA/[paramA]";
|
|
113
|
+
}, "meta" | "props"> & {
|
|
114
|
+
id: string;
|
|
115
|
+
props: undefined;
|
|
116
|
+
meta: Readonly<{}>;
|
|
117
|
+
}], []>, []>;
|
|
118
|
+
readonly name: "parentA.childB";
|
|
119
|
+
readonly path: "/childB/[paramD]";
|
|
120
|
+
readonly component: {
|
|
121
|
+
template: string;
|
|
122
|
+
};
|
|
123
|
+
}, "meta" | "props"> & {
|
|
124
|
+
id: string;
|
|
125
|
+
props: undefined;
|
|
126
|
+
meta: Readonly<{}>;
|
|
127
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA.childB", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]/childB/[paramD]", {
|
|
45
128
|
paramA: StringConstructor;
|
|
46
129
|
} & {
|
|
47
130
|
paramD: StringConstructor;
|
|
@@ -60,7 +143,14 @@ export declare const routes: readonly [import('../main').Route<"parentA", import
|
|
|
60
143
|
id: string;
|
|
61
144
|
props: undefined;
|
|
62
145
|
meta: Readonly<{}>;
|
|
63
|
-
}], []> & import('../main').InternalRouteHooks<
|
|
146
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
147
|
+
readonly name: "parentA";
|
|
148
|
+
readonly path: "/parentA/[paramA]";
|
|
149
|
+
}, "meta" | "props"> & {
|
|
150
|
+
id: string;
|
|
151
|
+
props: undefined;
|
|
152
|
+
meta: Readonly<{}>;
|
|
153
|
+
}], []>, []>;
|
|
64
154
|
readonly name: "parentA.childB";
|
|
65
155
|
readonly path: "/childB/[paramD]";
|
|
66
156
|
readonly component: {
|
|
@@ -70,7 +160,7 @@ export declare const routes: readonly [import('../main').Route<"parentA", import
|
|
|
70
160
|
id: string;
|
|
71
161
|
props: undefined;
|
|
72
162
|
meta: Readonly<{}>;
|
|
73
|
-
}], []
|
|
163
|
+
}], []>, []>, import('../main').Route<"parentA.childA.grandChildA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]/childA/[?paramB]/[paramC]", {
|
|
74
164
|
paramA: StringConstructor;
|
|
75
165
|
paramB: StringConstructor;
|
|
76
166
|
} & {
|
|
@@ -90,7 +180,14 @@ export declare const routes: readonly [import('../main').Route<"parentA", import
|
|
|
90
180
|
id: string;
|
|
91
181
|
props: undefined;
|
|
92
182
|
meta: Readonly<{}>;
|
|
93
|
-
}], []> & import('../main').InternalRouteHooks<
|
|
183
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
184
|
+
readonly name: "parentA";
|
|
185
|
+
readonly path: "/parentA/[paramA]";
|
|
186
|
+
}, "meta" | "props"> & {
|
|
187
|
+
id: string;
|
|
188
|
+
props: undefined;
|
|
189
|
+
meta: Readonly<{}>;
|
|
190
|
+
}], []>, []>;
|
|
94
191
|
readonly name: "parentA.childA";
|
|
95
192
|
readonly path: "/childA/[?paramB]";
|
|
96
193
|
}, "meta" | "props"> & {
|
|
@@ -117,14 +214,54 @@ export declare const routes: readonly [import('../main').Route<"parentA", import
|
|
|
117
214
|
id: string;
|
|
118
215
|
props: undefined;
|
|
119
216
|
meta: Readonly<{}>;
|
|
120
|
-
}], []> & import('../main').InternalRouteHooks<
|
|
217
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
218
|
+
readonly name: "parentA";
|
|
219
|
+
readonly path: "/parentA/[paramA]";
|
|
220
|
+
}, "meta" | "props"> & {
|
|
221
|
+
id: string;
|
|
222
|
+
props: undefined;
|
|
223
|
+
meta: Readonly<{}>;
|
|
224
|
+
}], []>, []>;
|
|
121
225
|
readonly name: "parentA.childA";
|
|
122
226
|
readonly path: "/childA/[?paramB]";
|
|
123
227
|
}, "meta" | "props"> & {
|
|
124
228
|
id: string;
|
|
125
229
|
props: undefined;
|
|
126
230
|
meta: Readonly<{}>;
|
|
127
|
-
}], []> & import('../main').InternalRouteHooks<
|
|
231
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA.childA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]/childA/[?paramB]", {
|
|
232
|
+
paramA: StringConstructor;
|
|
233
|
+
} & {
|
|
234
|
+
paramB: StringConstructor;
|
|
235
|
+
}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
236
|
+
readonly name: "parentA";
|
|
237
|
+
readonly path: "/parentA/[paramA]";
|
|
238
|
+
}, "meta" | "props"> & {
|
|
239
|
+
id: string;
|
|
240
|
+
props: undefined;
|
|
241
|
+
meta: Readonly<{}>;
|
|
242
|
+
}, Omit<{
|
|
243
|
+
readonly parent: import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
244
|
+
readonly name: "parentA";
|
|
245
|
+
readonly path: "/parentA/[paramA]";
|
|
246
|
+
}, "meta" | "props"> & {
|
|
247
|
+
id: string;
|
|
248
|
+
props: undefined;
|
|
249
|
+
meta: Readonly<{}>;
|
|
250
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
251
|
+
readonly name: "parentA";
|
|
252
|
+
readonly path: "/parentA/[paramA]";
|
|
253
|
+
}, "meta" | "props"> & {
|
|
254
|
+
id: string;
|
|
255
|
+
props: undefined;
|
|
256
|
+
meta: Readonly<{}>;
|
|
257
|
+
}], []>, []>;
|
|
258
|
+
readonly name: "parentA.childA";
|
|
259
|
+
readonly path: "/childA/[?paramB]";
|
|
260
|
+
}, "meta" | "props"> & {
|
|
261
|
+
id: string;
|
|
262
|
+
props: undefined;
|
|
263
|
+
meta: Readonly<{}>;
|
|
264
|
+
}], []>, []>;
|
|
128
265
|
readonly name: "parentA.childA.grandChildA";
|
|
129
266
|
readonly path: "/[paramC]";
|
|
130
267
|
readonly component: {
|
|
@@ -134,7 +271,128 @@ export declare const routes: readonly [import('../main').Route<"parentA", import
|
|
|
134
271
|
id: string;
|
|
135
272
|
props: undefined;
|
|
136
273
|
meta: Readonly<{}>;
|
|
137
|
-
}], []> & import('../main').InternalRouteHooks<
|
|
274
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA.childA.grandChildA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]/childA/[?paramB]/[paramC]", {
|
|
275
|
+
paramA: StringConstructor;
|
|
276
|
+
paramB: StringConstructor;
|
|
277
|
+
} & {
|
|
278
|
+
paramC: StringConstructor;
|
|
279
|
+
}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
280
|
+
readonly name: "parentA";
|
|
281
|
+
readonly path: "/parentA/[paramA]";
|
|
282
|
+
}, "meta" | "props"> & {
|
|
283
|
+
id: string;
|
|
284
|
+
props: undefined;
|
|
285
|
+
meta: Readonly<{}>;
|
|
286
|
+
}, Omit<{
|
|
287
|
+
readonly parent: import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
288
|
+
readonly name: "parentA";
|
|
289
|
+
readonly path: "/parentA/[paramA]";
|
|
290
|
+
}, "meta" | "props"> & {
|
|
291
|
+
id: string;
|
|
292
|
+
props: undefined;
|
|
293
|
+
meta: Readonly<{}>;
|
|
294
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
295
|
+
readonly name: "parentA";
|
|
296
|
+
readonly path: "/parentA/[paramA]";
|
|
297
|
+
}, "meta" | "props"> & {
|
|
298
|
+
id: string;
|
|
299
|
+
props: undefined;
|
|
300
|
+
meta: Readonly<{}>;
|
|
301
|
+
}], []>, []>;
|
|
302
|
+
readonly name: "parentA.childA";
|
|
303
|
+
readonly path: "/childA/[?paramB]";
|
|
304
|
+
}, "meta" | "props"> & {
|
|
305
|
+
id: string;
|
|
306
|
+
props: undefined;
|
|
307
|
+
meta: Readonly<{}>;
|
|
308
|
+
}, Omit<{
|
|
309
|
+
readonly parent: import('../main').Route<"parentA.childA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]/childA/[?paramB]", {
|
|
310
|
+
paramA: StringConstructor;
|
|
311
|
+
} & {
|
|
312
|
+
paramB: StringConstructor;
|
|
313
|
+
}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
314
|
+
readonly name: "parentA";
|
|
315
|
+
readonly path: "/parentA/[paramA]";
|
|
316
|
+
}, "meta" | "props"> & {
|
|
317
|
+
id: string;
|
|
318
|
+
props: undefined;
|
|
319
|
+
meta: Readonly<{}>;
|
|
320
|
+
}, Omit<{
|
|
321
|
+
readonly parent: import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
322
|
+
readonly name: "parentA";
|
|
323
|
+
readonly path: "/parentA/[paramA]";
|
|
324
|
+
}, "meta" | "props"> & {
|
|
325
|
+
id: string;
|
|
326
|
+
props: undefined;
|
|
327
|
+
meta: Readonly<{}>;
|
|
328
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
329
|
+
readonly name: "parentA";
|
|
330
|
+
readonly path: "/parentA/[paramA]";
|
|
331
|
+
}, "meta" | "props"> & {
|
|
332
|
+
id: string;
|
|
333
|
+
props: undefined;
|
|
334
|
+
meta: Readonly<{}>;
|
|
335
|
+
}], []>, []>;
|
|
336
|
+
readonly name: "parentA.childA";
|
|
337
|
+
readonly path: "/childA/[?paramB]";
|
|
338
|
+
}, "meta" | "props"> & {
|
|
339
|
+
id: string;
|
|
340
|
+
props: undefined;
|
|
341
|
+
meta: Readonly<{}>;
|
|
342
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA.childA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]/childA/[?paramB]", {
|
|
343
|
+
paramA: StringConstructor;
|
|
344
|
+
} & {
|
|
345
|
+
paramB: StringConstructor;
|
|
346
|
+
}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
347
|
+
readonly name: "parentA";
|
|
348
|
+
readonly path: "/parentA/[paramA]";
|
|
349
|
+
}, "meta" | "props"> & {
|
|
350
|
+
id: string;
|
|
351
|
+
props: undefined;
|
|
352
|
+
meta: Readonly<{}>;
|
|
353
|
+
}, Omit<{
|
|
354
|
+
readonly parent: import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
355
|
+
readonly name: "parentA";
|
|
356
|
+
readonly path: "/parentA/[paramA]";
|
|
357
|
+
}, "meta" | "props"> & {
|
|
358
|
+
id: string;
|
|
359
|
+
props: undefined;
|
|
360
|
+
meta: Readonly<{}>;
|
|
361
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentA", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentA/[paramA]", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
362
|
+
readonly name: "parentA";
|
|
363
|
+
readonly path: "/parentA/[paramA]";
|
|
364
|
+
}, "meta" | "props"> & {
|
|
365
|
+
id: string;
|
|
366
|
+
props: undefined;
|
|
367
|
+
meta: Readonly<{}>;
|
|
368
|
+
}], []>, []>;
|
|
369
|
+
readonly name: "parentA.childA";
|
|
370
|
+
readonly path: "/childA/[?paramB]";
|
|
371
|
+
}, "meta" | "props"> & {
|
|
372
|
+
id: string;
|
|
373
|
+
props: undefined;
|
|
374
|
+
meta: Readonly<{}>;
|
|
375
|
+
}], []>, []>;
|
|
376
|
+
readonly name: "parentA.childA.grandChildA";
|
|
377
|
+
readonly path: "/[paramC]";
|
|
378
|
+
readonly component: {
|
|
379
|
+
template: string;
|
|
380
|
+
};
|
|
381
|
+
}, "meta" | "props"> & {
|
|
382
|
+
id: string;
|
|
383
|
+
props: undefined;
|
|
384
|
+
meta: Readonly<{}>;
|
|
385
|
+
}], []>, []>, import('../main').Route<"parentB", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentB", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
386
|
+
readonly name: "parentB";
|
|
387
|
+
readonly path: "/parentB";
|
|
388
|
+
readonly component: {
|
|
389
|
+
template: string;
|
|
390
|
+
};
|
|
391
|
+
}, "meta" | "props"> & {
|
|
392
|
+
id: string;
|
|
393
|
+
props: undefined;
|
|
394
|
+
meta: Readonly<{}>;
|
|
395
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentB", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/parentB", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
138
396
|
readonly name: "parentB";
|
|
139
397
|
readonly path: "/parentB";
|
|
140
398
|
readonly component: {
|
|
@@ -144,7 +402,17 @@ export declare const routes: readonly [import('../main').Route<"parentA", import
|
|
|
144
402
|
id: string;
|
|
145
403
|
props: undefined;
|
|
146
404
|
meta: Readonly<{}>;
|
|
147
|
-
}], []
|
|
405
|
+
}], []>, []>, import('../main').Route<"parentC", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
406
|
+
readonly name: "parentC";
|
|
407
|
+
readonly path: "/";
|
|
408
|
+
readonly component: {
|
|
409
|
+
template: string;
|
|
410
|
+
};
|
|
411
|
+
}, "meta" | "props"> & {
|
|
412
|
+
id: string;
|
|
413
|
+
props: undefined;
|
|
414
|
+
meta: Readonly<{}>;
|
|
415
|
+
}], []> & import('../main').InternalRouteHooks<import('../main').Route<"parentC", import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"/", {}>, import('../services/withParams').WithParams<"", {}>, import('../services/withParams').WithParams<"", {}>, Readonly<{}>, {}, [Omit<{
|
|
148
416
|
readonly name: "parentC";
|
|
149
417
|
readonly path: "/";
|
|
150
418
|
readonly component: {
|
|
@@ -154,4 +422,4 @@ export declare const routes: readonly [import('../main').Route<"parentA", import
|
|
|
154
422
|
id: string;
|
|
155
423
|
props: undefined;
|
|
156
424
|
meta: Readonly<{}>;
|
|
157
|
-
}], []
|
|
425
|
+
}], []>, []>];
|