react-toast-msg 2.5.7 → 2.5.8
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/LICENSE.md +21 -21
- package/README.md +11 -140
- package/dist/index.d.mts +12 -5
- package/dist/index.d.ts +12 -5
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +64 -64
package/LICENSE.md
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 SudhuCodes
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 SudhuCodes
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,140 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-

|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
## License
|
|
135
|
-
|
|
136
|
-
react-toast-msg is [MIT licensed](./LICENSE).
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
<p align="center"> <sub>© 2025 SudhuCodes — All rights reserved.</sub> </p>
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# React Toast MSG
|
|
4
|
+
|
|
5
|
+
A lightweight and customizable React toast notification library.
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
Learn more: [Documentation](https://rtm.sudhucodes.com/docs)
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
type ToastType = 'success' | 'error' | 'warning' | 'default';
|
|
3
|
+
type ToastType = 'success' | 'error' | 'warning' | 'default' | 'loading';
|
|
4
4
|
type ToastOptions = {
|
|
5
|
+
id?: string | number;
|
|
5
6
|
type?: ToastType;
|
|
6
7
|
duration?: number;
|
|
7
8
|
closeButton?: boolean;
|
|
@@ -12,11 +13,17 @@ interface ToastContainerProps {
|
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
declare function ToastContainer({ autoClose, closeButton }: ToastContainerProps): react_jsx_runtime.JSX.Element;
|
|
15
|
-
declare function toast(message: string, options?: ToastOptions):
|
|
16
|
+
declare function toast(message: string, options?: ToastOptions): string | number | undefined;
|
|
16
17
|
declare namespace toast {
|
|
17
|
-
var success: (message: string, options?: ToastOptions) =>
|
|
18
|
-
var error: (message: string, options?: ToastOptions) =>
|
|
19
|
-
var warning: (message: string, options?: ToastOptions) =>
|
|
18
|
+
var success: (message: string, options?: ToastOptions) => string | number | undefined;
|
|
19
|
+
var error: (message: string, options?: ToastOptions) => string | number | undefined;
|
|
20
|
+
var warning: (message: string, options?: ToastOptions) => string | number | undefined;
|
|
21
|
+
var loading: (message: string, options?: ToastOptions) => string | number | undefined;
|
|
22
|
+
var promise: <T>(promise: Promise<T>, data: {
|
|
23
|
+
loading: string;
|
|
24
|
+
success: string | ((data: T) => string);
|
|
25
|
+
error: string | ((err: unknown) => string);
|
|
26
|
+
}, options?: ToastOptions) => Promise<T>;
|
|
20
27
|
}
|
|
21
28
|
|
|
22
29
|
export { ToastContainer, type ToastType, toast };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
type ToastType = 'success' | 'error' | 'warning' | 'default';
|
|
3
|
+
type ToastType = 'success' | 'error' | 'warning' | 'default' | 'loading';
|
|
4
4
|
type ToastOptions = {
|
|
5
|
+
id?: string | number;
|
|
5
6
|
type?: ToastType;
|
|
6
7
|
duration?: number;
|
|
7
8
|
closeButton?: boolean;
|
|
@@ -12,11 +13,17 @@ interface ToastContainerProps {
|
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
declare function ToastContainer({ autoClose, closeButton }: ToastContainerProps): react_jsx_runtime.JSX.Element;
|
|
15
|
-
declare function toast(message: string, options?: ToastOptions):
|
|
16
|
+
declare function toast(message: string, options?: ToastOptions): string | number | undefined;
|
|
16
17
|
declare namespace toast {
|
|
17
|
-
var success: (message: string, options?: ToastOptions) =>
|
|
18
|
-
var error: (message: string, options?: ToastOptions) =>
|
|
19
|
-
var warning: (message: string, options?: ToastOptions) =>
|
|
18
|
+
var success: (message: string, options?: ToastOptions) => string | number | undefined;
|
|
19
|
+
var error: (message: string, options?: ToastOptions) => string | number | undefined;
|
|
20
|
+
var warning: (message: string, options?: ToastOptions) => string | number | undefined;
|
|
21
|
+
var loading: (message: string, options?: ToastOptions) => string | number | undefined;
|
|
22
|
+
var promise: <T>(promise: Promise<T>, data: {
|
|
23
|
+
loading: string;
|
|
24
|
+
success: string | ((data: T) => string);
|
|
25
|
+
error: string | ((err: unknown) => string);
|
|
26
|
+
}, options?: ToastOptions) => Promise<T>;
|
|
20
27
|
}
|
|
21
28
|
|
|
22
29
|
export { ToastContainer, type ToastType, toast };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var
|
|
2
|
+
"use strict";var B=Object.create;var v=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var W=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var F=(t,e)=>{for(var n in e)v(t,n,{get:e[n],enumerable:!0})},L=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of E(e))!D.call(t,o)&&o!==n&&v(t,o,{get:()=>e[o],enumerable:!(i=V(e,o))||i.enumerable});return t};var H=(t,e,n)=>(n=t!=null?B(W(t)):{},L(e||!t||!t.__esModule?v(n,"default",{value:t,enumerable:!0}):n,t)),q=t=>L(v({},"__esModule",{value:!0}),t);var A={};F(A,{ToastContainer:()=>R,toast:()=>r});module.exports=q(A);var x=require("react");var T=require("react");var P=require("tailwind-merge"),z=H(require("clsx"));function l(...t){return(0,P.twMerge)((0,z.default)(t))}var d=require("react/jsx-runtime");function C({message:t,type:e="default",icon:n,leaving:i,setToasts:o,id:p,closeButton:m}){let[y,a]=(0,T.useState)(!1);(0,T.useEffect)(()=>{requestAnimationFrame(()=>a(!0))},[]);let f=()=>{a(!1),setTimeout(()=>{o==null||o(c=>c.filter(I=>I.id!==p))},300)};return(0,d.jsxs)("div",{className:l("pointer-events-auto relative flex max-w-80 min-w-62 items-center gap-1 rounded-lg border border-gray-200/70 bg-white py-3 text-sm text-zinc-800 transition-all duration-300 ease-out",y&&!i?"translate-y-0 opacity-100":"translate-y-10 opacity-0",e==="default"?"px-4":"px-3"),children:[n,t,m&&(0,d.jsx)("button",{onClick:f,className:"absolute -top-2 -right-2 cursor-pointer rounded-full border border-gray-200/70 bg-white p-px text-zinc-500",children:(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"size-3",children:(0,d.jsx)("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"})})})]})}var s=require("react/jsx-runtime"),Z=({className:t})=>(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:l("size-5.5",t),height:24,width:24,children:(0,s.jsx)("path",{fillRule:"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",clipRule:"evenodd"})}),k=({className:t})=>(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:l("size-5.5",t),height:24,width:24,children:(0,s.jsx)("path",{fillRule:"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 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"})}),N=({className:t})=>(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:l("size-5.5",t),height:24,width:24,children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"})}),O=({className:t})=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:l("size-5.5 animate-spin",t),children:[(0,s.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,s.jsx)("path",{d:"M12 6l0 -3"}),(0,s.jsx)("path",{d:"M16.25 7.75l2.15 -2.15"}),(0,s.jsx)("path",{d:"M18 12l3 0"}),(0,s.jsx)("path",{d:"M16.25 16.25l2.15 2.15"}),(0,s.jsx)("path",{d:"M12 18l0 3"}),(0,s.jsx)("path",{d:"M7.75 16.25l-2.15 2.15"}),(0,s.jsx)("path",{d:"M6 12l-3 0"}),(0,s.jsx)("path",{d:"M7.75 7.75l-2.15 -2.15"})]});var h=require("react/jsx-runtime");function S(t){switch(t){case"success":return(0,h.jsx)(Z,{});case"error":return(0,h.jsx)(k,{});case"warning":return(0,h.jsx)(N,{});case"loading":return(0,h.jsx)(O,{});default:return null}}var b=require("react/jsx-runtime"),M=null;function R({autoClose:t=3e3,closeButton:e=!1}){let[n,i]=(0,x.useState)([]);return(0,x.useEffect)(()=>{M=(o,p={})=>{let{type:m="default",duration:y,closeButton:a,id:f}=p,c=f!=null?f:Date.now(),I=y||t;return i(g=>g.find(w=>w.id===c)?g.map(w=>w.id===c?{...w,message:o,type:m,leaving:!1,closeButton:a!=null?a:e}:w):[...g,{id:c,message:o,type:m,leaving:!1,closeButton:a!=null?a:e}]),m!=="loading"&&setTimeout(()=>{i(g=>g.map(u=>u.id===c?{...u,leaving:!0}:u)),setTimeout(()=>{i(g=>g.filter(u=>u.id!==c))},300)},I),c}},[t,e]),(0,b.jsx)("div",{className:l("pointer-events-none fixed inset-0 z-9999 flex flex-col items-end justify-end gap-2 p-4 text-sm"),children:n.map(o=>(0,b.jsx)(C,{id:o.id,message:o.message,setToasts:i,type:o.type,icon:S(o.type),leaving:o.leaving,closeButton:o.closeButton},o.id))})}function r(t,e){if(M)return M(t,e)}r.success=(t,e)=>r(t,{...e,type:"success"});r.error=(t,e)=>r(t,{...e,type:"error"});r.warning=(t,e)=>r(t,{...e,type:"warning"});r.loading=(t,e)=>r(t,{...e,type:"loading"});r.promise=(t,e,n)=>{let i=Date.now().toString()+Math.random().toString(36).substring(2);return r(e.loading,{...n,type:"loading",id:i,duration:1/0}),t.then(o=>{let p=typeof e.success=="function"?e.success(o):e.success;r(p,{...n,type:"success",id:i})}).catch(o=>{let p=typeof e.error=="function"?e.error(o):e.error;r(p,{...n,type:"error",id:i})}),t};0&&(module.exports={ToastContainer,toast});
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{useState as
|
|
2
|
+
import{useState as R,useEffect as B}from"react";import{useEffect as k,useState as N}from"react";import{twMerge as C}from"tailwind-merge";import Z from"clsx";function a(...t){return C(Z(t))}import{jsx as T,jsxs as O}from"react/jsx-runtime";function y({message:t,type:e="default",icon:c,leaving:r,setToasts:o,id:p,closeButton:d}){let[h,i]=N(!1);k(()=>{requestAnimationFrame(()=>i(!0))},[]);let m=()=>{i(!1),setTimeout(()=>{o==null||o(l=>l.filter(v=>v.id!==p))},300)};return O("div",{className:a("pointer-events-auto relative flex max-w-80 min-w-62 items-center gap-1 rounded-lg border border-gray-200/70 bg-white py-3 text-sm text-zinc-800 transition-all duration-300 ease-out",h&&!r?"translate-y-0 opacity-100":"translate-y-10 opacity-0",e==="default"?"px-4":"px-3"),children:[c,t,d&&T("button",{onClick:m,className:"absolute -top-2 -right-2 cursor-pointer rounded-full border border-gray-200/70 bg-white p-px text-zinc-500",children:T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"size-3",children:T("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"})})})]})}import{jsx as s,jsxs as S}from"react/jsx-runtime";var I=({className:t})=>s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:a("size-5.5",t),height:24,width:24,children:s("path",{fillRule:"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",clipRule:"evenodd"})}),M=({className:t})=>s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:a("size-5.5",t),height:24,width:24,children:s("path",{fillRule:"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 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"})}),b=({className:t})=>s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:a("size-5.5",t),height:24,width:24,children:s("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"})}),L=({className:t})=>S("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:a("size-5.5 animate-spin",t),children:[s("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),s("path",{d:"M12 6l0 -3"}),s("path",{d:"M16.25 7.75l2.15 -2.15"}),s("path",{d:"M18 12l3 0"}),s("path",{d:"M16.25 16.25l2.15 2.15"}),s("path",{d:"M12 18l0 3"}),s("path",{d:"M7.75 16.25l-2.15 2.15"}),s("path",{d:"M6 12l-3 0"}),s("path",{d:"M7.75 7.75l-2.15 -2.15"})]});import{jsx as w}from"react/jsx-runtime";function P(t){switch(t){case"success":return w(I,{});case"error":return w(M,{});case"warning":return w(b,{});case"loading":return w(L,{});default:return null}}import{jsx as z}from"react/jsx-runtime";var x=null;function V({autoClose:t=3e3,closeButton:e=!1}){let[c,r]=R([]);return B(()=>{x=(o,p={})=>{let{type:d="default",duration:h,closeButton:i,id:m}=p,l=m!=null?m:Date.now(),v=h||t;return r(g=>g.find(f=>f.id===l)?g.map(f=>f.id===l?{...f,message:o,type:d,leaving:!1,closeButton:i!=null?i:e}:f):[...g,{id:l,message:o,type:d,leaving:!1,closeButton:i!=null?i:e}]),d!=="loading"&&setTimeout(()=>{r(g=>g.map(u=>u.id===l?{...u,leaving:!0}:u)),setTimeout(()=>{r(g=>g.filter(u=>u.id!==l))},300)},v),l}},[t,e]),z("div",{className:a("pointer-events-none fixed inset-0 z-9999 flex flex-col items-end justify-end gap-2 p-4 text-sm"),children:c.map(o=>z(y,{id:o.id,message:o.message,setToasts:r,type:o.type,icon:P(o.type),leaving:o.leaving,closeButton:o.closeButton},o.id))})}function n(t,e){if(x)return x(t,e)}n.success=(t,e)=>n(t,{...e,type:"success"});n.error=(t,e)=>n(t,{...e,type:"error"});n.warning=(t,e)=>n(t,{...e,type:"warning"});n.loading=(t,e)=>n(t,{...e,type:"loading"});n.promise=(t,e,c)=>{let r=Date.now().toString()+Math.random().toString(36).substring(2);return n(e.loading,{...c,type:"loading",id:r,duration:1/0}),t.then(o=>{let p=typeof e.success=="function"?e.success(o):e.success;n(p,{...c,type:"success",id:r})}).catch(o=>{let p=typeof e.error=="function"?e.error(o):e.error;n(p,{...c,type:"error",id:r})}),t};export{V as ToastContainer,n as toast};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@source '.';
|
|
1
|
+
@source '.';
|
package/package.json
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-toast-msg",
|
|
3
|
-
"version": "2.5.
|
|
4
|
-
"description": "A lightweight, customizable React toast notification library with zero-config and fast setup.",
|
|
5
|
-
"files": [
|
|
6
|
-
"dist"
|
|
7
|
-
],
|
|
8
|
-
"scripts": {
|
|
9
|
-
"dev": "tsup --watch",
|
|
10
|
-
"prettier": "prettier --write src",
|
|
11
|
-
"build": "pnpm build:ts && pnpm build:css",
|
|
12
|
-
"build:ts": "tsup",
|
|
13
|
-
"build:css": "pnpx @tailwindcss/cli -i ./src/style.css -o ./dist/style.css"
|
|
14
|
-
},
|
|
15
|
-
"main": "dist/index.js",
|
|
16
|
-
"module": "dist/index.mjs",
|
|
17
|
-
"types": "dist/index.d.ts",
|
|
18
|
-
"exports": {
|
|
19
|
-
".": {
|
|
20
|
-
"import": "./dist/index.mjs",
|
|
21
|
-
"require": "./dist/index.js"
|
|
22
|
-
},
|
|
23
|
-
"./style.css": "./dist/style.css"
|
|
24
|
-
},
|
|
25
|
-
"keywords": [
|
|
26
|
-
"react",
|
|
27
|
-
"toast",
|
|
28
|
-
"notification",
|
|
29
|
-
"react-toast",
|
|
30
|
-
"react-toastify",
|
|
31
|
-
"snackbar",
|
|
32
|
-
"react-toast-msg",
|
|
33
|
-
"rtm",
|
|
34
|
-
"toast-component"
|
|
35
|
-
],
|
|
36
|
-
"author": "SudhuCodes",
|
|
37
|
-
"license": "MIT",
|
|
38
|
-
"repository": {
|
|
39
|
-
"type": "git",
|
|
40
|
-
"url": "https://github.com/sudhucodes/react-toast-msg.git"
|
|
41
|
-
},
|
|
42
|
-
"bugs": {
|
|
43
|
-
"url": "https://github.com/sudhucodes/react-toast-msg/issues"
|
|
44
|
-
},
|
|
45
|
-
"homepage": "https://rtm.sudhucodes.com",
|
|
46
|
-
"peerDependencies": {
|
|
47
|
-
"react": "^18 || ^19",
|
|
48
|
-
"react-dom": "^18 || ^19"
|
|
49
|
-
},
|
|
50
|
-
"devDependencies": {
|
|
51
|
-
"@tailwindcss/cli": "^4.1.18",
|
|
52
|
-
"@types/react": "^19.2.2",
|
|
53
|
-
"@types/react-dom": "^19.2.2",
|
|
54
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
55
|
-
"prettier": "^3.6.2",
|
|
56
|
-
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
57
|
-
"tailwindcss": "^4.1.18",
|
|
58
|
-
"tsup": "^8.5.0",
|
|
59
|
-
"typescript": "^5.9.3"
|
|
60
|
-
},
|
|
61
|
-
"dependencies": {
|
|
62
|
-
"clsx": "^2.1.1",
|
|
63
|
-
"tailwind-merge": "^3.4.0"
|
|
64
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "react-toast-msg",
|
|
3
|
+
"version": "2.5.8",
|
|
4
|
+
"description": "A lightweight, customizable React toast notification library with zero-config and fast setup.",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"scripts": {
|
|
9
|
+
"dev": "tsup --watch ./src",
|
|
10
|
+
"prettier": "prettier --write src",
|
|
11
|
+
"build": "pnpm build:ts && pnpm build:css",
|
|
12
|
+
"build:ts": "tsup",
|
|
13
|
+
"build:css": "pnpx @tailwindcss/cli -i ./src/style.css -o ./dist/style.css"
|
|
14
|
+
},
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"module": "dist/index.mjs",
|
|
17
|
+
"types": "dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"import": "./dist/index.mjs",
|
|
21
|
+
"require": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./style.css": "./dist/style.css"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"react",
|
|
27
|
+
"toast",
|
|
28
|
+
"notification",
|
|
29
|
+
"react-toast",
|
|
30
|
+
"react-toastify",
|
|
31
|
+
"snackbar",
|
|
32
|
+
"react-toast-msg",
|
|
33
|
+
"rtm",
|
|
34
|
+
"toast-component"
|
|
35
|
+
],
|
|
36
|
+
"author": "SudhuCodes",
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "https://github.com/sudhucodes/react-toast-msg.git"
|
|
41
|
+
},
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/sudhucodes/react-toast-msg/issues"
|
|
44
|
+
},
|
|
45
|
+
"homepage": "https://rtm.sudhucodes.com",
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"react": "^18 || ^19",
|
|
48
|
+
"react-dom": "^18 || ^19"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@tailwindcss/cli": "^4.1.18",
|
|
52
|
+
"@types/react": "^19.2.2",
|
|
53
|
+
"@types/react-dom": "^19.2.2",
|
|
54
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
55
|
+
"prettier": "^3.6.2",
|
|
56
|
+
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
57
|
+
"tailwindcss": "^4.1.18",
|
|
58
|
+
"tsup": "^8.5.0",
|
|
59
|
+
"typescript": "^5.9.3"
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"clsx": "^2.1.1",
|
|
63
|
+
"tailwind-merge": "^3.4.0"
|
|
64
|
+
}
|
|
65
65
|
}
|