mobx-route 0.14.2 → 0.16.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.
Files changed (203) hide show
  1. package/README.md +5 -7
  2. package/dist/core/config/config.cjs +43 -0
  3. package/dist/core/config/config.d.cts +7 -0
  4. package/dist/core/config/config.d.cts.map +1 -0
  5. package/{core → dist/core}/config/config.d.ts +1 -1
  6. package/{core → dist/core}/config/config.d.ts.map +1 -1
  7. package/dist/core/config/config.types.cjs +2 -0
  8. package/dist/core/config/config.types.d.cts +11 -0
  9. package/dist/core/config/config.types.d.cts.map +1 -0
  10. package/{core → dist/core}/config/config.types.d.ts +1 -1
  11. package/dist/core/config/config.types.d.ts.map +1 -0
  12. package/dist/core/config/index.cjs +18 -0
  13. package/dist/core/config/index.d.cts +3 -0
  14. package/dist/core/config/index.d.cts.map +1 -0
  15. package/dist/core/config/index.d.ts +3 -0
  16. package/dist/core/config/index.d.ts.map +1 -0
  17. package/dist/core/config/index.js +2 -0
  18. package/dist/core/index.cjs +21 -0
  19. package/dist/core/index.d.cts +6 -0
  20. package/dist/core/index.d.cts.map +1 -0
  21. package/dist/core/index.d.ts +6 -0
  22. package/dist/core/index.d.ts.map +1 -0
  23. package/dist/core/index.js +5 -0
  24. package/dist/core/route/index.cjs +18 -0
  25. package/dist/core/route/index.d.cts +3 -0
  26. package/dist/core/route/index.d.cts.map +1 -0
  27. package/dist/core/route/index.d.ts +3 -0
  28. package/dist/core/route/index.d.ts.map +1 -0
  29. package/dist/core/route/index.js +2 -0
  30. package/dist/core/route/route.cjs +296 -0
  31. package/dist/core/route/route.d.cts +107 -0
  32. package/dist/core/route/route.d.cts.map +1 -0
  33. package/{core → dist/core}/route/route.d.ts +1 -1
  34. package/dist/core/route/route.d.ts.map +1 -0
  35. package/{core → dist/core}/route/route.js +1 -1
  36. package/dist/core/route/route.types.cjs +2 -0
  37. package/dist/core/route/route.types.d.cts +142 -0
  38. package/dist/core/route/route.types.d.cts.map +1 -0
  39. package/{core → dist/core}/route/route.types.d.ts +4 -4
  40. package/dist/core/route/route.types.d.ts.map +1 -0
  41. package/dist/core/route-group/index.cjs +18 -0
  42. package/dist/core/route-group/index.d.cts +3 -0
  43. package/dist/core/route-group/index.d.cts.map +1 -0
  44. package/dist/core/route-group/index.d.ts +3 -0
  45. package/{core → dist/core}/route-group/index.d.ts.map +1 -1
  46. package/dist/core/route-group/index.js +2 -0
  47. package/dist/core/route-group/route-group.cjs +67 -0
  48. package/dist/core/route-group/route-group.d.cts +31 -0
  49. package/dist/core/route-group/route-group.d.cts.map +1 -0
  50. package/{core → dist/core}/route-group/route-group.d.ts +1 -1
  51. package/dist/core/route-group/route-group.d.ts.map +1 -0
  52. package/dist/core/route-group/route-group.types.cjs +2 -0
  53. package/dist/core/route-group/route-group.types.d.cts +15 -0
  54. package/dist/core/route-group/route-group.types.d.cts.map +1 -0
  55. package/{core → dist/core}/route-group/route-group.types.d.ts +3 -3
  56. package/dist/core/route-group/route-group.types.d.ts.map +1 -0
  57. package/dist/core/router/index.cjs +18 -0
  58. package/dist/core/router/index.d.cts +3 -0
  59. package/dist/core/router/index.d.cts.map +1 -0
  60. package/dist/core/router/index.d.ts +3 -0
  61. package/dist/core/router/index.d.ts.map +1 -0
  62. package/dist/core/router/index.js +2 -0
  63. package/dist/core/router/router.cjs +42 -0
  64. package/dist/core/router/router.d.cts +18 -0
  65. package/dist/core/router/router.d.cts.map +1 -0
  66. package/{core → dist/core}/router/router.d.ts +2 -2
  67. package/dist/core/router/router.d.ts.map +1 -0
  68. package/{core → dist/core}/router/router.js +1 -1
  69. package/dist/core/router/router.types.cjs +2 -0
  70. package/dist/core/router/router.types.d.cts +13 -0
  71. package/dist/core/router/router.types.d.cts.map +1 -0
  72. package/{core → dist/core}/router/router.types.d.ts +3 -3
  73. package/dist/core/router/router.types.d.ts.map +1 -0
  74. package/dist/core/utils/is-route-entity.cjs +5 -0
  75. package/dist/core/utils/is-route-entity.d.cts +3 -0
  76. package/dist/core/utils/is-route-entity.d.cts.map +1 -0
  77. package/dist/core/utils/is-route-entity.d.ts +3 -0
  78. package/{core → dist/core}/utils/is-route-entity.d.ts.map +1 -1
  79. package/dist/core/virtual-route/index.cjs +18 -0
  80. package/dist/core/virtual-route/index.d.cts +3 -0
  81. package/dist/core/virtual-route/index.d.cts.map +1 -0
  82. package/dist/core/virtual-route/index.d.ts +3 -0
  83. package/{core → dist/core}/virtual-route/index.d.ts.map +1 -1
  84. package/dist/core/virtual-route/index.js +2 -0
  85. package/dist/core/virtual-route/virtual-route.cjs +133 -0
  86. package/dist/core/virtual-route/virtual-route.d.cts +39 -0
  87. package/dist/core/virtual-route/virtual-route.d.cts.map +1 -0
  88. package/{core → dist/core}/virtual-route/virtual-route.d.ts +1 -1
  89. package/dist/core/virtual-route/virtual-route.d.ts.map +1 -0
  90. package/{core → dist/core}/virtual-route/virtual-route.js +1 -1
  91. package/dist/core/virtual-route/virtual-route.types.cjs +2 -0
  92. package/dist/core/virtual-route/virtual-route.types.d.cts +57 -0
  93. package/dist/core/virtual-route/virtual-route.types.d.cts.map +1 -0
  94. package/{core → dist/core}/virtual-route/virtual-route.types.d.ts +2 -2
  95. package/dist/core/virtual-route/virtual-route.types.d.ts.map +1 -0
  96. package/dist/index.cjs +18 -0
  97. package/dist/index.d.cts +3 -0
  98. package/dist/index.d.cts.map +1 -0
  99. package/dist/index.d.ts +3 -0
  100. package/{index.d.ts.map → dist/index.d.ts.map} +1 -1
  101. package/{index.js → dist/index.js} +1 -1
  102. package/dist/react/components/index.cjs +21 -0
  103. package/dist/react/components/index.d.cts +4 -0
  104. package/dist/react/components/index.d.cts.map +1 -0
  105. package/dist/react/components/index.d.ts +4 -0
  106. package/{react → dist/react}/components/index.d.ts.map +1 -1
  107. package/dist/react/components/index.js +5 -0
  108. package/dist/react/components/link.cjs +79 -0
  109. package/dist/react/components/link.d.cts +23 -0
  110. package/dist/react/components/link.d.cts.map +1 -0
  111. package/{react → dist/react}/components/link.d.ts +1 -1
  112. package/dist/react/components/link.d.ts.map +1 -0
  113. package/{react → dist/react}/components/link.js +2 -4
  114. package/dist/react/components/route-view-group.cjs +57 -0
  115. package/dist/react/components/route-view-group.d.cts +26 -0
  116. package/dist/react/components/route-view-group.d.cts.map +1 -0
  117. package/{react → dist/react}/components/route-view-group.d.ts +1 -1
  118. package/dist/react/components/route-view-group.d.ts.map +1 -0
  119. package/{react → dist/react}/components/route-view-group.js +3 -3
  120. package/dist/react/components/route-view.cjs +43 -0
  121. package/dist/react/components/route-view.d.cts +25 -0
  122. package/dist/react/components/route-view.d.cts.map +1 -0
  123. package/{react → dist/react}/components/route-view.d.ts +1 -1
  124. package/dist/react/components/route-view.d.ts.map +1 -0
  125. package/dist/react/index.cjs +17 -0
  126. package/dist/react/index.d.cts +2 -0
  127. package/dist/react/index.d.cts.map +1 -0
  128. package/dist/react/index.d.ts +2 -0
  129. package/dist/react/index.d.ts.map +1 -0
  130. package/dist/react/index.js +1 -0
  131. package/dist/view-model/index.cjs +17 -0
  132. package/dist/view-model/index.d.cts +2 -0
  133. package/dist/view-model/index.d.cts.map +1 -0
  134. package/dist/view-model/index.d.ts +2 -0
  135. package/dist/view-model/index.d.ts.map +1 -0
  136. package/dist/view-model/index.js +1 -0
  137. package/dist/view-model/route-view-model.cjs +37 -0
  138. package/dist/view-model/route-view-model.d.cts +13 -0
  139. package/dist/view-model/route-view-model.d.cts.map +1 -0
  140. package/{view-model → dist/view-model}/route-view-model.d.ts +1 -1
  141. package/dist/view-model/route-view-model.d.ts.map +1 -0
  142. package/{view-model → dist/view-model}/route-view-model.js +1 -1
  143. package/package.json +41 -132
  144. package/assets/logo.png +0 -0
  145. package/assets/logo.pxz +0 -0
  146. package/assets/new-logo.pxz +0 -0
  147. package/core/config/config.types.d.ts.map +0 -1
  148. package/core/config/index.d.ts +0 -3
  149. package/core/config/index.d.ts.map +0 -1
  150. package/core/config/index.js +0 -2
  151. package/core/index.d.ts +0 -6
  152. package/core/index.d.ts.map +0 -1
  153. package/core/index.js +0 -5
  154. package/core/route/index.d.ts +0 -3
  155. package/core/route/index.d.ts.map +0 -1
  156. package/core/route/index.js +0 -2
  157. package/core/route/route.d.ts.map +0 -1
  158. package/core/route/route.test.d.ts +0 -19
  159. package/core/route/route.test.d.ts.map +0 -1
  160. package/core/route/route.test.js +0 -250
  161. package/core/route/route.types.d.ts.map +0 -1
  162. package/core/route-group/index.d.ts +0 -3
  163. package/core/route-group/index.js +0 -2
  164. package/core/route-group/route-group.d.ts.map +0 -1
  165. package/core/route-group/route-group.types.d.ts.map +0 -1
  166. package/core/router/index.d.ts +0 -3
  167. package/core/router/index.d.ts.map +0 -1
  168. package/core/router/index.js +0 -2
  169. package/core/router/router.d.ts.map +0 -1
  170. package/core/router/router.types.d.ts.map +0 -1
  171. package/core/utils/build-url.d.ts +0 -3
  172. package/core/utils/build-url.d.ts.map +0 -1
  173. package/core/utils/build-url.js +0 -12
  174. package/core/utils/is-route-entity.d.ts +0 -3
  175. package/core/virtual-route/index.d.ts +0 -3
  176. package/core/virtual-route/index.js +0 -2
  177. package/core/virtual-route/virtual-route.d.ts.map +0 -1
  178. package/core/virtual-route/virtual-route.types.d.ts.map +0 -1
  179. package/index.d.ts +0 -3
  180. package/react/components/index.d.ts +0 -4
  181. package/react/components/index.js +0 -5
  182. package/react/components/link.d.ts.map +0 -1
  183. package/react/components/route-view-group.d.ts.map +0 -1
  184. package/react/components/route-view-group.test.d.ts +0 -2
  185. package/react/components/route-view-group.test.d.ts.map +0 -1
  186. package/react/components/route-view-group.test.js +0 -101
  187. package/react/components/route-view.d.ts.map +0 -1
  188. package/react/index.d.ts +0 -2
  189. package/react/index.d.ts.map +0 -1
  190. package/react/index.js +0 -1
  191. package/view-model/index.d.ts +0 -2
  192. package/view-model/index.d.ts.map +0 -1
  193. package/view-model/index.js +0 -1
  194. package/view-model/route-view-model.d.ts.map +0 -1
  195. /package/{core → dist/core}/config/config.js +0 -0
  196. /package/{core → dist/core}/config/config.types.js +0 -0
  197. /package/{core → dist/core}/route/route.types.js +0 -0
  198. /package/{core → dist/core}/route-group/route-group.js +0 -0
  199. /package/{core → dist/core}/route-group/route-group.types.js +0 -0
  200. /package/{core → dist/core}/router/router.types.js +0 -0
  201. /package/{core → dist/core}/utils/is-route-entity.js +0 -0
  202. /package/{core → dist/core}/virtual-route/virtual-route.types.js +0 -0
  203. /package/{react → dist/react}/components/route-view.js +0 -0
@@ -0,0 +1,23 @@
1
+ import { type AnchorHTMLAttributes } from 'react';
2
+ import type { IsPartial } from 'yummies/utils/types';
3
+ import { type AnyRoute, type InputPathParams, type RouteNavigateParams } from "../../core/index.cjs";
4
+ interface LinkAnchorProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
5
+ asChild?: boolean;
6
+ }
7
+ type LinkPathRouteProps<TRoute extends AnyRoute> = {
8
+ to: TRoute;
9
+ } & (IsPartial<InputPathParams<TRoute['path']>> extends true ? {
10
+ params?: InputPathParams<TRoute['path']> | null | undefined;
11
+ } : {
12
+ params: InputPathParams<TRoute['path']>;
13
+ });
14
+ type LinkSimpleRouteProps = {
15
+ to: string;
16
+ } | {
17
+ href: string;
18
+ };
19
+ export type LinkProps<TRoute extends AnyRoute> = LinkAnchorProps & RouteNavigateParams & (LinkPathRouteProps<TRoute> | LinkSimpleRouteProps);
20
+ type LinkComponentType = <TRoute extends AnyRoute>(props: LinkProps<TRoute>) => React.ReactNode;
21
+ export declare const Link: LinkComponentType;
22
+ export {};
23
+ //# sourceMappingURL=link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../src/react/components/link.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,oBAAoB,EAO1B,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,mBAAmB,EAEzB,6BAA4B;AAE7B,UAAU,eACR,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,KAAK,kBAAkB,CAAC,MAAM,SAAS,QAAQ,IAAI;IACjD,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,IAAI,GACxD;IACE,MAAM,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;CAC7D,GACD;IAAE,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;CAAE,CAAC,CAAC;AAEjD,KAAK,oBAAoB,GACrB;IACE,EAAE,EAAE,MAAM,CAAC;CACZ,GACD;IACE,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEN,MAAM,MAAM,SAAS,CAAC,MAAM,SAAS,QAAQ,IAAI,eAAe,GAC9D,mBAAmB,GACnB,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,oBAAoB,CAAC,CAAC;AAEtD,KAAK,iBAAiB,GAAG,CAAC,MAAM,SAAS,QAAQ,EAC/C,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,KACrB,KAAK,CAAC,SAAS,CAAC;AAErB,eAAO,MAAM,IAAI,EA0HD,iBAAiB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type AnchorHTMLAttributes } from 'react';
2
2
  import type { IsPartial } from 'yummies/utils/types';
3
- import { type AnyRoute, type InputPathParams, type RouteNavigateParams } from '../../core/index.js';
3
+ import { type AnyRoute, type InputPathParams, type RouteNavigateParams } from "../../core/index.js";
4
4
  interface LinkAnchorProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
5
5
  asChild?: boolean;
6
6
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../src/react/components/link.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,oBAAoB,EAO1B,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,mBAAmB,EAEzB,4BAA4B;AAE7B,UAAU,eACR,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,KAAK,kBAAkB,CAAC,MAAM,SAAS,QAAQ,IAAI;IACjD,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,IAAI,GACxD;IACE,MAAM,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;CAC7D,GACD;IAAE,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;CAAE,CAAC,CAAC;AAEjD,KAAK,oBAAoB,GACrB;IACE,EAAE,EAAE,MAAM,CAAC;CACZ,GACD;IACE,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEN,MAAM,MAAM,SAAS,CAAC,MAAM,SAAS,QAAQ,IAAI,eAAe,GAC9D,mBAAmB,GACnB,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,oBAAoB,CAAC,CAAC;AAEtD,KAAK,iBAAiB,GAAG,CAAC,MAAM,SAAS,QAAQ,EAC/C,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,KACrB,KAAK,CAAC,SAAS,CAAC;AAErB,eAAO,MAAM,IAAI,EA0HD,iBAAiB,CAAC"}
@@ -3,7 +3,7 @@ import { buildSearchString, parseSearchString } from 'mobx-location-history';
3
3
  import { observer } from 'mobx-react-lite';
4
4
  import { cloneElement, forwardRef, isValidElement, useMemo, useRef, } from 'react';
5
5
  import { isShallowEqual } from 'yummies/data';
6
- import { routeConfig, } from '../../core/index.js';
6
+ import { routeConfig, } from "../../core/index.js";
7
7
  export const Link = observer(forwardRef(({ to, href: outerHref, mergeQuery, asChild, children, params,
8
8
  // route navigate params
9
9
  query, replace, state, ...outerAnchorProps }, ref) => {
@@ -72,7 +72,5 @@ query, replace, state, ...outerAnchorProps }, ref) => {
72
72
  rel: outerAnchorProps.rel ??
73
73
  (isExternalNavigation ? 'noopener noreferrer' : undefined),
74
74
  };
75
- return asChild && isValidElement(children) ? (
76
- // @ts-ignore
77
- cloneElement(children, anchorProps)) : (_jsx("a", { ...anchorProps, ref: ref, children: children }));
75
+ return asChild && isValidElement(children) ? (cloneElement(children, anchorProps)) : (_jsx("a", { ...anchorProps, ref: ref, children: children }));
78
76
  }));
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RouteViewGroup = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const mobx_location_history_1 = require("mobx-location-history");
6
+ const mobx_react_lite_1 = require("mobx-react-lite");
7
+ const react_1 = require("react");
8
+ const index_js_1 = require("../../core/index.cjs");
9
+ const is_route_entity_js_1 = require("../../core/utils/is-route-entity.cjs");
10
+ exports.RouteViewGroup = (0, mobx_react_lite_1.observer)(({ children, layout: Layout, otherwise: otherwiseNavigation,
11
+ // @ts-expect-error
12
+ params, ...navigateParams }) => {
13
+ let activeChildNode = null;
14
+ let lastInactiveChildNode = null;
15
+ const childNodes = Array.isArray(children)
16
+ ? children
17
+ : [children];
18
+ for (const childNode of childNodes) {
19
+ if ((0, react_1.isValidElement)(childNode) &&
20
+ // @ts-expect-error redundand checks better to wrap in this directive
21
+ (0, is_route_entity_js_1.isRouteEntity)(childNode.props?.route) &&
22
+ // @ts-expect-error redundand checks better to wrap in this directive
23
+ childNode.props.route.isOpened) {
24
+ activeChildNode = childNode;
25
+ break;
26
+ }
27
+ else {
28
+ lastInactiveChildNode = childNode;
29
+ }
30
+ }
31
+ const hasActiveChildNode = !!activeChildNode;
32
+ (0, react_1.useEffect)(() => {
33
+ if (!hasActiveChildNode && otherwiseNavigation) {
34
+ if (typeof otherwiseNavigation === 'string') {
35
+ const history = index_js_1.routeConfig.get().history;
36
+ const url = `${otherwiseNavigation}${(0, mobx_location_history_1.buildSearchString)(navigateParams.query || {})}`;
37
+ if (navigateParams.replace) {
38
+ history.replace(url, navigateParams.state);
39
+ }
40
+ else {
41
+ history.push(url, navigateParams.state);
42
+ }
43
+ }
44
+ else if (!otherwiseNavigation.isOpened) {
45
+ otherwiseNavigation.open(params, navigateParams);
46
+ }
47
+ }
48
+ }, [hasActiveChildNode, otherwiseNavigation]);
49
+ if (otherwiseNavigation && !activeChildNode) {
50
+ return null;
51
+ }
52
+ const resultNodeToRender = activeChildNode ?? lastInactiveChildNode ?? null;
53
+ if (Layout) {
54
+ return (0, jsx_runtime_1.jsx)(Layout, { children: resultNodeToRender });
55
+ }
56
+ return resultNodeToRender;
57
+ });
@@ -0,0 +1,26 @@
1
+ import type { IsPartial, Maybe } from 'yummies/utils/types';
2
+ import { type AnyRouteEntity, type RouteNavigateParams, type RouteParams } from "../../core/index.cjs";
3
+ type LayoutComponent = React.ComponentType<{
4
+ children?: React.ReactNode;
5
+ }> | React.ComponentType<{
6
+ children: React.ReactNode;
7
+ }>;
8
+ interface BaseProps extends RouteNavigateParams {
9
+ children: React.ReactNode;
10
+ layout?: LayoutComponent;
11
+ }
12
+ type PropsWithDefaultRoute<TRoute extends AnyRouteEntity> = BaseProps & {
13
+ otherwise?: TRoute;
14
+ } & (IsPartial<RouteParams<TRoute>> extends true ? {
15
+ params?: Maybe<RouteParams<TRoute>>;
16
+ } : {
17
+ params: RouteParams<TRoute>;
18
+ });
19
+ type PropsWithDefaultUrl = BaseProps & {
20
+ otherwise?: string;
21
+ };
22
+ export type RouteViewGroupProps<TRoute extends AnyRouteEntity> = PropsWithDefaultRoute<TRoute> | PropsWithDefaultUrl;
23
+ type RouteViewGroupComponent = <TRoute extends AnyRouteEntity>(props: RouteViewGroupProps<TRoute>) => React.ReactNode;
24
+ export declare const RouteViewGroup: RouteViewGroupComponent;
25
+ export {};
26
+ //# sourceMappingURL=route-view-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-view-group.d.ts","sourceRoot":"","sources":["../../../src/react/components/route-view-group.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAEjB,6BAA4B;AAG7B,KAAK,eAAe,GAChB,KAAK,CAAC,aAAa,CAAC;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC,GACnD,KAAK,CAAC,aAAa,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC,CAAC;AAEvD,UAAU,SAAU,SAAQ,mBAAmB;IAC7C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B;AAED,KAAK,qBAAqB,CAAC,MAAM,SAAS,cAAc,IAAI,SAAS,GAAG;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,SAAS,IAAI,GAC1C;IACE,MAAM,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;CACrC,GACD;IACE,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC7B,CAAC,CAAC;AAET,KAAK,mBAAmB,GAAG,SAAS,GAAG;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,mBAAmB,CAAC,MAAM,SAAS,cAAc,IACzD,qBAAqB,CAAC,MAAM,CAAC,GAC7B,mBAAmB,CAAC;AAExB,KAAK,uBAAuB,GAAG,CAAC,MAAM,SAAS,cAAc,EAC3D,KAAK,EAAE,mBAAmB,CAAC,MAAM,CAAC,KAC/B,KAAK,CAAC,SAAS,CAAC;AAErB,eAAO,MAAM,cAAc,EA8DX,uBAAuB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { IsPartial, Maybe } from 'yummies/utils/types';
2
- import { type AnyRouteEntity, type RouteNavigateParams, type RouteParams } from '../../core/index.js';
2
+ import { type AnyRouteEntity, type RouteNavigateParams, type RouteParams } from "../../core/index.js";
3
3
  type LayoutComponent = React.ComponentType<{
4
4
  children?: React.ReactNode;
5
5
  }> | React.ComponentType<{
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-view-group.d.ts","sourceRoot":"","sources":["../../../src/react/components/route-view-group.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAEjB,4BAA4B;AAG7B,KAAK,eAAe,GAChB,KAAK,CAAC,aAAa,CAAC;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC,GACnD,KAAK,CAAC,aAAa,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC,CAAC;AAEvD,UAAU,SAAU,SAAQ,mBAAmB;IAC7C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B;AAED,KAAK,qBAAqB,CAAC,MAAM,SAAS,cAAc,IAAI,SAAS,GAAG;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,SAAS,IAAI,GAC1C;IACE,MAAM,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;CACrC,GACD;IACE,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC7B,CAAC,CAAC;AAET,KAAK,mBAAmB,GAAG,SAAS,GAAG;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,mBAAmB,CAAC,MAAM,SAAS,cAAc,IACzD,qBAAqB,CAAC,MAAM,CAAC,GAC7B,mBAAmB,CAAC;AAExB,KAAK,uBAAuB,GAAG,CAAC,MAAM,SAAS,cAAc,EAC3D,KAAK,EAAE,mBAAmB,CAAC,MAAM,CAAC,KAC/B,KAAK,CAAC,SAAS,CAAC;AAErB,eAAO,MAAM,cAAc,EA8DX,uBAAuB,CAAC"}
@@ -2,10 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { buildSearchString } from 'mobx-location-history';
3
3
  import { observer } from 'mobx-react-lite';
4
4
  import { isValidElement, useEffect } from 'react';
5
- import { routeConfig, } from '../../core/index.js';
6
- import { isRouteEntity } from '../../core/utils/is-route-entity.js';
5
+ import { routeConfig, } from "../../core/index.js";
6
+ import { isRouteEntity } from "../../core/utils/is-route-entity.js";
7
7
  export const RouteViewGroup = observer(({ children, layout: Layout, otherwise: otherwiseNavigation,
8
- // @ts-ignore
8
+ // @ts-expect-error
9
9
  params, ...navigateParams }) => {
10
10
  let activeChildNode = null;
11
11
  let lastInactiveChildNode = null;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RouteView = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const mobx_react_lite_1 = require("mobx-react-lite");
6
+ const react_1 = require("react");
7
+ const react_simple_loadable_1 = require("react-simple-loadable");
8
+ function RouteViewBase(props) {
9
+ // @ts-expect-error redundand pass first argument
10
+ const lazyViewComponentRef = (0, react_1.useRef)();
11
+ let Component;
12
+ if (!('route' in props)) {
13
+ return typeof props.children === 'function'
14
+ ? props.children()
15
+ : props.children;
16
+ }
17
+ if (!props.route.isOpened) {
18
+ return props.fallback ?? null;
19
+ }
20
+ if (props.loadView) {
21
+ if (!lazyViewComponentRef.current) {
22
+ lazyViewComponentRef.current = (0, react_simple_loadable_1.loadable)({
23
+ load: () => props.loadView(props.route),
24
+ loading: props.loading,
25
+ preload: props.preload,
26
+ throwOnError: props.throwOnError,
27
+ });
28
+ }
29
+ Component = lazyViewComponentRef.current;
30
+ }
31
+ else {
32
+ Component = props.view;
33
+ }
34
+ const params = 'params' in props.route ? props.route.params : {};
35
+ if (Component) {
36
+ return (0, jsx_runtime_1.jsx)(Component, { params: params, children: props.children });
37
+ }
38
+ if (typeof props.children === 'function') {
39
+ return props.children(params, props.route);
40
+ }
41
+ return props.children;
42
+ }
43
+ exports.RouteView = (0, mobx_react_lite_1.observer)(RouteViewBase);
@@ -0,0 +1,25 @@
1
+ import { type LoadableConfig } from 'react-simple-loadable';
2
+ import type { AnyAbstractRouteEntity, AnyRoute, AnyVirtualRoute } from "../../core/index.cjs";
3
+ export type RouteViewComponent<TRoute extends AnyAbstractRouteEntity> = React.ComponentType<RouteViewProps<TRoute>>;
4
+ interface RouteViewConfigWithoutRoute {
5
+ children?: React.ReactNode | (() => React.ReactNode);
6
+ }
7
+ export interface RouteViewConfigWithRoute<TRoute extends AnyAbstractRouteEntity> extends Pick<LoadableConfig, 'loading' | 'preload' | 'throwOnError'> {
8
+ route: TRoute;
9
+ view?: RouteViewComponent<TRoute>;
10
+ loadView?: (route: TRoute) => Promise<RouteViewComponent<TRoute>>;
11
+ /**
12
+ * Case when route is not opened
13
+ */
14
+ fallback?: React.ReactNode;
15
+ children?: React.ReactNode | ((params: RouteViewProps<TRoute>['params'], route: TRoute) => React.ReactNode);
16
+ }
17
+ export type RouteViewConfig<TRoute extends AnyAbstractRouteEntity> = RouteViewConfigWithRoute<TRoute> | RouteViewConfigWithoutRoute;
18
+ export type RouteViewProps<TRoute extends AnyAbstractRouteEntity> = {
19
+ children?: React.ReactNode;
20
+ params: TRoute extends AnyRoute ? Exclude<TRoute['params'], null | undefined> : TRoute extends AnyVirtualRoute ? TRoute['params'] : never;
21
+ };
22
+ type RouteViewBaseComponent = <TRoute extends AnyAbstractRouteEntity>(props: RouteViewConfig<TRoute>) => React.ReactNode;
23
+ export declare const RouteView: RouteViewBaseComponent;
24
+ export {};
25
+ //# sourceMappingURL=route-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-view.d.ts","sourceRoot":"","sources":["../../../src/react/components/route-view.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EACV,sBAAsB,EACtB,QAAQ,EACR,eAAe,EAChB,6BAA4B;AAE7B,MAAM,MAAM,kBAAkB,CAAC,MAAM,SAAS,sBAAsB,IAClE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;AAE9C,UAAU,2BAA2B;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,wBAAwB,CAAC,MAAM,SAAS,sBAAsB,CAC7E,SAAQ,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;IAClE;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EACL,KAAK,CAAC,SAAS,GACf,CAAC,CACC,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EACxC,KAAK,EAAE,MAAM,KACV,KAAK,CAAC,SAAS,CAAC,CAAC;CAC3B;AAED,MAAM,MAAM,eAAe,CAAC,MAAM,SAAS,sBAAsB,IAC7D,wBAAwB,CAAC,MAAM,CAAC,GAChC,2BAA2B,CAAC;AAEhC,MAAM,MAAM,cAAc,CAAC,MAAM,SAAS,sBAAsB,IAAI;IAClE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,EAAE,MAAM,SAAS,QAAQ,GAC3B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC,GAC3C,MAAM,SAAS,eAAe,GAC5B,MAAM,CAAC,QAAQ,CAAC,GAChB,KAAK,CAAC;CACb,CAAC;AAEF,KAAK,sBAAsB,GAAG,CAAC,MAAM,SAAS,sBAAsB,EAClE,KAAK,EAAE,eAAe,CAAC,MAAM,CAAC,KAC3B,KAAK,CAAC,SAAS,CAAC;AA+CrB,eAAO,MAAM,SAAS,EAA8B,sBAAsB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { type LoadableConfig } from 'react-simple-loadable';
2
- import type { AnyAbstractRouteEntity, AnyRoute, AnyVirtualRoute } from '../../core/index.js';
2
+ import type { AnyAbstractRouteEntity, AnyRoute, AnyVirtualRoute } from "../../core/index.js";
3
3
  export type RouteViewComponent<TRoute extends AnyAbstractRouteEntity> = React.ComponentType<RouteViewProps<TRoute>>;
4
4
  interface RouteViewConfigWithoutRoute {
5
5
  children?: React.ReactNode | (() => React.ReactNode);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-view.d.ts","sourceRoot":"","sources":["../../../src/react/components/route-view.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EACV,sBAAsB,EACtB,QAAQ,EACR,eAAe,EAChB,4BAA4B;AAE7B,MAAM,MAAM,kBAAkB,CAAC,MAAM,SAAS,sBAAsB,IAClE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;AAE9C,UAAU,2BAA2B;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,wBAAwB,CAAC,MAAM,SAAS,sBAAsB,CAC7E,SAAQ,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;IAClE;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EACL,KAAK,CAAC,SAAS,GACf,CAAC,CACC,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EACxC,KAAK,EAAE,MAAM,KACV,KAAK,CAAC,SAAS,CAAC,CAAC;CAC3B;AAED,MAAM,MAAM,eAAe,CAAC,MAAM,SAAS,sBAAsB,IAC7D,wBAAwB,CAAC,MAAM,CAAC,GAChC,2BAA2B,CAAC;AAEhC,MAAM,MAAM,cAAc,CAAC,MAAM,SAAS,sBAAsB,IAAI;IAClE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,EAAE,MAAM,SAAS,QAAQ,GAC3B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC,GAC3C,MAAM,SAAS,eAAe,GAC5B,MAAM,CAAC,QAAQ,CAAC,GAChB,KAAK,CAAC;CACb,CAAC;AAEF,KAAK,sBAAsB,GAAG,CAAC,MAAM,SAAS,sBAAsB,EAClE,KAAK,EAAE,eAAe,CAAC,MAAM,CAAC,KAC3B,KAAK,CAAC,SAAS,CAAC;AA+CrB,eAAO,MAAM,SAAS,EAA8B,sBAAsB,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./components/index.cjs"), exports);
@@ -0,0 +1,2 @@
1
+ export * from "./components/index.cjs";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,uCAAsC"}
@@ -0,0 +1,2 @@
1
+ export * from "./components/index.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,sCAAsC"}
@@ -0,0 +1 @@
1
+ export * from "./components/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./route-view-model.cjs"), exports);
@@ -0,0 +1,2 @@
1
+ export * from "./route-view-model.cjs";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/view-model/index.ts"],"names":[],"mappings":"AAAA,uCAAsC"}
@@ -0,0 +1,2 @@
1
+ export * from "./route-view-model.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/view-model/index.ts"],"names":[],"mappings":"AAAA,sCAAsC"}
@@ -0,0 +1 @@
1
+ export * from "./route-view-model.js";
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RouteViewModel = void 0;
4
+ const mobx_1 = require("mobx");
5
+ const mobx_view_model_1 = require("mobx-view-model");
6
+ const index_js_1 = require("../core/index.cjs");
7
+ class RouteViewModel extends mobx_view_model_1.ViewModelBase {
8
+ constructor(params) {
9
+ super(params);
10
+ (0, mobx_view_model_1.applyObservable)(this, [
11
+ ['pathParams', mobx_1.computed.struct],
12
+ ['query', mobx_1.computed],
13
+ ], this.vmConfig.observable.viewModelStores);
14
+ }
15
+ get payload() {
16
+ if (this.route instanceof index_js_1.Route) {
17
+ return this.route.params || {};
18
+ }
19
+ if (this.route instanceof index_js_1.VirtualRoute) {
20
+ return this.route.params;
21
+ }
22
+ return {};
23
+ }
24
+ get query() {
25
+ if ('query' in this.route) {
26
+ return this.route.query;
27
+ }
28
+ return index_js_1.routeConfig.get().queryParams;
29
+ }
30
+ get pathParams() {
31
+ return this.payload;
32
+ }
33
+ get isMounted() {
34
+ return super.isMounted && this.route.isOpened;
35
+ }
36
+ }
37
+ exports.RouteViewModel = RouteViewModel;
@@ -0,0 +1,13 @@
1
+ import type { IQueryParams } from 'mobx-location-history';
2
+ import { ViewModelBase, type ViewModelParams } from 'mobx-view-model';
3
+ import type { EmptyObject } from 'yummies/utils/types';
4
+ import { type AnyAbstractRouteEntity, type RouteParams } from "../core/index.cjs";
5
+ export declare abstract class RouteViewModel<TRoute extends AnyAbstractRouteEntity = AnyAbstractRouteEntity> extends ViewModelBase<EmptyObject> {
6
+ abstract readonly route: TRoute;
7
+ constructor(params: ViewModelParams<EmptyObject, any>);
8
+ get payload(): RouteParams<TRoute>;
9
+ get query(): IQueryParams;
10
+ get pathParams(): RouteParams<TRoute>;
11
+ get isMounted(): boolean;
12
+ }
13
+ //# sourceMappingURL=route-view-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-view-model.d.ts","sourceRoot":"","sources":["../../src/view-model/route-view-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAEL,aAAa,EACb,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EACL,KAAK,sBAAsB,EAE3B,KAAK,WAAW,EAGjB,0BAAyB;AAE1B,8BAAsB,cAAc,CAClC,MAAM,SAAS,sBAAsB,GAAG,sBAAsB,CAC9D,SAAQ,aAAa,CAAC,WAAW,CAAC;IAClC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBAEpB,MAAM,EAAE,eAAe,CAAC,WAAW,EAAE,GAAG,CAAC;IAarD,IAAa,OAAO,IAAI,WAAW,CAAC,MAAM,CAAC,CAU1C;IAED,IAAI,KAAK,IAAI,YAAY,CAMxB;IAED,IAAI,UAAU,wBAEb;IAED,IAAI,SAAS,YAEZ;CACF"}
@@ -1,7 +1,7 @@
1
1
  import type { IQueryParams } from 'mobx-location-history';
2
2
  import { ViewModelBase, type ViewModelParams } from 'mobx-view-model';
3
3
  import type { EmptyObject } from 'yummies/utils/types';
4
- import { type AnyAbstractRouteEntity, type RouteParams } from '../core/index.js';
4
+ import { type AnyAbstractRouteEntity, type RouteParams } from "../core/index.js";
5
5
  export declare abstract class RouteViewModel<TRoute extends AnyAbstractRouteEntity = AnyAbstractRouteEntity> extends ViewModelBase<EmptyObject> {
6
6
  abstract readonly route: TRoute;
7
7
  constructor(params: ViewModelParams<EmptyObject, any>);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-view-model.d.ts","sourceRoot":"","sources":["../../src/view-model/route-view-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAEL,aAAa,EACb,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EACL,KAAK,sBAAsB,EAE3B,KAAK,WAAW,EAGjB,yBAAyB;AAE1B,8BAAsB,cAAc,CAClC,MAAM,SAAS,sBAAsB,GAAG,sBAAsB,CAC9D,SAAQ,aAAa,CAAC,WAAW,CAAC;IAClC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBAEpB,MAAM,EAAE,eAAe,CAAC,WAAW,EAAE,GAAG,CAAC;IAarD,IAAa,OAAO,IAAI,WAAW,CAAC,MAAM,CAAC,CAU1C;IAED,IAAI,KAAK,IAAI,YAAY,CAMxB;IAED,IAAI,UAAU,wBAEb;IAED,IAAI,SAAS,YAEZ;CACF"}
@@ -1,6 +1,6 @@
1
1
  import { computed } from 'mobx';
2
2
  import { applyObservable, ViewModelBase, } from 'mobx-view-model';
3
- import { Route, routeConfig, VirtualRoute, } from '../core/index.js';
3
+ import { Route, routeConfig, VirtualRoute, } from "../core/index.js";
4
4
  export class RouteViewModel extends ViewModelBase {
5
5
  constructor(params) {
6
6
  super(params);