aura-toast 1.5.0 → 1.7.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/aura-toast.cjs.js
CHANGED
|
@@ -1,32 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var We;function bt(){if(We)return V;We=1;var a=D,r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,E=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h={key:!0,ref:!0,__self:!0,__source:!0};function x(g,v,O){var b,T={},S=null,R=null;O!==void 0&&(S=""+O),v.key!==void 0&&(S=""+v.key),v.ref!==void 0&&(R=v.ref);for(b in v)c.call(v,b)&&!h.hasOwnProperty(b)&&(T[b]=v[b]);if(g&&g.defaultProps)for(b in v=g.defaultProps,v)T[b]===void 0&&(T[b]=v[b]);return{$$typeof:r,type:g,key:S,ref:R,props:T,_owner:E.current}}return V.Fragment=i,V.jsx=x,V.jsxs=x,V}var z={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var $e;function Et(){return $e||($e=1,process.env.NODE_ENV!=="production"&&function(){var a=D,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),g=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),C=Symbol.iterator,X="@@iterator";function H(e){if(e===null||typeof e!="object")return null;var t=C&&e[C]||e[X];return typeof t=="function"?t:null}var A=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){{for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];Z("error",e,n)}}function Z(e,t,n){{var s=A.ReactDebugCurrentFrame,f=s.getStackAddendum();f!==""&&(t+="%s",n=n.concat([f]));var d=n.map(function(u){return String(u)});d.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,d)}}var Q=!1,ee=!1,te=!1,U=!1,$=!1,he;he=Symbol.for("react.module.reference");function Ye(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===h||$||e===E||e===O||e===b||U||e===R||Q||ee||te||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===T||e.$$typeof===x||e.$$typeof===g||e.$$typeof===v||e.$$typeof===he||e.getModuleId!==void 0))}function Be(e,t,n){var s=e.displayName;if(s)return s;var f=t.displayName||t.name||"";return f!==""?n+"("+f+")":n}function ve(e){return e.displayName||"Context"}function P(e){if(e==null)return null;if(typeof e.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case i:return"Portal";case h:return"Profiler";case E:return"StrictMode";case O:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case g:var t=e;return ve(t)+".Consumer";case x:var n=e;return ve(n._context)+".Provider";case v:return Be(e,e.render,"ForwardRef");case T:var s=e.displayName||null;return s!==null?s:P(e.type)||"Memo";case S:{var f=e,d=f._payload,u=f._init;try{return P(u(d))}catch{return null}}}return null}var M=Object.assign,N=0,pe,ye,me,ge,be,Ee,xe;function Te(){}Te.__reactDisabledLog=!0;function Ve(){{if(N===0){pe=console.log,ye=console.info,me=console.warn,ge=console.error,be=console.group,Ee=console.groupCollapsed,xe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Te,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}N++}}function ze(){{if(N--,N===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},e,{value:pe}),info:M({},e,{value:ye}),warn:M({},e,{value:me}),error:M({},e,{value:ge}),group:M({},e,{value:be}),groupCollapsed:M({},e,{value:Ee}),groupEnd:M({},e,{value:xe})})}N<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=A.ReactCurrentDispatcher,ne;function q(e,t,n){{if(ne===void 0)try{throw Error()}catch(f){var s=f.stack.trim().match(/\n( *(at )?)/);ne=s&&s[1]||""}return`
|
|
18
|
-
`+ne+e}}var ie=!1,J;{var Ue=typeof WeakMap=="function"?WeakMap:Map;J=new Ue}function Re(e,t){if(!e||ie)return"";{var n=J.get(e);if(n!==void 0)return n}var s;ie=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var d;d=re.current,re.current=null,Ve();try{if(t){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(j){s=j}Reflect.construct(e,[],u)}else{try{u.call()}catch(j){s=j}e.call(u.prototype)}}else{try{throw Error()}catch(j){s=j}e()}}catch(j){if(j&&s&&typeof j.stack=="string"){for(var o=j.stack.split(`
|
|
19
|
-
`),_=s.stack.split(`
|
|
20
|
-
`),p=o.length-1,m=_.length-1;p>=1&&m>=0&&o[p]!==_[m];)m--;for(;p>=1&&m>=0;p--,m--)if(o[p]!==_[m]){if(p!==1||m!==1)do if(p--,m--,m<0||o[p]!==_[m]){var k=`
|
|
21
|
-
`+o[p].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),typeof e=="function"&&J.set(e,k),k}while(p>=1&&m>=0);break}}}finally{ie=!1,re.current=d,ze(),Error.prepareStackTrace=f}var F=e?e.displayName||e.name:"",I=F?q(F):"";return typeof e=="function"&&J.set(e,I),I}function qe(e,t,n){return Re(e,!1)}function Je(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function K(e,t,n){if(e==null)return"";if(typeof e=="function")return Re(e,Je(e));if(typeof e=="string")return q(e);switch(e){case O:return q("Suspense");case b:return q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case v:return qe(e.render);case T:return K(e.type,t,n);case S:{var s=e,f=s._payload,d=s._init;try{return K(d(f),t,n)}catch{}}}return""}var Y=Object.prototype.hasOwnProperty,_e={},we=A.ReactDebugCurrentFrame;function G(e){if(e){var t=e._owner,n=K(e.type,e._source,t?t.type:null);we.setExtraStackFrame(n)}else we.setExtraStackFrame(null)}function Ke(e,t,n,s,f){{var d=Function.call.bind(Y);for(var u in e)if(d(e,u)){var o=void 0;try{if(typeof e[u]!="function"){var _=Error((s||"React class")+": "+n+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}o=e[u](t,u,s,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(p){o=p}o&&!(o instanceof Error)&&(G(f),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",n,u,typeof o),G(null)),o instanceof Error&&!(o.message in _e)&&(_e[o.message]=!0,G(f),y("Failed %s type: %s",n,o.message),G(null))}}}var Ge=Array.isArray;function ae(e){return Ge(e)}function Xe(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,n=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function He(e){try{return je(e),!1}catch{return!0}}function je(e){return""+e}function Se(e){if(He(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(e)),je(e)}var B=A.ReactCurrentOwner,Ze={key:!0,ref:!0,__self:!0,__source:!0},Ce,ke,se;se={};function Qe(e){if(Y.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function et(e){if(Y.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function tt(e,t){if(typeof e.ref=="string"&&B.current&&t&&B.current.stateNode!==t){var n=P(B.current.type);se[n]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',P(B.current.type),e.ref),se[n]=!0)}}function rt(e,t){{var n=function(){Ce||(Ce=!0,y("%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://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function nt(e,t){{var n=function(){ke||(ke=!0,y("%s: `ref` 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://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var it=function(e,t,n,s,f,d,u){var o={$$typeof:r,type:e,key:t,ref:n,props:u,_owner:d};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function at(e,t,n,s,f){{var d,u={},o=null,_=null;n!==void 0&&(Se(n),o=""+n),et(t)&&(Se(t.key),o=""+t.key),Qe(t)&&(_=t.ref,tt(t,f));for(d in t)Y.call(t,d)&&!Ze.hasOwnProperty(d)&&(u[d]=t[d]);if(e&&e.defaultProps){var p=e.defaultProps;for(d in p)u[d]===void 0&&(u[d]=p[d])}if(o||_){var m=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&rt(u,m),_&&nt(u,m)}return it(e,o,_,f,s,B.current,u)}}var oe=A.ReactCurrentOwner,Oe=A.ReactDebugCurrentFrame;function L(e){if(e){var t=e._owner,n=K(e.type,e._source,t?t.type:null);Oe.setExtraStackFrame(n)}else Oe.setExtraStackFrame(null)}var ue;ue=!1;function le(e){return typeof e=="object"&&e!==null&&e.$$typeof===r}function Pe(){{if(oe.current){var e=P(oe.current.type);if(e)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function st(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
|
|
24
|
-
|
|
25
|
-
Check your code at `+t+":"+n+"."}return""}}var De={};function ot(e){{var t=Pe();if(!t){var n=typeof e=="string"?e:e.displayName||e.name;n&&(t=`
|
|
26
|
-
|
|
27
|
-
Check the top-level render call using <`+n+">.")}return t}}function Ae(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=ot(t);if(De[n])return;De[n]=!0;var s="";e&&e._owner&&e._owner!==oe.current&&(s=" It was passed a child from "+P(e._owner.type)+"."),L(e),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,s),L(null)}}function Me(e,t){{if(typeof e!="object")return;if(ae(e))for(var n=0;n<e.length;n++){var s=e[n];le(s)&&Ae(s,t)}else if(le(e))e._store&&(e._store.validated=!0);else if(e){var f=H(e);if(typeof f=="function"&&f!==e.entries)for(var d=f.call(e),u;!(u=d.next()).done;)le(u.value)&&Ae(u.value,t)}}}function ut(e){{var t=e.type;if(t==null||typeof t=="string")return;var n;if(typeof t=="function")n=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===v||t.$$typeof===T))n=t.propTypes;else return;if(n){var s=P(t);Ke(n,e.props,"prop",s,e)}else if(t.PropTypes!==void 0&&!ue){ue=!0;var f=P(t);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",f||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function lt(e){{for(var t=Object.keys(e.props),n=0;n<t.length;n++){var s=t[n];if(s!=="children"&&s!=="key"){L(e),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),L(null);break}}e.ref!==null&&(L(e),y("Invalid attribute `ref` supplied to `React.Fragment`."),L(null))}}var Ie={};function Le(e,t,n,s,f,d){{var u=Ye(e);if(!u){var 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.");var _=st(f);_?o+=_:o+=Pe();var p;e===null?p="null":ae(e)?p="array":e!==void 0&&e.$$typeof===r?(p="<"+(P(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):p=typeof e,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",p,o)}var m=at(e,t,n,f,d);if(m==null)return m;if(u){var k=t.children;if(k!==void 0)if(s)if(ae(k)){for(var F=0;F<k.length;F++)Me(k[F],e);Object.freeze&&Object.freeze(k)}else y("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 Me(k,e)}if(Y.call(t,"key")){var I=P(e),j=Object.keys(t).filter(function(pt){return pt!=="key"}),ce=j.length>0?"{key: someKey, "+j.join(": ..., ")+": ...}":"{key: someKey}";if(!Ie[I+ce]){var vt=j.length>0?"{"+j.join(": ..., ")+": ...}":"{}";y(`A props object containing a "key" prop is being spread into JSX:
|
|
28
|
-
let props = %s;
|
|
29
|
-
<%s {...props} />
|
|
30
|
-
React keys must be passed directly to JSX without using spread:
|
|
31
|
-
let props = %s;
|
|
32
|
-
<%s key={someKey} {...props} />`,ce,I,vt,I),Ie[I+ce]=!0}}return e===c?lt(m):ut(m),m}}function ct(e,t,n){return Le(e,t,n,!0)}function ft(e,t,n){return Le(e,t,n,!1)}var dt=ft,ht=ct;z.Fragment=c,z.jsx=dt,z.jsxs=ht}()),z}process.env.NODE_ENV==="production"?de.exports=bt():de.exports=Et();var l=de.exports;const xt=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),l.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),Tt=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("circle",{cx:"12",cy:"12",r:"10"}),l.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),l.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),Rt=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("circle",{cx:"12",cy:"12",r:"10"}),l.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),l.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),_t=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),l.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),l.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),wt=()=>l.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"aura-spinner",children:l.jsx("path",{d:"M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"})}),Ne=({config:a,index:r=0,isStacked:i=!1,totalToasts:c=1,onHeight:E})=>{var b,T,S,R;const[h,x]=D.useState(!1),g=D.useRef(null);D.useEffect(()=>{g.current&&E&&E(g.current.getBoundingClientRect().height);const C=()=>{g.current&&E&&E(g.current.getBoundingClientRect().height)};return window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[a.title,a.description,E]);const v=()=>{x(!0),setTimeout(()=>{w.dismiss(a.id)},300)},O={success:xt,error:Tt,info:Rt,warning:_t,loading:wt}[a.type||"info"];return l.jsxs("div",{ref:g,className:`aura-toast ${a.type||"info"} ${a.glassy!==!1?"aura-toast-glassy":""} ${h?"aura-toast-exit":"aura-toast-enter"} ${a.className||""}`,onMouseEnter:()=>fe.pause(),onMouseLeave:()=>fe.resume(),style:{...a.style,...(b=a.style)!=null&&b["--type-color"]?{"--type-color":a.style["--type-color"]}:{},...(T=a.style)!=null&&T["--type-glow"]?{"--type-glow":a.style["--type-glow"]}:{},...(S=a.style)!=null&&S["--toast-font-size-title"]?{"--toast-font-size-title":a.style["--toast-font-size-title"]}:{},...(R=a.style)!=null&&R["--toast-font-size-desc"]?{"--toast-font-size-desc":a.style["--toast-font-size-desc"]}:{}},children:[l.jsx("div",{className:"aura-icon-container",children:l.jsx("div",{className:"aura-icon",children:l.jsx(O,{})})}),l.jsxs("div",{className:"aura-content",children:[a.title&&l.jsx("p",{className:"aura-title",children:a.title}),a.description&&l.jsx("p",{className:"aura-description",children:a.description})]}),a.action&&l.jsx("div",{className:"aura-action-container",children:l.jsx("button",{className:"aura-action",onClick:()=>{var C;(C=a.action)==null||C.onClick(),v()},children:a.action.label})}),l.jsx("button",{className:"aura-close",onClick:v,"aria-label":"Close",children:l.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})};const jt=({children:a,className:r,stack:i=!1})=>{const[c,E]=D.useState([]),[h,x]=D.useState({}),[g,v]=D.useState(!1);D.useEffect(()=>w.subscribe(R=>{E(R||[])}),[]);const O=i?c:c.slice(0,1),b=c.length>0&&c[0].position||"top-right",T=b.startsWith("top");let S=0;return l.jsxs("div",{className:r,children:[a,l.jsx("div",{className:`aura-container ${b}`,"data-stack":i,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),children:O.map((R,C)=>{const X=h[R.id]||80,H=S;S+=X+16;const A=C*16;let y=0;i&&(y=g?H:A);const Z=T?y:-y,Q=i&&!g?Math.max(0,1-C*.03):1,ee=100-C,te=i&&!g&&C>3?0:1;return l.jsx("div",{className:"aura-toast-wrapper",style:{gridArea:i?"1 / 1":"auto",zIndex:ee,transform:`translateY(${Z}px) scale(${Q})`,transformOrigin:T?"top center":"bottom center",opacity:te,transition:"all 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28)",pointerEvents:"auto",paddingBottom:g&&i&&T?"16px":"0",paddingTop:g&&i&&!T?"16px":"0"},children:l.jsx(Ne,{config:R,isStacked:i,onHeight:U=>{x($=>$[R.id]===U?$:{...$,[R.id]:U})}})},R.id)})})]})};exports.AuraProvider=jt;exports.AuraToast=Ne;exports.auraToast=fe;exports.toastStore=w;
|
|
1
|
+
"use strict";var z=Object.defineProperty;var I=(s,t,e)=>t in s?z(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var m=(s,t,e)=>(I(s,typeof t!="symbol"?t+"":t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),p=require("react"),k=5;class B{constructor(){m(this,"state",[]);m(this,"listeners",new Set);m(this,"timeouts",new Map);m(this,"startTimes",new Map);m(this,"remainingDurations",new Map)}getState(){return this.state}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t(this.state))}isDuplicate(t){return this.state.some(e=>e.title===t.title&&(e.type||"info")===(t.type||"info")&&e.description===t.description&&e.glassy===t.glassy)}show(t){if(this.isDuplicate(t)){const o=this.state.find(l=>l.title===t.title&&(l.type||"info")===(t.type||"info")&&l.description===t.description&&l.glassy===t.glassy);if(o&&o.id){const l=t.duration??4e3;l>0&&(this.startTimes.set(o.id,Date.now()),this.remainingDurations.set(o.id,l),this.startTimer(o.id,l))}return}const e=t.id||Math.random().toString(36).substring(2,9),r=t.duration??4e3,n={...t,id:e,type:t.type||"info",duration:r};if(this.state=[n,...this.state],this.state.length>k){const o=this.state[this.state.length-1];o&&o.id&&this.clearTimerData(o.id),this.state=this.state.slice(0,k)}this.notify(),r>0&&(this.startTimes.set(e,Date.now()),this.remainingDurations.set(e,r),this.startTimer(e,r))}startTimer(t,e){this.timeouts.has(t)&&clearTimeout(this.timeouts.get(t));const r=setTimeout(()=>{this.dismiss(t)},e);this.timeouts.set(t,r)}clearTimerData(t){this.timeouts.has(t)&&(clearTimeout(this.timeouts.get(t)),this.timeouts.delete(t)),this.startTimes.delete(t),this.remainingDurations.delete(t)}pause(){this.state.forEach(t=>{const e=t.id;if(this.timeouts.has(e)&&this.startTimes.has(e)){clearTimeout(this.timeouts.get(e)),this.timeouts.delete(e);const r=this.startTimes.get(e),n=Date.now()-r,o=this.remainingDurations.get(e)||0;this.remainingDurations.set(e,Math.max(0,o-n)),this.startTimes.delete(e)}})}resume(){this.state.forEach(t=>{const e=t.id,r=this.remainingDurations.get(e);!this.timeouts.has(e)&&r!==void 0&&r>0&&(this.startTimes.set(e,Date.now()),this.startTimer(e,r))})}dismiss(t){t?(this.clearTimerData(t),this.state=this.state.filter(e=>e.id!==t)):(this.timeouts.forEach(e=>clearTimeout(e)),this.timeouts.clear(),this.startTimes.clear(),this.remainingDurations.clear(),this.state=[]),this.notify()}}const a=new B,f={success:(s,t)=>{const e=typeof s=="string"?{...t,title:s}:{...t,...s};return a.show({...e,type:"success"})},error:(s,t)=>{const e=typeof s=="string"?{...t,title:s}:{...t,...s};return a.show({...e,type:"error"})},info:(s,t)=>{const e=typeof s=="string"?{...t,title:s}:{...t,...s};return a.show({...e,type:"info"})},warning:(s,t)=>{const e=typeof s=="string"?{...t,title:s}:{...t,...s};return a.show({...e,type:"warning"})},promise:(s,t,e)=>{const r=(e==null?void 0:e.id)||Math.random().toString(36).substring(2,9),n=typeof t.loading=="string"?{...e,title:t.loading}:{...e,...t.loading};return a.show({...n,id:r,type:"loading",duration:0}),s.then(()=>{a.dismiss(r);const o=typeof t.success=="string"?{...e,title:t.success}:{...e,...t.success};a.show({...o,id:r,type:"success"})}).catch(()=>{a.dismiss(r);const o=typeof t.error=="string"?{...e,title:t.error}:{...e,...t.error};a.show({...o,id:r,type:"error"})}),s},dismiss:s=>a.dismiss(s),pause:()=>a.pause(),resume:()=>a.resume()},W=()=>i.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),i.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),$=()=>i.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"12",r:"10"}),i.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),i.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),A=()=>i.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"12",r:"10"}),i.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),i.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),R=()=>i.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),i.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),i.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),O=()=>i.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"aura-spinner",children:i.jsx("path",{d:"M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"})}),M=({config:s,index:t=0,isStacked:e=!1,totalToasts:r=1,onHeight:n})=>{var x,d,j,c;const[o,l]=p.useState(!1),u=p.useRef(null);p.useEffect(()=>{u.current&&n&&n(u.current.getBoundingClientRect().height);const h=()=>{u.current&&n&&n(u.current.getBoundingClientRect().height)};return window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[s.title,s.description,n]);const y=()=>{l(!0),setTimeout(()=>{a.dismiss(s.id)},300)},w={success:W,error:$,info:A,warning:R,loading:O}[s.type||"info"];return i.jsxs("div",{ref:u,className:`aura-toast ${s.type||"info"} ${s.glassy!==!1?"aura-toast-glassy":""} ${o?"aura-toast-exit":"aura-toast-enter"} ${s.className||""}`,onMouseEnter:()=>f.pause(),onMouseLeave:()=>f.resume(),style:{...s.style,...(x=s.style)!=null&&x["--type-color"]?{"--type-color":s.style["--type-color"]}:{},...(d=s.style)!=null&&d["--type-glow"]?{"--type-glow":s.style["--type-glow"]}:{},...(j=s.style)!=null&&j["--toast-font-size-title"]?{"--toast-font-size-title":s.style["--toast-font-size-title"]}:{},...(c=s.style)!=null&&c["--toast-font-size-desc"]?{"--toast-font-size-desc":s.style["--toast-font-size-desc"]}:{}},children:[i.jsx("div",{className:"aura-icon-container",children:i.jsx("div",{className:"aura-icon",children:i.jsx(w,{})})}),i.jsxs("div",{className:"aura-content",children:[s.title&&i.jsx("p",{className:"aura-title",children:s.title}),s.description&&i.jsx("p",{className:"aura-description",children:s.description})]}),s.action&&i.jsx("div",{className:"aura-action-container",children:i.jsx("button",{className:"aura-action",onClick:()=>{var h;(h=s.action)==null||h.onClick(),y()},children:s.action.label})}),i.jsx("button",{className:"aura-close",onClick:y,"aria-label":"Close",children:i.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})};const Y=({children:s,className:t,stack:e=!1})=>{const[r,n]=p.useState([]),[o,l]=p.useState({}),[u,y]=p.useState(!1);p.useEffect(()=>a.subscribe(c=>{n(c||[])}),[]);const w=e?r:r.slice(0,1),x=r.length>0&&r[0].position||"top-right",d=x.startsWith("top");let j=0;return i.jsxs("div",{className:t,children:[s,i.jsx("div",{className:`aura-container ${x}`,"data-stack":e,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),children:w.map((c,h)=>{const C=o[c.id]||80,L=j;j+=C+16;const D=h*16;let T=0;e&&(T=u?L:D);const S=d?T:-T,b=e&&!u?Math.max(0,1-h*.03):1,E=100-h,N=e&&!u&&h>3?0:1;return i.jsx("div",{className:"aura-toast-wrapper",style:{gridArea:e?"1 / 1":"auto",zIndex:E,transform:`translateY(${S}px) scale(${b})`,transformOrigin:d?"top center":"bottom center",opacity:N,transition:"all 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28)",pointerEvents:"auto",paddingBottom:u&&e&&d?"16px":"0",paddingTop:u&&e&&!d?"16px":"0"},children:i.jsx(M,{config:c,isStacked:e,onHeight:g=>{l(v=>v[c.id]===g?v:{...v,[c.id]:g})}})},c.id)})})]})};exports.AuraProvider=Y;exports.AuraToast=M;exports.auraToast=f;exports.toastStore=a;
|
package/dist/aura-toast.es.js
CHANGED
|
@@ -1,876 +1,234 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var B = Object.defineProperty;
|
|
2
|
+
var j = (s, t, e) => t in s ? B(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
+
var m = (s, t, e) => (j(s, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
import { jsxs as d, jsx as i } from "react/jsx-runtime";
|
|
5
|
+
import W, { useState as x, useEffect as L } from "react";
|
|
6
|
+
const M = 5;
|
|
7
|
+
class $ {
|
|
7
8
|
constructor() {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
m(this, "state", []);
|
|
10
|
+
m(this, "listeners", /* @__PURE__ */ new Set());
|
|
11
|
+
m(this, "timeouts", /* @__PURE__ */ new Map());
|
|
12
|
+
m(this, "startTimes", /* @__PURE__ */ new Map());
|
|
13
|
+
m(this, "remainingDurations", /* @__PURE__ */ new Map());
|
|
13
14
|
}
|
|
14
15
|
getState() {
|
|
15
16
|
return this.state;
|
|
16
17
|
}
|
|
17
|
-
subscribe(
|
|
18
|
-
return this.listeners.add(
|
|
18
|
+
subscribe(t) {
|
|
19
|
+
return this.listeners.add(t), () => this.listeners.delete(t);
|
|
19
20
|
}
|
|
20
21
|
notify() {
|
|
21
|
-
this.listeners.forEach((
|
|
22
|
+
this.listeners.forEach((t) => t(this.state));
|
|
22
23
|
}
|
|
23
|
-
isDuplicate(
|
|
24
|
+
isDuplicate(t) {
|
|
24
25
|
return this.state.some(
|
|
25
|
-
(
|
|
26
|
+
(e) => e.title === t.title && (e.type || "info") === (t.type || "info") && e.description === t.description && e.glassy === t.glassy
|
|
26
27
|
);
|
|
27
28
|
}
|
|
28
|
-
show(
|
|
29
|
-
if (this.isDuplicate(
|
|
30
|
-
const
|
|
31
|
-
(
|
|
29
|
+
show(t) {
|
|
30
|
+
if (this.isDuplicate(t)) {
|
|
31
|
+
const o = this.state.find(
|
|
32
|
+
(l) => l.title === t.title && (l.type || "info") === (t.type || "info") && l.description === t.description && l.glassy === t.glassy
|
|
32
33
|
);
|
|
33
|
-
if (
|
|
34
|
-
const
|
|
35
|
-
|
|
34
|
+
if (o && o.id) {
|
|
35
|
+
const l = t.duration ?? 4e3;
|
|
36
|
+
l > 0 && (this.startTimes.set(o.id, Date.now()), this.remainingDurations.set(o.id, l), this.startTimer(o.id, l));
|
|
36
37
|
}
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
39
|
-
const
|
|
40
|
-
...
|
|
41
|
-
id:
|
|
42
|
-
type:
|
|
43
|
-
duration:
|
|
40
|
+
const e = t.id || Math.random().toString(36).substring(2, 9), r = t.duration ?? 4e3, a = {
|
|
41
|
+
...t,
|
|
42
|
+
id: e,
|
|
43
|
+
type: t.type || "info",
|
|
44
|
+
duration: r
|
|
44
45
|
};
|
|
45
|
-
if (this.state = [
|
|
46
|
-
const
|
|
47
|
-
|
|
46
|
+
if (this.state = [a, ...this.state], this.state.length > M) {
|
|
47
|
+
const o = this.state[this.state.length - 1];
|
|
48
|
+
o && o.id && this.clearTimerData(o.id), this.state = this.state.slice(0, M);
|
|
48
49
|
}
|
|
49
|
-
this.notify(),
|
|
50
|
+
this.notify(), r > 0 && (this.startTimes.set(e, Date.now()), this.remainingDurations.set(e, r), this.startTimer(e, r));
|
|
50
51
|
}
|
|
51
|
-
startTimer(
|
|
52
|
-
this.timeouts.has(
|
|
53
|
-
const
|
|
54
|
-
this.dismiss(
|
|
55
|
-
},
|
|
56
|
-
this.timeouts.set(
|
|
52
|
+
startTimer(t, e) {
|
|
53
|
+
this.timeouts.has(t) && clearTimeout(this.timeouts.get(t));
|
|
54
|
+
const r = setTimeout(() => {
|
|
55
|
+
this.dismiss(t);
|
|
56
|
+
}, e);
|
|
57
|
+
this.timeouts.set(t, r);
|
|
57
58
|
}
|
|
58
|
-
clearTimerData(
|
|
59
|
-
this.timeouts.has(
|
|
59
|
+
clearTimerData(t) {
|
|
60
|
+
this.timeouts.has(t) && (clearTimeout(this.timeouts.get(t)), this.timeouts.delete(t)), this.startTimes.delete(t), this.remainingDurations.delete(t);
|
|
60
61
|
}
|
|
61
62
|
pause() {
|
|
62
|
-
this.state.forEach((
|
|
63
|
-
const
|
|
64
|
-
if (this.timeouts.has(
|
|
65
|
-
clearTimeout(this.timeouts.get(
|
|
66
|
-
const
|
|
67
|
-
this.remainingDurations.set(
|
|
63
|
+
this.state.forEach((t) => {
|
|
64
|
+
const e = t.id;
|
|
65
|
+
if (this.timeouts.has(e) && this.startTimes.has(e)) {
|
|
66
|
+
clearTimeout(this.timeouts.get(e)), this.timeouts.delete(e);
|
|
67
|
+
const r = this.startTimes.get(e), a = Date.now() - r, o = this.remainingDurations.get(e) || 0;
|
|
68
|
+
this.remainingDurations.set(e, Math.max(0, o - a)), this.startTimes.delete(e);
|
|
68
69
|
}
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
72
|
resume() {
|
|
72
|
-
this.state.forEach((
|
|
73
|
-
const
|
|
74
|
-
!this.timeouts.has(
|
|
73
|
+
this.state.forEach((t) => {
|
|
74
|
+
const e = t.id, r = this.remainingDurations.get(e);
|
|
75
|
+
!this.timeouts.has(e) && r !== void 0 && r > 0 && (this.startTimes.set(e, Date.now()), this.startTimer(e, r));
|
|
75
76
|
});
|
|
76
77
|
}
|
|
77
|
-
dismiss(
|
|
78
|
-
|
|
78
|
+
dismiss(t) {
|
|
79
|
+
t ? (this.clearTimerData(t), this.state = this.state.filter((e) => e.id !== t)) : (this.timeouts.forEach((e) => clearTimeout(e)), this.timeouts.clear(), this.startTimes.clear(), this.remainingDurations.clear(), this.state = []), this.notify();
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
|
-
const
|
|
82
|
-
success: (
|
|
83
|
-
const
|
|
84
|
-
return
|
|
82
|
+
const n = new $(), C = {
|
|
83
|
+
success: (s, t) => {
|
|
84
|
+
const e = typeof s == "string" ? { ...t, title: s } : { ...t, ...s };
|
|
85
|
+
return n.show({ ...e, type: "success" });
|
|
85
86
|
},
|
|
86
|
-
error: (
|
|
87
|
-
const
|
|
88
|
-
return
|
|
87
|
+
error: (s, t) => {
|
|
88
|
+
const e = typeof s == "string" ? { ...t, title: s } : { ...t, ...s };
|
|
89
|
+
return n.show({ ...e, type: "error" });
|
|
89
90
|
},
|
|
90
|
-
info: (
|
|
91
|
-
const
|
|
92
|
-
return
|
|
91
|
+
info: (s, t) => {
|
|
92
|
+
const e = typeof s == "string" ? { ...t, title: s } : { ...t, ...s };
|
|
93
|
+
return n.show({ ...e, type: "info" });
|
|
93
94
|
},
|
|
94
|
-
warning: (
|
|
95
|
-
const
|
|
96
|
-
return
|
|
95
|
+
warning: (s, t) => {
|
|
96
|
+
const e = typeof s == "string" ? { ...t, title: s } : { ...t, ...s };
|
|
97
|
+
return n.show({ ...e, type: "warning" });
|
|
97
98
|
},
|
|
98
|
-
promise: (
|
|
99
|
-
const
|
|
100
|
-
return
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
|
|
99
|
+
promise: (s, t, e) => {
|
|
100
|
+
const r = (e == null ? void 0 : e.id) || Math.random().toString(36).substring(2, 9), a = typeof t.loading == "string" ? { ...e, title: t.loading } : { ...e, ...t.loading };
|
|
101
|
+
return n.show({ ...a, id: r, type: "loading", duration: 0 }), s.then(() => {
|
|
102
|
+
n.dismiss(r);
|
|
103
|
+
const o = typeof t.success == "string" ? { ...e, title: t.success } : { ...e, ...t.success };
|
|
104
|
+
n.show({ ...o, id: r, type: "success" });
|
|
104
105
|
}).catch(() => {
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
}),
|
|
106
|
+
n.dismiss(r);
|
|
107
|
+
const o = typeof t.error == "string" ? { ...e, title: t.error } : { ...e, ...t.error };
|
|
108
|
+
n.show({ ...o, id: r, type: "error" });
|
|
109
|
+
}), s;
|
|
109
110
|
},
|
|
110
|
-
dismiss: (
|
|
111
|
-
pause: () =>
|
|
112
|
-
resume: () =>
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
*/
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
var
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
if (g && g.defaultProps)
|
|
136
|
-
for (b in v = g.defaultProps, v)
|
|
137
|
-
R[b] === void 0 && (R[b] = v[b]);
|
|
138
|
-
return { $$typeof: r, type: g, key: C, ref: T, props: R, _owner: E.current };
|
|
139
|
-
}
|
|
140
|
-
return B.Fragment = i, B.jsx = x, B.jsxs = x, B;
|
|
141
|
-
}
|
|
142
|
-
var V = {};
|
|
143
|
-
/**
|
|
144
|
-
* @license React
|
|
145
|
-
* react-jsx-runtime.development.js
|
|
146
|
-
*
|
|
147
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the MIT license found in the
|
|
150
|
-
* LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/
|
|
152
|
-
var Ne;
|
|
153
|
-
function xt() {
|
|
154
|
-
return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && function() {
|
|
155
|
-
var a = de, r = Symbol.for("react.element"), i = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), x = Symbol.for("react.provider"), g = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), S = Symbol.iterator, X = "@@iterator";
|
|
156
|
-
function H(e) {
|
|
157
|
-
if (e === null || typeof e != "object")
|
|
158
|
-
return null;
|
|
159
|
-
var t = S && e[S] || e[X];
|
|
160
|
-
return typeof t == "function" ? t : null;
|
|
161
|
-
}
|
|
162
|
-
var D = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
163
|
-
function y(e) {
|
|
164
|
-
{
|
|
165
|
-
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
|
|
166
|
-
n[s - 1] = arguments[s];
|
|
167
|
-
Z("error", e, n);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
function Z(e, t, n) {
|
|
171
|
-
{
|
|
172
|
-
var s = D.ReactDebugCurrentFrame, f = s.getStackAddendum();
|
|
173
|
-
f !== "" && (t += "%s", n = n.concat([f]));
|
|
174
|
-
var d = n.map(function(u) {
|
|
175
|
-
return String(u);
|
|
176
|
-
});
|
|
177
|
-
d.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, d);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
var Q = !1, ee = !1, te = !1, z = !1, W = !1, he;
|
|
181
|
-
he = Symbol.for("react.module.reference");
|
|
182
|
-
function Be(e) {
|
|
183
|
-
return !!(typeof e == "string" || typeof e == "function" || e === c || e === h || W || e === E || e === O || e === b || z || e === T || Q || ee || te || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === R || e.$$typeof === x || e.$$typeof === g || e.$$typeof === v || // This needs to include all possible module reference object
|
|
184
|
-
// types supported by any Flight configuration anywhere since
|
|
185
|
-
// we don't know which Flight build this will end up being used
|
|
186
|
-
// with.
|
|
187
|
-
e.$$typeof === he || e.getModuleId !== void 0));
|
|
188
|
-
}
|
|
189
|
-
function Ve(e, t, n) {
|
|
190
|
-
var s = e.displayName;
|
|
191
|
-
if (s)
|
|
192
|
-
return s;
|
|
193
|
-
var f = t.displayName || t.name || "";
|
|
194
|
-
return f !== "" ? n + "(" + f + ")" : n;
|
|
195
|
-
}
|
|
196
|
-
function ve(e) {
|
|
197
|
-
return e.displayName || "Context";
|
|
198
|
-
}
|
|
199
|
-
function P(e) {
|
|
200
|
-
if (e == null)
|
|
201
|
-
return null;
|
|
202
|
-
if (typeof e.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
203
|
-
return e.displayName || e.name || null;
|
|
204
|
-
if (typeof e == "string")
|
|
205
|
-
return e;
|
|
206
|
-
switch (e) {
|
|
207
|
-
case c:
|
|
208
|
-
return "Fragment";
|
|
209
|
-
case i:
|
|
210
|
-
return "Portal";
|
|
211
|
-
case h:
|
|
212
|
-
return "Profiler";
|
|
213
|
-
case E:
|
|
214
|
-
return "StrictMode";
|
|
215
|
-
case O:
|
|
216
|
-
return "Suspense";
|
|
217
|
-
case b:
|
|
218
|
-
return "SuspenseList";
|
|
219
|
-
}
|
|
220
|
-
if (typeof e == "object")
|
|
221
|
-
switch (e.$$typeof) {
|
|
222
|
-
case g:
|
|
223
|
-
var t = e;
|
|
224
|
-
return ve(t) + ".Consumer";
|
|
225
|
-
case x:
|
|
226
|
-
var n = e;
|
|
227
|
-
return ve(n._context) + ".Provider";
|
|
228
|
-
case v:
|
|
229
|
-
return Ve(e, e.render, "ForwardRef");
|
|
230
|
-
case R:
|
|
231
|
-
var s = e.displayName || null;
|
|
232
|
-
return s !== null ? s : P(e.type) || "Memo";
|
|
233
|
-
case C: {
|
|
234
|
-
var f = e, d = f._payload, u = f._init;
|
|
235
|
-
try {
|
|
236
|
-
return P(u(d));
|
|
237
|
-
} catch {
|
|
238
|
-
return null;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
return null;
|
|
243
|
-
}
|
|
244
|
-
var A = Object.assign, $ = 0, pe, ye, me, ge, be, Ee, xe;
|
|
245
|
-
function Re() {
|
|
246
|
-
}
|
|
247
|
-
Re.__reactDisabledLog = !0;
|
|
248
|
-
function ze() {
|
|
249
|
-
{
|
|
250
|
-
if ($ === 0) {
|
|
251
|
-
pe = console.log, ye = console.info, me = console.warn, ge = console.error, be = console.group, Ee = console.groupCollapsed, xe = console.groupEnd;
|
|
252
|
-
var e = {
|
|
253
|
-
configurable: !0,
|
|
254
|
-
enumerable: !0,
|
|
255
|
-
value: Re,
|
|
256
|
-
writable: !0
|
|
257
|
-
};
|
|
258
|
-
Object.defineProperties(console, {
|
|
259
|
-
info: e,
|
|
260
|
-
log: e,
|
|
261
|
-
warn: e,
|
|
262
|
-
error: e,
|
|
263
|
-
group: e,
|
|
264
|
-
groupCollapsed: e,
|
|
265
|
-
groupEnd: e
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
$++;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
function Ue() {
|
|
272
|
-
{
|
|
273
|
-
if ($--, $ === 0) {
|
|
274
|
-
var e = {
|
|
275
|
-
configurable: !0,
|
|
276
|
-
enumerable: !0,
|
|
277
|
-
writable: !0
|
|
278
|
-
};
|
|
279
|
-
Object.defineProperties(console, {
|
|
280
|
-
log: A({}, e, {
|
|
281
|
-
value: pe
|
|
282
|
-
}),
|
|
283
|
-
info: A({}, e, {
|
|
284
|
-
value: ye
|
|
285
|
-
}),
|
|
286
|
-
warn: A({}, e, {
|
|
287
|
-
value: me
|
|
288
|
-
}),
|
|
289
|
-
error: A({}, e, {
|
|
290
|
-
value: ge
|
|
291
|
-
}),
|
|
292
|
-
group: A({}, e, {
|
|
293
|
-
value: be
|
|
294
|
-
}),
|
|
295
|
-
groupCollapsed: A({}, e, {
|
|
296
|
-
value: Ee
|
|
297
|
-
}),
|
|
298
|
-
groupEnd: A({}, e, {
|
|
299
|
-
value: xe
|
|
300
|
-
})
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
$ < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
var re = D.ReactCurrentDispatcher, ne;
|
|
307
|
-
function U(e, t, n) {
|
|
308
|
-
{
|
|
309
|
-
if (ne === void 0)
|
|
310
|
-
try {
|
|
311
|
-
throw Error();
|
|
312
|
-
} catch (f) {
|
|
313
|
-
var s = f.stack.trim().match(/\n( *(at )?)/);
|
|
314
|
-
ne = s && s[1] || "";
|
|
315
|
-
}
|
|
316
|
-
return `
|
|
317
|
-
` + ne + e;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
var ie = !1, J;
|
|
321
|
-
{
|
|
322
|
-
var Je = typeof WeakMap == "function" ? WeakMap : Map;
|
|
323
|
-
J = new Je();
|
|
324
|
-
}
|
|
325
|
-
function Te(e, t) {
|
|
326
|
-
if (!e || ie)
|
|
327
|
-
return "";
|
|
328
|
-
{
|
|
329
|
-
var n = J.get(e);
|
|
330
|
-
if (n !== void 0)
|
|
331
|
-
return n;
|
|
332
|
-
}
|
|
333
|
-
var s;
|
|
334
|
-
ie = !0;
|
|
335
|
-
var f = Error.prepareStackTrace;
|
|
336
|
-
Error.prepareStackTrace = void 0;
|
|
337
|
-
var d;
|
|
338
|
-
d = re.current, re.current = null, ze();
|
|
339
|
-
try {
|
|
340
|
-
if (t) {
|
|
341
|
-
var u = function() {
|
|
342
|
-
throw Error();
|
|
343
|
-
};
|
|
344
|
-
if (Object.defineProperty(u.prototype, "props", {
|
|
345
|
-
set: function() {
|
|
346
|
-
throw Error();
|
|
347
|
-
}
|
|
348
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
349
|
-
try {
|
|
350
|
-
Reflect.construct(u, []);
|
|
351
|
-
} catch (w) {
|
|
352
|
-
s = w;
|
|
353
|
-
}
|
|
354
|
-
Reflect.construct(e, [], u);
|
|
355
|
-
} else {
|
|
356
|
-
try {
|
|
357
|
-
u.call();
|
|
358
|
-
} catch (w) {
|
|
359
|
-
s = w;
|
|
360
|
-
}
|
|
361
|
-
e.call(u.prototype);
|
|
362
|
-
}
|
|
363
|
-
} else {
|
|
364
|
-
try {
|
|
365
|
-
throw Error();
|
|
366
|
-
} catch (w) {
|
|
367
|
-
s = w;
|
|
368
|
-
}
|
|
369
|
-
e();
|
|
370
|
-
}
|
|
371
|
-
} catch (w) {
|
|
372
|
-
if (w && s && typeof w.stack == "string") {
|
|
373
|
-
for (var o = w.stack.split(`
|
|
374
|
-
`), _ = s.stack.split(`
|
|
375
|
-
`), p = o.length - 1, m = _.length - 1; p >= 1 && m >= 0 && o[p] !== _[m]; )
|
|
376
|
-
m--;
|
|
377
|
-
for (; p >= 1 && m >= 0; p--, m--)
|
|
378
|
-
if (o[p] !== _[m]) {
|
|
379
|
-
if (p !== 1 || m !== 1)
|
|
380
|
-
do
|
|
381
|
-
if (p--, m--, m < 0 || o[p] !== _[m]) {
|
|
382
|
-
var k = `
|
|
383
|
-
` + o[p].replace(" at new ", " at ");
|
|
384
|
-
return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && J.set(e, k), k;
|
|
385
|
-
}
|
|
386
|
-
while (p >= 1 && m >= 0);
|
|
387
|
-
break;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
} finally {
|
|
391
|
-
ie = !1, re.current = d, Ue(), Error.prepareStackTrace = f;
|
|
392
|
-
}
|
|
393
|
-
var L = e ? e.displayName || e.name : "", I = L ? U(L) : "";
|
|
394
|
-
return typeof e == "function" && J.set(e, I), I;
|
|
395
|
-
}
|
|
396
|
-
function qe(e, t, n) {
|
|
397
|
-
return Te(e, !1);
|
|
398
|
-
}
|
|
399
|
-
function Ke(e) {
|
|
400
|
-
var t = e.prototype;
|
|
401
|
-
return !!(t && t.isReactComponent);
|
|
402
|
-
}
|
|
403
|
-
function q(e, t, n) {
|
|
404
|
-
if (e == null)
|
|
405
|
-
return "";
|
|
406
|
-
if (typeof e == "function")
|
|
407
|
-
return Te(e, Ke(e));
|
|
408
|
-
if (typeof e == "string")
|
|
409
|
-
return U(e);
|
|
410
|
-
switch (e) {
|
|
411
|
-
case O:
|
|
412
|
-
return U("Suspense");
|
|
413
|
-
case b:
|
|
414
|
-
return U("SuspenseList");
|
|
415
|
-
}
|
|
416
|
-
if (typeof e == "object")
|
|
417
|
-
switch (e.$$typeof) {
|
|
418
|
-
case v:
|
|
419
|
-
return qe(e.render);
|
|
420
|
-
case R:
|
|
421
|
-
return q(e.type, t, n);
|
|
422
|
-
case C: {
|
|
423
|
-
var s = e, f = s._payload, d = s._init;
|
|
424
|
-
try {
|
|
425
|
-
return q(d(f), t, n);
|
|
426
|
-
} catch {
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
return "";
|
|
431
|
-
}
|
|
432
|
-
var N = Object.prototype.hasOwnProperty, _e = {}, we = D.ReactDebugCurrentFrame;
|
|
433
|
-
function K(e) {
|
|
434
|
-
if (e) {
|
|
435
|
-
var t = e._owner, n = q(e.type, e._source, t ? t.type : null);
|
|
436
|
-
we.setExtraStackFrame(n);
|
|
437
|
-
} else
|
|
438
|
-
we.setExtraStackFrame(null);
|
|
439
|
-
}
|
|
440
|
-
function Ge(e, t, n, s, f) {
|
|
441
|
-
{
|
|
442
|
-
var d = Function.call.bind(N);
|
|
443
|
-
for (var u in e)
|
|
444
|
-
if (d(e, u)) {
|
|
445
|
-
var o = void 0;
|
|
446
|
-
try {
|
|
447
|
-
if (typeof e[u] != "function") {
|
|
448
|
-
var _ = Error((s || "React class") + ": " + n + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
449
|
-
throw _.name = "Invariant Violation", _;
|
|
450
|
-
}
|
|
451
|
-
o = e[u](t, u, s, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
452
|
-
} catch (p) {
|
|
453
|
-
o = p;
|
|
454
|
-
}
|
|
455
|
-
o && !(o instanceof Error) && (K(f), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", n, u, typeof o), K(null)), o instanceof Error && !(o.message in _e) && (_e[o.message] = !0, K(f), y("Failed %s type: %s", n, o.message), K(null));
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
var Xe = Array.isArray;
|
|
460
|
-
function ae(e) {
|
|
461
|
-
return Xe(e);
|
|
462
|
-
}
|
|
463
|
-
function He(e) {
|
|
464
|
-
{
|
|
465
|
-
var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
466
|
-
return n;
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
function Ze(e) {
|
|
470
|
-
try {
|
|
471
|
-
return je(e), !1;
|
|
472
|
-
} catch {
|
|
473
|
-
return !0;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
function je(e) {
|
|
477
|
-
return "" + e;
|
|
478
|
-
}
|
|
479
|
-
function Ce(e) {
|
|
480
|
-
if (Ze(e))
|
|
481
|
-
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)), je(e);
|
|
482
|
-
}
|
|
483
|
-
var Y = D.ReactCurrentOwner, Qe = {
|
|
484
|
-
key: !0,
|
|
485
|
-
ref: !0,
|
|
486
|
-
__self: !0,
|
|
487
|
-
__source: !0
|
|
488
|
-
}, Se, ke, se;
|
|
489
|
-
se = {};
|
|
490
|
-
function et(e) {
|
|
491
|
-
if (N.call(e, "ref")) {
|
|
492
|
-
var t = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
493
|
-
if (t && t.isReactWarning)
|
|
494
|
-
return !1;
|
|
495
|
-
}
|
|
496
|
-
return e.ref !== void 0;
|
|
497
|
-
}
|
|
498
|
-
function tt(e) {
|
|
499
|
-
if (N.call(e, "key")) {
|
|
500
|
-
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
501
|
-
if (t && t.isReactWarning)
|
|
502
|
-
return !1;
|
|
503
|
-
}
|
|
504
|
-
return e.key !== void 0;
|
|
505
|
-
}
|
|
506
|
-
function rt(e, t) {
|
|
507
|
-
if (typeof e.ref == "string" && Y.current && t && Y.current.stateNode !== t) {
|
|
508
|
-
var n = P(Y.current.type);
|
|
509
|
-
se[n] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', P(Y.current.type), e.ref), se[n] = !0);
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
function nt(e, t) {
|
|
513
|
-
{
|
|
514
|
-
var n = function() {
|
|
515
|
-
Se || (Se = !0, y("%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://reactjs.org/link/special-props)", t));
|
|
516
|
-
};
|
|
517
|
-
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
518
|
-
get: n,
|
|
519
|
-
configurable: !0
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
function it(e, t) {
|
|
524
|
-
{
|
|
525
|
-
var n = function() {
|
|
526
|
-
ke || (ke = !0, y("%s: `ref` 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://reactjs.org/link/special-props)", t));
|
|
527
|
-
};
|
|
528
|
-
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
529
|
-
get: n,
|
|
530
|
-
configurable: !0
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
var at = function(e, t, n, s, f, d, u) {
|
|
535
|
-
var o = {
|
|
536
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
537
|
-
$$typeof: r,
|
|
538
|
-
// Built-in properties that belong on the element
|
|
539
|
-
type: e,
|
|
540
|
-
key: t,
|
|
541
|
-
ref: n,
|
|
542
|
-
props: u,
|
|
543
|
-
// Record the component responsible for creating this element.
|
|
544
|
-
_owner: d
|
|
545
|
-
};
|
|
546
|
-
return o._store = {}, Object.defineProperty(o._store, "validated", {
|
|
547
|
-
configurable: !1,
|
|
548
|
-
enumerable: !1,
|
|
549
|
-
writable: !0,
|
|
550
|
-
value: !1
|
|
551
|
-
}), Object.defineProperty(o, "_self", {
|
|
552
|
-
configurable: !1,
|
|
553
|
-
enumerable: !1,
|
|
554
|
-
writable: !1,
|
|
555
|
-
value: s
|
|
556
|
-
}), Object.defineProperty(o, "_source", {
|
|
557
|
-
configurable: !1,
|
|
558
|
-
enumerable: !1,
|
|
559
|
-
writable: !1,
|
|
560
|
-
value: f
|
|
561
|
-
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
562
|
-
};
|
|
563
|
-
function st(e, t, n, s, f) {
|
|
564
|
-
{
|
|
565
|
-
var d, u = {}, o = null, _ = null;
|
|
566
|
-
n !== void 0 && (Ce(n), o = "" + n), tt(t) && (Ce(t.key), o = "" + t.key), et(t) && (_ = t.ref, rt(t, f));
|
|
567
|
-
for (d in t)
|
|
568
|
-
N.call(t, d) && !Qe.hasOwnProperty(d) && (u[d] = t[d]);
|
|
569
|
-
if (e && e.defaultProps) {
|
|
570
|
-
var p = e.defaultProps;
|
|
571
|
-
for (d in p)
|
|
572
|
-
u[d] === void 0 && (u[d] = p[d]);
|
|
573
|
-
}
|
|
574
|
-
if (o || _) {
|
|
575
|
-
var m = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
576
|
-
o && nt(u, m), _ && it(u, m);
|
|
577
|
-
}
|
|
578
|
-
return at(e, o, _, f, s, Y.current, u);
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
var oe = D.ReactCurrentOwner, Oe = D.ReactDebugCurrentFrame;
|
|
582
|
-
function M(e) {
|
|
583
|
-
if (e) {
|
|
584
|
-
var t = e._owner, n = q(e.type, e._source, t ? t.type : null);
|
|
585
|
-
Oe.setExtraStackFrame(n);
|
|
586
|
-
} else
|
|
587
|
-
Oe.setExtraStackFrame(null);
|
|
588
|
-
}
|
|
589
|
-
var ue;
|
|
590
|
-
ue = !1;
|
|
591
|
-
function le(e) {
|
|
592
|
-
return typeof e == "object" && e !== null && e.$$typeof === r;
|
|
593
|
-
}
|
|
594
|
-
function Pe() {
|
|
595
|
-
{
|
|
596
|
-
if (oe.current) {
|
|
597
|
-
var e = P(oe.current.type);
|
|
598
|
-
if (e)
|
|
599
|
-
return `
|
|
600
|
-
|
|
601
|
-
Check the render method of \`` + e + "`.";
|
|
602
|
-
}
|
|
603
|
-
return "";
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
function ot(e) {
|
|
607
|
-
{
|
|
608
|
-
if (e !== void 0) {
|
|
609
|
-
var t = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
|
|
610
|
-
return `
|
|
611
|
-
|
|
612
|
-
Check your code at ` + t + ":" + n + ".";
|
|
613
|
-
}
|
|
614
|
-
return "";
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
var De = {};
|
|
618
|
-
function ut(e) {
|
|
619
|
-
{
|
|
620
|
-
var t = Pe();
|
|
621
|
-
if (!t) {
|
|
622
|
-
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
623
|
-
n && (t = `
|
|
624
|
-
|
|
625
|
-
Check the top-level render call using <` + n + ">.");
|
|
626
|
-
}
|
|
627
|
-
return t;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
function Ae(e, t) {
|
|
631
|
-
{
|
|
632
|
-
if (!e._store || e._store.validated || e.key != null)
|
|
633
|
-
return;
|
|
634
|
-
e._store.validated = !0;
|
|
635
|
-
var n = ut(t);
|
|
636
|
-
if (De[n])
|
|
637
|
-
return;
|
|
638
|
-
De[n] = !0;
|
|
639
|
-
var s = "";
|
|
640
|
-
e && e._owner && e._owner !== oe.current && (s = " It was passed a child from " + P(e._owner.type) + "."), M(e), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, s), M(null);
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
function Ie(e, t) {
|
|
644
|
-
{
|
|
645
|
-
if (typeof e != "object")
|
|
646
|
-
return;
|
|
647
|
-
if (ae(e))
|
|
648
|
-
for (var n = 0; n < e.length; n++) {
|
|
649
|
-
var s = e[n];
|
|
650
|
-
le(s) && Ae(s, t);
|
|
651
|
-
}
|
|
652
|
-
else if (le(e))
|
|
653
|
-
e._store && (e._store.validated = !0);
|
|
654
|
-
else if (e) {
|
|
655
|
-
var f = H(e);
|
|
656
|
-
if (typeof f == "function" && f !== e.entries)
|
|
657
|
-
for (var d = f.call(e), u; !(u = d.next()).done; )
|
|
658
|
-
le(u.value) && Ae(u.value, t);
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
function lt(e) {
|
|
663
|
-
{
|
|
664
|
-
var t = e.type;
|
|
665
|
-
if (t == null || typeof t == "string")
|
|
666
|
-
return;
|
|
667
|
-
var n;
|
|
668
|
-
if (typeof t == "function")
|
|
669
|
-
n = t.propTypes;
|
|
670
|
-
else if (typeof t == "object" && (t.$$typeof === v || // Note: Memo only checks outer props here.
|
|
671
|
-
// Inner props are checked in the reconciler.
|
|
672
|
-
t.$$typeof === R))
|
|
673
|
-
n = t.propTypes;
|
|
674
|
-
else
|
|
675
|
-
return;
|
|
676
|
-
if (n) {
|
|
677
|
-
var s = P(t);
|
|
678
|
-
Ge(n, e.props, "prop", s, e);
|
|
679
|
-
} else if (t.PropTypes !== void 0 && !ue) {
|
|
680
|
-
ue = !0;
|
|
681
|
-
var f = P(t);
|
|
682
|
-
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
|
|
683
|
-
}
|
|
684
|
-
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
function ct(e) {
|
|
688
|
-
{
|
|
689
|
-
for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
|
|
690
|
-
var s = t[n];
|
|
691
|
-
if (s !== "children" && s !== "key") {
|
|
692
|
-
M(e), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), M(null);
|
|
693
|
-
break;
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
e.ref !== null && (M(e), y("Invalid attribute `ref` supplied to `React.Fragment`."), M(null));
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
var Me = {};
|
|
700
|
-
function Le(e, t, n, s, f, d) {
|
|
701
|
-
{
|
|
702
|
-
var u = Be(e);
|
|
703
|
-
if (!u) {
|
|
704
|
-
var o = "";
|
|
705
|
-
(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.");
|
|
706
|
-
var _ = ot(f);
|
|
707
|
-
_ ? o += _ : o += Pe();
|
|
708
|
-
var p;
|
|
709
|
-
e === null ? p = "null" : ae(e) ? p = "array" : e !== void 0 && e.$$typeof === r ? (p = "<" + (P(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : p = typeof e, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", p, o);
|
|
710
|
-
}
|
|
711
|
-
var m = st(e, t, n, f, d);
|
|
712
|
-
if (m == null)
|
|
713
|
-
return m;
|
|
714
|
-
if (u) {
|
|
715
|
-
var k = t.children;
|
|
716
|
-
if (k !== void 0)
|
|
717
|
-
if (s)
|
|
718
|
-
if (ae(k)) {
|
|
719
|
-
for (var L = 0; L < k.length; L++)
|
|
720
|
-
Ie(k[L], e);
|
|
721
|
-
Object.freeze && Object.freeze(k);
|
|
722
|
-
} else
|
|
723
|
-
y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
724
|
-
else
|
|
725
|
-
Ie(k, e);
|
|
726
|
-
}
|
|
727
|
-
if (N.call(t, "key")) {
|
|
728
|
-
var I = P(e), w = Object.keys(t).filter(function(yt) {
|
|
729
|
-
return yt !== "key";
|
|
730
|
-
}), ce = w.length > 0 ? "{key: someKey, " + w.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
731
|
-
if (!Me[I + ce]) {
|
|
732
|
-
var pt = w.length > 0 ? "{" + w.join(": ..., ") + ": ...}" : "{}";
|
|
733
|
-
y(`A props object containing a "key" prop is being spread into JSX:
|
|
734
|
-
let props = %s;
|
|
735
|
-
<%s {...props} />
|
|
736
|
-
React keys must be passed directly to JSX without using spread:
|
|
737
|
-
let props = %s;
|
|
738
|
-
<%s key={someKey} {...props} />`, ce, I, pt, I), Me[I + ce] = !0;
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
return e === c ? ct(m) : lt(m), m;
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
function ft(e, t, n) {
|
|
745
|
-
return Le(e, t, n, !0);
|
|
746
|
-
}
|
|
747
|
-
function dt(e, t, n) {
|
|
748
|
-
return Le(e, t, n, !1);
|
|
749
|
-
}
|
|
750
|
-
var ht = dt, vt = ft;
|
|
751
|
-
V.Fragment = c, V.jsx = ht, V.jsxs = vt;
|
|
752
|
-
}()), V;
|
|
753
|
-
}
|
|
754
|
-
process.env.NODE_ENV === "production" ? fe.exports = Et() : fe.exports = xt();
|
|
755
|
-
var l = fe.exports;
|
|
756
|
-
const Rt = () => /* @__PURE__ */ l.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
757
|
-
/* @__PURE__ */ l.jsx("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
|
|
758
|
-
/* @__PURE__ */ l.jsx("polyline", { points: "22 4 12 14.01 9 11.01" })
|
|
759
|
-
] }), Tt = () => /* @__PURE__ */ l.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
760
|
-
/* @__PURE__ */ l.jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
761
|
-
/* @__PURE__ */ l.jsx("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
|
|
762
|
-
/* @__PURE__ */ l.jsx("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
|
|
763
|
-
] }), _t = () => /* @__PURE__ */ l.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
764
|
-
/* @__PURE__ */ l.jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
765
|
-
/* @__PURE__ */ l.jsx("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
766
|
-
/* @__PURE__ */ l.jsx("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
767
|
-
] }), wt = () => /* @__PURE__ */ l.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
768
|
-
/* @__PURE__ */ l.jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
|
|
769
|
-
/* @__PURE__ */ l.jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
770
|
-
/* @__PURE__ */ l.jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
771
|
-
] }), jt = () => /* @__PURE__ */ l.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", className: "aura-spinner", children: /* @__PURE__ */ l.jsx("path", { d: "M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83" }) }), Ct = ({ config: a, index: r = 0, isStacked: i = !1, totalToasts: c = 1, onHeight: E }) => {
|
|
772
|
-
var b, R, C, T;
|
|
773
|
-
const [h, x] = G(!1), g = de.useRef(null);
|
|
774
|
-
Ye(() => {
|
|
775
|
-
g.current && E && E(g.current.getBoundingClientRect().height);
|
|
776
|
-
const S = () => {
|
|
777
|
-
g.current && E && E(g.current.getBoundingClientRect().height);
|
|
111
|
+
dismiss: (s) => n.dismiss(s),
|
|
112
|
+
pause: () => n.pause(),
|
|
113
|
+
resume: () => n.resume()
|
|
114
|
+
}, R = () => /* @__PURE__ */ d("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
115
|
+
/* @__PURE__ */ i("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
|
|
116
|
+
/* @__PURE__ */ i("polyline", { points: "22 4 12 14.01 9 11.01" })
|
|
117
|
+
] }), A = () => /* @__PURE__ */ d("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
118
|
+
/* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "10" }),
|
|
119
|
+
/* @__PURE__ */ i("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
|
|
120
|
+
/* @__PURE__ */ i("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
|
|
121
|
+
] }), Y = () => /* @__PURE__ */ d("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
122
|
+
/* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "10" }),
|
|
123
|
+
/* @__PURE__ */ i("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
124
|
+
/* @__PURE__ */ i("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
125
|
+
] }), O = () => /* @__PURE__ */ d("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
126
|
+
/* @__PURE__ */ i("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
|
|
127
|
+
/* @__PURE__ */ i("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
128
|
+
/* @__PURE__ */ i("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
129
|
+
] }), H = () => /* @__PURE__ */ i("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", className: "aura-spinner", children: /* @__PURE__ */ i("path", { d: "M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83" }) }), P = ({ config: s, index: t = 0, isStacked: e = !1, totalToasts: r = 1, onHeight: a }) => {
|
|
130
|
+
var w, p, T, c;
|
|
131
|
+
const [o, l] = x(!1), h = W.useRef(null);
|
|
132
|
+
L(() => {
|
|
133
|
+
h.current && a && a(h.current.getBoundingClientRect().height);
|
|
134
|
+
const u = () => {
|
|
135
|
+
h.current && a && a(h.current.getBoundingClientRect().height);
|
|
778
136
|
};
|
|
779
|
-
return window.addEventListener("resize",
|
|
780
|
-
}, [
|
|
781
|
-
const
|
|
782
|
-
|
|
783
|
-
|
|
137
|
+
return window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
|
|
138
|
+
}, [s.title, s.description, a]);
|
|
139
|
+
const y = () => {
|
|
140
|
+
l(!0), setTimeout(() => {
|
|
141
|
+
n.dismiss(s.id);
|
|
784
142
|
}, 300);
|
|
785
|
-
},
|
|
786
|
-
success:
|
|
787
|
-
error:
|
|
788
|
-
info:
|
|
789
|
-
warning:
|
|
790
|
-
loading:
|
|
791
|
-
}[
|
|
792
|
-
return /* @__PURE__ */
|
|
143
|
+
}, f = {
|
|
144
|
+
success: R,
|
|
145
|
+
error: A,
|
|
146
|
+
info: Y,
|
|
147
|
+
warning: O,
|
|
148
|
+
loading: H
|
|
149
|
+
}[s.type || "info"];
|
|
150
|
+
return /* @__PURE__ */ d(
|
|
793
151
|
"div",
|
|
794
152
|
{
|
|
795
|
-
ref:
|
|
796
|
-
className: `aura-toast ${
|
|
797
|
-
onMouseEnter: () =>
|
|
798
|
-
onMouseLeave: () =>
|
|
153
|
+
ref: h,
|
|
154
|
+
className: `aura-toast ${s.type || "info"} ${s.glassy !== !1 ? "aura-toast-glassy" : ""} ${o ? "aura-toast-exit" : "aura-toast-enter"} ${s.className || ""}`,
|
|
155
|
+
onMouseEnter: () => C.pause(),
|
|
156
|
+
onMouseLeave: () => C.resume(),
|
|
799
157
|
style: {
|
|
800
|
-
...
|
|
801
|
-
...(
|
|
802
|
-
...(
|
|
803
|
-
...(
|
|
804
|
-
...(
|
|
158
|
+
...s.style,
|
|
159
|
+
...(w = s.style) != null && w["--type-color"] ? { "--type-color": s.style["--type-color"] } : {},
|
|
160
|
+
...(p = s.style) != null && p["--type-glow"] ? { "--type-glow": s.style["--type-glow"] } : {},
|
|
161
|
+
...(T = s.style) != null && T["--toast-font-size-title"] ? { "--toast-font-size-title": s.style["--toast-font-size-title"] } : {},
|
|
162
|
+
...(c = s.style) != null && c["--toast-font-size-desc"] ? { "--toast-font-size-desc": s.style["--toast-font-size-desc"] } : {}
|
|
805
163
|
},
|
|
806
164
|
children: [
|
|
807
|
-
/* @__PURE__ */
|
|
808
|
-
/* @__PURE__ */
|
|
809
|
-
|
|
810
|
-
|
|
165
|
+
/* @__PURE__ */ i("div", { className: "aura-icon-container", children: /* @__PURE__ */ i("div", { className: "aura-icon", children: /* @__PURE__ */ i(f, {}) }) }),
|
|
166
|
+
/* @__PURE__ */ d("div", { className: "aura-content", children: [
|
|
167
|
+
s.title && /* @__PURE__ */ i("p", { className: "aura-title", children: s.title }),
|
|
168
|
+
s.description && /* @__PURE__ */ i("p", { className: "aura-description", children: s.description })
|
|
811
169
|
] }),
|
|
812
|
-
|
|
813
|
-
var
|
|
814
|
-
(
|
|
815
|
-
}, children:
|
|
816
|
-
/* @__PURE__ */
|
|
817
|
-
/* @__PURE__ */
|
|
818
|
-
/* @__PURE__ */
|
|
170
|
+
s.action && /* @__PURE__ */ i("div", { className: "aura-action-container", children: /* @__PURE__ */ i("button", { className: "aura-action", onClick: () => {
|
|
171
|
+
var u;
|
|
172
|
+
(u = s.action) == null || u.onClick(), y();
|
|
173
|
+
}, children: s.action.label }) }),
|
|
174
|
+
/* @__PURE__ */ i("button", { className: "aura-close", onClick: y, "aria-label": "Close", children: /* @__PURE__ */ d("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
175
|
+
/* @__PURE__ */ i("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
176
|
+
/* @__PURE__ */ i("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
819
177
|
] }) })
|
|
820
178
|
]
|
|
821
179
|
}
|
|
822
180
|
);
|
|
823
181
|
};
|
|
824
|
-
const
|
|
825
|
-
const [
|
|
826
|
-
|
|
827
|
-
|
|
182
|
+
const q = ({ children: s, className: t, stack: e = !1 }) => {
|
|
183
|
+
const [r, a] = x([]), [o, l] = x({}), [h, y] = x(!1);
|
|
184
|
+
L(() => n.subscribe((c) => {
|
|
185
|
+
a(c || []);
|
|
828
186
|
}), []);
|
|
829
|
-
const
|
|
830
|
-
let
|
|
831
|
-
return /* @__PURE__ */
|
|
832
|
-
|
|
833
|
-
/* @__PURE__ */
|
|
187
|
+
const f = e ? r : r.slice(0, 1), w = r.length > 0 && r[0].position || "top-right", p = w.startsWith("top");
|
|
188
|
+
let T = 0;
|
|
189
|
+
return /* @__PURE__ */ d("div", { className: t, children: [
|
|
190
|
+
s,
|
|
191
|
+
/* @__PURE__ */ i(
|
|
834
192
|
"div",
|
|
835
193
|
{
|
|
836
|
-
className: `aura-container ${
|
|
837
|
-
"data-stack":
|
|
838
|
-
onMouseEnter: () =>
|
|
839
|
-
onMouseLeave: () =>
|
|
840
|
-
children:
|
|
841
|
-
const
|
|
842
|
-
|
|
843
|
-
const
|
|
844
|
-
let
|
|
845
|
-
|
|
846
|
-
const
|
|
847
|
-
return /* @__PURE__ */
|
|
194
|
+
className: `aura-container ${w}`,
|
|
195
|
+
"data-stack": e,
|
|
196
|
+
onMouseEnter: () => y(!0),
|
|
197
|
+
onMouseLeave: () => y(!1),
|
|
198
|
+
children: f.map((c, u) => {
|
|
199
|
+
const D = o[c.id] || 80, b = T;
|
|
200
|
+
T += D + 16;
|
|
201
|
+
const E = u * 16;
|
|
202
|
+
let v = 0;
|
|
203
|
+
e && (v = h ? b : E);
|
|
204
|
+
const N = p ? v : -v, z = e && !h ? Math.max(0, 1 - u * 0.03) : 1, S = 100 - u, I = e && !h && u > 3 ? 0 : 1;
|
|
205
|
+
return /* @__PURE__ */ i(
|
|
848
206
|
"div",
|
|
849
207
|
{
|
|
850
208
|
className: "aura-toast-wrapper",
|
|
851
209
|
style: {
|
|
852
|
-
gridArea:
|
|
853
|
-
zIndex:
|
|
854
|
-
transform: `translateY(${
|
|
855
|
-
transformOrigin:
|
|
856
|
-
opacity:
|
|
210
|
+
gridArea: e ? "1 / 1" : "auto",
|
|
211
|
+
zIndex: S,
|
|
212
|
+
transform: `translateY(${N}px) scale(${z})`,
|
|
213
|
+
transformOrigin: p ? "top center" : "bottom center",
|
|
214
|
+
opacity: I,
|
|
857
215
|
transition: "all 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28)",
|
|
858
216
|
pointerEvents: "auto",
|
|
859
|
-
paddingBottom:
|
|
860
|
-
paddingTop:
|
|
217
|
+
paddingBottom: h && e && p ? "16px" : "0",
|
|
218
|
+
paddingTop: h && e && !p ? "16px" : "0"
|
|
861
219
|
},
|
|
862
|
-
children: /* @__PURE__ */
|
|
863
|
-
|
|
220
|
+
children: /* @__PURE__ */ i(
|
|
221
|
+
P,
|
|
864
222
|
{
|
|
865
|
-
config:
|
|
866
|
-
isStacked:
|
|
867
|
-
onHeight: (
|
|
868
|
-
|
|
223
|
+
config: c,
|
|
224
|
+
isStacked: e,
|
|
225
|
+
onHeight: (k) => {
|
|
226
|
+
l((g) => g[c.id] === k ? g : { ...g, [c.id]: k });
|
|
869
227
|
}
|
|
870
228
|
}
|
|
871
229
|
)
|
|
872
230
|
},
|
|
873
|
-
|
|
231
|
+
c.id
|
|
874
232
|
);
|
|
875
233
|
})
|
|
876
234
|
}
|
|
@@ -878,8 +236,8 @@ const Ot = ({ children: a, className: r, stack: i = !1 }) => {
|
|
|
878
236
|
] });
|
|
879
237
|
};
|
|
880
238
|
export {
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
239
|
+
q as AuraProvider,
|
|
240
|
+
P as AuraToast,
|
|
241
|
+
C as auraToast,
|
|
242
|
+
n as toastStore
|
|
885
243
|
};
|
package/dist/index.d.ts
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as React } from '
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
|
|
3
3
|
export type ToastType = 'success' | 'error' | 'info' | 'warning' | 'loading';
|
|
4
4
|
export type ToastPosition = 'top-right' | 'top-left' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aura-toast",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"homepage": "https://damicode18.github.io/aura-toast/",
|
|
5
5
|
"description": "Premium React toast notifications with glassmorphism design. Lightweight, customizable, and enforces a single-toast constraint for clean UI.",
|
|
6
6
|
"main": "dist/aura-toast.cjs.js",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"@testing-library/jest-dom": "^6.9.1",
|
|
49
49
|
"@testing-library/react": "^16.3.2",
|
|
50
50
|
"@types/node": "^20.0.0",
|
|
51
|
-
"@types/react": "^
|
|
52
|
-
"@types/react-dom": "^
|
|
51
|
+
"@types/react": "^19.1.12",
|
|
52
|
+
"@types/react-dom": "^19.1.9",
|
|
53
53
|
"@vitejs/plugin-react": "^4.0.0",
|
|
54
54
|
"@vitest/ui": "^4.1.0",
|
|
55
55
|
"gh-pages": "^6.3.0",
|
|
56
56
|
"jsdom": "^28.1.0",
|
|
57
|
-
"react": "^
|
|
58
|
-
"react-dom": "^
|
|
57
|
+
"react": "^19.2.0",
|
|
58
|
+
"react-dom": "^19.2.0",
|
|
59
59
|
"tsc-alias": "^1.8.0",
|
|
60
60
|
"typescript": "^5.0.0",
|
|
61
61
|
"vite": "^4.4.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"vitest": "^4.1.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"react": "^18.2.0",
|
|
67
|
-
"react-dom": "^18.2.0"
|
|
66
|
+
"react": "^18.2.0 || ^19.0.0",
|
|
67
|
+
"react-dom": "^18.2.0 || ^19.0.0"
|
|
68
68
|
}
|
|
69
69
|
}
|