@argon-router/react 0.3.2 → 0.3.3
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 +22 -0
- package/dist/index.js +181 -170
- package/package.json +2 -2
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 T=require("react"),P=require("effector-react");var N={exports:{}},O={};/**
|
|
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 Ee;function Se(){if(Ee)return
|
|
9
|
+
*/var Ee;function Se(){if(Ee)return O;Ee=1;var a=Symbol.for("react.transitional.element"),b=Symbol.for("react.fragment");function i(v,s,l){var g=null;if(l!==void 0&&(g=""+l),s.key!==void 0&&(g=""+s.key),"key"in s){l={};for(var m in s)m!=="key"&&(l[m]=s[m])}else l=s;return s=l.ref,{$$typeof:a,type:v,key:g,ref:s!==void 0?s:null,props:l}}return O.Fragment=b,O.jsx=i,O.jsxs=i,O}var S={};/**
|
|
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 be;function Ae(){return be||(be=1,process.env.NODE_ENV!=="production"&&function(){function a(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===
|
|
17
|
+
*/var be;function Ae(){return be||(be=1,process.env.NODE_ENV!=="production"&&function(){function a(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ke?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case V:return"Fragment";case Te:return"Portal";case Z:return"Profiler";case I:return"StrictMode";case W:return"Suspense";case q: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 D:return(e.displayName||"Context")+".Provider";case Q:return(e._context.displayName||"Context")+".Consumer";case U:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z:return r=e.displayName||null,r!==null?r:a(e.type)||"Memo";case L:r=e._payload,e=e._init;try{return a(e(r))}catch{}}return null}function b(e){return""+e}function i(e){try{b(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),b(e)}}function v(){}function s(){if(k===0){te=console.log,oe=console.info,ne=console.warn,ae=console.error,ue=console.group,se=console.groupCollapsed,ie=console.groupEnd;var e={configurable:!0,enumerable:!0,value:v,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}k++}function l(){if(k--,k===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:h({},e,{value:te}),info:h({},e,{value:oe}),warn:h({},e,{value:ne}),error:h({},e,{value:ae}),group:h({},e,{value:ue}),groupCollapsed:h({},e,{value:se}),groupEnd:h({},e,{value:ie})})}0>k&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function g(e){if(G===void 0)try{throw Error()}catch(t){var r=t.stack.trim().match(/\n( *(at )?)/);G=r&&r[1]||"",le=-1<t.stack.indexOf(`
|
|
18
18
|
at`)?" (<anonymous>)":-1<t.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
-
`+G+e+le}function
|
|
20
|
-
`),p
|
|
21
|
-
`);for(o=u=0;u<
|
|
22
|
-
`+
|
|
19
|
+
`+G+e+le}function m(e,r){if(!e||F)return"";var t=H.get(e);if(t!==void 0)return t;F=!0,t=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var n=null;n=j.H,j.H=null,s();try{var d={DetermineComponentFrameRoot:function(){try{if(r){var y=function(){throw Error()};if(Object.defineProperty(y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(y,[])}catch(w){var A=w}Reflect.construct(e,[],y)}else{try{y.call()}catch(w){A=w}e.call(y.prototype)}}else{try{throw Error()}catch(w){A=w}(y=e())&&typeof y.catch=="function"&&y.catch(function(){})}}catch(w){if(w&&A&&typeof w.stack=="string")return[w.stack,A.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=d.DetermineComponentFrameRoot(),x=o[0],p=o[1];if(x&&p){var E=x.split(`
|
|
20
|
+
`),_=p.split(`
|
|
21
|
+
`);for(o=u=0;u<E.length&&!E[u].includes("DetermineComponentFrameRoot");)u++;for(;o<_.length&&!_[o].includes("DetermineComponentFrameRoot");)o++;if(u===E.length||o===_.length)for(u=E.length-1,o=_.length-1;1<=u&&0<=o&&E[u]!==_[o];)o--;for(;1<=u&&0<=o;u--,o--)if(E[u]!==_[o]){if(u!==1||o!==1)do if(u--,o--,0>o||E[u]!==_[o]){var C=`
|
|
22
|
+
`+E[u].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),typeof e=="function"&&H.set(e,C),C}while(1<=u&&0<=o);break}}}finally{F=!1,j.H=n,l(),Error.prepareStackTrace=t}return E=(E=e?e.displayName||e.name:"")?g(E):"",typeof e=="function"&&H.set(e,E),E}function R(e){if(e==null)return"";if(typeof e=="function"){var r=e.prototype;return m(e,!(!r||!r.isReactComponent))}if(typeof e=="string")return g(e);switch(e){case W:return g("Suspense");case q:return g("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case U:return e=m(e.render,!1),e;case z:return R(e.type);case L:r=e._payload,e=e._init;try{return R(e(r))}catch{}}return""}function f(){var e=j.A;return e===null?null:e.getOwner()}function Y(e){if(re.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function we(e,r){function t(){ce||(ce=!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 fe[e]||(fe[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,d,u){return t=u.ref,e={$$typeof:$,type:e,key:r,props:u,_owner:d},(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 X(e,r,t,n,d,u){if(typeof e=="string"||typeof e=="function"||e===V||e===Z||e===I||e===W||e===q||e===pe||typeof e=="object"&&e!==null&&(e.$$typeof===L||e.$$typeof===z||e.$$typeof===D||e.$$typeof===Q||e.$$typeof===U||e.$$typeof===Ce||e.getModuleId!==void 0)){var o=r.children;if(o!==void 0)if(n)if(J(o)){for(n=0;n<o.length;n++)B(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 B(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":J(e)?n="array":e!==void 0&&e.$$typeof===$?(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(re.call(r,"key")){o=a(e);var x=Object.keys(r).filter(function(E){return E!=="key"});n=0<x.length?"{key: someKey, "+x.join(": ..., ")+": ...}":"{key: someKey}",de[o+n]||(x=0<x.length?"{"+x.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,x,o),de[o+n]=!0)}if(o=null,t!==void 0&&(i(t),o=""+t),Y(r)&&(i(r.key),o=""+r.key),"key"in r){t={};for(var p in r)p!=="key"&&(t[p]=r[p])}else t=r;return o&&we(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),je(e,o,u,d,f(),t)}function B(e,r){if(typeof e=="object"&&e&&e.$$typeof!==Oe){if(J(e))for(var t=0;t<e.length;t++){var n=e[t];M(n)&&K(n,r)}else if(M(e))e._store&&(e._store.validated=1);else if(e===null||typeof e!="object"?t=null:(t=ee&&e[ee]||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;)M(e.value)&&K(e.value,r)}}function M(e){return typeof e=="object"&&e!==null&&e.$$typeof===$}function K(e,r){if(e._store&&!e._store.validated&&e.key==null&&(e._store.validated=1,r=he(r),!ve[r])){ve[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=j.getCurrentStack;j.getCurrentStack=function(){var d=R(e.type);return n&&(d+=n()||""),d},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),j.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
|
|
31
|
+
Check the top-level render call using <`+e+">."),r}var _e=T,$=Symbol.for("react.transitional.element"),Te=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),D=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),pe=Symbol.for("react.offscreen"),ee=Symbol.iterator,ke=Symbol.for("react.client.reference"),j=_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re=Object.prototype.hasOwnProperty,h=Object.assign,Ce=Symbol.for("react.client.reference"),J=Array.isArray,k=0,te,oe,ne,ae,ue,se,ie;v.__reactDisabledLog=!0;var G,le,F=!1,H=new(typeof WeakMap=="function"?WeakMap:Map),Oe=Symbol.for("react.client.reference"),ce,fe={},de={},ve={};S.Fragment=V,S.jsx=function(e,r,t,n,d){return X(e,r,t,!1,n,d)},S.jsxs=function(e,r,t,n,d){return X(e,r,t,!0,n,d)}}()),S}var ge;function Ne(){return ge||(ge=1,process.env.NODE_ENV==="production"?N.exports=Se():N.exports=Ae()),N.exports}var c=Ne();const me=T.createContext(null),Pe=a=>c.jsx(me.Provider,{value:a.router,children:a.children});function Re(){const a=T.useContext(me);if(!a)throw new Error("[useRouter] Router not found. Add RouterProvider in app root");return a}function xe(){return P.useUnit(Re())}const Ye=T.forwardRef((a,b)=>{const{to:i,params:v,onClick:s,...l}=a,{mappedRoutes:g}=Re(),m=g.find(({route:f})=>f===i),{onOpen:R}=P.useUnit(i);if(!m){const{internal:f}=i;throw new Error(`[Link] Route with path "${f.path}" not found. Maybe it is not passed into createRouter?`)}return c.jsx("a",{...l,ref:b,href:m.toPath(v??void 0),onClick:f=>{s==null||s(f),!f.defaultPrevented&&(l.target&&l.target!=="_self"||f.metaKey||f.altKey||f.ctrlKey||f.shiftKey||(f.preventDefault(),R({params:v||{}})))}})}),Me=a=>({...a,view:()=>{const{view:b,layout:i,route:v}=a,{isOpened:s}=P.useUnit(v);return s?i?c.jsx(i,{children:c.jsx(b,{})}):c.jsx(b,{}):null}}),$e=a=>{const{routes:b,otherwise:i}=a;return()=>{const{activeRoutes:v}=xe(),s=v.reduce((R,f)=>R.filter(Y=>Y!==f.internal.parent),v),l=b.find(R=>R.route===s.at(-1));if(!l)return i?c.jsx(i,{}):null;const{view:g,layout:m}=l;return m?c.jsx(m,{children:c.jsx(g,{})}):c.jsx(g,{})}},Ve=a=>{a.route.internal.setAsyncImport(a.view);const b=T.lazy(a.view);return{...a,view:()=>{const{layout:i,fallback:v=()=>c.jsx(c.Fragment,{}),route:s}=a,{isOpened:l}=P.useUnit(s);return l?i?c.jsx(i,{children:c.jsx(T.Suspense,{fallback:c.jsx(v,{}),children:c.jsx(b,{})})}):c.jsx(T.Suspense,{fallback:c.jsx(v,{}),children:c.jsx(b,{})}):null}}};exports.Link=Ye;exports.RouterProvider=Pe;exports.createLazyRouteView=Ve;exports.createRouteView=Me;exports.createRoutesView=$e;exports.useRouter=xe;
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,15 @@ declare type BaseLinkProps<Params> = {
|
|
|
14
14
|
children?: ReactNode;
|
|
15
15
|
} & AnchorProps;
|
|
16
16
|
|
|
17
|
+
export declare const createLazyRouteView: (props: CreateRouteViewProps_2) => {
|
|
18
|
+
view: () => JSX.Element | null;
|
|
19
|
+
route: Route<any>;
|
|
20
|
+
fallback?: ComponentType;
|
|
21
|
+
layout?: ComponentType<{
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
25
|
+
|
|
17
26
|
export declare const createRoutesView: (props: CreateRoutesViewProps) => () => JSX.Element | null;
|
|
18
27
|
|
|
19
28
|
declare interface CreateRoutesViewProps {
|
|
@@ -37,10 +46,23 @@ declare interface CreateRouteViewProps {
|
|
|
37
46
|
}>;
|
|
38
47
|
}
|
|
39
48
|
|
|
49
|
+
declare interface CreateRouteViewProps_2 {
|
|
50
|
+
route: Route<any>;
|
|
51
|
+
view: LazyComponent;
|
|
52
|
+
fallback?: ComponentType;
|
|
53
|
+
layout?: ComponentType<{
|
|
54
|
+
children?: ReactNode;
|
|
55
|
+
}>;
|
|
56
|
+
}
|
|
57
|
+
|
|
40
58
|
declare type ForwardedLink = <Params = void>(props: LinkProps<Params> & {
|
|
41
59
|
ref?: ForwardedRef<HTMLAnchorElement>;
|
|
42
60
|
}) => ReactNode;
|
|
43
61
|
|
|
62
|
+
declare type LazyComponent = () => Promise<{
|
|
63
|
+
default: ComponentType;
|
|
64
|
+
}>;
|
|
65
|
+
|
|
44
66
|
export declare const Link: ForwardedLink;
|
|
45
67
|
|
|
46
68
|
declare type LinkProps<Params> = Params extends Record<string, never> | void | undefined ? BaseLinkProps<Params> & {
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useUnit as
|
|
3
|
-
var S = { exports: {} },
|
|
1
|
+
import Oe, { createContext as Ae, useContext as Se, forwardRef as Ne, lazy as Pe, Suspense as ve } from "react";
|
|
2
|
+
import { useUnit as N } from "effector-react";
|
|
3
|
+
var S = { exports: {} }, C = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.js
|
|
@@ -10,27 +10,27 @@ var S = { exports: {} }, k = {};
|
|
|
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 Ee;
|
|
14
|
+
function Ye() {
|
|
15
|
+
if (Ee) return C;
|
|
16
|
+
Ee = 1;
|
|
17
|
+
var a = Symbol.for("react.transitional.element"), b = Symbol.for("react.fragment");
|
|
18
|
+
function l(v, s, i) {
|
|
19
|
+
var m = null;
|
|
20
|
+
if (i !== void 0 && (m = "" + i), s.key !== void 0 && (m = "" + s.key), "key" in s) {
|
|
21
21
|
i = {};
|
|
22
|
-
for (var
|
|
23
|
-
|
|
22
|
+
for (var g in s)
|
|
23
|
+
g !== "key" && (i[g] = s[g]);
|
|
24
24
|
} else i = s;
|
|
25
25
|
return s = i.ref, {
|
|
26
26
|
$$typeof: a,
|
|
27
|
-
type:
|
|
28
|
-
key:
|
|
27
|
+
type: v,
|
|
28
|
+
key: m,
|
|
29
29
|
ref: s !== void 0 ? s : null,
|
|
30
30
|
props: i
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return C.Fragment = b, C.jsx = l, C.jsxs = l, C;
|
|
34
34
|
}
|
|
35
35
|
var O = {};
|
|
36
36
|
/**
|
|
@@ -42,24 +42,24 @@ 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 be;
|
|
46
|
+
function Me() {
|
|
47
|
+
return be || (be = 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
|
-
return e.$$typeof ===
|
|
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 $:
|
|
55
55
|
return "Fragment";
|
|
56
|
-
case
|
|
56
|
+
case _e:
|
|
57
57
|
return "Portal";
|
|
58
|
-
case
|
|
58
|
+
case I:
|
|
59
59
|
return "Profiler";
|
|
60
60
|
case K:
|
|
61
61
|
return "StrictMode";
|
|
62
|
-
case
|
|
62
|
+
case V:
|
|
63
63
|
return "Suspense";
|
|
64
64
|
case U:
|
|
65
65
|
return "SuspenseList";
|
|
@@ -70,12 +70,12 @@ function Pe() {
|
|
|
70
70
|
), e.$$typeof) {
|
|
71
71
|
case Q:
|
|
72
72
|
return (e.displayName || "Context") + ".Provider";
|
|
73
|
-
case
|
|
73
|
+
case Z:
|
|
74
74
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
75
|
-
case
|
|
75
|
+
case W:
|
|
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 z:
|
|
79
79
|
return r = e.displayName || null, r !== null ? r : a(e.type) || "Memo";
|
|
80
80
|
case q:
|
|
81
81
|
r = e._payload, e = e._init;
|
|
@@ -86,12 +86,12 @@ function Pe() {
|
|
|
86
86
|
}
|
|
87
87
|
return null;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function b(e) {
|
|
90
90
|
return "" + e;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function l(e) {
|
|
93
93
|
try {
|
|
94
|
-
|
|
94
|
+
b(e);
|
|
95
95
|
var r = !1;
|
|
96
96
|
} catch {
|
|
97
97
|
r = !0;
|
|
@@ -103,18 +103,18 @@ function Pe() {
|
|
|
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
|
+
), b(e);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function v() {
|
|
110
110
|
}
|
|
111
111
|
function s() {
|
|
112
|
-
if (
|
|
112
|
+
if (p === 0) {
|
|
113
113
|
re = console.log, te = console.info, oe = console.warn, ne = console.error, ae = console.group, ue = console.groupCollapsed, se = console.groupEnd;
|
|
114
114
|
var e = {
|
|
115
115
|
configurable: !0,
|
|
116
116
|
enumerable: !0,
|
|
117
|
-
value:
|
|
117
|
+
value: v,
|
|
118
118
|
writable: !0
|
|
119
119
|
};
|
|
120
120
|
Object.defineProperties(console, {
|
|
@@ -127,46 +127,46 @@ function Pe() {
|
|
|
127
127
|
groupEnd: e
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
p++;
|
|
131
131
|
}
|
|
132
132
|
function i() {
|
|
133
|
-
if (
|
|
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: h({}, e, { value: re }),
|
|
137
|
+
info: h({}, e, { value: te }),
|
|
138
|
+
warn: h({}, e, { value: oe }),
|
|
139
|
+
error: h({}, e, { value: ne }),
|
|
140
|
+
group: h({}, e, { value: ae }),
|
|
141
|
+
groupCollapsed: h({}, e, { value: ue }),
|
|
142
|
+
groupEnd: h({}, e, { value: se })
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
|
-
0 >
|
|
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 m(e) {
|
|
150
|
+
if (L === 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
|
+
L = r && r[1] || "", le = -1 < t.stack.indexOf(`
|
|
156
156
|
at`) ? " (<anonymous>)" : -1 < t.stack.indexOf("@") ? "@unknown:0:0" : "";
|
|
157
157
|
}
|
|
158
158
|
return `
|
|
159
|
-
` +
|
|
159
|
+
` + L + e + le;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function g(e, r) {
|
|
162
162
|
if (!e || G) return "";
|
|
163
|
-
var t =
|
|
163
|
+
var t = F.get(e);
|
|
164
164
|
if (t !== void 0) return t;
|
|
165
165
|
G = !0, t = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
|
|
166
166
|
var n = null;
|
|
167
|
-
n =
|
|
167
|
+
n = j.H, j.H = null, s();
|
|
168
168
|
try {
|
|
169
|
-
var
|
|
169
|
+
var d = {
|
|
170
170
|
DetermineComponentFrameRoot: function() {
|
|
171
171
|
try {
|
|
172
172
|
if (r) {
|
|
@@ -180,124 +180,124 @@ function Pe() {
|
|
|
180
180
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
181
181
|
try {
|
|
182
182
|
Reflect.construct(y, []);
|
|
183
|
-
} catch (
|
|
184
|
-
var A =
|
|
183
|
+
} catch (R) {
|
|
184
|
+
var A = R;
|
|
185
185
|
}
|
|
186
186
|
Reflect.construct(e, [], y);
|
|
187
187
|
} else {
|
|
188
188
|
try {
|
|
189
189
|
y.call();
|
|
190
|
-
} catch (
|
|
191
|
-
A =
|
|
190
|
+
} catch (R) {
|
|
191
|
+
A = R;
|
|
192
192
|
}
|
|
193
193
|
e.call(y.prototype);
|
|
194
194
|
}
|
|
195
195
|
} else {
|
|
196
196
|
try {
|
|
197
197
|
throw Error();
|
|
198
|
-
} catch (
|
|
199
|
-
A =
|
|
198
|
+
} catch (R) {
|
|
199
|
+
A = R;
|
|
200
200
|
}
|
|
201
201
|
(y = e()) && typeof y.catch == "function" && y.catch(function() {
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
} catch (
|
|
205
|
-
if (
|
|
206
|
-
return [
|
|
204
|
+
} catch (R) {
|
|
205
|
+
if (R && A && typeof R.stack == "string")
|
|
206
|
+
return [R.stack, A.stack];
|
|
207
207
|
}
|
|
208
208
|
return [null, null];
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
|
-
|
|
211
|
+
d.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
|
|
212
212
|
var u = Object.getOwnPropertyDescriptor(
|
|
213
|
-
|
|
213
|
+
d.DetermineComponentFrameRoot,
|
|
214
214
|
"name"
|
|
215
215
|
);
|
|
216
216
|
u && u.configurable && Object.defineProperty(
|
|
217
|
-
|
|
217
|
+
d.DetermineComponentFrameRoot,
|
|
218
218
|
"name",
|
|
219
219
|
{ value: "DetermineComponentFrameRoot" }
|
|
220
220
|
);
|
|
221
|
-
var o =
|
|
222
|
-
if (
|
|
223
|
-
var
|
|
224
|
-
`),
|
|
221
|
+
var o = d.DetermineComponentFrameRoot(), w = o[0], T = o[1];
|
|
222
|
+
if (w && T) {
|
|
223
|
+
var E = w.split(`
|
|
224
|
+
`), _ = T.split(`
|
|
225
225
|
`);
|
|
226
|
-
for (o = u = 0; u <
|
|
226
|
+
for (o = u = 0; u < E.length && !E[u].includes(
|
|
227
227
|
"DetermineComponentFrameRoot"
|
|
228
228
|
); )
|
|
229
229
|
u++;
|
|
230
|
-
for (; o <
|
|
230
|
+
for (; o < _.length && !_[o].includes(
|
|
231
231
|
"DetermineComponentFrameRoot"
|
|
232
232
|
); )
|
|
233
233
|
o++;
|
|
234
|
-
if (u ===
|
|
235
|
-
for (u =
|
|
234
|
+
if (u === E.length || o === _.length)
|
|
235
|
+
for (u = E.length - 1, o = _.length - 1; 1 <= u && 0 <= o && E[u] !== _[o]; )
|
|
236
236
|
o--;
|
|
237
237
|
for (; 1 <= u && 0 <= o; u--, o--)
|
|
238
|
-
if (
|
|
238
|
+
if (E[u] !== _[o]) {
|
|
239
239
|
if (u !== 1 || o !== 1)
|
|
240
240
|
do
|
|
241
|
-
if (u--, o--, 0 > o ||
|
|
242
|
-
var
|
|
243
|
-
` +
|
|
241
|
+
if (u--, o--, 0 > o || E[u] !== _[o]) {
|
|
242
|
+
var k = `
|
|
243
|
+
` + E[u].replace(
|
|
244
244
|
" at new ",
|
|
245
245
|
" at "
|
|
246
246
|
);
|
|
247
|
-
return e.displayName &&
|
|
247
|
+
return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && F.set(e, k), k;
|
|
248
248
|
}
|
|
249
249
|
while (1 <= u && 0 <= o);
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
} finally {
|
|
254
|
-
G = !1,
|
|
254
|
+
G = !1, j.H = n, i(), Error.prepareStackTrace = t;
|
|
255
255
|
}
|
|
256
|
-
return
|
|
256
|
+
return E = (E = e ? e.displayName || e.name : "") ? m(E) : "", typeof e == "function" && F.set(e, E), E;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function x(e) {
|
|
259
259
|
if (e == null) return "";
|
|
260
260
|
if (typeof e == "function") {
|
|
261
261
|
var r = e.prototype;
|
|
262
|
-
return
|
|
262
|
+
return g(
|
|
263
263
|
e,
|
|
264
264
|
!(!r || !r.isReactComponent)
|
|
265
265
|
);
|
|
266
266
|
}
|
|
267
|
-
if (typeof e == "string") return
|
|
267
|
+
if (typeof e == "string") return m(e);
|
|
268
268
|
switch (e) {
|
|
269
|
-
case
|
|
270
|
-
return
|
|
269
|
+
case V:
|
|
270
|
+
return m("Suspense");
|
|
271
271
|
case U:
|
|
272
|
-
return
|
|
272
|
+
return m("SuspenseList");
|
|
273
273
|
}
|
|
274
274
|
if (typeof e == "object")
|
|
275
275
|
switch (e.$$typeof) {
|
|
276
|
-
case
|
|
277
|
-
return e =
|
|
278
|
-
case
|
|
279
|
-
return
|
|
276
|
+
case W:
|
|
277
|
+
return e = g(e.render, !1), e;
|
|
278
|
+
case z:
|
|
279
|
+
return x(e.type);
|
|
280
280
|
case q:
|
|
281
281
|
r = e._payload, e = e._init;
|
|
282
282
|
try {
|
|
283
|
-
return
|
|
283
|
+
return x(e(r));
|
|
284
284
|
} catch {
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
return "";
|
|
288
288
|
}
|
|
289
|
-
function
|
|
290
|
-
var e =
|
|
289
|
+
function f() {
|
|
290
|
+
var e = j.A;
|
|
291
291
|
return e === null ? null : e.getOwner();
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function P(e) {
|
|
294
294
|
if (ee.call(e, "key")) {
|
|
295
295
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
296
296
|
if (r && r.isReactWarning) return !1;
|
|
297
297
|
}
|
|
298
298
|
return e.key !== void 0;
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function we(e, r) {
|
|
301
301
|
function t() {
|
|
302
302
|
ie || (ie = !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)",
|
|
@@ -309,22 +309,22 @@ function Pe() {
|
|
|
309
309
|
configurable: !0
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function Re() {
|
|
313
313
|
var e = a(this.type);
|
|
314
314
|
return ce[e] || (ce[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
|
|
318
|
+
function ye(e, r, t, n, d, u) {
|
|
319
319
|
return t = u.ref, e = {
|
|
320
|
-
$$typeof:
|
|
320
|
+
$$typeof: M,
|
|
321
321
|
type: e,
|
|
322
322
|
key: r,
|
|
323
323
|
props: u,
|
|
324
|
-
_owner:
|
|
324
|
+
_owner: d
|
|
325
325
|
}, (t !== void 0 ? t : null) !== null ? Object.defineProperty(e, "ref", {
|
|
326
326
|
enumerable: !1,
|
|
327
|
-
get:
|
|
327
|
+
get: Re
|
|
328
328
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
329
329
|
configurable: !1,
|
|
330
330
|
enumerable: !1,
|
|
@@ -337,32 +337,32 @@ function Pe() {
|
|
|
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 H(e, r, t, n, d, u) {
|
|
341
|
+
if (typeof e == "string" || typeof e == "function" || e === $ || e === I || e === K || e === V || e === U || e === Te || typeof e == "object" && e !== null && (e.$$typeof === q || e.$$typeof === z || e.$$typeof === Q || e.$$typeof === Z || e.$$typeof === W || e.$$typeof === ke || e.getModuleId !== void 0)) {
|
|
342
342
|
var o = r.children;
|
|
343
343
|
if (o !== void 0)
|
|
344
344
|
if (n)
|
|
345
345
|
if (J(o)) {
|
|
346
346
|
for (n = 0; n < o.length; n++)
|
|
347
|
-
|
|
347
|
+
X(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 X(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" : J(e) ? n = "array" : e !== void 0 && e.$$typeof ===
|
|
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" : J(e) ? n = "array" : e !== void 0 && e.$$typeof === M ? (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
360
|
if (ee.call(r, "key")) {
|
|
361
361
|
o = a(e);
|
|
362
|
-
var
|
|
363
|
-
return
|
|
362
|
+
var w = Object.keys(r).filter(function(E) {
|
|
363
|
+
return E !== "key";
|
|
364
364
|
});
|
|
365
|
-
n = 0 <
|
|
365
|
+
n = 0 < w.length ? "{key: someKey, " + w.join(": ..., ") + ": ...}" : "{key: someKey}", fe[o + n] || (w = 0 < w.length ? "{" + w.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,131 +371,142 @@ 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
|
+
w,
|
|
375
375
|
o
|
|
376
376
|
), fe[o + n] = !0);
|
|
377
377
|
}
|
|
378
|
-
if (o = null, t !== void 0 && (
|
|
378
|
+
if (o = null, t !== void 0 && (l(t), o = "" + t), P(r) && (l(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]);
|
|
382
382
|
} else t = r;
|
|
383
|
-
return o &&
|
|
383
|
+
return o && we(
|
|
384
384
|
t,
|
|
385
385
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
386
|
-
),
|
|
386
|
+
), ye(e, o, u, d, f(), t);
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function X(e, r) {
|
|
389
389
|
if (typeof e == "object" && e && e.$$typeof !== Ce) {
|
|
390
390
|
if (J(e))
|
|
391
391
|
for (var t = 0; t < e.length; t++) {
|
|
392
392
|
var n = e[t];
|
|
393
|
-
|
|
393
|
+
Y(n) && B(n, r);
|
|
394
394
|
}
|
|
395
|
-
else if (
|
|
395
|
+
else if (Y(e))
|
|
396
396
|
e._store && (e._store.validated = 1);
|
|
397
397
|
else if (e === null || typeof e != "object" ? t = null : (t = D && e[D] || 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
|
+
Y(e.value) && B(e.value, r);
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
function
|
|
403
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
402
|
+
function Y(e) {
|
|
403
|
+
return typeof e == "object" && e !== null && e.$$typeof === M;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1, r =
|
|
405
|
+
function B(e, r) {
|
|
406
|
+
if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1, r = je(r), !de[r])) {
|
|
407
407
|
de[r] = !0;
|
|
408
408
|
var t = "";
|
|
409
|
-
e && e._owner != null && e._owner !==
|
|
410
|
-
var n =
|
|
411
|
-
|
|
412
|
-
var
|
|
413
|
-
return n && (
|
|
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 = j.getCurrentStack;
|
|
411
|
+
j.getCurrentStack = function() {
|
|
412
|
+
var d = x(e.type);
|
|
413
|
+
return n && (d += n() || ""), d;
|
|
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
|
+
), j.getCurrentStack = n;
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
|
-
function
|
|
422
|
-
var r = "", t =
|
|
421
|
+
function je(e) {
|
|
422
|
+
var r = "", t = f();
|
|
423
423
|
return t && (t = a(t.type)) && (r = `
|
|
424
424
|
|
|
425
425
|
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
|
-
O.Fragment =
|
|
433
|
-
return
|
|
434
|
-
}, O.jsxs = function(e, r, t, n,
|
|
435
|
-
return
|
|
429
|
+
var he = Oe, M = Symbol.for("react.transitional.element"), _e = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), K = Symbol.for("react.strict_mode"), I = Symbol.for("react.profiler"), Z = Symbol.for("react.consumer"), Q = Symbol.for("react.context"), W = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), U = Symbol.for("react.suspense_list"), z = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), Te = Symbol.for("react.offscreen"), D = Symbol.iterator, pe = Symbol.for("react.client.reference"), j = he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ee = Object.prototype.hasOwnProperty, h = Object.assign, ke = Symbol.for("react.client.reference"), J = Array.isArray, p = 0, re, te, oe, ne, ae, ue, se;
|
|
430
|
+
v.__reactDisabledLog = !0;
|
|
431
|
+
var L, le, G = !1, F = new (typeof WeakMap == "function" ? WeakMap : Map)(), Ce = Symbol.for("react.client.reference"), ie, ce = {}, fe = {}, de = {};
|
|
432
|
+
O.Fragment = $, O.jsx = function(e, r, t, n, d) {
|
|
433
|
+
return H(e, r, t, !1, n, d);
|
|
434
|
+
}, O.jsxs = function(e, r, t, n, d) {
|
|
435
|
+
return H(e, r, t, !0, n, d);
|
|
436
436
|
};
|
|
437
437
|
}()), O;
|
|
438
438
|
}
|
|
439
|
-
var
|
|
440
|
-
function
|
|
441
|
-
return
|
|
439
|
+
var me;
|
|
440
|
+
function $e() {
|
|
441
|
+
return me || (me = 1, process.env.NODE_ENV === "production" ? S.exports = Ye() : S.exports = Me()), S.exports;
|
|
442
442
|
}
|
|
443
|
-
var
|
|
444
|
-
const
|
|
445
|
-
function
|
|
446
|
-
const a =
|
|
443
|
+
var c = $e();
|
|
444
|
+
const ge = Ae(null), ze = (a) => /* @__PURE__ */ c.jsx(ge.Provider, { value: a.router, children: a.children });
|
|
445
|
+
function xe() {
|
|
446
|
+
const a = Se(ge);
|
|
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 We() {
|
|
454
|
+
return N(xe());
|
|
455
455
|
}
|
|
456
|
-
const
|
|
457
|
-
const { to:
|
|
458
|
-
if (!
|
|
459
|
-
const { internal:
|
|
456
|
+
const qe = Ne((a, b) => {
|
|
457
|
+
const { to: l, params: v, onClick: s, ...i } = a, { mappedRoutes: m } = xe(), g = m.find(({ route: f }) => f === l), { onOpen: x } = N(l);
|
|
458
|
+
if (!g) {
|
|
459
|
+
const { internal: f } = l;
|
|
460
460
|
throw new Error(
|
|
461
|
-
`[Link] Route with path "${
|
|
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__ */ c.jsx(
|
|
465
465
|
"a",
|
|
466
466
|
{
|
|
467
467
|
...i,
|
|
468
|
-
ref:
|
|
469
|
-
href:
|
|
470
|
-
onClick: (
|
|
471
|
-
s == null || s(
|
|
468
|
+
ref: b,
|
|
469
|
+
href: g.toPath(v ?? void 0),
|
|
470
|
+
onClick: (f) => {
|
|
471
|
+
s == null || s(f), !f.defaultPrevented && (i.target && i.target !== "_self" || f.metaKey || f.altKey || f.ctrlKey || f.shiftKey || (f.preventDefault(), x({ params: v || {} })));
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
);
|
|
475
|
-
}),
|
|
475
|
+
}), Je = (a) => ({
|
|
476
476
|
...a,
|
|
477
477
|
view: () => {
|
|
478
|
-
const { view:
|
|
479
|
-
return s ?
|
|
478
|
+
const { view: b, layout: l, route: v } = a, { isOpened: s } = N(v);
|
|
479
|
+
return s ? l ? /* @__PURE__ */ c.jsx(l, { children: /* @__PURE__ */ c.jsx(b, {}) }) : /* @__PURE__ */ c.jsx(b, {}) : null;
|
|
480
480
|
}
|
|
481
|
-
}),
|
|
482
|
-
const { routes:
|
|
481
|
+
}), Le = (a) => {
|
|
482
|
+
const { routes: b, otherwise: l } = a;
|
|
483
483
|
return () => {
|
|
484
|
-
const { activeRoutes:
|
|
485
|
-
(
|
|
486
|
-
),
|
|
487
|
-
(
|
|
484
|
+
const { activeRoutes: v } = We(), s = v.reduce((x, f) => x.filter(
|
|
485
|
+
(P) => P !== f.internal.parent
|
|
486
|
+
), v), i = b.find(
|
|
487
|
+
(x) => x.route === s.at(-1)
|
|
488
488
|
);
|
|
489
489
|
if (!i)
|
|
490
|
-
return
|
|
491
|
-
const { view:
|
|
492
|
-
return
|
|
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, {});
|
|
493
|
+
};
|
|
494
|
+
}, Ge = (a) => {
|
|
495
|
+
a.route.internal.setAsyncImport(a.view);
|
|
496
|
+
const b = Pe(a.view);
|
|
497
|
+
return {
|
|
498
|
+
...a,
|
|
499
|
+
view: () => {
|
|
500
|
+
const { layout: l, fallback: v = () => /* @__PURE__ */ c.jsx(c.Fragment, {}), route: s } = a, { isOpened: i } = N(s);
|
|
501
|
+
return i ? l ? /* @__PURE__ */ c.jsx(l, { children: /* @__PURE__ */ c.jsx(ve, { fallback: /* @__PURE__ */ c.jsx(v, {}), children: /* @__PURE__ */ c.jsx(b, {}) }) }) : /* @__PURE__ */ c.jsx(ve, { fallback: /* @__PURE__ */ c.jsx(v, {}), children: /* @__PURE__ */ c.jsx(b, {}) }) : null;
|
|
502
|
+
}
|
|
493
503
|
};
|
|
494
504
|
};
|
|
495
505
|
export {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
Je as
|
|
500
|
-
|
|
506
|
+
qe as Link,
|
|
507
|
+
ze as RouterProvider,
|
|
508
|
+
Ge as createLazyRouteView,
|
|
509
|
+
Je as createRouteView,
|
|
510
|
+
Le as createRoutesView,
|
|
511
|
+
We as useRouter
|
|
501
512
|
};
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"registry": "https://registry.npmjs.org/"
|
|
6
6
|
},
|
|
7
7
|
"private": false,
|
|
8
|
-
"version": "0.3.
|
|
8
|
+
"version": "0.3.3",
|
|
9
9
|
"description": "React bindings for argon router",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"effector",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"effector-react": ">=23",
|
|
59
59
|
"react": "18 || 19"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "ab897956e5983f989879d647c8a3230f20a3bdf4"
|
|
62
62
|
}
|