mirror of
https://github.com/sstent/aicyclingcoach-go.git
synced 2026-01-26 09:02:18 +00:00
sync
This commit is contained in:
21
node_modules/react-toastify/LICENSE
generated
vendored
21
node_modules/react-toastify/LICENSE
generated
vendored
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Fadi Khadra
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
117
node_modules/react-toastify/README.md
generated
vendored
117
node_modules/react-toastify/README.md
generated
vendored
@@ -1,117 +0,0 @@
|
||||
# React-Toastify
|
||||
|
||||
[](https://opencollective.com/react-toastify) 
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
🎉 React-Toastify allows you to add notifications to your app with ease.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
$ npm install --save react-toastify
|
||||
$ yarn add react-toastify
|
||||
```
|
||||
|
||||
```jsx
|
||||
import React from 'react';
|
||||
|
||||
import { ToastContainer, toast } from 'react-toastify';
|
||||
|
||||
function App(){
|
||||
const notify = () => toast("Wow so easy!");
|
||||
|
||||
return (
|
||||
<div>
|
||||
<button onClick={notify}>Notify!</button>
|
||||
<ToastContainer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Check the [documentation](https://fkhadra.github.io/react-toastify/introduction) to get you started!
|
||||
|
||||
## Features
|
||||
|
||||
- Easy to set up for real, you can make it work in less than 10sec!
|
||||
- Super easy to customize
|
||||
- RTL support
|
||||
- Swipe to close 👌
|
||||
- Can choose swipe direction
|
||||
- Super easy to use an animation of your choice. Works well with animate.css for example
|
||||
- Can display a react component inside the toast!
|
||||
- Has ```onOpen``` and ```onClose``` hooks. Both can access the props passed to the react component rendered inside the toast
|
||||
- Can remove a toast programmatically
|
||||
- Define behavior per toast
|
||||
- Pause toast when the window loses focus 👁
|
||||
- Fancy progress bar to display the remaining time
|
||||
- Possibility to update a toast
|
||||
- You can control the progress bar a la `nprogress` 😲
|
||||
- You can limit the number of toast displayed at the same time
|
||||
- Dark mode 🌒
|
||||
- Pause timer programmaticaly
|
||||
- Stacked notifications!
|
||||
- And much more !
|
||||
|
||||
## Demo
|
||||
|
||||
[A demo is worth a thousand words](https://fkhadra.github.io/react-toastify/introduction)
|
||||
|
||||
|
||||
## Contribute
|
||||
|
||||
Show your ❤️ and support by giving a ⭐. Any suggestions are welcome! Take a look at the contributing guide.
|
||||
|
||||
You can also find me on [reactiflux](https://www.reactiflux.com/). My pseudo is Fadi.
|
||||
|
||||
## Contributors
|
||||
|
||||
### Code Contributors
|
||||
|
||||
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
|
||||
<a href="https://github.com/fkhadra/react-toastify/graphs/contributors"><img src="https://opencollective.com/react-toastify/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
### Financial Contributors
|
||||
|
||||
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/react-toastify/contribute)]
|
||||
|
||||
#### Individuals
|
||||
|
||||
<a href="https://opencollective.com/react-toastify"><img src="https://opencollective.com/react-toastify/individuals.svg?width=890"></a>
|
||||
|
||||
#### Organizations
|
||||
|
||||
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/react-toastify/contribute)]
|
||||
|
||||
<a href="https://opencollective.com/react-toastify/organization/0/website"><img src="https://opencollective.com/react-toastify/organization/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/1/website"><img src="https://opencollective.com/react-toastify/organization/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/2/website"><img src="https://opencollective.com/react-toastify/organization/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/3/website"><img src="https://opencollective.com/react-toastify/organization/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/4/website"><img src="https://opencollective.com/react-toastify/organization/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/5/website"><img src="https://opencollective.com/react-toastify/organization/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/6/website"><img src="https://opencollective.com/react-toastify/organization/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/7/website"><img src="https://opencollective.com/react-toastify/organization/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/8/website"><img src="https://opencollective.com/react-toastify/organization/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/9/website"><img src="https://opencollective.com/react-toastify/organization/9/avatar.svg"></a>
|
||||
|
||||
## Release Notes
|
||||
|
||||
You can find the release note for the latest release [here](https://github.com/fkhadra/react-toastify/releases/latest)
|
||||
|
||||
You can browse them all [here](https://github.com/fkhadra/react-toastify/releases)
|
||||
|
||||
## License
|
||||
|
||||
Licensed under MIT
|
||||
161
node_modules/react-toastify/addons/use-notification-center/index.d.mts
generated
vendored
161
node_modules/react-toastify/addons/use-notification-center/index.d.mts
generated
vendored
@@ -1,161 +0,0 @@
|
||||
import { ToastItem, Id } from 'react-toastify';
|
||||
|
||||
type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
||||
interface NotificationCenterItem<Data = {}> extends Optional<ToastItem<Data>, 'content' | 'data' | 'status'> {
|
||||
read: boolean;
|
||||
createdAt: number;
|
||||
}
|
||||
type SortFn<Data> = (l: NotificationCenterItem<Data>, r: NotificationCenterItem<Data>) => number;
|
||||
type FilterFn<Data = {}> = (item: NotificationCenterItem<Data>) => boolean;
|
||||
interface UseNotificationCenterParams<Data = {}> {
|
||||
/**
|
||||
* initial data to rehydrate the notification center
|
||||
*/
|
||||
data?: NotificationCenterItem<Data>[];
|
||||
/**
|
||||
* By default, the notifications are sorted from the newest to the oldest using
|
||||
* the `createdAt` field. Use this to provide your own sort function
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* // old notifications first
|
||||
* useNotificationCenter({
|
||||
* sort: ((l, r) => l.createdAt - r.createdAt)
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
sort?: SortFn<Data>;
|
||||
/**
|
||||
* Keep the toast that meets the condition specified in the callback function.
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* // keep only the toasts when hidden is set to false
|
||||
* useNotificationCenter({
|
||||
* filter: item => item.data.hidden === false
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
filter?: FilterFn<Data>;
|
||||
}
|
||||
interface UseNotificationCenter<Data> {
|
||||
/**
|
||||
* Contains all the notifications
|
||||
*/
|
||||
notifications: NotificationCenterItem<Data>[];
|
||||
/**
|
||||
* Clear all notifications
|
||||
*/
|
||||
clear(): void;
|
||||
/**
|
||||
* Mark all notification as read
|
||||
*/
|
||||
markAllAsRead(): void;
|
||||
/**
|
||||
* Mark all notification as read or not.
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* markAllAsRead(false) // mark all notification as not read
|
||||
*
|
||||
* markAllAsRead(true) // same as calling markAllAsRead()
|
||||
* ```
|
||||
*/
|
||||
markAllAsRead(read?: boolean): void;
|
||||
/**
|
||||
* Mark one or more notifications as read.
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* markAsRead("anId")
|
||||
* markAsRead(["a","list", "of", "id"])
|
||||
* ```
|
||||
*/
|
||||
markAsRead(id: Id | Id[]): void;
|
||||
/**
|
||||
* Mark one or more notifications as read.The second parameter let you mark the notification as read or not.
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* markAsRead("anId", false)
|
||||
* markAsRead(["a","list", "of", "id"], false)
|
||||
*
|
||||
* markAsRead("anId", true) // same as markAsRead("anId")
|
||||
* ```
|
||||
*/
|
||||
markAsRead(id: Id | Id[], read?: boolean): void;
|
||||
/**
|
||||
* Remove one or more notifications
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* remove("anId")
|
||||
* remove(["a","list", "of", "id"])
|
||||
* ```
|
||||
*/
|
||||
remove(id: Id | Id[]): void;
|
||||
/**
|
||||
* Push a notification to the notification center.
|
||||
* Returns null when an item with the given id already exists
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* const id = add({id: "id", content: "test", data: { foo: "hello" } })
|
||||
*
|
||||
* // Return the id of the notification, generate one if none provided
|
||||
* const id = add({ data: {title: "a title", text: "some text"} })
|
||||
* ```
|
||||
*/
|
||||
add(item: Partial<NotificationCenterItem<Data>>): Id | null;
|
||||
/**
|
||||
* Update the notification that match the id
|
||||
* Returns null when no matching notification found
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* const id = update("anId", {content: "test", data: { foo: "hello" } })
|
||||
*
|
||||
* // It's also possible to update the id
|
||||
* const id = update("anId"m { id:"anotherOne", data: {title: "a title", text: "some text"} })
|
||||
* ```
|
||||
*/
|
||||
update(id: Id, item: Partial<NotificationCenterItem<Data>>): Id | null;
|
||||
/**
|
||||
* Retrieve one or more notifications
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* find("anId")
|
||||
* find(["a","list", "of", "id"])
|
||||
* ```
|
||||
*/
|
||||
find(id: Id): NotificationCenterItem<Data> | undefined;
|
||||
/**
|
||||
* Retrieve one or more notifications
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* find("anId")
|
||||
* find(["a","list", "of", "id"])
|
||||
* ```
|
||||
*/
|
||||
find(id: Id[]): NotificationCenterItem<Data>[] | undefined;
|
||||
/**
|
||||
* Retrieve the count for unread notifications
|
||||
*/
|
||||
unreadCount: number;
|
||||
/**
|
||||
* Sort notifications using the newly provided function
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* // old notifications first
|
||||
* sort((l, r) => l.createdAt - r.createdAt)
|
||||
* ```
|
||||
*/
|
||||
sort(sort: SortFn<Data>): void;
|
||||
}
|
||||
declare function useNotificationCenter<Data = {}>(params?: UseNotificationCenterParams<Data>): UseNotificationCenter<Data>;
|
||||
declare function decorate<Data>(item: NotificationCenterItem<Data> | Partial<NotificationCenterItem<Data>>): NotificationCenterItem<Data>;
|
||||
|
||||
export { type FilterFn, type NotificationCenterItem, type SortFn, type UseNotificationCenter, type UseNotificationCenterParams, decorate, useNotificationCenter };
|
||||
161
node_modules/react-toastify/addons/use-notification-center/index.d.ts
generated
vendored
161
node_modules/react-toastify/addons/use-notification-center/index.d.ts
generated
vendored
@@ -1,161 +0,0 @@
|
||||
import { ToastItem, Id } from 'react-toastify';
|
||||
|
||||
type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
||||
interface NotificationCenterItem<Data = {}> extends Optional<ToastItem<Data>, 'content' | 'data' | 'status'> {
|
||||
read: boolean;
|
||||
createdAt: number;
|
||||
}
|
||||
type SortFn<Data> = (l: NotificationCenterItem<Data>, r: NotificationCenterItem<Data>) => number;
|
||||
type FilterFn<Data = {}> = (item: NotificationCenterItem<Data>) => boolean;
|
||||
interface UseNotificationCenterParams<Data = {}> {
|
||||
/**
|
||||
* initial data to rehydrate the notification center
|
||||
*/
|
||||
data?: NotificationCenterItem<Data>[];
|
||||
/**
|
||||
* By default, the notifications are sorted from the newest to the oldest using
|
||||
* the `createdAt` field. Use this to provide your own sort function
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* // old notifications first
|
||||
* useNotificationCenter({
|
||||
* sort: ((l, r) => l.createdAt - r.createdAt)
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
sort?: SortFn<Data>;
|
||||
/**
|
||||
* Keep the toast that meets the condition specified in the callback function.
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* // keep only the toasts when hidden is set to false
|
||||
* useNotificationCenter({
|
||||
* filter: item => item.data.hidden === false
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
filter?: FilterFn<Data>;
|
||||
}
|
||||
interface UseNotificationCenter<Data> {
|
||||
/**
|
||||
* Contains all the notifications
|
||||
*/
|
||||
notifications: NotificationCenterItem<Data>[];
|
||||
/**
|
||||
* Clear all notifications
|
||||
*/
|
||||
clear(): void;
|
||||
/**
|
||||
* Mark all notification as read
|
||||
*/
|
||||
markAllAsRead(): void;
|
||||
/**
|
||||
* Mark all notification as read or not.
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* markAllAsRead(false) // mark all notification as not read
|
||||
*
|
||||
* markAllAsRead(true) // same as calling markAllAsRead()
|
||||
* ```
|
||||
*/
|
||||
markAllAsRead(read?: boolean): void;
|
||||
/**
|
||||
* Mark one or more notifications as read.
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* markAsRead("anId")
|
||||
* markAsRead(["a","list", "of", "id"])
|
||||
* ```
|
||||
*/
|
||||
markAsRead(id: Id | Id[]): void;
|
||||
/**
|
||||
* Mark one or more notifications as read.The second parameter let you mark the notification as read or not.
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* markAsRead("anId", false)
|
||||
* markAsRead(["a","list", "of", "id"], false)
|
||||
*
|
||||
* markAsRead("anId", true) // same as markAsRead("anId")
|
||||
* ```
|
||||
*/
|
||||
markAsRead(id: Id | Id[], read?: boolean): void;
|
||||
/**
|
||||
* Remove one or more notifications
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* remove("anId")
|
||||
* remove(["a","list", "of", "id"])
|
||||
* ```
|
||||
*/
|
||||
remove(id: Id | Id[]): void;
|
||||
/**
|
||||
* Push a notification to the notification center.
|
||||
* Returns null when an item with the given id already exists
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* const id = add({id: "id", content: "test", data: { foo: "hello" } })
|
||||
*
|
||||
* // Return the id of the notification, generate one if none provided
|
||||
* const id = add({ data: {title: "a title", text: "some text"} })
|
||||
* ```
|
||||
*/
|
||||
add(item: Partial<NotificationCenterItem<Data>>): Id | null;
|
||||
/**
|
||||
* Update the notification that match the id
|
||||
* Returns null when no matching notification found
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* const id = update("anId", {content: "test", data: { foo: "hello" } })
|
||||
*
|
||||
* // It's also possible to update the id
|
||||
* const id = update("anId"m { id:"anotherOne", data: {title: "a title", text: "some text"} })
|
||||
* ```
|
||||
*/
|
||||
update(id: Id, item: Partial<NotificationCenterItem<Data>>): Id | null;
|
||||
/**
|
||||
* Retrieve one or more notifications
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* find("anId")
|
||||
* find(["a","list", "of", "id"])
|
||||
* ```
|
||||
*/
|
||||
find(id: Id): NotificationCenterItem<Data> | undefined;
|
||||
/**
|
||||
* Retrieve one or more notifications
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* find("anId")
|
||||
* find(["a","list", "of", "id"])
|
||||
* ```
|
||||
*/
|
||||
find(id: Id[]): NotificationCenterItem<Data>[] | undefined;
|
||||
/**
|
||||
* Retrieve the count for unread notifications
|
||||
*/
|
||||
unreadCount: number;
|
||||
/**
|
||||
* Sort notifications using the newly provided function
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* // old notifications first
|
||||
* sort((l, r) => l.createdAt - r.createdAt)
|
||||
* ```
|
||||
*/
|
||||
sort(sort: SortFn<Data>): void;
|
||||
}
|
||||
declare function useNotificationCenter<Data = {}>(params?: UseNotificationCenterParams<Data>): UseNotificationCenter<Data>;
|
||||
declare function decorate<Data>(item: NotificationCenterItem<Data> | Partial<NotificationCenterItem<Data>>): NotificationCenterItem<Data>;
|
||||
|
||||
export { type FilterFn, type NotificationCenterItem, type SortFn, type UseNotificationCenter, type UseNotificationCenterParams, decorate, useNotificationCenter };
|
||||
3
node_modules/react-toastify/addons/use-notification-center/index.js
generated
vendored
3
node_modules/react-toastify/addons/use-notification-center/index.js
generated
vendored
@@ -1,3 +0,0 @@
|
||||
"use client";
|
||||
var u=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var A=(a,i)=>{for(var d in i)u(a,d,{get:i[d],enumerable:!0})},x=(a,i,d,c)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of C(i))!N.call(a,o)&&o!==d&&u(a,o,{get:()=>i[o],enumerable:!(c=m(i,o))||c.enumerable});return a};var p=a=>x(u({},"__esModule",{value:!0}),a);var y={};A(y,{decorate:()=>l,useNotificationCenter:()=>b});module.exports=p(y);var s=require("react"),I=require("react-toastify");function b(a={}){let i=(0,s.useRef)(a.sort||k),d=(0,s.useRef)(a.filter||null),[c,o]=(0,s.useState)(()=>a.data?d.current?a.data.filter(d.current).sort(i.current):[...a.data].sort(i.current):[]);return(0,s.useEffect)(()=>I.toast.onChange(t=>{if(t.status==="added"||t.status==="updated"){let e=l(t);if(d.current&&!d.current(e))return;o(r=>{let n=[],f=r.findIndex(D=>D.id===e.id);return f!==-1?(n=r.slice(),Object.assign(n[f],e,{createdAt:Date.now()})):r.length===0?n=[e]:n=[e,...r],n.sort(i.current)})}}),[]),{notifications:c,clear:()=>{o([])},markAllAsRead:(t=!0)=>{o(e=>e.map(r=>(r.read=t,r)))},markAsRead:(t,e=!0)=>{let r=n=>(n.id===t&&(n.read=e),n);Array.isArray(t)&&(r=n=>(t.includes(n.id)&&(n.read=e),n)),o(n=>n.map(r))},add:t=>{if(c.find(r=>r.id===t.id))return null;let e=l(t);return o(r=>[...r,e].sort(i.current)),e.id},update:(t,e)=>{let r=c.findIndex(n=>n.id===t);return r!==-1?(o(n=>{let f=[...n];return Object.assign(f[r],e,{createdAt:e.createdAt||Date.now()}),f.sort(i.current)}),e.id):null},remove:t=>{o(e=>e.filter(Array.isArray(t)?r=>!t.includes(r.id):r=>r.id!==t))},find:t=>Array.isArray(t)?c.filter(e=>t.includes(e.id)):c.find(e=>e.id===t),sort:t=>{i.current=t,o(e=>e.slice().sort(t))},get unreadCount(){return c.reduce((t,e)=>e.read?t:t+1,0)}}}function l(a){return a.id==null&&(a.id=Date.now().toString(36).substring(2,9)),a.createdAt||(a.createdAt=Date.now()),a.read==null&&(a.read=!1),a}function k(a,i){return i.createdAt-a.createdAt}0&&(module.exports={decorate,useNotificationCenter});
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/react-toastify/addons/use-notification-center/index.js.map
generated
vendored
1
node_modules/react-toastify/addons/use-notification-center/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
3
node_modules/react-toastify/addons/use-notification-center/index.mjs
generated
vendored
3
node_modules/react-toastify/addons/use-notification-center/index.mjs
generated
vendored
@@ -1,3 +0,0 @@
|
||||
"use client";
|
||||
import{useState as I,useEffect as D,useRef as f}from"react";import{toast as m}from"react-toastify";function w(n={}){let i=f(n.sort||C),s=f(n.filter||null),[d,o]=I(()=>n.data?s.current?n.data.filter(s.current).sort(i.current):[...n.data].sort(i.current):[]);return D(()=>m.onChange(t=>{if(t.status==="added"||t.status==="updated"){let e=u(t);if(s.current&&!s.current(e))return;o(a=>{let r=[],c=a.findIndex(l=>l.id===e.id);return c!==-1?(r=a.slice(),Object.assign(r[c],e,{createdAt:Date.now()})):a.length===0?r=[e]:r=[e,...a],r.sort(i.current)})}}),[]),{notifications:d,clear:()=>{o([])},markAllAsRead:(t=!0)=>{o(e=>e.map(a=>(a.read=t,a)))},markAsRead:(t,e=!0)=>{let a=r=>(r.id===t&&(r.read=e),r);Array.isArray(t)&&(a=r=>(t.includes(r.id)&&(r.read=e),r)),o(r=>r.map(a))},add:t=>{if(d.find(a=>a.id===t.id))return null;let e=u(t);return o(a=>[...a,e].sort(i.current)),e.id},update:(t,e)=>{let a=d.findIndex(r=>r.id===t);return a!==-1?(o(r=>{let c=[...r];return Object.assign(c[a],e,{createdAt:e.createdAt||Date.now()}),c.sort(i.current)}),e.id):null},remove:t=>{o(e=>e.filter(Array.isArray(t)?a=>!t.includes(a.id):a=>a.id!==t))},find:t=>Array.isArray(t)?d.filter(e=>t.includes(e.id)):d.find(e=>e.id===t),sort:t=>{i.current=t,o(e=>e.slice().sort(t))},get unreadCount(){return d.reduce((t,e)=>e.read?t:t+1,0)}}}function u(n){return n.id==null&&(n.id=Date.now().toString(36).substring(2,9)),n.createdAt||(n.createdAt=Date.now()),n.read==null&&(n.read=!1),n}function C(n,i){return i.createdAt-n.createdAt}export{u as decorate,w as useNotificationCenter};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
node_modules/react-toastify/addons/use-notification-center/index.mjs.map
generated
vendored
1
node_modules/react-toastify/addons/use-notification-center/index.mjs.map
generated
vendored
File diff suppressed because one or more lines are too long
107
node_modules/react-toastify/package.json
generated
vendored
107
node_modules/react-toastify/package.json
generated
vendored
@@ -1,107 +0,0 @@
|
||||
{
|
||||
"version": "11.0.5",
|
||||
"license": "MIT",
|
||||
"description": "React notification made easy",
|
||||
"keywords": [
|
||||
"react",
|
||||
"notification",
|
||||
"toast",
|
||||
"react-component",
|
||||
"react-toastify",
|
||||
"push",
|
||||
"alert",
|
||||
"snackbar",
|
||||
"message"
|
||||
],
|
||||
"files": [
|
||||
"dist",
|
||||
"addons"
|
||||
],
|
||||
"scripts": {
|
||||
"prepare": "lefthook install",
|
||||
"setup": "pnpm link .",
|
||||
"start": "cd playground && pnpm dev",
|
||||
"test": "cypress open --component",
|
||||
"test:run": "cypress run --component -b chrome",
|
||||
"prettier": "prettier --write src",
|
||||
"build": "tsup && cp src/style.css dist/ReactToastify.css && rm dist/unstyled.css*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^18 || ^19",
|
||||
"react-dom": "^18 || ^19"
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 120,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"arrowParens": "avoid"
|
||||
},
|
||||
"name": "react-toastify",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/fkhadra/react-toastify.git"
|
||||
},
|
||||
"author": "Fadi Khadra <fdkhadra@gmail.com> (https://fkhadra.github.io)",
|
||||
"bugs": {
|
||||
"url": "https://github.com/fkhadra/react-toastify/issues"
|
||||
},
|
||||
"homepage": "https://github.com/fkhadra/react-toastify#readme",
|
||||
"devDependencies": {
|
||||
"@4tw/cypress-drag-drop": "^2.2.5",
|
||||
"@cypress/code-coverage": "^3.13.9",
|
||||
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
||||
"@testing-library/cypress": "^10.0.2",
|
||||
"@types/node": "^22.10.2",
|
||||
"@types/react": "^19.0.1",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"coveralls": "^3.1.1",
|
||||
"cypress": "^13.16.1",
|
||||
"lefthook": "^1.9.2",
|
||||
"lint-staged": "^15.2.11",
|
||||
"postcss": "^8.4.49",
|
||||
"prettier": "3.4.2",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"tsup": "^8.3.5",
|
||||
"typescript": "^5.7.2",
|
||||
"vite": "^6.0.3",
|
||||
"vite-plugin-istanbul": "^6.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"clsx": "^2.1.1"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"module": "dist/index.mjs",
|
||||
"source": "src/index.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js"
|
||||
},
|
||||
"./unstyled": {
|
||||
"types": "./dist/unstyled.d.ts",
|
||||
"import": "./dist/unstyled.mjs",
|
||||
"require": "./dist/unstyled.js"
|
||||
},
|
||||
"./dist/ReactToastify.css": "./dist/ReactToastify.css",
|
||||
"./ReactToastify.css": "./dist/ReactToastify.css",
|
||||
"./package.json": "./package.json",
|
||||
"./addons/use-notification-center": {
|
||||
"types": "./addons/use-notification-center/index.d.ts",
|
||||
"import": "./addons/use-notification-center/index.mjs",
|
||||
"require": "./addons/use-notification-center/index.js"
|
||||
},
|
||||
"./notification-center": {
|
||||
"types": "./addons/use-notification-center/index.d.ts",
|
||||
"import": "./addons/use-notification-center/index.mjs",
|
||||
"require": "./addons/use-notification-center/index.js"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,jsx,ts,tsx,md,html,css}": "prettier --write"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user