@kitbag/router 0.20.9 → 0.20.11
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/dist/components/routerLink.d.ts +1 -0
- package/dist/compositions/useRouterHooks.d.ts +2 -2
- package/dist/errors/{callbackContextAbortError.d.ts → contextAbortError.d.ts} +2 -1
- package/dist/errors/contextError.d.ts +2 -0
- package/dist/errors/{callbackContextPushError.d.ts → contextPushError.d.ts} +2 -1
- package/dist/errors/contextRejectionError.d.ts +6 -0
- package/dist/errors/missingRouteContextError.d.ts +10 -0
- package/dist/kitbag-router.js +1589 -1415
- package/dist/kitbag-router.umd.cjs +3 -3
- package/dist/main.d.ts +2 -1
- package/dist/models/RouteHooks.d.ts +3 -0
- package/dist/models/RouterRouteHooks.d.ts +9 -9
- package/dist/services/createCallbackContext.d.ts +2 -2
- package/dist/services/createComponentHooks.d.ts +4 -2
- package/dist/services/createExternalRoute.d.ts +3 -2
- package/dist/services/createRejection.d.ts +6 -0
- package/dist/services/createRoute.d.ts +4 -3
- package/dist/services/createRouteHooks.d.ts +15 -0
- package/dist/services/createRouter.d.ts +2 -2
- package/dist/services/createRouterAssets.d.ts +3 -2
- package/dist/services/createRouterCallbackContext.d.ts +8 -6
- package/dist/services/createRouterHooks.d.ts +17 -18
- package/dist/services/createRouterPlugin.d.ts +3 -3
- package/dist/services/createRouterPlugin.spec-d.d.ts +1 -0
- package/dist/services/createRouterReject.d.ts +4 -6
- package/dist/services/getGlobalRouteHooks.d.ts +2 -3
- package/dist/services/getRouteHooks.d.ts +3 -9
- package/dist/services/getRouteHooksDeprecated.d.ts +10 -0
- package/dist/services/routeMatchRules.d.ts +1 -0
- package/dist/services/routeRegex.d.ts +1 -0
- package/dist/services/zod.d.ts +3 -3
- package/dist/types/createRouteOptions.d.ts +19 -6
- package/dist/types/hooks.d.ts +79 -7
- package/dist/types/meta.d.ts +3 -1
- package/dist/types/props.d.ts +13 -7
- package/dist/types/register.d.ts +2 -1
- package/dist/types/rejection.d.ts +15 -0
- package/dist/types/resolved.d.ts +14 -1
- package/dist/types/route.d.ts +28 -2
- package/dist/types/routeContext.d.ts +9 -0
- package/dist/types/router.d.ts +18 -41
- package/dist/types/routerPlugin.d.ts +106 -10
- package/dist/types/routerReject.d.ts +2 -2
- package/dist/types/routerRoute.d.ts +27 -0
- package/dist/types/utilities.d.ts +0 -4
- package/dist/utilities/checkMissingContext.d.ts +2 -0
- package/dist/utilities/checkMissingContext.spec copy.d.ts +1 -0
- package/dist/utilities/testHelpers.d.ts +52 -39
- package/package.json +10 -9
- package/dist/errors/callbackContextRejectionError.d.ts +0 -6
|
@@ -26,6 +26,7 @@ export declare function createRouterLink<TRouter extends Router>(routerKey: Inje
|
|
|
26
26
|
};
|
|
27
27
|
state: import('../types/state').ExtractRouteStateParamsAsOptional<Record<string, import('../main').Param>>;
|
|
28
28
|
href: Url;
|
|
29
|
+
hooks: import('../models/RouterRouteHooks').RouterRouteHooks[];
|
|
29
30
|
}> | ToCallback<TRouter>;
|
|
30
31
|
prefetch?: import('../main').PrefetchConfig;
|
|
31
32
|
} & ({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RouterHooks } from '../services/createRouterHooks';
|
|
2
|
-
import { Router
|
|
2
|
+
import { Router } from '../types/router';
|
|
3
3
|
import { InjectionKey } from 'vue';
|
|
4
|
-
export declare function createUseRouterHooks<TRouter extends Router>(routerKey: InjectionKey<TRouter>): () => RouterHooks
|
|
4
|
+
export declare function createUseRouterHooks<TRouter extends Router>(routerKey: InjectionKey<TRouter>): () => RouterHooks;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CallbackAbortResponse } from '../services/createCallbackContext';
|
|
2
|
-
|
|
2
|
+
import { ContextError } from './contextError';
|
|
3
|
+
export declare class ContextAbortError extends ContextError {
|
|
3
4
|
response: CallbackAbortResponse;
|
|
4
5
|
constructor();
|
|
5
6
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CallbackPushResponse } from '../services/createCallbackContext';
|
|
2
|
-
|
|
2
|
+
import { ContextError } from './contextError';
|
|
3
|
+
export declare class ContextPushError extends ContextError {
|
|
3
4
|
response: CallbackPushResponse;
|
|
4
5
|
constructor(to: unknown[]);
|
|
5
6
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An error thrown when context is missing in a route. When assigning a route or rejection to a route context, that route or rejection must also be included in the options sent to `createRouter`.
|
|
3
|
+
*/
|
|
4
|
+
export declare class MissingRouteContextError extends Error {
|
|
5
|
+
/**
|
|
6
|
+
* Constructs a new MissingRouteContextError instance with a message indicating the missing context.
|
|
7
|
+
* @param name - The name of the name that was duplicated.
|
|
8
|
+
*/
|
|
9
|
+
constructor(name: string);
|
|
10
|
+
}
|