@kitbag/router 0.20.1 → 0.20.3

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.
@@ -13,33 +13,6 @@ import { StandardSchemaV1 } from '@standard-schema/spec';
13
13
  import { UnwrapRef } from 'vue';
14
14
  import { VNode } from 'vue';
15
15
 
16
- declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
17
-
18
- declare type __VLS_Props = {
19
- name?: string;
20
- };
21
-
22
- declare function __VLS_template(): {
23
- attrs: Partial<{}>;
24
- slots: Readonly<{
25
- default?: (props: {
26
- route: RouterRoute;
27
- component: Component;
28
- rejection: UnwrapRef<RouterRejection>;
29
- }) => VNode;
30
- }> & {
31
- default?: (props: {
32
- route: RouterRoute;
33
- component: Component;
34
- rejection: UnwrapRef<RouterRejection>;
35
- }) => VNode;
36
- };
37
- refs: {};
38
- rootEl: any;
39
- };
40
-
41
- declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
42
-
43
16
  declare type __VLS_WithTemplateSlots<T, S> = T & {
44
17
  new (): {
45
18
  $slots: S;
@@ -434,6 +407,7 @@ declare type GetParentPropsReturnType<TParent extends Route | undefined = Route
434
407
 
435
408
  /**
436
409
  * @deprecated use `withParams` instead
410
+ * @hidden we don't want to expose this in the api docs
437
411
  */
438
412
  export declare const host: typeof withParams;
439
413
 
@@ -618,6 +592,7 @@ declare type ParamWithDefault<TParam extends Param = Param> = Required<ParamGetS
618
592
 
619
593
  /**
620
594
  * @deprecated use `withParams` instead
595
+ * @hidden we don't want to expose this in the api docs
621
596
  */
622
597
  export declare const path: typeof withParams;
623
598
 
@@ -668,6 +643,7 @@ declare type PropsGetter<TOptions extends CreateRouteOptions = CreateRouteOption
668
643
 
669
644
  /**
670
645
  * @deprecated use `withParams` instead
646
+ * @hidden we don't want to expose this in the api docs
671
647
  */
672
648
  export declare const query: typeof withParams;
673
649
 
@@ -985,6 +961,10 @@ export declare type Router<TRoutes extends Routes = any, TOptions extends Router
985
961
  * Initializes the router based on the initial route. Automatically called when the router is installed. Calling this more than once has no effect.
986
962
  */
987
963
  start: () => Promise<void>;
964
+ /**
965
+ * Returns true if the router has been started.
966
+ */
967
+ started: Ref<boolean>;
988
968
  /**
989
969
  * Stops the router and teardown any listeners.
990
970
  */
@@ -993,6 +973,9 @@ export declare type Router<TRoutes extends Routes = any, TOptions extends Router
993
973
 
994
974
  declare type RouterHistoryMode = 'auto' | 'browser' | 'memory' | 'hash';
995
975
 
976
+ /**
977
+ * @hidden we don't want the criptic component types showing up in the api docs
978
+ */
996
979
  export declare const RouterLink: __VLS_WithTemplateSlots_2<DefineComponent< {
997
980
  /**
998
981
  * The url string to navigate to or a callback that returns a url string
@@ -1020,6 +1003,8 @@ element: HTMLAnchorElement;
1020
1003
  route: ResolvedRoute | undefined;
1021
1004
  isMatch: boolean;
1022
1005
  isExactMatch: boolean;
1006
+ isActive: boolean;
1007
+ isExactActive: boolean;
1023
1008
  isExternal: boolean;
1024
1009
  }) => unknown;
1025
1010
  }> & {
@@ -1027,6 +1012,8 @@ element: HTMLAnchorElement;
1027
1012
  route: ResolvedRoute | undefined;
1028
1013
  isMatch: boolean;
1029
1014
  isExactMatch: boolean;
1015
+ isActive: boolean;
1016
+ isExactActive: boolean;
1030
1017
  isExternal: boolean;
1031
1018
  }) => unknown;
1032
1019
  }>;
@@ -1160,7 +1147,26 @@ export declare type RouterRoutes<TRoutes extends Routes> = {
1160
1147
  [K in keyof TRoutes]: RouterRoute<ResolvedRoute<TRoutes[K]>>;
1161
1148
  }[number];
1162
1149
 
1163
- export declare const RouterView: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
1150
+ /**
1151
+ * @hidden we don't want the criptic component types showing up in the api docs
1152
+ */
1153
+ export declare const RouterView: __VLS_WithTemplateSlots<DefineComponent< {
1154
+ name?: string;
1155
+ }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
1156
+ name?: string;
1157
+ }> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>, Readonly<{
1158
+ default?: (props: {
1159
+ route: RouterRoute;
1160
+ component: Component;
1161
+ rejection: UnwrapRef<RouterRejection>;
1162
+ }) => VNode;
1163
+ }> & {
1164
+ default?: (props: {
1165
+ route: RouterRoute;
1166
+ component: Component;
1167
+ rejection: UnwrapRef<RouterRejection>;
1168
+ }) => VNode;
1169
+ }>;
1164
1170
 
1165
1171
  /**
1166
1172
  * Represents an immutable array of Route instances. Return value of `createRoute`, expected param for `createRouter`.
@@ -1256,6 +1262,14 @@ export declare type UseLink = {
1256
1262
  * True if route matches current URL. Route is the same as what's currently stored at `router.route`.
1257
1263
  */
1258
1264
  isExactMatch: ComputedRef<boolean>;
1265
+ /**
1266
+ * True if route matches current URL, or is a parent route that matches the parent of the current URL.
1267
+ */
1268
+ isActive: ComputedRef<boolean>;
1269
+ /**
1270
+ * True if route matches current URL exactly.
1271
+ */
1272
+ isExactActive: ComputedRef<boolean>;
1259
1273
  /**
1260
1274
  *
1261
1275
  */