@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.
- package/dist/{chunk-L3OWFBEU.mjs → chunk-G7F7GRJC.mjs} +204 -134
- package/dist/{core-AMEHYBIM.mjs → core-P3XCQRWR.mjs} +1 -1
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +1024 -1339
- package/dist/index.mjs +681 -1066
- package/package.json +2 -1
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 };
|