mjml-blocks 4.11.0 → 4.13.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 +4 -7
- package/dist/index.d.ts +23 -21
- package/dist/index.js +23 -21
- package/dist/models/MjmlAccordionElementNode.d.ts +1 -1
- package/dist/models/MjmlAccordionElementProps.d.ts +11 -11
- package/dist/models/MjmlAccordionNode.d.ts +1 -1
- package/dist/models/MjmlAccordionProps.d.ts +16 -16
- package/dist/models/MjmlAccordionTextNode.d.ts +1 -1
- package/dist/models/MjmlAccordionTextProps.d.ts +12 -12
- package/dist/models/MjmlAccordionTitleNode.d.ts +1 -1
- package/dist/models/MjmlAccordionTitleProps.d.ts +10 -10
- package/dist/models/MjmlAttributeField.d.ts +1 -1
- package/dist/models/MjmlAttributeKind.d.ts +9 -8
- package/dist/models/MjmlAttributeKind.js +8 -9
- package/dist/models/MjmlAttributeType.d.ts +6 -6
- package/dist/models/MjmlBlockTypeDefinition.d.ts +3 -3
- package/dist/models/MjmlButtonNode.d.ts +1 -1
- package/dist/models/MjmlButtonProps.d.ts +33 -33
- package/dist/models/MjmlCarouselImageNode.d.ts +1 -1
- package/dist/models/MjmlCarouselImageProps.d.ts +11 -11
- package/dist/models/MjmlCarouselNode.d.ts +1 -1
- package/dist/models/MjmlCarouselProps.d.ts +17 -17
- package/dist/models/MjmlColumnNode.d.ts +1 -1
- package/dist/models/MjmlColumnProps.d.ts +22 -22
- package/dist/models/MjmlContentKind.d.ts +6 -5
- package/dist/models/MjmlContentKind.js +5 -6
- package/dist/models/MjmlDirection.d.ts +6 -5
- package/dist/models/MjmlDirection.js +5 -6
- package/dist/models/MjmlDividerNode.d.ts +1 -1
- package/dist/models/MjmlDividerProps.d.ts +11 -11
- package/dist/models/MjmlGroupNode.d.ts +1 -1
- package/dist/models/MjmlGroupProps.d.ts +4 -4
- package/dist/models/MjmlHeroNode.d.ts +1 -1
- package/dist/models/MjmlHeroProps.d.ts +20 -20
- package/dist/models/MjmlImageNode.d.ts +1 -1
- package/dist/models/MjmlImageProps.d.ts +29 -29
- package/dist/models/MjmlNavbarLinkNode.d.ts +1 -1
- package/dist/models/MjmlNavbarLinkProps.d.ts +18 -18
- package/dist/models/MjmlNavbarNode.d.ts +1 -1
- package/dist/models/MjmlNavbarProps.d.ts +22 -22
- package/dist/models/MjmlNodeType.d.ts +25 -24
- package/dist/models/MjmlNodeType.js +24 -25
- package/dist/models/MjmlRawNode.d.ts +1 -1
- package/dist/models/MjmlRawProps.d.ts +1 -1
- package/dist/models/MjmlRenderSpecification.d.ts +1 -1
- package/dist/models/MjmlRichText.d.ts +1 -1
- package/dist/models/MjmlRootProps.d.ts +9 -9
- package/dist/models/MjmlSectionNode.d.ts +1 -1
- package/dist/models/MjmlSectionProps.d.ts +23 -23
- package/dist/models/MjmlSocialElementNode.d.ts +1 -1
- package/dist/models/MjmlSocialElementProps.d.ts +31 -31
- package/dist/models/MjmlSocialNode.d.ts +1 -1
- package/dist/models/MjmlSocialProps.d.ts +24 -24
- package/dist/models/MjmlSpacerNode.d.ts +1 -1
- package/dist/models/MjmlSpacerProps.d.ts +12 -12
- package/dist/models/MjmlTableNode.d.ts +1 -1
- package/dist/models/MjmlTableProps.d.ts +19 -19
- package/dist/models/MjmlTextNode.d.ts +1 -1
- package/dist/models/MjmlTextProps.d.ts +19 -19
- package/dist/models/MjmlWrapperNode.d.ts +1 -1
- package/dist/models/MjmlWrapperProps.d.ts +24 -24
- package/dist/services/MjmlContentKindSchemaMap.d.ts +2 -2
- package/dist/services/MjmlContentKindSchemaMap.js +3 -3
- package/dist/services/checkMjmlAlternativeText.d.ts +2 -2
- package/dist/services/components/createMjmlAccordionTextPropsSchema.d.ts +1 -1
- package/dist/services/components/createMjmlAccordionTextType.js +2 -2
- package/dist/services/components/createMjmlRichTextType.js +3 -3
- package/dist/services/components/createMjmlTextPropsSchema.d.ts +1 -1
- package/dist/services/components/createMjmlTextType.js +2 -2
- package/dist/services/components/mjAccordion.d.ts +1 -1
- package/dist/services/components/mjAccordion.js +6 -5
- package/dist/services/components/mjAccordionElement.d.ts +3 -2
- package/dist/services/components/mjAccordionElement.js +7 -7
- package/dist/services/components/mjAccordionTitle.d.ts +1 -1
- package/dist/services/components/mjAccordionTitle.js +9 -8
- package/dist/services/components/mjButton.d.ts +1 -1
- package/dist/services/components/mjButton.js +9 -8
- package/dist/services/components/mjCarousel.d.ts +1 -1
- package/dist/services/components/mjCarousel.js +6 -5
- package/dist/services/components/mjCarouselImage.d.ts +3 -2
- package/dist/services/components/mjCarouselImage.js +4 -4
- package/dist/services/components/mjColumn.d.ts +1 -1
- package/dist/services/components/mjColumn.js +16 -15
- package/dist/services/components/mjDivider.d.ts +1 -1
- package/dist/services/components/mjDivider.js +5 -4
- package/dist/services/components/mjGroup.d.ts +3 -2
- package/dist/services/components/mjGroup.js +5 -5
- package/dist/services/components/mjHero.d.ts +1 -1
- package/dist/services/components/mjHero.js +16 -15
- package/dist/services/components/mjImage.d.ts +1 -1
- package/dist/services/components/mjImage.js +5 -4
- package/dist/services/components/mjNavbar.d.ts +1 -1
- package/dist/services/components/mjNavbar.js +6 -5
- package/dist/services/components/mjNavbarLink.d.ts +1 -1
- package/dist/services/components/mjNavbarLink.js +9 -8
- package/dist/services/components/mjRaw.d.ts +3 -2
- package/dist/services/components/mjRaw.js +8 -8
- package/dist/services/components/mjSection.js +6 -6
- package/dist/services/components/mjSocial.d.ts +1 -1
- package/dist/services/components/mjSocial.js +6 -5
- package/dist/services/components/mjSocialElement.d.ts +1 -1
- package/dist/services/components/mjSocialElement.js +9 -8
- package/dist/services/components/mjSpacer.d.ts +1 -1
- package/dist/services/components/mjSpacer.js +5 -4
- package/dist/services/components/mjTable.d.ts +1 -1
- package/dist/services/components/mjTable.js +9 -8
- package/dist/services/components/mjWrapper.d.ts +0 -5
- package/dist/services/components/mjWrapper.js +7 -7
- package/dist/services/constants.d.ts +1 -1
- package/dist/services/constants.js +7 -11
- package/dist/services/createMjmlDocumentSchema.d.ts +1 -1
- package/dist/services/createMjmlRootPropsSchema.js +2 -1
- package/dist/services/createMjmlSlotSchema.js +1 -1
- package/dist/services/createTypeSchema.js +7 -7
- package/dist/services/getFilledMjmlAttributes.d.ts +1 -0
- package/dist/services/getFilledMjmlAttributes.js +3 -0
- package/dist/services/mjmlNodeChildren.js +23 -23
- package/dist/services/mjmlNodeSchema.js +23 -23
- package/dist/services/mjmlRootPropsSchema.d.ts +2 -2
- package/dist/services/mjmlRootPropsSchema.js +2 -2
- package/dist/services/parseMjmlAttributeType.js +7 -7
- package/dist/services/parseMjmlDocument.js +2 -1
- package/dist/services/readMjmlContent.d.ts +1 -1
- package/dist/services/readMjmlContent.js +4 -4
- package/dist/services/readMjmlNode.js +2 -1
- package/dist/services/readMjmlNodes.js +2 -1
- package/dist/services/readMjmlRoot.js +2 -1
- package/dist/services/readMjmlRootProps.d.ts +1 -0
- package/dist/services/readMjmlRootProps.js +7 -0
- package/dist/services/renderMjmlDocument.js +3 -2
- package/dist/services/renderMjmlHead.js +1 -1
- package/dist/services/renderMjmlNode.js +8 -8
- package/package.json +7 -6
|
@@ -3,28 +3,28 @@ import { MjmlGroupNode } from "./MjmlGroupNode.js";
|
|
|
3
3
|
import { MjmlRawNode } from "./MjmlRawNode.js";
|
|
4
4
|
import { BlockNodeProps } from "vue-block-editor-headless";
|
|
5
5
|
export interface MjmlSectionProps extends BlockNodeProps {
|
|
6
|
-
"background-color"?: string;
|
|
7
|
-
"background-position"?: string;
|
|
8
|
-
"background-position-x"?: string;
|
|
9
|
-
"background-position-y"?: string;
|
|
10
|
-
"background-repeat"?: string;
|
|
11
|
-
"background-size"?: string;
|
|
12
|
-
"background-url"?: string;
|
|
13
|
-
border?: string;
|
|
14
|
-
"border-bottom"?: string;
|
|
15
|
-
"border-left"?: string;
|
|
16
|
-
"border-radius"?: string;
|
|
17
|
-
"border-right"?: string;
|
|
18
|
-
"border-top"?: string;
|
|
6
|
+
"background-color"?: string | undefined;
|
|
7
|
+
"background-position"?: string | undefined;
|
|
8
|
+
"background-position-x"?: string | undefined;
|
|
9
|
+
"background-position-y"?: string | undefined;
|
|
10
|
+
"background-repeat"?: string | undefined;
|
|
11
|
+
"background-size"?: string | undefined;
|
|
12
|
+
"background-url"?: string | undefined;
|
|
13
|
+
border?: string | undefined;
|
|
14
|
+
"border-bottom"?: string | undefined;
|
|
15
|
+
"border-left"?: string | undefined;
|
|
16
|
+
"border-radius"?: string | undefined;
|
|
17
|
+
"border-right"?: string | undefined;
|
|
18
|
+
"border-top"?: string | undefined;
|
|
19
19
|
children: (MjmlColumnNode | MjmlGroupNode | MjmlRawNode)[];
|
|
20
|
-
direction?: string;
|
|
21
|
-
"full-width"?: string;
|
|
22
|
-
gutter?: string;
|
|
23
|
-
padding?: string;
|
|
24
|
-
"padding-bottom"?: string;
|
|
25
|
-
"padding-left"?: string;
|
|
26
|
-
"padding-right"?: string;
|
|
27
|
-
"padding-top"?: string;
|
|
28
|
-
"text-align"?: string;
|
|
29
|
-
"text-padding"?: string;
|
|
20
|
+
direction?: string | undefined;
|
|
21
|
+
"full-width"?: string | undefined;
|
|
22
|
+
gutter?: string | undefined;
|
|
23
|
+
padding?: string | undefined;
|
|
24
|
+
"padding-bottom"?: string | undefined;
|
|
25
|
+
"padding-left"?: string | undefined;
|
|
26
|
+
"padding-right"?: string | undefined;
|
|
27
|
+
"padding-top"?: string | undefined;
|
|
28
|
+
"text-align"?: string | undefined;
|
|
29
|
+
"text-padding"?: string | undefined;
|
|
30
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MjmlNodeType } from "./MjmlNodeType.js";
|
|
2
2
|
import { MjmlSocialElementProps } from "./MjmlSocialElementProps.js";
|
|
3
3
|
import { BlockNode } from "vue-block-editor-headless";
|
|
4
|
-
export type MjmlSocialElementNode = BlockNode<MjmlNodeType.SocialElement, MjmlSocialElementProps>;
|
|
4
|
+
export type MjmlSocialElementNode = BlockNode<typeof MjmlNodeType.SocialElement, MjmlSocialElementProps>;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { BlockNodeProps } from "vue-block-editor-headless";
|
|
2
2
|
export interface MjmlSocialElementProps extends BlockNodeProps {
|
|
3
|
-
align?: string;
|
|
4
|
-
alt?: string;
|
|
5
|
-
"background-color"?: string;
|
|
6
|
-
border?: string;
|
|
7
|
-
"border-radius"?: string;
|
|
8
|
-
color?: string;
|
|
3
|
+
align?: string | undefined;
|
|
4
|
+
alt?: string | undefined;
|
|
5
|
+
"background-color"?: string | undefined;
|
|
6
|
+
border?: string | undefined;
|
|
7
|
+
"border-radius"?: string | undefined;
|
|
8
|
+
color?: string | undefined;
|
|
9
9
|
content: string;
|
|
10
|
-
"font-family"?: string;
|
|
11
|
-
"font-size"?: string;
|
|
12
|
-
"font-style"?: string;
|
|
13
|
-
"font-weight"?: string;
|
|
14
|
-
href?: string;
|
|
15
|
-
"icon-height"?: string;
|
|
16
|
-
"icon-padding"?: string;
|
|
17
|
-
"icon-position"?: string;
|
|
18
|
-
"icon-size"?: string;
|
|
19
|
-
"line-height"?: string;
|
|
20
|
-
name?: string;
|
|
21
|
-
padding?: string;
|
|
22
|
-
"padding-bottom"?: string;
|
|
23
|
-
"padding-left"?: string;
|
|
24
|
-
"padding-right"?: string;
|
|
25
|
-
"padding-top"?: string;
|
|
26
|
-
rel?: string;
|
|
27
|
-
sizes?: string;
|
|
28
|
-
src?: string;
|
|
29
|
-
srcset?: string;
|
|
30
|
-
target?: string;
|
|
31
|
-
"text-decoration"?: string;
|
|
32
|
-
"text-padding"?: string;
|
|
33
|
-
title?: string;
|
|
34
|
-
"vertical-align"?: string;
|
|
10
|
+
"font-family"?: string | undefined;
|
|
11
|
+
"font-size"?: string | undefined;
|
|
12
|
+
"font-style"?: string | undefined;
|
|
13
|
+
"font-weight"?: string | undefined;
|
|
14
|
+
href?: string | undefined;
|
|
15
|
+
"icon-height"?: string | undefined;
|
|
16
|
+
"icon-padding"?: string | undefined;
|
|
17
|
+
"icon-position"?: string | undefined;
|
|
18
|
+
"icon-size"?: string | undefined;
|
|
19
|
+
"line-height"?: string | undefined;
|
|
20
|
+
name?: string | undefined;
|
|
21
|
+
padding?: string | undefined;
|
|
22
|
+
"padding-bottom"?: string | undefined;
|
|
23
|
+
"padding-left"?: string | undefined;
|
|
24
|
+
"padding-right"?: string | undefined;
|
|
25
|
+
"padding-top"?: string | undefined;
|
|
26
|
+
rel?: string | undefined;
|
|
27
|
+
sizes?: string | undefined;
|
|
28
|
+
src?: string | undefined;
|
|
29
|
+
srcset?: string | undefined;
|
|
30
|
+
target?: string | undefined;
|
|
31
|
+
"text-decoration"?: string | undefined;
|
|
32
|
+
"text-padding"?: string | undefined;
|
|
33
|
+
title?: string | undefined;
|
|
34
|
+
"vertical-align"?: string | undefined;
|
|
35
35
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MjmlNodeType } from "./MjmlNodeType.js";
|
|
2
2
|
import { MjmlSocialProps } from "./MjmlSocialProps.js";
|
|
3
3
|
import { BlockNode } from "vue-block-editor-headless";
|
|
4
|
-
export type MjmlSocialNode = BlockNode<MjmlNodeType.Social, MjmlSocialProps>;
|
|
4
|
+
export type MjmlSocialNode = BlockNode<typeof MjmlNodeType.Social, MjmlSocialProps>;
|
|
@@ -2,29 +2,29 @@ import { MjmlRawNode } from "./MjmlRawNode.js";
|
|
|
2
2
|
import { MjmlSocialElementNode } from "./MjmlSocialElementNode.js";
|
|
3
3
|
import { BlockNodeProps } from "vue-block-editor-headless";
|
|
4
4
|
export interface MjmlSocialProps extends BlockNodeProps {
|
|
5
|
-
align?: string;
|
|
6
|
-
border?: string;
|
|
7
|
-
"border-radius"?: string;
|
|
5
|
+
align?: string | undefined;
|
|
6
|
+
border?: string | undefined;
|
|
7
|
+
"border-radius"?: string | undefined;
|
|
8
8
|
children: (MjmlRawNode | MjmlSocialElementNode)[];
|
|
9
|
-
color?: string;
|
|
10
|
-
"container-background-color"?: string;
|
|
11
|
-
"font-family"?: string;
|
|
12
|
-
"font-size"?: string;
|
|
13
|
-
"font-style"?: string;
|
|
14
|
-
"font-weight"?: string;
|
|
15
|
-
"icon-height"?: string;
|
|
16
|
-
"icon-padding"?: string;
|
|
17
|
-
"icon-size"?: string;
|
|
18
|
-
"inner-padding"?: string;
|
|
19
|
-
"line-height"?: string;
|
|
20
|
-
mode?: string;
|
|
21
|
-
padding?: string;
|
|
22
|
-
"padding-bottom"?: string;
|
|
23
|
-
"padding-left"?: string;
|
|
24
|
-
"padding-right"?: string;
|
|
25
|
-
"padding-top"?: string;
|
|
26
|
-
"table-layout"?: string;
|
|
27
|
-
"text-decoration"?: string;
|
|
28
|
-
"text-padding"?: string;
|
|
29
|
-
"vertical-align"?: string;
|
|
9
|
+
color?: string | undefined;
|
|
10
|
+
"container-background-color"?: string | undefined;
|
|
11
|
+
"font-family"?: string | undefined;
|
|
12
|
+
"font-size"?: string | undefined;
|
|
13
|
+
"font-style"?: string | undefined;
|
|
14
|
+
"font-weight"?: string | undefined;
|
|
15
|
+
"icon-height"?: string | undefined;
|
|
16
|
+
"icon-padding"?: string | undefined;
|
|
17
|
+
"icon-size"?: string | undefined;
|
|
18
|
+
"inner-padding"?: string | undefined;
|
|
19
|
+
"line-height"?: string | undefined;
|
|
20
|
+
mode?: string | undefined;
|
|
21
|
+
padding?: string | undefined;
|
|
22
|
+
"padding-bottom"?: string | undefined;
|
|
23
|
+
"padding-left"?: string | undefined;
|
|
24
|
+
"padding-right"?: string | undefined;
|
|
25
|
+
"padding-top"?: string | undefined;
|
|
26
|
+
"table-layout"?: string | undefined;
|
|
27
|
+
"text-decoration"?: string | undefined;
|
|
28
|
+
"text-padding"?: string | undefined;
|
|
29
|
+
"vertical-align"?: string | undefined;
|
|
30
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MjmlNodeType } from "./MjmlNodeType.js";
|
|
2
2
|
import { MjmlSpacerProps } from "./MjmlSpacerProps.js";
|
|
3
3
|
import { BlockNode } from "vue-block-editor-headless";
|
|
4
|
-
export type MjmlSpacerNode = BlockNode<MjmlNodeType.Spacer, MjmlSpacerProps>;
|
|
4
|
+
export type MjmlSpacerNode = BlockNode<typeof MjmlNodeType.Spacer, MjmlSpacerProps>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { BlockNodeProps } from "vue-block-editor-headless";
|
|
2
2
|
export interface MjmlSpacerProps extends BlockNodeProps {
|
|
3
|
-
border?: string;
|
|
4
|
-
"border-bottom"?: string;
|
|
5
|
-
"border-left"?: string;
|
|
6
|
-
"border-right"?: string;
|
|
7
|
-
"border-top"?: string;
|
|
8
|
-
"container-background-color"?: string;
|
|
9
|
-
height?: string;
|
|
10
|
-
padding?: string;
|
|
11
|
-
"padding-bottom"?: string;
|
|
12
|
-
"padding-left"?: string;
|
|
13
|
-
"padding-right"?: string;
|
|
14
|
-
"padding-top"?: string;
|
|
3
|
+
border?: string | undefined;
|
|
4
|
+
"border-bottom"?: string | undefined;
|
|
5
|
+
"border-left"?: string | undefined;
|
|
6
|
+
"border-right"?: string | undefined;
|
|
7
|
+
"border-top"?: string | undefined;
|
|
8
|
+
"container-background-color"?: string | undefined;
|
|
9
|
+
height?: string | undefined;
|
|
10
|
+
padding?: string | undefined;
|
|
11
|
+
"padding-bottom"?: string | undefined;
|
|
12
|
+
"padding-left"?: string | undefined;
|
|
13
|
+
"padding-right"?: string | undefined;
|
|
14
|
+
"padding-top"?: string | undefined;
|
|
15
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MjmlNodeType } from "./MjmlNodeType.js";
|
|
2
2
|
import { MjmlTableProps } from "./MjmlTableProps.js";
|
|
3
3
|
import { BlockNode } from "vue-block-editor-headless";
|
|
4
|
-
export type MjmlTableNode = BlockNode<MjmlNodeType.Table, MjmlTableProps>;
|
|
4
|
+
export type MjmlTableNode = BlockNode<typeof MjmlNodeType.Table, MjmlTableProps>;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { BlockNodeProps } from "vue-block-editor-headless";
|
|
2
2
|
export interface MjmlTableProps extends BlockNodeProps {
|
|
3
|
-
align?: string;
|
|
4
|
-
border?: string;
|
|
5
|
-
cellpadding?: string;
|
|
6
|
-
cellspacing?: string;
|
|
7
|
-
color?: string;
|
|
8
|
-
"container-background-color"?: string;
|
|
3
|
+
align?: string | undefined;
|
|
4
|
+
border?: string | undefined;
|
|
5
|
+
cellpadding?: string | undefined;
|
|
6
|
+
cellspacing?: string | undefined;
|
|
7
|
+
color?: string | undefined;
|
|
8
|
+
"container-background-color"?: string | undefined;
|
|
9
9
|
content: string;
|
|
10
|
-
"font-family"?: string;
|
|
11
|
-
"font-size"?: string;
|
|
12
|
-
"font-weight"?: string;
|
|
13
|
-
"line-height"?: string;
|
|
14
|
-
padding?: string;
|
|
15
|
-
"padding-bottom"?: string;
|
|
16
|
-
"padding-left"?: string;
|
|
17
|
-
"padding-right"?: string;
|
|
18
|
-
"padding-top"?: string;
|
|
19
|
-
role?: string;
|
|
20
|
-
"table-layout"?: string;
|
|
21
|
-
"vertical-align"?: string;
|
|
22
|
-
width?: string;
|
|
10
|
+
"font-family"?: string | undefined;
|
|
11
|
+
"font-size"?: string | undefined;
|
|
12
|
+
"font-weight"?: string | undefined;
|
|
13
|
+
"line-height"?: string | undefined;
|
|
14
|
+
padding?: string | undefined;
|
|
15
|
+
"padding-bottom"?: string | undefined;
|
|
16
|
+
"padding-left"?: string | undefined;
|
|
17
|
+
"padding-right"?: string | undefined;
|
|
18
|
+
"padding-top"?: string | undefined;
|
|
19
|
+
role?: string | undefined;
|
|
20
|
+
"table-layout"?: string | undefined;
|
|
21
|
+
"vertical-align"?: string | undefined;
|
|
22
|
+
width?: string | undefined;
|
|
23
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MjmlNodeType } from "./MjmlNodeType.js";
|
|
2
2
|
import { MjmlTextProps } from "./MjmlTextProps.js";
|
|
3
3
|
import { BlockNode } from "vue-block-editor-headless";
|
|
4
|
-
export type MjmlTextNode = BlockNode<MjmlNodeType.Text, MjmlTextProps>;
|
|
4
|
+
export type MjmlTextNode = BlockNode<typeof MjmlNodeType.Text, MjmlTextProps>;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { MjmlRichText } from "./MjmlRichText.js";
|
|
2
2
|
import { BlockNodeProps } from "vue-block-editor-headless";
|
|
3
3
|
export interface MjmlTextProps extends BlockNodeProps {
|
|
4
|
-
align?: string;
|
|
5
|
-
"background-color"?: string;
|
|
6
|
-
color?: string;
|
|
7
|
-
"container-background-color"?: string;
|
|
4
|
+
align?: string | undefined;
|
|
5
|
+
"background-color"?: string | undefined;
|
|
6
|
+
color?: string | undefined;
|
|
7
|
+
"container-background-color"?: string | undefined;
|
|
8
8
|
content: MjmlRichText;
|
|
9
|
-
"font-family"?: string;
|
|
10
|
-
"font-size"?: string;
|
|
11
|
-
"font-style"?: string;
|
|
12
|
-
"font-weight"?: string;
|
|
13
|
-
height?: string;
|
|
14
|
-
"letter-spacing"?: string;
|
|
15
|
-
"line-height"?: string;
|
|
16
|
-
padding?: string;
|
|
17
|
-
"padding-bottom"?: string;
|
|
18
|
-
"padding-left"?: string;
|
|
19
|
-
"padding-right"?: string;
|
|
20
|
-
"padding-top"?: string;
|
|
21
|
-
"text-decoration"?: string;
|
|
22
|
-
"text-transform"?: string;
|
|
23
|
-
"vertical-align"?: string;
|
|
9
|
+
"font-family"?: string | undefined;
|
|
10
|
+
"font-size"?: string | undefined;
|
|
11
|
+
"font-style"?: string | undefined;
|
|
12
|
+
"font-weight"?: string | undefined;
|
|
13
|
+
height?: string | undefined;
|
|
14
|
+
"letter-spacing"?: string | undefined;
|
|
15
|
+
"line-height"?: string | undefined;
|
|
16
|
+
padding?: string | undefined;
|
|
17
|
+
"padding-bottom"?: string | undefined;
|
|
18
|
+
"padding-left"?: string | undefined;
|
|
19
|
+
"padding-right"?: string | undefined;
|
|
20
|
+
"padding-top"?: string | undefined;
|
|
21
|
+
"text-decoration"?: string | undefined;
|
|
22
|
+
"text-transform"?: string | undefined;
|
|
23
|
+
"vertical-align"?: string | undefined;
|
|
24
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MjmlNodeType } from "./MjmlNodeType.js";
|
|
2
2
|
import { MjmlWrapperProps } from "./MjmlWrapperProps.js";
|
|
3
3
|
import { BlockNode } from "vue-block-editor-headless";
|
|
4
|
-
export type MjmlWrapperNode = BlockNode<MjmlNodeType.Wrapper, MjmlWrapperProps>;
|
|
4
|
+
export type MjmlWrapperNode = BlockNode<typeof MjmlNodeType.Wrapper, MjmlWrapperProps>;
|
|
@@ -3,29 +3,29 @@ import { MjmlRawNode } from "./MjmlRawNode.js";
|
|
|
3
3
|
import { MjmlSectionNode } from "./MjmlSectionNode.js";
|
|
4
4
|
import { BlockNodeProps } from "vue-block-editor-headless";
|
|
5
5
|
export interface MjmlWrapperProps extends BlockNodeProps {
|
|
6
|
-
"background-color"?: string;
|
|
7
|
-
"background-position"?: string;
|
|
8
|
-
"background-position-x"?: string;
|
|
9
|
-
"background-position-y"?: string;
|
|
10
|
-
"background-repeat"?: string;
|
|
11
|
-
"background-size"?: string;
|
|
12
|
-
"background-url"?: string;
|
|
13
|
-
border?: string;
|
|
14
|
-
"border-bottom"?: string;
|
|
15
|
-
"border-left"?: string;
|
|
16
|
-
"border-radius"?: string;
|
|
17
|
-
"border-right"?: string;
|
|
18
|
-
"border-top"?: string;
|
|
6
|
+
"background-color"?: string | undefined;
|
|
7
|
+
"background-position"?: string | undefined;
|
|
8
|
+
"background-position-x"?: string | undefined;
|
|
9
|
+
"background-position-y"?: string | undefined;
|
|
10
|
+
"background-repeat"?: string | undefined;
|
|
11
|
+
"background-size"?: string | undefined;
|
|
12
|
+
"background-url"?: string | undefined;
|
|
13
|
+
border?: string | undefined;
|
|
14
|
+
"border-bottom"?: string | undefined;
|
|
15
|
+
"border-left"?: string | undefined;
|
|
16
|
+
"border-radius"?: string | undefined;
|
|
17
|
+
"border-right"?: string | undefined;
|
|
18
|
+
"border-top"?: string | undefined;
|
|
19
19
|
children: (MjmlHeroNode | MjmlRawNode | MjmlSectionNode)[];
|
|
20
|
-
direction?: string;
|
|
21
|
-
"full-width"?: string;
|
|
22
|
-
gap?: string;
|
|
23
|
-
gutter?: string;
|
|
24
|
-
padding?: string;
|
|
25
|
-
"padding-bottom"?: string;
|
|
26
|
-
"padding-left"?: string;
|
|
27
|
-
"padding-right"?: string;
|
|
28
|
-
"padding-top"?: string;
|
|
29
|
-
"text-align"?: string;
|
|
30
|
-
"text-padding"?: string;
|
|
20
|
+
direction?: string | undefined;
|
|
21
|
+
"full-width"?: string | undefined;
|
|
22
|
+
gap?: string | undefined;
|
|
23
|
+
gutter?: string | undefined;
|
|
24
|
+
padding?: string | undefined;
|
|
25
|
+
"padding-bottom"?: string | undefined;
|
|
26
|
+
"padding-left"?: string | undefined;
|
|
27
|
+
"padding-right"?: string | undefined;
|
|
28
|
+
"padding-top"?: string | undefined;
|
|
29
|
+
"text-align"?: string | undefined;
|
|
30
|
+
"text-padding"?: string | undefined;
|
|
31
31
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MjmlContentKind } from "../models/MjmlContentKind.js";
|
|
2
1
|
import { z } from "zod";
|
|
3
|
-
|
|
2
|
+
import { MjmlContentKind } from "../models/MjmlContentKind.js";
|
|
3
|
+
export declare const MjmlContentKindSchemaMap: Record<Exclude<MjmlContentKind, typeof MjmlContentKind.RichText>, z.ZodString>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../models/MjmlContentKind.js";
|
|
1
|
+
import { MjmlContentKind } from "../models/MjmlContentKind.js";
|
|
2
2
|
import { createMjmlRawContentSchema } from "./createMjmlRawContentSchema.js";
|
|
3
3
|
import { labelContentSchema } from "./labelContentSchema.js";
|
|
4
4
|
// src/services/MjmlContentKindSchemaMap.ts
|
|
5
5
|
const MjmlContentKindSchemaMap = {
|
|
6
|
-
[
|
|
7
|
-
[
|
|
6
|
+
[MjmlContentKind.Label]: labelContentSchema,
|
|
7
|
+
[MjmlContentKind.Raw]: createMjmlRawContentSchema()
|
|
8
8
|
};
|
|
9
9
|
export { MjmlContentKindSchemaMap };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MjmlAttributeSchema } from "../../models/MjmlAttributeSchema.js";
|
|
2
2
|
import { MjmlRichText } from "../../models/MjmlRichText.js";
|
|
3
3
|
import { MjmlRichTextDefinition } from "../../models/MjmlRichTextDefinition.js";
|
|
4
|
-
import { accordionTextAttributes } from "./mjAccordionText.js";
|
|
5
4
|
import { z } from "zod";
|
|
5
|
+
import { accordionTextAttributes } from "./mjAccordionText.js";
|
|
6
6
|
export declare const createMjmlAccordionTextPropsSchema: <TContent extends MjmlRichText>(richText: MjmlRichTextDefinition<TContent>) => z.ZodObject<{ [K in keyof typeof accordionTextAttributes]: MjmlAttributeSchema; } & {
|
|
7
7
|
content: z.ZodType<TContent>;
|
|
8
8
|
}, z.core.$strict>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../models/MjmlNodeType.js";
|
|
1
|
+
import { MjmlNodeType } from "../../models/MjmlNodeType.js";
|
|
2
2
|
import { createMjmlAccordionTextPropsSchema } from "./createMjmlAccordionTextPropsSchema.js";
|
|
3
3
|
import { createMjmlRichTextType } from "./createMjmlRichTextType.js";
|
|
4
4
|
import { accordionTextAttributes } from "./mjAccordionText.js";
|
|
@@ -12,6 +12,6 @@ const createMjmlAccordionTextType = (richText) => createMjmlRichTextType({
|
|
|
12
12
|
},
|
|
13
13
|
propsSchema: createMjmlAccordionTextPropsSchema(richText),
|
|
14
14
|
slots: {},
|
|
15
|
-
type:
|
|
15
|
+
type: MjmlNodeType.AccordionText
|
|
16
16
|
}, richText);
|
|
17
17
|
export { createMjmlAccordionTextType };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import "../../models/MjmlContentKind.js";
|
|
1
|
+
import { MjmlContentKind } from "../../models/MjmlContentKind.js";
|
|
2
2
|
import { renderMjmlNode } from "../renderMjmlNode.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
// src/services/components/createMjmlRichTextType.ts
|
|
5
5
|
const createMjmlRichTextType = ({ allowedAttributes, defaultAttributes, propsSchema, slots, type }, richText) => ({
|
|
6
6
|
allowedAttributes,
|
|
7
|
-
contentKind:
|
|
7
|
+
contentKind: MjmlContentKind.RichText,
|
|
8
8
|
defaultAttributes,
|
|
9
9
|
formSchema: z.strictObject({}),
|
|
10
10
|
hasAlternativeText: false,
|
|
11
11
|
propsSchema,
|
|
12
12
|
render: renderMjmlNode({
|
|
13
13
|
allowedAttributes,
|
|
14
|
-
contentKind:
|
|
14
|
+
contentKind: MjmlContentKind.RichText,
|
|
15
15
|
hasAlternativeText: false,
|
|
16
16
|
hasChildren: false,
|
|
17
17
|
tagName: type
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MjmlAttributeSchema } from "../../models/MjmlAttributeSchema.js";
|
|
2
2
|
import { MjmlRichText } from "../../models/MjmlRichText.js";
|
|
3
3
|
import { MjmlRichTextDefinition } from "../../models/MjmlRichTextDefinition.js";
|
|
4
|
-
import { textAttributes } from "./mjText.js";
|
|
5
4
|
import { z } from "zod";
|
|
5
|
+
import { textAttributes } from "./mjText.js";
|
|
6
6
|
export declare const createMjmlTextPropsSchema: <TContent extends MjmlRichText>(richText: MjmlRichTextDefinition<TContent>) => z.ZodObject<{ [K in keyof typeof textAttributes]: MjmlAttributeSchema; } & {
|
|
7
7
|
content: z.ZodType<TContent>;
|
|
8
8
|
}, z.core.$strict>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../models/MjmlNodeType.js";
|
|
1
|
+
import { MjmlNodeType } from "../../models/MjmlNodeType.js";
|
|
2
2
|
import { createMjmlRichTextType } from "./createMjmlRichTextType.js";
|
|
3
3
|
import { createMjmlTextPropsSchema } from "./createMjmlTextPropsSchema.js";
|
|
4
4
|
import { textAttributes } from "./mjText.js";
|
|
@@ -15,6 +15,6 @@ const createMjmlTextType = (richText) => createMjmlRichTextType({
|
|
|
15
15
|
},
|
|
16
16
|
propsSchema: createMjmlTextPropsSchema(richText),
|
|
17
17
|
slots: {},
|
|
18
|
-
type:
|
|
18
|
+
type: MjmlNodeType.Text
|
|
19
19
|
}, richText);
|
|
20
20
|
export { createMjmlTextType };
|
|
@@ -17,7 +17,7 @@ declare const accordionBaseAttributes: {
|
|
|
17
17
|
"icon-wrapped-url": string;
|
|
18
18
|
padding: string;
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
declare const accordionAttributes: typeof accordionBaseAttributes & typeof MJML_PADDING_ATTRIBUTES;
|
|
21
21
|
export declare const accordionPropsSchema: z.ZodObject<{ [K in keyof typeof accordionAttributes]: MjmlAttributeSchema; }, z.core.$strict>;
|
|
22
22
|
export declare const mjmlAccordionType: MjmlBlockTypeDefinition<MjmlAccordionNode>;
|
|
23
23
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "../../models/MjmlNodeType.js";
|
|
1
|
+
import { MjmlNodeType } from "../../models/MjmlNodeType.js";
|
|
2
2
|
import { MJML_PADDING_ATTRIBUTES } from "../constants.js";
|
|
3
3
|
import { createMjmlAttributeShape } from "../createMjmlAttributeShape.js";
|
|
4
4
|
import { renderMjmlNode } from "../renderMjmlNode.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
+
// src/services/components/mjAccordion.ts
|
|
6
7
|
const accordionAttributes = {
|
|
7
8
|
border: "string",
|
|
8
9
|
"container-background-color": "color",
|
|
@@ -38,15 +39,15 @@ const mjmlAccordionTypeFields = {
|
|
|
38
39
|
formSchema: z.strictObject({}),
|
|
39
40
|
hasAlternativeText: false,
|
|
40
41
|
propsSchema: accordionPropsSchema,
|
|
41
|
-
slots: { children: [
|
|
42
|
-
type:
|
|
42
|
+
slots: { children: [MjmlNodeType.AccordionElement, MjmlNodeType.Raw] },
|
|
43
|
+
type: MjmlNodeType.Accordion
|
|
43
44
|
};
|
|
44
45
|
const mjmlAccordionType = {
|
|
45
46
|
...mjmlAccordionTypeFields,
|
|
46
47
|
render: renderMjmlNode({
|
|
47
48
|
...mjmlAccordionTypeFields,
|
|
48
49
|
hasChildren: true,
|
|
49
|
-
tagName:
|
|
50
|
+
tagName: MjmlNodeType.Accordion
|
|
50
51
|
})
|
|
51
52
|
};
|
|
52
|
-
export {
|
|
53
|
+
export { accordionPropsSchema, mjmlAccordionType };
|
|
@@ -2,7 +2,7 @@ import { MjmlAccordionElementNode } from "../../models/MjmlAccordionElementNode.
|
|
|
2
2
|
import { MjmlAttributeSchema } from "../../models/MjmlAttributeSchema.js";
|
|
3
3
|
import { MjmlBlockTypeDefinition } from "../../models/MjmlBlockTypeDefinition.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
5
|
+
declare const accordionElementAttributes: {
|
|
6
6
|
"background-color": string;
|
|
7
7
|
border: string;
|
|
8
8
|
"font-family": string;
|
|
@@ -16,4 +16,5 @@ export declare const accordionElementAttributes: {
|
|
|
16
16
|
"icon-wrapped-url": string;
|
|
17
17
|
};
|
|
18
18
|
export declare const accordionElementPropsSchema: z.ZodObject<{ [K in keyof typeof accordionElementAttributes]: MjmlAttributeSchema; }, z.core.$strict>;
|
|
19
|
-
export declare const mjmlAccordionElementType: MjmlBlockTypeDefinition<MjmlAccordionElementNode>;
|
|
19
|
+
export declare const mjmlAccordionElementType: MjmlBlockTypeDefinition<MjmlAccordionElementNode>;
|
|
20
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../models/MjmlNodeType.js";
|
|
1
|
+
import { MjmlNodeType } from "../../models/MjmlNodeType.js";
|
|
2
2
|
import { createMjmlAttributeShape } from "../createMjmlAttributeShape.js";
|
|
3
3
|
import { renderMjmlNode } from "../renderMjmlNode.js";
|
|
4
4
|
import { z } from "zod";
|
|
@@ -25,18 +25,18 @@ const mjmlAccordionElementTypeFields = {
|
|
|
25
25
|
hasAlternativeText: false,
|
|
26
26
|
propsSchema: accordionElementPropsSchema,
|
|
27
27
|
slots: { children: [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
MjmlNodeType.AccordionTitle,
|
|
29
|
+
MjmlNodeType.AccordionText,
|
|
30
|
+
MjmlNodeType.Raw
|
|
31
31
|
] },
|
|
32
|
-
type:
|
|
32
|
+
type: MjmlNodeType.AccordionElement
|
|
33
33
|
};
|
|
34
34
|
const mjmlAccordionElementType = {
|
|
35
35
|
...mjmlAccordionElementTypeFields,
|
|
36
36
|
render: renderMjmlNode({
|
|
37
37
|
...mjmlAccordionElementTypeFields,
|
|
38
38
|
hasChildren: true,
|
|
39
|
-
tagName:
|
|
39
|
+
tagName: MjmlNodeType.AccordionElement
|
|
40
40
|
})
|
|
41
41
|
};
|
|
42
|
-
export {
|
|
42
|
+
export { accordionElementPropsSchema, mjmlAccordionElementType };
|
|
@@ -11,7 +11,7 @@ declare const accordionTitleBaseAttributes: {
|
|
|
11
11
|
"font-weight": string;
|
|
12
12
|
padding: string;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
declare const accordionTitleAttributes: typeof accordionTitleBaseAttributes & typeof MJML_PADDING_ATTRIBUTES;
|
|
15
15
|
export declare const accordionTitlePropsSchema: z.ZodObject<{ [K in keyof typeof accordionTitleAttributes]: MjmlAttributeSchema; } & {
|
|
16
16
|
content: z.ZodString;
|
|
17
17
|
}, z.core.$strict>;
|