{"version":3,"sources":["../src/core/types.ts","../src/core/utils.ts","../src/core/store.ts","../src/core/toast.ts","../src/core/use-toaster.ts","../src/components/toast-bar.tsx","../src/components/toast-icon.tsx","../src/components/error.tsx","../src/components/loader.tsx","../src/components/checkmark.tsx","../src/components/toaster.tsx","../src/index.ts"],"sourcesContent":["import { CSSProperties } from 'react';\n\nexport type ToastType = 'success' | 'error' | 'loading' | 'blank' | 'custom';\nexport type ToastPosition =\n | 'top-left'\n | 'top-center'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'bottom-right';\n\nexport type Renderable = React.ReactElement | string | null;\n\nexport interface IconTheme {\n primary: string;\n secondary: string;\n}\n\nexport type ValueFunction = (arg: TArg) => TValue;\nexport type ValueOrFunction =\n | TValue\n | ValueFunction;\n\nconst isFunction = (\n valOrFunction: ValueOrFunction\n): valOrFunction is ValueFunction =>\n typeof valOrFunction === 'function';\n\nexport const resolveValue = (\n valOrFunction: ValueOrFunction,\n arg: TArg\n): TValue => (isFunction(valOrFunction) ? valOrFunction(arg) : valOrFunction);\n\nexport interface Toast {\n type: ToastType;\n id: string;\n message: ValueOrFunction;\n icon?: Renderable;\n duration?: number;\n pauseDuration: number;\n position?: ToastPosition;\n removeDelay?: number;\n\n ariaProps: {\n role: 'status' | 'alert';\n 'aria-live': 'assertive' | 'off' | 'polite';\n };\n\n style?: CSSProperties;\n className?: string;\n iconTheme?: IconTheme;\n\n createdAt: number;\n visible: boolean;\n dismissed: boolean;\n height?: number;\n}\n\nexport type ToastOptions = Partial<\n Pick<\n Toast,\n | 'id'\n | 'icon'\n | 'duration'\n | 'ariaProps'\n | 'className'\n | 'style'\n | 'position'\n | 'iconTheme'\n | 'removeDelay'\n >\n>;\n\nexport type DefaultToastOptions = ToastOptions & {\n [key in ToastType]?: ToastOptions;\n};\n\nexport interface ToasterProps {\n position?: ToastPosition;\n toastOptions?: DefaultToastOptions;\n reverseOrder?: boolean;\n gutter?: number;\n containerStyle?: React.CSSProperties;\n containerClassName?: string;\n children?: (toast: Toast) => React.ReactElement;\n}\n\nexport interface ToastWrapperProps {\n id: string;\n className?: string;\n style?: React.CSSProperties;\n onHeightUpdate: (id: string, height: number) => void;\n children?: React.ReactNode;\n}\n","export const genId = (() => {\n let count = 0;\n return () => {\n return (++count).toString();\n };\n})();\n\nexport const prefersReducedMotion = (() => {\n // Cache result\n let shouldReduceMotion: boolean | undefined = undefined;\n\n return () => {\n if (shouldReduceMotion === undefined && typeof window !== 'undefined') {\n const mediaQuery = matchMedia('(prefers-reduced-motion: reduce)');\n shouldReduceMotion = !mediaQuery || mediaQuery.matches;\n }\n return shouldReduceMotion;\n };\n})();\n","import { useEffect, useState, useRef } from 'react';\nimport { DefaultToastOptions, Toast, ToastType } from './types';\n\nconst TOAST_LIMIT = 20;\n\nexport enum ActionType {\n ADD_TOAST,\n UPDATE_TOAST,\n UPSERT_TOAST,\n DISMISS_TOAST,\n REMOVE_TOAST,\n START_PAUSE,\n END_PAUSE,\n}\n\ntype Action =\n | {\n type: ActionType.ADD_TOAST;\n toast: Toast;\n }\n | {\n type: ActionType.UPSERT_TOAST;\n toast: Toast;\n }\n | {\n type: ActionType.UPDATE_TOAST;\n toast: Partial;\n }\n | {\n type: ActionType.DISMISS_TOAST;\n toastId?: string;\n }\n | {\n type: ActionType.REMOVE_TOAST;\n toastId?: string;\n }\n | {\n type: ActionType.START_PAUSE;\n time: number;\n }\n | {\n type: ActionType.END_PAUSE;\n time: number;\n };\n\ninterface State {\n toasts: Toast[];\n pausedAt: number | undefined;\n}\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case ActionType.ADD_TOAST:\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\n };\n\n case ActionType.UPDATE_TOAST:\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === action.toast.id ? { ...t, ...action.toast } : t\n ),\n };\n\n case ActionType.UPSERT_TOAST:\n const { toast } = action;\n return reducer(state, {\n type: state.toasts.find((t) => t.id === toast.id)\n ? ActionType.UPDATE_TOAST\n : ActionType.ADD_TOAST,\n toast,\n });\n\n case ActionType.DISMISS_TOAST:\n const { toastId } = action;\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n dismissed: true,\n visible: false,\n }\n : t\n ),\n };\n case ActionType.REMOVE_TOAST:\n if (action.toastId === undefined) {\n return {\n ...state,\n toasts: [],\n };\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\n };\n\n case ActionType.START_PAUSE:\n return {\n ...state,\n pausedAt: action.time,\n };\n\n case ActionType.END_PAUSE:\n const diff = action.time - (state.pausedAt || 0);\n\n return {\n ...state,\n pausedAt: undefined,\n toasts: state.toasts.map((t) => ({\n ...t,\n pauseDuration: t.pauseDuration + diff,\n })),\n };\n }\n};\n\nconst listeners: Array<(state: State) => void> = [];\n\nlet memoryState: State = { toasts: [], pausedAt: undefined };\n\nexport const dispatch = (action: Action) => {\n memoryState = reducer(memoryState, action);\n listeners.forEach((listener) => {\n listener(memoryState);\n });\n};\n\nexport const defaultTimeouts: {\n [key in ToastType]: number;\n} = {\n blank: 4000,\n error: 4000,\n success: 2000,\n loading: Infinity,\n custom: 4000,\n};\n\nexport const useStore = (toastOptions: DefaultToastOptions = {}): State => {\n const [state, setState] = useState(memoryState);\n const initial = useRef(memoryState);\n\n // TODO: Switch to useSyncExternalStore when targeting React 18+\n useEffect(() => {\n if (initial.current !== memoryState) {\n setState(memoryState);\n }\n listeners.push(setState);\n return () => {\n const index = listeners.indexOf(setState);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n };\n }, []);\n\n const mergedToasts = state.toasts.map((t) => ({\n ...toastOptions,\n ...toastOptions[t.type],\n ...t,\n removeDelay:\n t.removeDelay ||\n toastOptions[t.type]?.removeDelay ||\n toastOptions?.removeDelay,\n duration:\n t.duration ||\n toastOptions[t.type]?.duration ||\n toastOptions?.duration ||\n defaultTimeouts[t.type],\n style: {\n ...toastOptions.style,\n ...toastOptions[t.type]?.style,\n ...t.style,\n },\n }));\n\n return {\n ...state,\n toasts: mergedToasts,\n };\n};\n","import {\n Renderable,\n Toast,\n ToastOptions,\n ToastType,\n DefaultToastOptions,\n ValueOrFunction,\n resolveValue,\n} from './types';\nimport { genId } from './utils';\nimport { dispatch, ActionType } from './store';\n\ntype Message = ValueOrFunction;\n\ntype ToastHandler = (message: Message, options?: ToastOptions) => string;\n\nconst createToast = (\n message: Message,\n type: ToastType = 'blank',\n opts?: ToastOptions\n): Toast => ({\n createdAt: Date.now(),\n visible: true,\n dismissed: false,\n type,\n ariaProps: {\n role: 'status',\n 'aria-live': 'polite',\n },\n message,\n pauseDuration: 0,\n ...opts,\n id: opts?.id || genId(),\n});\n\nconst createHandler =\n (type?: ToastType): ToastHandler =>\n (message, options) => {\n const toast = createToast(message, type, options);\n dispatch({ type: ActionType.UPSERT_TOAST, toast });\n return toast.id;\n };\n\nconst toast = (message: Message, opts?: ToastOptions) =>\n createHandler('blank')(message, opts);\n\ntoast.error = createHandler('error');\ntoast.success = createHandler('success');\ntoast.loading = createHandler('loading');\ntoast.custom = createHandler('custom');\n\ntoast.dismiss = (toastId?: string) => {\n dispatch({\n type: ActionType.DISMISS_TOAST,\n toastId,\n });\n};\n\ntoast.remove = (toastId?: string) =>\n dispatch({ type: ActionType.REMOVE_TOAST, toastId });\n\ntoast.promise = (\n promise: Promise | (() => Promise),\n msgs: {\n loading: Renderable;\n success?: ValueOrFunction;\n error?: ValueOrFunction;\n },\n opts?: DefaultToastOptions\n) => {\n const id = toast.loading(msgs.loading, { ...opts, ...opts?.loading });\n\n if (typeof promise === 'function') {\n promise = promise();\n }\n\n promise\n .then((p) => {\n const successMessage = msgs.success\n ? resolveValue(msgs.success, p)\n : undefined;\n\n if (successMessage) {\n toast.success(successMessage, {\n id,\n ...opts,\n ...opts?.success,\n });\n } else {\n toast.dismiss(id);\n }\n return p;\n })\n .catch((e) => {\n const errorMessage = msgs.error ? resolveValue(msgs.error, e) : undefined;\n\n if (errorMessage) {\n toast.error(errorMessage, {\n id,\n ...opts,\n ...opts?.error,\n });\n } else {\n toast.dismiss(id);\n }\n });\n\n return promise;\n};\n\nexport { toast };\n","import { useEffect, useCallback } from 'react';\nimport { dispatch, ActionType, useStore } from './store';\nimport { toast } from './toast';\nimport { DefaultToastOptions, Toast, ToastPosition } from './types';\n\nconst updateHeight = (toastId: string, height: number) => {\n dispatch({\n type: ActionType.UPDATE_TOAST,\n toast: { id: toastId, height },\n });\n};\nconst startPause = () => {\n dispatch({\n type: ActionType.START_PAUSE,\n time: Date.now(),\n });\n};\n\nconst toastTimeouts = new Map>();\n\nexport const REMOVE_DELAY = 1000;\n\nconst addToRemoveQueue = (toastId: string, removeDelay = REMOVE_DELAY) => {\n if (toastTimeouts.has(toastId)) {\n return;\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId);\n dispatch({\n type: ActionType.REMOVE_TOAST,\n toastId: toastId,\n });\n }, removeDelay);\n\n toastTimeouts.set(toastId, timeout);\n};\n\nexport const useToaster = (toastOptions?: DefaultToastOptions) => {\n const { toasts, pausedAt } = useStore(toastOptions);\n\n useEffect(() => {\n if (pausedAt) {\n return;\n }\n\n const now = Date.now();\n const timeouts = toasts.map((t) => {\n if (t.duration === Infinity) {\n return;\n }\n\n const durationLeft =\n (t.duration || 0) + t.pauseDuration - (now - t.createdAt);\n\n if (durationLeft < 0) {\n if (t.visible) {\n toast.dismiss(t.id);\n }\n return;\n }\n return setTimeout(() => toast.dismiss(t.id), durationLeft);\n });\n\n return () => {\n timeouts.forEach((timeout) => timeout && clearTimeout(timeout));\n };\n }, [toasts, pausedAt]);\n\n const endPause = useCallback(() => {\n if (pausedAt) {\n dispatch({ type: ActionType.END_PAUSE, time: Date.now() });\n }\n }, [pausedAt]);\n\n const calculateOffset = useCallback(\n (\n toast: Toast,\n opts?: {\n reverseOrder?: boolean;\n gutter?: number;\n defaultPosition?: ToastPosition;\n }\n ) => {\n const { reverseOrder = false, gutter = 8, defaultPosition } = opts || {};\n\n const relevantToasts = toasts.filter(\n (t) =>\n (t.position || defaultPosition) ===\n (toast.position || defaultPosition) && t.height\n );\n const toastIndex = relevantToasts.findIndex((t) => t.id === toast.id);\n const toastsBefore = relevantToasts.filter(\n (toast, i) => i < toastIndex && toast.visible\n ).length;\n\n const offset = relevantToasts\n .filter((t) => t.visible)\n .slice(...(reverseOrder ? [toastsBefore + 1] : [0, toastsBefore]))\n .reduce((acc, t) => acc + (t.height || 0) + gutter, 0);\n\n return offset;\n },\n [toasts]\n );\n\n useEffect(() => {\n // Add dismissed toasts to remove queue\n toasts.forEach((toast) => {\n if (toast.dismissed) {\n addToRemoveQueue(toast.id, toast.removeDelay);\n } else {\n // If toast becomes visible again, remove it from the queue\n const timeout = toastTimeouts.get(toast.id);\n if (timeout) {\n clearTimeout(timeout);\n toastTimeouts.delete(toast.id);\n }\n }\n });\n }, [toasts]);\n\n return {\n toasts,\n handlers: {\n updateHeight,\n startPause,\n endPause,\n calculateOffset,\n },\n };\n};\n","import * as React from 'react';\nimport { styled, keyframes } from 'goober';\n\nimport { Toast, ToastPosition, resolveValue, Renderable } from '../core/types';\nimport { ToastIcon } from './toast-icon';\nimport { prefersReducedMotion } from '../core/utils';\n\nconst enterAnimation = (factor: number) => `\n0% {transform: translate3d(0,${factor * -200}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`;\n\nconst exitAnimation = (factor: number) => `\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${factor * -150}%,-1px) scale(.6); opacity:0;}\n`;\n\nconst fadeInAnimation = `0%{opacity:0;} 100%{opacity:1;}`;\nconst fadeOutAnimation = `0%{opacity:1;} 100%{opacity:0;}`;\n\nconst ToastBarBase = styled('div')`\n display: flex;\n align-items: center;\n background: #fff;\n color: #363636;\n line-height: 1.3;\n will-change: transform;\n box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);\n max-width: 350px;\n pointer-events: auto;\n padding: 8px 10px;\n border-radius: 8px;\n`;\n\nconst Message = styled('div')`\n display: flex;\n justify-content: center;\n margin: 4px 10px;\n color: inherit;\n flex: 1 1 auto;\n white-space: pre-line;\n`;\n\ninterface ToastBarProps {\n toast: Toast;\n position?: ToastPosition;\n style?: React.CSSProperties;\n children?: (components: {\n icon: Renderable;\n message: Renderable;\n }) => Renderable;\n}\n\nconst getAnimationStyle = (\n position: ToastPosition,\n visible: boolean\n): React.CSSProperties => {\n const top = position.includes('top');\n const factor = top ? 1 : -1;\n\n const [enter, exit] = prefersReducedMotion()\n ? [fadeInAnimation, fadeOutAnimation]\n : [enterAnimation(factor), exitAnimation(factor)];\n\n return {\n animation: visible\n ? `${keyframes(enter)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`\n : `${keyframes(exit)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`,\n };\n};\n\nexport const ToastBar: React.FC = React.memo(\n ({ toast, position, style, children }) => {\n const animationStyle: React.CSSProperties = toast.height\n ? getAnimationStyle(\n toast.position || position || 'top-center',\n toast.visible\n )\n : { opacity: 0 };\n\n const icon = ;\n const message = (\n \n {resolveValue(toast.message, toast)}\n \n );\n\n return (\n \n {typeof children === 'function' ? (\n children({\n icon,\n message,\n })\n ) : (\n <>\n {icon}\n {message}\n \n )}\n \n );\n }\n);\n","import * as React from 'react';\nimport { styled, keyframes } from 'goober';\n\nimport { Toast } from '../core/types';\nimport { ErrorIcon, ErrorTheme } from './error';\nimport { LoaderIcon, LoaderTheme } from './loader';\nimport { CheckmarkIcon, CheckmarkTheme } from './checkmark';\n\nconst StatusWrapper = styled('div')`\n position: absolute;\n`;\n\nconst IndicatorWrapper = styled('div')`\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 20px;\n min-height: 20px;\n`;\n\nconst enter = keyframes`\nfrom {\n transform: scale(0.6);\n opacity: 0.4;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}`;\n\nexport const AnimatedIconWrapper = styled('div')`\n position: relative;\n transform: scale(0.6);\n opacity: 0.4;\n min-width: 20px;\n animation: ${enter} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n`;\n\nexport type IconThemes = Partial<{\n success: CheckmarkTheme;\n error: ErrorTheme;\n loading: LoaderTheme;\n}>;\n\nexport const ToastIcon: React.FC<{\n toast: Toast;\n}> = ({ toast }) => {\n const { icon, type, iconTheme } = toast;\n if (icon !== undefined) {\n if (typeof icon === 'string') {\n return {icon};\n } else {\n return icon;\n }\n }\n\n if (type === 'blank') {\n return null;\n }\n\n return (\n \n \n {type !== 'loading' && (\n \n {type === 'error' ? (\n \n ) : (\n \n )}\n \n )}\n \n );\n};\n","import { styled, keyframes } from 'goober';\n\nconst circleAnimation = keyframes`\nfrom {\n transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n opacity: 1;\n}`;\n\nconst firstLineAnimation = keyframes`\nfrom {\n transform: scale(0);\n opacity: 0;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}`;\n\nconst secondLineAnimation = keyframes`\nfrom {\n transform: scale(0) rotate(90deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(90deg);\n\topacity: 1;\n}`;\n\nexport interface ErrorTheme {\n primary?: string;\n secondary?: string;\n}\n\nexport const ErrorIcon = styled('div')`\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ${(p) => p.primary || '#ff4b4b'};\n position: relative;\n transform: rotate(45deg);\n\n animation: ${circleAnimation} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n\n &:after,\n &:before {\n content: '';\n animation: ${firstLineAnimation} 0.15s ease-out forwards;\n animation-delay: 150ms;\n position: absolute;\n border-radius: 3px;\n opacity: 0;\n background: ${(p) => p.secondary || '#fff'};\n bottom: 9px;\n left: 4px;\n height: 2px;\n width: 12px;\n }\n\n &:before {\n animation: ${secondLineAnimation} 0.15s ease-out forwards;\n animation-delay: 180ms;\n transform: rotate(90deg);\n }\n`;\n","import { styled, keyframes } from 'goober';\n\nconst rotate = keyframes`\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n`;\n\nexport interface LoaderTheme {\n primary?: string;\n secondary?: string;\n}\n\nexport const LoaderIcon = styled('div')`\n width: 12px;\n height: 12px;\n box-sizing: border-box;\n border: 2px solid;\n border-radius: 100%;\n border-color: ${(p) => p.secondary || '#e0e0e0'};\n border-right-color: ${(p) => p.primary || '#616161'};\n animation: ${rotate} 1s linear infinite;\n`;\n","import { styled, keyframes } from 'goober';\n\nconst circleAnimation = keyframes`\nfrom {\n transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n\topacity: 1;\n}`;\n\nconst checkmarkAnimation = keyframes`\n0% {\n\theight: 0;\n\twidth: 0;\n\topacity: 0;\n}\n40% {\n height: 0;\n\twidth: 6px;\n\topacity: 1;\n}\n100% {\n opacity: 1;\n height: 10px;\n}`;\n\nexport interface CheckmarkTheme {\n primary?: string;\n secondary?: string;\n}\n\nexport const CheckmarkIcon = styled('div')`\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ${(p) => p.primary || '#61d345'};\n position: relative;\n transform: rotate(45deg);\n\n animation: ${circleAnimation} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n &:after {\n content: '';\n box-sizing: border-box;\n animation: ${checkmarkAnimation} 0.2s ease-out forwards;\n opacity: 0;\n animation-delay: 200ms;\n position: absolute;\n border-right: 2px solid;\n border-bottom: 2px solid;\n border-color: ${(p) => p.secondary || '#fff'};\n bottom: 6px;\n left: 6px;\n height: 10px;\n width: 6px;\n }\n`;\n","import { css, setup } from 'goober';\nimport * as React from 'react';\nimport {\n resolveValue,\n ToasterProps,\n ToastPosition,\n ToastWrapperProps,\n} from '../core/types';\nimport { useToaster } from '../core/use-toaster';\nimport { prefersReducedMotion } from '../core/utils';\nimport { ToastBar } from './toast-bar';\n\nsetup(React.createElement);\n\nconst ToastWrapper = ({\n id,\n className,\n style,\n onHeightUpdate,\n children,\n}: ToastWrapperProps) => {\n const ref = React.useCallback(\n (el: HTMLElement | null) => {\n if (el) {\n const updateHeight = () => {\n const height = el.getBoundingClientRect().height;\n onHeightUpdate(id, height);\n };\n updateHeight();\n new MutationObserver(updateHeight).observe(el, {\n subtree: true,\n childList: true,\n characterData: true,\n });\n }\n },\n [id, onHeightUpdate]\n );\n\n return (\n
\n {children}\n
\n );\n};\n\nconst getPositionStyle = (\n position: ToastPosition,\n offset: number\n): React.CSSProperties => {\n const top = position.includes('top');\n const verticalStyle: React.CSSProperties = top ? { top: 0 } : { bottom: 0 };\n const horizontalStyle: React.CSSProperties = position.includes('center')\n ? {\n justifyContent: 'center',\n }\n : position.includes('right')\n ? {\n justifyContent: 'flex-end',\n }\n : {};\n return {\n left: 0,\n right: 0,\n display: 'flex',\n position: 'absolute',\n transition: prefersReducedMotion()\n ? undefined\n : `all 230ms cubic-bezier(.21,1.02,.73,1)`,\n transform: `translateY(${offset * (top ? 1 : -1)}px)`,\n ...verticalStyle,\n ...horizontalStyle,\n };\n};\n\nconst activeClass = css`\n z-index: 9999;\n > * {\n pointer-events: auto;\n }\n`;\n\nconst DEFAULT_OFFSET = 16;\n\nexport const Toaster: React.FC = ({\n reverseOrder,\n position = 'top-center',\n toastOptions,\n gutter,\n children,\n containerStyle,\n containerClassName,\n}) => {\n const { toasts, handlers } = useToaster(toastOptions);\n\n return (\n \n {toasts.map((t) => {\n const toastPosition = t.position || position;\n const offset = handlers.calculateOffset(t, {\n reverseOrder,\n gutter,\n defaultPosition: position,\n });\n const positionStyle = getPositionStyle(toastPosition, offset);\n\n return (\n \n {t.type === 'custom' ? (\n resolveValue(t.message, t)\n ) : children ? (\n children(t)\n ) : (\n \n )}\n \n );\n })}\n \n );\n};\n","import { toast } from './core/toast';\n\nexport * from './headless';\n\nexport { ToastBar } from './components/toast-bar';\nexport { ToastIcon } from './components/toast-icon';\nexport { Toaster } from './components/toaster';\nexport { CheckmarkIcon } from './components/checkmark';\nexport { ErrorIcon } from './components/error';\nexport { LoaderIcon } from './components/loader';\n\nexport { toast };\nexport default toast;\n"],"mappings":";AAuBA,IAAMA,EACJC,GAEA,OAAOA,GAAkB,WAEdC,EAAe,CAC1BD,EACAE,IACYH,EAAWC,CAAa,EAAIA,EAAcE,CAAG,EAAIF,EC/BxD,IAAMG,GAAS,IAAM,CAC1B,IAAIC,EAAQ,EACZ,MAAO,KACG,EAAEA,GAAO,SAAS,CAE9B,GAAG,EAEUC,GAAwB,IAAM,CAEzC,IAAIC,EAEJ,MAAO,IAAM,CACX,GAAIA,IAAuB,QAAa,OAAO,OAAW,IAAa,CACrE,IAAMC,EAAa,WAAW,kCAAkC,EAChED,EAAqB,CAACC,GAAcA,EAAW,QAEjD,OAAOD,CACT,CACF,GAAG,EClBH,OAAS,aAAAE,EAAW,YAAAC,EAAU,UAAAC,MAAc,QAG5C,IAAMC,EAAc,GA+Cb,IAAMC,EAAU,CAACC,EAAcC,IAA0B,CAC9D,OAAQA,EAAO,KAAM,CACnB,IAAK,GACH,MAAO,CACL,GAAGD,EACH,OAAQ,CAACC,EAAO,MAAO,GAAGD,EAAM,MAAM,EAAE,MAAM,EAAGE,CAAW,CAC9D,EAEF,IAAK,GACH,MAAO,CACL,GAAGF,EACH,OAAQA,EAAM,OAAO,IAAKG,GACxBA,EAAE,KAAOF,EAAO,MAAM,GAAK,CAAE,GAAGE,EAAG,GAAGF,EAAO,KAAM,EAAIE,CACzD,CACF,EAEF,IAAK,GACH,GAAM,CAAE,MAAAC,CAAM,EAAIH,EAClB,OAAOF,EAAQC,EAAO,CACpB,KAAMA,EAAM,OAAO,KAAMG,GAAMA,EAAE,KAAOC,EAAM,EAAE,EAC5C,EACA,EACJ,MAAAA,CACF,CAA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A,EACR,cAAe,OACf,GAAGK,CACL,EACA,UAAWC,EACX,aAAcE,EAAS,WACvB,aAAcA,EAAS,UAEtBD,EAAO,IAAKG,GAAM,CACjB,IAAMC,EAAgBD,EAAE,UAAYlB,EAC9BC,EAASe,EAAS,gBAAgBE,EAAG,CACzC,aAAAR,EACA,OAAAE,EACA,gBAAiBZ,CACnB,CAAC,EACKoB,EAAgBrB,GAAiBoB,EAAelB,CAAM,EAE5D,OACE,gBAACZ,GAAA,CACC,GAAI6B,EAAE,GACN,IAAKA,EAAE,GACP,eAAgBF,EAAS,aACzB,UAAWE,EAAE,QAAUZ,GAAc,GACrC,MAAOc,GAENF,EAAE,OAAS,SACVG,EAAaH,EAAE,QAASA,CAAC,EACvBxB,EACFA,EAASwB,CAAC,EAEV,gBAACI,EAAA,CAAS,MAAOJ,EAAG,SAAUC,EAAe,CAEjD,CAEJ,CAAC,CACH,CAEJ,ECjIA,IAAOI,GAAQC","names":["isFunction","valOrFunction","resolveValue","arg","genId","count","prefersReducedMotion","shouldReduceMotion","mediaQuery","useEffect","useState","useRef","TOAST_LIMIT","reducer","state","action","TOAST_LIMIT","t","toast","toastId","diff","listeners","memoryState","dispatch","listener","defaultTimeouts","useStore","toastOptions","setState","useState","initial","useRef","useEffect","index","mergedToasts","_a","_b","_c","createToast","message","type","opts","genId","createHandler","options","toast","dispatch","toastId","promise","msgs","id","p","successMessage","resolveValue","e","errorMessage","useEffect","useCallback","updateHeight","toastId","height","dispatch","startPause","toastTimeouts","REMOVE_DELAY","addToRemoveQueue","removeDelay","timeout","useToaster","toastOptions","toasts","pausedAt","useStore","useEffect","now","timeouts","t","durationLeft","toast","endPause","useCallback","calculateOffset","opts","reverseOrder","gutter","defaultPosition","relevantToasts","toastIndex","toastsBefore","i","acc","React","styled","keyframes","React","styled","keyframes","styled","keyframes","circleAnimation","firstLineAnimation","secondLineAnimation","ErrorIcon","p","styled","keyframes","rotate","LoaderIcon","p","styled","keyframes","circleAnimation","checkmarkAnimation","CheckmarkIcon","p","StatusWrapper","styled","IndicatorWrapper","enter","keyframes","AnimatedIconWrapper","ToastIcon","toast","icon","type","iconTheme","LoaderIcon","ErrorIcon","CheckmarkIcon","enterAnimation","factor","exitAnimation","fadeInAnimation","fadeOutAnimation","ToastBarBase","styled","Message","getAnimationStyle","position","visible","enter","exit","prefersReducedMotion","keyframes","ToastBar","toast","style","children","animationStyle","icon","ToastIcon","message","resolveValue","css","setup","React","setup","ToastWrapper","id","className","style","onHeightUpdate","children","ref","el","updateHeight","height","getPositionStyle","position","offset","top","verticalStyle","horizontalStyle","prefersReducedMotion","activeClass","css","DEFAULT_OFFSET","Toaster","reverseOrder","toastOptions","gutter","containerStyle","containerClassName","toasts","handlers","useToaster","t","toastPosition","positionStyle","resolveValue","ToastBar","src_default","toast"]}