@editora/ui-react 0.6.0 → 0.6.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/dist/Toast.cjs.js +1 -1
- package/dist/Toast.esm.js +1 -1
- package/dist/ToastAPI.cjs.js +1 -1
- package/dist/ToastAPI.esm.js +1 -1
- package/dist/components/Toast.cjs.js +1 -1
- package/dist/components/Toast.d.ts +1 -1
- package/dist/components/Toast.d.ts.map +1 -1
- package/dist/components/Toast.esm.js +1 -1
- package/dist/components/ToastAPI.cjs.js +1 -1
- package/dist/components/ToastAPI.d.ts +44 -44
- package/dist/components/ToastAPI.d.ts.map +1 -1
- package/dist/components/ToastAPI.esm.js +1 -1
- package/package.json +2 -2
package/dist/Toast.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react");require("@editora/ui-core/toast");const s=require("@editora/toast"),E=n=>n&&n.__esModule?n:{default:n},m=E(o),O=typeof window<"u"?o.useLayoutEffect:o.useEffect;function S(n){if(!n)return{};const t={...n};return t.type!=null&&t.level==null&&(t.level=t.type),delete t.type,t}const l=m.default.forwardRef(function({children:t,position:a,maxVisible:u,theme:c,config:y,headless:T,onShow:d,onHide:f,...h},g){const v=o.useRef(d),p=o.useRef(f);return o.useEffect(()=>{v.current=d},[d]),o.useEffect(()=>{p.current=f},[f]),o.useImperativeHandle(g,()=>({show(e,w){let r="";const i=S(w),_=i.onShow,R=i.onHide;return r=s.toastAdvanced.show({message:e,...i,onShow:()=>{_?.(),v.current?.({id:r,message:e})},onHide:()=>{R?.(),p.current?.({id:r})}}).id,r},hide(e){s.toastAdvanced.dismiss(String(e))},clear(){s.toastAdvanced.clear()},configure(e){s.toastAdvanced.configure(e)}}),[]),O(()=>{const e={...y||{}};a&&(e.position=a),c&&(e.theme=c),typeof u=="number"&&Number.isFinite(u)&&(e.maxVisible=Math.max(1,Math.trunc(u))),Object.keys(e).length>0&&s.toastAdvanced.configure(e)},[a,u,c,y]),t==null&&Object.keys(h).length===0?null:m.default.createElement("div",{...h},t)});l.displayName="Toast";exports.Toast=l;exports.default=l;
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react");require("@editora/ui-core/toast");const s=require("@editora/toast/lite"),E=n=>n&&n.__esModule?n:{default:n},m=E(o),O=typeof window<"u"?o.useLayoutEffect:o.useEffect;function S(n){if(!n)return{};const t={...n};return t.type!=null&&t.level==null&&(t.level=t.type),delete t.type,t}const l=m.default.forwardRef(function({children:t,position:a,maxVisible:u,theme:c,config:y,headless:T,onShow:d,onHide:f,...h},g){const v=o.useRef(d),p=o.useRef(f);return o.useEffect(()=>{v.current=d},[d]),o.useEffect(()=>{p.current=f},[f]),o.useImperativeHandle(g,()=>({show(e,w){let r="";const i=S(w),_=i.onShow,R=i.onHide;return r=s.toastAdvanced.show({message:e,...i,onShow:()=>{_?.(),v.current?.({id:r,message:e})},onHide:()=>{R?.(),p.current?.({id:r})}}).id,r},hide(e){s.toastAdvanced.dismiss(String(e))},clear(){s.toastAdvanced.clear()},configure(e){s.toastAdvanced.configure(e)}}),[]),O(()=>{const e={...y||{}};a&&(e.position=a),c&&(e.theme=c),typeof u=="number"&&Number.isFinite(u)&&(e.maxVisible=Math.max(1,Math.trunc(u))),Object.keys(e).length>0&&s.toastAdvanced.configure(e)},[a,u,c,y]),t==null&&Object.keys(h).length===0?null:m.default.createElement("div",{...h},t)});l.displayName="Toast";exports.Toast=l;exports.default=l;
|
package/dist/Toast.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import y, { useRef as w, useEffect as l, useImperativeHandle as E, useLayoutEffect as S } from "react";
|
|
3
3
|
import "@editora/ui-core/toast";
|
|
4
|
-
import { toastAdvanced as n } from "@editora/toast";
|
|
4
|
+
import { toastAdvanced as n } from "@editora/toast/lite";
|
|
5
5
|
const z = typeof window < "u" ? S : l;
|
|
6
6
|
function H(s) {
|
|
7
7
|
if (!s) return {};
|
package/dist/ToastAPI.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react"),s=require("@editora/toast"),a=t=>t&&t.__esModule?t:{default:t},d=a(n),f=a(s),r=s.toastAdvanced,v=s.toastPro,g=f.default;function o(t){if(!t)return{};const e={...t};return e.type!=null&&e.level==null&&(e.level=e.type),delete e.type,e}function T(t,e={}){return r.show({message:t,level:"info",...o(e)})}const u={show(t,e={}){return r.show({message:t,...o(e)})},success(t,e={}){return r.success(t,o(e))},error(t,e={}){return r.error(t,o(e))},warning(t,e={}){return r.warning(t,o(e))},info(t,e={}){return r.info(t,o(e))},loading(t,e={}){return r.loading(t,o(e))},dismiss(t){return r.dismiss(String(t))},clear(){return r.clear()},configure(t){return r.configure(t)}},c=n.createContext(null);function i({config:t}={}){return n.useEffect(()=>{t&&r.configure(t)},[t]),null}function m({children:t,config:e}){n.useEffect(()=>{e&&r.configure(e)},[e]);const l=n.useMemo(()=>u,[]);return d.default.createElement(c.Provider,{value:l},t)}function p(){const t=n.useContext(c);return t||u}exports.ToastAPI=i;exports.ToastProvider=m;exports.default=i;exports.toast=T;exports.toastAdvanced=r;exports.toastApi=u;exports.toastLegacy=g;exports.toastPro=v;exports.useToast=p;
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react"),s=require("@editora/toast/lite"),a=t=>t&&t.__esModule?t:{default:t},d=a(n),f=a(s),r=s.toastAdvanced,v=s.toastPro,g=f.default;function o(t){if(!t)return{};const e={...t};return e.type!=null&&e.level==null&&(e.level=e.type),delete e.type,e}function T(t,e={}){return r.show({message:t,level:"info",...o(e)})}const u={show(t,e={}){return r.show({message:t,...o(e)})},success(t,e={}){return r.success(t,o(e))},error(t,e={}){return r.error(t,o(e))},warning(t,e={}){return r.warning(t,o(e))},info(t,e={}){return r.info(t,o(e))},loading(t,e={}){return r.loading(t,o(e))},dismiss(t){return r.dismiss(String(t))},clear(){return r.clear()},configure(t){return r.configure(t)}},c=n.createContext(null);function i({config:t}={}){return n.useEffect(()=>{t&&r.configure(t)},[t]),null}function m({children:t,config:e}){n.useEffect(()=>{e&&r.configure(e)},[e]);const l=n.useMemo(()=>u,[]);return d.default.createElement(c.Provider,{value:l},t)}function p(){const t=n.useContext(c);return t||u}exports.ToastAPI=i;exports.ToastProvider=m;exports.default=i;exports.toast=T;exports.toastAdvanced=r;exports.toastApi=u;exports.toastLegacy=g;exports.toastPro=v;exports.useToast=p;
|
package/dist/ToastAPI.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import i, { createContext as c, useEffect as o, useMemo as l, useContext as f } from "react";
|
|
3
|
-
import d, { toastAdvanced as m, toastPro as v } from "@editora/toast";
|
|
3
|
+
import d, { toastAdvanced as m, toastPro as v } from "@editora/toast/lite";
|
|
4
4
|
const r = m, P = v, w = d;
|
|
5
5
|
function n(t) {
|
|
6
6
|
if (!t) return {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("react");require("@editora/ui-core/toast");require("@editora/toast");const e=require("../Toast.cjs.js");exports.Toast=e.Toast;exports.default=e.Toast;
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("react");require("@editora/ui-core/toast");require("@editora/toast/lite");const e=require("../Toast.cjs.js");exports.Toast=e.Toast;exports.default=e.Toast;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '@editora/ui-core/toast';
|
|
3
3
|
import '@editora/toast/toast.css';
|
|
4
|
-
import type { ToastConfig, ToastOptionsAdvanced, ToastPosition, ToastTheme } from '@editora/toast';
|
|
4
|
+
import type { ToastConfig, ToastOptionsAdvanced, ToastPosition, ToastTheme } from '@editora/toast/lite';
|
|
5
5
|
export type ToastShowDetail = {
|
|
6
6
|
id: string | number;
|
|
7
7
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../src/components/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAC;AACvF,OAAO,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../src/components/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAC;AACvF,OAAO,wBAAwB,CAAC;AAIhC,OAAO,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,WAAW,EAAiB,oBAAoB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAIvH,MAAM,MAAM,eAAe,GAAG;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AACvE,MAAM,MAAM,eAAe,GAAG;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAEtD,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC,GAAG;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,KAAK,MAAM,GAAG,MAAM,CAAC;IACvE,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IACpC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IAC9D,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CAC5C,CAAC;AAcF,eAAO,MAAM,KAAK;eArBL,aAAa;iBACX,MAAM;YACX,UAAU;aACT,OAAO,CAAC,WAAW,CAAC;eAClB,OAAO;aACT,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI;aACjC,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI;sCAsF1C,CAAC;AAIH,eAAe,KAAK,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("react");require("@editora/toast");const t=require("../ToastAPI.cjs.js");exports.ToastAPI=t.ToastAPI;exports.ToastProvider=t.ToastProvider;exports.default=t.ToastAPI;exports.toast=t.toast;exports.toastAdvanced=t.toastAdvanced;exports.toastApi=t.toastApi;exports.toastLegacy=t.toastLegacy;exports.toastPro=t.toastPro;exports.useToast=t.useToast;
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("react");require("@editora/toast/lite");const t=require("../ToastAPI.cjs.js");exports.ToastAPI=t.ToastAPI;exports.ToastProvider=t.ToastProvider;exports.default=t.ToastAPI;exports.toast=t.toast;exports.toastAdvanced=t.toastAdvanced;exports.toastApi=t.toastApi;exports.toastLegacy=t.toastLegacy;exports.toastPro=t.toastPro;exports.useToast=t.useToast;
|
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ToastConfig, ToastOptionsAdvanced } from '@editora/toast';
|
|
2
|
+
import type { ToastConfig, ToastOptionsAdvanced } from '@editora/toast/lite';
|
|
3
3
|
export declare const toastAdvanced: {
|
|
4
|
-
show: (options: ToastOptionsAdvanced) => import("@editora/toast").ToastInstance;
|
|
4
|
+
show: (options: ToastOptionsAdvanced) => import("@editora/toast/lite").ToastInstance;
|
|
5
5
|
update: (id: string, options: Partial<ToastOptionsAdvanced>) => boolean;
|
|
6
6
|
dismiss: (id: string) => boolean;
|
|
7
7
|
clear: () => void;
|
|
8
|
-
info: (message:
|
|
9
|
-
success: (message:
|
|
10
|
-
error: (message:
|
|
11
|
-
warning: (message:
|
|
12
|
-
loading: (message:
|
|
13
|
-
promise: <T>(promise: Promise<T>, options: import("@editora/toast").ToastPromiseOptions<T>) => Promise<T>;
|
|
14
|
-
group: (id: string, options: ToastOptionsAdvanced) => import("@editora/toast").ToastInstance;
|
|
8
|
+
info: (message: import("@editora/toast/lite").ToastText, options?: Partial<ToastOptionsAdvanced>) => import("@editora/toast/lite").ToastInstance;
|
|
9
|
+
success: (message: import("@editora/toast/lite").ToastText, options?: Partial<ToastOptionsAdvanced>) => import("@editora/toast/lite").ToastInstance;
|
|
10
|
+
error: (message: import("@editora/toast/lite").ToastText, options?: Partial<ToastOptionsAdvanced>) => import("@editora/toast/lite").ToastInstance;
|
|
11
|
+
warning: (message: import("@editora/toast/lite").ToastText, options?: Partial<ToastOptionsAdvanced>) => import("@editora/toast/lite").ToastInstance;
|
|
12
|
+
loading: (message: import("@editora/toast/lite").ToastText, options?: Partial<ToastOptionsAdvanced>) => import("@editora/toast/lite").ToastInstance;
|
|
13
|
+
promise: <T>(promise: Promise<T>, options: import("@editora/toast/lite").ToastPromiseOptions<T>) => Promise<T>;
|
|
14
|
+
group: (id: string, options: ToastOptionsAdvanced) => import("@editora/toast/lite").ToastInstance;
|
|
15
15
|
configure: (config: Partial<ToastConfig>) => void;
|
|
16
|
-
use: (plugin: import("@editora/toast").ToastPlugin) => void;
|
|
17
|
-
getToasts: () => import("@editora/toast").ToastInstance[];
|
|
16
|
+
use: (plugin: import("@editora/toast/lite").ToastPlugin) => void;
|
|
17
|
+
getToasts: () => import("@editora/toast/lite").ToastInstance[];
|
|
18
18
|
getGroups: () => import("@editora/toast/core/types").ToastGroup[];
|
|
19
19
|
getConfig: () => ToastConfig;
|
|
20
|
-
getState: () => import("@editora/toast").ToastState;
|
|
21
|
-
subscribe: (listener: import("@editora/toast").ToastSubscriber) => () => void;
|
|
22
|
-
onEditorEvent: (event: string, callback: (toast: import("@editora/toast").ToastInstance, ...args: any[]) => void) => void;
|
|
23
|
-
triggerEditorEvent: (event: string, toast: import("@editora/toast").ToastInstance, ...args: any[]) => void;
|
|
20
|
+
getState: () => import("@editora/toast/lite").ToastState;
|
|
21
|
+
subscribe: (listener: import("@editora/toast/lite").ToastSubscriber) => () => void;
|
|
22
|
+
onEditorEvent: (event: string, callback: (toast: import("@editora/toast/lite").ToastInstance, ...args: any[]) => void) => void;
|
|
23
|
+
triggerEditorEvent: (event: string, toast: import("@editora/toast/lite").ToastInstance, ...args: any[]) => void;
|
|
24
24
|
destroy: () => void;
|
|
25
25
|
};
|
|
26
26
|
export declare const toastPro: {
|
|
27
|
-
show: (options: ToastOptionsAdvanced) => import("@editora/toast").ToastInstance;
|
|
27
|
+
show: (options: ToastOptionsAdvanced) => import("@editora/toast/lite").ToastInstance;
|
|
28
28
|
update: (id: string, options: Partial<ToastOptionsAdvanced>) => boolean;
|
|
29
29
|
dismiss: (id: string) => boolean;
|
|
30
30
|
clear: () => void;
|
|
31
|
-
info: (message:
|
|
32
|
-
success: (message:
|
|
33
|
-
error: (message:
|
|
34
|
-
warning: (message:
|
|
35
|
-
loading: (message:
|
|
36
|
-
promise: <T>(promise: Promise<T>, options: import("@editora/toast").ToastPromiseOptions<T>) => Promise<T>;
|
|
37
|
-
group: (id: string, options: ToastOptionsAdvanced) => import("@editora/toast").ToastInstance;
|
|
31
|
+
info: (message: import("@editora/toast/lite").ToastText, options?: Partial<ToastOptionsAdvanced>) => import("@editora/toast/lite").ToastInstance;
|
|
32
|
+
success: (message: import("@editora/toast/lite").ToastText, options?: Partial<ToastOptionsAdvanced>) => import("@editora/toast/lite").ToastInstance;
|
|
33
|
+
error: (message: import("@editora/toast/lite").ToastText, options?: Partial<ToastOptionsAdvanced>) => import("@editora/toast/lite").ToastInstance;
|
|
34
|
+
warning: (message: import("@editora/toast/lite").ToastText, options?: Partial<ToastOptionsAdvanced>) => import("@editora/toast/lite").ToastInstance;
|
|
35
|
+
loading: (message: import("@editora/toast/lite").ToastText, options?: Partial<ToastOptionsAdvanced>) => import("@editora/toast/lite").ToastInstance;
|
|
36
|
+
promise: <T>(promise: Promise<T>, options: import("@editora/toast/lite").ToastPromiseOptions<T>) => Promise<T>;
|
|
37
|
+
group: (id: string, options: ToastOptionsAdvanced) => import("@editora/toast/lite").ToastInstance;
|
|
38
38
|
configure: (config: Partial<ToastConfig>) => void;
|
|
39
|
-
use: (plugin: import("@editora/toast").ToastPlugin) => void;
|
|
40
|
-
getToasts: () => import("@editora/toast").ToastInstance[];
|
|
39
|
+
use: (plugin: import("@editora/toast/lite").ToastPlugin) => void;
|
|
40
|
+
getToasts: () => import("@editora/toast/lite").ToastInstance[];
|
|
41
41
|
getGroups: () => import("@editora/toast/core/types").ToastGroup[];
|
|
42
42
|
getConfig: () => ToastConfig;
|
|
43
|
-
getState: () => import("@editora/toast").ToastState;
|
|
44
|
-
subscribe: (listener: import("@editora/toast").ToastSubscriber) => () => void;
|
|
45
|
-
onEditorEvent: (event: string, callback: (toast: import("@editora/toast").ToastInstance, ...args: any[]) => void) => void;
|
|
46
|
-
triggerEditorEvent: (event: string, toast: import("@editora/toast").ToastInstance, ...args: any[]) => void;
|
|
43
|
+
getState: () => import("@editora/toast/lite").ToastState;
|
|
44
|
+
subscribe: (listener: import("@editora/toast/lite").ToastSubscriber) => () => void;
|
|
45
|
+
onEditorEvent: (event: string, callback: (toast: import("@editora/toast/lite").ToastInstance, ...args: any[]) => void) => void;
|
|
46
|
+
triggerEditorEvent: (event: string, toast: import("@editora/toast/lite").ToastInstance, ...args: any[]) => void;
|
|
47
47
|
destroy: () => void;
|
|
48
48
|
};
|
|
49
|
-
export declare const toastLegacy: ((msg:
|
|
50
|
-
info: (msg:
|
|
51
|
-
success: (msg:
|
|
52
|
-
error: (msg:
|
|
53
|
-
warning: (msg:
|
|
54
|
-
loading: (msg:
|
|
55
|
-
show: (options: ToastOptionsAdvanced) => import("@editora/toast").ToastInstance;
|
|
56
|
-
promise: <T>(promise: Promise<T>, options: import("@editora/toast").ToastPromiseOptions<T>) => Promise<T>;
|
|
49
|
+
export declare const toastLegacy: ((msg: import("@editora/toast/lite").ToastText, optionsOrDuration?: Partial<ToastOptionsAdvanced> | number, theme?: import("@editora/toast/lite").ToastTheme, position?: import("@editora/toast/lite").ToastPosition) => import("@editora/toast/lite").ToastInstance) & {
|
|
50
|
+
info: (msg: import("@editora/toast/lite").ToastText, optionsOrDuration?: Partial<ToastOptionsAdvanced> | number, theme?: import("@editora/toast/lite").ToastTheme, position?: import("@editora/toast/lite").ToastPosition) => import("@editora/toast/lite").ToastInstance;
|
|
51
|
+
success: (msg: import("@editora/toast/lite").ToastText, optionsOrDuration?: Partial<ToastOptionsAdvanced> | number, theme?: import("@editora/toast/lite").ToastTheme, position?: import("@editora/toast/lite").ToastPosition) => import("@editora/toast/lite").ToastInstance;
|
|
52
|
+
error: (msg: import("@editora/toast/lite").ToastText, optionsOrDuration?: Partial<ToastOptionsAdvanced> | number, theme?: import("@editora/toast/lite").ToastTheme, position?: import("@editora/toast/lite").ToastPosition) => import("@editora/toast/lite").ToastInstance;
|
|
53
|
+
warning: (msg: import("@editora/toast/lite").ToastText, optionsOrDuration?: Partial<ToastOptionsAdvanced> | number, theme?: import("@editora/toast/lite").ToastTheme, position?: import("@editora/toast/lite").ToastPosition) => import("@editora/toast/lite").ToastInstance;
|
|
54
|
+
loading: (msg: import("@editora/toast/lite").ToastText, optionsOrDuration?: Partial<ToastOptionsAdvanced> | number, theme?: import("@editora/toast/lite").ToastTheme, position?: import("@editora/toast/lite").ToastPosition) => import("@editora/toast/lite").ToastInstance;
|
|
55
|
+
show: (options: ToastOptionsAdvanced) => import("@editora/toast/lite").ToastInstance;
|
|
56
|
+
promise: <T>(promise: Promise<T>, options: import("@editora/toast/lite").ToastPromiseOptions<T>) => Promise<T>;
|
|
57
57
|
update: (id: string, options: Partial<ToastOptionsAdvanced>) => boolean;
|
|
58
58
|
dismiss: (id?: string) => boolean;
|
|
59
59
|
clear: () => void;
|
|
@@ -63,14 +63,14 @@ export type ToastOptions = Partial<Omit<ToastOptionsAdvanced, 'message'>> & {
|
|
|
63
63
|
type?: string;
|
|
64
64
|
};
|
|
65
65
|
export type ToastVariant = 'default' | 'success' | 'error' | 'warning' | 'info';
|
|
66
|
-
export declare function toast(message: string, options?: ToastOptions): import("@editora/toast").ToastInstance;
|
|
66
|
+
export declare function toast(message: string, options?: ToastOptions): import("@editora/toast/lite").ToastInstance;
|
|
67
67
|
export declare const toastApi: {
|
|
68
|
-
show(message: string, options?: ToastOptions): import("@editora/toast").ToastInstance;
|
|
69
|
-
success(message: string, options?: ToastOptions): import("@editora/toast").ToastInstance;
|
|
70
|
-
error(message: string, options?: ToastOptions): import("@editora/toast").ToastInstance;
|
|
71
|
-
warning(message: string, options?: ToastOptions): import("@editora/toast").ToastInstance;
|
|
72
|
-
info(message: string, options?: ToastOptions): import("@editora/toast").ToastInstance;
|
|
73
|
-
loading(message: string, options?: ToastOptions): import("@editora/toast").ToastInstance;
|
|
68
|
+
show(message: string, options?: ToastOptions): import("@editora/toast/lite").ToastInstance;
|
|
69
|
+
success(message: string, options?: ToastOptions): import("@editora/toast/lite").ToastInstance;
|
|
70
|
+
error(message: string, options?: ToastOptions): import("@editora/toast/lite").ToastInstance;
|
|
71
|
+
warning(message: string, options?: ToastOptions): import("@editora/toast/lite").ToastInstance;
|
|
72
|
+
info(message: string, options?: ToastOptions): import("@editora/toast/lite").ToastInstance;
|
|
73
|
+
loading(message: string, options?: ToastOptions): import("@editora/toast/lite").ToastInstance;
|
|
74
74
|
dismiss(id: string | number): boolean;
|
|
75
75
|
clear(): void;
|
|
76
76
|
configure(config: Partial<ToastConfig>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastAPI.d.ts","sourceRoot":"","sources":["../../src/components/ToastAPI.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ToastAPI.d.ts","sourceRoot":"","sources":["../../src/components/ToastAPI.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAI7E,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAI7E,eAAO,MAAM,aAAa;;;;;oEAiDxB,CAAD;uEAGC,CAAA;qEAG+B,CAAC;uEAMhC,CAAF;uEAG+C,CAAC;;;;;;;;;;kGA0BhB,GAAI;4FAGO,GAAI;;CA7FG,CAAC;AACnD,eAAO,MAAM,QAAQ;;;;;oEAgDnB,CAAD;uEAGC,CAAA;qEAG+B,CAAC;uEAMhC,CAAF;uEAG+C,CAAC;;;;;;;;;;kGA0BhB,GAAI;4FAGO,GAAI;;CA5FP,CAAC;AACzC,eAAO,MAAM,WAAW;0EAJkF,CAAC,+CAChF,CAAC,oDAAsB,CAAC;6EACd,CAAC,+CACb,CAAC,oDACnB,CAAA;2EAE+B,CAAC,+CACrC,CAAD,oDAGC,CAAC;6EAEA,CAAC,+CAAuC,CAAC,oDAAsB,CAAC;6EAE5C,CAAA,+CAAuC,CAAC,oDAE3C,CAAC;;;;gBASjB,CAAC;;;CArByC,CAAC;AAE/C,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC,GAAG;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAchF,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,+CAMhE;AAED,eAAO,MAAM,QAAQ;kBACL,MAAM,YAAW,YAAY;qBAG1B,MAAM,YAAW,YAAY;mBAG/B,MAAM,YAAW,YAAY;qBAG3B,MAAM,YAAW,YAAY;kBAGhC,MAAM,YAAW,YAAY;qBAG1B,MAAM,YAAW,YAAY;gBAGlC,MAAM,GAAG,MAAM;;sBAMT,OAAO,CAAC,WAAW,CAAC;CAGvC,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,OAAO,QAAQ,CAAC;AAIhD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CAC/B,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAE,aAAkB,QAOtD;AAED,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,kBAAkB,qBASrE;AAED,wBAAgB,QAAQ,IAAI,iBAAiB,CAM5C;AAGD,eAAe,QAAQ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import "react";
|
|
3
|
-
import "@editora/toast";
|
|
3
|
+
import "@editora/toast/lite";
|
|
4
4
|
import { ToastAPI as r, ToastProvider as e, ToastAPI as d, toast as i, toastAdvanced as p, toastApi as A, toastLegacy as P, toastPro as T, useToast as m } from "../ToastAPI.esm.js";
|
|
5
5
|
export {
|
|
6
6
|
r as ToastAPI,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editora/ui-react",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Enterprise React component library with SaaS UI components, modern design system patterns, and wrappers for Editora UI Core.",
|
|
5
5
|
"homepage": "https://editora-ecosystem.netlify.app/docs/ui-react",
|
|
6
6
|
"bugs": {
|
|
@@ -865,7 +865,7 @@
|
|
|
865
865
|
"react-dom": ">=16.8 <21"
|
|
866
866
|
},
|
|
867
867
|
"dependencies": {
|
|
868
|
-
"@editora/toast": "^2.
|
|
868
|
+
"@editora/toast": "^2.2.0",
|
|
869
869
|
"@editora/ui-core": "^0.6.0"
|
|
870
870
|
},
|
|
871
871
|
"keywords": [
|