@argon-router/react 0.3.3 → 0.4.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/dist/index.cjs +9 -9
- package/dist/index.d.ts +23 -40
- package/dist/index.js +181 -184
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),be=require("effector-react");var N={exports:{}},S={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var de;function Oe(){if(de)return S;de=1;var a=Symbol.for("react.transitional.element"),E=Symbol.for("react.fragment");function s(g,l,i){var b=null;if(i!==void 0&&(b=""+i),l.key!==void 0&&(b=""+l.key),"key"in l){i={};for(var m in l)m!=="key"&&(i[m]=l[m])}else i=l;return l=i.ref,{$$typeof:a,type:g,key:b,ref:l!==void 0?l:null,props:i}}return S.Fragment=E,S.jsx=s,S.jsxs=s,S}var O={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var ve;function Ae(){return ve||(ve=1,process.env.NODE_ENV!=="production"&&function(){function a(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===pe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case Te:return"Portal";case K:return"Profiler";case B:return"StrictMode";case V:return"Suspense";case W:return"SuspenseList"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case Z:return(e.displayName||"Context")+".Provider";case I:return(e._context.displayName||"Context")+".Consumer";case $:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U:return r=e.displayName||null,r!==null?r:a(e.type)||"Memo";case q:r=e._payload,e=e._init;try{return a(e(r))}catch{}}return null}function E(e){return""+e}function s(e){try{E(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),E(e)}}function g(){}function l(){if(p===0){ee=console.log,re=console.info,te=console.warn,oe=console.error,ne=console.group,ae=console.groupCollapsed,ue=console.groupEnd;var e={configurable:!0,enumerable:!0,value:g,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}p++}function i(){if(p--,p===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_({},e,{value:ee}),info:_({},e,{value:re}),warn:_({},e,{value:te}),error:_({},e,{value:oe}),group:_({},e,{value:ne}),groupCollapsed:_({},e,{value:ae}),groupEnd:_({},e,{value:ue})})}0>p&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function b(e){if(J===void 0)try{throw Error()}catch(t){var r=t.stack.trim().match(/\n( *(at )?)/);J=r&&r[1]||"",se=-1<t.stack.indexOf(`
|
|
18
18
|
at`)?" (<anonymous>)":-1<t.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
-
`+
|
|
20
|
-
`),
|
|
21
|
-
`);for(o=u=0;u<
|
|
22
|
-
`+
|
|
19
|
+
`+J+e+se}function m(e,r){if(!e||L)return"";var t=G.get(e);if(t!==void 0)return t;L=!0,t=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var n=null;n=h.H,h.H=null,l();try{var c={DetermineComponentFrameRoot:function(){try{if(r){var x=function(){throw Error()};if(Object.defineProperty(x.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(x,[])}catch(w){var A=w}Reflect.construct(e,[],x)}else{try{x.call()}catch(w){A=w}e.call(x.prototype)}}else{try{throw Error()}catch(w){A=w}(x=e())&&typeof x.catch=="function"&&x.catch(function(){})}}catch(w){if(w&&A&&typeof w.stack=="string")return[w.stack,A.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=c.DetermineComponentFrameRoot(),R=o[0],k=o[1];if(R&&k){var d=R.split(`
|
|
20
|
+
`),T=k.split(`
|
|
21
|
+
`);for(o=u=0;u<d.length&&!d[u].includes("DetermineComponentFrameRoot");)u++;for(;o<T.length&&!T[o].includes("DetermineComponentFrameRoot");)o++;if(u===d.length||o===T.length)for(u=d.length-1,o=T.length-1;1<=u&&0<=o&&d[u]!==T[o];)o--;for(;1<=u&&0<=o;u--,o--)if(d[u]!==T[o]){if(u!==1||o!==1)do if(u--,o--,0>o||d[u]!==T[o]){var C=`
|
|
22
|
+
`+d[u].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),typeof e=="function"&&G.set(e,C),C}while(1<=u&&0<=o);break}}}finally{L=!1,h.H=n,i(),Error.prepareStackTrace=t}return d=(d=e?e.displayName||e.name:"")?b(d):"",typeof e=="function"&&G.set(e,d),d}function j(e){if(e==null)return"";if(typeof e=="function"){var r=e.prototype;return m(e,!(!r||!r.isReactComponent))}if(typeof e=="string")return b(e);switch(e){case V:return b("Suspense");case W:return b("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case $:return e=m(e.render,!1),e;case U:return j(e.type);case q:r=e._payload,e=e._init;try{return j(e(r))}catch{}}return""}function f(){var e=h.A;return e===null?null:e.getOwner()}function we(e){if(D.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function xe(e,r){function t(){le||(le=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function ye(){var e=a(this.type);return ie[e]||(ie[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function je(e,r,t,n,c,u){return t=u.ref,e={$$typeof:Y,type:e,key:r,props:u,_owner:c},(t!==void 0?t:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:ye}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function F(e,r,t,n,c,u){if(typeof e=="string"||typeof e=="function"||e===M||e===K||e===B||e===V||e===W||e===ke||typeof e=="object"&&e!==null&&(e.$$typeof===q||e.$$typeof===U||e.$$typeof===Z||e.$$typeof===I||e.$$typeof===$||e.$$typeof===Ce||e.getModuleId!==void 0)){var o=r.children;if(o!==void 0)if(n)if(z(o)){for(n=0;n<o.length;n++)H(o[n],e);Object.freeze&&Object.freeze(o)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else H(o,e)}else o="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?n="null":z(e)?n="array":e!==void 0&&e.$$typeof===Y?(n="<"+(a(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):n=typeof e,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",n,o);if(D.call(r,"key")){o=a(e);var R=Object.keys(r).filter(function(d){return d!=="key"});n=0<R.length?"{key: someKey, "+R.join(": ..., ")+": ...}":"{key: someKey}",ce[o+n]||(R=0<R.length?"{"+R.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
23
|
let props = %s;
|
|
24
24
|
<%s {...props} />
|
|
25
25
|
React keys must be passed directly to JSX without using spread:
|
|
26
26
|
let props = %s;
|
|
27
|
-
<%s key={someKey} {...props} />`,n,o,
|
|
27
|
+
<%s key={someKey} {...props} />`,n,o,R,o),ce[o+n]=!0)}if(o=null,t!==void 0&&(s(t),o=""+t),we(r)&&(s(r.key),o=""+r.key),"key"in r){t={};for(var k in r)k!=="key"&&(t[k]=r[k])}else t=r;return o&&xe(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),je(e,o,u,c,f(),t)}function H(e,r){if(typeof e=="object"&&e&&e.$$typeof!==Se){if(z(e))for(var t=0;t<e.length;t++){var n=e[t];P(n)&&X(n,r)}else if(P(e))e._store&&(e._store.validated=1);else if(e===null||typeof e!="object"?t=null:(t=Q&&e[Q]||e["@@iterator"],t=typeof t=="function"?t:null),typeof t=="function"&&t!==e.entries&&(t=t.call(e),t!==e))for(;!(e=t.next()).done;)P(e.value)&&X(e.value,r)}}function P(e){return typeof e=="object"&&e!==null&&e.$$typeof===Y}function X(e,r){if(e._store&&!e._store.validated&&e.key==null&&(e._store.validated=1,r=he(r),!fe[r])){fe[r]=!0;var t="";e&&e._owner!=null&&e._owner!==f()&&(t=null,typeof e._owner.tag=="number"?t=a(e._owner.type):typeof e._owner.name=="string"&&(t=e._owner.name),t=" It was passed a child from "+t+".");var n=h.getCurrentStack;h.getCurrentStack=function(){var c=j(e.type);return n&&(c+=n()||""),c},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',r,t),h.getCurrentStack=n}}function he(e){var r="",t=f();return t&&(t=a(t.type))&&(r=`
|
|
28
28
|
|
|
29
29
|
Check the render method of \``+t+"`."),r||(e=a(e))&&(r=`
|
|
30
30
|
|
|
31
|
-
Check the top-level render call using <`+e+">."),r}var _e=
|
|
31
|
+
Check the top-level render call using <`+e+">."),r}var _e=y,Y=Symbol.for("react.transitional.element"),Te=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),Z=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),ke=Symbol.for("react.offscreen"),Q=Symbol.iterator,pe=Symbol.for("react.client.reference"),h=_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=Object.prototype.hasOwnProperty,_=Object.assign,Ce=Symbol.for("react.client.reference"),z=Array.isArray,p=0,ee,re,te,oe,ne,ae,ue;g.__reactDisabledLog=!0;var J,se,L=!1,G=new(typeof WeakMap=="function"?WeakMap:Map),Se=Symbol.for("react.client.reference"),le,ie={},ce={},fe={};O.Fragment=M,O.jsx=function(e,r,t,n,c){return F(e,r,t,!1,n,c)},O.jsxs=function(e,r,t,n,c){return F(e,r,t,!0,n,c)}}()),O}var Ee;function Ne(){return Ee||(Ee=1,process.env.NODE_ENV==="production"?N.exports=Oe():N.exports=Ae()),N.exports}var v=Ne();const ge=y.createContext(null),Pe=a=>v.jsx(ge.Provider,{value:a.router,children:a.children});function me(){const a=y.useContext(ge);if(!a)throw new Error("[useRouter] Router not found. Add RouterProvider in app root");return a}function Re(){return be.useUnit(me())}const Ye=y.forwardRef((a,E)=>{const{to:s,params:g,onClick:l,...i}=a,{mappedRoutes:b}=me(),m=b.find(({route:f})=>f===s),{onOpen:j}=be.useUnit(s);if(!m){const{internal:f}=s;throw new Error(`[Link] Route with path "${f.path}" not found. Maybe it is not passed into createRouter?`)}return v.jsx("a",{...i,ref:E,href:m.toPath(g??void 0),onClick:f=>{l==null||l(f),!f.defaultPrevented&&(i.target&&i.target!=="_self"||f.metaKey||f.altKey||f.ctrlKey||f.shiftKey||(f.preventDefault(),j({params:g||{}})))}})}),Me=a=>({route:a.route,view:()=>{const{view:E,layout:s}=a;return s?v.jsx(s,{children:v.jsx(E,{})}):v.jsx(E,{})}}),$e=a=>{const{routes:E,otherwise:s}=a;return()=>{const{activeRoutes:g}=Re(),l=g.reduce((b,m)=>b.filter(j=>j!==m.internal.parent),g),i=E.find(b=>b.route===l.at(-1));return i?y.createElement(i.view):s?v.jsx(s,{}):null}},Ve=a=>{a.route.internal.setAsyncImport(a.view);const E=y.lazy(a.view);return{route:a.route,view:()=>{const{layout:s,fallback:g=()=>v.jsx(v.Fragment,{})}=a;return s?v.jsx(s,{children:v.jsx(y.Suspense,{fallback:v.jsx(g,{}),children:v.jsx(E,{})})}):v.jsx(y.Suspense,{fallback:v.jsx(g,{}),children:v.jsx(E,{})})}}};exports.Link=Ye;exports.RouterProvider=Pe;exports.createLazyRouteView=Ve;exports.createRouteView=Me;exports.createRoutesView=$e;exports.useRouter=Re;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes } from 'react';
|
|
2
2
|
import { ComponentType } from 'react';
|
|
3
|
+
import { FC } from 'react';
|
|
3
4
|
import { ForwardedRef } from 'react';
|
|
4
5
|
import { JSX } from 'react/jsx-runtime';
|
|
6
|
+
import { NavigatePayload } from '@argon-router/core';
|
|
5
7
|
import { Query } from '@argon-router/core';
|
|
6
8
|
import { ReactNode } from 'react';
|
|
7
9
|
import { Route } from '@argon-router/core';
|
|
@@ -14,58 +16,42 @@ declare type BaseLinkProps<Params> = {
|
|
|
14
16
|
children?: ReactNode;
|
|
15
17
|
} & AnchorProps;
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
view: () => JSX.Element | null;
|
|
19
|
+
declare interface CreateBaseRouteViewProps {
|
|
19
20
|
route: Route<any>;
|
|
20
|
-
fallback?: ComponentType;
|
|
21
21
|
layout?: ComponentType<{
|
|
22
22
|
children?: ReactNode;
|
|
23
23
|
}>;
|
|
24
|
-
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export declare const createLazyRouteView: (props: CreateLazyRouteViewProps) => RouteView;
|
|
27
|
+
|
|
28
|
+
export declare interface CreateLazyRouteViewProps extends CreateBaseRouteViewProps {
|
|
29
|
+
view: () => Promise<{
|
|
30
|
+
default: ComponentType;
|
|
31
|
+
}>;
|
|
32
|
+
fallback?: ComponentType;
|
|
33
|
+
}
|
|
25
34
|
|
|
26
35
|
export declare const createRoutesView: (props: CreateRoutesViewProps) => () => JSX.Element | null;
|
|
27
36
|
|
|
28
37
|
declare interface CreateRoutesViewProps {
|
|
29
|
-
routes:
|
|
38
|
+
routes: RouteView[];
|
|
30
39
|
otherwise?: ComponentType;
|
|
31
40
|
}
|
|
32
41
|
|
|
33
|
-
export declare const createRouteView: (props: CreateRouteViewProps) =>
|
|
34
|
-
view: () => JSX.Element | null;
|
|
35
|
-
route: Route<any>;
|
|
36
|
-
layout?: ComponentType<{
|
|
37
|
-
children?: ReactNode;
|
|
38
|
-
}>;
|
|
39
|
-
};
|
|
42
|
+
export declare const createRouteView: (props: CreateRouteViewProps) => RouteView;
|
|
40
43
|
|
|
41
|
-
declare interface CreateRouteViewProps {
|
|
42
|
-
route: Route<any>;
|
|
44
|
+
export declare interface CreateRouteViewProps extends CreateBaseRouteViewProps {
|
|
43
45
|
view: ComponentType;
|
|
44
|
-
layout?: ComponentType<{
|
|
45
|
-
children?: ReactNode;
|
|
46
|
-
}>;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
declare interface CreateRouteViewProps_2 {
|
|
50
|
-
route: Route<any>;
|
|
51
|
-
view: LazyComponent;
|
|
52
|
-
fallback?: ComponentType;
|
|
53
|
-
layout?: ComponentType<{
|
|
54
|
-
children?: ReactNode;
|
|
55
|
-
}>;
|
|
56
46
|
}
|
|
57
47
|
|
|
58
48
|
declare type ForwardedLink = <Params = void>(props: LinkProps<Params> & {
|
|
59
49
|
ref?: ForwardedRef<HTMLAnchorElement>;
|
|
60
50
|
}) => ReactNode;
|
|
61
51
|
|
|
62
|
-
declare type LazyComponent = () => Promise<{
|
|
63
|
-
default: ComponentType;
|
|
64
|
-
}>;
|
|
65
|
-
|
|
66
52
|
export declare const Link: ForwardedLink;
|
|
67
53
|
|
|
68
|
-
declare type LinkProps<Params> = Params extends Record<string, never> | void | undefined ? BaseLinkProps<Params> & {
|
|
54
|
+
export declare type LinkProps<Params> = Params extends Record<string, never> | void | undefined ? BaseLinkProps<Params> & {
|
|
69
55
|
params?: Params;
|
|
70
56
|
} : BaseLinkProps<Params> & {
|
|
71
57
|
params: Params;
|
|
@@ -78,21 +64,18 @@ declare interface RouterProviderProps {
|
|
|
78
64
|
router: Router;
|
|
79
65
|
}
|
|
80
66
|
|
|
67
|
+
export declare interface RouteView {
|
|
68
|
+
route: Route<any>;
|
|
69
|
+
view: FC;
|
|
70
|
+
}
|
|
71
|
+
|
|
81
72
|
export declare function useRouter(): {
|
|
82
73
|
query: Query;
|
|
83
74
|
path: string;
|
|
84
75
|
activeRoutes: Route<any>[];
|
|
85
76
|
onBack: () => void;
|
|
86
77
|
onForward: () => void;
|
|
87
|
-
onNavigate: (payload:
|
|
88
|
-
path: string;
|
|
89
|
-
query: Query;
|
|
90
|
-
replace?: boolean;
|
|
91
|
-
}) => {
|
|
92
|
-
path: string;
|
|
93
|
-
query: Query;
|
|
94
|
-
replace?: boolean;
|
|
95
|
-
};
|
|
78
|
+
onNavigate: (payload: NavigatePayload) => NavigatePayload;
|
|
96
79
|
};
|
|
97
80
|
|
|
98
81
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useUnit as
|
|
1
|
+
import Ae, { createContext as Oe, useContext as Se, forwardRef as Ne, createElement as Pe, lazy as Ye, Suspense as fe } from "react";
|
|
2
|
+
import { useUnit as be } from "effector-react";
|
|
3
3
|
var S = { exports: {} }, C = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
@@ -10,29 +10,29 @@ var S = { exports: {} }, C = {};
|
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var a = Symbol.for("react.transitional.element"),
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
if (i !== void 0 && (
|
|
13
|
+
var de;
|
|
14
|
+
function Me() {
|
|
15
|
+
if (de) return C;
|
|
16
|
+
de = 1;
|
|
17
|
+
var a = Symbol.for("react.transitional.element"), E = Symbol.for("react.fragment");
|
|
18
|
+
function s(m, l, i) {
|
|
19
|
+
var b = null;
|
|
20
|
+
if (i !== void 0 && (b = "" + i), l.key !== void 0 && (b = "" + l.key), "key" in l) {
|
|
21
21
|
i = {};
|
|
22
|
-
for (var g in
|
|
23
|
-
g !== "key" && (i[g] =
|
|
24
|
-
} else i =
|
|
25
|
-
return
|
|
22
|
+
for (var g in l)
|
|
23
|
+
g !== "key" && (i[g] = l[g]);
|
|
24
|
+
} else i = l;
|
|
25
|
+
return l = i.ref, {
|
|
26
26
|
$$typeof: a,
|
|
27
|
-
type:
|
|
28
|
-
key:
|
|
29
|
-
ref:
|
|
27
|
+
type: m,
|
|
28
|
+
key: b,
|
|
29
|
+
ref: l !== void 0 ? l : null,
|
|
30
30
|
props: i
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return C.Fragment =
|
|
33
|
+
return C.Fragment = E, C.jsx = s, C.jsxs = s, C;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var A = {};
|
|
36
36
|
/**
|
|
37
37
|
* @license React
|
|
38
38
|
* react-jsx-runtime.development.js
|
|
@@ -42,42 +42,42 @@ var O = {};
|
|
|
42
42
|
* This source code is licensed under the MIT license found in the
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
44
|
*/
|
|
45
|
-
var
|
|
46
|
-
function
|
|
47
|
-
return
|
|
45
|
+
var ve;
|
|
46
|
+
function $e() {
|
|
47
|
+
return ve || (ve = 1, process.env.NODE_ENV !== "production" && function() {
|
|
48
48
|
function a(e) {
|
|
49
49
|
if (e == null) return null;
|
|
50
50
|
if (typeof e == "function")
|
|
51
51
|
return e.$$typeof === pe ? null : e.displayName || e.name || null;
|
|
52
52
|
if (typeof e == "string") return e;
|
|
53
53
|
switch (e) {
|
|
54
|
-
case
|
|
54
|
+
case Y:
|
|
55
55
|
return "Fragment";
|
|
56
56
|
case _e:
|
|
57
57
|
return "Portal";
|
|
58
|
-
case
|
|
58
|
+
case B:
|
|
59
59
|
return "Profiler";
|
|
60
|
-
case
|
|
60
|
+
case X:
|
|
61
61
|
return "StrictMode";
|
|
62
|
-
case
|
|
62
|
+
case $:
|
|
63
63
|
return "Suspense";
|
|
64
|
-
case
|
|
64
|
+
case W:
|
|
65
65
|
return "SuspenseList";
|
|
66
66
|
}
|
|
67
67
|
if (typeof e == "object")
|
|
68
68
|
switch (typeof e.tag == "number" && console.error(
|
|
69
69
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
70
70
|
), e.$$typeof) {
|
|
71
|
-
case
|
|
71
|
+
case I:
|
|
72
72
|
return (e.displayName || "Context") + ".Provider";
|
|
73
|
-
case
|
|
73
|
+
case K:
|
|
74
74
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
75
|
-
case
|
|
75
|
+
case M:
|
|
76
76
|
var r = e.render;
|
|
77
77
|
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
78
|
-
case
|
|
78
|
+
case U:
|
|
79
79
|
return r = e.displayName || null, r !== null ? r : a(e.type) || "Memo";
|
|
80
|
-
case
|
|
80
|
+
case V:
|
|
81
81
|
r = e._payload, e = e._init;
|
|
82
82
|
try {
|
|
83
83
|
return a(e(r));
|
|
@@ -86,12 +86,12 @@ function Me() {
|
|
|
86
86
|
}
|
|
87
87
|
return null;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function E(e) {
|
|
90
90
|
return "" + e;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function s(e) {
|
|
93
93
|
try {
|
|
94
|
-
|
|
94
|
+
E(e);
|
|
95
95
|
var r = !1;
|
|
96
96
|
} catch {
|
|
97
97
|
r = !0;
|
|
@@ -103,18 +103,18 @@ function Me() {
|
|
|
103
103
|
r,
|
|
104
104
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
105
105
|
n
|
|
106
|
-
),
|
|
106
|
+
), E(e);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function m() {
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function l() {
|
|
112
112
|
if (p === 0) {
|
|
113
|
-
|
|
113
|
+
D = console.log, ee = console.info, re = console.warn, te = console.error, oe = console.group, ne = console.groupCollapsed, ae = console.groupEnd;
|
|
114
114
|
var e = {
|
|
115
115
|
configurable: !0,
|
|
116
116
|
enumerable: !0,
|
|
117
|
-
value:
|
|
117
|
+
value: m,
|
|
118
118
|
writable: !0
|
|
119
119
|
};
|
|
120
120
|
Object.defineProperties(console, {
|
|
@@ -133,97 +133,97 @@ function Me() {
|
|
|
133
133
|
if (p--, p === 0) {
|
|
134
134
|
var e = { configurable: !0, enumerable: !0, writable: !0 };
|
|
135
135
|
Object.defineProperties(console, {
|
|
136
|
-
log:
|
|
137
|
-
info:
|
|
138
|
-
warn:
|
|
139
|
-
error:
|
|
140
|
-
group:
|
|
141
|
-
groupCollapsed:
|
|
142
|
-
groupEnd:
|
|
136
|
+
log: j({}, e, { value: D }),
|
|
137
|
+
info: j({}, e, { value: ee }),
|
|
138
|
+
warn: j({}, e, { value: re }),
|
|
139
|
+
error: j({}, e, { value: te }),
|
|
140
|
+
group: j({}, e, { value: oe }),
|
|
141
|
+
groupCollapsed: j({}, e, { value: ne }),
|
|
142
|
+
groupEnd: j({}, e, { value: ae })
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
0 > p && console.error(
|
|
146
146
|
"disabledDepth fell below zero. This is a bug in React. Please file an issue."
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
if (
|
|
149
|
+
function b(e) {
|
|
150
|
+
if (q === void 0)
|
|
151
151
|
try {
|
|
152
152
|
throw Error();
|
|
153
153
|
} catch (t) {
|
|
154
154
|
var r = t.stack.trim().match(/\n( *(at )?)/);
|
|
155
|
-
|
|
155
|
+
q = r && r[1] || "", ue = -1 < t.stack.indexOf(`
|
|
156
156
|
at`) ? " (<anonymous>)" : -1 < t.stack.indexOf("@") ? "@unknown:0:0" : "";
|
|
157
157
|
}
|
|
158
158
|
return `
|
|
159
|
-
` +
|
|
159
|
+
` + q + e + ue;
|
|
160
160
|
}
|
|
161
161
|
function g(e, r) {
|
|
162
|
-
if (!e ||
|
|
163
|
-
var t =
|
|
162
|
+
if (!e || J) return "";
|
|
163
|
+
var t = G.get(e);
|
|
164
164
|
if (t !== void 0) return t;
|
|
165
|
-
|
|
165
|
+
J = !0, t = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
|
|
166
166
|
var n = null;
|
|
167
|
-
n =
|
|
167
|
+
n = h.H, h.H = null, l();
|
|
168
168
|
try {
|
|
169
|
-
var
|
|
169
|
+
var c = {
|
|
170
170
|
DetermineComponentFrameRoot: function() {
|
|
171
171
|
try {
|
|
172
172
|
if (r) {
|
|
173
|
-
var
|
|
173
|
+
var R = function() {
|
|
174
174
|
throw Error();
|
|
175
175
|
};
|
|
176
|
-
if (Object.defineProperty(
|
|
176
|
+
if (Object.defineProperty(R.prototype, "props", {
|
|
177
177
|
set: function() {
|
|
178
178
|
throw Error();
|
|
179
179
|
}
|
|
180
180
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
181
181
|
try {
|
|
182
|
-
Reflect.construct(
|
|
183
|
-
} catch (
|
|
184
|
-
var
|
|
182
|
+
Reflect.construct(R, []);
|
|
183
|
+
} catch (w) {
|
|
184
|
+
var O = w;
|
|
185
185
|
}
|
|
186
|
-
Reflect.construct(e, [],
|
|
186
|
+
Reflect.construct(e, [], R);
|
|
187
187
|
} else {
|
|
188
188
|
try {
|
|
189
|
-
|
|
190
|
-
} catch (
|
|
191
|
-
|
|
189
|
+
R.call();
|
|
190
|
+
} catch (w) {
|
|
191
|
+
O = w;
|
|
192
192
|
}
|
|
193
|
-
e.call(
|
|
193
|
+
e.call(R.prototype);
|
|
194
194
|
}
|
|
195
195
|
} else {
|
|
196
196
|
try {
|
|
197
197
|
throw Error();
|
|
198
|
-
} catch (
|
|
199
|
-
|
|
198
|
+
} catch (w) {
|
|
199
|
+
O = w;
|
|
200
200
|
}
|
|
201
|
-
(
|
|
201
|
+
(R = e()) && typeof R.catch == "function" && R.catch(function() {
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
} catch (
|
|
205
|
-
if (
|
|
206
|
-
return [
|
|
204
|
+
} catch (w) {
|
|
205
|
+
if (w && O && typeof w.stack == "string")
|
|
206
|
+
return [w.stack, O.stack];
|
|
207
207
|
}
|
|
208
208
|
return [null, null];
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
|
-
|
|
211
|
+
c.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
|
|
212
212
|
var u = Object.getOwnPropertyDescriptor(
|
|
213
|
-
|
|
213
|
+
c.DetermineComponentFrameRoot,
|
|
214
214
|
"name"
|
|
215
215
|
);
|
|
216
216
|
u && u.configurable && Object.defineProperty(
|
|
217
|
-
|
|
217
|
+
c.DetermineComponentFrameRoot,
|
|
218
218
|
"name",
|
|
219
219
|
{ value: "DetermineComponentFrameRoot" }
|
|
220
220
|
);
|
|
221
|
-
var o =
|
|
222
|
-
if (
|
|
223
|
-
var
|
|
221
|
+
var o = c.DetermineComponentFrameRoot(), x = o[0], T = o[1];
|
|
222
|
+
if (x && T) {
|
|
223
|
+
var d = x.split(`
|
|
224
224
|
`), _ = T.split(`
|
|
225
225
|
`);
|
|
226
|
-
for (o = u = 0; u <
|
|
226
|
+
for (o = u = 0; u < d.length && !d[u].includes(
|
|
227
227
|
"DetermineComponentFrameRoot"
|
|
228
228
|
); )
|
|
229
229
|
u++;
|
|
@@ -231,31 +231,31 @@ function Me() {
|
|
|
231
231
|
"DetermineComponentFrameRoot"
|
|
232
232
|
); )
|
|
233
233
|
o++;
|
|
234
|
-
if (u ===
|
|
235
|
-
for (u =
|
|
234
|
+
if (u === d.length || o === _.length)
|
|
235
|
+
for (u = d.length - 1, o = _.length - 1; 1 <= u && 0 <= o && d[u] !== _[o]; )
|
|
236
236
|
o--;
|
|
237
237
|
for (; 1 <= u && 0 <= o; u--, o--)
|
|
238
|
-
if (
|
|
238
|
+
if (d[u] !== _[o]) {
|
|
239
239
|
if (u !== 1 || o !== 1)
|
|
240
240
|
do
|
|
241
|
-
if (u--, o--, 0 > o ||
|
|
241
|
+
if (u--, o--, 0 > o || d[u] !== _[o]) {
|
|
242
242
|
var k = `
|
|
243
|
-
` +
|
|
243
|
+
` + d[u].replace(
|
|
244
244
|
" at new ",
|
|
245
245
|
" at "
|
|
246
246
|
);
|
|
247
|
-
return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
247
|
+
return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && G.set(e, k), k;
|
|
248
248
|
}
|
|
249
249
|
while (1 <= u && 0 <= o);
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
} finally {
|
|
254
|
-
|
|
254
|
+
J = !1, h.H = n, i(), Error.prepareStackTrace = t;
|
|
255
255
|
}
|
|
256
|
-
return
|
|
256
|
+
return d = (d = e ? e.displayName || e.name : "") ? b(d) : "", typeof e == "function" && G.set(e, d), d;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function y(e) {
|
|
259
259
|
if (e == null) return "";
|
|
260
260
|
if (typeof e == "function") {
|
|
261
261
|
var r = e.prototype;
|
|
@@ -264,34 +264,34 @@ function Me() {
|
|
|
264
264
|
!(!r || !r.isReactComponent)
|
|
265
265
|
);
|
|
266
266
|
}
|
|
267
|
-
if (typeof e == "string") return
|
|
267
|
+
if (typeof e == "string") return b(e);
|
|
268
268
|
switch (e) {
|
|
269
|
-
case
|
|
270
|
-
return
|
|
271
|
-
case
|
|
272
|
-
return
|
|
269
|
+
case $:
|
|
270
|
+
return b("Suspense");
|
|
271
|
+
case W:
|
|
272
|
+
return b("SuspenseList");
|
|
273
273
|
}
|
|
274
274
|
if (typeof e == "object")
|
|
275
275
|
switch (e.$$typeof) {
|
|
276
|
-
case
|
|
276
|
+
case M:
|
|
277
277
|
return e = g(e.render, !1), e;
|
|
278
|
-
case
|
|
279
|
-
return
|
|
280
|
-
case
|
|
278
|
+
case U:
|
|
279
|
+
return y(e.type);
|
|
280
|
+
case V:
|
|
281
281
|
r = e._payload, e = e._init;
|
|
282
282
|
try {
|
|
283
|
-
return
|
|
283
|
+
return y(e(r));
|
|
284
284
|
} catch {
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
return "";
|
|
288
288
|
}
|
|
289
289
|
function f() {
|
|
290
|
-
var e =
|
|
290
|
+
var e = h.A;
|
|
291
291
|
return e === null ? null : e.getOwner();
|
|
292
292
|
}
|
|
293
|
-
function
|
|
294
|
-
if (
|
|
293
|
+
function xe(e) {
|
|
294
|
+
if (Q.call(e, "key")) {
|
|
295
295
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
296
296
|
if (r && r.isReactWarning) return !1;
|
|
297
297
|
}
|
|
@@ -299,7 +299,7 @@ function Me() {
|
|
|
299
299
|
}
|
|
300
300
|
function we(e, r) {
|
|
301
301
|
function t() {
|
|
302
|
-
|
|
302
|
+
se || (se = !0, console.error(
|
|
303
303
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
304
304
|
r
|
|
305
305
|
));
|
|
@@ -311,17 +311,17 @@ function Me() {
|
|
|
311
311
|
}
|
|
312
312
|
function Re() {
|
|
313
313
|
var e = a(this.type);
|
|
314
|
-
return
|
|
314
|
+
return le[e] || (le[e] = !0, console.error(
|
|
315
315
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
316
316
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
317
317
|
}
|
|
318
|
-
function ye(e, r, t, n,
|
|
318
|
+
function ye(e, r, t, n, c, u) {
|
|
319
319
|
return t = u.ref, e = {
|
|
320
|
-
$$typeof:
|
|
320
|
+
$$typeof: P,
|
|
321
321
|
type: e,
|
|
322
322
|
key: r,
|
|
323
323
|
props: u,
|
|
324
|
-
_owner:
|
|
324
|
+
_owner: c
|
|
325
325
|
}, (t !== void 0 ? t : null) !== null ? Object.defineProperty(e, "ref", {
|
|
326
326
|
enumerable: !1,
|
|
327
327
|
get: Re
|
|
@@ -337,32 +337,32 @@ function Me() {
|
|
|
337
337
|
value: null
|
|
338
338
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
if (typeof e == "string" || typeof e == "function" || e ===
|
|
340
|
+
function L(e, r, t, n, c, u) {
|
|
341
|
+
if (typeof e == "string" || typeof e == "function" || e === Y || e === B || e === X || e === $ || e === W || e === Te || typeof e == "object" && e !== null && (e.$$typeof === V || e.$$typeof === U || e.$$typeof === I || e.$$typeof === K || e.$$typeof === M || e.$$typeof === ke || e.getModuleId !== void 0)) {
|
|
342
342
|
var o = r.children;
|
|
343
343
|
if (o !== void 0)
|
|
344
344
|
if (n)
|
|
345
|
-
if (
|
|
345
|
+
if (z(o)) {
|
|
346
346
|
for (n = 0; n < o.length; n++)
|
|
347
|
-
|
|
347
|
+
F(o[n], e);
|
|
348
348
|
Object.freeze && Object.freeze(o);
|
|
349
349
|
} else
|
|
350
350
|
console.error(
|
|
351
351
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
352
352
|
);
|
|
353
|
-
else
|
|
353
|
+
else F(o, e);
|
|
354
354
|
} else
|
|
355
|
-
o = "", (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), e === null ? n = "null" :
|
|
355
|
+
o = "", (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), e === null ? n = "null" : z(e) ? n = "array" : e !== void 0 && e.$$typeof === P ? (n = "<" + (a(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : n = typeof e, console.error(
|
|
356
356
|
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
|
|
357
357
|
n,
|
|
358
358
|
o
|
|
359
359
|
);
|
|
360
|
-
if (
|
|
360
|
+
if (Q.call(r, "key")) {
|
|
361
361
|
o = a(e);
|
|
362
|
-
var
|
|
363
|
-
return
|
|
362
|
+
var x = Object.keys(r).filter(function(d) {
|
|
363
|
+
return d !== "key";
|
|
364
364
|
});
|
|
365
|
-
n = 0 <
|
|
365
|
+
n = 0 < x.length ? "{key: someKey, " + x.join(": ..., ") + ": ...}" : "{key: someKey}", ie[o + n] || (x = 0 < x.length ? "{" + x.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
366
366
|
`A props object containing a "key" prop is being spread into JSX:
|
|
367
367
|
let props = %s;
|
|
368
368
|
<%s {...props} />
|
|
@@ -371,11 +371,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
371
371
|
<%s key={someKey} {...props} />`,
|
|
372
372
|
n,
|
|
373
373
|
o,
|
|
374
|
-
|
|
374
|
+
x,
|
|
375
375
|
o
|
|
376
|
-
),
|
|
376
|
+
), ie[o + n] = !0);
|
|
377
377
|
}
|
|
378
|
-
if (o = null, t !== void 0 && (
|
|
378
|
+
if (o = null, t !== void 0 && (s(t), o = "" + t), xe(r) && (s(r.key), o = "" + r.key), "key" in r) {
|
|
379
379
|
t = {};
|
|
380
380
|
for (var T in r)
|
|
381
381
|
T !== "key" && (t[T] = r[T]);
|
|
@@ -383,42 +383,42 @@ React keys must be passed directly to JSX without using spread:
|
|
|
383
383
|
return o && we(
|
|
384
384
|
t,
|
|
385
385
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
386
|
-
), ye(e, o, u,
|
|
386
|
+
), ye(e, o, u, c, f(), t);
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function F(e, r) {
|
|
389
389
|
if (typeof e == "object" && e && e.$$typeof !== Ce) {
|
|
390
|
-
if (
|
|
390
|
+
if (z(e))
|
|
391
391
|
for (var t = 0; t < e.length; t++) {
|
|
392
392
|
var n = e[t];
|
|
393
|
-
|
|
393
|
+
N(n) && H(n, r);
|
|
394
394
|
}
|
|
395
|
-
else if (
|
|
395
|
+
else if (N(e))
|
|
396
396
|
e._store && (e._store.validated = 1);
|
|
397
|
-
else if (e === null || typeof e != "object" ? t = null : (t =
|
|
397
|
+
else if (e === null || typeof e != "object" ? t = null : (t = Z && e[Z] || e["@@iterator"], t = typeof t == "function" ? t : null), typeof t == "function" && t !== e.entries && (t = t.call(e), t !== e))
|
|
398
398
|
for (; !(e = t.next()).done; )
|
|
399
|
-
|
|
399
|
+
N(e.value) && H(e.value, r);
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
function
|
|
403
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
402
|
+
function N(e) {
|
|
403
|
+
return typeof e == "object" && e !== null && e.$$typeof === P;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1, r =
|
|
407
|
-
|
|
405
|
+
function H(e, r) {
|
|
406
|
+
if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1, r = he(r), !ce[r])) {
|
|
407
|
+
ce[r] = !0;
|
|
408
408
|
var t = "";
|
|
409
409
|
e && e._owner != null && e._owner !== f() && (t = null, typeof e._owner.tag == "number" ? t = a(e._owner.type) : typeof e._owner.name == "string" && (t = e._owner.name), t = " It was passed a child from " + t + ".");
|
|
410
|
-
var n =
|
|
411
|
-
|
|
412
|
-
var
|
|
413
|
-
return n && (
|
|
410
|
+
var n = h.getCurrentStack;
|
|
411
|
+
h.getCurrentStack = function() {
|
|
412
|
+
var c = y(e.type);
|
|
413
|
+
return n && (c += n() || ""), c;
|
|
414
414
|
}, console.error(
|
|
415
415
|
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
|
|
416
416
|
r,
|
|
417
417
|
t
|
|
418
|
-
),
|
|
418
|
+
), h.getCurrentStack = n;
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function he(e) {
|
|
422
422
|
var r = "", t = f();
|
|
423
423
|
return t && (t = a(t.type)) && (r = `
|
|
424
424
|
|
|
@@ -426,87 +426,84 @@ Check the render method of \`` + t + "`."), r || (e = a(e)) && (r = `
|
|
|
426
426
|
|
|
427
427
|
Check the top-level render call using <` + e + ">."), r;
|
|
428
428
|
}
|
|
429
|
-
var
|
|
430
|
-
|
|
431
|
-
var
|
|
432
|
-
|
|
433
|
-
return
|
|
434
|
-
},
|
|
435
|
-
return
|
|
429
|
+
var je = Ae, P = Symbol.for("react.transitional.element"), _e = Symbol.for("react.portal"), Y = Symbol.for("react.fragment"), X = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"), K = Symbol.for("react.consumer"), I = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), $ = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), U = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), Te = Symbol.for("react.offscreen"), Z = Symbol.iterator, pe = Symbol.for("react.client.reference"), h = je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Q = Object.prototype.hasOwnProperty, j = Object.assign, ke = Symbol.for("react.client.reference"), z = Array.isArray, p = 0, D, ee, re, te, oe, ne, ae;
|
|
430
|
+
m.__reactDisabledLog = !0;
|
|
431
|
+
var q, ue, J = !1, G = new (typeof WeakMap == "function" ? WeakMap : Map)(), Ce = Symbol.for("react.client.reference"), se, le = {}, ie = {}, ce = {};
|
|
432
|
+
A.Fragment = Y, A.jsx = function(e, r, t, n, c) {
|
|
433
|
+
return L(e, r, t, !1, n, c);
|
|
434
|
+
}, A.jsxs = function(e, r, t, n, c) {
|
|
435
|
+
return L(e, r, t, !0, n, c);
|
|
436
436
|
};
|
|
437
|
-
}()),
|
|
437
|
+
}()), A;
|
|
438
438
|
}
|
|
439
|
-
var
|
|
440
|
-
function
|
|
441
|
-
return
|
|
439
|
+
var Ee;
|
|
440
|
+
function We() {
|
|
441
|
+
return Ee || (Ee = 1, process.env.NODE_ENV === "production" ? S.exports = Me() : S.exports = $e()), S.exports;
|
|
442
442
|
}
|
|
443
|
-
var
|
|
444
|
-
const
|
|
445
|
-
function
|
|
446
|
-
const a = Se(
|
|
443
|
+
var v = We();
|
|
444
|
+
const me = Oe(null), qe = (a) => /* @__PURE__ */ v.jsx(me.Provider, { value: a.router, children: a.children });
|
|
445
|
+
function ge() {
|
|
446
|
+
const a = Se(me);
|
|
447
447
|
if (!a)
|
|
448
448
|
throw new Error(
|
|
449
449
|
"[useRouter] Router not found. Add RouterProvider in app root"
|
|
450
450
|
);
|
|
451
451
|
return a;
|
|
452
452
|
}
|
|
453
|
-
function
|
|
454
|
-
return
|
|
453
|
+
function Ue() {
|
|
454
|
+
return be(ge());
|
|
455
455
|
}
|
|
456
|
-
const
|
|
457
|
-
const { to:
|
|
456
|
+
const Je = Ne((a, E) => {
|
|
457
|
+
const { to: s, params: m, onClick: l, ...i } = a, { mappedRoutes: b } = ge(), g = b.find(({ route: f }) => f === s), { onOpen: y } = be(s);
|
|
458
458
|
if (!g) {
|
|
459
|
-
const { internal: f } =
|
|
459
|
+
const { internal: f } = s;
|
|
460
460
|
throw new Error(
|
|
461
461
|
`[Link] Route with path "${f.path}" not found. Maybe it is not passed into createRouter?`
|
|
462
462
|
);
|
|
463
463
|
}
|
|
464
|
-
return /* @__PURE__ */
|
|
464
|
+
return /* @__PURE__ */ v.jsx(
|
|
465
465
|
"a",
|
|
466
466
|
{
|
|
467
467
|
...i,
|
|
468
|
-
ref:
|
|
469
|
-
href: g.toPath(
|
|
468
|
+
ref: E,
|
|
469
|
+
href: g.toPath(m ?? void 0),
|
|
470
470
|
onClick: (f) => {
|
|
471
|
-
|
|
471
|
+
l == null || l(f), !f.defaultPrevented && (i.target && i.target !== "_self" || f.metaKey || f.altKey || f.ctrlKey || f.shiftKey || (f.preventDefault(), y({ params: m || {} })));
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
);
|
|
475
|
-
}),
|
|
476
|
-
|
|
475
|
+
}), Ge = (a) => ({
|
|
476
|
+
route: a.route,
|
|
477
477
|
view: () => {
|
|
478
|
-
const { view:
|
|
479
|
-
return s ?
|
|
478
|
+
const { view: E, layout: s } = a;
|
|
479
|
+
return s ? /* @__PURE__ */ v.jsx(s, { children: /* @__PURE__ */ v.jsx(E, {}) }) : /* @__PURE__ */ v.jsx(E, {});
|
|
480
480
|
}
|
|
481
481
|
}), Le = (a) => {
|
|
482
|
-
const { routes:
|
|
482
|
+
const { routes: E, otherwise: s } = a;
|
|
483
483
|
return () => {
|
|
484
|
-
const { activeRoutes:
|
|
485
|
-
(
|
|
486
|
-
),
|
|
487
|
-
(
|
|
484
|
+
const { activeRoutes: m } = Ue(), l = m.reduce((b, g) => b.filter(
|
|
485
|
+
(y) => y !== g.internal.parent
|
|
486
|
+
), m), i = E.find(
|
|
487
|
+
(b) => b.route === l.at(-1)
|
|
488
488
|
);
|
|
489
|
-
|
|
490
|
-
return l ? /* @__PURE__ */ c.jsx(l, {}) : null;
|
|
491
|
-
const { view: m, layout: g } = i;
|
|
492
|
-
return g ? /* @__PURE__ */ c.jsx(g, { children: /* @__PURE__ */ c.jsx(m, {}) }) : /* @__PURE__ */ c.jsx(m, {});
|
|
489
|
+
return i ? Pe(i.view) : s ? /* @__PURE__ */ v.jsx(s, {}) : null;
|
|
493
490
|
};
|
|
494
|
-
},
|
|
491
|
+
}, Fe = (a) => {
|
|
495
492
|
a.route.internal.setAsyncImport(a.view);
|
|
496
|
-
const
|
|
493
|
+
const E = Ye(a.view);
|
|
497
494
|
return {
|
|
498
|
-
|
|
495
|
+
route: a.route,
|
|
499
496
|
view: () => {
|
|
500
|
-
const { layout:
|
|
501
|
-
return
|
|
497
|
+
const { layout: s, fallback: m = () => /* @__PURE__ */ v.jsx(v.Fragment, {}) } = a;
|
|
498
|
+
return s ? /* @__PURE__ */ v.jsx(s, { children: /* @__PURE__ */ v.jsx(fe, { fallback: /* @__PURE__ */ v.jsx(m, {}), children: /* @__PURE__ */ v.jsx(E, {}) }) }) : /* @__PURE__ */ v.jsx(fe, { fallback: /* @__PURE__ */ v.jsx(m, {}), children: /* @__PURE__ */ v.jsx(E, {}) });
|
|
502
499
|
}
|
|
503
500
|
};
|
|
504
501
|
};
|
|
505
502
|
export {
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
503
|
+
Je as Link,
|
|
504
|
+
qe as RouterProvider,
|
|
505
|
+
Fe as createLazyRouteView,
|
|
506
|
+
Ge as createRouteView,
|
|
510
507
|
Le as createRoutesView,
|
|
511
|
-
|
|
508
|
+
Ue as useRouter
|
|
512
509
|
};
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"registry": "https://registry.npmjs.org/"
|
|
6
6
|
},
|
|
7
7
|
"private": false,
|
|
8
|
-
"version": "0.
|
|
8
|
+
"version": "0.4.0",
|
|
9
9
|
"description": "React bindings for argon router",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"effector",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"url": "https://github.com/movpushmov/argon-router/issues"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@argon-router/core": "^0.
|
|
47
|
+
"@argon-router/core": "^0.4.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@babel/preset-react": "^7.26.3",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"effector-react": ">=23",
|
|
59
59
|
"react": "18 || 19"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "f03f8708f9e3f72aced7f98e27a2c7dcf52a05be"
|
|
62
62
|
}
|