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
package/README.md
CHANGED
|
@@ -80,19 +80,16 @@ const document = createMjmlDocumentSchema(registry, bodyChildrenSchema, Number.M
|
|
|
80
80
|
props: {
|
|
81
81
|
children: [
|
|
82
82
|
{
|
|
83
|
-
props: {
|
|
84
|
-
children: [{ props: { content: { text: "Hello" }, id: crypto.randomUUID() }, type: "mj-text" }],
|
|
85
|
-
id: crypto.randomUUID(),
|
|
86
|
-
},
|
|
83
|
+
props: { children: [{ props: { content: { text: "Hello" }, id: v7() }, type: "mj-text" }], id: v7() },
|
|
87
84
|
type: "mj-column",
|
|
88
85
|
},
|
|
89
86
|
],
|
|
90
|
-
id:
|
|
87
|
+
id: v7(),
|
|
91
88
|
},
|
|
92
89
|
type: "mj-section",
|
|
93
90
|
},
|
|
94
91
|
],
|
|
95
|
-
root: { props: {} },
|
|
92
|
+
root: { props: { lang: "", title: "" } },
|
|
96
93
|
});
|
|
97
94
|
const json = renderMjmlDocument(document, registry, { context: undefined, isStampingIds: false });
|
|
98
95
|
const { html } = await mjml2html(json, { validationLevel: "strict" });
|
|
@@ -106,7 +103,7 @@ const { html } = await mjml2html(json, { validationLevel: "strict" });
|
|
|
106
103
|
| `MjmlDocument` | a document whose head is the root's props, typed by the registry |
|
|
107
104
|
| `parseMjmlDocument` | MJML source read back into a document, refusing a tag, attribute or value the package does not take |
|
|
108
105
|
| `renderMjmlDocument` | a checked document rendered to MJML's JSON form |
|
|
109
|
-
| `serializeMjml` | MJML's JSON form written as MJML source
|
|
106
|
+
| `serializeMjml` | MJML's JSON form written as MJML source, which the email's MJML source export downloads |
|
|
110
107
|
|
|
111
108
|
## <a name="license">⚖️ License</a>
|
|
112
109
|
|
package/dist/index.d.ts
CHANGED
|
@@ -81,30 +81,30 @@ import { createMjmlRichTextPropsSchema } from "./services/components/createMjmlR
|
|
|
81
81
|
import { createMjmlRichTextType } from "./services/components/createMjmlRichTextType.js";
|
|
82
82
|
import { createMjmlTextPropsSchema } from "./services/components/createMjmlTextPropsSchema.js";
|
|
83
83
|
import { createMjmlTextType } from "./services/components/createMjmlTextType.js";
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
84
|
+
import { accordionPropsSchema, mjmlAccordionType } from "./services/components/mjAccordion.js";
|
|
85
|
+
import { accordionElementPropsSchema, mjmlAccordionElementType } from "./services/components/mjAccordionElement.js";
|
|
86
86
|
import { accordionTextAttributes } from "./services/components/mjAccordionText.js";
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import { createMjmlHeroType,
|
|
95
|
-
import {
|
|
96
|
-
import { mjmlNavbarType,
|
|
97
|
-
import { mjmlNavbarLinkType,
|
|
98
|
-
import { mjmlRawType,
|
|
87
|
+
import { accordionTitlePropsSchema, mjmlAccordionTitleType } from "./services/components/mjAccordionTitle.js";
|
|
88
|
+
import { buttonPropsSchema, mjmlButtonType } from "./services/components/mjButton.js";
|
|
89
|
+
import { carouselPropsSchema, mjmlCarouselType } from "./services/components/mjCarousel.js";
|
|
90
|
+
import { carouselImagePropsSchema, mjmlCarouselImageType } from "./services/components/mjCarouselImage.js";
|
|
91
|
+
import { columnPropsSchema, createMjmlColumnType } from "./services/components/mjColumn.js";
|
|
92
|
+
import { dividerPropsSchema, mjmlDividerType } from "./services/components/mjDivider.js";
|
|
93
|
+
import { groupPropsSchema, mjmlGroupType } from "./services/components/mjGroup.js";
|
|
94
|
+
import { createMjmlHeroType, heroPropsSchema } from "./services/components/mjHero.js";
|
|
95
|
+
import { imagePropsSchema, mjmlImageType } from "./services/components/mjImage.js";
|
|
96
|
+
import { mjmlNavbarType, navbarPropsSchema } from "./services/components/mjNavbar.js";
|
|
97
|
+
import { mjmlNavbarLinkType, navbarLinkPropsSchema } from "./services/components/mjNavbarLink.js";
|
|
98
|
+
import { mjmlRawType, rawPropsSchema } from "./services/components/mjRaw.js";
|
|
99
99
|
import { mjmlSectionType, sectionPropsSchema } from "./services/components/mjSection.js";
|
|
100
|
-
import { mjmlSocialType,
|
|
101
|
-
import { mjmlSocialElementType,
|
|
102
|
-
import { mjmlSpacerType,
|
|
103
|
-
import { mjmlTableType,
|
|
100
|
+
import { mjmlSocialType, socialPropsSchema } from "./services/components/mjSocial.js";
|
|
101
|
+
import { mjmlSocialElementType, socialElementPropsSchema } from "./services/components/mjSocialElement.js";
|
|
102
|
+
import { mjmlSpacerType, spacerPropsSchema } from "./services/components/mjSpacer.js";
|
|
103
|
+
import { mjmlTableType, tablePropsSchema } from "./services/components/mjTable.js";
|
|
104
104
|
import { textAttributes } from "./services/components/mjText.js";
|
|
105
|
-
import { mjmlWrapperType,
|
|
105
|
+
import { mjmlWrapperType, wrapperPropsSchema } from "./services/components/mjWrapper.js";
|
|
106
106
|
import { sectionAttributes } from "./services/components/sectionAttributes.js";
|
|
107
|
-
import { ALLOWED_URL_SCHEMES, ALL_ATTRIBUTES_KEY, DIRECTION_ATTRIBUTE_KEY,
|
|
107
|
+
import { ALLOWED_URL_SCHEMES, ALL_ATTRIBUTES_KEY, DIRECTION_ATTRIBUTE_KEY, MJML_BODY_ATTRIBUTES, MJML_BODY_CHILDREN, MJML_BREAKPOINT_ATTRIBUTES, MJML_COLOR_MATCHERS, MJML_CONTENT_MAX_LENGTH, MJML_DEFAULT_BODY_WIDTH, MJML_HEAD_SINGLE_TAGS, MJML_HEAD_TEXT_TAGS, MJML_NAME_MAX_LENGTH, MJML_PADDING_ATTRIBUTES, MJML_ROOT_LIST_MAX_LENGTH, MJML_VALUE_MAX_LENGTH, STRAY_ID_ATTRIBUTE_KEY, STRAY_TEXT_TYPE } from "./services/constants.js";
|
|
108
108
|
import { createMjmlAttributeSchema } from "./services/createMjmlAttributeSchema.js";
|
|
109
109
|
import { createMjmlAttributeShape } from "./services/createMjmlAttributeShape.js";
|
|
110
110
|
import { createMjmlDocumentSchema } from "./services/createMjmlDocumentSchema.js";
|
|
@@ -116,6 +116,7 @@ import { createMjmlSlotSchema } from "./services/createMjmlSlotSchema.js";
|
|
|
116
116
|
import { createTypeSchema } from "./services/createTypeSchema.js";
|
|
117
117
|
import { createUnitPattern } from "./services/createUnitPattern.js";
|
|
118
118
|
import { escapeMjmlAttributes } from "./services/escapeMjmlAttributes.js";
|
|
119
|
+
import { getFilledMjmlAttributes } from "./services/getFilledMjmlAttributes.js";
|
|
119
120
|
import { getMjmlAttributeFields } from "./services/getMjmlAttributeFields.js";
|
|
120
121
|
import { getMjmlAttributeSchema } from "./services/getMjmlAttributeSchema.js";
|
|
121
122
|
import { getMjmlRefusalKey } from "./services/getMjmlRefusalKey.js";
|
|
@@ -133,6 +134,7 @@ import { readMjmlHeadText } from "./services/readMjmlHeadText.js";
|
|
|
133
134
|
import { readMjmlNode } from "./services/readMjmlNode.js";
|
|
134
135
|
import { readMjmlNodes } from "./services/readMjmlNodes.js";
|
|
135
136
|
import { readMjmlRoot } from "./services/readMjmlRoot.js";
|
|
137
|
+
import { readMjmlRootProps } from "./services/readMjmlRootProps.js";
|
|
136
138
|
import { readMjmlStrayText } from "./services/readMjmlStrayText.js";
|
|
137
139
|
import { readMjmlTopLevel } from "./services/readMjmlTopLevel.js";
|
|
138
140
|
import { renderMjmlDocument } from "./services/renderMjmlDocument.js";
|
|
@@ -141,4 +143,4 @@ import { renderMjmlNode } from "./services/renderMjmlNode.js";
|
|
|
141
143
|
import { serializeAttributes } from "./services/serializeAttributes.js";
|
|
142
144
|
import { serializeMjml } from "./services/serializeMjml.js";
|
|
143
145
|
import { stampNode } from "./services/stampNode.js";
|
|
144
|
-
export { ALLOWED_URL_SCHEMES, ALL_ATTRIBUTES_KEY, CreateMjmlNodeSchemaOptions, CreateMjmlRegistryOptions, DIRECTION_ATTRIBUTE_KEY,
|
|
146
|
+
export { ALLOWED_URL_SCHEMES, ALL_ATTRIBUTES_KEY, CreateMjmlNodeSchemaOptions, CreateMjmlRegistryOptions, DIRECTION_ATTRIBUTE_KEY, MJML_BODY_ATTRIBUTES, MJML_BODY_CHILDREN, MJML_BREAKPOINT_ATTRIBUTES, MJML_COLOR_MATCHERS, MJML_CONTENT_MAX_LENGTH, MJML_DEFAULT_BODY_WIDTH, MJML_HEAD_SINGLE_TAGS, MJML_HEAD_TEXT_TAGS, MJML_NAME_MAX_LENGTH, MJML_PADDING_ATTRIBUTES, MJML_ROOT_LIST_MAX_LENGTH, MJML_VALUE_MAX_LENGTH, MjmlAccordionElementNode, MjmlAccordionElementProps, MjmlAccordionNode, MjmlAccordionProps, MjmlAccordionTextNode, MjmlAccordionTextProps, MjmlAccordionTitleNode, MjmlAccordionTitleProps, MjmlAttributeField, MjmlAttributeKind, MjmlAttributeSchema, MjmlAttributeType, MjmlBlockTypeDefinition, MjmlBuiltInNode, MjmlButtonNode, MjmlButtonProps, MjmlCarouselImageNode, MjmlCarouselImageProps, MjmlCarouselNode, MjmlCarouselProps, MjmlColumnNode, MjmlColumnProps, MjmlContentKind, MjmlContentKindSchemaMap, MjmlDirection, MjmlDividerNode, MjmlDividerProps, MjmlDocument, MjmlFlowNode, MjmlGroupNode, MjmlGroupProps, MjmlHeroNode, MjmlHeroProps, MjmlImageNode, MjmlImageProps, MjmlJson, MjmlLeafNode, MjmlLeafNodeSchema, MjmlLeafNodes, MjmlNavbarLinkNode, MjmlNavbarLinkProps, MjmlNavbarNode, MjmlNavbarProps, MjmlNode, MjmlNodeDefinition, MjmlNodeType, MjmlRawNode, MjmlRawProps, MjmlRegistry, MjmlRenderSpecification, MjmlRichText, MjmlRichTextAttributeValue, MjmlRichTextDefinition, MjmlRichTextTypeOptions, MjmlRootProps, MjmlSectionNode, MjmlSectionProps, MjmlSocialElementNode, MjmlSocialElementProps, MjmlSocialNode, MjmlSocialProps, MjmlSpacerNode, MjmlSpacerProps, MjmlTableNode, MjmlTableProps, MjmlTextNode, MjmlTextProps, MjmlWrapperNode, MjmlWrapperProps, RenderMjmlDocumentOptions, STRAY_ID_ATTRIBUTE_KEY, STRAY_TEXT_TYPE, accordionElementPropsSchema, accordionPropsSchema, accordionTextAttributes, accordionTitlePropsSchema, allowedAddressSchema, buttonPropsSchema, carouselImagePropsSchema, carouselPropsSchema, checkHasElement, checkIsMjmlAddressAttribute, checkIsRepeatedMjmlTag, checkMjmlAlternativeText, checkMjmlAttributeValues, columnPropsSchema, createMjmlAccordionTextPropsSchema, createMjmlAccordionTextType, createMjmlAttributeSchema, createMjmlAttributeShape, createMjmlColumnType, createMjmlDocumentSchema, createMjmlHeroType, createMjmlNodeBranch, createMjmlNodeSchema, createMjmlRawContentSchema, createMjmlRegistry, createMjmlRichTextPropsSchema, createMjmlRichTextType, createMjmlRootPropsSchema, createMjmlSlotSchema, createMjmlTextPropsSchema, createMjmlTextType, createTypeSchema, createUnitPattern, dividerPropsSchema, escapeMjmlAttributes, getFilledMjmlAttributes, getMjmlAttributeFields, getMjmlAttributeSchema, getMjmlRefusalKey, groupPropsSchema, heroPropsSchema, imagePropsSchema, labelContentSchema, mjmlAccordionElementType, mjmlAccordionTitleType, mjmlAccordionType, mjmlButtonType, mjmlCarouselImageType, mjmlCarouselType, mjmlDividerType, mjmlGroupType, mjmlImageType, mjmlNavbarLinkType, mjmlNavbarType, mjmlNodeChildren, mjmlRawType, mjmlRootPropsSchema, mjmlSectionType, mjmlSocialElementType, mjmlSocialType, mjmlSpacerType, mjmlTableType, mjmlWrapperType, navbarLinkPropsSchema, navbarPropsSchema, parseMjmlAttributeType, parseMjmlDocument, rawPropsSchema, readMjmlAttributeRefusal, readMjmlContent, readMjmlHead, readMjmlHeadText, readMjmlNode, readMjmlNodes, readMjmlRoot, readMjmlRootProps, readMjmlStrayText, readMjmlTopLevel, renderMjmlDocument, renderMjmlHead, renderMjmlNode, sectionAttributes, sectionPropsSchema, serializeAttributes, serializeMjml, socialElementPropsSchema, socialPropsSchema, spacerPropsSchema, stampNode, tablePropsSchema, textAttributes, wrapperPropsSchema };
|
package/dist/index.js
CHANGED
|
@@ -14,30 +14,30 @@ import { createMjmlRichTextPropsSchema } from "./services/components/createMjmlR
|
|
|
14
14
|
import { createMjmlRichTextType } from "./services/components/createMjmlRichTextType.js";
|
|
15
15
|
import { createMjmlTextPropsSchema } from "./services/components/createMjmlTextPropsSchema.js";
|
|
16
16
|
import { createMjmlTextType } from "./services/components/createMjmlTextType.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
17
|
+
import { accordionPropsSchema, mjmlAccordionType } from "./services/components/mjAccordion.js";
|
|
18
|
+
import { accordionElementPropsSchema, mjmlAccordionElementType } from "./services/components/mjAccordionElement.js";
|
|
19
19
|
import { accordionTextAttributes } from "./services/components/mjAccordionText.js";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { createMjmlHeroType,
|
|
28
|
-
import {
|
|
29
|
-
import { mjmlNavbarType,
|
|
30
|
-
import { mjmlNavbarLinkType,
|
|
31
|
-
import { mjmlRawType,
|
|
20
|
+
import { accordionTitlePropsSchema, mjmlAccordionTitleType } from "./services/components/mjAccordionTitle.js";
|
|
21
|
+
import { buttonPropsSchema, mjmlButtonType } from "./services/components/mjButton.js";
|
|
22
|
+
import { carouselPropsSchema, mjmlCarouselType } from "./services/components/mjCarousel.js";
|
|
23
|
+
import { carouselImagePropsSchema, mjmlCarouselImageType } from "./services/components/mjCarouselImage.js";
|
|
24
|
+
import { columnPropsSchema, createMjmlColumnType } from "./services/components/mjColumn.js";
|
|
25
|
+
import { dividerPropsSchema, mjmlDividerType } from "./services/components/mjDivider.js";
|
|
26
|
+
import { groupPropsSchema, mjmlGroupType } from "./services/components/mjGroup.js";
|
|
27
|
+
import { createMjmlHeroType, heroPropsSchema } from "./services/components/mjHero.js";
|
|
28
|
+
import { imagePropsSchema, mjmlImageType } from "./services/components/mjImage.js";
|
|
29
|
+
import { mjmlNavbarType, navbarPropsSchema } from "./services/components/mjNavbar.js";
|
|
30
|
+
import { mjmlNavbarLinkType, navbarLinkPropsSchema } from "./services/components/mjNavbarLink.js";
|
|
31
|
+
import { mjmlRawType, rawPropsSchema } from "./services/components/mjRaw.js";
|
|
32
32
|
import { mjmlSectionType, sectionPropsSchema } from "./services/components/mjSection.js";
|
|
33
|
-
import { mjmlSocialType,
|
|
34
|
-
import { mjmlSocialElementType,
|
|
35
|
-
import { mjmlSpacerType,
|
|
36
|
-
import { mjmlTableType,
|
|
33
|
+
import { mjmlSocialType, socialPropsSchema } from "./services/components/mjSocial.js";
|
|
34
|
+
import { mjmlSocialElementType, socialElementPropsSchema } from "./services/components/mjSocialElement.js";
|
|
35
|
+
import { mjmlSpacerType, spacerPropsSchema } from "./services/components/mjSpacer.js";
|
|
36
|
+
import { mjmlTableType, tablePropsSchema } from "./services/components/mjTable.js";
|
|
37
37
|
import { textAttributes } from "./services/components/mjText.js";
|
|
38
|
-
import { mjmlWrapperType,
|
|
38
|
+
import { mjmlWrapperType, wrapperPropsSchema } from "./services/components/mjWrapper.js";
|
|
39
39
|
import { sectionAttributes } from "./services/components/sectionAttributes.js";
|
|
40
|
-
import { ALLOWED_URL_SCHEMES, ALL_ATTRIBUTES_KEY, DIRECTION_ATTRIBUTE_KEY,
|
|
40
|
+
import { ALLOWED_URL_SCHEMES, ALL_ATTRIBUTES_KEY, DIRECTION_ATTRIBUTE_KEY, MJML_BODY_ATTRIBUTES, MJML_BODY_CHILDREN, MJML_BREAKPOINT_ATTRIBUTES, MJML_COLOR_MATCHERS, MJML_CONTENT_MAX_LENGTH, MJML_DEFAULT_BODY_WIDTH, MJML_HEAD_SINGLE_TAGS, MJML_HEAD_TEXT_TAGS, MJML_NAME_MAX_LENGTH, MJML_PADDING_ATTRIBUTES, MJML_ROOT_LIST_MAX_LENGTH, MJML_VALUE_MAX_LENGTH, STRAY_ID_ATTRIBUTE_KEY, STRAY_TEXT_TYPE } from "./services/constants.js";
|
|
41
41
|
import { createMjmlAttributeSchema } from "./services/createMjmlAttributeSchema.js";
|
|
42
42
|
import { createMjmlAttributeShape } from "./services/createMjmlAttributeShape.js";
|
|
43
43
|
import { createMjmlDocumentSchema } from "./services/createMjmlDocumentSchema.js";
|
|
@@ -49,6 +49,7 @@ import { createMjmlSlotSchema } from "./services/createMjmlSlotSchema.js";
|
|
|
49
49
|
import { createTypeSchema } from "./services/createTypeSchema.js";
|
|
50
50
|
import { createUnitPattern } from "./services/createUnitPattern.js";
|
|
51
51
|
import { escapeMjmlAttributes } from "./services/escapeMjmlAttributes.js";
|
|
52
|
+
import { getFilledMjmlAttributes } from "./services/getFilledMjmlAttributes.js";
|
|
52
53
|
import { getMjmlAttributeFields } from "./services/getMjmlAttributeFields.js";
|
|
53
54
|
import { getMjmlAttributeSchema } from "./services/getMjmlAttributeSchema.js";
|
|
54
55
|
import { getMjmlRefusalKey } from "./services/getMjmlRefusalKey.js";
|
|
@@ -66,6 +67,7 @@ import { readMjmlHeadText } from "./services/readMjmlHeadText.js";
|
|
|
66
67
|
import { readMjmlNode } from "./services/readMjmlNode.js";
|
|
67
68
|
import { readMjmlNodes } from "./services/readMjmlNodes.js";
|
|
68
69
|
import { readMjmlRoot } from "./services/readMjmlRoot.js";
|
|
70
|
+
import { readMjmlRootProps } from "./services/readMjmlRootProps.js";
|
|
69
71
|
import { readMjmlStrayText } from "./services/readMjmlStrayText.js";
|
|
70
72
|
import { readMjmlTopLevel } from "./services/readMjmlTopLevel.js";
|
|
71
73
|
import { renderMjmlDocument } from "./services/renderMjmlDocument.js";
|
|
@@ -74,4 +76,4 @@ import { renderMjmlNode } from "./services/renderMjmlNode.js";
|
|
|
74
76
|
import { serializeAttributes } from "./services/serializeAttributes.js";
|
|
75
77
|
import { serializeMjml } from "./services/serializeMjml.js";
|
|
76
78
|
import { stampNode } from "./services/stampNode.js";
|
|
77
|
-
export { ALLOWED_URL_SCHEMES, ALL_ATTRIBUTES_KEY, DIRECTION_ATTRIBUTE_KEY,
|
|
79
|
+
export { ALLOWED_URL_SCHEMES, ALL_ATTRIBUTES_KEY, DIRECTION_ATTRIBUTE_KEY, MJML_BODY_ATTRIBUTES, MJML_BODY_CHILDREN, MJML_BREAKPOINT_ATTRIBUTES, MJML_COLOR_MATCHERS, MJML_CONTENT_MAX_LENGTH, MJML_DEFAULT_BODY_WIDTH, MJML_HEAD_SINGLE_TAGS, MJML_HEAD_TEXT_TAGS, MJML_NAME_MAX_LENGTH, MJML_PADDING_ATTRIBUTES, MJML_ROOT_LIST_MAX_LENGTH, MJML_VALUE_MAX_LENGTH, MjmlAttributeKind, MjmlContentKind, MjmlContentKindSchemaMap, MjmlDirection, MjmlNodeType, STRAY_ID_ATTRIBUTE_KEY, STRAY_TEXT_TYPE, accordionElementPropsSchema, accordionPropsSchema, accordionTextAttributes, accordionTitlePropsSchema, allowedAddressSchema, buttonPropsSchema, carouselImagePropsSchema, carouselPropsSchema, checkHasElement, checkIsMjmlAddressAttribute, checkIsRepeatedMjmlTag, checkMjmlAlternativeText, checkMjmlAttributeValues, columnPropsSchema, createMjmlAccordionTextPropsSchema, createMjmlAccordionTextType, createMjmlAttributeSchema, createMjmlAttributeShape, createMjmlColumnType, createMjmlDocumentSchema, createMjmlHeroType, createMjmlNodeBranch, createMjmlNodeSchema, createMjmlRawContentSchema, createMjmlRegistry, createMjmlRichTextPropsSchema, createMjmlRichTextType, createMjmlRootPropsSchema, createMjmlSlotSchema, createMjmlTextPropsSchema, createMjmlTextType, createTypeSchema, createUnitPattern, dividerPropsSchema, escapeMjmlAttributes, getFilledMjmlAttributes, getMjmlAttributeFields, getMjmlAttributeSchema, getMjmlRefusalKey, groupPropsSchema, heroPropsSchema, imagePropsSchema, labelContentSchema, mjmlAccordionElementType, mjmlAccordionTitleType, mjmlAccordionType, mjmlButtonType, mjmlCarouselImageType, mjmlCarouselType, mjmlDividerType, mjmlGroupType, mjmlImageType, mjmlNavbarLinkType, mjmlNavbarType, mjmlNodeChildren, mjmlRawType, mjmlRootPropsSchema, mjmlSectionType, mjmlSocialElementType, mjmlSocialType, mjmlSpacerType, mjmlTableType, mjmlWrapperType, navbarLinkPropsSchema, navbarPropsSchema, parseMjmlAttributeType, parseMjmlDocument, rawPropsSchema, readMjmlAttributeRefusal, readMjmlContent, readMjmlHead, readMjmlHeadText, readMjmlNode, readMjmlNodes, readMjmlRoot, readMjmlRootProps, readMjmlStrayText, readMjmlTopLevel, renderMjmlDocument, renderMjmlHead, renderMjmlNode, sectionAttributes, sectionPropsSchema, serializeAttributes, serializeMjml, socialElementPropsSchema, socialPropsSchema, spacerPropsSchema, stampNode, tablePropsSchema, textAttributes, wrapperPropsSchema };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MjmlAccordionElementProps } from "./MjmlAccordionElementProps.js";
|
|
2
2
|
import { MjmlNodeType } from "./MjmlNodeType.js";
|
|
3
3
|
import { BlockNode } from "vue-block-editor-headless";
|
|
4
|
-
export type MjmlAccordionElementNode = BlockNode<MjmlNodeType.AccordionElement, MjmlAccordionElementProps>;
|
|
4
|
+
export type MjmlAccordionElementNode = BlockNode<typeof MjmlNodeType.AccordionElement, MjmlAccordionElementProps>;
|
|
@@ -3,16 +3,16 @@ import { MjmlAccordionTitleNode } from "./MjmlAccordionTitleNode.js";
|
|
|
3
3
|
import { MjmlRawNode } from "./MjmlRawNode.js";
|
|
4
4
|
import { BlockNodeProps } from "vue-block-editor-headless";
|
|
5
5
|
export interface MjmlAccordionElementProps extends BlockNodeProps {
|
|
6
|
-
"background-color"?: string;
|
|
7
|
-
border?: string;
|
|
6
|
+
"background-color"?: string | undefined;
|
|
7
|
+
border?: string | undefined;
|
|
8
8
|
children: (MjmlAccordionTextNode | MjmlAccordionTitleNode | MjmlRawNode)[];
|
|
9
|
-
"font-family"?: string;
|
|
10
|
-
"icon-align"?: string;
|
|
11
|
-
"icon-height"?: string;
|
|
12
|
-
"icon-position"?: string;
|
|
13
|
-
"icon-unwrapped-alt"?: string;
|
|
14
|
-
"icon-unwrapped-url"?: string;
|
|
15
|
-
"icon-width"?: string;
|
|
16
|
-
"icon-wrapped-alt"?: string;
|
|
17
|
-
"icon-wrapped-url"?: string;
|
|
9
|
+
"font-family"?: string | undefined;
|
|
10
|
+
"icon-align"?: string | undefined;
|
|
11
|
+
"icon-height"?: string | undefined;
|
|
12
|
+
"icon-position"?: string | undefined;
|
|
13
|
+
"icon-unwrapped-alt"?: string | undefined;
|
|
14
|
+
"icon-unwrapped-url"?: string | undefined;
|
|
15
|
+
"icon-width"?: string | undefined;
|
|
16
|
+
"icon-wrapped-alt"?: string | undefined;
|
|
17
|
+
"icon-wrapped-url"?: string | undefined;
|
|
18
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MjmlAccordionProps } from "./MjmlAccordionProps.js";
|
|
2
2
|
import { MjmlNodeType } from "./MjmlNodeType.js";
|
|
3
3
|
import { BlockNode } from "vue-block-editor-headless";
|
|
4
|
-
export type MjmlAccordionNode = BlockNode<MjmlNodeType.Accordion, MjmlAccordionProps>;
|
|
4
|
+
export type MjmlAccordionNode = BlockNode<typeof MjmlNodeType.Accordion, MjmlAccordionProps>;
|
|
@@ -2,21 +2,21 @@ import { MjmlAccordionElementNode } from "./MjmlAccordionElementNode.js";
|
|
|
2
2
|
import { MjmlRawNode } from "./MjmlRawNode.js";
|
|
3
3
|
import { BlockNodeProps } from "vue-block-editor-headless";
|
|
4
4
|
export interface MjmlAccordionProps extends BlockNodeProps {
|
|
5
|
-
border?: string;
|
|
5
|
+
border?: string | undefined;
|
|
6
6
|
children: (MjmlAccordionElementNode | MjmlRawNode)[];
|
|
7
|
-
"container-background-color"?: string;
|
|
8
|
-
"font-family"?: string;
|
|
9
|
-
"icon-align"?: string;
|
|
10
|
-
"icon-height"?: string;
|
|
11
|
-
"icon-position"?: string;
|
|
12
|
-
"icon-unwrapped-alt"?: string;
|
|
13
|
-
"icon-unwrapped-url"?: string;
|
|
14
|
-
"icon-width"?: string;
|
|
15
|
-
"icon-wrapped-alt"?: string;
|
|
16
|
-
"icon-wrapped-url"?: string;
|
|
17
|
-
padding?: string;
|
|
18
|
-
"padding-bottom"?: string;
|
|
19
|
-
"padding-left"?: string;
|
|
20
|
-
"padding-right"?: string;
|
|
21
|
-
"padding-top"?: string;
|
|
7
|
+
"container-background-color"?: string | undefined;
|
|
8
|
+
"font-family"?: string | undefined;
|
|
9
|
+
"icon-align"?: string | undefined;
|
|
10
|
+
"icon-height"?: string | undefined;
|
|
11
|
+
"icon-position"?: string | undefined;
|
|
12
|
+
"icon-unwrapped-alt"?: string | undefined;
|
|
13
|
+
"icon-unwrapped-url"?: string | undefined;
|
|
14
|
+
"icon-width"?: string | undefined;
|
|
15
|
+
"icon-wrapped-alt"?: string | undefined;
|
|
16
|
+
"icon-wrapped-url"?: string | undefined;
|
|
17
|
+
padding?: string | undefined;
|
|
18
|
+
"padding-bottom"?: string | undefined;
|
|
19
|
+
"padding-left"?: string | undefined;
|
|
20
|
+
"padding-right"?: string | undefined;
|
|
21
|
+
"padding-top"?: string | undefined;
|
|
22
22
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MjmlAccordionTextProps } from "./MjmlAccordionTextProps.js";
|
|
2
2
|
import { MjmlNodeType } from "./MjmlNodeType.js";
|
|
3
3
|
import { BlockNode } from "vue-block-editor-headless";
|
|
4
|
-
export type MjmlAccordionTextNode = BlockNode<MjmlNodeType.AccordionText, MjmlAccordionTextProps>;
|
|
4
|
+
export type MjmlAccordionTextNode = BlockNode<typeof MjmlNodeType.AccordionText, MjmlAccordionTextProps>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { MjmlRichText } from "./MjmlRichText.js";
|
|
2
2
|
import { BlockNodeProps } from "vue-block-editor-headless";
|
|
3
3
|
export interface MjmlAccordionTextProps extends BlockNodeProps {
|
|
4
|
-
"background-color"?: string;
|
|
5
|
-
color?: string;
|
|
4
|
+
"background-color"?: string | undefined;
|
|
5
|
+
color?: string | undefined;
|
|
6
6
|
content: MjmlRichText;
|
|
7
|
-
"font-family"?: string;
|
|
8
|
-
"font-size"?: string;
|
|
9
|
-
"font-weight"?: string;
|
|
10
|
-
"letter-spacing"?: string;
|
|
11
|
-
"line-height"?: string;
|
|
12
|
-
padding?: string;
|
|
13
|
-
"padding-bottom"?: string;
|
|
14
|
-
"padding-left"?: string;
|
|
15
|
-
"padding-right"?: string;
|
|
16
|
-
"padding-top"?: string;
|
|
7
|
+
"font-family"?: string | undefined;
|
|
8
|
+
"font-size"?: string | undefined;
|
|
9
|
+
"font-weight"?: string | undefined;
|
|
10
|
+
"letter-spacing"?: string | undefined;
|
|
11
|
+
"line-height"?: string | undefined;
|
|
12
|
+
padding?: string | undefined;
|
|
13
|
+
"padding-bottom"?: string | undefined;
|
|
14
|
+
"padding-left"?: string | undefined;
|
|
15
|
+
"padding-right"?: string | undefined;
|
|
16
|
+
"padding-top"?: string | undefined;
|
|
17
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MjmlAccordionTitleProps } from "./MjmlAccordionTitleProps.js";
|
|
2
2
|
import { MjmlNodeType } from "./MjmlNodeType.js";
|
|
3
3
|
import { BlockNode } from "vue-block-editor-headless";
|
|
4
|
-
export type MjmlAccordionTitleNode = BlockNode<MjmlNodeType.AccordionTitle, MjmlAccordionTitleProps>;
|
|
4
|
+
export type MjmlAccordionTitleNode = BlockNode<typeof MjmlNodeType.AccordionTitle, MjmlAccordionTitleProps>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { BlockNodeProps } from "vue-block-editor-headless";
|
|
2
2
|
export interface MjmlAccordionTitleProps extends BlockNodeProps {
|
|
3
|
-
"background-color"?: string;
|
|
4
|
-
color?: string;
|
|
3
|
+
"background-color"?: string | undefined;
|
|
4
|
+
color?: string | undefined;
|
|
5
5
|
content: string;
|
|
6
|
-
"font-family"?: string;
|
|
7
|
-
"font-size"?: string;
|
|
8
|
-
"font-weight"?: string;
|
|
9
|
-
padding?: string;
|
|
10
|
-
"padding-bottom"?: string;
|
|
11
|
-
"padding-left"?: string;
|
|
12
|
-
"padding-right"?: string;
|
|
13
|
-
"padding-top"?: string;
|
|
6
|
+
"font-family"?: string | undefined;
|
|
7
|
+
"font-size"?: string | undefined;
|
|
8
|
+
"font-weight"?: string | undefined;
|
|
9
|
+
padding?: string | undefined;
|
|
10
|
+
"padding-bottom"?: string | undefined;
|
|
11
|
+
"padding-left"?: string | undefined;
|
|
12
|
+
"padding-right"?: string | undefined;
|
|
13
|
+
"padding-top"?: string | undefined;
|
|
14
14
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
Boolean
|
|
3
|
-
Color
|
|
4
|
-
Enum
|
|
5
|
-
Integer
|
|
6
|
-
String
|
|
7
|
-
Unit
|
|
8
|
-
}
|
|
1
|
+
export declare const MjmlAttributeKind: {
|
|
2
|
+
readonly Boolean: "boolean";
|
|
3
|
+
readonly Color: "color";
|
|
4
|
+
readonly Enum: "enum";
|
|
5
|
+
readonly Integer: "integer";
|
|
6
|
+
readonly String: "string";
|
|
7
|
+
readonly Unit: "unit";
|
|
8
|
+
};
|
|
9
|
+
export type MjmlAttributeKind = (typeof MjmlAttributeKind)[keyof typeof MjmlAttributeKind];
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
// src/models/MjmlAttributeKind.ts
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}({});
|
|
2
|
+
const MjmlAttributeKind = {
|
|
3
|
+
Boolean: "boolean",
|
|
4
|
+
Color: "color",
|
|
5
|
+
Enum: "enum",
|
|
6
|
+
Integer: "integer",
|
|
7
|
+
String: "string",
|
|
8
|
+
Unit: "unit"
|
|
9
|
+
};
|
|
11
10
|
export { MjmlAttributeKind };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { MjmlAttributeKind } from "./MjmlAttributeKind.js";
|
|
2
2
|
export type MjmlAttributeType = {
|
|
3
3
|
isNegativeAllowed: boolean;
|
|
4
|
-
kind: MjmlAttributeKind.Unit;
|
|
4
|
+
kind: typeof MjmlAttributeKind.Unit;
|
|
5
5
|
maxCount: number;
|
|
6
6
|
minCount: number;
|
|
7
7
|
units: string[];
|
|
8
8
|
} | {
|
|
9
|
-
kind: MjmlAttributeKind.Boolean;
|
|
9
|
+
kind: typeof MjmlAttributeKind.Boolean;
|
|
10
10
|
} | {
|
|
11
|
-
kind: MjmlAttributeKind.Color;
|
|
11
|
+
kind: typeof MjmlAttributeKind.Color;
|
|
12
12
|
} | {
|
|
13
|
-
kind: MjmlAttributeKind.Enum;
|
|
13
|
+
kind: typeof MjmlAttributeKind.Enum;
|
|
14
14
|
options: string[];
|
|
15
15
|
} | {
|
|
16
|
-
kind: MjmlAttributeKind.Integer;
|
|
16
|
+
kind: typeof MjmlAttributeKind.Integer;
|
|
17
17
|
} | {
|
|
18
|
-
kind: MjmlAttributeKind.String;
|
|
18
|
+
kind: typeof MjmlAttributeKind.String;
|
|
19
19
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MjmlContentKind } from "./MjmlContentKind.js";
|
|
2
2
|
import { MjmlJson } from "./MjmlJson.js";
|
|
3
|
-
import { z } from "zod";
|
|
4
3
|
import { BlockNode, BlockTypeDefinition, OwnProps } from "vue-block-editor-headless";
|
|
4
|
+
import { z } from "zod";
|
|
5
5
|
export type MjmlBlockTypeDefinition<TNode extends BlockNode = BlockNode, TContext = unknown> = MjmlBlockTypeFields<TNode, TContext> & MjmlContentDefinition<TNode>;
|
|
6
6
|
type MjmlBlockTypeFields<TNode extends BlockNode, TContext> = Pick<BlockTypeDefinition<TNode>, "slots" | "type"> & {
|
|
7
7
|
allowedAttributes: Record<string, string>;
|
|
@@ -11,10 +11,10 @@ type MjmlBlockTypeFields<TNode extends BlockNode, TContext> = Pick<BlockTypeDefi
|
|
|
11
11
|
render: (node: BlockNode, slots: Record<string, MjmlJson[]>, context: TContext) => MjmlJson;
|
|
12
12
|
};
|
|
13
13
|
type MjmlContentDefinition<TNode extends BlockNode> = {
|
|
14
|
-
contentKind: MjmlContentKind.Label | MjmlContentKind.Raw;
|
|
14
|
+
contentKind: typeof MjmlContentKind.Label | typeof MjmlContentKind.Raw;
|
|
15
15
|
propsSchema: z.ZodType<MjmlStringContentProps<TNode>>;
|
|
16
16
|
} | {
|
|
17
|
-
contentKind: MjmlContentKind.RichText;
|
|
17
|
+
contentKind: typeof MjmlContentKind.RichText;
|
|
18
18
|
propsSchema: z.ZodType<OwnProps<TNode["props"]>>;
|
|
19
19
|
} | {
|
|
20
20
|
contentKind?: undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MjmlButtonProps } from "./MjmlButtonProps.js";
|
|
2
2
|
import { MjmlNodeType } from "./MjmlNodeType.js";
|
|
3
3
|
import { BlockNode } from "vue-block-editor-headless";
|
|
4
|
-
export type MjmlButtonNode = BlockNode<MjmlNodeType.Button, MjmlButtonProps>;
|
|
4
|
+
export type MjmlButtonNode = BlockNode<typeof MjmlNodeType.Button, MjmlButtonProps>;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { BlockNodeProps } from "vue-block-editor-headless";
|
|
2
2
|
export interface MjmlButtonProps extends BlockNodeProps {
|
|
3
|
-
align?: string;
|
|
4
|
-
"background-color"?: string;
|
|
5
|
-
border?: string;
|
|
6
|
-
"border-bottom"?: string;
|
|
7
|
-
"border-left"?: string;
|
|
8
|
-
"border-radius"?: string;
|
|
9
|
-
"border-right"?: string;
|
|
10
|
-
"border-top"?: string;
|
|
11
|
-
color?: string;
|
|
12
|
-
"container-background-color"?: string;
|
|
3
|
+
align?: string | undefined;
|
|
4
|
+
"background-color"?: string | undefined;
|
|
5
|
+
border?: string | undefined;
|
|
6
|
+
"border-bottom"?: string | undefined;
|
|
7
|
+
"border-left"?: string | undefined;
|
|
8
|
+
"border-radius"?: string | undefined;
|
|
9
|
+
"border-right"?: string | undefined;
|
|
10
|
+
"border-top"?: string | undefined;
|
|
11
|
+
color?: string | undefined;
|
|
12
|
+
"container-background-color"?: string | undefined;
|
|
13
13
|
content: string;
|
|
14
|
-
"font-family"?: string;
|
|
15
|
-
"font-size"?: string;
|
|
16
|
-
"font-style"?: string;
|
|
17
|
-
"font-weight"?: string;
|
|
18
|
-
height?: string;
|
|
19
|
-
href?: string;
|
|
20
|
-
"inner-padding"?: string;
|
|
21
|
-
"letter-spacing"?: string;
|
|
22
|
-
"line-height"?: string;
|
|
23
|
-
name?: string;
|
|
24
|
-
padding?: string;
|
|
25
|
-
"padding-bottom"?: string;
|
|
26
|
-
"padding-left"?: string;
|
|
27
|
-
"padding-right"?: string;
|
|
28
|
-
"padding-top"?: string;
|
|
29
|
-
rel?: string;
|
|
30
|
-
target?: string;
|
|
31
|
-
"text-align"?: string;
|
|
32
|
-
"text-decoration"?: string;
|
|
33
|
-
"text-transform"?: string;
|
|
34
|
-
title?: string;
|
|
35
|
-
"vertical-align"?: string;
|
|
36
|
-
width?: string;
|
|
14
|
+
"font-family"?: string | undefined;
|
|
15
|
+
"font-size"?: string | undefined;
|
|
16
|
+
"font-style"?: string | undefined;
|
|
17
|
+
"font-weight"?: string | undefined;
|
|
18
|
+
height?: string | undefined;
|
|
19
|
+
href?: string | undefined;
|
|
20
|
+
"inner-padding"?: string | undefined;
|
|
21
|
+
"letter-spacing"?: string | undefined;
|
|
22
|
+
"line-height"?: string | undefined;
|
|
23
|
+
name?: 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
|
+
rel?: string | undefined;
|
|
30
|
+
target?: string | undefined;
|
|
31
|
+
"text-align"?: string | undefined;
|
|
32
|
+
"text-decoration"?: string | undefined;
|
|
33
|
+
"text-transform"?: string | undefined;
|
|
34
|
+
title?: string | undefined;
|
|
35
|
+
"vertical-align"?: string | undefined;
|
|
36
|
+
width?: string | undefined;
|
|
37
37
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MjmlCarouselImageProps } from "./MjmlCarouselImageProps.js";
|
|
2
2
|
import { MjmlNodeType } from "./MjmlNodeType.js";
|
|
3
3
|
import { BlockNode } from "vue-block-editor-headless";
|
|
4
|
-
export type MjmlCarouselImageNode = BlockNode<MjmlNodeType.CarouselImage, MjmlCarouselImageProps>;
|
|
4
|
+
export type MjmlCarouselImageNode = BlockNode<typeof MjmlNodeType.CarouselImage, MjmlCarouselImageProps>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { BlockNodeProps } from "vue-block-editor-headless";
|
|
2
2
|
export interface MjmlCarouselImageProps extends BlockNodeProps {
|
|
3
|
-
alt?: string;
|
|
4
|
-
"border-radius"?: string;
|
|
5
|
-
decorative?: boolean;
|
|
6
|
-
href?: string;
|
|
7
|
-
rel?: string;
|
|
8
|
-
src?: string;
|
|
9
|
-
target?: string;
|
|
10
|
-
"tb-border"?: string;
|
|
11
|
-
"tb-border-radius"?: string;
|
|
12
|
-
"thumbnails-src"?: string;
|
|
13
|
-
title?: string;
|
|
3
|
+
alt?: string | undefined;
|
|
4
|
+
"border-radius"?: string | undefined;
|
|
5
|
+
decorative?: boolean | undefined;
|
|
6
|
+
href?: string | undefined;
|
|
7
|
+
rel?: string | undefined;
|
|
8
|
+
src?: string | undefined;
|
|
9
|
+
target?: string | undefined;
|
|
10
|
+
"tb-border"?: string | undefined;
|
|
11
|
+
"tb-border-radius"?: string | undefined;
|
|
12
|
+
"thumbnails-src"?: string | undefined;
|
|
13
|
+
title?: string | undefined;
|
|
14
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MjmlCarouselProps } from "./MjmlCarouselProps.js";
|
|
2
2
|
import { MjmlNodeType } from "./MjmlNodeType.js";
|
|
3
3
|
import { BlockNode } from "vue-block-editor-headless";
|
|
4
|
-
export type MjmlCarouselNode = BlockNode<MjmlNodeType.Carousel, MjmlCarouselProps>;
|
|
4
|
+
export type MjmlCarouselNode = BlockNode<typeof MjmlNodeType.Carousel, MjmlCarouselProps>;
|