@editora/toast 2.0.5 → 2.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.
- package/LICENSE +21 -0
- package/README.md +51 -31
- package/dist/core/ToastManager.d.ts +10 -1
- package/dist/core/ToastQueue.d.ts +18 -9
- package/dist/core/ToastRenderer.d.ts +6 -0
- package/dist/core/types.d.ts +35 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.esm.js +670 -513
- package/dist/index.umd.js +1 -1
- package/dist/toast.css +857 -657
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ToastOptions, ToastInstance, ToastConfig, ToastPlugin, ToastPromiseOptions, ToastTheme, ToastPosition } from
|
|
2
|
-
export type ToastLevel =
|
|
1
|
+
import { ToastOptions, ToastInstance, ToastConfig, ToastPlugin, ToastPromiseOptions, ToastTheme, ToastPosition, ToastSubscriber } from "./core/types";
|
|
2
|
+
export type ToastLevel = "info" | "success" | "error" | "warning" | "loading";
|
|
3
3
|
export interface ToastOptionsLegacy extends ToastOptions {
|
|
4
4
|
message: string;
|
|
5
5
|
}
|
|
@@ -21,8 +21,8 @@ export declare const toast: {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export default toast;
|
|
24
|
-
export { ToastManager } from
|
|
25
|
-
export type { ToastLevel as ToastLevelAdvanced, ToastPosition, ToastTheme, ToastAction, ToastProgress, ToastContent, ToastOptions as ToastOptionsAdvanced, ToastInstance, ToastConfig, ToastPlugin, ToastPromiseOptions, SpringConfig, AnimationType, AnimationConfig, SpringAnimation, BounceAnimation, SlideAnimation, ZoomAnimation, FlipAnimation, FadeAnimation, ElasticAnimation, RotateAnimation, CustomAnimation } from
|
|
24
|
+
export { ToastManager } from "./core/ToastManager";
|
|
25
|
+
export type { ToastLevel as ToastLevelAdvanced, ToastPosition, ToastTheme, ToastAction, ToastProgress, ToastContent, ToastOptions as ToastOptionsAdvanced, ToastInstance, ToastConfig, ToastPlugin, ToastPromiseOptions, ToastState, ToastSubscriber, SpringConfig, AnimationType, AnimationConfig, SpringAnimation, BounceAnimation, SlideAnimation, ZoomAnimation, FlipAnimation, FadeAnimation, ElasticAnimation, RotateAnimation, CustomAnimation, } from "./core/types";
|
|
26
26
|
export declare const toastAdvanced: {
|
|
27
27
|
show: (options: ToastOptions) => ToastInstance;
|
|
28
28
|
update: (id: string, options: Partial<ToastOptions>) => boolean;
|
|
@@ -40,6 +40,8 @@ export declare const toastAdvanced: {
|
|
|
40
40
|
getToasts: () => ToastInstance[];
|
|
41
41
|
getGroups: () => import("./core/types").ToastGroup[];
|
|
42
42
|
getConfig: () => ToastConfig;
|
|
43
|
+
getState: () => import("./core/types").ToastState;
|
|
44
|
+
subscribe: (listener: ToastSubscriber) => () => void;
|
|
43
45
|
onEditorEvent: (event: string, callback: (toast: ToastInstance, ...args: any[]) => void) => void;
|
|
44
46
|
triggerEditorEvent: (event: string, toast: ToastInstance, ...args: any[]) => void;
|
|
45
47
|
destroy: () => void;
|