vue-toastflow 1.0.6 → 1.0.7

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.
@@ -556,7 +556,7 @@ const dt = /* @__PURE__ */ b(lt, [["render", ut]]), ft = ["role", "aria-live"],
556
556
  ], 42, pt)
557
557
  ], 8, ft));
558
558
  }
559
- }), Lt = /* @__PURE__ */ b(kt, [["__scopeId", "data-v-d5c8f291"]]), xt = ["data-position"], $t = /* @__PURE__ */ se({
559
+ }), Lt = /* @__PURE__ */ b(kt, [["__scopeId", "data-v-763aeb72"]]), xt = ["data-position"], $t = /* @__PURE__ */ se({
560
560
  __name: "ToastContainer",
561
561
  setup(o) {
562
562
  const i = [
@@ -1 +1 @@
1
- (function(d,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("toastflow-core"),require("vue")):typeof define=="function"&&define.amd?define(["exports","toastflow-core","vue"],A):(d=typeof globalThis<"u"?globalThis:d||self,A(d.Toastflow={},d.toastflowCore,d.Vue))})(this,(function(d,A,e){"use strict";const j=Symbol.for("vue-toastflow.toast-store"),G="__vue_toastflow_store__";let $=null;function Q(o){$=o;try{globalThis[G]=o}catch{}}function u(){if($||($=globalThis[G]??null),!$)throw new Error("[vue-toastflow] Toast store not initialized. Did you install the plugin?");return $}const pe={getState(){return u().getState()},subscribeEvents(o){return u().subscribeEvents(o)},show(o){return u().show(o)},loading(o,l){return u().loading(o,l)},update(o,l){return u().update(o,l)},dismiss(o){return u().dismiss(o)},dismissAll(){return u().dismissAll()},pause(o){return u().pause(o)},resume(o){return u().resume(o)},getConfig(){return u().getConfig()},toast(o){return u().show({...o,type:"default"})},success(o){return u().show({...o,type:"success"})},error(o){return u().show({...o,type:"error"})},info(o){return u().show({...o,type:"info"})},warning(o){return u().show({...o,type:"warning"})}};function me(o={}){const l=A.createToastStore(o);return Q(l),{install(_){_.provide(j,l)}}}const he={class:"tf-toast-progress"},ge=e.defineComponent({__name:"ToastProgress",props:{type:{}},setup(o){return(l,_)=>(e.openBlock(),e.createElementBlock("div",he,[e.createElementVNode("div",{class:e.normalizeClass(["tf-toast-progress-bar",`tf-toast-progress-bar--${o.type}`])},null,2)]))}}),k=(o,l)=>{const _=o.__vccOpts||o;for(const[r,w]of l)_[r]=w;return _},Y=k(ge,[["__scopeId","data-v-ca0da064"]]),ye={},ke={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"};function we(o,l){return e.openBlock(),e.createElementBlock("svg",ke,[...l[0]||(l[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z","clip-rule":"evenodd"},null,-1)])])}const J=k(ye,[["render",we]]),Ce={},_e={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"};function be(o,l){return e.openBlock(),e.createElementBlock("svg",_e,[...l[0]||(l[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z","clip-rule":"evenodd"},null,-1)])])}const v=k(Ce,[["render",be]]),Be={},Ae={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"};function Ee(o,l){return e.openBlock(),e.createElementBlock("svg",Ae,[...l[0]||(l[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.25 9a6.75 6.75 0 0 1 13.5 0v.75c0 2.123.8 4.057 2.118 5.52a.75.75 0 0 1-.297 1.206c-1.544.57-3.16.99-4.831 1.243a3.75 3.75 0 1 1-7.48 0 24.585 24.585 0 0 1-4.831-1.244.75.75 0 0 1-.298-1.205A8.217 8.217 0 0 0 5.25 9.75V9Zm4.502 8.9a2.25 2.25 0 1 0 4.496 0 25.057 25.057 0 0 1-4.496 0Z","clip-rule":"evenodd"},null,-1)])])}const ee=k(Be,[["render",Ee]]),Le={},Se={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"};function Te(o,l){return e.openBlock(),e.createElementBlock("svg",Se,[...l[0]||(l[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z","clip-rule":"evenodd"},null,-1)])])}const te=k(Le,[["render",Te]]),$e={},Me={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"};function xe(o,l){return e.openBlock(),e.createElementBlock("svg",Me,[...l[0]||(l[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm11.378-3.917c-.89-.777-2.366-.777-3.255 0a.75.75 0 0 1-.988-1.129c1.454-1.272 3.776-1.272 5.23 0 1.513 1.324 1.513 3.518 0 4.842a3.75 3.75 0 0 1-.837.552c-.676.328-1.028.774-1.028 1.152v.75a.75.75 0 0 1-1.5 0v-.75c0-1.279 1.06-2.107 1.875-2.502.182-.088.351-.199.503-.331.83-.727.83-1.857 0-2.584ZM12 18a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z","clip-rule":"evenodd"},null,-1)])])}const ne=k($e,[["render",xe]]),Ve={},Ne={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"};function He(o,l){return e.openBlock(),e.createElementBlock("svg",Ne,[...l[0]||(l[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z","clip-rule":"evenodd"},null,-1)])])}const oe=k(Ve,[["render",He]]),Ke={},Pe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"};function We(o,l){return e.openBlock(),e.createElementBlock("svg",Pe,[...l[0]||(l[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"},null,-1)])])}const re=k(Ke,[["render",We]]),ze=["role","aria-live"],Oe=["aria-label"],je={class:"tf-toast-surface"},Ze={class:"tf-toast-main"},Ie={class:"tf-toast-body"},De={class:"tf-toast-text"},Fe=["aria-label"],Re=["aria-label","innerHTML"],Ue=["aria-label"],Xe=["aria-label","innerHTML"],qe={key:0,class:"tf-toast-created-at"},Ge=["aria-label"],ae=k(e.defineComponent({__name:"Toast",props:{toast:{},progressResetKey:{},duplicateKey:{},updateKey:{},bumpAnimationClass:{},clearAllAnimationClass:{},updateAnimationClass:{}},emits:["dismiss"],setup(o,{emit:l}){const _=o,{toast:r,progressResetKey:w,duplicateKey:E,updateKey:S,bumpAnimationClass:T,clearAllAnimationClass:M,updateAnimationClass:x}=e.toRefs(_),K=l,P=e.inject(j,null)??u(),L={success:{accent:"tf-toast-accent--success",icon:"tf-toast-icon--success",close:"tf-toast-close--success",component:J},error:{accent:"tf-toast-accent--error",icon:"tf-toast-icon--error",close:"tf-toast-close--error",component:v},warning:{accent:"tf-toast-accent--warning",icon:"tf-toast-icon--warning",close:"tf-toast-close--warning",component:ee},info:{accent:"tf-toast-accent--info",icon:"tf-toast-icon--info",close:"tf-toast-close--info",component:te},default:{accent:"tf-toast-accent--default",icon:"tf-toast-icon--default",close:"tf-toast-close--default",component:ne},loading:{accent:"tf-toast-accent--loading",icon:"tf-toast-icon--loading",close:"tf-toast-close--loading",component:oe}},h=new Set(["error","warning"]),{accentClass:V,iconWrapperClass:I,closeWrapperClass:N,defaultIconComponent:D}=et(r),{role:F,ariaLive:R,hasCreatedAt:W,createdAtText:z,createdAtAriaLabel:U,titleAriaLabel:C,descriptionAriaLabel:n,toastAriaLabel:f}=tt(r),{progressStyle:a,showProgressBar:i,progressKeyLocal:X}=nt(r,w,E),{isBumped:q,isUpdated:Je}=ot(E,S),{isHovered:ve,handleMouseEnter:se,handleMouseLeave:le,handlePointerDown:ie,handlePointerUp:O}=rt(r,P),{handleClick:ce,handleCloseClick:fe}=at(r,K);function et(t){const c=e.computed(function(){return L[t.value.type].accent}),s=e.computed(function(){return L[t.value.type].icon}),p=e.computed(function(){return L[t.value.type].close}),y=e.computed(function(){return L[t.value.type].component});return{accentClass:c,iconWrapperClass:s,closeWrapperClass:p,defaultIconComponent:y}}function tt(t){const c=e.computed(function(){return h.has(t.value.type)?"alert":"status"}),s=e.computed(function(){return h.has(t.value.type)?"assertive":"polite"}),p=e.computed(function(){return!!(t.value.showCreatedAt&&Number.isFinite(t.value.createdAt))}),y=e.computed(function(){if(!p.value)return"";try{return t.value.createdAtFormatter(t.value.createdAt)}catch(B){console.error("[vue-toastflow] Something failed in createdAtFormatter",B)}}),g=e.computed(function(){return y.value?`Sent at ${y.value}`:""}),m=e.computed(function(){return ue(t.value.title)}),H=e.computed(function(){return ue(t.value.description)}),b=e.computed(function(){const B=[];return m.value&&B.push(m.value),H.value&&B.push(H.value),p.value&&g.value&&B.push(g.value),B.length||B.push(`${t.value.type} notification`),B.join(". ")});return{role:c,ariaLive:s,hasCreatedAt:p,createdAtText:y,createdAtAriaLabel:g,titleAriaLabel:m,descriptionAriaLabel:H,toastAriaLabel:b}}function nt(t,c,s){const p=e.computed(function(){return{"--tf-toast-progress-duration":`${t.value.duration}ms`}}),y=e.computed(function(){return t.value.progressBar&&Number.isFinite(t.value.duration)&&t.value.duration>0}),g=e.ref(0);return e.watch(()=>c?.value,function(m){m!=null&&(g.value+=1)}),e.watch(()=>s?.value,function(m){m!=null&&(g.value+=1)}),{progressStyle:p,showProgressBar:y,progressKeyLocal:g}}function ot(t,c){const s=e.ref(!1),p=e.ref(!1);function y(){s.value=!1,requestAnimationFrame(function(){s.value=!0})}function g(){p.value=!1,requestAnimationFrame(function(){p.value=!0})}return e.watch(()=>t?.value,function(m){m!=null&&y()}),e.watch(()=>c?.value,function(m){m!=null&&g()}),{isBumped:s,isUpdated:p}}function rt(t,c){const s=e.ref(!1);function p(){t.value.pauseOnHover&&(s.value=!0,c.pause(t.value.id))}function y(){t.value.pauseOnHover&&(s.value=!1,c.resume(t.value.id))}function g(b){return b.pointerType==="touch"||b.pointerType==="pen"}function m(b){t.value.pauseOnHover&&g(b)&&(s.value=!0,c.pause(t.value.id))}function H(b){t.value.pauseOnHover&&g(b)&&(s.value=!1,c.resume(t.value.id))}return{isHovered:s,handleMouseEnter:p,handleMouseLeave:y,handlePointerDown:m,handlePointerUp:H}}function at(t,c){function s(){return{id:t.value.id,position:t.value.position,type:t.value.type,title:t.value.title,description:t.value.description,createdAt:t.value.createdAt}}function p(g){const m=s();t.value.onClick&&t.value.onClick(m,g),t.value.closeOnClick&&c("dismiss",t.value.id)}function y(){c("dismiss",t.value.id)}return{handleClick:p,handleCloseClick:y}}function de(t){return t.replace(/\s+/g," ").trim()}function ue(t){if(!t)return"";const c=de(t.replace(/<[^>]*>/g," "));if(typeof window>"u"||!window.document)return c;try{const s=window.document.createElement("div");return s.innerHTML=t,de(s.textContent??"")}catch{return c}}return(t,c)=>(e.openBlock(),e.createElementBlock("div",{role:e.unref(F),"aria-live":e.unref(R),class:"tf-toast-wrapper"},[e.createElementVNode("div",{class:e.normalizeClass(["tf-toast",[e.unref(V),e.unref(q)&&e.unref(r).phase!=="leaving"&&e.unref(r).phase!=="clear-all"&&e.unref(T),e.unref(Je)&&e.unref(r).phase!=="leaving"&&e.unref(r).phase!=="clear-all"&&e.unref(x),e.unref(r).phase==="clear-all"&&e.unref(M),e.unref(ve)&&"tf-toast--paused"]]),"aria-label":e.unref(f)||void 0,onClick:c[1]||(c[1]=(...s)=>e.unref(ce)&&e.unref(ce)(...s)),onMouseenter:c[2]||(c[2]=(...s)=>e.unref(se)&&e.unref(se)(...s)),onMouseleave:c[3]||(c[3]=(...s)=>e.unref(le)&&e.unref(le)(...s)),onPointerdown:c[4]||(c[4]=(...s)=>e.unref(ie)&&e.unref(ie)(...s)),onPointerup:c[5]||(c[5]=(...s)=>e.unref(O)&&e.unref(O)(...s)),onPointercancel:c[6]||(c[6]=(...s)=>e.unref(O)&&e.unref(O)(...s))},[e.createElementVNode("div",je,[e.createElementVNode("div",Ze,[e.createElementVNode("div",{class:e.normalizeClass(["tf-toast-icon",e.unref(I)]),"aria-hidden":"true"},[e.renderSlot(t.$slots,"icon",{toast:e.unref(r)},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(D)),{class:e.normalizeClass(["tf-toast-icon-svg",[e.unref(r).type==="loading"&&"tf-toast-icon-spin"]]),"aria-hidden":"true"},null,8,["class"]))],!0)],2),e.createElementVNode("div",Ie,[e.createElementVNode("div",De,[e.unref(r).title&&!e.unref(r).supportHtml?(e.openBlock(),e.createElementBlock("p",{key:0,"aria-label":e.unref(C)||void 0,class:"tf-toast-title"},e.toDisplayString(e.unref(r).title),9,Fe)):e.unref(r).title&&e.unref(r).supportHtml?(e.openBlock(),e.createElementBlock("p",{key:1,class:"tf-toast-title","aria-label":e.unref(C)||void 0,innerHTML:e.unref(r).title},null,8,Re)):e.createCommentVNode("",!0),e.unref(r).description&&!e.unref(r).supportHtml?(e.openBlock(),e.createElementBlock("p",{key:2,"aria-label":e.unref(n)||void 0,class:"tf-toast-description"},e.toDisplayString(e.unref(r).description),9,Ue)):e.unref(r).description&&e.unref(r).supportHtml?(e.openBlock(),e.createElementBlock("p",{key:3,class:"tf-toast-description","aria-label":e.unref(n)||void 0,innerHTML:e.unref(r).description},null,8,Xe)):e.createCommentVNode("",!0)]),e.renderSlot(t.$slots,"default",{toast:e.unref(r)},void 0,!0),e.unref(W)?(e.openBlock(),e.createElementBlock("div",qe,[e.renderSlot(t.$slots,"created-at",{toast:e.unref(r),formatted:e.unref(z)},()=>[e.createElementVNode("span",{"aria-label":e.unref(U)||void 0},e.toDisplayString(e.unref(z)),9,Ge)],!0)])):e.createCommentVNode("",!0)])]),e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tf-toast-progress-wrapper",style:e.normalizeStyle(e.unref(a))},[e.renderSlot(t.$slots,"progress",{toast:e.unref(r)},()=>[(e.openBlock(),e.createBlock(Y,{key:e.unref(X),type:e.unref(r).type},null,8,["type"]))],!0)],4)):e.createCommentVNode("",!0)]),e.unref(r).closeButton?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["tf-toast-close",e.unref(N)]),"aria-label":"Close notification",onClick:c[0]||(c[0]=e.withModifiers((...s)=>e.unref(fe)&&e.unref(fe)(...s),["stop"]))},[e.renderSlot(t.$slots,"close-icon",{toast:e.unref(r)},()=>[e.createVNode(re,{class:"tf-toast-close-icon","aria-hidden":"true"})],!0)],2)):e.createCommentVNode("",!0)],42,Oe)],8,ze))}}),[["__scopeId","data-v-d5c8f291"]]),Qe=["data-position"],Ye=k(e.defineComponent({__name:"ToastContainer",setup(o){const l=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],r=e.inject(j,null)??u(),w=e.ref([]),E=e.ref({}),S=e.ref({}),T=e.ref({});let M=null,x=null;e.onMounted(function(){M=r.subscribe(function(n){w.value=n.toasts}),x=r.subscribeEvents(function(n){n.kind==="timer-reset"&&(E.value[n.id]=Math.random()),n.kind==="duplicate"&&(S.value[n.id]=Math.random()),n.kind==="update"&&(T.value[n.id]=Math.random())})}),e.onUnmounted(function(){M&&M(),x&&x()});function K(n){return E.value[n]??0}function Z(n){return S.value[n]??0}function P(n){return T.value[n]??0}const L=e.computed(function(){const n={"top-left":[],"top-center":[],"top-right":[],"bottom-left":[],"bottom-center":[],"bottom-right":[]};for(const f of w.value)n[f.position].push(f);return n}),h=r.getConfig(),V=e.ref({"top-left":{...h,position:"top-left"},"top-center":{...h,position:"top-center"},"top-right":{...h,position:"top-right"},"bottom-left":{...h,position:"bottom-left"},"bottom-center":{...h,position:"bottom-center"},"bottom-right":{...h,position:"bottom-right"}}),I=e.computed(function(){return w.value.length?Math.max(...w.value.map(n=>n.zIndex)):h.zIndex});function N(n){return V.value[n]??{...h,position:n}}function D(n){const{offset:f,width:a}=N(n),i={width:a,maxWidth:"100%"};return n.startsWith("top-")&&(i.top=f),n.startsWith("bottom-")&&(i.bottom=f),n.endsWith("left")?i.left=f:n.endsWith("right")?i.right=f:n.endsWith("center")&&(i.left="50%",i.transform="translateX(-50%)"),i}function F(n){return n.endsWith("left")?"tf-toast-stack--left":n.endsWith("center")?"tf-toast-stack--center":"tf-toast-stack--right"}function R(n){return n.startsWith("bottom-")?"tf-toast-stack-inner--bottom":null}function W(n){r.dismiss(n)}function z(n){const f=n,a=f.parentElement;if(!a||a.children.length<=1)return;const i=f.offsetTop,X=a.clientHeight,q=a.clientWidth;a.style.minHeight=`${X}px`,f.style.position="absolute",f.style.width=`${q}px`,f.style.left="0",f.style.right="0",f.style.top=`${i}px`}function U(n){const f=n,a=f.parentElement;a&&(a.style.minHeight=""),f.style.position="",f.style.width="",f.style.left="",f.style.right="",f.style.top=""}e.watch(w,function(n){const f=new Set(n.map(function(a){return a.id}));for(const a of Object.keys(E.value))f.has(a)||delete E.value[a];for(const a of Object.keys(S.value))f.has(a)||delete S.value[a];for(const a of Object.keys(T.value))f.has(a)||delete T.value[a]},{deep:!1});function C(n){return{...h.animation,...n.animation}}return e.watch(L,function(n){const f={...V.value};Object.keys(n).forEach(function(a){const i=n[a][0];i&&(f[a]={...h,...i,position:a,animation:{...h.animation,...i.animation}})}),V.value=f},{deep:!1}),(n,f)=>(e.openBlock(),e.createElementBlock("div",{class:"tf-toast-root",style:e.normalizeStyle({zIndex:I.value})},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(l,a=>e.createElementVNode("div",{key:a,class:e.normalizeClass(["tf-toast-stack",F(a)]),style:e.normalizeStyle(D(a))},[e.createVNode(e.TransitionGroup,{name:N(a).animation.name,onBeforeLeave:z,onAfterLeave:U,tag:"div",class:e.normalizeClass(["tf-toast-stack-inner",R(a)]),style:e.normalizeStyle({gap:N(a).gap})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value[a],i=>(e.openBlock(),e.createElementBlock("div",{key:i.id,class:"tf-toast-item",style:e.normalizeStyle({width:i.width,maxWidth:"100%"}),"data-position":i.position},[n.$slots.default?e.renderSlot(n.$slots,"default",{key:0,toast:i,progressResetKey:K(i.id),duplicateKey:Z(i.id),updateKey:P(i.id),bumpAnimationClass:C(i).bump,clearAllAnimationClass:C(i).clearAll,updateAnimationClass:C(i).update,dismiss:W},void 0,!0):(e.openBlock(),e.createBlock(ae,{key:1,toast:i,progressResetKey:K(i.id),duplicateKey:Z(i.id),updateKey:P(i.id),bumpAnimationClass:C(i).bump,clearAllAnimationClass:C(i).clearAll,updateAnimationClass:C(i).update,onDismiss:W},null,8,["toast","progressResetKey","duplicateKey","updateKey","bumpAnimationClass","clearAllAnimationClass","updateAnimationClass"]))],12,Qe))),128))]),_:2},1032,["name","class","style"])],6)),64))],4))}}),[["__scopeId","data-v-65f94eb4"]]);d.ArrowPath=oe,d.Bell=ee,d.CheckCircle=J,d.InfoCircle=te,d.QuestionMarkCircle=ne,d.Toast=ae,d.ToastContainer=Ye,d.ToastProgress=Y,d.XCircle=v,d.XMark=re,d.createToastflow=me,d.getToastStore=u,d.setToastStore=Q,d.toast=pe,Object.keys(A).forEach(o=>{o!=="default"&&!Object.prototype.hasOwnProperty.call(d,o)&&Object.defineProperty(d,o,{enumerable:!0,get:()=>A[o]})}),Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(d,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("toastflow-core"),require("vue")):typeof define=="function"&&define.amd?define(["exports","toastflow-core","vue"],A):(d=typeof globalThis<"u"?globalThis:d||self,A(d.Toastflow={},d.toastflowCore,d.Vue))})(this,(function(d,A,e){"use strict";const j=Symbol.for("vue-toastflow.toast-store"),G="__vue_toastflow_store__";let $=null;function Q(o){$=o;try{globalThis[G]=o}catch{}}function u(){if($||($=globalThis[G]??null),!$)throw new Error("[vue-toastflow] Toast store not initialized. Did you install the plugin?");return $}const pe={getState(){return u().getState()},subscribeEvents(o){return u().subscribeEvents(o)},show(o){return u().show(o)},loading(o,l){return u().loading(o,l)},update(o,l){return u().update(o,l)},dismiss(o){return u().dismiss(o)},dismissAll(){return u().dismissAll()},pause(o){return u().pause(o)},resume(o){return u().resume(o)},getConfig(){return u().getConfig()},toast(o){return u().show({...o,type:"default"})},success(o){return u().show({...o,type:"success"})},error(o){return u().show({...o,type:"error"})},info(o){return u().show({...o,type:"info"})},warning(o){return u().show({...o,type:"warning"})}};function me(o={}){const l=A.createToastStore(o);return Q(l),{install(_){_.provide(j,l)}}}const he={class:"tf-toast-progress"},ge=e.defineComponent({__name:"ToastProgress",props:{type:{}},setup(o){return(l,_)=>(e.openBlock(),e.createElementBlock("div",he,[e.createElementVNode("div",{class:e.normalizeClass(["tf-toast-progress-bar",`tf-toast-progress-bar--${o.type}`])},null,2)]))}}),k=(o,l)=>{const _=o.__vccOpts||o;for(const[r,w]of l)_[r]=w;return _},Y=k(ge,[["__scopeId","data-v-ca0da064"]]),ye={},ke={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"};function we(o,l){return e.openBlock(),e.createElementBlock("svg",ke,[...l[0]||(l[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z","clip-rule":"evenodd"},null,-1)])])}const J=k(ye,[["render",we]]),Ce={},_e={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"};function be(o,l){return e.openBlock(),e.createElementBlock("svg",_e,[...l[0]||(l[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z","clip-rule":"evenodd"},null,-1)])])}const v=k(Ce,[["render",be]]),Be={},Ae={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"};function Ee(o,l){return e.openBlock(),e.createElementBlock("svg",Ae,[...l[0]||(l[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.25 9a6.75 6.75 0 0 1 13.5 0v.75c0 2.123.8 4.057 2.118 5.52a.75.75 0 0 1-.297 1.206c-1.544.57-3.16.99-4.831 1.243a3.75 3.75 0 1 1-7.48 0 24.585 24.585 0 0 1-4.831-1.244.75.75 0 0 1-.298-1.205A8.217 8.217 0 0 0 5.25 9.75V9Zm4.502 8.9a2.25 2.25 0 1 0 4.496 0 25.057 25.057 0 0 1-4.496 0Z","clip-rule":"evenodd"},null,-1)])])}const ee=k(Be,[["render",Ee]]),Le={},Se={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"};function Te(o,l){return e.openBlock(),e.createElementBlock("svg",Se,[...l[0]||(l[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z","clip-rule":"evenodd"},null,-1)])])}const te=k(Le,[["render",Te]]),$e={},Me={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"};function xe(o,l){return e.openBlock(),e.createElementBlock("svg",Me,[...l[0]||(l[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm11.378-3.917c-.89-.777-2.366-.777-3.255 0a.75.75 0 0 1-.988-1.129c1.454-1.272 3.776-1.272 5.23 0 1.513 1.324 1.513 3.518 0 4.842a3.75 3.75 0 0 1-.837.552c-.676.328-1.028.774-1.028 1.152v.75a.75.75 0 0 1-1.5 0v-.75c0-1.279 1.06-2.107 1.875-2.502.182-.088.351-.199.503-.331.83-.727.83-1.857 0-2.584ZM12 18a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z","clip-rule":"evenodd"},null,-1)])])}const ne=k($e,[["render",xe]]),Ve={},Ne={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"};function He(o,l){return e.openBlock(),e.createElementBlock("svg",Ne,[...l[0]||(l[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z","clip-rule":"evenodd"},null,-1)])])}const oe=k(Ve,[["render",He]]),Ke={},Pe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"};function We(o,l){return e.openBlock(),e.createElementBlock("svg",Pe,[...l[0]||(l[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"},null,-1)])])}const re=k(Ke,[["render",We]]),ze=["role","aria-live"],Oe=["aria-label"],je={class:"tf-toast-surface"},Ze={class:"tf-toast-main"},Ie={class:"tf-toast-body"},De={class:"tf-toast-text"},Fe=["aria-label"],Re=["aria-label","innerHTML"],Ue=["aria-label"],Xe=["aria-label","innerHTML"],qe={key:0,class:"tf-toast-created-at"},Ge=["aria-label"],ae=k(e.defineComponent({__name:"Toast",props:{toast:{},progressResetKey:{},duplicateKey:{},updateKey:{},bumpAnimationClass:{},clearAllAnimationClass:{},updateAnimationClass:{}},emits:["dismiss"],setup(o,{emit:l}){const _=o,{toast:r,progressResetKey:w,duplicateKey:E,updateKey:S,bumpAnimationClass:T,clearAllAnimationClass:M,updateAnimationClass:x}=e.toRefs(_),K=l,P=e.inject(j,null)??u(),L={success:{accent:"tf-toast-accent--success",icon:"tf-toast-icon--success",close:"tf-toast-close--success",component:J},error:{accent:"tf-toast-accent--error",icon:"tf-toast-icon--error",close:"tf-toast-close--error",component:v},warning:{accent:"tf-toast-accent--warning",icon:"tf-toast-icon--warning",close:"tf-toast-close--warning",component:ee},info:{accent:"tf-toast-accent--info",icon:"tf-toast-icon--info",close:"tf-toast-close--info",component:te},default:{accent:"tf-toast-accent--default",icon:"tf-toast-icon--default",close:"tf-toast-close--default",component:ne},loading:{accent:"tf-toast-accent--loading",icon:"tf-toast-icon--loading",close:"tf-toast-close--loading",component:oe}},h=new Set(["error","warning"]),{accentClass:V,iconWrapperClass:I,closeWrapperClass:N,defaultIconComponent:D}=et(r),{role:F,ariaLive:R,hasCreatedAt:W,createdAtText:z,createdAtAriaLabel:U,titleAriaLabel:C,descriptionAriaLabel:n,toastAriaLabel:f}=tt(r),{progressStyle:a,showProgressBar:i,progressKeyLocal:X}=nt(r,w,E),{isBumped:q,isUpdated:Je}=ot(E,S),{isHovered:ve,handleMouseEnter:se,handleMouseLeave:le,handlePointerDown:ie,handlePointerUp:O}=rt(r,P),{handleClick:ce,handleCloseClick:fe}=at(r,K);function et(t){const c=e.computed(function(){return L[t.value.type].accent}),s=e.computed(function(){return L[t.value.type].icon}),p=e.computed(function(){return L[t.value.type].close}),y=e.computed(function(){return L[t.value.type].component});return{accentClass:c,iconWrapperClass:s,closeWrapperClass:p,defaultIconComponent:y}}function tt(t){const c=e.computed(function(){return h.has(t.value.type)?"alert":"status"}),s=e.computed(function(){return h.has(t.value.type)?"assertive":"polite"}),p=e.computed(function(){return!!(t.value.showCreatedAt&&Number.isFinite(t.value.createdAt))}),y=e.computed(function(){if(!p.value)return"";try{return t.value.createdAtFormatter(t.value.createdAt)}catch(B){console.error("[vue-toastflow] Something failed in createdAtFormatter",B)}}),g=e.computed(function(){return y.value?`Sent at ${y.value}`:""}),m=e.computed(function(){return ue(t.value.title)}),H=e.computed(function(){return ue(t.value.description)}),b=e.computed(function(){const B=[];return m.value&&B.push(m.value),H.value&&B.push(H.value),p.value&&g.value&&B.push(g.value),B.length||B.push(`${t.value.type} notification`),B.join(". ")});return{role:c,ariaLive:s,hasCreatedAt:p,createdAtText:y,createdAtAriaLabel:g,titleAriaLabel:m,descriptionAriaLabel:H,toastAriaLabel:b}}function nt(t,c,s){const p=e.computed(function(){return{"--tf-toast-progress-duration":`${t.value.duration}ms`}}),y=e.computed(function(){return t.value.progressBar&&Number.isFinite(t.value.duration)&&t.value.duration>0}),g=e.ref(0);return e.watch(()=>c?.value,function(m){m!=null&&(g.value+=1)}),e.watch(()=>s?.value,function(m){m!=null&&(g.value+=1)}),{progressStyle:p,showProgressBar:y,progressKeyLocal:g}}function ot(t,c){const s=e.ref(!1),p=e.ref(!1);function y(){s.value=!1,requestAnimationFrame(function(){s.value=!0})}function g(){p.value=!1,requestAnimationFrame(function(){p.value=!0})}return e.watch(()=>t?.value,function(m){m!=null&&y()}),e.watch(()=>c?.value,function(m){m!=null&&g()}),{isBumped:s,isUpdated:p}}function rt(t,c){const s=e.ref(!1);function p(){t.value.pauseOnHover&&(s.value=!0,c.pause(t.value.id))}function y(){t.value.pauseOnHover&&(s.value=!1,c.resume(t.value.id))}function g(b){return b.pointerType==="touch"||b.pointerType==="pen"}function m(b){t.value.pauseOnHover&&g(b)&&(s.value=!0,c.pause(t.value.id))}function H(b){t.value.pauseOnHover&&g(b)&&(s.value=!1,c.resume(t.value.id))}return{isHovered:s,handleMouseEnter:p,handleMouseLeave:y,handlePointerDown:m,handlePointerUp:H}}function at(t,c){function s(){return{id:t.value.id,position:t.value.position,type:t.value.type,title:t.value.title,description:t.value.description,createdAt:t.value.createdAt}}function p(g){const m=s();t.value.onClick&&t.value.onClick(m,g),t.value.closeOnClick&&c("dismiss",t.value.id)}function y(){c("dismiss",t.value.id)}return{handleClick:p,handleCloseClick:y}}function de(t){return t.replace(/\s+/g," ").trim()}function ue(t){if(!t)return"";const c=de(t.replace(/<[^>]*>/g," "));if(typeof window>"u"||!window.document)return c;try{const s=window.document.createElement("div");return s.innerHTML=t,de(s.textContent??"")}catch{return c}}return(t,c)=>(e.openBlock(),e.createElementBlock("div",{role:e.unref(F),"aria-live":e.unref(R),class:"tf-toast-wrapper"},[e.createElementVNode("div",{class:e.normalizeClass(["tf-toast",[e.unref(V),e.unref(q)&&e.unref(r).phase!=="leaving"&&e.unref(r).phase!=="clear-all"&&e.unref(T),e.unref(Je)&&e.unref(r).phase!=="leaving"&&e.unref(r).phase!=="clear-all"&&e.unref(x),e.unref(r).phase==="clear-all"&&e.unref(M),e.unref(ve)&&"tf-toast--paused"]]),"aria-label":e.unref(f)||void 0,onClick:c[1]||(c[1]=(...s)=>e.unref(ce)&&e.unref(ce)(...s)),onMouseenter:c[2]||(c[2]=(...s)=>e.unref(se)&&e.unref(se)(...s)),onMouseleave:c[3]||(c[3]=(...s)=>e.unref(le)&&e.unref(le)(...s)),onPointerdown:c[4]||(c[4]=(...s)=>e.unref(ie)&&e.unref(ie)(...s)),onPointerup:c[5]||(c[5]=(...s)=>e.unref(O)&&e.unref(O)(...s)),onPointercancel:c[6]||(c[6]=(...s)=>e.unref(O)&&e.unref(O)(...s))},[e.createElementVNode("div",je,[e.createElementVNode("div",Ze,[e.createElementVNode("div",{class:e.normalizeClass(["tf-toast-icon",e.unref(I)]),"aria-hidden":"true"},[e.renderSlot(t.$slots,"icon",{toast:e.unref(r)},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(D)),{class:e.normalizeClass(["tf-toast-icon-svg",[e.unref(r).type==="loading"&&"tf-toast-icon-spin"]]),"aria-hidden":"true"},null,8,["class"]))],!0)],2),e.createElementVNode("div",Ie,[e.createElementVNode("div",De,[e.unref(r).title&&!e.unref(r).supportHtml?(e.openBlock(),e.createElementBlock("p",{key:0,"aria-label":e.unref(C)||void 0,class:"tf-toast-title"},e.toDisplayString(e.unref(r).title),9,Fe)):e.unref(r).title&&e.unref(r).supportHtml?(e.openBlock(),e.createElementBlock("p",{key:1,class:"tf-toast-title","aria-label":e.unref(C)||void 0,innerHTML:e.unref(r).title},null,8,Re)):e.createCommentVNode("",!0),e.unref(r).description&&!e.unref(r).supportHtml?(e.openBlock(),e.createElementBlock("p",{key:2,"aria-label":e.unref(n)||void 0,class:"tf-toast-description"},e.toDisplayString(e.unref(r).description),9,Ue)):e.unref(r).description&&e.unref(r).supportHtml?(e.openBlock(),e.createElementBlock("p",{key:3,class:"tf-toast-description","aria-label":e.unref(n)||void 0,innerHTML:e.unref(r).description},null,8,Xe)):e.createCommentVNode("",!0)]),e.renderSlot(t.$slots,"default",{toast:e.unref(r)},void 0,!0),e.unref(W)?(e.openBlock(),e.createElementBlock("div",qe,[e.renderSlot(t.$slots,"created-at",{toast:e.unref(r),formatted:e.unref(z)},()=>[e.createElementVNode("span",{"aria-label":e.unref(U)||void 0},e.toDisplayString(e.unref(z)),9,Ge)],!0)])):e.createCommentVNode("",!0)])]),e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tf-toast-progress-wrapper",style:e.normalizeStyle(e.unref(a))},[e.renderSlot(t.$slots,"progress",{toast:e.unref(r)},()=>[(e.openBlock(),e.createBlock(Y,{key:e.unref(X),type:e.unref(r).type},null,8,["type"]))],!0)],4)):e.createCommentVNode("",!0)]),e.unref(r).closeButton?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["tf-toast-close",e.unref(N)]),"aria-label":"Close notification",onClick:c[0]||(c[0]=e.withModifiers((...s)=>e.unref(fe)&&e.unref(fe)(...s),["stop"]))},[e.renderSlot(t.$slots,"close-icon",{toast:e.unref(r)},()=>[e.createVNode(re,{class:"tf-toast-close-icon","aria-hidden":"true"})],!0)],2)):e.createCommentVNode("",!0)],42,Oe)],8,ze))}}),[["__scopeId","data-v-763aeb72"]]),Qe=["data-position"],Ye=k(e.defineComponent({__name:"ToastContainer",setup(o){const l=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],r=e.inject(j,null)??u(),w=e.ref([]),E=e.ref({}),S=e.ref({}),T=e.ref({});let M=null,x=null;e.onMounted(function(){M=r.subscribe(function(n){w.value=n.toasts}),x=r.subscribeEvents(function(n){n.kind==="timer-reset"&&(E.value[n.id]=Math.random()),n.kind==="duplicate"&&(S.value[n.id]=Math.random()),n.kind==="update"&&(T.value[n.id]=Math.random())})}),e.onUnmounted(function(){M&&M(),x&&x()});function K(n){return E.value[n]??0}function Z(n){return S.value[n]??0}function P(n){return T.value[n]??0}const L=e.computed(function(){const n={"top-left":[],"top-center":[],"top-right":[],"bottom-left":[],"bottom-center":[],"bottom-right":[]};for(const f of w.value)n[f.position].push(f);return n}),h=r.getConfig(),V=e.ref({"top-left":{...h,position:"top-left"},"top-center":{...h,position:"top-center"},"top-right":{...h,position:"top-right"},"bottom-left":{...h,position:"bottom-left"},"bottom-center":{...h,position:"bottom-center"},"bottom-right":{...h,position:"bottom-right"}}),I=e.computed(function(){return w.value.length?Math.max(...w.value.map(n=>n.zIndex)):h.zIndex});function N(n){return V.value[n]??{...h,position:n}}function D(n){const{offset:f,width:a}=N(n),i={width:a,maxWidth:"100%"};return n.startsWith("top-")&&(i.top=f),n.startsWith("bottom-")&&(i.bottom=f),n.endsWith("left")?i.left=f:n.endsWith("right")?i.right=f:n.endsWith("center")&&(i.left="50%",i.transform="translateX(-50%)"),i}function F(n){return n.endsWith("left")?"tf-toast-stack--left":n.endsWith("center")?"tf-toast-stack--center":"tf-toast-stack--right"}function R(n){return n.startsWith("bottom-")?"tf-toast-stack-inner--bottom":null}function W(n){r.dismiss(n)}function z(n){const f=n,a=f.parentElement;if(!a||a.children.length<=1)return;const i=f.offsetTop,X=a.clientHeight,q=a.clientWidth;a.style.minHeight=`${X}px`,f.style.position="absolute",f.style.width=`${q}px`,f.style.left="0",f.style.right="0",f.style.top=`${i}px`}function U(n){const f=n,a=f.parentElement;a&&(a.style.minHeight=""),f.style.position="",f.style.width="",f.style.left="",f.style.right="",f.style.top=""}e.watch(w,function(n){const f=new Set(n.map(function(a){return a.id}));for(const a of Object.keys(E.value))f.has(a)||delete E.value[a];for(const a of Object.keys(S.value))f.has(a)||delete S.value[a];for(const a of Object.keys(T.value))f.has(a)||delete T.value[a]},{deep:!1});function C(n){return{...h.animation,...n.animation}}return e.watch(L,function(n){const f={...V.value};Object.keys(n).forEach(function(a){const i=n[a][0];i&&(f[a]={...h,...i,position:a,animation:{...h.animation,...i.animation}})}),V.value=f},{deep:!1}),(n,f)=>(e.openBlock(),e.createElementBlock("div",{class:"tf-toast-root",style:e.normalizeStyle({zIndex:I.value})},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(l,a=>e.createElementVNode("div",{key:a,class:e.normalizeClass(["tf-toast-stack",F(a)]),style:e.normalizeStyle(D(a))},[e.createVNode(e.TransitionGroup,{name:N(a).animation.name,onBeforeLeave:z,onAfterLeave:U,tag:"div",class:e.normalizeClass(["tf-toast-stack-inner",R(a)]),style:e.normalizeStyle({gap:N(a).gap})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value[a],i=>(e.openBlock(),e.createElementBlock("div",{key:i.id,class:"tf-toast-item",style:e.normalizeStyle({width:i.width,maxWidth:"100%"}),"data-position":i.position},[n.$slots.default?e.renderSlot(n.$slots,"default",{key:0,toast:i,progressResetKey:K(i.id),duplicateKey:Z(i.id),updateKey:P(i.id),bumpAnimationClass:C(i).bump,clearAllAnimationClass:C(i).clearAll,updateAnimationClass:C(i).update,dismiss:W},void 0,!0):(e.openBlock(),e.createBlock(ae,{key:1,toast:i,progressResetKey:K(i.id),duplicateKey:Z(i.id),updateKey:P(i.id),bumpAnimationClass:C(i).bump,clearAllAnimationClass:C(i).clearAll,updateAnimationClass:C(i).update,onDismiss:W},null,8,["toast","progressResetKey","duplicateKey","updateKey","bumpAnimationClass","clearAllAnimationClass","updateAnimationClass"]))],12,Qe))),128))]),_:2},1032,["name","class","style"])],6)),64))],4))}}),[["__scopeId","data-v-65f94eb4"]]);d.ArrowPath=oe,d.Bell=ee,d.CheckCircle=J,d.InfoCircle=te,d.QuestionMarkCircle=ne,d.Toast=ae,d.ToastContainer=Ye,d.ToastProgress=Y,d.XCircle=v,d.XMark=re,d.createToastflow=me,d.getToastStore=u,d.setToastStore=Q,d.toast=pe,Object.keys(A).forEach(o=>{o!=="default"&&!Object.prototype.hasOwnProperty.call(d,o)&&Object.defineProperty(d,o,{enumerable:!0,get:()=>A[o]})}),Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
@@ -1 +1 @@
1
- :root{--tf-toast-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--tf-toast-radius: .75rem;--tf-toast-padding: 1rem;--normal-bg: #fff;--normal-border: #e6e8eb;--normal-text: #11181c;--loading-bg: hsl(48, 100%, 96%);--loading-border: hsl(46, 100%, 88%);--loading-text: hsl(40, 100%, 32%);--tf-toast-bg: var(--normal-bg);--tf-toast-color: var(--normal-text);--tf-toast-border-color: var(--normal-border);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 87%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 93%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 84%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%);--tf-toast-title-font-size: .85rem;--tf-toast-title-font-weight: 600;--tf-toast-description-font-size: .8rem;--tf-toast-description-color: var(--tf-toast-color);--tf-toast-created-at-font-size: .7rem;--tf-toast-gap: .8rem;--tf-toast-stack-padding-top: 8px;--tf-toast-stack-padding-right: 8px;--tf-toast-stack-padding-bottom: 18px;--tf-toast-stack-padding-left: 0;--tf-toast-accent-loading: var(--loading-text);--tf-toast-accent-default: var(--normal-text);--tf-toast-accent-success: var(--success-text);--tf-toast-accent-error: var(--error-text);--tf-toast-accent-warning: var(--warning-text);--tf-toast-accent-info: var(--info-text);--tf-toast-icon-size: 24px;--tf-toast-icon-loading: var(--loading-text);--tf-toast-icon-default: var(--normal-text);--tf-toast-icon-success: var(--success-text);--tf-toast-icon-error: var(--error-text);--tf-toast-icon-warning: var(--warning-text);--tf-toast-icon-info: var(--info-text);--tf-toast-close-size: 18px;--tf-toast-close-border-color: var(--tf-toast-border-color);--tf-toast-close-color: var(--tf-toast-color);--tf-toast-close-bg: var(--tf-toast-bg);--tf-toast-close-ring-color: var(--tf-toast-border-color);--tf-toast-progress-height: 4px;--tf-toast-progress-bg: transparent;--tf-toast-progress-bar-bg: var(--tf-toast-accent-success);--tf-toast-progress-duration: 5s;--tf-toast-motion-offset: 10px}.tf-toast--paused .tf-toast-progress-bar{animation-play-state:paused}.tf-toast-item[data-position^=top-]{--tf-toast-motion-offset: -10px}.tf-toast-item[data-position^=bottom-]{--tf-toast-motion-offset: 10px}.Toastflow__animation-enter-active{animation:Toastflow__enter-kf .26s cubic-bezier(.5,1,.25,1);animation-fill-mode:both}.Toastflow__animation-leave-active{animation:Toastflow__leave-kf .22s ease;animation-fill-mode:both}.Toastflow__animation-clearAll{animation:Toastflow__clearAll-kf .26s cubic-bezier(.22,1,.36,1);animation-fill-mode:both}.Toastflow__animation-move{transition:transform .26s cubic-bezier(.5,1,.25,1);will-change:transform}.Toastflow__animation-bump{animation:Toastflow__bump-kf .14s ease-out;animation-fill-mode:both}.Toastflow__animation-update{animation:Toastflow__update-kf .32s cubic-bezier(.33,1,.68,1);animation-fill-mode:both}@keyframes Toastflow__enter-kf{0%{transform:translate3d(0,var(--tf-toast-motion-offset),0) scale(.9);opacity:0}to{transform:translateZ(0) scale(1);opacity:1}}@keyframes Toastflow__leave-kf{0%{transform:translateZ(0) scale(1);opacity:1}to{transform:translate3d(0,var(--tf-toast-motion-offset),0) scale(.9);opacity:0}}@keyframes Toastflow__clearAll-kf{0%{opacity:1}to{opacity:0}}@keyframes Toastflow__bump-kf{0%{transform:scale(1)}40%{transform:scale(1.01)}to{transform:scale(1)}}@keyframes Toastflow__update-kf{0%{opacity:.4;transform:scale(.985)}40%{opacity:1;transform:scale(1.01)}to{opacity:1;transform:scale(1)}}.tf-toast-progress[data-v-ca0da064]{height:var(--tf-toast-progress-height);width:100%;border-radius:0 0 var(--tf-toast-radius) var(--tf-toast-radius);background:var(--tf-toast-progress-bg)}.tf-toast-progress-bar[data-v-ca0da064]{height:100%;animation-name:tf-toast-progress-ca0da064;animation-duration:var(--tf-toast-progress-duration, 5s);animation-timing-function:linear;animation-fill-mode:forwards}.tf-toast-progress-bar--default[data-v-ca0da064]{background:var(--tf-toast-accent-default)}.tf-toast-progress-bar--success[data-v-ca0da064]{background:var(--tf-toast-accent-success)}.tf-toast-progress-bar--error[data-v-ca0da064]{background:var(--tf-toast-accent-error)}.tf-toast-progress-bar--warning[data-v-ca0da064]{background:var(--tf-toast-accent-warning)}.tf-toast-progress-bar--info[data-v-ca0da064]{background:var(--tf-toast-accent-info)}@keyframes tf-toast-progress-ca0da064{0%{width:100%}to{width:0}}.tf-toast-wrapper[data-v-d5c8f291]{pointer-events:auto;width:100%}.tf-toast[data-v-d5c8f291]{cursor:pointer;position:relative;width:100%;--tf-toast-close-bg: var(--tf-toast-bg);--tf-toast-close-color: var(--tf-toast-color);--tf-toast-close-border-color: var(--tf-toast-border-color)}.tf-toast-accent--loading[data-v-d5c8f291]{--tf-toast-bg: var(--loading-bg);--tf-toast-border-color: var(--loading-border);--tf-toast-color: var(--loading-text);--tf-toast-description-color: var(--loading-text);--tf-toast-progress-bg: color-mix( in srgb, var(--loading-text) 20%, transparent )}.tf-toast-accent--default[data-v-d5c8f291]{--tf-toast-bg: var(--normal-bg);--tf-toast-border-color: var(--normal-border);--tf-toast-color: var(--normal-text);--tf-toast-description-color: var(--normal-text);--tf-toast-progress-bg: color-mix( in srgb, var(--normal-text) 20%, transparent )}.tf-toast-accent--success[data-v-d5c8f291]{--tf-toast-bg: var(--success-bg);--tf-toast-border-color: var(--success-border);--tf-toast-color: var(--success-text);--tf-toast-description-color: var(--success-text);--tf-toast-progress-bg: color-mix( in srgb, var(--success-text) 20%, transparent )}.tf-toast-accent--error[data-v-d5c8f291]{--tf-toast-bg: var(--error-bg);--tf-toast-border-color: var(--error-border);--tf-toast-color: var(--error-text);--tf-toast-description-color: var(--error-text);--tf-toast-progress-bg: color-mix( in srgb, var(--error-text) 20%, transparent )}.tf-toast-accent--warning[data-v-d5c8f291]{--tf-toast-bg: var(--warning-bg);--tf-toast-border-color: var(--warning-border);--tf-toast-color: var(--warning-text);--tf-toast-description-color: var(--warning-text);--tf-toast-progress-bg: color-mix( in srgb, var(--warning-text) 20%, transparent )}.tf-toast-accent--info[data-v-d5c8f291]{--tf-toast-bg: var(--info-bg);--tf-toast-border-color: var(--info-border);--tf-toast-color: var(--info-text);--tf-toast-description-color: var(--info-text);--tf-toast-progress-bg: color-mix(in srgb, var(--info-text) 20%, transparent)}.tf-toast-surface[data-v-d5c8f291]{position:relative;display:block;min-width:0;padding:var(--tf-toast-padding);border-radius:var(--tf-toast-radius);background-color:var(--tf-toast-bg);color:var(--tf-toast-color);border:1px solid var(--tf-toast-border-color);font-family:var(--tf-toast-font-family);overflow:hidden}.tf-toast-main[data-v-d5c8f291]{display:flex;align-items:center;gap:var(--tf-toast-gap)}.tf-toast-icon-spin[data-v-d5c8f291]{display:inline-block;animation:tf-toast-spin-d5c8f291 .8s linear infinite;transform-origin:center}@keyframes tf-toast-spin-d5c8f291{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.tf-toast-icon-svg[data-v-d5c8f291]{width:var(--tf-toast-icon-size);height:var(--tf-toast-icon-size)}.tf-toast-icon--loading .tf-toast-icon-svg[data-v-d5c8f291]{color:var(--tf-toast-icon-loading)}.tf-toast-icon--default .tf-toast-icon-svg[data-v-d5c8f291]{color:var(--tf-toast-icon-default)}.tf-toast-icon--success .tf-toast-icon-svg[data-v-d5c8f291]{color:var(--tf-toast-icon-success)}.tf-toast-icon--error .tf-toast-icon-svg[data-v-d5c8f291]{color:var(--tf-toast-icon-error)}.tf-toast-icon--warning .tf-toast-icon-svg[data-v-d5c8f291]{color:var(--tf-toast-icon-warning)}.tf-toast-icon--info .tf-toast-icon-svg[data-v-d5c8f291]{color:var(--tf-toast-icon-info)}.tf-toast-body[data-v-d5c8f291]{position:relative;z-index:1;min-width:0;flex:1 1 auto;display:flex;flex-direction:column}.tf-toast-created-at[data-v-d5c8f291]{position:absolute;bottom:0;right:0;color:var(--tf-toast-description-color);font-size:var(--tf-toast-created-at-font-size);font-style:italic}.tf-toast-title[data-v-d5c8f291]{margin:0;font-size:var(--tf-toast-title-font-size);font-weight:var(--tf-toast-title-font-weight);line-height:1.25;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.tf-toast-description[data-v-d5c8f291]{margin:0;font-size:var(--tf-toast-description-font-size);color:var(--tf-toast-description-color)}.tf-toast-close[data-v-d5c8f291]{position:absolute;top:0;right:0;transform:translate(40%,-40%);height:var(--tf-toast-close-size);width:var(--tf-toast-close-size);border-radius:999px;border:1px solid var(--tf-toast-close-border-color);background:var(--tf-toast-close-bg);color:var(--tf-toast-close-color);font-size:11px;display:inline-flex;align-items:center;justify-content:center;padding:0;cursor:pointer;z-index:2}.tf-toast-close-icon[data-v-d5c8f291]{width:12px;height:12px}.tf-toast-close[data-v-d5c8f291]:focus-visible{outline:2px solid var(--tf-toast-close-ring-color);outline-offset:2px}.tf-toast-progress-wrapper[data-v-d5c8f291]{position:absolute;left:0;right:0;bottom:0;margin:0}.tf-toast-root[data-v-65f94eb4]{pointer-events:none;position:fixed;inset:0}.tf-toast-stack[data-v-65f94eb4]{position:absolute;height:100%;display:flex;align-items:flex-start}.tf-toast-stack-inner[data-v-65f94eb4]{display:flex;flex-direction:column;position:relative;width:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding-top:var(--tf-toast-stack-padding-top);padding-right:var(--tf-toast-stack-padding-right);padding-bottom:var(--tf-toast-stack-padding-bottom);padding-left:var(--tf-toast-stack-padding-left);scroll-padding:var(--tf-toast-stack-padding-top) var(--tf-toast-stack-padding-right) var(--tf-toast-stack-padding-bottom) var(--tf-toast-stack-padding-left);box-sizing:border-box}.tf-toast-stack-inner--bottom[data-v-65f94eb4]{min-height:100%;justify-content:flex-end}.tf-toast-stack--left[data-v-65f94eb4]{justify-content:flex-start}.tf-toast-stack--center[data-v-65f94eb4]{justify-content:center}.tf-toast-stack--right[data-v-65f94eb4]{justify-content:flex-end}.tf-toast-item[data-v-65f94eb4]{pointer-events:auto;width:100%}
1
+ :root{--tf-toast-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--tf-toast-radius: .75rem;--tf-toast-padding: 1rem;--normal-bg: #fff;--normal-border: #e6e8eb;--normal-text: #11181c;--loading-bg: hsl(48, 100%, 96%);--loading-border: hsl(46, 100%, 88%);--loading-text: hsl(40, 100%, 32%);--tf-toast-bg: var(--normal-bg);--tf-toast-color: var(--normal-text);--tf-toast-border-color: var(--normal-border);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 87%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 93%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 84%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%);--tf-toast-title-font-size: .85rem;--tf-toast-title-font-weight: 600;--tf-toast-description-font-size: .8rem;--tf-toast-description-color: var(--tf-toast-color);--tf-toast-created-at-font-size: .7rem;--tf-toast-gap: .8rem;--tf-toast-stack-padding-top: 8px;--tf-toast-stack-padding-right: 8px;--tf-toast-stack-padding-bottom: 18px;--tf-toast-stack-padding-left: 0;--tf-toast-accent-loading: var(--loading-text);--tf-toast-accent-default: var(--normal-text);--tf-toast-accent-success: var(--success-text);--tf-toast-accent-error: var(--error-text);--tf-toast-accent-warning: var(--warning-text);--tf-toast-accent-info: var(--info-text);--tf-toast-icon-size: 24px;--tf-toast-icon-loading: var(--loading-text);--tf-toast-icon-default: var(--normal-text);--tf-toast-icon-success: var(--success-text);--tf-toast-icon-error: var(--error-text);--tf-toast-icon-warning: var(--warning-text);--tf-toast-icon-info: var(--info-text);--tf-toast-close-size: 18px;--tf-toast-close-border-color: var(--tf-toast-border-color);--tf-toast-close-color: var(--tf-toast-color);--tf-toast-close-bg: var(--tf-toast-bg);--tf-toast-close-ring-color: var(--tf-toast-border-color);--tf-toast-progress-height: 4px;--tf-toast-progress-bg: transparent;--tf-toast-progress-bar-bg: var(--tf-toast-accent-success);--tf-toast-progress-duration: 5s;--tf-toast-motion-offset: 10px}.tf-toast--paused .tf-toast-progress-bar{animation-play-state:paused}.tf-toast-item[data-position^=top-]{--tf-toast-motion-offset: -10px}.tf-toast-item[data-position^=bottom-]{--tf-toast-motion-offset: 10px}.Toastflow__animation-enter-active{animation:Toastflow__enter-kf .26s cubic-bezier(.5,1,.25,1);animation-fill-mode:both}.Toastflow__animation-leave-active{animation:Toastflow__leave-kf .22s ease;animation-fill-mode:both}.Toastflow__animation-clearAll{animation:Toastflow__clearAll-kf .26s cubic-bezier(.22,1,.36,1);animation-fill-mode:both}.Toastflow__animation-move{transition:transform .26s cubic-bezier(.5,1,.25,1);will-change:transform}.Toastflow__animation-bump{animation:Toastflow__bump-kf .14s ease-out;animation-fill-mode:both}.Toastflow__animation-update{animation:Toastflow__update-kf .32s cubic-bezier(.33,1,.68,1);animation-fill-mode:both}@keyframes Toastflow__enter-kf{0%{transform:translate3d(0,var(--tf-toast-motion-offset),0) scale(.9);opacity:0}to{transform:translateZ(0) scale(1);opacity:1}}@keyframes Toastflow__leave-kf{0%{transform:translateZ(0) scale(1);opacity:1}to{transform:translate3d(0,var(--tf-toast-motion-offset),0) scale(.9);opacity:0}}@keyframes Toastflow__clearAll-kf{0%{opacity:1}to{opacity:0}}@keyframes Toastflow__bump-kf{0%{transform:scale(1)}40%{transform:scale(1.01)}to{transform:scale(1)}}@keyframes Toastflow__update-kf{0%{opacity:.4;transform:scale(.985)}40%{opacity:1;transform:scale(1.01)}to{opacity:1;transform:scale(1)}}.tf-toast-progress[data-v-ca0da064]{height:var(--tf-toast-progress-height);width:100%;border-radius:0 0 var(--tf-toast-radius) var(--tf-toast-radius);background:var(--tf-toast-progress-bg)}.tf-toast-progress-bar[data-v-ca0da064]{height:100%;animation-name:tf-toast-progress-ca0da064;animation-duration:var(--tf-toast-progress-duration, 5s);animation-timing-function:linear;animation-fill-mode:forwards}.tf-toast-progress-bar--default[data-v-ca0da064]{background:var(--tf-toast-accent-default)}.tf-toast-progress-bar--success[data-v-ca0da064]{background:var(--tf-toast-accent-success)}.tf-toast-progress-bar--error[data-v-ca0da064]{background:var(--tf-toast-accent-error)}.tf-toast-progress-bar--warning[data-v-ca0da064]{background:var(--tf-toast-accent-warning)}.tf-toast-progress-bar--info[data-v-ca0da064]{background:var(--tf-toast-accent-info)}@keyframes tf-toast-progress-ca0da064{0%{width:100%}to{width:0}}.tf-toast-wrapper[data-v-763aeb72]{pointer-events:auto;width:100%}.tf-toast[data-v-763aeb72]{cursor:pointer;position:relative;width:100%;--tf-toast-close-bg: var(--tf-toast-bg);--tf-toast-close-color: var(--tf-toast-color);--tf-toast-close-border-color: var(--tf-toast-border-color)}.tf-toast-accent--loading[data-v-763aeb72]{--tf-toast-bg: var(--loading-bg);--tf-toast-border-color: var(--loading-border);--tf-toast-color: var(--loading-text);--tf-toast-description-color: var(--loading-text);--tf-toast-progress-bg: color-mix( in srgb, var(--loading-text) 20%, transparent )}.tf-toast-accent--default[data-v-763aeb72]{--tf-toast-bg: var(--normal-bg);--tf-toast-border-color: var(--normal-border);--tf-toast-color: var(--normal-text);--tf-toast-description-color: var(--normal-text);--tf-toast-progress-bg: color-mix( in srgb, var(--normal-text) 20%, transparent )}.tf-toast-accent--success[data-v-763aeb72]{--tf-toast-bg: var(--success-bg);--tf-toast-border-color: var(--success-border);--tf-toast-color: var(--success-text);--tf-toast-description-color: var(--success-text);--tf-toast-progress-bg: color-mix( in srgb, var(--success-text) 20%, transparent )}.tf-toast-accent--error[data-v-763aeb72]{--tf-toast-bg: var(--error-bg);--tf-toast-border-color: var(--error-border);--tf-toast-color: var(--error-text);--tf-toast-description-color: var(--error-text);--tf-toast-progress-bg: color-mix( in srgb, var(--error-text) 20%, transparent )}.tf-toast-accent--warning[data-v-763aeb72]{--tf-toast-bg: var(--warning-bg);--tf-toast-border-color: var(--warning-border);--tf-toast-color: var(--warning-text);--tf-toast-description-color: var(--warning-text);--tf-toast-progress-bg: color-mix( in srgb, var(--warning-text) 20%, transparent )}.tf-toast-accent--info[data-v-763aeb72]{--tf-toast-bg: var(--info-bg);--tf-toast-border-color: var(--info-border);--tf-toast-color: var(--info-text);--tf-toast-description-color: var(--info-text);--tf-toast-progress-bg: color-mix(in srgb, var(--info-text) 20%, transparent)}.tf-toast-surface[data-v-763aeb72]{position:relative;display:block;min-width:0;padding:var(--tf-toast-padding);border-radius:var(--tf-toast-radius);background-color:var(--tf-toast-bg);color:var(--tf-toast-color);border:1px solid var(--tf-toast-border-color);font-family:var(--tf-toast-font-family);overflow:hidden}.tf-toast-main[data-v-763aeb72]{display:flex;align-items:center;gap:var(--tf-toast-gap)}.tf-toast-icon-spin[data-v-763aeb72]{display:inline-block;animation:tf-toast-spin-763aeb72 .8s linear infinite;transform-origin:center}@keyframes tf-toast-spin-763aeb72{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.tf-toast-icon-svg[data-v-763aeb72]{width:var(--tf-toast-icon-size);height:var(--tf-toast-icon-size)}.tf-toast-icon--loading .tf-toast-icon-svg[data-v-763aeb72]{color:var(--tf-toast-icon-loading)}.tf-toast-icon--default .tf-toast-icon-svg[data-v-763aeb72]{color:var(--tf-toast-icon-default)}.tf-toast-icon--success .tf-toast-icon-svg[data-v-763aeb72]{color:var(--tf-toast-icon-success)}.tf-toast-icon--error .tf-toast-icon-svg[data-v-763aeb72]{color:var(--tf-toast-icon-error)}.tf-toast-icon--warning .tf-toast-icon-svg[data-v-763aeb72]{color:var(--tf-toast-icon-warning)}.tf-toast-icon--info .tf-toast-icon-svg[data-v-763aeb72]{color:var(--tf-toast-icon-info)}.tf-toast-body[data-v-763aeb72]{position:relative;z-index:1;min-width:0;flex:1 1 auto;display:flex;flex-direction:column}.tf-toast-created-at[data-v-763aeb72]{position:absolute;bottom:0;right:0;color:var(--tf-toast-description-color);font-size:var(--tf-toast-created-at-font-size);font-style:italic}.tf-toast-title[data-v-763aeb72]{margin:0;font-size:var(--tf-toast-title-font-size);font-weight:var(--tf-toast-title-font-weight);line-height:1.25;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.tf-toast-description[data-v-763aeb72]{margin:0;font-size:var(--tf-toast-description-font-size);color:var(--tf-toast-description-color)}.tf-toast-close[data-v-763aeb72]{position:absolute;top:0;right:0;transform:translate(40%,-40%);height:var(--tf-toast-close-size);width:var(--tf-toast-close-size);border-radius:999px;border:1px solid var(--tf-toast-close-border-color);background:var(--tf-toast-close-bg);color:var(--tf-toast-close-color);font-size:11px;display:inline-flex;align-items:center;justify-content:center;padding:0;cursor:pointer;z-index:2}.tf-toast-close-icon[data-v-763aeb72]{width:12px;height:12px}.tf-toast-close[data-v-763aeb72]:focus-visible{outline:2px solid var(--tf-toast-close-ring-color);outline-offset:2px}.tf-toast-progress-wrapper[data-v-763aeb72]{position:absolute;left:0;right:0;bottom:0;margin:0}.tf-toast-root[data-v-65f94eb4]{pointer-events:none;position:fixed;inset:0}.tf-toast-stack[data-v-65f94eb4]{position:absolute;height:100%;display:flex;align-items:flex-start}.tf-toast-stack-inner[data-v-65f94eb4]{display:flex;flex-direction:column;position:relative;width:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding-top:var(--tf-toast-stack-padding-top);padding-right:var(--tf-toast-stack-padding-right);padding-bottom:var(--tf-toast-stack-padding-bottom);padding-left:var(--tf-toast-stack-padding-left);scroll-padding:var(--tf-toast-stack-padding-top) var(--tf-toast-stack-padding-right) var(--tf-toast-stack-padding-bottom) var(--tf-toast-stack-padding-left);box-sizing:border-box}.tf-toast-stack-inner--bottom[data-v-65f94eb4]{min-height:100%;justify-content:flex-end}.tf-toast-stack--left[data-v-65f94eb4]{justify-content:flex-start}.tf-toast-stack--center[data-v-65f94eb4]{justify-content:center}.tf-toast-stack--right[data-v-65f94eb4]{justify-content:flex-end}.tf-toast-item[data-v-65f94eb4]{pointer-events:auto;width:100%}
package/package.json CHANGED
@@ -20,12 +20,11 @@
20
20
  "url": "https://github.com/adrianjanocko/toastflow.git",
21
21
  "directory": "packages/vue"
22
22
  },
23
- "version": "1.0.6",
23
+ "version": "1.0.7",
24
24
  "main": "src/index.ts",
25
25
  "module": "src/index.ts",
26
26
  "types": "src/index.ts",
27
27
  "scripts": {
28
- "prepack": "node ../../scripts/sync-readme.js && pnpm run build",
29
28
  "build": "vite build",
30
29
  "test": "vitest"
31
30
  },
@@ -232,8 +232,8 @@ function useAria(toast: Ref<ToastInstance>) {
232
232
 
233
233
  function useProgress(
234
234
  toast: Ref<ToastInstance>,
235
- progressResetKey?: Ref<number>,
236
- duplicateKey?: Ref<number>,
235
+ progressResetKey?: Ref<number | undefined>,
236
+ duplicateKey?: Ref<number | undefined>,
237
237
  ) {
238
238
  const progressStyle = computed(function (): CSSProperties {
239
239
  return {
@@ -278,7 +278,10 @@ function useProgress(
278
278
  };
279
279
  }
280
280
 
281
- function useAnimations(duplicateKey?: Ref<number>, updateKey?: Ref<number>) {
281
+ function useAnimations(
282
+ duplicateKey?: Ref<number | undefined>,
283
+ updateKey?: Ref<number | undefined>,
284
+ ) {
282
285
  const isBumped = ref(false);
283
286
  const isUpdated = ref(false);
284
287