@argon-router/react 0.12.0 → 1.0.0-rc.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.
package/LICENSE.MD ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Edward Gigolaev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -2,9 +2,6 @@
2
2
 
3
3
  Router without a headache
4
4
 
5
- > [!WARNING]
6
- > argon-router is not production ready yet and still may have bugs and unstable API. If you found bug — please report it on GitHub.
7
-
8
5
  ## Documentation
9
6
 
10
7
  For additional information, guides and api reference visit [documentation site](https://movpushmov.dev/argon-router/)
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),r=require("effector-react"),n=require("@argon-router/core"),o=require("effector"),u=t.createContext(null),s=t.createContext(null);function i(){const e=t.useContext(u);if(!e)throw new Error("[useRouter] Router not found. Add RouterProvider in app root");return e}function c(e,t){const{knownRoutes:n}=i(),o=n.find(({route:t})=>t===e),{onOpen:u}=r.useUnit(e);if(!o)throw new Error(`[useLink] Route "${e}" not found. Maybe it is not passed into createRouter?`);return{path:o.build(t??void 0),onOpen:u}}const a=t.forwardRef((t,r)=>{const{to:n,params:o,onClick:u,replace:s,query:i,...a}=t,{path:l,onOpen:p}=c(n,o);return e.jsx("a",{...a,ref:r,href:l,onClick:e=>{null==u||u(e),e.defaultPrevented||a.target&&"_self"!==a.target||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||(e.preventDefault(),p({params:o||{},replace:s,query:i}))}})});function l(e,t){return t?t.getState(e):e.getState()}function p(e){const u=r.useProvidedScope(),[s,i]=t.useState(function(e,t){return e.map(e=>n.is.router(e.route)?l(e.route.$activeRoutes,t).length>0:l(e.route.$isOpened,t))}(e,u));return t.useEffect(()=>{const t=[];for(const[r,s]of e.entries())if(n.is.router(s.route)){const e=s.route,n=o.createWatch({unit:e.$activeRoutes,scope:u??void 0,fn:e=>{i(t=>{const n=[...t];return n[r]=e.length>0,n})}});t.push(n)}else t.push(o.createWatch({unit:s.route.$isOpened,scope:u??void 0,fn:e=>{i(t=>{const n=[...t];return n[r]=e,n})}}));return()=>{for(const e of t)e.unsubscribe()}},[e,u]),t.useMemo(()=>{const t=e.filter((e,t)=>s[t]);return t.reduce((e,t)=>e.filter(e=>e.route!==t.route.parent),t)},[e,s])}exports.Link=a,exports.Outlet=()=>{const{children:e}=t.useContext(s)??{children:[]},r=p(e).at(-1);return r?t.createElement(r.view):null},exports.RouterProvider=t=>e.jsx(u.Provider,{value:t.router,children:t.children}),exports.createLazyRouteView=function(r){r.route.internal.setAsyncImport(r.view);const n=t.lazy(r.view),{layout:o,fallback:u=()=>e.jsx(e.Fragment,{})}=r,s=o?()=>e.jsx(o,{children:e.jsx(t.Suspense,{fallback:e.jsx(u,{}),children:e.jsx(n,{})})}):()=>e.jsx(t.Suspense,{fallback:e.jsx(u,{}),children:e.jsx(n,{})});return{route:r.route,view:s}},exports.createRouteView=function(t){const{layout:r,view:n}=t,o=r?()=>e.jsx(r,{children:e.jsx(n,{})}):()=>e.jsx(n,{});return{route:t.route,view:o}},exports.createRoutesView=r=>{const{routes:n,otherwise:o}=r;return()=>{const r=p(n).at(-1);return r?e.jsx(s.Provider,{value:{children:r.children??[]},children:t.createElement(r.view)}):o?e.jsx(o,{}):null}},exports.useIsOpened=function(e){return n.is.router(e)?r.useUnit(e.$activeRoutes).length>0:r.useUnit(e.$isOpened)},exports.useLink=c,exports.useOpenedViews=p,exports.useRouter=function(){return r.useUnit(i())},exports.useRouterContext=i,exports.withLayout=function(r,n){const o=r;return n.map(({route:r,view:n})=>({route:r,view:()=>e.jsx(o,{children:t.createElement(n)})}))};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("react"),h=require("effector-react"),w=require("@argon-router/core"),p=require("effector"),b=u.createContext(null),j=u.createContext(null),g=e=>o.jsx(b.Provider,{value:e.router,children:e.children});function x(){const e=u.useContext(b);if(!e)throw new Error("[useRouter] Router not found. Add RouterProvider in app root");return e}function k(){return h.useUnit(x())}function V(e,t){const{knownRoutes:n}=x(),r=n.find(({route:s})=>s===e),{onOpen:i}=h.useUnit(e);if(!r)throw console.error("[useLink route log]",e),new Error("[useLink] Route not found. Maybe it is not passed into createRouter?");return{path:r.build(t??void 0),onOpen:i}}const m=u.forwardRef((e,t)=>{const{to:n,params:r,onClick:i,replace:s,query:c,...a}=e,{path:f,onOpen:d}=V(n,r);return o.jsx("a",{...a,ref:t,href:f,onClick:l=>{i?.(l),!l.defaultPrevented&&(a.target&&a.target!=="_self"||l.metaKey||l.altKey||l.ctrlKey||l.shiftKey||(l.preventDefault(),d({params:r||{},replace:s,query:c})))}})});function L(e){const{layout:t,view:n,children:r}=e,i=t?()=>o.jsx(t,{children:o.jsx(n,{})}):()=>o.jsx(n,{});return{route:e.route,view:i,children:r}}function y(e,t){return t?t.getState(e):e.getState()}function O(e,t){return e.map(n=>w.is.router(n.route)?y(n.route.$activeRoutes,t).length>0:y(n.route.$isOpened,t))}function v(e){const t=h.useProvidedScope(),[n,r]=u.useState(O(e,t));return u.useEffect(()=>{const i=[];for(const[s,c]of e.entries())if(w.is.router(c.route)){const a=c.route,f=p.createWatch({unit:a.$activeRoutes,scope:t??void 0,fn:d=>{r(l=>{const R=[...l];return R[s]=d.length>0,R})}});i.push(f)}else i.push(p.createWatch({unit:c.route.$isOpened,scope:t??void 0,fn:a=>{r(f=>{const d=[...f];return d[s]=a,d})}}));return()=>{for(const s of i)s.unsubscribe()}},[e,t]),u.useMemo(()=>{const i=e.filter((s,c)=>n[c]);return i.reduce((s,c)=>s.filter(a=>a.route!==c.route.parent),i)},[e,n])}const C=e=>{const{routes:t,otherwise:n}=e;return()=>{const r=v(t).at(-1);return r?o.jsx(j.Provider,{value:{children:r.children??[]},children:u.createElement(r.view)}):n?o.jsx(n,{}):null}};function P(e){e.route.internal.setAsyncImport(e.view);const t=u.lazy(e.view),{layout:n,fallback:r=()=>o.jsx(o.Fragment,{})}=e,i=n?()=>o.jsx(n,{children:o.jsx(u.Suspense,{fallback:o.jsx(r,{}),children:o.jsx(t,{})})}):()=>o.jsx(u.Suspense,{fallback:o.jsx(r,{}),children:o.jsx(t,{})});return{route:e.route,view:i}}function S(e,t){const n=e;return t.map(({route:r,view:i})=>({route:r,view:()=>o.jsx(n,{children:u.createElement(i)})}))}const q=()=>{const{children:e}=u.useContext(j)??{children:[]},t=v(e).at(-1);return t?u.createElement(t.view):null};function E(e){return w.is.router(e)?h.useUnit(e.$activeRoutes).length>0:h.useUnit(e.$isOpened)}exports.Link=m;exports.Outlet=q;exports.RouterProvider=g;exports.createLazyRouteView=P;exports.createRouteView=L;exports.createRoutesView=C;exports.useIsOpened=E;exports.useLink=V;exports.useOpenedViews=v;exports.useRouter=k;exports.useRouterContext=x;exports.withLayout=S;
package/dist/index.d.ts CHANGED
@@ -22,10 +22,8 @@ declare type BaseLinkProps<Params extends object | void = void> = {
22
22
 
23
23
  declare interface CreateBaseRouteViewProps<T extends object | void = void> {
24
24
  route: Route<T> | Router;
25
- layout?: ComponentType<{
26
- children: ReactNode;
27
- }>;
28
- children?: CreateBaseRouteViewProps<any>[];
25
+ layout?: LayoutComponent;
26
+ children?: RouteViewWithLayout[];
29
27
  }
30
28
 
31
29
  /**
@@ -122,6 +120,10 @@ declare type ForwardedLink = <Params extends object | void = void>(props: LinkPr
122
120
  ref?: ForwardedRef<HTMLAnchorElement>;
123
121
  }) => ReactNode;
124
122
 
123
+ declare type LayoutComponent = ComponentType<{
124
+ children: ReactNode;
125
+ }>;
126
+
125
127
  /**
126
128
  * @description Navigates user to provided route on click
127
129
  * @link https://movpushmov.dev/argon-router/react/link.html
@@ -198,6 +200,10 @@ export declare interface RouteView {
198
200
  children?: RouteView[];
199
201
  }
200
202
 
203
+ declare type RouteViewWithLayout = RouteView & {
204
+ layout?: LayoutComponent;
205
+ };
206
+
201
207
  export declare function useIsOpened(route: Route | Router): boolean;
202
208
 
203
209
  export declare function useLink<T extends object | void = void>(to: Route<T>, params: T): {
@@ -258,11 +264,3 @@ export declare function withLayout(layout: ComponentType<{
258
264
  }[];
259
265
 
260
266
  export { }
261
-
262
-
263
- declare module 'vitest' {
264
- interface Assertion<T = any> extends CustomMatchers<T> {
265
- }
266
- interface AsymmetricMatchersContaining extends CustomMatchers {
267
- }
268
- }
package/dist/index.js CHANGED
@@ -1,195 +1,153 @@
1
- import { jsx, Fragment } from "react/jsx-runtime";
2
- import { createContext, useContext, forwardRef, useState, useEffect, useMemo, createElement, lazy, Suspense } from "react";
3
- import { useUnit, useProvidedScope } from "effector-react";
4
- import { is } from "@argon-router/core";
5
- import { createWatch } from "effector";
6
- const RouterProviderContext = createContext(null);
7
- const OutletContext = createContext(
1
+ import { jsx as i, Fragment as L } from "react/jsx-runtime";
2
+ import { createContext as b, useContext as y, forwardRef as O, useState as P, useEffect as C, useMemo as S, createElement as h, lazy as $, Suspense as v } from "react";
3
+ import { useUnit as d, useProvidedScope as E } from "effector-react";
4
+ import { is as p } from "@argon-router/core";
5
+ import { createWatch as m } from "effector";
6
+ const V = b(null), g = b(
8
7
  null
9
- );
10
- const RouterProvider = (props) => {
11
- return /* @__PURE__ */ jsx(RouterProviderContext.Provider, { value: props.router, children: props.children });
12
- };
13
- function useRouterContext() {
14
- const context = useContext(RouterProviderContext);
15
- if (!context) {
8
+ ), j = (e) => /* @__PURE__ */ i(V.Provider, { value: e.router, children: e.children });
9
+ function k() {
10
+ const e = y(V);
11
+ if (!e)
16
12
  throw new Error(
17
13
  "[useRouter] Router not found. Add RouterProvider in app root"
18
14
  );
19
- }
20
- return context;
15
+ return e;
21
16
  }
22
- function useRouter() {
23
- return useUnit(useRouterContext());
17
+ function q() {
18
+ return d(k());
24
19
  }
25
- function useLink(to, params) {
26
- const { knownRoutes } = useRouterContext();
27
- const target = knownRoutes.find(
28
- ({ route }) => route === to
29
- );
30
- const { onOpen } = useUnit(to);
31
- if (!target) {
32
- throw new Error(
33
- `[useLink] Route "${to}" not found. Maybe it is not passed into createRouter?`
20
+ function K(e, t) {
21
+ const { knownRoutes: n } = k(), r = n.find(
22
+ ({ route: u }) => u === e
23
+ ), { onOpen: o } = d(e);
24
+ if (!r)
25
+ throw console.error("[useLink route log]", e), new Error(
26
+ "[useLink] Route not found. Maybe it is not passed into createRouter?"
34
27
  );
35
- }
36
28
  return {
37
- path: target.build(params ?? void 0),
38
- onOpen
29
+ path: r.build(t ?? void 0),
30
+ onOpen: o
39
31
  };
40
32
  }
41
- const Link = forwardRef((props, ref) => {
42
- const { to, params, onClick, replace, query, ...anchorProps } = props;
43
- const { path, onOpen } = useLink(to, params);
44
- return /* @__PURE__ */ jsx(
33
+ const D = O((e, t) => {
34
+ const { to: n, params: r, onClick: o, replace: u, query: s, ...c } = e, { path: f, onOpen: a } = K(n, r);
35
+ return /* @__PURE__ */ i(
45
36
  "a",
46
37
  {
47
- ...anchorProps,
48
- ref,
49
- href: path,
50
- onClick: (e) => {
51
- onClick == null ? void 0 : onClick(e);
52
- if (e.defaultPrevented) {
53
- return;
54
- }
55
- if (anchorProps.target && anchorProps.target !== "_self") {
56
- return;
57
- }
58
- if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) {
59
- return;
60
- }
61
- e.preventDefault();
62
- onOpen({
63
- params: params || {},
64
- replace,
65
- query
66
- });
38
+ ...c,
39
+ ref: t,
40
+ href: f,
41
+ onClick: (l) => {
42
+ o?.(l), !l.defaultPrevented && (c.target && c.target !== "_self" || l.metaKey || l.altKey || l.ctrlKey || l.shiftKey || (l.preventDefault(), a({
43
+ params: r || {},
44
+ replace: u,
45
+ query: s
46
+ })));
67
47
  }
68
48
  }
69
49
  );
70
50
  });
71
- function createRouteView(props) {
72
- const { layout: Layout, view: View } = props;
73
- const view = Layout ? () => /* @__PURE__ */ jsx(Layout, { children: /* @__PURE__ */ jsx(View, {}) }) : () => /* @__PURE__ */ jsx(View, {});
51
+ function N(e) {
52
+ const { layout: t, view: n, children: r } = e, o = t ? () => /* @__PURE__ */ i(t, { children: /* @__PURE__ */ i(n, {}) }) : () => /* @__PURE__ */ i(n, {});
74
53
  return {
75
- route: props.route,
76
- view
54
+ route: e.route,
55
+ view: o,
56
+ children: r
77
57
  };
78
58
  }
79
- function getStoreValue(store, scope) {
80
- return scope ? scope.getState(store) : store.getState();
59
+ function R(e, t) {
60
+ return t ? t.getState(e) : e.getState();
81
61
  }
82
- function getVisibilities(routes, scope) {
83
- return routes.map((view) => {
84
- if (is.router(view.route)) {
85
- return getStoreValue(view.route.$activeRoutes, scope).length > 0;
86
- }
87
- return getStoreValue(view.route.$isOpened, scope);
88
- });
62
+ function F(e, t) {
63
+ return e.map((n) => p.router(n.route) ? R(n.route.$activeRoutes, t).length > 0 : R(n.route.$isOpened, t));
89
64
  }
90
- function useOpenedViews(routes) {
91
- const scope = useProvidedScope();
92
- const [visibilities, setVisibilities] = useState(
93
- getVisibilities(routes, scope)
65
+ function x(e) {
66
+ const t = E(), [n, r] = P(
67
+ F(e, t)
94
68
  );
95
- useEffect(() => {
96
- const subscriptions = [];
97
- for (const [index, view] of routes.entries()) {
98
- if (is.router(view.route)) {
99
- const router = view.route;
100
- const subscription = createWatch({
101
- unit: router.$activeRoutes,
102
- scope: scope ?? void 0,
103
- fn: (routes2) => {
104
- setVisibilities((prev) => {
105
- const newVisibilities = [...prev];
106
- newVisibilities[index] = routes2.length > 0;
107
- return newVisibilities;
69
+ return C(() => {
70
+ const o = [];
71
+ for (const [u, s] of e.entries())
72
+ if (p.router(s.route)) {
73
+ const c = s.route, f = m({
74
+ unit: c.$activeRoutes,
75
+ scope: t ?? void 0,
76
+ fn: (a) => {
77
+ r((l) => {
78
+ const w = [...l];
79
+ return w[u] = a.length > 0, w;
108
80
  });
109
81
  }
110
82
  });
111
- subscriptions.push(subscription);
112
- } else {
113
- subscriptions.push(
114
- createWatch({
115
- unit: view.route.$isOpened,
116
- scope: scope ?? void 0,
117
- fn: (isOpened) => {
118
- setVisibilities((prev) => {
119
- const newVisibilities = [...prev];
120
- newVisibilities[index] = isOpened;
121
- return newVisibilities;
83
+ o.push(f);
84
+ } else
85
+ o.push(
86
+ m({
87
+ unit: s.route.$isOpened,
88
+ scope: t ?? void 0,
89
+ fn: (c) => {
90
+ r((f) => {
91
+ const a = [...f];
92
+ return a[u] = c, a;
122
93
  });
123
94
  }
124
95
  })
125
96
  );
126
- }
127
- }
128
97
  return () => {
129
- for (const subscription of subscriptions) {
130
- subscription.unsubscribe();
131
- }
98
+ for (const u of o)
99
+ u.unsubscribe();
132
100
  };
133
- }, [routes, scope]);
134
- return useMemo(() => {
135
- const filtered = routes.filter((_, i) => visibilities[i]);
136
- return filtered.reduce(
137
- (filtered2, view) => filtered2.filter(
138
- (r) => r.route !== view.route.parent
101
+ }, [e, t]), S(() => {
102
+ const o = e.filter((u, s) => n[s]);
103
+ return o.reduce(
104
+ (u, s) => u.filter(
105
+ (c) => c.route !== s.route.parent
139
106
  ),
140
- filtered
107
+ o
141
108
  );
142
- }, [routes, visibilities]);
109
+ }, [e, n]);
143
110
  }
144
- const createRoutesView = (props) => {
145
- const { routes, otherwise: NotFound } = props;
111
+ const U = (e) => {
112
+ const { routes: t, otherwise: n } = e;
146
113
  return () => {
147
- const openedView = useOpenedViews(routes).at(-1);
148
- if (!openedView) {
149
- return NotFound ? /* @__PURE__ */ jsx(NotFound, {}) : null;
150
- }
151
- return /* @__PURE__ */ jsx(OutletContext.Provider, { value: { children: openedView.children ?? [] }, children: createElement(openedView.view) });
114
+ const r = x(t).at(-1);
115
+ return r ? /* @__PURE__ */ i(g.Provider, { value: { children: r.children ?? [] }, children: h(r.view) }) : n ? /* @__PURE__ */ i(n, {}) : null;
152
116
  };
153
117
  };
154
- function createLazyRouteView(props) {
155
- props.route.internal.setAsyncImport(props.view);
156
- const View = lazy(props.view);
157
- const { layout: Layout, fallback: Fallback = () => /* @__PURE__ */ jsx(Fragment, {}) } = props;
158
- const view = Layout ? () => /* @__PURE__ */ jsx(Layout, { children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Fallback, {}), children: /* @__PURE__ */ jsx(View, {}) }) }) : () => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Fallback, {}), children: /* @__PURE__ */ jsx(View, {}) });
118
+ function W(e) {
119
+ e.route.internal.setAsyncImport(e.view);
120
+ const t = $(e.view), { layout: n, fallback: r = () => /* @__PURE__ */ i(L, {}) } = e, o = n ? () => /* @__PURE__ */ i(n, { children: /* @__PURE__ */ i(v, { fallback: /* @__PURE__ */ i(r, {}), children: /* @__PURE__ */ i(t, {}) }) }) : () => /* @__PURE__ */ i(v, { fallback: /* @__PURE__ */ i(r, {}), children: /* @__PURE__ */ i(t, {}) });
159
121
  return {
160
- route: props.route,
161
- view
122
+ route: e.route,
123
+ view: o
162
124
  };
163
125
  }
164
- function withLayout(layout, views) {
165
- const Layout = layout;
166
- return views.map(({ route, view }) => ({
167
- route,
168
- view: () => /* @__PURE__ */ jsx(Layout, { children: createElement(view) })
126
+ function B(e, t) {
127
+ const n = e;
128
+ return t.map(({ route: r, view: o }) => ({
129
+ route: r,
130
+ view: () => /* @__PURE__ */ i(n, { children: h(o) })
169
131
  }));
170
132
  }
171
- const Outlet = () => {
172
- const { children } = useContext(OutletContext) ?? { children: [] };
173
- const openedView = useOpenedViews(children).at(-1);
174
- if (!openedView) {
175
- return null;
176
- }
177
- return createElement(openedView.view);
133
+ const G = () => {
134
+ const { children: e } = y(g) ?? { children: [] }, t = x(e).at(-1);
135
+ return t ? h(t.view) : null;
178
136
  };
179
- function useIsOpened(route) {
180
- return is.router(route) ? useUnit(route.$activeRoutes).length > 0 : useUnit(route.$isOpened);
137
+ function H(e) {
138
+ return p.router(e) ? d(e.$activeRoutes).length > 0 : d(e.$isOpened);
181
139
  }
182
140
  export {
183
- Link,
184
- Outlet,
185
- RouterProvider,
186
- createLazyRouteView,
187
- createRouteView,
188
- createRoutesView,
189
- useIsOpened,
190
- useLink,
191
- useOpenedViews,
192
- useRouter,
193
- useRouterContext,
194
- withLayout
141
+ D as Link,
142
+ G as Outlet,
143
+ j as RouterProvider,
144
+ W as createLazyRouteView,
145
+ N as createRouteView,
146
+ U as createRoutesView,
147
+ H as useIsOpened,
148
+ K as useLink,
149
+ x as useOpenedViews,
150
+ q as useRouter,
151
+ k as useRouterContext,
152
+ B as withLayout
195
153
  };
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },
7
7
  "private": false,
8
- "version": "0.12.0",
8
+ "version": "1.0.0-rc.0",
9
9
  "description": "React bindings for argon router",
10
10
  "keywords": [
11
11
  "effector",
@@ -36,15 +36,11 @@
36
36
  "type": "git",
37
37
  "url": "git+https://github.com/movpushmov/argon-router.git"
38
38
  },
39
- "scripts": {
40
- "build": "vite build",
41
- "test": "vitest run"
42
- },
43
39
  "bugs": {
44
40
  "url": "https://github.com/movpushmov/argon-router/issues"
45
41
  },
46
42
  "dependencies": {
47
- "@argon-router/core": "^0.12.0"
43
+ "@argon-router/core": "1.0.0-rc.0"
48
44
  },
49
45
  "devDependencies": {
50
46
  "@babel/preset-react": "^7.26.3",
@@ -52,6 +48,7 @@
52
48
  "@testing-library/react": "^16.2.0",
53
49
  "@testing-library/user-event": "^14.6.1",
54
50
  "@vitejs/plugin-react": "^4.3.4",
51
+ "happy-dom": "^20.8.3",
55
52
  "jsdom": "^25.0.1"
56
53
  },
57
54
  "peerDependencies": {
@@ -59,5 +56,9 @@
59
56
  "effector-react": ">=23",
60
57
  "react": "18 || 19"
61
58
  },
62
- "gitHead": "9832d6cd282d6abd33c26ba4d03b9a1176110fc4"
63
- }
59
+ "gitHead": "9832d6cd282d6abd33c26ba4d03b9a1176110fc4",
60
+ "scripts": {
61
+ "build": "vite build",
62
+ "test": "vitest run"
63
+ }
64
+ }