@scalar/use-toasts 0.6.6 → 0.6.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/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarToasts.vue.d.ts","sourceRoot":"","sources":["../../src/components/ScalarToasts.vue.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ScalarToasts.vue.d.ts","sourceRoot":"","sources":["../../src/components/ScalarToasts.vue.ts"],"names":[],"mappings":";AAgFA,wBAKG"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type ToastOptions = {
|
|
2
2
|
timeout?: number;
|
|
3
|
+
description?: string;
|
|
3
4
|
};
|
|
4
5
|
export type ToastFunction = (message: string, level?: 'warn' | 'info' | 'error', options?: ToastOptions) => void | null;
|
|
5
6
|
export declare function initializeToasts(toastFunction: ToastFunction): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToasts.d.ts","sourceRoot":"","sources":["../../src/hooks/useToasts.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"useToasts.d.ts","sourceRoot":"","sources":["../../src/hooks/useToasts.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,EACjC,OAAO,CAAC,EAAE,YAAY,KACnB,IAAI,GAAG,IAAI,CAAA;AAQhB,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,aAAa,QAE5D;AAED,kBAAkB;AAClB,wBAAgB,SAAS;;qBAIV,MAAM,UACR,MAAM,GAAG,MAAM,GAAG,OAAO,YACvB,YAAY;EAK1B"}
|
package/dist/index.js
CHANGED
|
@@ -595,7 +595,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
595
595
|
initializeToasts2((message, level = "info", options = {}) => {
|
|
596
596
|
const toastAction = toastMethods[level] || toastMethods.info;
|
|
597
597
|
toastAction(message, {
|
|
598
|
-
duration: options.timeout || 3e3
|
|
598
|
+
duration: options.timeout || 3e3,
|
|
599
|
+
description: options.description
|
|
599
600
|
});
|
|
600
601
|
});
|
|
601
602
|
return (_ctx, _cache) => {
|