mobx-route 0.0.89 → 0.0.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobx-route",
3
- "version": "0.0.89",
3
+ "version": "0.0.90",
4
4
  "keywords": [
5
5
  "mobx",
6
6
  "react",
@@ -23,15 +23,15 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "linked-abort-controller": "^1.1.0",
26
- "mobx-location-history": "^7.1.0",
26
+ "mobx-location-history": "^7.1.1",
27
27
  "path-to-regexp": "^8.2.0",
28
- "react-simple-loadable": "^2.3.4",
29
- "yummies": "^4.0.0"
28
+ "react-simple-loadable": "^2.3.8",
29
+ "yummies": "^4.2.1"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "mobx": "^6.12.4",
33
33
  "mobx-react-lite": "^4.0.7",
34
- "mobx-view-model": "^6.9.0",
34
+ "mobx-view-model": "^6.9.6",
35
35
  "react": "^18.0.0 || ^19.0.0"
36
36
  },
37
37
  "peerDependenciesMeta": {
@@ -1,11 +1,11 @@
1
1
  import { ViewModelBase, ViewModelParams } from 'mobx-view-model';
2
2
  import { AnyObject, EmptyObject } from 'yummies/utils/types';
3
- import { Route, ParsedPathParams, AnyRouteEntity, VirtualRoute } from '../core/index.js';
4
- export declare abstract class RouteViewModel<TRoute extends AnyRouteEntity = AnyRouteEntity> extends ViewModelBase<AnyObject> {
3
+ import { Route, ParsedPathParams, VirtualRoute, AnyAbstractRouteEntity } from '../core/index.js';
4
+ export declare abstract class RouteViewModel<TRoute extends AnyAbstractRouteEntity = AnyAbstractRouteEntity> extends ViewModelBase<AnyObject> {
5
5
  abstract readonly route: TRoute;
6
6
  constructor(params: ViewModelParams<any, any>);
7
7
  get payload(): TRoute extends Route<string, any> ? ParsedPathParams<TRoute['path']> : TRoute extends VirtualRoute<infer Params> ? Params : EmptyObject;
8
- get query(): import("mobx-location-history").IQueryParams;
8
+ get query(): unknown;
9
9
  get pathParams(): TRoute extends Route<string, any, null> ? ParsedPathParams<TRoute["path"]> : TRoute extends VirtualRoute<infer Params extends AnyObject | EmptyObject> ? Params : EmptyObject;
10
10
  get isMounted(): boolean;
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"route-view-model.d.ts","sourceRoot":"","sources":["../../src/view-model/route-view-model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAEL,KAAK,EACL,gBAAgB,EAChB,cAAc,EACd,YAAY,EACb,MAAM,kBAAkB,CAAC;AAE1B,8BAAsB,cAAc,CAClC,MAAM,SAAS,cAAc,GAAG,cAAc,CAC9C,SAAQ,aAAa,CAAC,SAAS,CAAC;IAChC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBAEpB,MAAM,EAAE,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC;IAS7C,IAAa,OAAO,IAAI,MAAM,SAAS,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,GACrD,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAChC,MAAM,SAAS,YAAY,CAAC,MAAM,MAAM,CAAC,GACvC,MAAM,GACN,WAAW,CAUhB;IAED,IAAI,KAAK,iDAMR;IAED,IAAI,UAAU,mHAtBwB,MAAM,yDAwB3C;IAED,IAAI,SAAS,YAEZ;CACF"}
1
+ {"version":3,"file":"route-view-model.d.ts","sourceRoot":"","sources":["../../src/view-model/route-view-model.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,aAAa,EACb,eAAe,EAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAEL,KAAK,EACL,gBAAgB,EAChB,YAAY,EACZ,sBAAsB,EACvB,MAAM,kBAAkB,CAAC;AAE1B,8BAAsB,cAAc,CAClC,MAAM,SAAS,sBAAsB,GAAG,sBAAsB,CAC9D,SAAQ,aAAa,CAAC,SAAS,CAAC;IAChC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBAEpB,MAAM,EAAE,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC;IAa7C,IAAa,OAAO,IAAI,MAAM,SAAS,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,GACrD,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAChC,MAAM,SAAS,YAAY,CAAC,MAAM,MAAM,CAAC,GACvC,MAAM,GACN,WAAW,CAUhB;IAED,IAAI,KAAK,YAMR;IAED,IAAI,UAAU,mHAtBwB,MAAM,yDAwB3C;IAED,IAAI,SAAS,YAEZ;CACF"}
@@ -1,12 +1,13 @@
1
- import { computed, makeObservable } from 'mobx';
2
- import { ViewModelBase } from 'mobx-view-model';
1
+ import { computed } from 'mobx';
2
+ import { applyObservable, ViewModelBase, } from 'mobx-view-model';
3
3
  import { routeConfig, Route, VirtualRoute, } from '../core/index.js';
4
4
  export class RouteViewModel extends ViewModelBase {
5
5
  constructor(params) {
6
6
  super(params);
7
- computed.struct(this, 'pathParams');
8
- computed(this, 'query');
9
- makeObservable(this);
7
+ applyObservable(this, [
8
+ ['pathParams', computed.struct],
9
+ ['query', computed],
10
+ ], this.vmConfig.observable.viewModelStores);
10
11
  }
11
12
  get payload() {
12
13
  if (this.route instanceof Route) {