@kgalexander/mcreate 0.0.12 → 0.0.13

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.
@@ -5,7 +5,7 @@ import {
5
5
  MAILLOW_EMAIL_EDITOR_VERSION,
6
6
  Preview,
7
7
  useEditorStore
8
- } from "./chunk-PL5EKNN6.mjs";
8
+ } from "./chunk-LAW7VVEQ.mjs";
9
9
  export {
10
10
  Editor,
11
11
  History,
package/dist/index.d.mts CHANGED
@@ -259,6 +259,15 @@ type TemplateJSON = {
259
259
  content: PageElement[];
260
260
  };
261
261
 
262
+ type ToastType = 'default' | 'success' | 'info' | 'warning' | 'error' | 'promise';
263
+ interface ToastOptions {
264
+ type: ToastType;
265
+ message: string;
266
+ description?: string;
267
+ duration?: number;
268
+ }
269
+ type OnToastCallback = (options: ToastOptions) => void;
270
+
262
271
  type OnSaveCallback = (templateId: string, template: TemplateJSON) => void | Promise<void>;
263
272
  type PaidLevel = 0 | 1 | 2 | 3;
264
273
 
@@ -268,10 +277,11 @@ interface EditorProps {
268
277
  }
269
278
  declare function Editor({ setEditorLoading }: EditorProps): react_jsx_runtime.JSX.Element;
270
279
 
271
- declare function TemplatePage({ templateId, initialTemplate, onSave, isPaidLevel }: {
280
+ declare function TemplatePage({ templateId, initialTemplate, onSave, onToast, isPaidLevel }: {
272
281
  templateId: string;
273
282
  initialTemplate: TemplateJSON;
274
283
  onSave?: OnSaveCallback;
284
+ onToast?: OnToastCallback;
275
285
  isPaidLevel?: PaidLevel;
276
286
  }): react_jsx_runtime.JSX.Element;
277
287
 
@@ -293,4 +303,4 @@ interface RenderOptions {
293
303
  */
294
304
  declare function json2mjml(template: TemplateJSON, mode?: RenderMode, options?: RenderOptions): string;
295
305
 
296
- export { Editor, type OnSaveCallback, type PaidLevel, type TemplateJSON, TemplatePage, json2mjml };
306
+ export { Editor, type OnSaveCallback, type OnToastCallback, type PaidLevel, type TemplateJSON, TemplatePage, type ToastOptions, type ToastType, json2mjml };
package/dist/index.d.ts CHANGED
@@ -259,6 +259,15 @@ type TemplateJSON = {
259
259
  content: PageElement[];
260
260
  };
261
261
 
262
+ type ToastType = 'default' | 'success' | 'info' | 'warning' | 'error' | 'promise';
263
+ interface ToastOptions {
264
+ type: ToastType;
265
+ message: string;
266
+ description?: string;
267
+ duration?: number;
268
+ }
269
+ type OnToastCallback = (options: ToastOptions) => void;
270
+
262
271
  type OnSaveCallback = (templateId: string, template: TemplateJSON) => void | Promise<void>;
263
272
  type PaidLevel = 0 | 1 | 2 | 3;
264
273
 
@@ -268,10 +277,11 @@ interface EditorProps {
268
277
  }
269
278
  declare function Editor({ setEditorLoading }: EditorProps): react_jsx_runtime.JSX.Element;
270
279
 
271
- declare function TemplatePage({ templateId, initialTemplate, onSave, isPaidLevel }: {
280
+ declare function TemplatePage({ templateId, initialTemplate, onSave, onToast, isPaidLevel }: {
272
281
  templateId: string;
273
282
  initialTemplate: TemplateJSON;
274
283
  onSave?: OnSaveCallback;
284
+ onToast?: OnToastCallback;
275
285
  isPaidLevel?: PaidLevel;
276
286
  }): react_jsx_runtime.JSX.Element;
277
287
 
@@ -293,4 +303,4 @@ interface RenderOptions {
293
303
  */
294
304
  declare function json2mjml(template: TemplateJSON, mode?: RenderMode, options?: RenderOptions): string;
295
305
 
296
- export { Editor, type OnSaveCallback, type PaidLevel, type TemplateJSON, TemplatePage, json2mjml };
306
+ export { Editor, type OnSaveCallback, type OnToastCallback, type PaidLevel, type TemplateJSON, TemplatePage, type ToastOptions, type ToastType, json2mjml };