@kitbag/router 0.20.3 → 0.20.5

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.
@@ -7,6 +7,7 @@ import { ComputedRef } from 'vue';
7
7
  import { DefineComponent } from 'vue';
8
8
  import { FunctionalComponent } from 'vue';
9
9
  import { MaybeRefOrGetter } from 'vue';
10
+ import { PrefetchConfig as PrefetchConfig_2 } from '../types';
10
11
  import { PublicProps } from 'vue';
11
12
  import { Ref } from 'vue';
12
13
  import { StandardSchemaV1 } from '@standard-schema/spec';
@@ -976,26 +977,8 @@ declare type RouterHistoryMode = 'auto' | 'browser' | 'memory' | 'hash';
976
977
  /**
977
978
  * @hidden we don't want the criptic component types showing up in the api docs
978
979
  */
979
- export declare const RouterLink: __VLS_WithTemplateSlots_2<DefineComponent< {
980
- /**
981
- * The url string to navigate to or a callback that returns a url string
982
- */
983
- to: Url | ResolvedRoute | ToCallback;
984
- /**
985
- * Determines what assets are prefetched when router-link is rendered for this route. Overrides route level prefetch.
986
- */
987
- prefetch?: PrefetchConfig;
988
- } & RouterPushOptions, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
989
- /**
990
- * The url string to navigate to or a callback that returns a url string
991
- */
992
- to: Url | ResolvedRoute | ToCallback;
993
- /**
994
- * Determines what assets are prefetched when router-link is rendered for this route. Overrides route level prefetch.
995
- */
996
- prefetch?: PrefetchConfig;
997
- } & RouterPushOptions> & Readonly<{}>, {
998
- prefetch: PrefetchConfig;
980
+ export declare const RouterLink: __VLS_WithTemplateSlots_2<DefineComponent<RouterLinkProps & RouterPushOptions, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<RouterLinkProps & RouterPushOptions> & Readonly<{}>, {
981
+ prefetch: PrefetchConfig_2;
999
982
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
1000
983
  element: HTMLAnchorElement;
1001
984
  }, HTMLAnchorElement>, Readonly<{
@@ -1018,6 +1001,17 @@ element: HTMLAnchorElement;
1018
1001
  }) => unknown;
1019
1002
  }>;
1020
1003
 
1004
+ export declare type RouterLinkProps = {
1005
+ /**
1006
+ * The url string to navigate to or a callback that returns a url string
1007
+ */
1008
+ to: Url | ResolvedRoute | ToCallback;
1009
+ /**
1010
+ * Determines what assets are prefetched when router-link is rendered for this route. Overrides route level prefetch.
1011
+ */
1012
+ prefetch?: PrefetchConfig;
1013
+ };
1014
+
1021
1015
  /**
1022
1016
  * An error thrown when an attempt is made to use routing functionality before the router has been installed.
1023
1017
  * @group Errors
@@ -1309,6 +1303,16 @@ export declare type UseLinkOptions = RouterPushOptions & {
1309
1303
  prefetch?: PrefetchConfig;
1310
1304
  };
1311
1305
 
1306
+ declare type UseQueryValue<T> = {
1307
+ value: Ref<T | null>;
1308
+ values: Ref<T[]>;
1309
+ remove: () => void;
1310
+ };
1311
+
1312
+ export declare function useQueryValue(key: MaybeRefOrGetter<string>): UseQueryValue<string>;
1313
+
1314
+ export declare function useQueryValue<TParam extends Param>(key: MaybeRefOrGetter<string>, param: TParam): UseQueryValue<ExtractParamType<TParam>>;
1315
+
1312
1316
  /**
1313
1317
  * A composition to access the current route or verify a specific route name within a Vue component.
1314
1318
  * This function provides two overloads: