aura-toast 1.4.0 → 1.5.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/README.md CHANGED
@@ -43,16 +43,20 @@ bun add aura-toast
43
43
 
44
44
  ## Quick Start (React)
45
45
 
46
- 1. Import the styles in your main entry file (e.g., `main.tsx` or `App.tsx`):
46
+ 1. Import the styles and the provider in your main entry file (e.g., `main.tsx` or `App.tsx`):
47
47
 
48
48
  ```tsx
49
+ import { AuraProvider } from 'aura-toast';
49
50
  import 'aura-toast/dist/style.css';
50
- ```
51
51
 
52
- 2. Wrap your application with `AuraProvider`:
53
-
54
- ```tsx
55
- import { AuraProvider } from 'aura-toast';
52
+ // Wrap your app. Optionally pass stack={true} to allow multiple layered toasts.
53
+ function App() {
54
+ return (
55
+ <AuraProvider stack={true}>
56
+ <YourApp />
57
+ </AuraProvider>
58
+ );
59
+ }
56
60
  ```
57
61
 
58
62
  ## Live Demo
@@ -60,7 +64,7 @@ import { AuraProvider } from 'aura-toast';
60
64
  Check out the interactive showcase: [Live Demo Link (GitHub Pages/Vercel)]
61
65
 
62
66
  > [!TIP]
63
- > **Single Toast Policy**: AuraToast is designed for focus. Each new toast replaces the previous one with a smooth transition, preventing UI clutter.
67
+ > **Layout Modes**: AuraToast defaults to a single-toast focused mode. Each new toast elegantly replaces the previous one. If you prefer keeping history on screen, simply pass `stack={true}` to your `<AuraProvider>` to enable a beautiful layered card stack!
64
68
 
65
69
  2. Trigger toasts using the `auraToast` object:
66
70
 
@@ -69,12 +73,19 @@ import { auraToast } from 'aura-toast';
69
73
 
70
74
  function MyComponent() {
71
75
  const handleClick = () => {
76
+ // You can pass a string title and a config object:
72
77
  auraToast.success('Changes saved successfully!', {
78
+ description: 'Your database has been updated.',
73
79
  action: {
74
80
  label: 'Undo',
75
81
  onClick: () => console.log('Undo clicked'),
76
82
  }
77
83
  });
84
+
85
+ // Or pass just a config object natively (Title is completely optional!)
86
+ auraToast.info({
87
+ description: 'System maintenance scheduled for 3AM.'
88
+ });
78
89
  };
79
90
 
80
91
  return <button onClick={handleClick}>Save</button>;
@@ -92,42 +103,48 @@ import { auraToast, toastStore } from 'aura-toast';
92
103
  import 'aura-toast/dist/style.css';
93
104
 
94
105
  // 1. Subscribe to the store to handle rendering
95
- toastStore.subscribe((config) => {
96
- if (config) {
97
- // Render your own toast UI or use the provided CSS classes
98
- console.log('Show toast:', config.message);
106
+ toastStore.subscribe((state) => {
107
+ // state is an array of ToastConfig objects
108
+ if (state.length > 0) {
109
+ console.log('Active toasts:', state);
99
110
  } else {
100
- // Hide toast
101
- console.log('Hide toast');
111
+ console.log('No active toasts');
102
112
  }
103
113
  });
104
114
 
105
115
  // 2. Trigger toasts as usual
106
- auraToast.success('Works in Vanilla JS too!');
116
+ auraToast.success({ title: 'Works in Vanilla JS too!' });
107
117
  ```
108
118
 
109
119
  ## API
110
120
 
111
- ### `auraToast.success(message, config?)`
112
- ### `auraToast.error(message, config?)`
113
- ### `auraToast.info(message, config?)`
114
- ### `auraToast.warning(message, config?)`
115
- ### `auraToast.dismiss()`
121
+ ### `auraToast.success(titleOrConfig, config?)`
122
+ ### `auraToast.error(titleOrConfig, config?)`
123
+ ### `auraToast.info(titleOrConfig, config?)`
124
+ ### `auraToast.warning(titleOrConfig, config?)`
125
+ ### `auraToast.promise(promise, { loading, success, error }, config?)`
126
+ ### `auraToast.dismiss(id?)`
116
127
 
117
128
  #### Configuration Object
118
129
  | Property | Type | Description |
119
130
  | --- | --- | --- |
120
- | `duration` | `number` | Time in ms before auto-dismiss (default: 4000). Set to `0` for **sticky** toasts (remains until replaced or manual dismiss). |
131
+ | `title` | ` ReactNode` | The main title of the toast. |
132
+ | `description` | `ReactNode` | Smaller subtitle text below the title. |
133
+ | `duration` | `number` | Time in ms before auto-dismiss (default: 4000). Set to `0` for **sticky** toasts. |
134
+ | `position` | `ToastPosition` | E.g. `'top-right'`, `'bottom-center'`. |
121
135
  | `action` | `{ label: string, onClick: () => void }` | Optional action button. |
136
+ | `glassy` | `boolean` | Enable or disable premium backdrop-blur effects. |
122
137
 
123
138
  ## Customization
124
139
 
125
- You can override the default styles by providing values for these CSS variables:
140
+ You can override the default styles and typography by providing values for these CSS variables natively in your app or within the `style` prop of a specific toast:
126
141
 
127
142
  ```css
128
143
  :root {
129
144
  --aura-bg: rgba(17, 25, 40, 0.75);
130
145
  --aura-success: #10b981;
146
+ --toast-font-size-title: 0.875rem;
147
+ --toast-font-size-desc: 0.75rem;
131
148
  /* ... see aura-toast.css for more */
132
149
  }
133
150
  ```
@@ -1,4 +1,4 @@
1
- "use strict";var pr=Object.defineProperty;var mr=(i,n,f)=>n in i?pr(i,n,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[n]=f;var F=(i,n,f)=>(mr(i,typeof n!="symbol"?n+"":n,f),f);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("./react");class yr{constructor(){F(this,"state",null);F(this,"listeners",new Set);F(this,"timeoutId",null);F(this,"startTime",null);F(this,"remainingDuration",null)}getState(){return this.state}subscribe(n){return this.listeners.add(n),()=>this.listeners.delete(n)}notify(){this.listeners.forEach(n=>n(this.state))}isDuplicate(n){return this.state?this.state.message===n.message&&(this.state.type||"info")===(n.type||"info")&&this.state.description===n.description&&this.state.glassy===n.glassy:!1}show(n){if(this.isDuplicate(n)){const x=n.duration??4e3;x>0&&(this.startTime=Date.now(),this.remainingDuration=x,this.startTimer(x));return}this.dismiss();const f=n.id||Math.random().toString(36).substring(2,9),h=n.duration??4e3;this.state={...n,id:f,type:n.type||"info",duration:h},this.notify(),h>0&&(this.startTime=Date.now(),this.remainingDuration=h,this.startTimer(h))}startTimer(n){this.timeoutId&&clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.dismiss()},n)}pause(){if(!this.state||!this.timeoutId||!this.startTime)return;clearTimeout(this.timeoutId),this.timeoutId=null;const n=Date.now()-this.startTime;this.remainingDuration=Math.max(0,(this.remainingDuration||0)-n),this.startTime=null}resume(){!this.state||this.timeoutId||this.remainingDuration===null||this.remainingDuration<=0||(this.startTime=Date.now(),this.startTimer(this.remainingDuration))}dismiss(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.state=null,this.startTime=null,this.remainingDuration=null,this.notify()}}const E=new yr,te={success:(i,n)=>E.show({...n,message:i,type:"success"}),error:(i,n)=>E.show({...n,message:i,type:"error"}),info:(i,n)=>E.show({...n,message:i,type:"info"}),warning:(i,n)=>E.show({...n,message:i,type:"warning"}),promise:(i,n,f)=>(E.show({...f,message:n.loading,type:"loading",duration:0}),i.then(()=>{E.show({...f,message:n.success,type:"success"})}).catch(()=>{E.show({...f,message:n.error,type:"error"})}),i),dismiss:()=>E.dismiss(),pause:()=>E.pause(),resume:()=>E.resume()};var ne={exports:{}},$={};/**
1
+ "use strict";var yt=Object.defineProperty;var mt=(a,r,i)=>r in a?yt(a,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[r]=i;var W=(a,r,i)=>(mt(a,typeof r!="symbol"?r+"":r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./react"),Fe=5;class gt{constructor(){W(this,"state",[]);W(this,"listeners",new Set);W(this,"timeouts",new Map);W(this,"startTimes",new Map);W(this,"remainingDurations",new Map)}getState(){return this.state}subscribe(r){return this.listeners.add(r),()=>this.listeners.delete(r)}notify(){this.listeners.forEach(r=>r(this.state))}isDuplicate(r){return this.state.some(i=>i.title===r.title&&(i.type||"info")===(r.type||"info")&&i.description===r.description&&i.glassy===r.glassy)}show(r){if(this.isDuplicate(r)){const h=this.state.find(x=>x.title===r.title&&(x.type||"info")===(r.type||"info")&&x.description===r.description&&x.glassy===r.glassy);if(h&&h.id){const x=r.duration??4e3;x>0&&(this.startTimes.set(h.id,Date.now()),this.remainingDurations.set(h.id,x),this.startTimer(h.id,x))}return}const i=r.id||Math.random().toString(36).substring(2,9),c=r.duration??4e3,E={...r,id:i,type:r.type||"info",duration:c};if(this.state=[E,...this.state],this.state.length>Fe){const h=this.state[this.state.length-1];h&&h.id&&this.clearTimerData(h.id),this.state=this.state.slice(0,Fe)}this.notify(),c>0&&(this.startTimes.set(i,Date.now()),this.remainingDurations.set(i,c),this.startTimer(i,c))}startTimer(r,i){this.timeouts.has(r)&&clearTimeout(this.timeouts.get(r));const c=setTimeout(()=>{this.dismiss(r)},i);this.timeouts.set(r,c)}clearTimerData(r){this.timeouts.has(r)&&(clearTimeout(this.timeouts.get(r)),this.timeouts.delete(r)),this.startTimes.delete(r),this.remainingDurations.delete(r)}pause(){this.state.forEach(r=>{const i=r.id;if(this.timeouts.has(i)&&this.startTimes.has(i)){clearTimeout(this.timeouts.get(i)),this.timeouts.delete(i);const c=this.startTimes.get(i),E=Date.now()-c,h=this.remainingDurations.get(i)||0;this.remainingDurations.set(i,Math.max(0,h-E)),this.startTimes.delete(i)}})}resume(){this.state.forEach(r=>{const i=r.id,c=this.remainingDurations.get(i);!this.timeouts.has(i)&&c!==void 0&&c>0&&(this.startTimes.set(i,Date.now()),this.startTimer(i,c))})}dismiss(r){r?(this.clearTimerData(r),this.state=this.state.filter(i=>i.id!==r)):(this.timeouts.forEach(i=>clearTimeout(i)),this.timeouts.clear(),this.startTimes.clear(),this.remainingDurations.clear(),this.state=[]),this.notify()}}const w=new gt,fe={success:(a,r)=>{const i=typeof a=="string"?{...r,title:a}:{...r,...a};return w.show({...i,type:"success"})},error:(a,r)=>{const i=typeof a=="string"?{...r,title:a}:{...r,...a};return w.show({...i,type:"error"})},info:(a,r)=>{const i=typeof a=="string"?{...r,title:a}:{...r,...a};return w.show({...i,type:"info"})},warning:(a,r)=>{const i=typeof a=="string"?{...r,title:a}:{...r,...a};return w.show({...i,type:"warning"})},promise:(a,r,i)=>{const c=(i==null?void 0:i.id)||Math.random().toString(36).substring(2,9),E=typeof r.loading=="string"?{...i,title:r.loading}:{...i,...r.loading};return w.show({...E,id:c,type:"loading",duration:0}),a.then(()=>{w.dismiss(c);const h=typeof r.success=="string"?{...i,title:r.success}:{...i,...r.success};w.show({...h,id:c,type:"success"})}).catch(()=>{w.dismiss(c);const h=typeof r.error=="string"?{...i,title:r.error}:{...i,...r.error};w.show({...h,id:c,type:"error"})}),a},dismiss:a=>w.dismiss(a),pause:()=>w.pause(),resume:()=>w.resume()};var de={exports:{}},V={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.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 Ce;function gr(){if(Ce)return $;Ce=1;var i=Y,n=Symbol.for("react.element"),f=Symbol.for("react.fragment"),h=Object.prototype.hasOwnProperty,x=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,k={key:!0,ref:!0,__self:!0,__source:!0};function w(_,m,P){var b,j={},S=null,V=null;P!==void 0&&(S=""+P),m.key!==void 0&&(S=""+m.key),m.ref!==void 0&&(V=m.ref);for(b in m)h.call(m,b)&&!k.hasOwnProperty(b)&&(j[b]=m[b]);if(_&&_.defaultProps)for(b in m=_.defaultProps,m)j[b]===void 0&&(j[b]=m[b]);return{$$typeof:n,type:_,key:S,ref:V,props:j,_owner:x.current}}return $.Fragment=f,$.jsx=w,$.jsxs=w,$}var N={};/**
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
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,19 +14,19 @@
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 Oe;function br(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&function(){var i=Y,n=Symbol.for("react.element"),f=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),_=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),ae=Symbol.iterator,De="@@iterator";function Ie(e){if(e===null||typeof e!="object")return null;var r=ae&&e[ae]||e[De];return typeof r=="function"?r:null}var D=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];Ae("error",e,t)}}function Ae(e,r,t){{var a=D.ReactDebugCurrentFrame,l=a.getStackAddendum();l!==""&&(r+="%s",t=t.concat([l]));var c=t.map(function(o){return String(o)});c.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,c)}}var Fe=!1,Le=!1,We=!1,Me=!1,$e=!1,ie;ie=Symbol.for("react.module.reference");function Ne(e){return!!(typeof e=="string"||typeof e=="function"||e===h||e===k||$e||e===x||e===P||e===b||Me||e===V||Fe||Le||We||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===j||e.$$typeof===w||e.$$typeof===_||e.$$typeof===m||e.$$typeof===ie||e.getModuleId!==void 0))}function Ye(e,r,t){var a=e.displayName;if(a)return a;var l=r.displayName||r.name||"";return l!==""?t+"("+l+")":t}function se(e){return e.displayName||"Context"}function T(e){if(e==null)return null;if(typeof e.tag=="number"&&p("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 h:return"Fragment";case f:return"Portal";case k:return"Profiler";case x:return"StrictMode";case P:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _:var r=e;return se(r)+".Consumer";case w:var t=e;return se(t._context)+".Provider";case m:return Ye(e,e.render,"ForwardRef");case j:var a=e.displayName||null;return a!==null?a:T(e.type)||"Memo";case S:{var l=e,c=l._payload,o=l._init;try{return T(o(c))}catch{return null}}}return null}var C=Object.assign,L=0,oe,ue,le,ce,fe,de,ve;function he(){}he.__reactDisabledLog=!0;function Ve(){{if(L===0){oe=console.log,ue=console.info,le=console.warn,ce=console.error,fe=console.group,de=console.groupCollapsed,ve=console.groupEnd;var e={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}L++}}function Ue(){{if(L--,L===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:C({},e,{value:oe}),info:C({},e,{value:ue}),warn:C({},e,{value:le}),error:C({},e,{value:ce}),group:C({},e,{value:fe}),groupCollapsed:C({},e,{value:de}),groupEnd:C({},e,{value:ve})})}L<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=D.ReactCurrentDispatcher,z;function U(e,r,t){{if(z===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);z=a&&a[1]||""}return`
18
- `+z+e}}var G=!1,B;{var Be=typeof WeakMap=="function"?WeakMap:Map;B=new Be}function pe(e,r){if(!e||G)return"";{var t=B.get(e);if(t!==void 0)return t}var a;G=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=K.current,K.current=null,Ve();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(g){a=g}Reflect.construct(e,[],o)}else{try{o.call()}catch(g){a=g}e.call(o.prototype)}}else{try{throw Error()}catch(g){a=g}e()}}catch(g){if(g&&a&&typeof g.stack=="string"){for(var s=g.stack.split(`
19
- `),y=a.stack.split(`
20
- `),d=s.length-1,v=y.length-1;d>=1&&v>=0&&s[d]!==y[v];)v--;for(;d>=1&&v>=0;d--,v--)if(s[d]!==y[v]){if(d!==1||v!==1)do if(d--,v--,v<0||s[d]!==y[v]){var R=`
21
- `+s[d].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),typeof e=="function"&&B.set(e,R),R}while(d>=1&&v>=0);break}}}finally{G=!1,K.current=c,Ue(),Error.prepareStackTrace=l}var A=e?e.displayName||e.name:"",O=A?U(A):"";return typeof e=="function"&&B.set(e,O),O}function qe(e,r,t){return pe(e,!1)}function Je(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function q(e,r,t){if(e==null)return"";if(typeof e=="function")return pe(e,Je(e));if(typeof e=="string")return U(e);switch(e){case P:return U("Suspense");case b:return U("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case m:return qe(e.render);case j:return q(e.type,r,t);case S:{var a=e,l=a._payload,c=a._init;try{return q(c(l),r,t)}catch{}}}return""}var W=Object.prototype.hasOwnProperty,me={},ye=D.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=q(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}function Ke(e,r,t,a,l){{var c=Function.call.bind(W);for(var o in e)if(c(e,o)){var s=void 0;try{if(typeof e[o]!="function"){var y=Error((a||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw y.name="Invariant Violation",y}s=e[o](r,o,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d){s=d}s&&!(s instanceof Error)&&(J(l),p("%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).",a||"React class",t,o,typeof s),J(null)),s instanceof Error&&!(s.message in me)&&(me[s.message]=!0,J(l),p("Failed %s type: %s",t,s.message),J(null))}}}var ze=Array.isArray;function X(e){return ze(e)}function Ge(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Xe(e){try{return ge(e),!1}catch{return!0}}function ge(e){return""+e}function be(e){if(Xe(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ge(e)),ge(e)}var M=D.ReactCurrentOwner,He={key:!0,ref:!0,__self:!0,__source:!0},Ee,xe,H;H={};function Ze(e){if(W.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Qe(e){if(W.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function er(e,r){if(typeof e.ref=="string"&&M.current&&r&&M.current.stateNode!==r){var t=T(M.current.type);H[t]||(p('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',T(M.current.type),e.ref),H[t]=!0)}}function rr(e,r){{var t=function(){Ee||(Ee=!0,p("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function tr(e,r){{var t=function(){xe||(xe=!0,p("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var nr=function(e,r,t,a,l,c,o){var s={$$typeof:n,type:e,key:r,ref:t,props:o,_owner:c};return s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:l}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function ar(e,r,t,a,l){{var c,o={},s=null,y=null;t!==void 0&&(be(t),s=""+t),Qe(r)&&(be(r.key),s=""+r.key),Ze(r)&&(y=r.ref,er(r,l));for(c in r)W.call(r,c)&&!He.hasOwnProperty(c)&&(o[c]=r[c]);if(e&&e.defaultProps){var d=e.defaultProps;for(c in d)o[c]===void 0&&(o[c]=d[c])}if(s||y){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;s&&rr(o,v),y&&tr(o,v)}return nr(e,s,y,l,a,M.current,o)}}var Z=D.ReactCurrentOwner,Re=D.ReactDebugCurrentFrame;function I(e){if(e){var r=e._owner,t=q(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(t)}else Re.setExtraStackFrame(null)}var Q;Q=!1;function ee(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function _e(){{if(Z.current){var e=T(Z.current.type);if(e)return`
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
22
 
23
- Check the render method of \``+e+"`."}return""}}function ir(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
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
24
 
25
- Check your code at `+r+":"+t+"."}return""}}var Te={};function sr(e){{var r=_e();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
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
26
 
27
- Check the top-level render call using <`+t+">.")}return r}}function je(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=sr(r);if(Te[t])return;Te[t]=!0;var a="";e&&e._owner&&e._owner!==Z.current&&(a=" It was passed a child from "+T(e._owner.type)+"."),I(e),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),I(null)}}function we(e,r){{if(typeof e!="object")return;if(X(e))for(var t=0;t<e.length;t++){var a=e[t];ee(a)&&je(a,r)}else if(ee(e))e._store&&(e._store.validated=!0);else if(e){var l=Ie(e);if(typeof l=="function"&&l!==e.entries)for(var c=l.call(e),o;!(o=c.next()).done;)ee(o.value)&&je(o.value,r)}}}function or(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===m||r.$$typeof===j))t=r.propTypes;else return;if(t){var a=T(r);Ke(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var l=T(r);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",l||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ur(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){I(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),I(null);break}}e.ref!==null&&(I(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}}var ke={};function Se(e,r,t,a,l,c){{var o=Ne(e);if(!o){var s="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(s+=" 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 y=ir(l);y?s+=y:s+=_e();var d;e===null?d="null":X(e)?d="array":e!==void 0&&e.$$typeof===n?(d="<"+(T(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):d=typeof e,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",d,s)}var v=ar(e,r,t,l,c);if(v==null)return v;if(o){var R=r.children;if(R!==void 0)if(a)if(X(R)){for(var A=0;A<R.length;A++)we(R[A],e);Object.freeze&&Object.freeze(R)}else p("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 we(R,e)}if(W.call(r,"key")){var O=T(e),g=Object.keys(r).filter(function(hr){return hr!=="key"}),re=g.length>0?"{key: someKey, "+g.join(": ..., ")+": ...}":"{key: someKey}";if(!ke[O+re]){var vr=g.length>0?"{"+g.join(": ..., ")+": ...}":"{}";p(`A props object containing a "key" prop is being spread into JSX:
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
28
  let props = %s;
29
29
  <%s {...props} />
30
30
  React keys must be passed directly to JSX without using spread:
31
31
  let props = %s;
32
- <%s key={someKey} {...props} />`,re,O,vr,O),ke[O+re]=!0}}return e===h?ur(v):or(v),v}}function lr(e,r,t){return Se(e,r,t,!0)}function cr(e,r,t){return Se(e,r,t,!1)}var fr=cr,dr=lr;N.Fragment=h,N.jsx=fr,N.jsxs=dr}()),N}process.env.NODE_ENV==="production"?ne.exports=gr():ne.exports=br();var u=ne.exports;const Er=()=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[u.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),u.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),xr=()=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[u.jsx("circle",{cx:"12",cy:"12",r:"10"}),u.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),u.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),Rr=()=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[u.jsx("circle",{cx:"12",cy:"12",r:"10"}),u.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),u.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),_r=()=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[u.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"}),u.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),u.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),Tr=()=>u.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:u.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"})}),Pe=({config:i})=>{var k,w;const[n,f]=Y.useState(!1),h=()=>{f(!0),setTimeout(()=>{E.dismiss()},300)},x={success:Er,error:xr,info:Rr,warning:_r,loading:Tr}[i.type||"info"];return u.jsxs("div",{className:`aura-toast ${i.type||"info"} ${i.glassy!==!1?"aura-toast-glassy":""} ${n?"aura-toast-exit":"aura-toast-enter"} ${i.className||""}`,onMouseEnter:()=>te.pause(),onMouseLeave:()=>te.resume(),style:{...i.style,...(k=i.style)!=null&&k["--type-color"]?{"--type-color":i.style["--type-color"]}:{},...(w=i.style)!=null&&w["--type-glow"]?{"--type-glow":i.style["--type-glow"]}:{}},children:[u.jsx("div",{className:"aura-icon-container",children:u.jsx("div",{className:"aura-icon",children:u.jsx(x,{})})}),u.jsxs("div",{className:"aura-content",children:[u.jsx("p",{className:"aura-message",children:i.message}),i.description&&u.jsx("p",{className:"aura-description",children:i.description})]}),i.action&&u.jsx("div",{className:"aura-action-container",children:u.jsx("button",{className:"aura-action",onClick:()=>{var _;(_=i.action)==null||_.onClick(),h()},children:i.action.label})}),u.jsx("button",{className:"aura-close",onClick:h,"aria-label":"Close",children:u.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[u.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),u.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})};const jr=({children:i,className:n})=>{const[f,h]=Y.useState(null);return Y.useEffect(()=>E.subscribe(x=>{h(x)}),[]),u.jsxs("div",{className:n,children:[i,u.jsx("div",{className:`aura-container ${(f==null?void 0:f.position)||"top-right"}`,children:f&&u.jsx(Pe,{config:f},f.id)})]})};exports.AuraProvider=jr;exports.AuraToast=Pe;exports.auraToast=te;exports.toastStore=E;
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;