@marlinjai/email-editor-core 0.3.0 → 0.4.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/README.md +1 -1
- package/dist/MjmlBuilder-DsiOyhiL.d.mts +667 -0
- package/dist/MjmlBuilder-DsiOyhiL.d.ts +667 -0
- package/dist/{TemplateModel-v__r5Nvi.d.mts → TemplateModel-CmpvrapI.d.ts} +2 -433
- package/dist/{TemplateModel-v__r5Nvi.d.ts → TemplateModel-PcCoyBdo.d.mts} +2 -433
- package/dist/browser.d.mts +13 -0
- package/dist/browser.d.ts +13 -0
- package/dist/browser.js +959 -0
- package/dist/browser.mjs +30 -0
- package/dist/chunk-NQPMHQ5G.mjs +490 -0
- package/dist/chunk-OOCYGZMB.mjs +1406 -0
- package/dist/index.d.mts +4 -29
- package/dist/index.d.ts +4 -29
- package/dist/index.js +877 -32
- package/dist/index.mjs +43 -50
- package/dist/server.d.mts +9 -167
- package/dist/server.d.ts +9 -167
- package/dist/server.js +172 -79
- package/dist/server.mjs +55 -817
- package/package.json +13 -7
- package/dist/TemplateModel-Dq4GoWpl.d.mts +0 -14743
- package/dist/TemplateModel-Dq4GoWpl.d.ts +0 -14743
- package/dist/chunk-2ZL7A2I6.mjs +0 -1029
- package/dist/chunk-MBTNU2JZ.mjs +0 -395
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { E as EmailTemplate, S as Section,
|
|
2
|
-
export { A as AccordionBlock,
|
|
1
|
+
import { E as EmailTemplate, S as Section, c as Block, d as BackgroundGradient, e as MjmlHead } from './MjmlBuilder-DsiOyhiL.mjs';
|
|
2
|
+
export { A as AccordionBlock, f as AccordionItem, g as BaseBlock, B as BuildOptions, h as ButtonBlock, i as CarouselBlock, j as CarouselImage, k as Column, C as CompileOptions, a as CompileResult, D as DEFAULT_MJML_ATTRIBUTES, l as DividerBlock, n as EDITOR_DATA_ATTRIBUTE, b as EDITOR_MARKER, o as ExtraAttributes, F as FontDefinition, p as FooterBlock, G as GradientStop, H as HeaderBlock, q as HeroBlock, I as ImageBlock, M as MjmlBuilder, N as NavbarBlock, r as NavbarLink, R as RawBlock, t as SocialBlock, u as SocialLink, v as SpacerBlock, w as Spacing, x as SubColumn, T as TableBlock, y as TemplateMetadata, z as TemplateVersion, J as TextBlock, K as ThemeColor, L as TopLevelItem, W as Wrapper, O as addPx, P as allSections, Q as base64Utf8, U as buildGradientCSS, V as encodeEditorData, X as isWrapper, m as mjmlOptions, Y as paddingWithGap, s as stripEditorMarkup, Z as textInlineStyles } from './MjmlBuilder-DsiOyhiL.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
+
import { B as BlockType, F as Filled, C as CSSProperties, a as BlockSnapshotIn, b as BlockInstance, T as TemplateSnapshotIn, c as TemplateModel, d as ColumnSnapshotIn, e as ColumnInstance, W as WrapperProperties, S as SectionInstance, f as WrapperInstance, g as SectionSnapshotIn, h as WrapperSnapshotIn, i as TopLevelItemInstance } from './TemplateModel-PcCoyBdo.mjs';
|
|
5
|
+
export { A as AccordionItemModel, j as BlockModel, k as BlockSnapshotOut, l as CarouselImageModel, m as ColumnModel, n as ColumnSnapshotOut, o as FontDefinitionModel, M as MJML_WRAPPER_DEFAULT_PADDING, N as NavbarLinkModel, p as SectionModel, q as SectionSnapshotOut, r as SocialLinkModel, s as SpacingModel, t as TemplateInstance, u as TemplateMetadataInstance, v as TemplateMetadataModel, w as TemplateSnapshotOut, x as ThemeColorModel, y as TopLevelItemModel, z as WrapperModel, D as WrapperSnapshotOut, E as cloneSectionSnapshot, G as createColumn, H as createSection, I as createTemplate, J as createTemplateWithDefaultSection, K as createWrapper, L as isWrapperInstance } from './TemplateModel-PcCoyBdo.mjs';
|
|
4
6
|
import { Draft } from 'immer';
|
|
5
7
|
import * as mobx_state_tree from 'mobx-state-tree';
|
|
6
8
|
import { Instance, SnapshotIn, SnapshotOut } from 'mobx-state-tree';
|
|
@@ -29920,7 +29922,6 @@ declare const EditorUIStore: mobx_state_tree.IModelType<{
|
|
|
29920
29922
|
showLeftPanel: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<boolean>, [undefined]>;
|
|
29921
29923
|
showRightPanel: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<boolean>, [undefined]>;
|
|
29922
29924
|
previewDevice: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<PreviewDevice>, [undefined]>;
|
|
29923
|
-
zoomLevel: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<number>, [undefined]>;
|
|
29924
29925
|
}, {
|
|
29925
29926
|
hoverBlockId: string | undefined;
|
|
29926
29927
|
hoverSectionId: string | undefined;
|
|
@@ -30054,22 +30055,6 @@ declare const EditorUIStore: mobx_state_tree.IModelType<{
|
|
|
30054
30055
|
* Toggle preview device between desktop and mobile
|
|
30055
30056
|
*/
|
|
30056
30057
|
togglePreviewDevice(): void;
|
|
30057
|
-
/**
|
|
30058
|
-
* Set zoom level
|
|
30059
|
-
*/
|
|
30060
|
-
setZoomLevel(zoom: number): void;
|
|
30061
|
-
/**
|
|
30062
|
-
* Zoom in
|
|
30063
|
-
*/
|
|
30064
|
-
zoomIn(): void;
|
|
30065
|
-
/**
|
|
30066
|
-
* Zoom out
|
|
30067
|
-
*/
|
|
30068
|
-
zoomOut(): void;
|
|
30069
|
-
/**
|
|
30070
|
-
* Reset zoom to 100%
|
|
30071
|
-
*/
|
|
30072
|
-
resetZoom(): void;
|
|
30073
30058
|
} & {
|
|
30074
30059
|
/**
|
|
30075
30060
|
* Get the current selection type
|
|
@@ -30127,10 +30112,6 @@ declare const EditorUIStore: mobx_state_tree.IModelType<{
|
|
|
30127
30112
|
* Check if in desktop preview mode
|
|
30128
30113
|
*/
|
|
30129
30114
|
readonly isDesktopPreview: boolean;
|
|
30130
|
-
/**
|
|
30131
|
-
* Get zoom percentage
|
|
30132
|
-
*/
|
|
30133
|
-
readonly zoomPercentage: number;
|
|
30134
30115
|
}, mobx_state_tree._NotCustomized, mobx_state_tree._NotCustomized>;
|
|
30135
30116
|
type EditorUIInstance = Instance<typeof EditorUIStore>;
|
|
30136
30117
|
type EditorUISnapshotIn = SnapshotIn<typeof EditorUIStore>;
|
|
@@ -35485,7 +35466,6 @@ declare const RootStore: mobx_state_tree.IModelType<{
|
|
|
35485
35466
|
showLeftPanel: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<boolean>, [undefined]>;
|
|
35486
35467
|
showRightPanel: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<boolean>, [undefined]>;
|
|
35487
35468
|
previewDevice: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<PreviewDevice>, [undefined]>;
|
|
35488
|
-
zoomLevel: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<number>, [undefined]>;
|
|
35489
35469
|
}, {
|
|
35490
35470
|
hoverBlockId: string | undefined;
|
|
35491
35471
|
hoverSectionId: string | undefined;
|
|
@@ -35531,10 +35511,6 @@ declare const RootStore: mobx_state_tree.IModelType<{
|
|
|
35531
35511
|
setRightPanelVisible(visible: boolean): void;
|
|
35532
35512
|
setPreviewDevice(device: PreviewDevice): void;
|
|
35533
35513
|
togglePreviewDevice(): void;
|
|
35534
|
-
setZoomLevel(zoom: number): void;
|
|
35535
|
-
zoomIn(): void;
|
|
35536
|
-
zoomOut(): void;
|
|
35537
|
-
resetZoom(): void;
|
|
35538
35514
|
} & {
|
|
35539
35515
|
readonly selectionType: SelectionType;
|
|
35540
35516
|
readonly hasSelection: boolean;
|
|
@@ -35550,7 +35526,6 @@ declare const RootStore: mobx_state_tree.IModelType<{
|
|
|
35550
35526
|
readonly previewWidth: number;
|
|
35551
35527
|
readonly isMobilePreview: boolean;
|
|
35552
35528
|
readonly isDesktopPreview: boolean;
|
|
35553
|
-
readonly zoomPercentage: number;
|
|
35554
35529
|
}, mobx_state_tree._NotCustomized, mobx_state_tree._NotCustomized>;
|
|
35555
35530
|
}, {
|
|
35556
35531
|
history: unknown[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { E as EmailTemplate, S as Section,
|
|
2
|
-
export { A as AccordionBlock,
|
|
1
|
+
import { E as EmailTemplate, S as Section, c as Block, d as BackgroundGradient, e as MjmlHead } from './MjmlBuilder-DsiOyhiL.js';
|
|
2
|
+
export { A as AccordionBlock, f as AccordionItem, g as BaseBlock, B as BuildOptions, h as ButtonBlock, i as CarouselBlock, j as CarouselImage, k as Column, C as CompileOptions, a as CompileResult, D as DEFAULT_MJML_ATTRIBUTES, l as DividerBlock, n as EDITOR_DATA_ATTRIBUTE, b as EDITOR_MARKER, o as ExtraAttributes, F as FontDefinition, p as FooterBlock, G as GradientStop, H as HeaderBlock, q as HeroBlock, I as ImageBlock, M as MjmlBuilder, N as NavbarBlock, r as NavbarLink, R as RawBlock, t as SocialBlock, u as SocialLink, v as SpacerBlock, w as Spacing, x as SubColumn, T as TableBlock, y as TemplateMetadata, z as TemplateVersion, J as TextBlock, K as ThemeColor, L as TopLevelItem, W as Wrapper, O as addPx, P as allSections, Q as base64Utf8, U as buildGradientCSS, V as encodeEditorData, X as isWrapper, m as mjmlOptions, Y as paddingWithGap, s as stripEditorMarkup, Z as textInlineStyles } from './MjmlBuilder-DsiOyhiL.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
+
import { B as BlockType, F as Filled, C as CSSProperties, a as BlockSnapshotIn, b as BlockInstance, T as TemplateSnapshotIn, c as TemplateModel, d as ColumnSnapshotIn, e as ColumnInstance, W as WrapperProperties, S as SectionInstance, f as WrapperInstance, g as SectionSnapshotIn, h as WrapperSnapshotIn, i as TopLevelItemInstance } from './TemplateModel-CmpvrapI.js';
|
|
5
|
+
export { A as AccordionItemModel, j as BlockModel, k as BlockSnapshotOut, l as CarouselImageModel, m as ColumnModel, n as ColumnSnapshotOut, o as FontDefinitionModel, M as MJML_WRAPPER_DEFAULT_PADDING, N as NavbarLinkModel, p as SectionModel, q as SectionSnapshotOut, r as SocialLinkModel, s as SpacingModel, t as TemplateInstance, u as TemplateMetadataInstance, v as TemplateMetadataModel, w as TemplateSnapshotOut, x as ThemeColorModel, y as TopLevelItemModel, z as WrapperModel, D as WrapperSnapshotOut, E as cloneSectionSnapshot, G as createColumn, H as createSection, I as createTemplate, J as createTemplateWithDefaultSection, K as createWrapper, L as isWrapperInstance } from './TemplateModel-CmpvrapI.js';
|
|
4
6
|
import { Draft } from 'immer';
|
|
5
7
|
import * as mobx_state_tree from 'mobx-state-tree';
|
|
6
8
|
import { Instance, SnapshotIn, SnapshotOut } from 'mobx-state-tree';
|
|
@@ -29920,7 +29922,6 @@ declare const EditorUIStore: mobx_state_tree.IModelType<{
|
|
|
29920
29922
|
showLeftPanel: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<boolean>, [undefined]>;
|
|
29921
29923
|
showRightPanel: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<boolean>, [undefined]>;
|
|
29922
29924
|
previewDevice: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<PreviewDevice>, [undefined]>;
|
|
29923
|
-
zoomLevel: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<number>, [undefined]>;
|
|
29924
29925
|
}, {
|
|
29925
29926
|
hoverBlockId: string | undefined;
|
|
29926
29927
|
hoverSectionId: string | undefined;
|
|
@@ -30054,22 +30055,6 @@ declare const EditorUIStore: mobx_state_tree.IModelType<{
|
|
|
30054
30055
|
* Toggle preview device between desktop and mobile
|
|
30055
30056
|
*/
|
|
30056
30057
|
togglePreviewDevice(): void;
|
|
30057
|
-
/**
|
|
30058
|
-
* Set zoom level
|
|
30059
|
-
*/
|
|
30060
|
-
setZoomLevel(zoom: number): void;
|
|
30061
|
-
/**
|
|
30062
|
-
* Zoom in
|
|
30063
|
-
*/
|
|
30064
|
-
zoomIn(): void;
|
|
30065
|
-
/**
|
|
30066
|
-
* Zoom out
|
|
30067
|
-
*/
|
|
30068
|
-
zoomOut(): void;
|
|
30069
|
-
/**
|
|
30070
|
-
* Reset zoom to 100%
|
|
30071
|
-
*/
|
|
30072
|
-
resetZoom(): void;
|
|
30073
30058
|
} & {
|
|
30074
30059
|
/**
|
|
30075
30060
|
* Get the current selection type
|
|
@@ -30127,10 +30112,6 @@ declare const EditorUIStore: mobx_state_tree.IModelType<{
|
|
|
30127
30112
|
* Check if in desktop preview mode
|
|
30128
30113
|
*/
|
|
30129
30114
|
readonly isDesktopPreview: boolean;
|
|
30130
|
-
/**
|
|
30131
|
-
* Get zoom percentage
|
|
30132
|
-
*/
|
|
30133
|
-
readonly zoomPercentage: number;
|
|
30134
30115
|
}, mobx_state_tree._NotCustomized, mobx_state_tree._NotCustomized>;
|
|
30135
30116
|
type EditorUIInstance = Instance<typeof EditorUIStore>;
|
|
30136
30117
|
type EditorUISnapshotIn = SnapshotIn<typeof EditorUIStore>;
|
|
@@ -35485,7 +35466,6 @@ declare const RootStore: mobx_state_tree.IModelType<{
|
|
|
35485
35466
|
showLeftPanel: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<boolean>, [undefined]>;
|
|
35486
35467
|
showRightPanel: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<boolean>, [undefined]>;
|
|
35487
35468
|
previewDevice: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<PreviewDevice>, [undefined]>;
|
|
35488
|
-
zoomLevel: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<number>, [undefined]>;
|
|
35489
35469
|
}, {
|
|
35490
35470
|
hoverBlockId: string | undefined;
|
|
35491
35471
|
hoverSectionId: string | undefined;
|
|
@@ -35531,10 +35511,6 @@ declare const RootStore: mobx_state_tree.IModelType<{
|
|
|
35531
35511
|
setRightPanelVisible(visible: boolean): void;
|
|
35532
35512
|
setPreviewDevice(device: PreviewDevice): void;
|
|
35533
35513
|
togglePreviewDevice(): void;
|
|
35534
|
-
setZoomLevel(zoom: number): void;
|
|
35535
|
-
zoomIn(): void;
|
|
35536
|
-
zoomOut(): void;
|
|
35537
|
-
resetZoom(): void;
|
|
35538
35514
|
} & {
|
|
35539
35515
|
readonly selectionType: SelectionType;
|
|
35540
35516
|
readonly hasSelection: boolean;
|
|
@@ -35550,7 +35526,6 @@ declare const RootStore: mobx_state_tree.IModelType<{
|
|
|
35550
35526
|
readonly previewWidth: number;
|
|
35551
35527
|
readonly isMobilePreview: boolean;
|
|
35552
35528
|
readonly isDesktopPreview: boolean;
|
|
35553
|
-
readonly zoomPercentage: number;
|
|
35554
35529
|
}, mobx_state_tree._NotCustomized, mobx_state_tree._NotCustomized>;
|
|
35555
35530
|
}, {
|
|
35556
35531
|
history: unknown[];
|