reactive-route 0.0.1-alpha.1 → 0.0.1-alpha.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.
package/dist/cjs/index.js CHANGED
@@ -152,16 +152,23 @@ function replaceDynamicValues({
152
152
  function createRouterStore({
153
153
  batch,
154
154
  routes,
155
+ autorun,
156
+ replaceObject,
155
157
  routeError500,
156
158
  makeObservable,
157
- lifecycleParams,
158
- replaceObject
159
+ lifecycleParams
159
160
  }) {
160
161
  const routerStore = makeObservable({
161
162
  routesHistory: [],
162
163
  currentRoute: {},
163
164
  isRedirecting: false,
164
- redirectTo: void 0
165
+ redirectTo: void 0,
166
+ utils: {
167
+ batch,
168
+ autorun,
169
+ replaceObject,
170
+ makeObservable
171
+ }
165
172
  });
166
173
  routerStore.redirectTo = async function redirectTo(config) {
167
174
  const { route: routeName, noHistoryPush, asClient } = config;
@@ -75,11 +75,14 @@ var VM = class {
75
75
  loadedComponentPage = void 0;
76
76
  loadedComponent;
77
77
  currentProps = {};
78
+ get utils() {
79
+ return this.props.routerStore.utils;
80
+ }
78
81
  beforeMount() {
79
82
  this.props.beforeMount?.();
80
83
  this.redirectOnHistoryPop();
81
84
  this.setLoadedComponent();
82
- this.autorunDisposers.push((0, import_mobx2.autorun)(this.setLoadedComponent));
85
+ this.autorunDisposers.push(this.utils.autorun(this.setLoadedComponent));
83
86
  }
84
87
  redirectOnHistoryPop() {
85
88
  if (!import_reactive_route.history) return;
@@ -87,7 +90,7 @@ var VM = class {
87
90
  if (params.action !== "POP") return;
88
91
  const previousRoutePathname = this.props.routerStore.routesHistory[this.props.routerStore.routesHistory.length - 2];
89
92
  if (previousRoutePathname === params.location.pathname) {
90
- (0, import_mobx2.runInAction)(() => this.props.routerStore.routesHistory.pop());
93
+ this.utils.batch(() => this.props.routerStore.routesHistory.pop());
91
94
  }
92
95
  void this.props.routerStore.redirectTo({
93
96
  noHistoryPush: true,
@@ -110,14 +113,14 @@ var VM = class {
110
113
  else if (loadedComponentPage != null && currentRouteName != null) {
111
114
  if (loadedComponentPage === currentRoutePage) {
112
115
  const componentConfig = this.props.routes[currentRouteName];
113
- (0, import_mobx2.runInAction)(() => {
116
+ this.utils.batch(() => {
114
117
  this.currentProps = "props" in componentConfig ? componentConfig.props || {} : {};
115
118
  });
116
119
  preventRedirect = true;
117
120
  }
118
121
  }
119
122
  if (preventRedirect) return;
120
- (0, import_mobx2.runInAction)(() => {
123
+ this.utils.batch(() => {
121
124
  if (!loadedComponentName) {
122
125
  this.setComponent(currentRouteName);
123
126
  } else {
@@ -127,15 +130,13 @@ var VM = class {
127
130
  });
128
131
  };
129
132
  setComponent(currentRouteName) {
130
- (0, import_mobx2.runInAction)(() => {
131
- const componentConfig = this.props.routes[currentRouteName];
132
- const RouteComponent = componentConfig.component;
133
- this.props.beforeSetPageComponent?.(componentConfig);
134
- this.currentProps = "props" in componentConfig ? componentConfig.props || {} : {};
135
- this.loadedComponentName = currentRouteName;
136
- this.loadedComponentPage = componentConfig.pageName;
137
- this.loadedComponent = RouteComponent;
138
- });
133
+ const componentConfig = this.props.routes[currentRouteName];
134
+ const RouteComponent = componentConfig.component;
135
+ this.props.beforeSetPageComponent?.(componentConfig);
136
+ this.currentProps = "props" in componentConfig ? componentConfig.props || {} : {};
137
+ this.loadedComponentName = currentRouteName;
138
+ this.loadedComponentPage = componentConfig.pageName;
139
+ this.loadedComponent = RouteComponent;
139
140
  }
140
141
  };
141
142
  var Router = (0, import_mobx_react_lite.observer)(
@@ -29,46 +29,13 @@ var import_web = require("solid-js/web");
29
29
  var import_web2 = require("solid-js/web");
30
30
  var import_reactive_route = require("reactive-route");
31
31
  var import_solid_js2 = require("solid-js");
32
- var import_store2 = require("solid-js/store");
33
- var import_web3 = require("solid-js/web");
34
-
35
- // packages/solid/replaceObject.ts
36
32
  var import_store = require("solid-js/store");
37
- function replaceObject(obj, newObj) {
38
- (0, import_store.modifyMutable)(obj, (0, import_store.produce)((state) => {
39
- if (typeof state === "object" && state != null) {
40
- for (const variableKey in state) {
41
- delete state[variableKey];
42
- }
43
- }
44
- Object.assign(state || {}, newObj);
45
- }));
46
- }
33
+ var import_web3 = require("solid-js/web");
47
34
 
48
35
  // packages/solid/useStore.ts
49
36
  var import_solid_js = require("solid-js");
50
- var getAllProperties = (object) => {
51
- const properties = /* @__PURE__ */ new Set();
52
- do {
53
- for (const key of Reflect.ownKeys(object)) {
54
- properties.add([object, key]);
55
- }
56
- } while ((object = Reflect.getPrototypeOf(object)) && object !== Object.prototype);
57
- return properties;
58
- };
59
- function autoBind(self) {
60
- for (const [object, key] of getAllProperties(self.constructor.prototype)) {
61
- if (key === "constructor") continue;
62
- const descriptor = Reflect.getOwnPropertyDescriptor(object, key);
63
- if (descriptor && typeof descriptor.value === "function") {
64
- self[key] = self[key].bind(self);
65
- }
66
- }
67
- return self;
68
- }
69
37
  function useStore(ViewModel, props) {
70
38
  const vm = new ViewModel(props);
71
- autoBind(vm);
72
39
  vm.beforeMount?.();
73
40
  (0, import_solid_js.onMount)(() => {
74
41
  vm.afterMount?.();
@@ -80,15 +47,18 @@ function useStore(ViewModel, props) {
80
47
  var VM = class {
81
48
  constructor(props) {
82
49
  this.props = props;
83
- return (0, import_store2.createMutable)(this);
50
+ return (0, import_store.createMutable)(this);
84
51
  }
85
52
  loadedComponentName = void 0;
86
53
  loadedComponentPage = void 0;
87
54
  currentProps = {};
55
+ get utils() {
56
+ return this.props.routerStore.utils;
57
+ }
88
58
  beforeMount() {
89
59
  this.props.beforeMount?.();
90
60
  this.redirectOnHistoryPop();
91
- (0, import_solid_js2.createRenderEffect)(() => this.setLoadedComponent());
61
+ this.utils.autorun(() => this.setLoadedComponent());
92
62
  }
93
63
  redirectOnHistoryPop() {
94
64
  if (!import_reactive_route.history) return;
@@ -118,12 +88,12 @@ var VM = class {
118
88
  } else if (this.loadedComponentPage != null && currentRouteName != null) {
119
89
  if (this.loadedComponentPage === currentRoutePage) {
120
90
  const componentConfig = this.props.routes[currentRouteName];
121
- replaceObject(this.currentProps, "props" in componentConfig ? componentConfig.props : {});
91
+ this.utils.replaceObject(this.currentProps, "props" in componentConfig ? componentConfig.props : {});
122
92
  preventRedirect = true;
123
93
  }
124
94
  }
125
95
  if (preventRedirect) return;
126
- (0, import_solid_js2.batch)(() => {
96
+ this.utils.batch(() => {
127
97
  if (!this.loadedComponentName) {
128
98
  this.setComponent();
129
99
  } else {
@@ -136,8 +106,8 @@ var VM = class {
136
106
  const currentRouteName = this.props.routerStore.currentRoute.name;
137
107
  const componentConfig = this.props.routes[currentRouteName];
138
108
  this.props.beforeSetPageComponent?.(componentConfig);
139
- (0, import_solid_js2.batch)(() => {
140
- replaceObject(this.currentProps, "props" in componentConfig ? componentConfig.props : {});
109
+ this.utils.batch(() => {
110
+ this.utils.replaceObject(this.currentProps, "props" in componentConfig ? componentConfig.props : {});
141
111
  this.loadedComponentName = currentRouteName;
142
112
  this.loadedComponentPage = componentConfig.pageName;
143
113
  });
package/dist/esm/index.js CHANGED
@@ -109,16 +109,23 @@ function replaceDynamicValues({
109
109
  function createRouterStore({
110
110
  batch,
111
111
  routes,
112
+ autorun,
113
+ replaceObject,
112
114
  routeError500,
113
115
  makeObservable,
114
- lifecycleParams,
115
- replaceObject
116
+ lifecycleParams
116
117
  }) {
117
118
  const routerStore = makeObservable({
118
119
  routesHistory: [],
119
120
  currentRoute: {},
120
121
  isRedirecting: false,
121
- redirectTo: void 0
122
+ redirectTo: void 0,
123
+ utils: {
124
+ batch,
125
+ autorun,
126
+ replaceObject,
127
+ makeObservable
128
+ }
122
129
  });
123
130
  routerStore.redirectTo = async function redirectTo(config) {
124
131
  const { route: routeName, noHistoryPush, asClient } = config;
@@ -1,5 +1,5 @@
1
1
  // packages/react/Router.tsx
2
- import { autorun, makeAutoObservable, runInAction as runInAction2 } from "mobx";
2
+ import { makeAutoObservable } from "mobx";
3
3
  import { observer } from "mobx-react-lite";
4
4
  import { getInitialRoute, history } from "reactive-route";
5
5
 
@@ -49,11 +49,14 @@ var VM = class {
49
49
  loadedComponentPage = void 0;
50
50
  loadedComponent;
51
51
  currentProps = {};
52
+ get utils() {
53
+ return this.props.routerStore.utils;
54
+ }
52
55
  beforeMount() {
53
56
  this.props.beforeMount?.();
54
57
  this.redirectOnHistoryPop();
55
58
  this.setLoadedComponent();
56
- this.autorunDisposers.push(autorun(this.setLoadedComponent));
59
+ this.autorunDisposers.push(this.utils.autorun(this.setLoadedComponent));
57
60
  }
58
61
  redirectOnHistoryPop() {
59
62
  if (!history) return;
@@ -61,7 +64,7 @@ var VM = class {
61
64
  if (params.action !== "POP") return;
62
65
  const previousRoutePathname = this.props.routerStore.routesHistory[this.props.routerStore.routesHistory.length - 2];
63
66
  if (previousRoutePathname === params.location.pathname) {
64
- runInAction2(() => this.props.routerStore.routesHistory.pop());
67
+ this.utils.batch(() => this.props.routerStore.routesHistory.pop());
65
68
  }
66
69
  void this.props.routerStore.redirectTo({
67
70
  noHistoryPush: true,
@@ -84,14 +87,14 @@ var VM = class {
84
87
  else if (loadedComponentPage != null && currentRouteName != null) {
85
88
  if (loadedComponentPage === currentRoutePage) {
86
89
  const componentConfig = this.props.routes[currentRouteName];
87
- runInAction2(() => {
90
+ this.utils.batch(() => {
88
91
  this.currentProps = "props" in componentConfig ? componentConfig.props || {} : {};
89
92
  });
90
93
  preventRedirect = true;
91
94
  }
92
95
  }
93
96
  if (preventRedirect) return;
94
- runInAction2(() => {
97
+ this.utils.batch(() => {
95
98
  if (!loadedComponentName) {
96
99
  this.setComponent(currentRouteName);
97
100
  } else {
@@ -101,15 +104,13 @@ var VM = class {
101
104
  });
102
105
  };
103
106
  setComponent(currentRouteName) {
104
- runInAction2(() => {
105
- const componentConfig = this.props.routes[currentRouteName];
106
- const RouteComponent = componentConfig.component;
107
- this.props.beforeSetPageComponent?.(componentConfig);
108
- this.currentProps = "props" in componentConfig ? componentConfig.props || {} : {};
109
- this.loadedComponentName = currentRouteName;
110
- this.loadedComponentPage = componentConfig.pageName;
111
- this.loadedComponent = RouteComponent;
112
- });
107
+ const componentConfig = this.props.routes[currentRouteName];
108
+ const RouteComponent = componentConfig.component;
109
+ this.props.beforeSetPageComponent?.(componentConfig);
110
+ this.currentProps = "props" in componentConfig ? componentConfig.props || {} : {};
111
+ this.loadedComponentName = currentRouteName;
112
+ this.loadedComponentPage = componentConfig.pageName;
113
+ this.loadedComponent = RouteComponent;
113
114
  }
114
115
  };
115
116
  var Router = observer(
@@ -2,47 +2,14 @@
2
2
  import { createComponent as _$createComponent } from "solid-js/web";
3
3
  import { mergeProps as _$mergeProps } from "solid-js/web";
4
4
  import { getInitialRoute, history } from "reactive-route";
5
- import { batch, createRenderEffect, Show } from "solid-js";
5
+ import { Show } from "solid-js";
6
6
  import { createMutable } from "solid-js/store";
7
7
  import { Dynamic } from "solid-js/web";
8
8
 
9
- // packages/solid/replaceObject.ts
10
- import { modifyMutable, produce } from "solid-js/store";
11
- function replaceObject(obj, newObj) {
12
- modifyMutable(obj, produce((state) => {
13
- if (typeof state === "object" && state != null) {
14
- for (const variableKey in state) {
15
- delete state[variableKey];
16
- }
17
- }
18
- Object.assign(state || {}, newObj);
19
- }));
20
- }
21
-
22
9
  // packages/solid/useStore.ts
23
10
  import { onMount } from "solid-js";
24
- var getAllProperties = (object) => {
25
- const properties = /* @__PURE__ */ new Set();
26
- do {
27
- for (const key of Reflect.ownKeys(object)) {
28
- properties.add([object, key]);
29
- }
30
- } while ((object = Reflect.getPrototypeOf(object)) && object !== Object.prototype);
31
- return properties;
32
- };
33
- function autoBind(self) {
34
- for (const [object, key] of getAllProperties(self.constructor.prototype)) {
35
- if (key === "constructor") continue;
36
- const descriptor = Reflect.getOwnPropertyDescriptor(object, key);
37
- if (descriptor && typeof descriptor.value === "function") {
38
- self[key] = self[key].bind(self);
39
- }
40
- }
41
- return self;
42
- }
43
11
  function useStore(ViewModel, props) {
44
12
  const vm = new ViewModel(props);
45
- autoBind(vm);
46
13
  vm.beforeMount?.();
47
14
  onMount(() => {
48
15
  vm.afterMount?.();
@@ -59,10 +26,13 @@ var VM = class {
59
26
  loadedComponentName = void 0;
60
27
  loadedComponentPage = void 0;
61
28
  currentProps = {};
29
+ get utils() {
30
+ return this.props.routerStore.utils;
31
+ }
62
32
  beforeMount() {
63
33
  this.props.beforeMount?.();
64
34
  this.redirectOnHistoryPop();
65
- createRenderEffect(() => this.setLoadedComponent());
35
+ this.utils.autorun(() => this.setLoadedComponent());
66
36
  }
67
37
  redirectOnHistoryPop() {
68
38
  if (!history) return;
@@ -92,12 +62,12 @@ var VM = class {
92
62
  } else if (this.loadedComponentPage != null && currentRouteName != null) {
93
63
  if (this.loadedComponentPage === currentRoutePage) {
94
64
  const componentConfig = this.props.routes[currentRouteName];
95
- replaceObject(this.currentProps, "props" in componentConfig ? componentConfig.props : {});
65
+ this.utils.replaceObject(this.currentProps, "props" in componentConfig ? componentConfig.props : {});
96
66
  preventRedirect = true;
97
67
  }
98
68
  }
99
69
  if (preventRedirect) return;
100
- batch(() => {
70
+ this.utils.batch(() => {
101
71
  if (!this.loadedComponentName) {
102
72
  this.setComponent();
103
73
  } else {
@@ -110,8 +80,8 @@ var VM = class {
110
80
  const currentRouteName = this.props.routerStore.currentRoute.name;
111
81
  const componentConfig = this.props.routes[currentRouteName];
112
82
  this.props.beforeSetPageComponent?.(componentConfig);
113
- batch(() => {
114
- replaceObject(this.currentProps, "props" in componentConfig ? componentConfig.props : {});
83
+ this.utils.batch(() => {
84
+ this.utils.replaceObject(this.currentProps, "props" in componentConfig ? componentConfig.props : {});
115
85
  this.loadedComponentName = currentRouteName;
116
86
  this.loadedComponentPage = componentConfig.pageName;
117
87
  });
@@ -1,7 +1,7 @@
1
1
  import { TypeRouteRaw } from './types/TypeRouteRaw';
2
- type TypeRouteItemFinalGeneric<TConfig extends {
2
+ export declare function createRouterConfig<TConfig extends {
3
3
  [Key in keyof TConfig]: TypeRouteRaw;
4
- }> = {
4
+ }>(config: TConfig): {
5
5
  [Key in keyof TConfig]: TConfig[Key] & {
6
6
  name: Key;
7
7
  pageName?: string;
@@ -9,8 +9,4 @@ type TypeRouteItemFinalGeneric<TConfig extends {
9
9
  otherExports?: Record<string, any>;
10
10
  };
11
11
  };
12
- export declare function createRouterConfig<TConfig extends {
13
- [Key in keyof TConfig]: TypeRouteRaw;
14
- }>(config: TConfig): TypeRouteItemFinalGeneric<TConfig>;
15
- export {};
16
12
  //# sourceMappingURL=createRouterConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createRouterConfig.d.ts","sourceRoot":"","sources":["../../../packages/core/createRouterConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,KAAK,yBAAyB,CAAC,OAAO,SAAS;KAAG,GAAG,IAAI,MAAM,OAAO,GAAG,YAAY;CAAE,IAAI;KACxF,GAAG,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG;QACrC,IAAI,EAAE,GAAG,CAAC;QACV,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,GAAG,CAAC;QAChB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACpC;CACF,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,OAAO,SAAS;KACb,GAAG,IAAI,MAAM,OAAO,GAAG,YAAY;CACrC,EACD,MAAM,EAAE,OAAO,GAAG,yBAAyB,CAAC,OAAO,CAAC,CAErD"}
1
+ {"version":3,"file":"createRouterConfig.d.ts","sourceRoot":"","sources":["../../../packages/core/createRouterConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,wBAAgB,kBAAkB,CAAC,OAAO,SAAS;KAAG,GAAG,IAAI,MAAM,OAAO,GAAG,YAAY;CAAE,EACzF,MAAM,EAAE,OAAO,GACd;KACA,GAAG,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG;QACrC,IAAI,EAAE,GAAG,CAAC;QACV,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,GAAG,CAAC;QAChB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACpC;CACF,CAEA"}
@@ -1,13 +1,4 @@
1
- import { InterfaceRouterStore } from './types/InterfaceRouterStore';
1
+ import { InterfaceRouterStore, TypeCreateRouterStore } from './types/InterfaceRouterStore';
2
2
  import { TypeRoute } from './types/TypeRoute';
3
- type TypeCreateRouterStore<TRoutes extends Record<string, TypeRoute>> = {
4
- routes: TRoutes;
5
- routeError500: TRoutes[keyof TRoutes];
6
- lifecycleParams?: Array<any>;
7
- batch: (cb: () => void) => void;
8
- makeObservable: <TObj extends Record<string, any>>(obj: TObj) => TObj;
9
- replaceObject: <TObj extends Record<string, any>>(obj: TObj, newObj: TObj) => void;
10
- };
11
- export declare function createRouterStore<TRoutes extends Record<string, TypeRoute>>({ batch, routes, routeError500, makeObservable, lifecycleParams, replaceObject, }: TypeCreateRouterStore<TRoutes>): InterfaceRouterStore<TRoutes>;
12
- export {};
3
+ export declare function createRouterStore<TRoutes extends Record<string, TypeRoute>>({ batch, routes, autorun, replaceObject, routeError500, makeObservable, lifecycleParams, }: TypeCreateRouterStore<TRoutes>): InterfaceRouterStore<TRoutes>;
13
4
  //# sourceMappingURL=createRouterStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createRouterStore.d.ts","sourceRoot":"","sources":["../../../packages/core/createRouterStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAQ9C,KAAK,qBAAqB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI;IACtE,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC,MAAM,OAAO,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAChC,cAAc,EAAE,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC;IACtE,aAAa,EAAE,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,KAAK,IAAI,CAAC;CACpF,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,EAC3E,KAAK,EACL,MAAM,EACN,aAAa,EACb,cAAc,EACd,eAAe,EACf,aAAa,GACd,EAAE,qBAAqB,CAAC,OAAO,CAAC,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAsOhE"}
1
+ {"version":3,"file":"createRouterStore.d.ts","sourceRoot":"","sources":["../../../packages/core/createRouterStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAE3F,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAQ9C,wBAAgB,iBAAiB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,EAC3E,KAAK,EACL,MAAM,EACN,OAAO,EACP,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,GAChB,EAAE,qBAAqB,CAAC,OAAO,CAAC,GAAG,oBAAoB,CAAC,OAAO,CAAC,CA4OhE"}
@@ -2,6 +2,7 @@ export { createRouterConfig } from './createRouterConfig';
2
2
  export { createRouterStore } from './createRouterStore';
3
3
  export type { InterfaceRouterStore } from './types/InterfaceRouterStore';
4
4
  export type { TypeCurrentRoute } from './types/TypeCurrentRoute';
5
+ export type { TypePropsRouter } from './types/TypePropsRouter';
5
6
  export type { TypeRedirectToParams } from './types/TypeRedirectToParams';
6
7
  export type { TypeRoute } from './types/TypeRoute';
7
8
  export { isDynamicRoute } from './utils/dynamic';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -1,10 +1,23 @@
1
1
  import { TypeCurrentRoute } from './TypeCurrentRoute';
2
2
  import { TypeRedirectToParams } from './TypeRedirectToParams';
3
3
  import { TypeRoute } from './TypeRoute';
4
+ type TypeUtils = {
5
+ batch: (cb: () => void) => void;
6
+ autorun: (cb: () => void) => any;
7
+ replaceObject: <TObj extends Record<string, any>>(obj: TObj, newObj: TObj) => void;
8
+ makeObservable: <TObj extends Record<string, any>>(obj: TObj) => TObj;
9
+ };
10
+ export type TypeCreateRouterStore<TRoutes extends Record<string, TypeRoute>> = TypeUtils & {
11
+ routes: TRoutes;
12
+ routeError500: TRoutes[keyof TRoutes];
13
+ lifecycleParams?: Array<any>;
14
+ };
4
15
  export type InterfaceRouterStore<TRoutes extends Record<string, TypeRoute>> = {
5
16
  routesHistory: Array<string>;
6
17
  currentRoute: TypeCurrentRoute<TRoutes[keyof TRoutes]>;
7
18
  isRedirecting: boolean;
8
19
  redirectTo<TRouteName extends keyof TRoutes>(config: TypeRedirectToParams<TRoutes, TRouteName>): Promise<void>;
20
+ utils: TypeUtils;
9
21
  };
22
+ export {};
10
23
  //# sourceMappingURL=InterfaceRouterStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InterfaceRouterStore.d.ts","sourceRoot":"","sources":["../../../../packages/core/types/InterfaceRouterStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,MAAM,oBAAoB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI;IAC5E,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B,YAAY,EAAE,gBAAgB,CAAC,OAAO,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC;IACvD,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,UAAU,SAAS,MAAM,OAAO,EACzC,MAAM,EAAE,oBAAoB,CAAC,OAAO,EAAE,UAAU,CAAC,GAChD,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB,CAAC"}
1
+ {"version":3,"file":"InterfaceRouterStore.d.ts","sourceRoot":"","sources":["../../../../packages/core/types/InterfaceRouterStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,KAAK,SAAS,GAAG;IACf,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAChC,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,GAAG,CAAC;IACjC,aAAa,EAAE,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,KAAK,IAAI,CAAC;IACnF,cAAc,EAAE,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC;CACvE,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,SAAS,GAAG;IACzF,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC,MAAM,OAAO,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI;IAC5E,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B,YAAY,EAAE,gBAAgB,CAAC,OAAO,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC;IACvD,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,UAAU,SAAS,MAAM,OAAO,EACzC,MAAM,EAAE,oBAAoB,CAAC,OAAO,EAAE,UAAU,CAAC,GAChD,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;CAClB,CAAC"}
@@ -0,0 +1,13 @@
1
+ export type TypeLifecycleConfig = {
2
+ nextUrl: string;
3
+ nextRoute: any;
4
+ nextPathname: string;
5
+ nextQuery?: any;
6
+ nextSearch?: string;
7
+ currentUrl?: string;
8
+ currentQuery?: any;
9
+ currentRoute?: any;
10
+ currentSearch?: string;
11
+ currentPathname?: string;
12
+ };
13
+ //# sourceMappingURL=TypeLifecycleConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypeLifecycleConfig.d.ts","sourceRoot":"","sources":["../../../../packages/core/types/TypeLifecycleConfig.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,GAAG,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { InterfaceRouterStore } from './InterfaceRouterStore';
2
+ import { TypeRoute } from './TypeRoute';
3
+ export type TypePropsRouter<TRoutes extends Record<string, TypeRoute>> = {
4
+ routes: TRoutes;
5
+ routerStore: InterfaceRouterStore<TRoutes>;
6
+ beforeMount?: () => void;
7
+ beforeSetPageComponent?: (componentConfig: TRoutes[keyof TRoutes]) => void;
8
+ beforeUpdatePageComponent?: () => void;
9
+ };
10
+ //# sourceMappingURL=TypePropsRouter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypePropsRouter.d.ts","sourceRoot":"","sources":["../../../../packages/core/types/TypePropsRouter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,MAAM,eAAe,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI;IACvE,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC3C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,sBAAsB,CAAC,EAAE,CAAC,eAAe,EAAE,OAAO,CAAC,MAAM,OAAO,CAAC,KAAK,IAAI,CAAC;IAC3E,yBAAyB,CAAC,EAAE,MAAM,IAAI,CAAC;CACxC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { TypeLifecycleConfig } from './TypeLifecycleConfig';
1
2
  import { TypeValidator } from './TypeValidator';
2
3
  export type TypeRouteRaw = {
3
4
  path: string;
@@ -7,29 +8,7 @@ export type TypeRouteRaw = {
7
8
  props?: Record<string, any>;
8
9
  query?: Record<string, TypeValidator>;
9
10
  params?: Record<string, TypeValidator>;
10
- beforeEnter?: (config: {
11
- nextUrl: string;
12
- nextRoute: any;
13
- nextPathname: string;
14
- nextQuery?: any;
15
- nextSearch?: string;
16
- currentUrl?: string;
17
- currentQuery?: any;
18
- currentRoute?: any;
19
- currentSearch?: string;
20
- currentPathname?: string;
21
- }, ...args: Array<any>) => Promise<any>;
22
- beforeLeave?: (config: {
23
- nextUrl: string;
24
- nextRoute: any;
25
- nextPathname: string;
26
- nextQuery?: any;
27
- nextSearch?: string;
28
- currentUrl?: string;
29
- currentQuery?: any;
30
- currentRoute?: any;
31
- currentSearch?: string;
32
- currentPathname?: string;
33
- }, ...args: Array<any>) => Promise<any> | null;
11
+ beforeEnter?: (config: TypeLifecycleConfig, ...args: Array<any>) => Promise<any>;
12
+ beforeLeave?: (config: TypeLifecycleConfig, ...args: Array<any>) => Promise<any> | null;
34
13
  };
35
14
  //# sourceMappingURL=TypeRouteRaw.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TypeRouteRaw.d.ts","sourceRoot":"","sources":["../../../../packages/core/types/TypeRouteRaw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,OAAO,CAAC;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,CACZ,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,GAAG,CAAC;QACf,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,GAAG,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,GAAG,CAAC;QACnB,YAAY,CAAC,EAAE,GAAG,CAAC;QACnB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,EACD,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAChB,OAAO,CAAC,GAAG,CAAC,CAAC;IAClB,WAAW,CAAC,EAAE,CACZ,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,GAAG,CAAC;QACf,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,GAAG,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,GAAG,CAAC;QACnB,YAAY,CAAC,EAAE,GAAG,CAAC;QACnB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,EACD,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAChB,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;CAC1B,CAAC"}
1
+ {"version":3,"file":"TypeRouteRaw.d.ts","sourceRoot":"","sources":["../../../../packages/core/types/TypeRouteRaw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,OAAO,CAAC;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACjF,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;CACzF,CAAC"}
@@ -1,13 +1,5 @@
1
- import { InterfaceRouterStore, TypeRoute } from 'reactive-route';
2
- type TypeProps<TRoutes extends Record<string, TypeRoute>> = {
3
- routes: TRoutes;
4
- routerStore: InterfaceRouterStore<TRoutes>;
5
- beforeMount?: () => void;
6
- beforeSetPageComponent?: (componentConfig: TRoutes[keyof TRoutes]) => void;
7
- beforeUpdatePageComponent?: () => void;
8
- };
9
- export declare const Router: (<TRoutes extends Record<string, TypeRoute>>(props: TypeProps<TRoutes>) => any) & {
1
+ import { TypePropsRouter, TypeRoute } from 'reactive-route';
2
+ export declare const Router: (<TRoutes extends Record<string, TypeRoute>>(props: TypePropsRouter<TRoutes>) => any) & {
10
3
  displayName: string;
11
4
  };
12
- export {};
13
5
  //# sourceMappingURL=Router.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Router.d.ts","sourceRoot":"","sources":["../../../packages/react/Router.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA4B,oBAAoB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAI3F,KAAK,SAAS,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI;IAC1D,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC3C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,sBAAsB,CAAC,EAAE,CAAC,eAAe,EAAE,OAAO,CAAC,MAAM,OAAO,CAAC,KAAK,IAAI,CAAC;IAC3E,yBAAyB,CAAC,EAAE,MAAM,IAAI,CAAC;CACxC,CAAC;AAkGF,eAAO,MAAM,MAAM,IAChB,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,SAAS,CAAC,OAAO,CAAC;;CAStE,CAAC"}
1
+ {"version":3,"file":"Router.d.ts","sourceRoot":"","sources":["../../../packages/react/Router.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA4B,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAsGtF,eAAO,MAAM,MAAM,IAChB,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC;;CAS5E,CAAC"}
@@ -1,11 +1,3 @@
1
- import { InterfaceRouterStore, TypeRoute } from 'reactive-route';
2
- type TypeProps<TRoutes extends Record<string, TypeRoute>> = {
3
- routes: TRoutes;
4
- routerStore: InterfaceRouterStore<TRoutes>;
5
- beforeMount?: () => void;
6
- beforeSetPageComponent?: (componentConfig: TRoutes[keyof TRoutes]) => void;
7
- beforeUpdatePageComponent?: () => void;
8
- };
9
- export declare function Router<TRoutes extends Record<string, TypeRoute>>(props: TypeProps<TRoutes>): import("solid-js").JSX.Element;
10
- export {};
1
+ import { TypePropsRouter, TypeRoute } from 'reactive-route';
2
+ export declare function Router<TRoutes extends Record<string, TypeRoute>>(props: TypePropsRouter<TRoutes>): import("solid-js").JSX.Element;
11
3
  //# sourceMappingURL=Router.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Router.d.ts","sourceRoot":"","sources":["../../../packages/solid/Router.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,oBAAoB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAQ3F,KAAK,SAAS,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI;IAC1D,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC3C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,sBAAsB,CAAC,EAAE,CAAC,eAAe,EAAE,OAAO,CAAC,MAAM,OAAO,CAAC,KAAK,IAAI,CAAC;IAC3E,yBAAyB,CAAC,EAAE,MAAM,IAAI,CAAC;CACxC,CAAC;AAqFF,wBAAgB,MAAM,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,kCAW1F"}
1
+ {"version":3,"file":"Router.d.ts","sourceRoot":"","sources":["../../../packages/solid/Router.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAoGtF,wBAAgB,MAAM,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,kCAWhG"}
@@ -1 +1 @@
1
- {"version":3,"file":"useStore.d.ts","sourceRoot":"","sources":["../../../packages/solid/useStore.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AA+BD,wBAAgB,QAAQ,CACtB,UAAU,SAAS,KACjB,KAAK,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KACxC,oBAAoB,EACzB,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,CAY9F"}
1
+ {"version":3,"file":"useStore.d.ts","sourceRoot":"","sources":["../../../packages/solid/useStore.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,QAAQ,CACtB,UAAU,SAAS,KACjB,KAAK,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KACxC,oBAAoB,EACzB,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,CAU9F"}
@@ -1 +1 @@
1
- {"root":["../../packages/core/createRouterConfig.ts","../../packages/core/createRouterStore.ts","../../packages/core/index.ts","../../packages/core/types/InterfaceRouterStore.ts","../../packages/core/types/TypeCurrentRoute.ts","../../packages/core/types/TypeRedirectToParams.ts","../../packages/core/types/TypeRoute.ts","../../packages/core/types/TypeRouteRaw.ts","../../packages/core/types/TypeRouteWithParams.ts","../../packages/core/types/TypeValidator.ts","../../packages/core/utils/addNames.ts","../../packages/core/utils/constants.ts","../../packages/core/utils/dynamic.ts","../../packages/core/utils/findRouteByPathname.ts","../../packages/core/utils/getDynamicValues.ts","../../packages/core/utils/getInitialRoute.ts","../../packages/core/utils/getQueryValues.ts","../../packages/core/utils/getTypedEntries.ts","../../packages/core/utils/history.ts","../../packages/core/utils/loadComponentToConfig.ts","../../packages/core/utils/replaceDynamicValues.ts","../../packages/react/Router.tsx","../../packages/react/index.ts","../../packages/react/useStore.ts","../../packages/solid/Router.tsx","../../packages/solid/index.ts","../../packages/solid/replaceObject.ts","../../packages/solid/useStore.ts"],"version":"5.9.2"}
1
+ {"root":["../../packages/core/createRouterConfig.ts","../../packages/core/createRouterStore.ts","../../packages/core/index.ts","../../packages/core/types/InterfaceRouterStore.ts","../../packages/core/types/TypeCurrentRoute.ts","../../packages/core/types/TypeLifecycleConfig.ts","../../packages/core/types/TypePropsRouter.ts","../../packages/core/types/TypeRedirectToParams.ts","../../packages/core/types/TypeRoute.ts","../../packages/core/types/TypeRouteRaw.ts","../../packages/core/types/TypeRouteWithParams.ts","../../packages/core/types/TypeValidator.ts","../../packages/core/utils/addNames.ts","../../packages/core/utils/constants.ts","../../packages/core/utils/dynamic.ts","../../packages/core/utils/findRouteByPathname.ts","../../packages/core/utils/getDynamicValues.ts","../../packages/core/utils/getInitialRoute.ts","../../packages/core/utils/getQueryValues.ts","../../packages/core/utils/getTypedEntries.ts","../../packages/core/utils/history.ts","../../packages/core/utils/loadComponentToConfig.ts","../../packages/core/utils/replaceDynamicValues.ts","../../packages/react/Router.tsx","../../packages/react/index.ts","../../packages/react/useStore.ts","../../packages/solid/Router.tsx","../../packages/solid/index.ts","../../packages/solid/useStore.ts"],"version":"5.9.2"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "reactive-route",
3
3
  "author": "Dmitry Kazakov",
4
4
  "license": "MIT",
5
- "version": "0.0.1-alpha.1",
5
+ "version": "0.0.1-alpha.2",
6
6
  "description": "Reactive Router for different frameworks",
7
7
  "repository": {
8
8
  "type": "git",
@@ -17,11 +17,12 @@
17
17
  "analyze:js": "biome check --no-errors-on-unmatched .",
18
18
  "format:js": "biome check --no-errors-on-unmatched --write",
19
19
  "check-types": "tsc --project tsconfig.json",
20
+ "check-types-example": "tsc --project ./examples/simple_ssr/tsconfig.json",
20
21
  "prepare": "husky"
21
22
  },
22
23
  "dependencies": {
23
24
  "history": "5.3.0",
24
- "query-string": "9.2.2"
25
+ "query-string": "7.1.3"
25
26
  },
26
27
  "devDependencies": {
27
28
  "@types/node": "22.14.1",
@@ -1,2 +0,0 @@
1
- export declare function replaceObject<TObj extends Record<string, any>>(obj: TObj, newObj: TObj): void;
2
- //# sourceMappingURL=replaceObject.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"replaceObject.d.ts","sourceRoot":"","sources":["../../../packages/solid/replaceObject.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,QActF"}