@kgalexander/mcreate 0.0.16 → 1.0.0

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-L3OWFBEU.mjs";
8
+ } from "./chunk-G7F7GRJC.mjs";
9
9
  export {
10
10
  Editor,
11
11
  History,
package/dist/index.d.mts CHANGED
@@ -290,6 +290,8 @@ interface MergeField {
290
290
  type OnSaveCallback = (templateId: string, template: TemplateJSON) => void | Promise<void>;
291
291
  type OnExitCallback = () => void;
292
292
  type OnImageUploadCallback = (file: File) => Promise<ImageData>;
293
+ type OnDuplicateCallback = (templateId: string, template: TemplateJSON) => void | Promise<void>;
294
+ type OnDeleteCallback = (templateId: string) => void | Promise<void>;
293
295
  type PaidLevel = 0 | 1 | 2 | 3;
294
296
 
295
297
  interface EditorProps {
@@ -298,13 +300,15 @@ interface EditorProps {
298
300
  }
299
301
  declare function Editor({ setEditorLoading }: EditorProps): react_jsx_runtime.JSX.Element;
300
302
 
301
- declare function TemplatePage({ templateId, initialTemplate, onSave, onToast, onExit, onImageUpload, data, }: {
303
+ declare function TemplatePage({ templateId, initialTemplate, onSave, onToast, onExit, onImageUpload, onDuplicate, onDelete, data, }: {
302
304
  templateId: string;
303
305
  initialTemplate: TemplateJSON;
304
306
  onSave?: OnSaveCallback;
305
307
  onToast?: OnToastCallback;
306
308
  onExit?: OnExitCallback;
307
309
  onImageUpload?: OnImageUploadCallback;
310
+ onDuplicate?: OnDuplicateCallback;
311
+ onDelete?: OnDeleteCallback;
308
312
  data?: {
309
313
  isPaidLevel?: PaidLevel;
310
314
  images?: ImageData[];
@@ -333,4 +337,4 @@ interface RenderOptions {
333
337
  */
334
338
  declare function json2mjml(template: TemplateJSON, mode?: RenderMode, options?: RenderOptions): string;
335
339
 
336
- export { Editor, type ImageData, MAX_TEMPLATE_SIZE, type MergeField, type OnExitCallback, type OnImageUploadCallback, type OnSaveCallback, type OnToastCallback, type PaidLevel, type TemplateJSON, TemplatePage, type ToastOptions, type ToastType, json2mjml };
340
+ export { Editor, type ImageData, MAX_TEMPLATE_SIZE, type MergeField, type OnDeleteCallback, type OnDuplicateCallback, type OnExitCallback, type OnImageUploadCallback, type OnSaveCallback, type OnToastCallback, type PaidLevel, type TemplateJSON, TemplatePage, type ToastOptions, type ToastType, json2mjml };
package/dist/index.d.ts CHANGED
@@ -290,6 +290,8 @@ interface MergeField {
290
290
  type OnSaveCallback = (templateId: string, template: TemplateJSON) => void | Promise<void>;
291
291
  type OnExitCallback = () => void;
292
292
  type OnImageUploadCallback = (file: File) => Promise<ImageData>;
293
+ type OnDuplicateCallback = (templateId: string, template: TemplateJSON) => void | Promise<void>;
294
+ type OnDeleteCallback = (templateId: string) => void | Promise<void>;
293
295
  type PaidLevel = 0 | 1 | 2 | 3;
294
296
 
295
297
  interface EditorProps {
@@ -298,13 +300,15 @@ interface EditorProps {
298
300
  }
299
301
  declare function Editor({ setEditorLoading }: EditorProps): react_jsx_runtime.JSX.Element;
300
302
 
301
- declare function TemplatePage({ templateId, initialTemplate, onSave, onToast, onExit, onImageUpload, data, }: {
303
+ declare function TemplatePage({ templateId, initialTemplate, onSave, onToast, onExit, onImageUpload, onDuplicate, onDelete, data, }: {
302
304
  templateId: string;
303
305
  initialTemplate: TemplateJSON;
304
306
  onSave?: OnSaveCallback;
305
307
  onToast?: OnToastCallback;
306
308
  onExit?: OnExitCallback;
307
309
  onImageUpload?: OnImageUploadCallback;
310
+ onDuplicate?: OnDuplicateCallback;
311
+ onDelete?: OnDeleteCallback;
308
312
  data?: {
309
313
  isPaidLevel?: PaidLevel;
310
314
  images?: ImageData[];
@@ -333,4 +337,4 @@ interface RenderOptions {
333
337
  */
334
338
  declare function json2mjml(template: TemplateJSON, mode?: RenderMode, options?: RenderOptions): string;
335
339
 
336
- export { Editor, type ImageData, MAX_TEMPLATE_SIZE, type MergeField, type OnExitCallback, type OnImageUploadCallback, type OnSaveCallback, type OnToastCallback, type PaidLevel, type TemplateJSON, TemplatePage, type ToastOptions, type ToastType, json2mjml };
340
+ export { Editor, type ImageData, MAX_TEMPLATE_SIZE, type MergeField, type OnDeleteCallback, type OnDuplicateCallback, type OnExitCallback, type OnImageUploadCallback, type OnSaveCallback, type OnToastCallback, type PaidLevel, type TemplateJSON, TemplatePage, type ToastOptions, type ToastType, json2mjml };