@kitbag/router 0.24.0 → 0.24.2

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.
Files changed (233) hide show
  1. package/dist/kitbag-router.d.ts +0 -1
  2. package/dist/kitbag-router.js +6163 -6223
  3. package/dist/kitbag-router.umd.cjs +3 -3
  4. package/dist/{components → src/components}/routerLink.d.ts +5 -4
  5. package/dist/{components → src/components}/routerView.d.ts +3 -3
  6. package/dist/{compositions → src/compositions}/useComponentsStore.d.ts +2 -2
  7. package/dist/{compositions → src/compositions}/useLink.d.ts +6 -6
  8. package/dist/{compositions → src/compositions}/usePrefetching.d.ts +3 -3
  9. package/dist/{compositions → src/compositions}/usePropStore.d.ts +2 -2
  10. package/dist/{compositions → src/compositions}/useQueryValue.d.ts +3 -3
  11. package/dist/{compositions → src/compositions}/useRejection.d.ts +2 -2
  12. package/dist/{compositions → src/compositions}/useRoute.d.ts +2 -2
  13. package/dist/{compositions → src/compositions}/useRouter.d.ts +1 -1
  14. package/dist/{compositions → src/compositions}/useRouterDepth.d.ts +1 -1
  15. package/dist/{compositions → src/compositions}/useRouterHooks.d.ts +2 -2
  16. package/dist/{compositions → src/compositions}/useVisibilityObserver.d.ts +1 -1
  17. package/dist/{devtools → src/devtools}/createRouterDevtools.d.ts +2 -2
  18. package/dist/{devtools → src/devtools}/filters.d.ts +1 -1
  19. package/dist/{errors → src/errors}/contextAbortError.d.ts +1 -1
  20. package/dist/{errors → src/errors}/contextPushError.d.ts +1 -1
  21. package/dist/{errors → src/errors}/contextRejectionError.d.ts +1 -1
  22. package/dist/{errors → src/errors}/invalidRouteParamValueError.d.ts +1 -1
  23. package/dist/{guards → src/guards}/routes.d.ts +2 -2
  24. package/dist/{main.d.ts → src/main.d.ts} +2 -2
  25. package/dist/{models → src/models}/hooks.d.ts +2 -2
  26. package/dist/{services → src/services}/arrayOf.d.ts +2 -2
  27. package/dist/{services → src/services}/combineHash.d.ts +2 -2
  28. package/dist/{services → src/services}/combinePath.d.ts +2 -2
  29. package/dist/{services → src/services}/combineQuery.d.ts +2 -2
  30. package/dist/{services → src/services}/combineState.d.ts +1 -1
  31. package/dist/{services → src/services}/combineUrl.d.ts +2 -2
  32. package/dist/{services → src/services}/component.d.ts +2 -2
  33. package/dist/{services → src/services}/createComponentHooks.d.ts +4 -4
  34. package/dist/{services → src/services}/createComponentsStore.d.ts +2 -2
  35. package/dist/{services → src/services}/createCurrentRejection.d.ts +4 -1
  36. package/dist/{services → src/services}/createCurrentRoute.d.ts +4 -4
  37. package/dist/{services → src/services}/createExternalRoute.d.ts +4 -4
  38. package/dist/{services → src/services}/createParam.d.ts +3 -3
  39. package/dist/{services → src/services}/createPropStore.d.ts +3 -3
  40. package/dist/src/services/createRejection.d.ts +8 -0
  41. package/dist/{services → src/services}/createRejectionHooks.d.ts +3 -3
  42. package/dist/src/services/createResolvedRoute.d.ts +4 -0
  43. package/dist/{services → src/services}/createResolvedRouteQuery.d.ts +1 -1
  44. package/dist/{services → src/services}/createRoute.d.ts +5 -5
  45. package/dist/{services → src/services}/createRouteHooks.d.ts +5 -5
  46. package/dist/{services → src/services}/createRouteRedirects.d.ts +2 -2
  47. package/dist/{services → src/services}/createRouter.d.ts +3 -3
  48. package/dist/{services → src/services}/createRouterAssets.d.ts +10 -10
  49. package/dist/{services → src/services}/createRouterCallbackContext.d.ts +7 -7
  50. package/dist/{services → src/services}/createRouterHistory.d.ts +1 -1
  51. package/dist/{services → src/services}/createRouterHooks.d.ts +2 -2
  52. package/dist/{services → src/services}/createRouterKeyStore.d.ts +1 -1
  53. package/dist/{services → src/services}/createRouterPlugin.d.ts +3 -3
  54. package/dist/{services → src/services}/createRouterRoute.d.ts +4 -4
  55. package/dist/{services → src/services}/createUrl.d.ts +1 -1
  56. package/dist/src/services/getGlobalHooksForRouter.d.ts +3 -0
  57. package/dist/{services → src/services}/getGlobalRouteHooks.d.ts +2 -2
  58. package/dist/{services → src/services}/getMatchesForUrl.d.ts +3 -3
  59. package/dist/{services → src/services}/getParamsForString.d.ts +2 -2
  60. package/dist/src/services/getRejectionHooks.d.ts +3 -0
  61. package/dist/{services → src/services}/getRouteHooks.d.ts +2 -2
  62. package/dist/{services → src/services}/getRoutesForRouter.d.ts +6 -6
  63. package/dist/{services → src/services}/hooks.d.ts +2 -2
  64. package/dist/{services → src/services}/insertBaseRoute.d.ts +1 -1
  65. package/dist/{services → src/services}/literal.d.ts +1 -1
  66. package/dist/{services → src/services}/params.d.ts +3 -3
  67. package/dist/{services → src/services}/queryParamFilter.d.ts +1 -1
  68. package/dist/{services → src/services}/routeRegex.d.ts +1 -1
  69. package/dist/{services → src/services}/state.d.ts +1 -1
  70. package/dist/{services → src/services}/tupleOf.d.ts +2 -2
  71. package/dist/src/services/unionOf.d.ts +3 -0
  72. package/dist/{services → src/services}/urlParser.d.ts +2 -2
  73. package/dist/{services → src/services}/valibot.d.ts +1 -1
  74. package/dist/{services → src/services}/withDefault.d.ts +2 -2
  75. package/dist/{services → src/services}/withParams.d.ts +4 -4
  76. package/dist/{services → src/services}/zod.d.ts +2 -2
  77. package/dist/{types → src/types}/createRouteOptions.d.ts +22 -18
  78. package/dist/{types → src/types}/hooks.d.ts +12 -12
  79. package/dist/{types → src/types}/paramTypes.d.ts +2 -2
  80. package/dist/{types → src/types}/params.d.ts +1 -1
  81. package/dist/{types → src/types}/props.d.ts +2 -2
  82. package/dist/{types → src/types}/register.d.ts +1 -1
  83. package/dist/{types → src/types}/rejection.d.ts +6 -10
  84. package/dist/{types → src/types}/resolved.d.ts +4 -4
  85. package/dist/{types → src/types}/route.d.ts +10 -10
  86. package/dist/src/types/routeTitle.d.ts +22 -0
  87. package/dist/{types → src/types}/routeUpdate.d.ts +2 -2
  88. package/dist/{types → src/types}/routeWithParams.d.ts +3 -3
  89. package/dist/{types → src/types}/router.d.ts +13 -13
  90. package/dist/{types → src/types}/routerLink.d.ts +9 -5
  91. package/dist/{types → src/types}/routerPlugin.d.ts +2 -2
  92. package/dist/{types → src/types}/routerPush.d.ts +8 -8
  93. package/dist/{types → src/types}/routerReject.d.ts +1 -1
  94. package/dist/{types → src/types}/routerReplace.d.ts +8 -8
  95. package/dist/{types → src/types}/routerResolve.d.ts +7 -7
  96. package/dist/{types → src/types}/routerRoute.d.ts +3 -3
  97. package/dist/{types → src/types}/routesMap.d.ts +2 -2
  98. package/dist/{types → src/types}/state.d.ts +6 -6
  99. package/dist/{types → src/types}/url.d.ts +6 -6
  100. package/dist/{types → src/types}/useLink.d.ts +5 -5
  101. package/dist/{utilities → src/utilities}/checkDuplicateNames.d.ts +1 -1
  102. package/dist/{utilities → src/utilities}/isNamedRoute.d.ts +1 -1
  103. package/dist/{utilities → src/utilities}/prefetch.d.ts +1 -1
  104. package/dist/src/utilities/setDocumentTitle.d.ts +2 -0
  105. package/dist/{utilities → src/utilities}/testHelpers.d.ts +100 -100
  106. package/dist/{utilities → src/utilities}/urlSearchParams.d.ts +1 -1
  107. package/package.json +12 -12
  108. package/dist/services/createRejection.d.ts +0 -7
  109. package/dist/services/createResolvedRoute.d.ts +0 -4
  110. package/dist/services/getGlobalHooksForRouter.d.ts +0 -3
  111. package/dist/services/getRejectionHooks.d.ts +0 -3
  112. package/dist/services/unionOf.d.ts +0 -3
  113. package/dist/types/titles.d.ts +0 -22
  114. package/dist/utilities/setDocumentTitle.d.ts +0 -2
  115. /package/dist/{components → src/components}/echo.d.ts +0 -0
  116. /package/dist/{components → src/components}/helloWorld.d.ts +0 -0
  117. /package/dist/{components → src/components}/rejection.d.ts +0 -0
  118. /package/dist/{components → src/components}/routerLink.browser.spec.d.ts +0 -0
  119. /package/dist/{components → src/components}/routerView.browser.spec.d.ts +0 -0
  120. /package/dist/{components → src/components}/routerView.spec.d.ts +0 -0
  121. /package/dist/{compositions → src/compositions}/useEventListener.d.ts +0 -0
  122. /package/dist/{compositions → src/compositions}/useQueryValue.browser.spec.d.ts +0 -0
  123. /package/dist/{compositions → src/compositions}/useQueryValue.spec-d.d.ts +0 -0
  124. /package/dist/{compositions → src/compositions}/useRoute.browser.spec.d.ts +0 -0
  125. /package/dist/{compositions → src/compositions}/useRoute.spec-d.d.ts +0 -0
  126. /package/dist/{devtools → src/devtools}/getDevtoolsLabel.d.ts +0 -0
  127. /package/dist/{devtools → src/devtools}/types.d.ts +0 -0
  128. /package/dist/{errors → src/errors}/contextError.d.ts +0 -0
  129. /package/dist/{errors → src/errors}/duplicateNamesError.d.ts +0 -0
  130. /package/dist/{errors → src/errors}/duplicateParamsError.d.ts +0 -0
  131. /package/dist/{errors → src/errors}/initialRouteMissingError.d.ts +0 -0
  132. /package/dist/{errors → src/errors}/invalidRouteRedirectError.d.ts +0 -0
  133. /package/dist/{errors → src/errors}/metaPropertyConflict.d.ts +0 -0
  134. /package/dist/{errors → src/errors}/multipleRouteRedirectsError.d.ts +0 -0
  135. /package/dist/{errors → src/errors}/routeNotFoundError.d.ts +0 -0
  136. /package/dist/{errors → src/errors}/routerNotInstalledError.d.ts +0 -0
  137. /package/dist/{errors → src/errors}/useRouteInvalidError.d.ts +0 -0
  138. /package/dist/{guards → src/guards}/routes.spec-d.d.ts +0 -0
  139. /package/dist/{keys.d.ts → src/keys.d.ts} +0 -0
  140. /package/dist/{services → src/services}/arrayOf.spec.d.ts +0 -0
  141. /package/dist/{services → src/services}/combineHash.spec.d.ts +0 -0
  142. /package/dist/{services → src/services}/combineMeta.d.ts +0 -0
  143. /package/dist/{services → src/services}/combineMeta.spec.d.ts +0 -0
  144. /package/dist/{services → src/services}/combinePath.spec-d.d.ts +0 -0
  145. /package/dist/{services → src/services}/combinePath.spec.d.ts +0 -0
  146. /package/dist/{services → src/services}/combineQuery.spec.d.ts +0 -0
  147. /package/dist/{services → src/services}/combineState.spec.d.ts +0 -0
  148. /package/dist/{services → src/services}/combineUrl.spec.d.ts +0 -0
  149. /package/dist/{services → src/services}/component.browser.spec.d.ts +0 -0
  150. /package/dist/{services → src/services}/createExternalRoute.spec.d.ts +0 -0
  151. /package/dist/{services → src/services}/createIsExternal.d.ts +0 -0
  152. /package/dist/{services → src/services}/createIsExternal.spec.d.ts +0 -0
  153. /package/dist/{services → src/services}/createResolvedRoute.spec.d.ts +0 -0
  154. /package/dist/{services → src/services}/createRoute.spec-d.d.ts +0 -0
  155. /package/dist/{services → src/services}/createRoute.spec.d.ts +0 -0
  156. /package/dist/{services → src/services}/createRouteId.d.ts +0 -0
  157. /package/dist/{services → src/services}/createRouteRedirects.spec.d.ts +0 -0
  158. /package/dist/{services → src/services}/createRouter.browser.spec.d.ts +0 -0
  159. /package/dist/{services → src/services}/createRouter.spec-d.d.ts +0 -0
  160. /package/dist/{services → src/services}/createRouter.spec.d.ts +0 -0
  161. /package/dist/{services → src/services}/createRouterHistory.browser.spec.d.ts +0 -0
  162. /package/dist/{services → src/services}/createRouterPlugin.browser.spec.d.ts +0 -0
  163. /package/dist/{services → src/services}/createRouterPlugin.spec-d.d.ts +0 -0
  164. /package/dist/{services → src/services}/createRouterRoute.spec.d.ts +0 -0
  165. /package/dist/{services → src/services}/createUniqueIdSequence.d.ts +0 -0
  166. /package/dist/{services → src/services}/createUrl.spec.d.ts +0 -0
  167. /package/dist/{services → src/services}/createVisibilityObserver.d.ts +0 -0
  168. /package/dist/{services → src/services}/createVueAppStore.d.ts +0 -0
  169. /package/dist/{services → src/services}/getInitialUrl.browser.spec.d.ts +0 -0
  170. /package/dist/{services → src/services}/getInitialUrl.d.ts +0 -0
  171. /package/dist/{services → src/services}/getInitialUrl.spec.d.ts +0 -0
  172. /package/dist/{services → src/services}/getMatchesForUrl.spec.d.ts +0 -0
  173. /package/dist/{services → src/services}/getRouteHooks.spec.d.ts +0 -0
  174. /package/dist/{services → src/services}/getRoutesForRouter.spec.d.ts +0 -0
  175. /package/dist/{services → src/services}/history.browser.spec.d.ts +0 -0
  176. /package/dist/{services → src/services}/history.d.ts +0 -0
  177. /package/dist/{services → src/services}/hooks.browser.spec.d.ts +0 -0
  178. /package/dist/{services → src/services}/hooks.spec.d.ts +0 -0
  179. /package/dist/{services → src/services}/insertBaseRoute.spec.d.ts +0 -0
  180. /package/dist/{services → src/services}/params.spec.d.ts +0 -0
  181. /package/dist/{services → src/services}/paramsFinder.d.ts +0 -0
  182. /package/dist/{services → src/services}/paramsFinder.spec.d.ts +0 -0
  183. /package/dist/{services → src/services}/queryParamFilter.spec.d.ts +0 -0
  184. /package/dist/{services → src/services}/routeRegex.spec.d.ts +0 -0
  185. /package/dist/{services → src/services}/state.spec.d.ts +0 -0
  186. /package/dist/{services → src/services}/tupleOf.spec.d.ts +0 -0
  187. /package/dist/{services → src/services}/unionOf.spec.d.ts +0 -0
  188. /package/dist/{services → src/services}/urlParser.spec.d.ts +0 -0
  189. /package/dist/{services → src/services}/valibot.spec-d.d.ts +0 -0
  190. /package/dist/{services → src/services}/valibot.spec.d.ts +0 -0
  191. /package/dist/{services → src/services}/withParams.spec-d.d.ts +0 -0
  192. /package/dist/{services → src/services}/withParams.spec.d.ts +0 -0
  193. /package/dist/{services → src/services}/zod.spec-d.d.ts +0 -0
  194. /package/dist/{services → src/services}/zod.spec.d.ts +0 -0
  195. /package/dist/{tests → src/tests}/hooks.spec.d.ts +0 -0
  196. /package/dist/{tests → src/tests}/routeProps.browser.spec.d.ts +0 -0
  197. /package/dist/{tests → src/tests}/routeProps.spec.d.ts +0 -0
  198. /package/dist/{types → src/types}/callbackContext.d.ts +0 -0
  199. /package/dist/{types → src/types}/meta.d.ts +0 -0
  200. /package/dist/{types → src/types}/name.d.ts +0 -0
  201. /package/dist/{types → src/types}/prefetch.d.ts +0 -0
  202. /package/dist/{types → src/types}/querySource.d.ts +0 -0
  203. /package/dist/{types → src/types}/redirects.d.ts +0 -0
  204. /package/dist/{types → src/types}/redirects.spec-d.d.ts +0 -0
  205. /package/dist/{types → src/types}/register.spec.d.ts +0 -0
  206. /package/dist/{types → src/types}/resolved.spec-d.d.ts +0 -0
  207. /package/dist/{types → src/types}/route.spec-d.d.ts +0 -0
  208. /package/dist/{types → src/types}/routeContext.d.ts +0 -0
  209. /package/dist/{types/routeWithParams.spec-d.d.ts → src/types/routeTitle.browser.spec.d.ts} +0 -0
  210. /package/dist/{types/routesMap.spec-ts.d.ts → src/types/routeWithParams.spec-d.d.ts} +0 -0
  211. /package/dist/{types → src/types}/routerAbort.d.ts +0 -0
  212. /package/dist/{types/titles.browser.spec.d.ts → src/types/routesMap.spec-ts.d.ts} +0 -0
  213. /package/dist/{types → src/types}/urlString.d.ts +0 -0
  214. /package/dist/{types → src/types}/utilities.d.ts +0 -0
  215. /package/dist/{utilities → src/utilities}/array.d.ts +0 -0
  216. /package/dist/{utilities → src/utilities}/checkDuplicateNames.spec.d.ts +0 -0
  217. /package/dist/{utilities → src/utilities}/checkDuplicateParams.d.ts +0 -0
  218. /package/dist/{utilities → src/utilities}/checkDuplicateParams.spec.d.ts +0 -0
  219. /package/dist/{utilities → src/utilities}/components.d.ts +0 -0
  220. /package/dist/{utilities → src/utilities}/components.spec.d.ts +0 -0
  221. /package/dist/{utilities → src/utilities}/guards.d.ts +0 -0
  222. /package/dist/{utilities → src/utilities}/guards.spec.d.ts +0 -0
  223. /package/dist/{utilities → src/utilities}/index.d.ts +0 -0
  224. /package/dist/{utilities → src/utilities}/isBrowser.browser.spec.d.ts +0 -0
  225. /package/dist/{utilities → src/utilities}/isBrowser.d.ts +0 -0
  226. /package/dist/{utilities → src/utilities}/isBrowser.spec.d.ts +0 -0
  227. /package/dist/{utilities → src/utilities}/makeOptional.d.ts +0 -0
  228. /package/dist/{utilities → src/utilities}/prefetch.spec.d.ts +0 -0
  229. /package/dist/{utilities → src/utilities}/promises.d.ts +0 -0
  230. /package/dist/{utilities → src/utilities}/props.d.ts +0 -0
  231. /package/dist/{utilities → src/utilities}/trailingSlashes.d.ts +0 -0
  232. /package/dist/{utilities → src/utilities}/trailingSlashes.spec.d.ts +0 -0
  233. /package/dist/{utilities → src/utilities}/urlSearchParams.spec.d.ts +0 -0
@@ -1,3 +1,3 @@
1
- import { UrlParams } from './withParams';
2
- import { Param } from '../types/paramTypes';
1
+ import { UrlParams } from '../../services/withParams';
2
+ import { Param } from '../../types/paramTypes';
3
3
  export declare function getParamsForString(string?: string, params?: Record<string, Param | undefined>): UrlParams;
@@ -0,0 +1,3 @@
1
+ import { Hooks } from '../../models/hooks';
2
+ import { Rejection } from '../../types/rejection';
3
+ export declare function getRejectionHooksFromRejection(rejection: Rejection): Hooks;
@@ -1,4 +1,4 @@
1
- import { ResolvedRoute } from '../types/resolved';
2
- import { Hooks } from '../models/hooks';
1
+ import { ResolvedRoute } from '../../types/resolved';
2
+ import { Hooks } from '../../models/hooks';
3
3
  export declare function getBeforeHooksFromRoutes(to: ResolvedRoute, from: ResolvedRoute | null): Hooks;
4
4
  export declare function getAfterHooksFromRoutes(to: ResolvedRoute, from: ResolvedRoute | null): Hooks;
@@ -1,7 +1,7 @@
1
- import { Route, RouteInternal, Routes } from '../types/route';
2
- import { RouterPlugin } from '../types/routerPlugin';
3
- import { BuiltInRejectionType, Rejection, RejectionInternal } from '../types/rejection';
4
- import { RouterOptions } from '../types/router';
1
+ import { Route, RouteInternal, Routes } from '../../types/route';
2
+ import { RouterPlugin } from '../../types/routerPlugin';
3
+ import { BuiltInRejectionType, Rejection, RejectionInternal } from '../../types/rejection';
4
+ import { RouterOptions } from '../../types/router';
5
5
  /**
6
6
  * Takes in routes and plugins and returns a list of routes with the base route inserted if provided.
7
7
  * Also checks for duplicate names in the routes.
@@ -11,8 +11,8 @@ import { RouterOptions } from '../types/router';
11
11
  export declare function getRoutesForRouter(routes: Routes | Routes[], plugins?: RouterPlugin[], options?: RouterOptions): {
12
12
  routes: (import('../main').Url & {
13
13
  id: string;
14
- matched: import('../types/route').CreatedRouteOptions;
15
- matches: import('../types/route').CreatedRouteOptions[];
14
+ matched: import('../../types/route').CreatedRouteOptions;
15
+ matches: import('../../types/route').CreatedRouteOptions[];
16
16
  name: string;
17
17
  meta: Record<string, unknown>;
18
18
  state: Record<string, import('../main').Param>;
@@ -1,5 +1,5 @@
1
- import { HookLifecycle } from '../types/hooks';
2
- import { ResolvedRoute } from '../types/resolved';
1
+ import { HookLifecycle } from '../../types/hooks';
2
+ import { ResolvedRoute } from '../../types/resolved';
3
3
  type RouteHookCondition = (to: ResolvedRoute, from: ResolvedRoute | null, depth: number) => boolean;
4
4
  export declare const isRouteEnter: RouteHookCondition;
5
5
  export declare const isRouteLeave: RouteHookCondition;
@@ -1,2 +1,2 @@
1
- import { Route } from '../types/route';
1
+ import { Route } from '../../types/route';
2
2
  export declare function insertBaseRoute<T extends Route>(route: T, base?: string): T;
@@ -1,2 +1,2 @@
1
- import { LiteralParam, ParamGetSet } from '../types/paramTypes';
1
+ import { LiteralParam, ParamGetSet } from '../../types/paramTypes';
2
2
  export declare function literal<T extends LiteralParam>(value: T): ParamGetSet<T>;
@@ -1,6 +1,6 @@
1
- import { UrlParam } from './withParams';
2
- import { ExtractParamType } from '../types/params';
3
- import { Param } from '../types/paramTypes';
1
+ import { UrlParam } from '../../services/withParams';
2
+ import { ExtractParamType } from '../../types/params';
3
+ import { Param } from '../../types/paramTypes';
4
4
  export declare function getParam(params: Record<string, Param | undefined>, paramName: string): Param;
5
5
  export declare function getParamValue<T extends Param>(value: string | undefined, param: Partial<UrlParam<T>>): ExtractParamType<T>;
6
6
  export declare function safeGetParamValue<T extends Param>(value: string | undefined, param: Partial<UrlParam<T>>): ExtractParamType<T> | undefined;
@@ -1,2 +1,2 @@
1
- import { QuerySource } from '../types/querySource';
1
+ import { QuerySource } from '../../types/querySource';
2
2
  export declare function filterQueryParams(source: QuerySource, exclude: QuerySource): URLSearchParams;
@@ -1,4 +1,4 @@
1
- import { UrlPart } from './withParams';
1
+ import { UrlPart } from '../../services/withParams';
2
2
  export declare const paramRegex = "\\[\\??([\\w-_]+)\\*?\\]";
3
3
  export declare const optionalParamRegex = "\\[\\?([\\w-_]+)\\*?\\]";
4
4
  export declare const requiredParamRegex = "\\[([\\w-_]+)\\*?\\]";
@@ -1,4 +1,4 @@
1
- import { Param } from '../types/paramTypes';
1
+ import { Param } from '../../types/paramTypes';
2
2
  /**
3
3
  * This function is used to get the values inside the state converted from string values into the correct type.
4
4
  */
@@ -1,5 +1,5 @@
1
- import { Param, ParamGetSet } from '../types/paramTypes';
2
- import { ExtractParamType } from '../types/params';
1
+ import { Param, ParamGetSet } from '../../types/paramTypes';
2
+ import { ExtractParamType } from '../../types/params';
3
3
  type TupleOfOptions = {
4
4
  separator?: string;
5
5
  };
@@ -0,0 +1,3 @@
1
+ import { Param, ParamGetSet } from '../../types/paramTypes';
2
+ import { ExtractParamType } from '../../types/params';
3
+ export declare function unionOf<const T extends Param[]>(params: T): ParamGetSet<ExtractParamType<T[number]>>;
@@ -1,5 +1,5 @@
1
- import { QuerySource } from '../types/querySource';
2
- import { UrlString } from '../types/urlString';
1
+ import { QuerySource } from '../../types/querySource';
2
+ import { UrlString } from '../../types/urlString';
3
3
  type UrlParts = {
4
4
  host?: string;
5
5
  path: string;
@@ -1,4 +1,4 @@
1
- import { Param, ParamGetSet } from '../types/paramTypes';
1
+ import { Param, ParamGetSet } from '../../types/paramTypes';
2
2
  import { StandardSchemaV1 } from '@standard-schema/spec';
3
3
  export interface ValibotSchemaLike extends StandardSchemaV1<any> {
4
4
  type: string;
@@ -1,5 +1,5 @@
1
- import { ExtractParamType } from '../types/params';
2
- import { Param, ParamGetSet } from '../types/paramTypes';
1
+ import { ExtractParamType } from '../../types/params';
2
+ import { Param, ParamGetSet } from '../../types/paramTypes';
3
3
  export type ParamWithDefault<TParam extends Param = Param> = Required<ParamGetSet<ExtractParamType<TParam>>>;
4
4
  export declare function isParamWithDefault(param: Param): param is ParamWithDefault;
5
5
  export declare function withDefault<TParam extends Param>(param: TParam, defaultValue: ExtractParamType<TParam>): ParamWithDefault<TParam>;
@@ -1,7 +1,7 @@
1
- import { ExtractParamName, ParamEnd, ParamIsGreedy, ParamIsOptionalOrHasDefault, ParamStart } from '../types/params';
2
- import { Param } from '../types/paramTypes';
3
- import { Identity } from '../types/utilities';
4
- import { MakeOptional } from '../utilities/makeOptional';
1
+ import { ExtractParamName, ParamEnd, ParamIsGreedy, ParamIsOptionalOrHasDefault, ParamStart } from '../../types/params';
2
+ import { Param } from '../../types/paramTypes';
3
+ import { Identity } from '../../types/utilities';
4
+ import { MakeOptional } from '../../utilities/makeOptional';
5
5
  type WithParamsParamsInput<TValue extends string> = TValue extends `${string}${ParamStart}${infer TParam}${ParamEnd}${infer Rest}` ? Record<ExtractParamName<TParam>, Param | undefined> & WithParamsParamsInput<Rest> : {};
6
6
  type WithParamsParamsOutput<TValue extends string, TParams extends Record<string, Param | undefined> = Record<never, never>> = TValue extends `${string}${ParamStart}${infer TParam}${ParamEnd}${infer Rest}` ? ExtractParamName<TParam> extends keyof TParams ? TParams[ExtractParamName<TParam>] extends Param ? Record<ExtractParamName<TParam>, {
7
7
  param: TParams[ExtractParamName<TParam>];
@@ -1,5 +1,5 @@
1
- import { ParamGetSet } from '../types/paramTypes';
2
- import { Routes } from '../types/route';
1
+ import { ParamGetSet } from '../../types/paramTypes';
2
+ import { Routes } from '../../types/route';
3
3
  import { StandardSchemaV1 } from '@standard-schema/spec';
4
4
  import { ZodType } from 'zod';
5
5
  export interface ZodSchemaLike extends StandardSchemaV1<any> {
@@ -1,22 +1,22 @@
1
1
  import { Component } from 'vue';
2
- import { CombineMeta } from '../services/combineMeta';
3
- import { CombineState } from '../services/combineState';
4
- import { Param } from './paramTypes';
5
- import { PrefetchConfig } from './prefetch';
6
- import { RouteMeta } from './register';
7
- import { Route } from './route';
2
+ import { CombineMeta } from '../../services/combineMeta';
3
+ import { CombineState } from '../../services/combineState';
4
+ import { Param } from '../../types/paramTypes';
5
+ import { PrefetchConfig } from '../../types/prefetch';
6
+ import { RouteMeta } from '../../types/register';
7
+ import { Route } from '../../types/route';
8
8
  import { ResolvedRoute } from './resolved';
9
- import { ComponentProps } from '../services/component';
10
- import { PropsCallbackContext } from './props';
11
- import { Identity, MaybePromise } from './utilities';
12
- import { ToMeta } from './meta';
13
- import { ToState } from './state';
14
- import { ToName } from './name';
15
- import { UrlPart, UrlQueryPart } from '../services/withParams';
16
- import { RouteContext, ToRouteContext } from './routeContext';
17
- import { RouterViewProps } from '../components/routerView';
18
- import { ToUrl } from './url';
19
- import { CombineUrl } from '../services/combineUrl';
9
+ import { ComponentProps } from '../../services/component';
10
+ import { PropsCallbackContext } from '../../types/props';
11
+ import { Identity, MaybePromise } from '../../types/utilities';
12
+ import { ToMeta } from '../../types/meta';
13
+ import { ToState } from '../../types/state';
14
+ import { ToName } from '../../types/name';
15
+ import { UrlPart, UrlQueryPart } from '../../services/withParams';
16
+ import { RouteContext, ToRouteContext } from '../../types/routeContext';
17
+ import { RouterViewProps } from '../../components/routerView';
18
+ import { ToUrl } from '../../types/url';
19
+ import { CombineUrl } from '../../services/combineUrl';
20
20
  export type WithHost<THost extends string | UrlPart = string | UrlPart> = {
21
21
  /**
22
22
  * Host part of URL.
@@ -100,6 +100,10 @@ export type CreateRouteOptions<TName extends string | undefined = string | undef
100
100
  * Related routes and rejections for the route. The context is exposed to the hooks and props callback functions for this route.
101
101
  */
102
102
  context?: RouteContext[];
103
+ /**
104
+ * When true, the route will be hoisted to the top of the route tree. The route will continue to inherit meta, state, hooks, matches, and context from it's parent, but not the "url" properties.
105
+ */
106
+ hoist?: boolean;
103
107
  };
104
108
  export type PropsGetter<TOptions extends CreateRouteOptions = CreateRouteOptions, TComponent extends Component = Component> = (route: ResolvedRoute<ToRoute<TOptions>>, context: PropsCallbackContext<ToRoute<TOptions>, TOptions>) => MaybePromise<ComponentProps<TComponent>>;
105
109
  export type RouterViewPropsGetter<TOptions extends CreateRouteOptions = CreateRouteOptions> = (route: ResolvedRoute<ToRoute<TOptions>>, context: PropsCallbackContext<ToRoute<TOptions>, TOptions>) => MaybePromise<RouterViewProps & Record<string, unknown>>;
@@ -124,7 +128,7 @@ type ToMatches<TOptions extends CreateRouteOptions, TProps extends CreateRoutePr
124
128
  } ? [...TParent['matches'], ToMatch<TOptions, TProps>] : [ToMatch<Identity<TOptions & WithoutComponents>, TProps>];
125
129
  export type ToRoute<TOptions extends CreateRouteOptions, TProps extends CreateRouteProps<TOptions> | undefined = undefined> = CreateRouteOptions extends TOptions ? Route : TOptions extends {
126
130
  parent: infer TParent extends Route;
127
- } ? Route<ToName<TOptions['name']>, CombineUrl<TParent, ToUrl<TOptions & WithoutComponents>>, CombineMeta<ToMeta<TParent['meta']>, ToMeta<TOptions['meta']>>, CombineState<ToState<TParent['state']>, ToState<TOptions['state']>>, ToMatches<TOptions, CreateRouteProps<TOptions> extends TProps ? undefined : TProps>, [
131
+ } ? Route<ToName<TOptions['name']>, TOptions['hoist'] extends true ? ToUrl<TOptions & WithoutComponents> : CombineUrl<TParent, ToUrl<TOptions & WithoutComponents>>, CombineMeta<ToMeta<TParent['meta']>, ToMeta<TOptions['meta']>>, CombineState<ToState<TParent['state']>, ToState<TOptions['state']>>, ToMatches<TOptions, CreateRouteProps<TOptions> extends TProps ? undefined : TProps>, [
128
132
  ...ToRouteContext<TParent['context']>,
129
133
  ...ToRouteContext<TOptions['context']>
130
134
  ]> : Route<ToName<TOptions['name']>, ToUrl<Identity<TOptions & WithoutComponents>>, ToMeta<TOptions['meta']>, ToState<TOptions['state']>, ToMatches<TOptions, CreateRouteProps<TOptions> extends TProps ? undefined : TProps>, ToRouteContext<TOptions['context']>>;
@@ -1,15 +1,15 @@
1
- import { Hooks } from '../models/hooks';
2
- import { ResolvedRoute, RouterResolvedRouteUnion, ResolvedRouteUnion } from './resolved';
3
- import { MaybePromise } from './utilities';
4
- import { Route, Routes } from './route';
5
- import { RouterReject } from './routerReject';
6
- import { RouterPush } from './routerPush';
7
- import { RouterReplace } from './routerReplace';
8
- import { Rejection, Rejections } from './rejection';
9
- import { RouteContext, RouteContextToRejection, RouteContextToRoute } from './routeContext';
10
- import { RouterAbort } from './routerAbort';
11
- import { CallbackContextAbort, CallbackContextPush, CallbackContextReject, CallbackContextSuccess } from './callbackContext';
12
- import { RouteUpdate } from './routeUpdate';
1
+ import { Hooks } from '../../models/hooks';
2
+ import { ResolvedRoute, RouterResolvedRouteUnion, ResolvedRouteUnion } from '../../types/resolved';
3
+ import { MaybePromise } from '../../types/utilities';
4
+ import { Route, Routes } from '../../types/route';
5
+ import { RouterReject } from '../../types/routerReject';
6
+ import { RouterPush } from '../../types/routerPush';
7
+ import { RouterReplace } from '../../types/routerReplace';
8
+ import { Rejection, Rejections } from '../../types/rejection';
9
+ import { RouteContext, RouteContextToRejection, RouteContextToRoute } from '../../types/routeContext';
10
+ import { RouterAbort } from '../../types/routerAbort';
11
+ import { CallbackContextAbort, CallbackContextPush, CallbackContextReject, CallbackContextSuccess } from '../../types/callbackContext';
12
+ import { RouteUpdate } from '../../types/routeUpdate';
13
13
  export declare function getHooks(value: Record<string, unknown> | undefined | null): Hooks[];
14
14
  export declare function combineHooks(parent: Route, child: Route): Hooks[];
15
15
  export type InternalRouteHooks<TRoute extends Route = Route, TContext extends RouteContext[] | undefined = undefined> = {
@@ -1,5 +1,5 @@
1
- import { ValibotSchemaLike } from '../services/valibot';
2
- import { ZodSchemaLike } from '../services/zod';
1
+ import { ValibotSchemaLike } from '../../services/valibot';
2
+ import { ZodSchemaLike } from '../../services/zod';
3
3
  export type ParamExtras = {
4
4
  invalid: (message?: string) => never;
5
5
  };
@@ -1,4 +1,4 @@
1
- import { LiteralParam, Param, ParamGetSet, ParamGetter } from './paramTypes';
1
+ import { LiteralParam, Param, ParamGetSet, ParamGetter } from '../../types/paramTypes';
2
2
  import { StandardSchemaV1 } from '@standard-schema/spec';
3
3
  export declare const paramStart = "[";
4
4
  export type ParamStart = typeof paramStart;
@@ -1,5 +1,5 @@
1
- import { CreateRouteOptions, PropsGetter } from './createRouteOptions';
2
- import { Route } from './route';
1
+ import { CreateRouteOptions, PropsGetter } from '../../types/createRouteOptions';
2
+ import { Route } from '../../types/route';
3
3
  import { RouterReject } from './routerReject';
4
4
  import { RouterPush } from './routerPush';
5
5
  import { RouterReplace } from './routerReplace';
@@ -1,4 +1,4 @@
1
- import { Router } from './router';
1
+ import { Router } from '../../types/router';
2
2
  /**
3
3
  * Represents the state of currently registered router, and route meta. Used to provide correct type context for
4
4
  * components like `RouterLink`, as well as for composables like `useRouter`, `useRoute`, and hooks.
@@ -1,8 +1,8 @@
1
- import { Component, Ref } from 'vue';
2
- import { ResolvedRoute } from './resolved';
3
- import { Router } from './router';
4
- import { RouterReject } from './routerReject';
5
- import { Hooks } from '../models/hooks';
1
+ import { Ref } from 'vue';
2
+ import { Route } from '../../types/route';
3
+ import { Router } from '../../types/router';
4
+ import { RouterReject } from '../../types/routerReject';
5
+ import { Hooks } from '../../models/hooks';
6
6
  export declare const BUILT_IN_REJECTION_TYPES: readonly ["NotFound"];
7
7
  export type BuiltInRejectionType = (typeof BUILT_IN_REJECTION_TYPES)[number];
8
8
  export type RouterRejection<T extends Rejection = Rejection> = Ref<T | null>;
@@ -11,7 +11,7 @@ export declare const IS_REJECTION_SYMBOL: unique symbol;
11
11
  export declare function isRejection(value: unknown): value is Rejection & RejectionInternal;
12
12
  export type RejectionInternal = {
13
13
  [IS_REJECTION_SYMBOL]: true;
14
- route: ResolvedRoute;
14
+ route: Route;
15
15
  hooks: Hooks[];
16
16
  };
17
17
  /**
@@ -23,10 +23,6 @@ export type Rejection<TType extends string = string> = {
23
23
  * The type of rejection.
24
24
  */
25
25
  type: TType;
26
- /**
27
- * The component to render when the rejection occurs.
28
- */
29
- component: Component;
30
26
  };
31
27
  export type RejectionType<TRejections extends Rejections | undefined> = unknown extends TRejections ? never : Rejections extends TRejections ? string : undefined extends TRejections ? string : TRejections extends Rejections ? TRejections[number]['type'] : never;
32
28
  export type ExtractRejections<T> = T extends {
@@ -1,7 +1,7 @@
1
- import { Route, Routes } from './route';
2
- import { ExtractRouteStateParamsAsOptional } from './state';
3
- import { UrlString } from './urlString';
4
- import { UrlParamsReading } from './url';
1
+ import { Route, Routes } from '../../types/route';
2
+ import { ExtractRouteStateParamsAsOptional } from '../../types/state';
3
+ import { UrlString } from '../../types/urlString';
4
+ import { UrlParamsReading } from '../../types/url';
5
5
  /**
6
6
  * Represents a route that the router has matched to current browser location.
7
7
  * @template TRoute - Underlying Route that has been resolved.
@@ -1,12 +1,12 @@
1
- import { Param } from './paramTypes';
2
- import { PrefetchConfig } from './prefetch';
3
- import { RouteMeta } from './register';
4
- import { LastInArray } from './utilities';
5
- import { CreateRouteOptions } from './createRouteOptions';
6
- import { RouteContext } from './routeContext';
7
- import { Url } from './url';
8
- import { GetTitle } from './titles';
9
- import { Hooks } from '../models/hooks';
1
+ import { Param } from '../../types/paramTypes';
2
+ import { PrefetchConfig } from '../../types/prefetch';
3
+ import { RouteMeta } from '../../types/register';
4
+ import { LastInArray } from '../../types/utilities';
5
+ import { CreateRouteOptions } from '../../types/createRouteOptions';
6
+ import { RouteContext } from '../../types/routeContext';
7
+ import { Url } from '../../types/url';
8
+ import { GetRouteTitle } from '../../types/routeTitle';
9
+ import { Hooks } from '../../models/hooks';
10
10
  import { RouteRedirect } from './redirects';
11
11
  export declare const IS_ROUTE_SYMBOL: unique symbol;
12
12
  export declare function isRoute(value: unknown): value is Route & RouteInternal;
@@ -15,7 +15,7 @@ export type RouteInternal = {
15
15
  depth: number;
16
16
  hooks: Hooks[];
17
17
  redirect: RouteRedirect;
18
- getTitle: GetTitle;
18
+ getTitle: GetRouteTitle;
19
19
  };
20
20
  /**
21
21
  * Represents an immutable array of Route instances. Return value of `createRoute`, expected param for `createRouter`.
@@ -0,0 +1,22 @@
1
+ import { ResolvedRoute, ResolvedRouteUnion } from '../../types/resolved';
2
+ import { Route } from './route';
3
+ import { MaybePromise } from './utilities';
4
+ export type SetRouteTitleContext = {
5
+ from: ResolvedRoute;
6
+ getParentTitle: () => Promise<string | undefined>;
7
+ };
8
+ export type SetRouteTitleCallback<TRoute extends Route = Route> = (to: ResolvedRouteUnion<TRoute>, context: SetRouteTitleContext) => MaybePromise<string>;
9
+ export type GetRouteTitle<TRoute extends Route = Route> = (to: ResolvedRouteUnion<TRoute>) => Promise<string | undefined>;
10
+ export type SetRouteTitle<TRoute extends Route = Route> = (callback: SetRouteTitleCallback<TRoute>) => void;
11
+ export type RouteSetTitle<TRoute extends Route = Route> = {
12
+ /**
13
+ * Adds a callback to set the document title for the route.
14
+ */
15
+ setTitle: SetRouteTitle<TRoute>;
16
+ };
17
+ type CreateRouteTitle = {
18
+ setTitle: SetRouteTitle;
19
+ getTitle: GetRouteTitle;
20
+ };
21
+ export declare function createRouteTitle(parent?: Route): CreateRouteTitle;
22
+ export {};
@@ -1,5 +1,5 @@
1
- import { ResolvedRoute } from './resolved';
2
- import { RouterPushOptions } from './routerPush';
1
+ import { ResolvedRoute } from '../../types/resolved';
2
+ import { RouterPushOptions } from '../../types/routerPush';
3
3
  export type RouteUpdate<TRoute extends ResolvedRoute = ResolvedRoute> = ResolvedRoute extends TRoute ? {
4
4
  (paramName: string, paramValue: unknown, options?: RouterPushOptions): Promise<void>;
5
5
  (params: Partial<TRoute['params']>, options?: RouterPushOptions): Promise<void>;
@@ -1,5 +1,5 @@
1
- import { Route, Routes } from './route';
2
- import { RoutesName, RoutesMap } from './routesMap';
3
- import { UrlParamsWriting } from './url';
1
+ import { Route, Routes } from '../../types/route';
2
+ import { RoutesName, RoutesMap } from '../../types/routesMap';
3
+ import { UrlParamsWriting } from '../../types/url';
4
4
  export type RouteGetByKey<TRoutes extends Routes, TKey extends RoutesName<TRoutes>> = RoutesMap<TRoutes>[TKey];
5
5
  export type RouteParamsByKey<TRoutes extends Routes, TKey extends string> = RouteGetByKey<TRoutes, TKey> extends Route ? UrlParamsWriting<RouteGetByKey<TRoutes, TKey>> : Record<string, unknown>;
@@ -1,17 +1,17 @@
1
1
  import { App, InjectionKey, Ref } from 'vue';
2
- import { RouterHistoryMode } from '../services/createRouterHistory';
3
- import { RouterRoute } from './routerRoute';
4
- import { AddBeforeEnterHook, AddBeforeUpdateHook, AddBeforeLeaveHook, AddAfterEnterHook, AddAfterUpdateHook, AddAfterLeaveHook, AddErrorHook, AddRejectionHook } from './hooks';
5
- import { PrefetchConfig } from './prefetch';
6
- import { ResolvedRoute } from './resolved';
7
- import { Route, Routes } from './route';
8
- import { RouterPush } from './routerPush';
9
- import { RouterReplace } from './routerReplace';
10
- import { RouterResolve, RouterResolveOptions } from './routerResolve';
11
- import { RouterReject } from './routerReject';
12
- import { RouterPlugin } from './routerPlugin';
13
- import { RoutesName } from './routesMap';
14
- import { ExtractRejections, ExtractRejectionTypes, Rejections, BuiltInRejectionType } from './rejection';
2
+ import { RouterHistoryMode } from '../../services/createRouterHistory';
3
+ import { RouterRoute } from '../../types/routerRoute';
4
+ import { AddBeforeEnterHook, AddBeforeUpdateHook, AddBeforeLeaveHook, AddAfterEnterHook, AddAfterUpdateHook, AddAfterLeaveHook, AddErrorHook, AddRejectionHook } from '../../types/hooks';
5
+ import { PrefetchConfig } from '../../types/prefetch';
6
+ import { ResolvedRoute } from '../../types/resolved';
7
+ import { Route, Routes } from '../../types/route';
8
+ import { RouterPush } from '../../types/routerPush';
9
+ import { RouterReplace } from '../../types/routerReplace';
10
+ import { RouterResolve, RouterResolveOptions } from '../../types/routerResolve';
11
+ import { RouterReject } from '../../types/routerReject';
12
+ import { RouterPlugin } from '../../types/routerPlugin';
13
+ import { RoutesName } from '../../types/routesMap';
14
+ import { ExtractRejections, ExtractRejectionTypes, Rejections, BuiltInRejectionType } from '../../types/rejection';
15
15
  /**
16
16
  * Options to initialize a {@link Router} instance.
17
17
  */
@@ -1,8 +1,8 @@
1
- import { PrefetchConfig } from './prefetch';
2
- import { UrlString } from './urlString';
3
- import { ResolvedRoute } from './resolved';
4
- import { Router } from './router';
5
- import { RouterPushOptions } from './routerPush';
1
+ import { PrefetchConfig } from '../../types/prefetch';
2
+ import { UrlString } from '../../types/urlString';
3
+ import { ResolvedRoute } from '../../types/resolved';
4
+ import { Router } from '../../types/router';
5
+ import { RouterPushOptions } from '../../types/routerPush';
6
6
  export type ToCallback<TRouter extends Router> = (resolve: TRouter['resolve']) => ResolvedRoute | UrlString | undefined;
7
7
  export type RouterLinkProps<TRouter extends Router> = RouterPushOptions & {
8
8
  /**
@@ -13,4 +13,8 @@ export type RouterLinkProps<TRouter extends Router> = RouterPushOptions & {
13
13
  * Determines what assets are prefetched when router-link is rendered for this route. Overrides route level prefetch.
14
14
  */
15
15
  prefetch?: PrefetchConfig;
16
+ /**
17
+ * The target attribute for the anchor element.
18
+ */
19
+ target?: string;
16
20
  };
@@ -1,12 +1,12 @@
1
1
  import { HookRemove } from './hooks';
2
2
  import { Routes } from './route';
3
3
  import { Rejections } from './rejection';
4
- import { Hooks } from '../models/hooks';
4
+ import { Hooks } from '../../models/hooks';
5
5
  import { ResolvedRoute } from './resolved';
6
6
  import { RouterReject } from './routerReject';
7
7
  import { RouterPush } from './routerPush';
8
8
  import { RouterReplace } from './routerReplace';
9
- import { CallbackContextAbort } from '../services/createRouterCallbackContext';
9
+ import { CallbackContextAbort } from '../../services/createRouterCallbackContext';
10
10
  import { MaybePromise } from './utilities';
11
11
  export type EmptyRouterPlugin = RouterPlugin<[], []>;
12
12
  export declare const IS_ROUTER_PLUGIN_SYMBOL: unique symbol;
@@ -1,11 +1,11 @@
1
- import { Routes } from './route';
2
- import { RoutesName } from './routesMap';
3
- import { RouteParamsByKey } from './routeWithParams';
4
- import { RouteStateByName } from './state';
5
- import { UrlString } from './urlString';
6
- import { AllPropertiesAreOptional } from './utilities';
7
- import { QuerySource } from './querySource';
8
- import { ResolvedRoute } from './resolved';
1
+ import { Routes } from '../../types/route';
2
+ import { RoutesName } from '../../types/routesMap';
3
+ import { RouteParamsByKey } from '../../types/routeWithParams';
4
+ import { RouteStateByName } from '../../types/state';
5
+ import { UrlString } from '../../types/urlString';
6
+ import { AllPropertiesAreOptional } from '../../types/utilities';
7
+ import { QuerySource } from '../../types/querySource';
8
+ import { ResolvedRoute } from '../../types/resolved';
9
9
  export type RouterPushOptions<TState = unknown> = {
10
10
  /**
11
11
  * The query string to add to the url.
@@ -1,2 +1,2 @@
1
- import { BuiltInRejectionType, Rejections, RejectionType } from './rejection';
1
+ import { BuiltInRejectionType, Rejections, RejectionType } from '../../types/rejection';
2
2
  export type RouterReject<TRejections extends Rejections | undefined> = <TSource extends (RejectionType<TRejections> | BuiltInRejectionType)>(type: TSource) => void;
@@ -1,11 +1,11 @@
1
- import { Routes } from './route';
2
- import { RoutesName } from './routesMap';
3
- import { RouteParamsByKey } from './routeWithParams';
4
- import { RouteStateByName } from './state';
5
- import { UrlString } from './urlString';
6
- import { AllPropertiesAreOptional } from './utilities';
7
- import { QuerySource } from './querySource';
8
- import { ResolvedRoute } from './resolved';
1
+ import { Routes } from '../../types/route';
2
+ import { RoutesName } from '../../types/routesMap';
3
+ import { RouteParamsByKey } from '../../types/routeWithParams';
4
+ import { RouteStateByName } from '../../types/state';
5
+ import { UrlString } from '../../types/urlString';
6
+ import { AllPropertiesAreOptional } from '../../types/utilities';
7
+ import { QuerySource } from '../../types/querySource';
8
+ import { ResolvedRoute } from '../../types/resolved';
9
9
  export type RouterReplaceOptions<TState = unknown> = {
10
10
  query?: QuerySource;
11
11
  hash?: string;
@@ -1,10 +1,10 @@
1
- import { Routes } from './route';
2
- import { RoutesName } from './routesMap';
3
- import { RouteParamsByKey } from './routeWithParams';
4
- import { AllPropertiesAreOptional } from './utilities';
5
- import { QuerySource } from './querySource';
6
- import { ResolvedRoute } from './resolved';
7
- import { RouteStateByName } from './state';
1
+ import { Routes } from '../../types/route';
2
+ import { RoutesName } from '../../types/routesMap';
3
+ import { RouteParamsByKey } from '../../types/routeWithParams';
4
+ import { AllPropertiesAreOptional } from '../../types/utilities';
5
+ import { QuerySource } from '../../types/querySource';
6
+ import { ResolvedRoute } from '../../types/resolved';
7
+ import { RouteStateByName } from '../../types/state';
8
8
  export type RouterResolveOptions<TState = unknown> = {
9
9
  query?: QuerySource;
10
10
  hash?: string;
@@ -1,6 +1,6 @@
1
- import { RouteUpdate } from './routeUpdate';
2
- import { ResolvedRoute } from './resolved';
3
- import { QuerySource } from './querySource';
1
+ import { RouteUpdate } from '../../types/routeUpdate';
2
+ import { ResolvedRoute } from '../../types/resolved';
3
+ import { QuerySource } from '../../types/querySource';
4
4
  export type RouterRoute<TRoute extends ResolvedRoute = ResolvedRoute> = {
5
5
  /**
6
6
  * Unique identifier for the route, generated by router.
@@ -1,5 +1,5 @@
1
- import { Route, Routes } from './route';
2
- import { StringHasValue } from '../utilities/guards';
1
+ import { Route, Routes } from '../../types/route';
2
+ import { StringHasValue } from '../../utilities/guards';
3
3
  type IsRouteUnnamed<T extends Route> = StringHasValue<T['name']> extends true ? false : true;
4
4
  type AsNamedRoute<T extends Route> = IsRouteUnnamed<T> extends true ? never : T;
5
5
  export type RoutesMap<TRoutes extends Routes = []> = {
@@ -1,9 +1,9 @@
1
- import { ExtractParamName, ExtractParamType } from './params';
2
- import { Param } from './paramTypes';
3
- import { Routes } from './route';
4
- import { RouteGetByKey } from './routeWithParams';
5
- import { MakeOptional } from '../utilities/makeOptional';
6
- import { Identity } from './utilities';
1
+ import { ExtractParamName, ExtractParamType } from '../../types/params';
2
+ import { Param } from '../../types/paramTypes';
3
+ import { Routes } from '../../types/route';
4
+ import { RouteGetByKey } from '../../types/routeWithParams';
5
+ import { MakeOptional } from '../../utilities/makeOptional';
6
+ import { Identity } from '../../types/utilities';
7
7
  export type ToState<TState extends Record<string, Param> | undefined> = TState extends undefined ? Record<string, Param> : unknown extends TState ? {} : TState;
8
8
  export type ExtractRouteStateParamsAsOptional<TParams extends Record<string, Param>> = {
9
9
  [K in keyof TParams]: ExtractParamType<TParams[K]> | undefined;
@@ -1,9 +1,9 @@
1
- import { OptionalUrlParam, UrlQueryPart, ToUrlQueryPart, RequiredUrlParam, ToUrlPart, UrlParams, UrlPart } from '../services/withParams';
2
- import { ExtractParamType } from './params';
3
- import { AllPropertiesAreOptional, Identity } from './utilities';
4
- import { UrlString } from './urlString';
5
- import { ParamGetSet } from './paramTypes';
6
- import { MakeOptional } from '../utilities/makeOptional';
1
+ import { OptionalUrlParam, UrlQueryPart, ToUrlQueryPart, RequiredUrlParam, ToUrlPart, UrlParams, UrlPart } from '../../services/withParams';
2
+ import { ExtractParamType } from '../../types/params';
3
+ import { AllPropertiesAreOptional, Identity } from '../../types/utilities';
4
+ import { UrlString } from '../../types/urlString';
5
+ import { ParamGetSet } from '../../types/paramTypes';
6
+ import { MakeOptional } from '../../utilities/makeOptional';
7
7
  export declare const IS_URL_SYMBOL: unique symbol;
8
8
  export type UrlInternal = {
9
9
  [IS_URL_SYMBOL]: true;