juice-toast 1.4.4 → 2.0.0-beta.1
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/API.md +50 -2
- package/CHANGELOG.md +10 -1
- package/README.md +12 -4
- package/dist/juice-toast.d.ts +1966 -109
- package/dist/juice-toast.esm.js +160 -141
- package/dist/juice-toast.umd.js +160 -141
- package/package.json +8 -5
package/API.md
CHANGED
|
@@ -208,8 +208,17 @@ juiceToast.promise(fetch("/api"), {
|
|
|
208
208
|
## `juiceToast.use(pluginFunction)`
|
|
209
209
|
|
|
210
210
|
```js
|
|
211
|
-
juiceToast.use(
|
|
212
|
-
|
|
211
|
+
juiceToast.use({
|
|
212
|
+
name: 'logger',
|
|
213
|
+
onCreate(ctx) {
|
|
214
|
+
console.log('create', ctx.id, ctx.type);
|
|
215
|
+
},
|
|
216
|
+
onShow(ctx) {
|
|
217
|
+
console.log('show', ctx.id);
|
|
218
|
+
},
|
|
219
|
+
onRemove(ctx) {
|
|
220
|
+
console.log('remove', ctx.id);
|
|
221
|
+
},
|
|
213
222
|
});
|
|
214
223
|
```
|
|
215
224
|
|
|
@@ -326,6 +335,45 @@ juiceToast.dismissAll();
|
|
|
326
335
|
juiceToast.listActive(filter);
|
|
327
336
|
```
|
|
328
337
|
|
|
338
|
+
# Choose Sanitizer Engine
|
|
339
|
+
```js
|
|
340
|
+
juiceToast.setup({
|
|
341
|
+
sanitizer: {
|
|
342
|
+
engine: 'builtin',
|
|
343
|
+
},
|
|
344
|
+
});
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
# Grouping Toast
|
|
348
|
+
```js
|
|
349
|
+
juiceToast.info({
|
|
350
|
+
title: 'Upload',
|
|
351
|
+
message: 'File 1 under process',
|
|
352
|
+
groupId: 'upload-01',
|
|
353
|
+
groupStrategy: 'merge',
|
|
354
|
+
});
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
# Sanitizer with DOMPurify
|
|
358
|
+
```js
|
|
359
|
+
import juiceToast from 'juice-toast';
|
|
360
|
+
import DOMPurify from 'dompurify';
|
|
361
|
+
|
|
362
|
+
juiceToast.setup({
|
|
363
|
+
sanitizer: {
|
|
364
|
+
engine: 'dompurify',
|
|
365
|
+
dompurify: DOMPurify,
|
|
366
|
+
},
|
|
367
|
+
});
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
# DevTools
|
|
371
|
+
```js
|
|
372
|
+
juiceToast.setup({
|
|
373
|
+
devTools: true
|
|
374
|
+
});
|
|
375
|
+
```
|
|
376
|
+
|
|
329
377
|
---
|
|
330
378
|
|
|
331
379
|
# License
|
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
# MAJOR UPDATE
|
|
2
|
+
## v2.0.0 (Pack 0)
|
|
3
|
+
- Adding DevTools
|
|
4
|
+
- CONTRIBUTION: Source code file now are in modules
|
|
5
|
+
- Adding Groups Toast
|
|
6
|
+
- Fix & Upgrade HTML Sanitizer
|
|
7
|
+
|
|
8
|
+
v1.4.4
|
|
2
9
|
- Fix priority queue
|
|
3
10
|
- Reduce memory leak's
|
|
4
11
|
- Fix documentation
|
|
@@ -97,3 +104,5 @@ v1.0.1
|
|
|
97
104
|
|
|
98
105
|
v1.0.0
|
|
99
106
|
- Initial release
|
|
107
|
+
|
|
108
|
+
WARNING: v2.0.0 is a breaking change, please use 1.4.4-lts
|
package/README.md
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|

|
|
7
7
|

|
|
8
8
|

|
|
9
|
-
](https://atrosfer.opendnf.cloud/1.0)
|
|
10
10
|

|
|
11
11
|

|
|
12
12
|

|
|
13
13
|

|
|
14
14
|

|
|
15
15
|

|
|
16
|
-
[](https://badge.socket.dev/npm/package/juice-toast/2.0.0-beta.1)
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
@@ -41,7 +41,7 @@ It supports **UMD & ESM**, **dynamic toast types**, **theme management**, **queu
|
|
|
41
41
|
- 🧩 Plugin system
|
|
42
42
|
- ♿ Accessible (ARIA + focus/hover pause)
|
|
43
43
|
|
|
44
|
-
Try a new [React JuiceToast](https://npmjs.com/package/@juice-toast/plugins-react) plugin!
|
|
44
|
+
Try a new [React JuiceToast](https://npmjs.com/package/@juice-toast/plugins-react) plugin & [Vue JuiceToast](https://npmjs.com/package/@juice-toast/plugins-vue) plugin!
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
@@ -51,7 +51,7 @@ Try a new [React JuiceToast](https://npmjs.com/package/@juice-toast/plugins-reac
|
|
|
51
51
|
```bash
|
|
52
52
|
npm install juice-toast --no-optional
|
|
53
53
|
```
|
|
54
|
-
#### With Optional (
|
|
54
|
+
#### With Optional (With Plugins)
|
|
55
55
|
```bash
|
|
56
56
|
npm install juice-toast
|
|
57
57
|
```
|
|
@@ -350,6 +350,13 @@ juiceToast.modal({
|
|
|
350
350
|
});
|
|
351
351
|
```
|
|
352
352
|
|
|
353
|
+
## DevTools
|
|
354
|
+
```js
|
|
355
|
+
juiceToast.setup({
|
|
356
|
+
devTools: true
|
|
357
|
+
});
|
|
358
|
+
```
|
|
359
|
+
|
|
353
360
|
---
|
|
354
361
|
|
|
355
362
|
# 🆚 Comparison
|
|
@@ -366,6 +373,7 @@ juiceToast.modal({
|
|
|
366
373
|
| Avatar Support | ✅ | ❌ | ❌ |
|
|
367
374
|
| Custom Themes | ✅ | ✅ | Limited |
|
|
368
375
|
| Modal Support | ✅ | ✅ | ❌ |
|
|
376
|
+
| DevTools | ✅ | ❌ | ❌ |
|
|
369
377
|
|
|
370
378
|
### Compared to SweetAlert2
|
|
371
379
|
|