@mjmx/core 1.1.0 → 1.2.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.
@@ -41,4 +41,4 @@ export {
41
41
  jsx,
42
42
  jsxs
43
43
  };
44
- //# sourceMappingURL=chunk-TQQJ4UR4.js.map
44
+ //# sourceMappingURL=chunk-JZZH5EZ3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ast.ts","../src/jsx-runtime.ts"],"sourcesContent":["export const MJML_NODE_TYPE = Symbol.for('mjmx.node');\n\nexport const Fragment = Symbol.for('mjmx.fragment');\n\nexport interface MjmlNode {\n readonly $$typeof: typeof MJML_NODE_TYPE;\n readonly tag: string | typeof Fragment;\n readonly attributes: Record<string, string | undefined>;\n readonly children: MjmlChild[];\n}\n\nexport type MjmlChild =\n | MjmlNode\n | string\n | number\n | boolean\n | null\n | undefined\n | MjmlChild[];\n\nexport function isMjmlNode(value: unknown): value is MjmlNode {\n return (\n typeof value === 'object' &&\n value !== null &&\n '$$typeof' in value &&\n value.$$typeof === MJML_NODE_TYPE\n );\n}\n\nexport function createNode(\n tag: string | typeof Fragment,\n attributes: Record<string, unknown>,\n children: MjmlChild[]\n): MjmlNode {\n const stringAttributes: Record<string, string | undefined> = {};\n\n for (const [key, value] of Object.entries(attributes)) {\n if (value === undefined || value === null) {\n continue;\n }\n if (value instanceof URL) {\n stringAttributes[key] = value.toString();\n } else {\n stringAttributes[key] = String(value);\n }\n }\n\n return {\n $$typeof: MJML_NODE_TYPE,\n tag,\n attributes: stringAttributes,\n children,\n };\n}\n","import { createNode, Fragment, type MjmlChild, type MjmlNode } from './ast';\nimport type {\n HtmlAnchorAttributes,\n HtmlGlobalAttributes,\n HtmlImgAttributes,\n HtmlListAttributes,\n HtmlMetaAttributes,\n HtmlTableCellAttributes,\n} from './html-types';\nimport type {\n MjAccordionAttributes,\n MjAccordionElementAttributes,\n MjAccordionTextAttributes,\n MjAccordionTitleAttributes,\n MjAllAttributes,\n MjAttributesAttributes,\n MjBodyAttributes,\n MjBreakpointAttributes,\n MjButtonAttributes,\n MjCarouselAttributes,\n MjCarouselImageAttributes,\n MjClassAttributes,\n MjColumnAttributes,\n MjDividerAttributes,\n MjFontAttributes,\n MjGroupAttributes,\n MjHeadAttributes,\n MjHeroAttributes,\n MjHtmlAttributeAttributes,\n MjHtmlAttributesAttributes,\n MjImageAttributes,\n MjIncludeAttributes,\n MjmlAttributes,\n MjNavbarAttributes,\n MjNavbarLinkAttributes,\n MjPreviewAttributes,\n MjRawAttributes,\n MjSectionAttributes,\n MjSelectorAttributes,\n MjSocialAttributes,\n MjSocialElementAttributes,\n MjSpacerAttributes,\n MjStyleAttributes,\n MjTableAttributes,\n MjTextAttributes,\n MjTitleAttributes,\n MjWrapperAttributes,\n} from './types';\n\nexport { Fragment };\n\nexport type PropsWithChildren<T = object> = T & { children?: MjmlChild };\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Component = (props: any) => MjmlNode;\n\nexport function jsx(\n tag: string | typeof Fragment | Component,\n props: Record<string, unknown>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _key?: string\n): MjmlNode {\n if (typeof tag === 'function') {\n return tag(props);\n }\n\n const { children, ...attributes } = props;\n\n const childArray: MjmlChild[] =\n children === undefined\n ? []\n : Array.isArray(children)\n ? children\n : [children as MjmlChild];\n\n return createNode(tag, attributes, childArray);\n}\n\nexport const jsxs = jsx;\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace JSX {\n export type Element = MjmlNode;\n export type ElementType = string | typeof Fragment | Component;\n\n export interface ElementChildrenAttribute {\n children: MjmlChild;\n }\n\n export interface IntrinsicElements {\n mjml: PropsWithChildren<MjmlAttributes>;\n 'mj-head': PropsWithChildren<MjHeadAttributes>;\n 'mj-body': PropsWithChildren<MjBodyAttributes>;\n 'mj-attributes': PropsWithChildren<MjAttributesAttributes>;\n 'mj-breakpoint': MjBreakpointAttributes;\n 'mj-font': MjFontAttributes;\n 'mj-html-attributes': PropsWithChildren<MjHtmlAttributesAttributes>;\n 'mj-preview': PropsWithChildren<MjPreviewAttributes>;\n 'mj-style': PropsWithChildren<MjStyleAttributes>;\n 'mj-title': PropsWithChildren<MjTitleAttributes>;\n 'mj-all': MjAllAttributes;\n 'mj-class': MjClassAttributes;\n 'mj-section': PropsWithChildren<MjSectionAttributes>;\n 'mj-column': PropsWithChildren<MjColumnAttributes>;\n 'mj-group': PropsWithChildren<MjGroupAttributes>;\n 'mj-wrapper': PropsWithChildren<MjWrapperAttributes>;\n 'mj-text': PropsWithChildren<MjTextAttributes>;\n 'mj-button': PropsWithChildren<MjButtonAttributes>;\n 'mj-image': MjImageAttributes;\n 'mj-divider': MjDividerAttributes;\n 'mj-spacer': MjSpacerAttributes;\n 'mj-table': PropsWithChildren<MjTableAttributes>;\n 'mj-raw': PropsWithChildren<MjRawAttributes>;\n 'mj-hero': PropsWithChildren<MjHeroAttributes>;\n 'mj-accordion': PropsWithChildren<MjAccordionAttributes>;\n 'mj-accordion-element': PropsWithChildren<MjAccordionElementAttributes>;\n 'mj-accordion-title': PropsWithChildren<MjAccordionTitleAttributes>;\n 'mj-accordion-text': PropsWithChildren<MjAccordionTextAttributes>;\n 'mj-carousel': PropsWithChildren<MjCarouselAttributes>;\n 'mj-carousel-image': MjCarouselImageAttributes;\n 'mj-navbar': PropsWithChildren<MjNavbarAttributes>;\n 'mj-navbar-link': PropsWithChildren<MjNavbarLinkAttributes>;\n 'mj-social': PropsWithChildren<MjSocialAttributes>;\n 'mj-social-element': PropsWithChildren<MjSocialElementAttributes>;\n 'mj-include': MjIncludeAttributes;\n 'mj-selector': PropsWithChildren<MjSelectorAttributes>;\n 'mj-html-attribute': PropsWithChildren<MjHtmlAttributeAttributes>;\n\n // HTML inline text elements (for mj-text)\n a: PropsWithChildren<HtmlAnchorAttributes>;\n span: PropsWithChildren<HtmlGlobalAttributes>;\n strong: PropsWithChildren<HtmlGlobalAttributes>;\n b: PropsWithChildren<HtmlGlobalAttributes>;\n em: PropsWithChildren<HtmlGlobalAttributes>;\n i: PropsWithChildren<HtmlGlobalAttributes>;\n u: PropsWithChildren<HtmlGlobalAttributes>;\n s: PropsWithChildren<HtmlGlobalAttributes>;\n small: PropsWithChildren<HtmlGlobalAttributes>;\n code: PropsWithChildren<HtmlGlobalAttributes>;\n sub: PropsWithChildren<HtmlGlobalAttributes>;\n sup: PropsWithChildren<HtmlGlobalAttributes>;\n br: HtmlGlobalAttributes;\n\n // HTML block text elements (for mj-text)\n div: PropsWithChildren<HtmlGlobalAttributes>;\n p: PropsWithChildren<HtmlGlobalAttributes>;\n h1: PropsWithChildren<HtmlGlobalAttributes>;\n h2: PropsWithChildren<HtmlGlobalAttributes>;\n h3: PropsWithChildren<HtmlGlobalAttributes>;\n h4: PropsWithChildren<HtmlGlobalAttributes>;\n h5: PropsWithChildren<HtmlGlobalAttributes>;\n h6: PropsWithChildren<HtmlGlobalAttributes>;\n ul: PropsWithChildren<HtmlListAttributes>;\n ol: PropsWithChildren<HtmlListAttributes>;\n li: PropsWithChildren<HtmlGlobalAttributes>;\n blockquote: PropsWithChildren<HtmlGlobalAttributes>;\n pre: PropsWithChildren<HtmlGlobalAttributes>;\n hr: HtmlGlobalAttributes;\n\n // HTML table elements (for mj-table - use mj-table instead of <table>)\n tr: PropsWithChildren<HtmlGlobalAttributes>;\n td: PropsWithChildren<HtmlTableCellAttributes>;\n th: PropsWithChildren<HtmlTableCellAttributes>;\n thead: PropsWithChildren<HtmlGlobalAttributes>;\n tbody: PropsWithChildren<HtmlGlobalAttributes>;\n\n // HTML media elements (for mj-table - mj-image can't be used inside mj-table)\n img: HtmlImgAttributes;\n\n // HTML head elements (for mj-raw in mj-head - dark mode support)\n meta: HtmlMetaAttributes;\n }\n}\n"],"mappings":";AAAO,IAAM,iBAAiB,uBAAO,IAAI,WAAW;AAE7C,IAAM,WAAW,uBAAO,IAAI,eAAe;AAkB3C,SAAS,WAAW,OAAmC;AAC5D,SACE,OAAO,UAAU,YACjB,UAAU,QACV,cAAc,SACd,MAAM,aAAa;AAEvB;AAEO,SAAS,WACd,KACA,YACA,UACU;AACV,QAAM,mBAAuD,CAAC;AAE9D,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,UAAU,GAAG;AACrD,QAAI,UAAU,UAAa,UAAU,MAAM;AACzC;AAAA,IACF;AACA,QAAI,iBAAiB,KAAK;AACxB,uBAAiB,GAAG,IAAI,MAAM,SAAS;AAAA,IACzC,OAAO;AACL,uBAAiB,GAAG,IAAI,OAAO,KAAK;AAAA,IACtC;AAAA,EACF;AAEA,SAAO;AAAA,IACL,UAAU;AAAA,IACV;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,EACF;AACF;;;ACGO,SAAS,IACd,KACA,OAEA,MACU;AACV,MAAI,OAAO,QAAQ,YAAY;AAC7B,WAAO,IAAI,KAAK;AAAA,EAClB;AAEA,QAAM,EAAE,UAAU,GAAG,WAAW,IAAI;AAEpC,QAAM,aACJ,aAAa,SACT,CAAC,IACD,MAAM,QAAQ,QAAQ,IACpB,WACA,CAAC,QAAqB;AAE9B,SAAO,WAAW,KAAK,YAAY,UAAU;AAC/C;AAEO,IAAM,OAAO;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/ast.ts","../src/jsx-runtime.ts","../src/render.ts","../src/serialize.ts"],"sourcesContent":["export { Fragment, type MjmlChild, type MjmlNode } from './ast';\nexport type {\n HtmlAnchorAttributes,\n HtmlGlobalAttributes,\n HtmlImgAttributes,\n HtmlListAttributes,\n HtmlMetaAttributes,\n HtmlTableCellAttributes,\n} from './html-types';\nexport { jsx, jsxs, type JSX } from './jsx-runtime';\nexport { render, type RenderOptions, type RenderResult } from './render';\nexport { serialize } from './serialize';\n\nexport type {\n Align,\n CSSPixel,\n CSSSpacing,\n CSSUnit,\n CSSWidth,\n Color,\n Direction,\n HexColor,\n MjAccordionAttributes,\n MjAccordionElementAttributes,\n MjAccordionTextAttributes,\n MjAccordionTitleAttributes,\n MjAllAttributes,\n MjAttributesAttributes,\n MjBodyAttributes,\n MjBreakpointAttributes,\n MjButtonAttributes,\n MjCarouselAttributes,\n MjCarouselImageAttributes,\n MjClassAttributes,\n MjColumnAttributes,\n MjDividerAttributes,\n MjFontAttributes,\n MjGroupAttributes,\n MjHeadAttributes,\n MjHeroAttributes,\n MjHtmlAttributeAttributes,\n MjHtmlAttributesAttributes,\n MjImageAttributes,\n MjIncludeAttributes,\n MjNavbarAttributes,\n MjNavbarLinkAttributes,\n MjPreviewAttributes,\n MjRawAttributes,\n MjSectionAttributes,\n MjSelectorAttributes,\n MjSocialAttributes,\n MjSocialElementAttributes,\n MjSpacerAttributes,\n MjStyleAttributes,\n MjTableAttributes,\n MjTextAttributes,\n MjTitleAttributes,\n MjWrapperAttributes,\n MjmlAttributes,\n URLString,\n VerticalAlign,\n} from './types';\n","export const MJML_NODE_TYPE = Symbol.for('mjmx.node');\n\nexport const Fragment = Symbol.for('mjmx.fragment');\n\nexport interface MjmlNode {\n readonly $$typeof: typeof MJML_NODE_TYPE;\n readonly tag: string | typeof Fragment;\n readonly attributes: Record<string, string | undefined>;\n readonly children: MjmlChild[];\n}\n\nexport type MjmlChild =\n | MjmlNode\n | string\n | number\n | boolean\n | null\n | undefined\n | MjmlChild[];\n\nexport function isMjmlNode(value: unknown): value is MjmlNode {\n return (\n typeof value === 'object' &&\n value !== null &&\n '$$typeof' in value &&\n value.$$typeof === MJML_NODE_TYPE\n );\n}\n\nexport function createNode(\n tag: string | typeof Fragment,\n attributes: Record<string, unknown>,\n children: MjmlChild[]\n): MjmlNode {\n const stringAttributes: Record<string, string | undefined> = {};\n\n for (const [key, value] of Object.entries(attributes)) {\n if (value === undefined || value === null) {\n continue;\n }\n if (value instanceof URL) {\n stringAttributes[key] = value.toString();\n } else {\n stringAttributes[key] = String(value);\n }\n }\n\n return {\n $$typeof: MJML_NODE_TYPE,\n tag,\n attributes: stringAttributes,\n children,\n };\n}\n","import { createNode, Fragment, type MjmlChild, type MjmlNode } from './ast';\nimport type {\n HtmlAnchorAttributes,\n HtmlGlobalAttributes,\n HtmlImgAttributes,\n HtmlListAttributes,\n HtmlMetaAttributes,\n HtmlTableCellAttributes,\n} from './html-types';\nimport type {\n MjAccordionAttributes,\n MjAccordionElementAttributes,\n MjAccordionTextAttributes,\n MjAccordionTitleAttributes,\n MjAllAttributes,\n MjAttributesAttributes,\n MjBodyAttributes,\n MjBreakpointAttributes,\n MjButtonAttributes,\n MjCarouselAttributes,\n MjCarouselImageAttributes,\n MjClassAttributes,\n MjColumnAttributes,\n MjDividerAttributes,\n MjFontAttributes,\n MjGroupAttributes,\n MjHeadAttributes,\n MjHeroAttributes,\n MjHtmlAttributeAttributes,\n MjHtmlAttributesAttributes,\n MjImageAttributes,\n MjIncludeAttributes,\n MjmlAttributes,\n MjNavbarAttributes,\n MjNavbarLinkAttributes,\n MjPreviewAttributes,\n MjRawAttributes,\n MjSectionAttributes,\n MjSelectorAttributes,\n MjSocialAttributes,\n MjSocialElementAttributes,\n MjSpacerAttributes,\n MjStyleAttributes,\n MjTableAttributes,\n MjTextAttributes,\n MjTitleAttributes,\n MjWrapperAttributes,\n} from './types';\n\nexport { Fragment };\n\ntype PropsWithChildren<T = object> = T & { children?: MjmlChild };\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Component = (props: any) => MjmlNode;\n\nexport function jsx(\n tag: string | typeof Fragment | Component,\n props: Record<string, unknown>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _key?: string\n): MjmlNode {\n if (typeof tag === 'function') {\n return tag(props);\n }\n\n const { children, ...attributes } = props;\n\n const childArray: MjmlChild[] =\n children === undefined\n ? []\n : Array.isArray(children)\n ? children\n : [children as MjmlChild];\n\n return createNode(tag, attributes, childArray);\n}\n\nexport const jsxs = jsx;\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace JSX {\n export type Element = MjmlNode;\n export type ElementType = string | typeof Fragment | Component;\n\n export interface ElementChildrenAttribute {\n children: MjmlChild;\n }\n\n export interface IntrinsicElements {\n mjml: PropsWithChildren<MjmlAttributes>;\n 'mj-head': PropsWithChildren<MjHeadAttributes>;\n 'mj-body': PropsWithChildren<MjBodyAttributes>;\n 'mj-attributes': PropsWithChildren<MjAttributesAttributes>;\n 'mj-breakpoint': MjBreakpointAttributes;\n 'mj-font': MjFontAttributes;\n 'mj-html-attributes': PropsWithChildren<MjHtmlAttributesAttributes>;\n 'mj-preview': PropsWithChildren<MjPreviewAttributes>;\n 'mj-style': PropsWithChildren<MjStyleAttributes>;\n 'mj-title': PropsWithChildren<MjTitleAttributes>;\n 'mj-all': MjAllAttributes;\n 'mj-class': MjClassAttributes;\n 'mj-section': PropsWithChildren<MjSectionAttributes>;\n 'mj-column': PropsWithChildren<MjColumnAttributes>;\n 'mj-group': PropsWithChildren<MjGroupAttributes>;\n 'mj-wrapper': PropsWithChildren<MjWrapperAttributes>;\n 'mj-text': PropsWithChildren<MjTextAttributes>;\n 'mj-button': PropsWithChildren<MjButtonAttributes>;\n 'mj-image': MjImageAttributes;\n 'mj-divider': MjDividerAttributes;\n 'mj-spacer': MjSpacerAttributes;\n 'mj-table': PropsWithChildren<MjTableAttributes>;\n 'mj-raw': PropsWithChildren<MjRawAttributes>;\n 'mj-hero': PropsWithChildren<MjHeroAttributes>;\n 'mj-accordion': PropsWithChildren<MjAccordionAttributes>;\n 'mj-accordion-element': PropsWithChildren<MjAccordionElementAttributes>;\n 'mj-accordion-title': PropsWithChildren<MjAccordionTitleAttributes>;\n 'mj-accordion-text': PropsWithChildren<MjAccordionTextAttributes>;\n 'mj-carousel': PropsWithChildren<MjCarouselAttributes>;\n 'mj-carousel-image': MjCarouselImageAttributes;\n 'mj-navbar': PropsWithChildren<MjNavbarAttributes>;\n 'mj-navbar-link': PropsWithChildren<MjNavbarLinkAttributes>;\n 'mj-social': PropsWithChildren<MjSocialAttributes>;\n 'mj-social-element': PropsWithChildren<MjSocialElementAttributes>;\n 'mj-include': MjIncludeAttributes;\n 'mj-selector': PropsWithChildren<MjSelectorAttributes>;\n 'mj-html-attribute': PropsWithChildren<MjHtmlAttributeAttributes>;\n\n // HTML inline text elements (for mj-text)\n a: PropsWithChildren<HtmlAnchorAttributes>;\n span: PropsWithChildren<HtmlGlobalAttributes>;\n strong: PropsWithChildren<HtmlGlobalAttributes>;\n b: PropsWithChildren<HtmlGlobalAttributes>;\n em: PropsWithChildren<HtmlGlobalAttributes>;\n i: PropsWithChildren<HtmlGlobalAttributes>;\n u: PropsWithChildren<HtmlGlobalAttributes>;\n s: PropsWithChildren<HtmlGlobalAttributes>;\n small: PropsWithChildren<HtmlGlobalAttributes>;\n code: PropsWithChildren<HtmlGlobalAttributes>;\n sub: PropsWithChildren<HtmlGlobalAttributes>;\n sup: PropsWithChildren<HtmlGlobalAttributes>;\n br: HtmlGlobalAttributes;\n\n // HTML block text elements (for mj-text)\n div: PropsWithChildren<HtmlGlobalAttributes>;\n p: PropsWithChildren<HtmlGlobalAttributes>;\n h1: PropsWithChildren<HtmlGlobalAttributes>;\n h2: PropsWithChildren<HtmlGlobalAttributes>;\n h3: PropsWithChildren<HtmlGlobalAttributes>;\n h4: PropsWithChildren<HtmlGlobalAttributes>;\n h5: PropsWithChildren<HtmlGlobalAttributes>;\n h6: PropsWithChildren<HtmlGlobalAttributes>;\n ul: PropsWithChildren<HtmlListAttributes>;\n ol: PropsWithChildren<HtmlListAttributes>;\n li: PropsWithChildren<HtmlGlobalAttributes>;\n blockquote: PropsWithChildren<HtmlGlobalAttributes>;\n pre: PropsWithChildren<HtmlGlobalAttributes>;\n hr: HtmlGlobalAttributes;\n\n // HTML table elements (for mj-table - use mj-table instead of <table>)\n tr: PropsWithChildren<HtmlGlobalAttributes>;\n td: PropsWithChildren<HtmlTableCellAttributes>;\n th: PropsWithChildren<HtmlTableCellAttributes>;\n thead: PropsWithChildren<HtmlGlobalAttributes>;\n tbody: PropsWithChildren<HtmlGlobalAttributes>;\n\n // HTML media elements (for mj-table - mj-image can't be used inside mj-table)\n img: HtmlImgAttributes;\n\n // HTML head elements (for mj-raw in mj-head - dark mode support)\n meta: HtmlMetaAttributes;\n }\n}\n","import mjml2html from 'mjml';\nimport type { MjmlNode } from './ast';\nimport { isMjmlNode } from './ast';\nimport { serialize } from './serialize';\n\nexport interface RenderOptions {\n /**\n * Default fonts imported in the HTML rendered by HTML\n * ie. { 'Open Sans': 'https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,700' }\n *\n * default: @see https://github.com/mjmlio/mjml/blob/master/packages/mjml-core/src/index.js\n */\n fonts?: { [key: string]: string } | undefined;\n\n /**\n * Option to keep comments in the HTML output\n * default: true\n */\n keepComments?: boolean | undefined;\n\n /**\n * @deprecated use js-beautify directly after processing the MJML\n *\n * Option to beautify the HTML output\n * default: false\n */\n beautify?: boolean | undefined;\n\n /**\n * @deprecated use html-minifier directly after processing the MJML\n *\n * Option to minify the HTML output\n *\n * default: false\n */\n minify?: boolean | undefined;\n /**\n * @deprecated @see minify\n *\n * Options for html minifier, see mjml-cli documentation for more info\n * Passed directly to html-minifier as options\n *\n * default: @see htmlMinify usage in mjml-core/src/index.js\n */\n minifyOptions?:\n | {\n collapseWhitespace?: boolean | undefined;\n minifyCSS?: boolean | undefined;\n removeEmptyAttributes?: boolean | undefined;\n }\n | undefined;\n\n /**\n * How to validate your MJML\n *\n * skip: your document is rendered without going through validation\n * soft: your document is going through validation and is rendered, even if it has errors\n * strict: your document is going through validation and is not rendered if it has any error\n *\n * default: soft\n */\n validationLevel?: 'strict' | 'soft' | 'skip' | undefined;\n\n /**\n * Full path of the specified file to use when resolving paths from mj-include components\n * default: '.'\n */\n filePath?: string | undefined;\n /**\n * The path or directory of the .mjmlconfig file\n * default: process.cwd()\n */\n mjmlConfigPath?: string | undefined;\n\n /**\n * Use the config attribute defined in the .mjmlconfig file.\n * The config passed into mjml2html overrides the .mjmlconfig.\n * default: false\n */\n useMjmlConfigOptions?: boolean | undefined;\n\n /**\n * optional setting when inlining css, see mjml-cli documentation for more info\n *\n */\n juicePreserveTags?:\n | { [index: string]: { start: string; end: string } }\n | undefined;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n juiceOptions?: any;\n\n /**\n * undocumented\n * a function returning html skeleton\n * default: see mjml-core/src/helpers/skeleton.js\n */\n skeleton?: string | (() => string) | undefined;\n\n actualPath?: string | undefined;\n /**\n * undocumented\n * ignore mj-include elements\n * default: false\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ignoreIncludes?: any;\n\n /**\n * see mjml-parser-xml\n */\n preprocessors?: Array<(xml: string) => string> | undefined;\n\n /**\n * Add media queries specific to printer when converting mjml into html. When enabling this option,\n * the html might not be compatible with all email clients anymore.\n */\n printerSupport?: boolean | undefined;\n}\n\ninterface MJMLJsonWithChildren {\n tagName: string;\n attributes: Record<string, unknown>;\n children: MJMLJsonObject[];\n}\n\ninterface MJMLJsonWithContent {\n tagName: string;\n attributes: Record<string, unknown>;\n content: string;\n}\n\ninterface MJMLJsonSelfClosingTag {\n tagName: string;\n attributes: Record<string, unknown>;\n}\n\ntype MJMLJsonObject =\n | MJMLJsonWithChildren\n | MJMLJsonWithContent\n | MJMLJsonSelfClosingTag;\n\ninterface MJMLParseError {\n line: number;\n message: string;\n tagName: string;\n formattedMessage: string;\n}\n\nexport interface RenderResult {\n html: string;\n json: MJMLJsonObject;\n errors: MJMLParseError[];\n}\n\nexport function render(\n mjml: MjmlNode | string,\n options?: RenderOptions\n): RenderResult {\n const str = isMjmlNode(mjml) ? serialize(mjml) : mjml;\n return mjml2html(str, options);\n}\n","import { Fragment, isMjmlNode, type MjmlChild, type MjmlNode } from './ast';\n\nconst SELF_CLOSING_TAGS = new Set([\n // MJML\n 'mj-all',\n 'mj-breakpoint',\n 'mj-carousel-image',\n 'mj-class',\n 'mj-divider',\n 'mj-font',\n 'mj-image',\n 'mj-include',\n 'mj-spacer',\n // HTML void elements\n 'br',\n 'hr',\n 'img',\n 'meta',\n]);\n\nfunction serializeAttributes(\n attributes: Record<string, string | undefined>\n): string {\n const parts: string[] = [];\n\n for (const [key, value] of Object.entries(attributes)) {\n if (value !== undefined) {\n parts.push(`${key}=\"${value}\"`);\n }\n }\n\n return parts.length > 0 ? ' ' + parts.join(' ') : '';\n}\n\nfunction serializeChildren(children: MjmlChild[]): string {\n const parts: string[] = [];\n\n for (const child of children) {\n if (\n child === null ||\n child === undefined ||\n child === true ||\n child === false\n ) {\n continue;\n }\n\n if (Array.isArray(child)) {\n parts.push(serializeChildren(child));\n } else if (isMjmlNode(child)) {\n parts.push(serializeNode(child));\n } else {\n parts.push(String(child));\n }\n }\n\n return parts.join('');\n}\n\nfunction serializeNode(node: MjmlNode): string {\n if (node.tag === Fragment) {\n return serializeChildren(node.children);\n }\n\n const tag = node.tag as string;\n const attrs = serializeAttributes(node.attributes);\n\n if (SELF_CLOSING_TAGS.has(tag)) {\n return `<${tag}${attrs} />`;\n }\n\n const content = serializeChildren(node.children);\n return `<${tag}${attrs}>${content}</${tag}>`;\n}\n\nexport function serialize(node: MjmlNode): string {\n return serializeNode(node);\n}\n\nexport const toMjmlString = serialize;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,iBAAiB,uBAAO,IAAI,WAAW;AAE7C,IAAM,WAAW,uBAAO,IAAI,eAAe;AAkB3C,SAAS,WAAW,OAAmC;AAC5D,SACE,OAAO,UAAU,YACjB,UAAU,QACV,cAAc,SACd,MAAM,aAAa;AAEvB;AAEO,SAAS,WACd,KACA,YACA,UACU;AACV,QAAM,mBAAuD,CAAC;AAE9D,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,UAAU,GAAG;AACrD,QAAI,UAAU,UAAa,UAAU,MAAM;AACzC;AAAA,IACF;AACA,QAAI,iBAAiB,KAAK;AACxB,uBAAiB,GAAG,IAAI,MAAM,SAAS;AAAA,IACzC,OAAO;AACL,uBAAiB,GAAG,IAAI,OAAO,KAAK;AAAA,IACtC;AAAA,EACF;AAEA,SAAO;AAAA,IACL,UAAU;AAAA,IACV;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,EACF;AACF;;;ACGO,SAAS,IACd,KACA,OAEA,MACU;AACV,MAAI,OAAO,QAAQ,YAAY;AAC7B,WAAO,IAAI,KAAK;AAAA,EAClB;AAEA,QAAM,EAAE,UAAU,GAAG,WAAW,IAAI;AAEpC,QAAM,aACJ,aAAa,SACT,CAAC,IACD,MAAM,QAAQ,QAAQ,IACpB,WACA,CAAC,QAAqB;AAE9B,SAAO,WAAW,KAAK,YAAY,UAAU;AAC/C;AAEO,IAAM,OAAO;;;AC9EpB,kBAAsB;;;ACEtB,IAAM,oBAAoB,oBAAI,IAAI;AAAA;AAAA,EAEhC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,SAAS,oBACP,YACQ;AACR,QAAM,QAAkB,CAAC;AAEzB,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,UAAU,GAAG;AACrD,QAAI,UAAU,QAAW;AACvB,YAAM,KAAK,GAAG,GAAG,KAAK,KAAK,GAAG;AAAA,IAChC;AAAA,EACF;AAEA,SAAO,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,GAAG,IAAI;AACpD;AAEA,SAAS,kBAAkB,UAA+B;AACxD,QAAM,QAAkB,CAAC;AAEzB,aAAW,SAAS,UAAU;AAC5B,QACE,UAAU,QACV,UAAU,UACV,UAAU,QACV,UAAU,OACV;AACA;AAAA,IACF;AAEA,QAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,YAAM,KAAK,kBAAkB,KAAK,CAAC;AAAA,IACrC,WAAW,WAAW,KAAK,GAAG;AAC5B,YAAM,KAAK,cAAc,KAAK,CAAC;AAAA,IACjC,OAAO;AACL,YAAM,KAAK,OAAO,KAAK,CAAC;AAAA,IAC1B;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,EAAE;AACtB;AAEA,SAAS,cAAc,MAAwB;AAC7C,MAAI,KAAK,QAAQ,UAAU;AACzB,WAAO,kBAAkB,KAAK,QAAQ;AAAA,EACxC;AAEA,QAAM,MAAM,KAAK;AACjB,QAAM,QAAQ,oBAAoB,KAAK,UAAU;AAEjD,MAAI,kBAAkB,IAAI,GAAG,GAAG;AAC9B,WAAO,IAAI,GAAG,GAAG,KAAK;AAAA,EACxB;AAEA,QAAM,UAAU,kBAAkB,KAAK,QAAQ;AAC/C,SAAO,IAAI,GAAG,GAAG,KAAK,IAAI,OAAO,KAAK,GAAG;AAC3C;AAEO,SAAS,UAAU,MAAwB;AAChD,SAAO,cAAc,IAAI;AAC3B;;;AD8EO,SAAS,OACd,MACA,SACc;AACd,QAAM,MAAM,WAAW,IAAI,IAAI,UAAU,IAAI,IAAI;AACjD,aAAO,YAAAA,SAAU,KAAK,OAAO;AAC/B;","names":["mjml2html"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/ast.ts","../src/jsx-runtime.ts","../src/render.ts","../src/serialize.ts"],"sourcesContent":["export { Fragment, type MjmlChild, type MjmlNode } from './ast';\nexport type {\n HtmlAnchorAttributes,\n HtmlGlobalAttributes,\n HtmlImgAttributes,\n HtmlListAttributes,\n HtmlMetaAttributes,\n HtmlTableCellAttributes,\n} from './html-types';\nexport { jsx, jsxs, type JSX, type PropsWithChildren } from './jsx-runtime';\nexport { render, type RenderOptions, type RenderResult } from './render';\nexport { serialize } from './serialize';\n\nexport type {\n Align,\n CSSPixel,\n CSSSpacing,\n CSSUnit,\n CSSWidth,\n Color,\n Direction,\n HexColor,\n MjAccordionAttributes,\n MjAccordionElementAttributes,\n MjAccordionTextAttributes,\n MjAccordionTitleAttributes,\n MjAllAttributes,\n MjAttributesAttributes,\n MjBodyAttributes,\n MjBreakpointAttributes,\n MjButtonAttributes,\n MjCarouselAttributes,\n MjCarouselImageAttributes,\n MjClassAttributes,\n MjColumnAttributes,\n MjDividerAttributes,\n MjFontAttributes,\n MjGroupAttributes,\n MjHeadAttributes,\n MjHeroAttributes,\n MjHtmlAttributeAttributes,\n MjHtmlAttributesAttributes,\n MjImageAttributes,\n MjIncludeAttributes,\n MjNavbarAttributes,\n MjNavbarLinkAttributes,\n MjPreviewAttributes,\n MjRawAttributes,\n MjSectionAttributes,\n MjSelectorAttributes,\n MjSocialAttributes,\n MjSocialElementAttributes,\n MjSpacerAttributes,\n MjStyleAttributes,\n MjTableAttributes,\n MjTextAttributes,\n MjTitleAttributes,\n MjWrapperAttributes,\n MjmlAttributes,\n URLString,\n VerticalAlign,\n} from './types';\n","export const MJML_NODE_TYPE = Symbol.for('mjmx.node');\n\nexport const Fragment = Symbol.for('mjmx.fragment');\n\nexport interface MjmlNode {\n readonly $$typeof: typeof MJML_NODE_TYPE;\n readonly tag: string | typeof Fragment;\n readonly attributes: Record<string, string | undefined>;\n readonly children: MjmlChild[];\n}\n\nexport type MjmlChild =\n | MjmlNode\n | string\n | number\n | boolean\n | null\n | undefined\n | MjmlChild[];\n\nexport function isMjmlNode(value: unknown): value is MjmlNode {\n return (\n typeof value === 'object' &&\n value !== null &&\n '$$typeof' in value &&\n value.$$typeof === MJML_NODE_TYPE\n );\n}\n\nexport function createNode(\n tag: string | typeof Fragment,\n attributes: Record<string, unknown>,\n children: MjmlChild[]\n): MjmlNode {\n const stringAttributes: Record<string, string | undefined> = {};\n\n for (const [key, value] of Object.entries(attributes)) {\n if (value === undefined || value === null) {\n continue;\n }\n if (value instanceof URL) {\n stringAttributes[key] = value.toString();\n } else {\n stringAttributes[key] = String(value);\n }\n }\n\n return {\n $$typeof: MJML_NODE_TYPE,\n tag,\n attributes: stringAttributes,\n children,\n };\n}\n","import { createNode, Fragment, type MjmlChild, type MjmlNode } from './ast';\nimport type {\n HtmlAnchorAttributes,\n HtmlGlobalAttributes,\n HtmlImgAttributes,\n HtmlListAttributes,\n HtmlMetaAttributes,\n HtmlTableCellAttributes,\n} from './html-types';\nimport type {\n MjAccordionAttributes,\n MjAccordionElementAttributes,\n MjAccordionTextAttributes,\n MjAccordionTitleAttributes,\n MjAllAttributes,\n MjAttributesAttributes,\n MjBodyAttributes,\n MjBreakpointAttributes,\n MjButtonAttributes,\n MjCarouselAttributes,\n MjCarouselImageAttributes,\n MjClassAttributes,\n MjColumnAttributes,\n MjDividerAttributes,\n MjFontAttributes,\n MjGroupAttributes,\n MjHeadAttributes,\n MjHeroAttributes,\n MjHtmlAttributeAttributes,\n MjHtmlAttributesAttributes,\n MjImageAttributes,\n MjIncludeAttributes,\n MjmlAttributes,\n MjNavbarAttributes,\n MjNavbarLinkAttributes,\n MjPreviewAttributes,\n MjRawAttributes,\n MjSectionAttributes,\n MjSelectorAttributes,\n MjSocialAttributes,\n MjSocialElementAttributes,\n MjSpacerAttributes,\n MjStyleAttributes,\n MjTableAttributes,\n MjTextAttributes,\n MjTitleAttributes,\n MjWrapperAttributes,\n} from './types';\n\nexport { Fragment };\n\nexport type PropsWithChildren<T = object> = T & { children?: MjmlChild };\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Component = (props: any) => MjmlNode;\n\nexport function jsx(\n tag: string | typeof Fragment | Component,\n props: Record<string, unknown>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _key?: string\n): MjmlNode {\n if (typeof tag === 'function') {\n return tag(props);\n }\n\n const { children, ...attributes } = props;\n\n const childArray: MjmlChild[] =\n children === undefined\n ? []\n : Array.isArray(children)\n ? children\n : [children as MjmlChild];\n\n return createNode(tag, attributes, childArray);\n}\n\nexport const jsxs = jsx;\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace JSX {\n export type Element = MjmlNode;\n export type ElementType = string | typeof Fragment | Component;\n\n export interface ElementChildrenAttribute {\n children: MjmlChild;\n }\n\n export interface IntrinsicElements {\n mjml: PropsWithChildren<MjmlAttributes>;\n 'mj-head': PropsWithChildren<MjHeadAttributes>;\n 'mj-body': PropsWithChildren<MjBodyAttributes>;\n 'mj-attributes': PropsWithChildren<MjAttributesAttributes>;\n 'mj-breakpoint': MjBreakpointAttributes;\n 'mj-font': MjFontAttributes;\n 'mj-html-attributes': PropsWithChildren<MjHtmlAttributesAttributes>;\n 'mj-preview': PropsWithChildren<MjPreviewAttributes>;\n 'mj-style': PropsWithChildren<MjStyleAttributes>;\n 'mj-title': PropsWithChildren<MjTitleAttributes>;\n 'mj-all': MjAllAttributes;\n 'mj-class': MjClassAttributes;\n 'mj-section': PropsWithChildren<MjSectionAttributes>;\n 'mj-column': PropsWithChildren<MjColumnAttributes>;\n 'mj-group': PropsWithChildren<MjGroupAttributes>;\n 'mj-wrapper': PropsWithChildren<MjWrapperAttributes>;\n 'mj-text': PropsWithChildren<MjTextAttributes>;\n 'mj-button': PropsWithChildren<MjButtonAttributes>;\n 'mj-image': MjImageAttributes;\n 'mj-divider': MjDividerAttributes;\n 'mj-spacer': MjSpacerAttributes;\n 'mj-table': PropsWithChildren<MjTableAttributes>;\n 'mj-raw': PropsWithChildren<MjRawAttributes>;\n 'mj-hero': PropsWithChildren<MjHeroAttributes>;\n 'mj-accordion': PropsWithChildren<MjAccordionAttributes>;\n 'mj-accordion-element': PropsWithChildren<MjAccordionElementAttributes>;\n 'mj-accordion-title': PropsWithChildren<MjAccordionTitleAttributes>;\n 'mj-accordion-text': PropsWithChildren<MjAccordionTextAttributes>;\n 'mj-carousel': PropsWithChildren<MjCarouselAttributes>;\n 'mj-carousel-image': MjCarouselImageAttributes;\n 'mj-navbar': PropsWithChildren<MjNavbarAttributes>;\n 'mj-navbar-link': PropsWithChildren<MjNavbarLinkAttributes>;\n 'mj-social': PropsWithChildren<MjSocialAttributes>;\n 'mj-social-element': PropsWithChildren<MjSocialElementAttributes>;\n 'mj-include': MjIncludeAttributes;\n 'mj-selector': PropsWithChildren<MjSelectorAttributes>;\n 'mj-html-attribute': PropsWithChildren<MjHtmlAttributeAttributes>;\n\n // HTML inline text elements (for mj-text)\n a: PropsWithChildren<HtmlAnchorAttributes>;\n span: PropsWithChildren<HtmlGlobalAttributes>;\n strong: PropsWithChildren<HtmlGlobalAttributes>;\n b: PropsWithChildren<HtmlGlobalAttributes>;\n em: PropsWithChildren<HtmlGlobalAttributes>;\n i: PropsWithChildren<HtmlGlobalAttributes>;\n u: PropsWithChildren<HtmlGlobalAttributes>;\n s: PropsWithChildren<HtmlGlobalAttributes>;\n small: PropsWithChildren<HtmlGlobalAttributes>;\n code: PropsWithChildren<HtmlGlobalAttributes>;\n sub: PropsWithChildren<HtmlGlobalAttributes>;\n sup: PropsWithChildren<HtmlGlobalAttributes>;\n br: HtmlGlobalAttributes;\n\n // HTML block text elements (for mj-text)\n div: PropsWithChildren<HtmlGlobalAttributes>;\n p: PropsWithChildren<HtmlGlobalAttributes>;\n h1: PropsWithChildren<HtmlGlobalAttributes>;\n h2: PropsWithChildren<HtmlGlobalAttributes>;\n h3: PropsWithChildren<HtmlGlobalAttributes>;\n h4: PropsWithChildren<HtmlGlobalAttributes>;\n h5: PropsWithChildren<HtmlGlobalAttributes>;\n h6: PropsWithChildren<HtmlGlobalAttributes>;\n ul: PropsWithChildren<HtmlListAttributes>;\n ol: PropsWithChildren<HtmlListAttributes>;\n li: PropsWithChildren<HtmlGlobalAttributes>;\n blockquote: PropsWithChildren<HtmlGlobalAttributes>;\n pre: PropsWithChildren<HtmlGlobalAttributes>;\n hr: HtmlGlobalAttributes;\n\n // HTML table elements (for mj-table - use mj-table instead of <table>)\n tr: PropsWithChildren<HtmlGlobalAttributes>;\n td: PropsWithChildren<HtmlTableCellAttributes>;\n th: PropsWithChildren<HtmlTableCellAttributes>;\n thead: PropsWithChildren<HtmlGlobalAttributes>;\n tbody: PropsWithChildren<HtmlGlobalAttributes>;\n\n // HTML media elements (for mj-table - mj-image can't be used inside mj-table)\n img: HtmlImgAttributes;\n\n // HTML head elements (for mj-raw in mj-head - dark mode support)\n meta: HtmlMetaAttributes;\n }\n}\n","import mjml2html from 'mjml';\nimport type { MjmlNode } from './ast';\nimport { isMjmlNode } from './ast';\nimport { serialize } from './serialize';\n\nexport interface RenderOptions {\n /**\n * Default fonts imported in the HTML rendered by HTML\n * ie. { 'Open Sans': 'https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,700' }\n *\n * default: @see https://github.com/mjmlio/mjml/blob/master/packages/mjml-core/src/index.js\n */\n fonts?: { [key: string]: string } | undefined;\n\n /**\n * Option to keep comments in the HTML output\n * default: true\n */\n keepComments?: boolean | undefined;\n\n /**\n * @deprecated use js-beautify directly after processing the MJML\n *\n * Option to beautify the HTML output\n * default: false\n */\n beautify?: boolean | undefined;\n\n /**\n * @deprecated use html-minifier directly after processing the MJML\n *\n * Option to minify the HTML output\n *\n * default: false\n */\n minify?: boolean | undefined;\n /**\n * @deprecated @see minify\n *\n * Options for html minifier, see mjml-cli documentation for more info\n * Passed directly to html-minifier as options\n *\n * default: @see htmlMinify usage in mjml-core/src/index.js\n */\n minifyOptions?:\n | {\n collapseWhitespace?: boolean | undefined;\n minifyCSS?: boolean | undefined;\n removeEmptyAttributes?: boolean | undefined;\n }\n | undefined;\n\n /**\n * How to validate your MJML\n *\n * skip: your document is rendered without going through validation\n * soft: your document is going through validation and is rendered, even if it has errors\n * strict: your document is going through validation and is not rendered if it has any error\n *\n * default: soft\n */\n validationLevel?: 'strict' | 'soft' | 'skip' | undefined;\n\n /**\n * Full path of the specified file to use when resolving paths from mj-include components\n * default: '.'\n */\n filePath?: string | undefined;\n /**\n * The path or directory of the .mjmlconfig file\n * default: process.cwd()\n */\n mjmlConfigPath?: string | undefined;\n\n /**\n * Use the config attribute defined in the .mjmlconfig file.\n * The config passed into mjml2html overrides the .mjmlconfig.\n * default: false\n */\n useMjmlConfigOptions?: boolean | undefined;\n\n /**\n * optional setting when inlining css, see mjml-cli documentation for more info\n *\n */\n juicePreserveTags?:\n | { [index: string]: { start: string; end: string } }\n | undefined;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n juiceOptions?: any;\n\n /**\n * undocumented\n * a function returning html skeleton\n * default: see mjml-core/src/helpers/skeleton.js\n */\n skeleton?: string | (() => string) | undefined;\n\n actualPath?: string | undefined;\n /**\n * undocumented\n * ignore mj-include elements\n * default: false\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ignoreIncludes?: any;\n\n /**\n * see mjml-parser-xml\n */\n preprocessors?: Array<(xml: string) => string> | undefined;\n\n /**\n * Add media queries specific to printer when converting mjml into html. When enabling this option,\n * the html might not be compatible with all email clients anymore.\n */\n printerSupport?: boolean | undefined;\n}\n\ninterface MJMLJsonWithChildren {\n tagName: string;\n attributes: Record<string, unknown>;\n children: MJMLJsonObject[];\n}\n\ninterface MJMLJsonWithContent {\n tagName: string;\n attributes: Record<string, unknown>;\n content: string;\n}\n\ninterface MJMLJsonSelfClosingTag {\n tagName: string;\n attributes: Record<string, unknown>;\n}\n\ntype MJMLJsonObject =\n | MJMLJsonWithChildren\n | MJMLJsonWithContent\n | MJMLJsonSelfClosingTag;\n\ninterface MJMLParseError {\n line: number;\n message: string;\n tagName: string;\n formattedMessage: string;\n}\n\nexport interface RenderResult {\n html: string;\n json: MJMLJsonObject;\n errors: MJMLParseError[];\n}\n\nexport function render(\n mjml: MjmlNode | string,\n options?: RenderOptions\n): RenderResult {\n const str = isMjmlNode(mjml) ? serialize(mjml) : mjml;\n return mjml2html(str, options);\n}\n","import { Fragment, isMjmlNode, type MjmlChild, type MjmlNode } from './ast';\n\nconst SELF_CLOSING_TAGS = new Set([\n // MJML\n 'mj-all',\n 'mj-breakpoint',\n 'mj-carousel-image',\n 'mj-class',\n 'mj-divider',\n 'mj-font',\n 'mj-image',\n 'mj-include',\n 'mj-spacer',\n // HTML void elements\n 'br',\n 'hr',\n 'img',\n 'meta',\n]);\n\nfunction serializeAttributes(\n attributes: Record<string, string | undefined>\n): string {\n const parts: string[] = [];\n\n for (const [key, value] of Object.entries(attributes)) {\n if (value !== undefined) {\n parts.push(`${key}=\"${value}\"`);\n }\n }\n\n return parts.length > 0 ? ' ' + parts.join(' ') : '';\n}\n\nfunction serializeChildren(children: MjmlChild[]): string {\n const parts: string[] = [];\n\n for (const child of children) {\n if (\n child === null ||\n child === undefined ||\n child === true ||\n child === false\n ) {\n continue;\n }\n\n if (Array.isArray(child)) {\n parts.push(serializeChildren(child));\n } else if (isMjmlNode(child)) {\n parts.push(serializeNode(child));\n } else {\n parts.push(String(child));\n }\n }\n\n return parts.join('');\n}\n\nfunction serializeNode(node: MjmlNode): string {\n if (node.tag === Fragment) {\n return serializeChildren(node.children);\n }\n\n const tag = node.tag as string;\n const attrs = serializeAttributes(node.attributes);\n\n if (SELF_CLOSING_TAGS.has(tag)) {\n return `<${tag}${attrs} />`;\n }\n\n const content = serializeChildren(node.children);\n return `<${tag}${attrs}>${content}</${tag}>`;\n}\n\nexport function serialize(node: MjmlNode): string {\n return serializeNode(node);\n}\n\nexport const toMjmlString = serialize;\n"],"mappings":"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","names":["mjml2html"]}
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { M as MjmlNode } from './jsx-dev-runtime-DeeKpFUQ.cjs';
2
- export { A as Align, C as CSSPixel, a as CSSSpacing, b as CSSUnit, c as CSSWidth, d as Color, D as Direction, F as Fragment, H as HexColor, e as HtmlAnchorAttributes, f as HtmlGlobalAttributes, g as HtmlImgAttributes, h as HtmlListAttributes, i as HtmlMetaAttributes, j as HtmlTableCellAttributes, J as JSX, k as MjAccordionAttributes, l as MjAccordionElementAttributes, m as MjAccordionTextAttributes, n as MjAccordionTitleAttributes, o as MjAllAttributes, p as MjAttributesAttributes, q as MjBodyAttributes, r as MjBreakpointAttributes, s as MjButtonAttributes, t as MjCarouselAttributes, u as MjCarouselImageAttributes, v as MjClassAttributes, w as MjColumnAttributes, x as MjDividerAttributes, y as MjFontAttributes, z as MjGroupAttributes, B as MjHeadAttributes, E as MjHeroAttributes, G as MjHtmlAttributeAttributes, I as MjHtmlAttributesAttributes, K as MjImageAttributes, L as MjIncludeAttributes, N as MjNavbarAttributes, O as MjNavbarLinkAttributes, P as MjPreviewAttributes, Q as MjRawAttributes, R as MjSectionAttributes, S as MjSelectorAttributes, T as MjSocialAttributes, U as MjSocialElementAttributes, V as MjSpacerAttributes, W as MjStyleAttributes, X as MjTableAttributes, Y as MjTextAttributes, Z as MjTitleAttributes, _ as MjWrapperAttributes, $ as MjmlAttributes, a0 as MjmlChild, a1 as URLString, a2 as VerticalAlign, a3 as jsx, a4 as jsxs } from './jsx-dev-runtime-DeeKpFUQ.cjs';
1
+ import { M as MjmlNode } from './jsx-dev-runtime-CIghYpt3.cjs';
2
+ export { A as Align, C as CSSPixel, a as CSSSpacing, b as CSSUnit, c as CSSWidth, d as Color, D as Direction, F as Fragment, H as HexColor, e as HtmlAnchorAttributes, f as HtmlGlobalAttributes, g as HtmlImgAttributes, h as HtmlListAttributes, i as HtmlMetaAttributes, j as HtmlTableCellAttributes, J as JSX, k as MjAccordionAttributes, l as MjAccordionElementAttributes, m as MjAccordionTextAttributes, n as MjAccordionTitleAttributes, o as MjAllAttributes, p as MjAttributesAttributes, q as MjBodyAttributes, r as MjBreakpointAttributes, s as MjButtonAttributes, t as MjCarouselAttributes, u as MjCarouselImageAttributes, v as MjClassAttributes, w as MjColumnAttributes, x as MjDividerAttributes, y as MjFontAttributes, z as MjGroupAttributes, B as MjHeadAttributes, E as MjHeroAttributes, G as MjHtmlAttributeAttributes, I as MjHtmlAttributesAttributes, K as MjImageAttributes, L as MjIncludeAttributes, N as MjNavbarAttributes, O as MjNavbarLinkAttributes, P as MjPreviewAttributes, Q as MjRawAttributes, R as MjSectionAttributes, S as MjSelectorAttributes, T as MjSocialAttributes, U as MjSocialElementAttributes, V as MjSpacerAttributes, W as MjStyleAttributes, X as MjTableAttributes, Y as MjTextAttributes, Z as MjTitleAttributes, _ as MjWrapperAttributes, $ as MjmlAttributes, a0 as MjmlChild, a1 as PropsWithChildren, a2 as URLString, a3 as VerticalAlign, a4 as jsx, a5 as jsxs } from './jsx-dev-runtime-CIghYpt3.cjs';
3
3
 
4
4
  interface RenderOptions {
5
5
  /**
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { M as MjmlNode } from './jsx-dev-runtime-DeeKpFUQ.js';
2
- export { A as Align, C as CSSPixel, a as CSSSpacing, b as CSSUnit, c as CSSWidth, d as Color, D as Direction, F as Fragment, H as HexColor, e as HtmlAnchorAttributes, f as HtmlGlobalAttributes, g as HtmlImgAttributes, h as HtmlListAttributes, i as HtmlMetaAttributes, j as HtmlTableCellAttributes, J as JSX, k as MjAccordionAttributes, l as MjAccordionElementAttributes, m as MjAccordionTextAttributes, n as MjAccordionTitleAttributes, o as MjAllAttributes, p as MjAttributesAttributes, q as MjBodyAttributes, r as MjBreakpointAttributes, s as MjButtonAttributes, t as MjCarouselAttributes, u as MjCarouselImageAttributes, v as MjClassAttributes, w as MjColumnAttributes, x as MjDividerAttributes, y as MjFontAttributes, z as MjGroupAttributes, B as MjHeadAttributes, E as MjHeroAttributes, G as MjHtmlAttributeAttributes, I as MjHtmlAttributesAttributes, K as MjImageAttributes, L as MjIncludeAttributes, N as MjNavbarAttributes, O as MjNavbarLinkAttributes, P as MjPreviewAttributes, Q as MjRawAttributes, R as MjSectionAttributes, S as MjSelectorAttributes, T as MjSocialAttributes, U as MjSocialElementAttributes, V as MjSpacerAttributes, W as MjStyleAttributes, X as MjTableAttributes, Y as MjTextAttributes, Z as MjTitleAttributes, _ as MjWrapperAttributes, $ as MjmlAttributes, a0 as MjmlChild, a1 as URLString, a2 as VerticalAlign, a3 as jsx, a4 as jsxs } from './jsx-dev-runtime-DeeKpFUQ.js';
1
+ import { M as MjmlNode } from './jsx-dev-runtime-CIghYpt3.js';
2
+ export { A as Align, C as CSSPixel, a as CSSSpacing, b as CSSUnit, c as CSSWidth, d as Color, D as Direction, F as Fragment, H as HexColor, e as HtmlAnchorAttributes, f as HtmlGlobalAttributes, g as HtmlImgAttributes, h as HtmlListAttributes, i as HtmlMetaAttributes, j as HtmlTableCellAttributes, J as JSX, k as MjAccordionAttributes, l as MjAccordionElementAttributes, m as MjAccordionTextAttributes, n as MjAccordionTitleAttributes, o as MjAllAttributes, p as MjAttributesAttributes, q as MjBodyAttributes, r as MjBreakpointAttributes, s as MjButtonAttributes, t as MjCarouselAttributes, u as MjCarouselImageAttributes, v as MjClassAttributes, w as MjColumnAttributes, x as MjDividerAttributes, y as MjFontAttributes, z as MjGroupAttributes, B as MjHeadAttributes, E as MjHeroAttributes, G as MjHtmlAttributeAttributes, I as MjHtmlAttributesAttributes, K as MjImageAttributes, L as MjIncludeAttributes, N as MjNavbarAttributes, O as MjNavbarLinkAttributes, P as MjPreviewAttributes, Q as MjRawAttributes, R as MjSectionAttributes, S as MjSelectorAttributes, T as MjSocialAttributes, U as MjSocialElementAttributes, V as MjSpacerAttributes, W as MjStyleAttributes, X as MjTableAttributes, Y as MjTextAttributes, Z as MjTitleAttributes, _ as MjWrapperAttributes, $ as MjmlAttributes, a0 as MjmlChild, a1 as PropsWithChildren, a2 as URLString, a3 as VerticalAlign, a4 as jsx, a5 as jsxs } from './jsx-dev-runtime-CIghYpt3.js';
3
3
 
4
4
  interface RenderOptions {
5
5
  /**
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  isMjmlNode,
4
4
  jsx,
5
5
  jsxs
6
- } from "./chunk-TQQJ4UR4.js";
6
+ } from "./chunk-JZZH5EZ3.js";
7
7
 
8
8
  // src/render.ts
9
9
  import mjml2html from "mjml";
@@ -507,4 +507,4 @@ declare namespace JSX {
507
507
  }
508
508
  }
509
509
 
510
- export { type MjmlAttributes as $, type Align as A, type MjHeadAttributes as B, type CSSPixel as C, type Direction as D, type MjHeroAttributes as E, Fragment as F, type MjHtmlAttributeAttributes as G, type HexColor as H, type MjHtmlAttributesAttributes as I, JSX as J, type MjImageAttributes as K, type MjIncludeAttributes as L, type MjmlNode as M, type MjNavbarAttributes as N, type MjNavbarLinkAttributes as O, type MjPreviewAttributes as P, type MjRawAttributes as Q, type MjSectionAttributes as R, type MjSelectorAttributes as S, type MjSocialAttributes as T, type MjSocialElementAttributes as U, type MjSpacerAttributes as V, type MjStyleAttributes as W, type MjTableAttributes as X, type MjTextAttributes as Y, type MjTitleAttributes as Z, type MjWrapperAttributes as _, type CSSSpacing as a, type MjmlChild as a0, type URLString as a1, type VerticalAlign as a2, jsx as a3, jsxs as a4, type CSSUnit as b, type CSSWidth as c, type Color as d, type HtmlAnchorAttributes as e, type HtmlGlobalAttributes as f, type HtmlImgAttributes as g, type HtmlListAttributes as h, type HtmlMetaAttributes as i, type HtmlTableCellAttributes as j, type MjAccordionAttributes as k, type MjAccordionElementAttributes as l, type MjAccordionTextAttributes as m, type MjAccordionTitleAttributes as n, type MjAllAttributes as o, type MjAttributesAttributes as p, type MjBodyAttributes as q, type MjBreakpointAttributes as r, type MjButtonAttributes as s, type MjCarouselAttributes as t, type MjCarouselImageAttributes as u, type MjClassAttributes as v, type MjColumnAttributes as w, type MjDividerAttributes as x, type MjFontAttributes as y, type MjGroupAttributes as z };
510
+ export { type MjmlAttributes as $, type Align as A, type MjHeadAttributes as B, type CSSPixel as C, type Direction as D, type MjHeroAttributes as E, Fragment as F, type MjHtmlAttributeAttributes as G, type HexColor as H, type MjHtmlAttributesAttributes as I, JSX as J, type MjImageAttributes as K, type MjIncludeAttributes as L, type MjmlNode as M, type MjNavbarAttributes as N, type MjNavbarLinkAttributes as O, type MjPreviewAttributes as P, type MjRawAttributes as Q, type MjSectionAttributes as R, type MjSelectorAttributes as S, type MjSocialAttributes as T, type MjSocialElementAttributes as U, type MjSpacerAttributes as V, type MjStyleAttributes as W, type MjTableAttributes as X, type MjTextAttributes as Y, type MjTitleAttributes as Z, type MjWrapperAttributes as _, type CSSSpacing as a, type MjmlChild as a0, type PropsWithChildren as a1, type URLString as a2, type VerticalAlign as a3, jsx as a4, jsxs as a5, type CSSUnit as b, type CSSWidth as c, type Color as d, type HtmlAnchorAttributes as e, type HtmlGlobalAttributes as f, type HtmlImgAttributes as g, type HtmlListAttributes as h, type HtmlMetaAttributes as i, type HtmlTableCellAttributes as j, type MjAccordionAttributes as k, type MjAccordionElementAttributes as l, type MjAccordionTextAttributes as m, type MjAccordionTitleAttributes as n, type MjAllAttributes as o, type MjAttributesAttributes as p, type MjBodyAttributes as q, type MjBreakpointAttributes as r, type MjButtonAttributes as s, type MjCarouselAttributes as t, type MjCarouselImageAttributes as u, type MjClassAttributes as v, type MjColumnAttributes as w, type MjDividerAttributes as x, type MjFontAttributes as y, type MjGroupAttributes as z };
@@ -507,4 +507,4 @@ declare namespace JSX {
507
507
  }
508
508
  }
509
509
 
510
- export { type MjmlAttributes as $, type Align as A, type MjHeadAttributes as B, type CSSPixel as C, type Direction as D, type MjHeroAttributes as E, Fragment as F, type MjHtmlAttributeAttributes as G, type HexColor as H, type MjHtmlAttributesAttributes as I, JSX as J, type MjImageAttributes as K, type MjIncludeAttributes as L, type MjmlNode as M, type MjNavbarAttributes as N, type MjNavbarLinkAttributes as O, type MjPreviewAttributes as P, type MjRawAttributes as Q, type MjSectionAttributes as R, type MjSelectorAttributes as S, type MjSocialAttributes as T, type MjSocialElementAttributes as U, type MjSpacerAttributes as V, type MjStyleAttributes as W, type MjTableAttributes as X, type MjTextAttributes as Y, type MjTitleAttributes as Z, type MjWrapperAttributes as _, type CSSSpacing as a, type MjmlChild as a0, type URLString as a1, type VerticalAlign as a2, jsx as a3, jsxs as a4, type CSSUnit as b, type CSSWidth as c, type Color as d, type HtmlAnchorAttributes as e, type HtmlGlobalAttributes as f, type HtmlImgAttributes as g, type HtmlListAttributes as h, type HtmlMetaAttributes as i, type HtmlTableCellAttributes as j, type MjAccordionAttributes as k, type MjAccordionElementAttributes as l, type MjAccordionTextAttributes as m, type MjAccordionTitleAttributes as n, type MjAllAttributes as o, type MjAttributesAttributes as p, type MjBodyAttributes as q, type MjBreakpointAttributes as r, type MjButtonAttributes as s, type MjCarouselAttributes as t, type MjCarouselImageAttributes as u, type MjClassAttributes as v, type MjColumnAttributes as w, type MjDividerAttributes as x, type MjFontAttributes as y, type MjGroupAttributes as z };
510
+ export { type MjmlAttributes as $, type Align as A, type MjHeadAttributes as B, type CSSPixel as C, type Direction as D, type MjHeroAttributes as E, Fragment as F, type MjHtmlAttributeAttributes as G, type HexColor as H, type MjHtmlAttributesAttributes as I, JSX as J, type MjImageAttributes as K, type MjIncludeAttributes as L, type MjmlNode as M, type MjNavbarAttributes as N, type MjNavbarLinkAttributes as O, type MjPreviewAttributes as P, type MjRawAttributes as Q, type MjSectionAttributes as R, type MjSelectorAttributes as S, type MjSocialAttributes as T, type MjSocialElementAttributes as U, type MjSpacerAttributes as V, type MjStyleAttributes as W, type MjTableAttributes as X, type MjTextAttributes as Y, type MjTitleAttributes as Z, type MjWrapperAttributes as _, type CSSSpacing as a, type MjmlChild as a0, type PropsWithChildren as a1, type URLString as a2, type VerticalAlign as a3, jsx as a4, jsxs as a5, type CSSUnit as b, type CSSWidth as c, type Color as d, type HtmlAnchorAttributes as e, type HtmlGlobalAttributes as f, type HtmlImgAttributes as g, type HtmlListAttributes as h, type HtmlMetaAttributes as i, type HtmlTableCellAttributes as j, type MjAccordionAttributes as k, type MjAccordionElementAttributes as l, type MjAccordionTextAttributes as m, type MjAccordionTitleAttributes as n, type MjAllAttributes as o, type MjAttributesAttributes as p, type MjBodyAttributes as q, type MjBreakpointAttributes as r, type MjButtonAttributes as s, type MjCarouselAttributes as t, type MjCarouselImageAttributes as u, type MjClassAttributes as v, type MjColumnAttributes as w, type MjDividerAttributes as x, type MjFontAttributes as y, type MjGroupAttributes as z };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/jsx-dev-runtime.ts","../src/ast.ts","../src/jsx-runtime.ts"],"sourcesContent":["export { Fragment, jsx, jsx as jsxDEV, jsxs, type JSX } from './jsx-runtime';\n","export const MJML_NODE_TYPE = Symbol.for('mjmx.node');\n\nexport const Fragment = Symbol.for('mjmx.fragment');\n\nexport interface MjmlNode {\n readonly $$typeof: typeof MJML_NODE_TYPE;\n readonly tag: string | typeof Fragment;\n readonly attributes: Record<string, string | undefined>;\n readonly children: MjmlChild[];\n}\n\nexport type MjmlChild =\n | MjmlNode\n | string\n | number\n | boolean\n | null\n | undefined\n | MjmlChild[];\n\nexport function isMjmlNode(value: unknown): value is MjmlNode {\n return (\n typeof value === 'object' &&\n value !== null &&\n '$$typeof' in value &&\n value.$$typeof === MJML_NODE_TYPE\n );\n}\n\nexport function createNode(\n tag: string | typeof Fragment,\n attributes: Record<string, unknown>,\n children: MjmlChild[]\n): MjmlNode {\n const stringAttributes: Record<string, string | undefined> = {};\n\n for (const [key, value] of Object.entries(attributes)) {\n if (value === undefined || value === null) {\n continue;\n }\n if (value instanceof URL) {\n stringAttributes[key] = value.toString();\n } else {\n stringAttributes[key] = String(value);\n }\n }\n\n return {\n $$typeof: MJML_NODE_TYPE,\n tag,\n attributes: stringAttributes,\n children,\n };\n}\n","import { createNode, Fragment, type MjmlChild, type MjmlNode } from './ast';\nimport type {\n HtmlAnchorAttributes,\n HtmlGlobalAttributes,\n HtmlImgAttributes,\n HtmlListAttributes,\n HtmlMetaAttributes,\n HtmlTableCellAttributes,\n} from './html-types';\nimport type {\n MjAccordionAttributes,\n MjAccordionElementAttributes,\n MjAccordionTextAttributes,\n MjAccordionTitleAttributes,\n MjAllAttributes,\n MjAttributesAttributes,\n MjBodyAttributes,\n MjBreakpointAttributes,\n MjButtonAttributes,\n MjCarouselAttributes,\n MjCarouselImageAttributes,\n MjClassAttributes,\n MjColumnAttributes,\n MjDividerAttributes,\n MjFontAttributes,\n MjGroupAttributes,\n MjHeadAttributes,\n MjHeroAttributes,\n MjHtmlAttributeAttributes,\n MjHtmlAttributesAttributes,\n MjImageAttributes,\n MjIncludeAttributes,\n MjmlAttributes,\n MjNavbarAttributes,\n MjNavbarLinkAttributes,\n MjPreviewAttributes,\n MjRawAttributes,\n MjSectionAttributes,\n MjSelectorAttributes,\n MjSocialAttributes,\n MjSocialElementAttributes,\n MjSpacerAttributes,\n MjStyleAttributes,\n MjTableAttributes,\n MjTextAttributes,\n MjTitleAttributes,\n MjWrapperAttributes,\n} from './types';\n\nexport { Fragment };\n\ntype PropsWithChildren<T = object> = T & { children?: MjmlChild };\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Component = (props: any) => MjmlNode;\n\nexport function jsx(\n tag: string | typeof Fragment | Component,\n props: Record<string, unknown>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _key?: string\n): MjmlNode {\n if (typeof tag === 'function') {\n return tag(props);\n }\n\n const { children, ...attributes } = props;\n\n const childArray: MjmlChild[] =\n children === undefined\n ? []\n : Array.isArray(children)\n ? children\n : [children as MjmlChild];\n\n return createNode(tag, attributes, childArray);\n}\n\nexport const jsxs = jsx;\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace JSX {\n export type Element = MjmlNode;\n export type ElementType = string | typeof Fragment | Component;\n\n export interface ElementChildrenAttribute {\n children: MjmlChild;\n }\n\n export interface IntrinsicElements {\n mjml: PropsWithChildren<MjmlAttributes>;\n 'mj-head': PropsWithChildren<MjHeadAttributes>;\n 'mj-body': PropsWithChildren<MjBodyAttributes>;\n 'mj-attributes': PropsWithChildren<MjAttributesAttributes>;\n 'mj-breakpoint': MjBreakpointAttributes;\n 'mj-font': MjFontAttributes;\n 'mj-html-attributes': PropsWithChildren<MjHtmlAttributesAttributes>;\n 'mj-preview': PropsWithChildren<MjPreviewAttributes>;\n 'mj-style': PropsWithChildren<MjStyleAttributes>;\n 'mj-title': PropsWithChildren<MjTitleAttributes>;\n 'mj-all': MjAllAttributes;\n 'mj-class': MjClassAttributes;\n 'mj-section': PropsWithChildren<MjSectionAttributes>;\n 'mj-column': PropsWithChildren<MjColumnAttributes>;\n 'mj-group': PropsWithChildren<MjGroupAttributes>;\n 'mj-wrapper': PropsWithChildren<MjWrapperAttributes>;\n 'mj-text': PropsWithChildren<MjTextAttributes>;\n 'mj-button': PropsWithChildren<MjButtonAttributes>;\n 'mj-image': MjImageAttributes;\n 'mj-divider': MjDividerAttributes;\n 'mj-spacer': MjSpacerAttributes;\n 'mj-table': PropsWithChildren<MjTableAttributes>;\n 'mj-raw': PropsWithChildren<MjRawAttributes>;\n 'mj-hero': PropsWithChildren<MjHeroAttributes>;\n 'mj-accordion': PropsWithChildren<MjAccordionAttributes>;\n 'mj-accordion-element': PropsWithChildren<MjAccordionElementAttributes>;\n 'mj-accordion-title': PropsWithChildren<MjAccordionTitleAttributes>;\n 'mj-accordion-text': PropsWithChildren<MjAccordionTextAttributes>;\n 'mj-carousel': PropsWithChildren<MjCarouselAttributes>;\n 'mj-carousel-image': MjCarouselImageAttributes;\n 'mj-navbar': PropsWithChildren<MjNavbarAttributes>;\n 'mj-navbar-link': PropsWithChildren<MjNavbarLinkAttributes>;\n 'mj-social': PropsWithChildren<MjSocialAttributes>;\n 'mj-social-element': PropsWithChildren<MjSocialElementAttributes>;\n 'mj-include': MjIncludeAttributes;\n 'mj-selector': PropsWithChildren<MjSelectorAttributes>;\n 'mj-html-attribute': PropsWithChildren<MjHtmlAttributeAttributes>;\n\n // HTML inline text elements (for mj-text)\n a: PropsWithChildren<HtmlAnchorAttributes>;\n span: PropsWithChildren<HtmlGlobalAttributes>;\n strong: PropsWithChildren<HtmlGlobalAttributes>;\n b: PropsWithChildren<HtmlGlobalAttributes>;\n em: PropsWithChildren<HtmlGlobalAttributes>;\n i: PropsWithChildren<HtmlGlobalAttributes>;\n u: PropsWithChildren<HtmlGlobalAttributes>;\n s: PropsWithChildren<HtmlGlobalAttributes>;\n small: PropsWithChildren<HtmlGlobalAttributes>;\n code: PropsWithChildren<HtmlGlobalAttributes>;\n sub: PropsWithChildren<HtmlGlobalAttributes>;\n sup: PropsWithChildren<HtmlGlobalAttributes>;\n br: HtmlGlobalAttributes;\n\n // HTML block text elements (for mj-text)\n div: PropsWithChildren<HtmlGlobalAttributes>;\n p: PropsWithChildren<HtmlGlobalAttributes>;\n h1: PropsWithChildren<HtmlGlobalAttributes>;\n h2: PropsWithChildren<HtmlGlobalAttributes>;\n h3: PropsWithChildren<HtmlGlobalAttributes>;\n h4: PropsWithChildren<HtmlGlobalAttributes>;\n h5: PropsWithChildren<HtmlGlobalAttributes>;\n h6: PropsWithChildren<HtmlGlobalAttributes>;\n ul: PropsWithChildren<HtmlListAttributes>;\n ol: PropsWithChildren<HtmlListAttributes>;\n li: PropsWithChildren<HtmlGlobalAttributes>;\n blockquote: PropsWithChildren<HtmlGlobalAttributes>;\n pre: PropsWithChildren<HtmlGlobalAttributes>;\n hr: HtmlGlobalAttributes;\n\n // HTML table elements (for mj-table - use mj-table instead of <table>)\n tr: PropsWithChildren<HtmlGlobalAttributes>;\n td: PropsWithChildren<HtmlTableCellAttributes>;\n th: PropsWithChildren<HtmlTableCellAttributes>;\n thead: PropsWithChildren<HtmlGlobalAttributes>;\n tbody: PropsWithChildren<HtmlGlobalAttributes>;\n\n // HTML media elements (for mj-table - mj-image can't be used inside mj-table)\n img: HtmlImgAttributes;\n\n // HTML head elements (for mj-raw in mj-head - dark mode support)\n meta: HtmlMetaAttributes;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,iBAAiB,uBAAO,IAAI,WAAW;AAE7C,IAAM,WAAW,uBAAO,IAAI,eAAe;AA2B3C,SAAS,WACd,KACA,YACA,UACU;AACV,QAAM,mBAAuD,CAAC;AAE9D,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,UAAU,GAAG;AACrD,QAAI,UAAU,UAAa,UAAU,MAAM;AACzC;AAAA,IACF;AACA,QAAI,iBAAiB,KAAK;AACxB,uBAAiB,GAAG,IAAI,MAAM,SAAS;AAAA,IACzC,OAAO;AACL,uBAAiB,GAAG,IAAI,OAAO,KAAK;AAAA,IACtC;AAAA,EACF;AAEA,SAAO;AAAA,IACL,UAAU;AAAA,IACV;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,EACF;AACF;;;ACGO,SAAS,IACd,KACA,OAEA,MACU;AACV,MAAI,OAAO,QAAQ,YAAY;AAC7B,WAAO,IAAI,KAAK;AAAA,EAClB;AAEA,QAAM,EAAE,UAAU,GAAG,WAAW,IAAI;AAEpC,QAAM,aACJ,aAAa,SACT,CAAC,IACD,MAAM,QAAQ,QAAQ,IACpB,WACA,CAAC,QAAqB;AAE9B,SAAO,WAAW,KAAK,YAAY,UAAU;AAC/C;AAEO,IAAM,OAAO;","names":[]}
1
+ {"version":3,"sources":["../src/jsx-dev-runtime.ts","../src/ast.ts","../src/jsx-runtime.ts"],"sourcesContent":["export { Fragment, jsx, jsx as jsxDEV, jsxs, type JSX } from './jsx-runtime';\n","export const MJML_NODE_TYPE = Symbol.for('mjmx.node');\n\nexport const Fragment = Symbol.for('mjmx.fragment');\n\nexport interface MjmlNode {\n readonly $$typeof: typeof MJML_NODE_TYPE;\n readonly tag: string | typeof Fragment;\n readonly attributes: Record<string, string | undefined>;\n readonly children: MjmlChild[];\n}\n\nexport type MjmlChild =\n | MjmlNode\n | string\n | number\n | boolean\n | null\n | undefined\n | MjmlChild[];\n\nexport function isMjmlNode(value: unknown): value is MjmlNode {\n return (\n typeof value === 'object' &&\n value !== null &&\n '$$typeof' in value &&\n value.$$typeof === MJML_NODE_TYPE\n );\n}\n\nexport function createNode(\n tag: string | typeof Fragment,\n attributes: Record<string, unknown>,\n children: MjmlChild[]\n): MjmlNode {\n const stringAttributes: Record<string, string | undefined> = {};\n\n for (const [key, value] of Object.entries(attributes)) {\n if (value === undefined || value === null) {\n continue;\n }\n if (value instanceof URL) {\n stringAttributes[key] = value.toString();\n } else {\n stringAttributes[key] = String(value);\n }\n }\n\n return {\n $$typeof: MJML_NODE_TYPE,\n tag,\n attributes: stringAttributes,\n children,\n };\n}\n","import { createNode, Fragment, type MjmlChild, type MjmlNode } from './ast';\nimport type {\n HtmlAnchorAttributes,\n HtmlGlobalAttributes,\n HtmlImgAttributes,\n HtmlListAttributes,\n HtmlMetaAttributes,\n HtmlTableCellAttributes,\n} from './html-types';\nimport type {\n MjAccordionAttributes,\n MjAccordionElementAttributes,\n MjAccordionTextAttributes,\n MjAccordionTitleAttributes,\n MjAllAttributes,\n MjAttributesAttributes,\n MjBodyAttributes,\n MjBreakpointAttributes,\n MjButtonAttributes,\n MjCarouselAttributes,\n MjCarouselImageAttributes,\n MjClassAttributes,\n MjColumnAttributes,\n MjDividerAttributes,\n MjFontAttributes,\n MjGroupAttributes,\n MjHeadAttributes,\n MjHeroAttributes,\n MjHtmlAttributeAttributes,\n MjHtmlAttributesAttributes,\n MjImageAttributes,\n MjIncludeAttributes,\n MjmlAttributes,\n MjNavbarAttributes,\n MjNavbarLinkAttributes,\n MjPreviewAttributes,\n MjRawAttributes,\n MjSectionAttributes,\n MjSelectorAttributes,\n MjSocialAttributes,\n MjSocialElementAttributes,\n MjSpacerAttributes,\n MjStyleAttributes,\n MjTableAttributes,\n MjTextAttributes,\n MjTitleAttributes,\n MjWrapperAttributes,\n} from './types';\n\nexport { Fragment };\n\nexport type PropsWithChildren<T = object> = T & { children?: MjmlChild };\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Component = (props: any) => MjmlNode;\n\nexport function jsx(\n tag: string | typeof Fragment | Component,\n props: Record<string, unknown>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _key?: string\n): MjmlNode {\n if (typeof tag === 'function') {\n return tag(props);\n }\n\n const { children, ...attributes } = props;\n\n const childArray: MjmlChild[] =\n children === undefined\n ? []\n : Array.isArray(children)\n ? children\n : [children as MjmlChild];\n\n return createNode(tag, attributes, childArray);\n}\n\nexport const jsxs = jsx;\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace JSX {\n export type Element = MjmlNode;\n export type ElementType = string | typeof Fragment | Component;\n\n export interface ElementChildrenAttribute {\n children: MjmlChild;\n }\n\n export interface IntrinsicElements {\n mjml: PropsWithChildren<MjmlAttributes>;\n 'mj-head': PropsWithChildren<MjHeadAttributes>;\n 'mj-body': PropsWithChildren<MjBodyAttributes>;\n 'mj-attributes': PropsWithChildren<MjAttributesAttributes>;\n 'mj-breakpoint': MjBreakpointAttributes;\n 'mj-font': MjFontAttributes;\n 'mj-html-attributes': PropsWithChildren<MjHtmlAttributesAttributes>;\n 'mj-preview': PropsWithChildren<MjPreviewAttributes>;\n 'mj-style': PropsWithChildren<MjStyleAttributes>;\n 'mj-title': PropsWithChildren<MjTitleAttributes>;\n 'mj-all': MjAllAttributes;\n 'mj-class': MjClassAttributes;\n 'mj-section': PropsWithChildren<MjSectionAttributes>;\n 'mj-column': PropsWithChildren<MjColumnAttributes>;\n 'mj-group': PropsWithChildren<MjGroupAttributes>;\n 'mj-wrapper': PropsWithChildren<MjWrapperAttributes>;\n 'mj-text': PropsWithChildren<MjTextAttributes>;\n 'mj-button': PropsWithChildren<MjButtonAttributes>;\n 'mj-image': MjImageAttributes;\n 'mj-divider': MjDividerAttributes;\n 'mj-spacer': MjSpacerAttributes;\n 'mj-table': PropsWithChildren<MjTableAttributes>;\n 'mj-raw': PropsWithChildren<MjRawAttributes>;\n 'mj-hero': PropsWithChildren<MjHeroAttributes>;\n 'mj-accordion': PropsWithChildren<MjAccordionAttributes>;\n 'mj-accordion-element': PropsWithChildren<MjAccordionElementAttributes>;\n 'mj-accordion-title': PropsWithChildren<MjAccordionTitleAttributes>;\n 'mj-accordion-text': PropsWithChildren<MjAccordionTextAttributes>;\n 'mj-carousel': PropsWithChildren<MjCarouselAttributes>;\n 'mj-carousel-image': MjCarouselImageAttributes;\n 'mj-navbar': PropsWithChildren<MjNavbarAttributes>;\n 'mj-navbar-link': PropsWithChildren<MjNavbarLinkAttributes>;\n 'mj-social': PropsWithChildren<MjSocialAttributes>;\n 'mj-social-element': PropsWithChildren<MjSocialElementAttributes>;\n 'mj-include': MjIncludeAttributes;\n 'mj-selector': PropsWithChildren<MjSelectorAttributes>;\n 'mj-html-attribute': PropsWithChildren<MjHtmlAttributeAttributes>;\n\n // HTML inline text elements (for mj-text)\n a: PropsWithChildren<HtmlAnchorAttributes>;\n span: PropsWithChildren<HtmlGlobalAttributes>;\n strong: PropsWithChildren<HtmlGlobalAttributes>;\n b: PropsWithChildren<HtmlGlobalAttributes>;\n em: PropsWithChildren<HtmlGlobalAttributes>;\n i: PropsWithChildren<HtmlGlobalAttributes>;\n u: PropsWithChildren<HtmlGlobalAttributes>;\n s: PropsWithChildren<HtmlGlobalAttributes>;\n small: PropsWithChildren<HtmlGlobalAttributes>;\n code: PropsWithChildren<HtmlGlobalAttributes>;\n sub: PropsWithChildren<HtmlGlobalAttributes>;\n sup: PropsWithChildren<HtmlGlobalAttributes>;\n br: HtmlGlobalAttributes;\n\n // HTML block text elements (for mj-text)\n div: PropsWithChildren<HtmlGlobalAttributes>;\n p: PropsWithChildren<HtmlGlobalAttributes>;\n h1: PropsWithChildren<HtmlGlobalAttributes>;\n h2: PropsWithChildren<HtmlGlobalAttributes>;\n h3: PropsWithChildren<HtmlGlobalAttributes>;\n h4: PropsWithChildren<HtmlGlobalAttributes>;\n h5: PropsWithChildren<HtmlGlobalAttributes>;\n h6: PropsWithChildren<HtmlGlobalAttributes>;\n ul: PropsWithChildren<HtmlListAttributes>;\n ol: PropsWithChildren<HtmlListAttributes>;\n li: PropsWithChildren<HtmlGlobalAttributes>;\n blockquote: PropsWithChildren<HtmlGlobalAttributes>;\n pre: PropsWithChildren<HtmlGlobalAttributes>;\n hr: HtmlGlobalAttributes;\n\n // HTML table elements (for mj-table - use mj-table instead of <table>)\n tr: PropsWithChildren<HtmlGlobalAttributes>;\n td: PropsWithChildren<HtmlTableCellAttributes>;\n th: PropsWithChildren<HtmlTableCellAttributes>;\n thead: PropsWithChildren<HtmlGlobalAttributes>;\n tbody: PropsWithChildren<HtmlGlobalAttributes>;\n\n // HTML media elements (for mj-table - mj-image can't be used inside mj-table)\n img: HtmlImgAttributes;\n\n // HTML head elements (for mj-raw in mj-head - dark mode support)\n meta: HtmlMetaAttributes;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,iBAAiB,uBAAO,IAAI,WAAW;AAE7C,IAAM,WAAW,uBAAO,IAAI,eAAe;AA2B3C,SAAS,WACd,KACA,YACA,UACU;AACV,QAAM,mBAAuD,CAAC;AAE9D,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,UAAU,GAAG;AACrD,QAAI,UAAU,UAAa,UAAU,MAAM;AACzC;AAAA,IACF;AACA,QAAI,iBAAiB,KAAK;AACxB,uBAAiB,GAAG,IAAI,MAAM,SAAS;AAAA,IACzC,OAAO;AACL,uBAAiB,GAAG,IAAI,OAAO,KAAK;AAAA,IACtC;AAAA,EACF;AAEA,SAAO;AAAA,IACL,UAAU;AAAA,IACV;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,EACF;AACF;;;ACGO,SAAS,IACd,KACA,OAEA,MACU;AACV,MAAI,OAAO,QAAQ,YAAY;AAC7B,WAAO,IAAI,KAAK;AAAA,EAClB;AAEA,QAAM,EAAE,UAAU,GAAG,WAAW,IAAI;AAEpC,QAAM,aACJ,aAAa,SACT,CAAC,IACD,MAAM,QAAQ,QAAQ,IACpB,WACA,CAAC,QAAqB;AAE9B,SAAO,WAAW,KAAK,YAAY,UAAU;AAC/C;AAEO,IAAM,OAAO;","names":[]}
@@ -1 +1 @@
1
- export { F as Fragment, J as JSX, a3 as jsx, a3 as jsxDEV, a4 as jsxs } from './jsx-dev-runtime-DeeKpFUQ.cjs';
1
+ export { F as Fragment, J as JSX, a4 as jsx, a4 as jsxDEV, a5 as jsxs } from './jsx-dev-runtime-CIghYpt3.cjs';
@@ -1 +1 @@
1
- export { F as Fragment, J as JSX, a3 as jsx, a3 as jsxDEV, a4 as jsxs } from './jsx-dev-runtime-DeeKpFUQ.js';
1
+ export { F as Fragment, J as JSX, a4 as jsx, a4 as jsxDEV, a5 as jsxs } from './jsx-dev-runtime-CIghYpt3.js';
@@ -2,7 +2,7 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-TQQJ4UR4.js";
5
+ } from "./chunk-JZZH5EZ3.js";
6
6
  export {
7
7
  Fragment,
8
8
  jsx,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/jsx-runtime.ts","../src/ast.ts"],"sourcesContent":["import { createNode, Fragment, type MjmlChild, type MjmlNode } from './ast';\nimport type {\n HtmlAnchorAttributes,\n HtmlGlobalAttributes,\n HtmlImgAttributes,\n HtmlListAttributes,\n HtmlMetaAttributes,\n HtmlTableCellAttributes,\n} from './html-types';\nimport type {\n MjAccordionAttributes,\n MjAccordionElementAttributes,\n MjAccordionTextAttributes,\n MjAccordionTitleAttributes,\n MjAllAttributes,\n MjAttributesAttributes,\n MjBodyAttributes,\n MjBreakpointAttributes,\n MjButtonAttributes,\n MjCarouselAttributes,\n MjCarouselImageAttributes,\n MjClassAttributes,\n MjColumnAttributes,\n MjDividerAttributes,\n MjFontAttributes,\n MjGroupAttributes,\n MjHeadAttributes,\n MjHeroAttributes,\n MjHtmlAttributeAttributes,\n MjHtmlAttributesAttributes,\n MjImageAttributes,\n MjIncludeAttributes,\n MjmlAttributes,\n MjNavbarAttributes,\n MjNavbarLinkAttributes,\n MjPreviewAttributes,\n MjRawAttributes,\n MjSectionAttributes,\n MjSelectorAttributes,\n MjSocialAttributes,\n MjSocialElementAttributes,\n MjSpacerAttributes,\n MjStyleAttributes,\n MjTableAttributes,\n MjTextAttributes,\n MjTitleAttributes,\n MjWrapperAttributes,\n} from './types';\n\nexport { Fragment };\n\ntype PropsWithChildren<T = object> = T & { children?: MjmlChild };\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Component = (props: any) => MjmlNode;\n\nexport function jsx(\n tag: string | typeof Fragment | Component,\n props: Record<string, unknown>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _key?: string\n): MjmlNode {\n if (typeof tag === 'function') {\n return tag(props);\n }\n\n const { children, ...attributes } = props;\n\n const childArray: MjmlChild[] =\n children === undefined\n ? []\n : Array.isArray(children)\n ? children\n : [children as MjmlChild];\n\n return createNode(tag, attributes, childArray);\n}\n\nexport const jsxs = jsx;\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace JSX {\n export type Element = MjmlNode;\n export type ElementType = string | typeof Fragment | Component;\n\n export interface ElementChildrenAttribute {\n children: MjmlChild;\n }\n\n export interface IntrinsicElements {\n mjml: PropsWithChildren<MjmlAttributes>;\n 'mj-head': PropsWithChildren<MjHeadAttributes>;\n 'mj-body': PropsWithChildren<MjBodyAttributes>;\n 'mj-attributes': PropsWithChildren<MjAttributesAttributes>;\n 'mj-breakpoint': MjBreakpointAttributes;\n 'mj-font': MjFontAttributes;\n 'mj-html-attributes': PropsWithChildren<MjHtmlAttributesAttributes>;\n 'mj-preview': PropsWithChildren<MjPreviewAttributes>;\n 'mj-style': PropsWithChildren<MjStyleAttributes>;\n 'mj-title': PropsWithChildren<MjTitleAttributes>;\n 'mj-all': MjAllAttributes;\n 'mj-class': MjClassAttributes;\n 'mj-section': PropsWithChildren<MjSectionAttributes>;\n 'mj-column': PropsWithChildren<MjColumnAttributes>;\n 'mj-group': PropsWithChildren<MjGroupAttributes>;\n 'mj-wrapper': PropsWithChildren<MjWrapperAttributes>;\n 'mj-text': PropsWithChildren<MjTextAttributes>;\n 'mj-button': PropsWithChildren<MjButtonAttributes>;\n 'mj-image': MjImageAttributes;\n 'mj-divider': MjDividerAttributes;\n 'mj-spacer': MjSpacerAttributes;\n 'mj-table': PropsWithChildren<MjTableAttributes>;\n 'mj-raw': PropsWithChildren<MjRawAttributes>;\n 'mj-hero': PropsWithChildren<MjHeroAttributes>;\n 'mj-accordion': PropsWithChildren<MjAccordionAttributes>;\n 'mj-accordion-element': PropsWithChildren<MjAccordionElementAttributes>;\n 'mj-accordion-title': PropsWithChildren<MjAccordionTitleAttributes>;\n 'mj-accordion-text': PropsWithChildren<MjAccordionTextAttributes>;\n 'mj-carousel': PropsWithChildren<MjCarouselAttributes>;\n 'mj-carousel-image': MjCarouselImageAttributes;\n 'mj-navbar': PropsWithChildren<MjNavbarAttributes>;\n 'mj-navbar-link': PropsWithChildren<MjNavbarLinkAttributes>;\n 'mj-social': PropsWithChildren<MjSocialAttributes>;\n 'mj-social-element': PropsWithChildren<MjSocialElementAttributes>;\n 'mj-include': MjIncludeAttributes;\n 'mj-selector': PropsWithChildren<MjSelectorAttributes>;\n 'mj-html-attribute': PropsWithChildren<MjHtmlAttributeAttributes>;\n\n // HTML inline text elements (for mj-text)\n a: PropsWithChildren<HtmlAnchorAttributes>;\n span: PropsWithChildren<HtmlGlobalAttributes>;\n strong: PropsWithChildren<HtmlGlobalAttributes>;\n b: PropsWithChildren<HtmlGlobalAttributes>;\n em: PropsWithChildren<HtmlGlobalAttributes>;\n i: PropsWithChildren<HtmlGlobalAttributes>;\n u: PropsWithChildren<HtmlGlobalAttributes>;\n s: PropsWithChildren<HtmlGlobalAttributes>;\n small: PropsWithChildren<HtmlGlobalAttributes>;\n code: PropsWithChildren<HtmlGlobalAttributes>;\n sub: PropsWithChildren<HtmlGlobalAttributes>;\n sup: PropsWithChildren<HtmlGlobalAttributes>;\n br: HtmlGlobalAttributes;\n\n // HTML block text elements (for mj-text)\n div: PropsWithChildren<HtmlGlobalAttributes>;\n p: PropsWithChildren<HtmlGlobalAttributes>;\n h1: PropsWithChildren<HtmlGlobalAttributes>;\n h2: PropsWithChildren<HtmlGlobalAttributes>;\n h3: PropsWithChildren<HtmlGlobalAttributes>;\n h4: PropsWithChildren<HtmlGlobalAttributes>;\n h5: PropsWithChildren<HtmlGlobalAttributes>;\n h6: PropsWithChildren<HtmlGlobalAttributes>;\n ul: PropsWithChildren<HtmlListAttributes>;\n ol: PropsWithChildren<HtmlListAttributes>;\n li: PropsWithChildren<HtmlGlobalAttributes>;\n blockquote: PropsWithChildren<HtmlGlobalAttributes>;\n pre: PropsWithChildren<HtmlGlobalAttributes>;\n hr: HtmlGlobalAttributes;\n\n // HTML table elements (for mj-table - use mj-table instead of <table>)\n tr: PropsWithChildren<HtmlGlobalAttributes>;\n td: PropsWithChildren<HtmlTableCellAttributes>;\n th: PropsWithChildren<HtmlTableCellAttributes>;\n thead: PropsWithChildren<HtmlGlobalAttributes>;\n tbody: PropsWithChildren<HtmlGlobalAttributes>;\n\n // HTML media elements (for mj-table - mj-image can't be used inside mj-table)\n img: HtmlImgAttributes;\n\n // HTML head elements (for mj-raw in mj-head - dark mode support)\n meta: HtmlMetaAttributes;\n }\n}\n","export const MJML_NODE_TYPE = Symbol.for('mjmx.node');\n\nexport const Fragment = Symbol.for('mjmx.fragment');\n\nexport interface MjmlNode {\n readonly $$typeof: typeof MJML_NODE_TYPE;\n readonly tag: string | typeof Fragment;\n readonly attributes: Record<string, string | undefined>;\n readonly children: MjmlChild[];\n}\n\nexport type MjmlChild =\n | MjmlNode\n | string\n | number\n | boolean\n | null\n | undefined\n | MjmlChild[];\n\nexport function isMjmlNode(value: unknown): value is MjmlNode {\n return (\n typeof value === 'object' &&\n value !== null &&\n '$$typeof' in value &&\n value.$$typeof === MJML_NODE_TYPE\n );\n}\n\nexport function createNode(\n tag: string | typeof Fragment,\n attributes: Record<string, unknown>,\n children: MjmlChild[]\n): MjmlNode {\n const stringAttributes: Record<string, string | undefined> = {};\n\n for (const [key, value] of Object.entries(attributes)) {\n if (value === undefined || value === null) {\n continue;\n }\n if (value instanceof URL) {\n stringAttributes[key] = value.toString();\n } else {\n stringAttributes[key] = String(value);\n }\n }\n\n return {\n $$typeof: MJML_NODE_TYPE,\n tag,\n attributes: stringAttributes,\n children,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,iBAAiB,uBAAO,IAAI,WAAW;AAE7C,IAAM,WAAW,uBAAO,IAAI,eAAe;AA2B3C,SAAS,WACd,KACA,YACA,UACU;AACV,QAAM,mBAAuD,CAAC;AAE9D,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,UAAU,GAAG;AACrD,QAAI,UAAU,UAAa,UAAU,MAAM;AACzC;AAAA,IACF;AACA,QAAI,iBAAiB,KAAK;AACxB,uBAAiB,GAAG,IAAI,MAAM,SAAS;AAAA,IACzC,OAAO;AACL,uBAAiB,GAAG,IAAI,OAAO,KAAK;AAAA,IACtC;AAAA,EACF;AAEA,SAAO;AAAA,IACL,UAAU;AAAA,IACV;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,EACF;AACF;;;ADGO,SAAS,IACd,KACA,OAEA,MACU;AACV,MAAI,OAAO,QAAQ,YAAY;AAC7B,WAAO,IAAI,KAAK;AAAA,EAClB;AAEA,QAAM,EAAE,UAAU,GAAG,WAAW,IAAI;AAEpC,QAAM,aACJ,aAAa,SACT,CAAC,IACD,MAAM,QAAQ,QAAQ,IACpB,WACA,CAAC,QAAqB;AAE9B,SAAO,WAAW,KAAK,YAAY,UAAU;AAC/C;AAEO,IAAM,OAAO;","names":[]}
1
+ {"version":3,"sources":["../src/jsx-runtime.ts","../src/ast.ts"],"sourcesContent":["import { createNode, Fragment, type MjmlChild, type MjmlNode } from './ast';\nimport type {\n HtmlAnchorAttributes,\n HtmlGlobalAttributes,\n HtmlImgAttributes,\n HtmlListAttributes,\n HtmlMetaAttributes,\n HtmlTableCellAttributes,\n} from './html-types';\nimport type {\n MjAccordionAttributes,\n MjAccordionElementAttributes,\n MjAccordionTextAttributes,\n MjAccordionTitleAttributes,\n MjAllAttributes,\n MjAttributesAttributes,\n MjBodyAttributes,\n MjBreakpointAttributes,\n MjButtonAttributes,\n MjCarouselAttributes,\n MjCarouselImageAttributes,\n MjClassAttributes,\n MjColumnAttributes,\n MjDividerAttributes,\n MjFontAttributes,\n MjGroupAttributes,\n MjHeadAttributes,\n MjHeroAttributes,\n MjHtmlAttributeAttributes,\n MjHtmlAttributesAttributes,\n MjImageAttributes,\n MjIncludeAttributes,\n MjmlAttributes,\n MjNavbarAttributes,\n MjNavbarLinkAttributes,\n MjPreviewAttributes,\n MjRawAttributes,\n MjSectionAttributes,\n MjSelectorAttributes,\n MjSocialAttributes,\n MjSocialElementAttributes,\n MjSpacerAttributes,\n MjStyleAttributes,\n MjTableAttributes,\n MjTextAttributes,\n MjTitleAttributes,\n MjWrapperAttributes,\n} from './types';\n\nexport { Fragment };\n\nexport type PropsWithChildren<T = object> = T & { children?: MjmlChild };\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Component = (props: any) => MjmlNode;\n\nexport function jsx(\n tag: string | typeof Fragment | Component,\n props: Record<string, unknown>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _key?: string\n): MjmlNode {\n if (typeof tag === 'function') {\n return tag(props);\n }\n\n const { children, ...attributes } = props;\n\n const childArray: MjmlChild[] =\n children === undefined\n ? []\n : Array.isArray(children)\n ? children\n : [children as MjmlChild];\n\n return createNode(tag, attributes, childArray);\n}\n\nexport const jsxs = jsx;\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace JSX {\n export type Element = MjmlNode;\n export type ElementType = string | typeof Fragment | Component;\n\n export interface ElementChildrenAttribute {\n children: MjmlChild;\n }\n\n export interface IntrinsicElements {\n mjml: PropsWithChildren<MjmlAttributes>;\n 'mj-head': PropsWithChildren<MjHeadAttributes>;\n 'mj-body': PropsWithChildren<MjBodyAttributes>;\n 'mj-attributes': PropsWithChildren<MjAttributesAttributes>;\n 'mj-breakpoint': MjBreakpointAttributes;\n 'mj-font': MjFontAttributes;\n 'mj-html-attributes': PropsWithChildren<MjHtmlAttributesAttributes>;\n 'mj-preview': PropsWithChildren<MjPreviewAttributes>;\n 'mj-style': PropsWithChildren<MjStyleAttributes>;\n 'mj-title': PropsWithChildren<MjTitleAttributes>;\n 'mj-all': MjAllAttributes;\n 'mj-class': MjClassAttributes;\n 'mj-section': PropsWithChildren<MjSectionAttributes>;\n 'mj-column': PropsWithChildren<MjColumnAttributes>;\n 'mj-group': PropsWithChildren<MjGroupAttributes>;\n 'mj-wrapper': PropsWithChildren<MjWrapperAttributes>;\n 'mj-text': PropsWithChildren<MjTextAttributes>;\n 'mj-button': PropsWithChildren<MjButtonAttributes>;\n 'mj-image': MjImageAttributes;\n 'mj-divider': MjDividerAttributes;\n 'mj-spacer': MjSpacerAttributes;\n 'mj-table': PropsWithChildren<MjTableAttributes>;\n 'mj-raw': PropsWithChildren<MjRawAttributes>;\n 'mj-hero': PropsWithChildren<MjHeroAttributes>;\n 'mj-accordion': PropsWithChildren<MjAccordionAttributes>;\n 'mj-accordion-element': PropsWithChildren<MjAccordionElementAttributes>;\n 'mj-accordion-title': PropsWithChildren<MjAccordionTitleAttributes>;\n 'mj-accordion-text': PropsWithChildren<MjAccordionTextAttributes>;\n 'mj-carousel': PropsWithChildren<MjCarouselAttributes>;\n 'mj-carousel-image': MjCarouselImageAttributes;\n 'mj-navbar': PropsWithChildren<MjNavbarAttributes>;\n 'mj-navbar-link': PropsWithChildren<MjNavbarLinkAttributes>;\n 'mj-social': PropsWithChildren<MjSocialAttributes>;\n 'mj-social-element': PropsWithChildren<MjSocialElementAttributes>;\n 'mj-include': MjIncludeAttributes;\n 'mj-selector': PropsWithChildren<MjSelectorAttributes>;\n 'mj-html-attribute': PropsWithChildren<MjHtmlAttributeAttributes>;\n\n // HTML inline text elements (for mj-text)\n a: PropsWithChildren<HtmlAnchorAttributes>;\n span: PropsWithChildren<HtmlGlobalAttributes>;\n strong: PropsWithChildren<HtmlGlobalAttributes>;\n b: PropsWithChildren<HtmlGlobalAttributes>;\n em: PropsWithChildren<HtmlGlobalAttributes>;\n i: PropsWithChildren<HtmlGlobalAttributes>;\n u: PropsWithChildren<HtmlGlobalAttributes>;\n s: PropsWithChildren<HtmlGlobalAttributes>;\n small: PropsWithChildren<HtmlGlobalAttributes>;\n code: PropsWithChildren<HtmlGlobalAttributes>;\n sub: PropsWithChildren<HtmlGlobalAttributes>;\n sup: PropsWithChildren<HtmlGlobalAttributes>;\n br: HtmlGlobalAttributes;\n\n // HTML block text elements (for mj-text)\n div: PropsWithChildren<HtmlGlobalAttributes>;\n p: PropsWithChildren<HtmlGlobalAttributes>;\n h1: PropsWithChildren<HtmlGlobalAttributes>;\n h2: PropsWithChildren<HtmlGlobalAttributes>;\n h3: PropsWithChildren<HtmlGlobalAttributes>;\n h4: PropsWithChildren<HtmlGlobalAttributes>;\n h5: PropsWithChildren<HtmlGlobalAttributes>;\n h6: PropsWithChildren<HtmlGlobalAttributes>;\n ul: PropsWithChildren<HtmlListAttributes>;\n ol: PropsWithChildren<HtmlListAttributes>;\n li: PropsWithChildren<HtmlGlobalAttributes>;\n blockquote: PropsWithChildren<HtmlGlobalAttributes>;\n pre: PropsWithChildren<HtmlGlobalAttributes>;\n hr: HtmlGlobalAttributes;\n\n // HTML table elements (for mj-table - use mj-table instead of <table>)\n tr: PropsWithChildren<HtmlGlobalAttributes>;\n td: PropsWithChildren<HtmlTableCellAttributes>;\n th: PropsWithChildren<HtmlTableCellAttributes>;\n thead: PropsWithChildren<HtmlGlobalAttributes>;\n tbody: PropsWithChildren<HtmlGlobalAttributes>;\n\n // HTML media elements (for mj-table - mj-image can't be used inside mj-table)\n img: HtmlImgAttributes;\n\n // HTML head elements (for mj-raw in mj-head - dark mode support)\n meta: HtmlMetaAttributes;\n }\n}\n","export const MJML_NODE_TYPE = Symbol.for('mjmx.node');\n\nexport const Fragment = Symbol.for('mjmx.fragment');\n\nexport interface MjmlNode {\n readonly $$typeof: typeof MJML_NODE_TYPE;\n readonly tag: string | typeof Fragment;\n readonly attributes: Record<string, string | undefined>;\n readonly children: MjmlChild[];\n}\n\nexport type MjmlChild =\n | MjmlNode\n | string\n | number\n | boolean\n | null\n | undefined\n | MjmlChild[];\n\nexport function isMjmlNode(value: unknown): value is MjmlNode {\n return (\n typeof value === 'object' &&\n value !== null &&\n '$$typeof' in value &&\n value.$$typeof === MJML_NODE_TYPE\n );\n}\n\nexport function createNode(\n tag: string | typeof Fragment,\n attributes: Record<string, unknown>,\n children: MjmlChild[]\n): MjmlNode {\n const stringAttributes: Record<string, string | undefined> = {};\n\n for (const [key, value] of Object.entries(attributes)) {\n if (value === undefined || value === null) {\n continue;\n }\n if (value instanceof URL) {\n stringAttributes[key] = value.toString();\n } else {\n stringAttributes[key] = String(value);\n }\n }\n\n return {\n $$typeof: MJML_NODE_TYPE,\n tag,\n attributes: stringAttributes,\n children,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,iBAAiB,uBAAO,IAAI,WAAW;AAE7C,IAAM,WAAW,uBAAO,IAAI,eAAe;AA2B3C,SAAS,WACd,KACA,YACA,UACU;AACV,QAAM,mBAAuD,CAAC;AAE9D,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,UAAU,GAAG;AACrD,QAAI,UAAU,UAAa,UAAU,MAAM;AACzC;AAAA,IACF;AACA,QAAI,iBAAiB,KAAK;AACxB,uBAAiB,GAAG,IAAI,MAAM,SAAS;AAAA,IACzC,OAAO;AACL,uBAAiB,GAAG,IAAI,OAAO,KAAK;AAAA,IACtC;AAAA,EACF;AAEA,SAAO;AAAA,IACL,UAAU;AAAA,IACV;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,EACF;AACF;;;ADGO,SAAS,IACd,KACA,OAEA,MACU;AACV,MAAI,OAAO,QAAQ,YAAY;AAC7B,WAAO,IAAI,KAAK;AAAA,EAClB;AAEA,QAAM,EAAE,UAAU,GAAG,WAAW,IAAI;AAEpC,QAAM,aACJ,aAAa,SACT,CAAC,IACD,MAAM,QAAQ,QAAQ,IACpB,WACA,CAAC,QAAqB;AAE9B,SAAO,WAAW,KAAK,YAAY,UAAU;AAC/C;AAEO,IAAM,OAAO;","names":[]}
@@ -1 +1 @@
1
- export { F as Fragment, J as JSX, a3 as jsx, a4 as jsxs } from './jsx-dev-runtime-DeeKpFUQ.cjs';
1
+ export { F as Fragment, J as JSX, a1 as PropsWithChildren, a4 as jsx, a5 as jsxs } from './jsx-dev-runtime-CIghYpt3.cjs';
@@ -1 +1 @@
1
- export { F as Fragment, J as JSX, a3 as jsx, a4 as jsxs } from './jsx-dev-runtime-DeeKpFUQ.js';
1
+ export { F as Fragment, J as JSX, a1 as PropsWithChildren, a4 as jsx, a5 as jsxs } from './jsx-dev-runtime-CIghYpt3.js';
@@ -2,7 +2,7 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-TQQJ4UR4.js";
5
+ } from "./chunk-JZZH5EZ3.js";
6
6
  export {
7
7
  Fragment,
8
8
  jsx,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjmx/core",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Write mjml using JSX syntax",
5
5
  "keywords": [
6
6
  "mjml",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/ast.ts","../src/jsx-runtime.ts"],"sourcesContent":["export const MJML_NODE_TYPE = Symbol.for('mjmx.node');\n\nexport const Fragment = Symbol.for('mjmx.fragment');\n\nexport interface MjmlNode {\n readonly $$typeof: typeof MJML_NODE_TYPE;\n readonly tag: string | typeof Fragment;\n readonly attributes: Record<string, string | undefined>;\n readonly children: MjmlChild[];\n}\n\nexport type MjmlChild =\n | MjmlNode\n | string\n | number\n | boolean\n | null\n | undefined\n | MjmlChild[];\n\nexport function isMjmlNode(value: unknown): value is MjmlNode {\n return (\n typeof value === 'object' &&\n value !== null &&\n '$$typeof' in value &&\n value.$$typeof === MJML_NODE_TYPE\n );\n}\n\nexport function createNode(\n tag: string | typeof Fragment,\n attributes: Record<string, unknown>,\n children: MjmlChild[]\n): MjmlNode {\n const stringAttributes: Record<string, string | undefined> = {};\n\n for (const [key, value] of Object.entries(attributes)) {\n if (value === undefined || value === null) {\n continue;\n }\n if (value instanceof URL) {\n stringAttributes[key] = value.toString();\n } else {\n stringAttributes[key] = String(value);\n }\n }\n\n return {\n $$typeof: MJML_NODE_TYPE,\n tag,\n attributes: stringAttributes,\n children,\n };\n}\n","import { createNode, Fragment, type MjmlChild, type MjmlNode } from './ast';\nimport type {\n HtmlAnchorAttributes,\n HtmlGlobalAttributes,\n HtmlImgAttributes,\n HtmlListAttributes,\n HtmlMetaAttributes,\n HtmlTableCellAttributes,\n} from './html-types';\nimport type {\n MjAccordionAttributes,\n MjAccordionElementAttributes,\n MjAccordionTextAttributes,\n MjAccordionTitleAttributes,\n MjAllAttributes,\n MjAttributesAttributes,\n MjBodyAttributes,\n MjBreakpointAttributes,\n MjButtonAttributes,\n MjCarouselAttributes,\n MjCarouselImageAttributes,\n MjClassAttributes,\n MjColumnAttributes,\n MjDividerAttributes,\n MjFontAttributes,\n MjGroupAttributes,\n MjHeadAttributes,\n MjHeroAttributes,\n MjHtmlAttributeAttributes,\n MjHtmlAttributesAttributes,\n MjImageAttributes,\n MjIncludeAttributes,\n MjmlAttributes,\n MjNavbarAttributes,\n MjNavbarLinkAttributes,\n MjPreviewAttributes,\n MjRawAttributes,\n MjSectionAttributes,\n MjSelectorAttributes,\n MjSocialAttributes,\n MjSocialElementAttributes,\n MjSpacerAttributes,\n MjStyleAttributes,\n MjTableAttributes,\n MjTextAttributes,\n MjTitleAttributes,\n MjWrapperAttributes,\n} from './types';\n\nexport { Fragment };\n\ntype PropsWithChildren<T = object> = T & { children?: MjmlChild };\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Component = (props: any) => MjmlNode;\n\nexport function jsx(\n tag: string | typeof Fragment | Component,\n props: Record<string, unknown>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _key?: string\n): MjmlNode {\n if (typeof tag === 'function') {\n return tag(props);\n }\n\n const { children, ...attributes } = props;\n\n const childArray: MjmlChild[] =\n children === undefined\n ? []\n : Array.isArray(children)\n ? children\n : [children as MjmlChild];\n\n return createNode(tag, attributes, childArray);\n}\n\nexport const jsxs = jsx;\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace JSX {\n export type Element = MjmlNode;\n export type ElementType = string | typeof Fragment | Component;\n\n export interface ElementChildrenAttribute {\n children: MjmlChild;\n }\n\n export interface IntrinsicElements {\n mjml: PropsWithChildren<MjmlAttributes>;\n 'mj-head': PropsWithChildren<MjHeadAttributes>;\n 'mj-body': PropsWithChildren<MjBodyAttributes>;\n 'mj-attributes': PropsWithChildren<MjAttributesAttributes>;\n 'mj-breakpoint': MjBreakpointAttributes;\n 'mj-font': MjFontAttributes;\n 'mj-html-attributes': PropsWithChildren<MjHtmlAttributesAttributes>;\n 'mj-preview': PropsWithChildren<MjPreviewAttributes>;\n 'mj-style': PropsWithChildren<MjStyleAttributes>;\n 'mj-title': PropsWithChildren<MjTitleAttributes>;\n 'mj-all': MjAllAttributes;\n 'mj-class': MjClassAttributes;\n 'mj-section': PropsWithChildren<MjSectionAttributes>;\n 'mj-column': PropsWithChildren<MjColumnAttributes>;\n 'mj-group': PropsWithChildren<MjGroupAttributes>;\n 'mj-wrapper': PropsWithChildren<MjWrapperAttributes>;\n 'mj-text': PropsWithChildren<MjTextAttributes>;\n 'mj-button': PropsWithChildren<MjButtonAttributes>;\n 'mj-image': MjImageAttributes;\n 'mj-divider': MjDividerAttributes;\n 'mj-spacer': MjSpacerAttributes;\n 'mj-table': PropsWithChildren<MjTableAttributes>;\n 'mj-raw': PropsWithChildren<MjRawAttributes>;\n 'mj-hero': PropsWithChildren<MjHeroAttributes>;\n 'mj-accordion': PropsWithChildren<MjAccordionAttributes>;\n 'mj-accordion-element': PropsWithChildren<MjAccordionElementAttributes>;\n 'mj-accordion-title': PropsWithChildren<MjAccordionTitleAttributes>;\n 'mj-accordion-text': PropsWithChildren<MjAccordionTextAttributes>;\n 'mj-carousel': PropsWithChildren<MjCarouselAttributes>;\n 'mj-carousel-image': MjCarouselImageAttributes;\n 'mj-navbar': PropsWithChildren<MjNavbarAttributes>;\n 'mj-navbar-link': PropsWithChildren<MjNavbarLinkAttributes>;\n 'mj-social': PropsWithChildren<MjSocialAttributes>;\n 'mj-social-element': PropsWithChildren<MjSocialElementAttributes>;\n 'mj-include': MjIncludeAttributes;\n 'mj-selector': PropsWithChildren<MjSelectorAttributes>;\n 'mj-html-attribute': PropsWithChildren<MjHtmlAttributeAttributes>;\n\n // HTML inline text elements (for mj-text)\n a: PropsWithChildren<HtmlAnchorAttributes>;\n span: PropsWithChildren<HtmlGlobalAttributes>;\n strong: PropsWithChildren<HtmlGlobalAttributes>;\n b: PropsWithChildren<HtmlGlobalAttributes>;\n em: PropsWithChildren<HtmlGlobalAttributes>;\n i: PropsWithChildren<HtmlGlobalAttributes>;\n u: PropsWithChildren<HtmlGlobalAttributes>;\n s: PropsWithChildren<HtmlGlobalAttributes>;\n small: PropsWithChildren<HtmlGlobalAttributes>;\n code: PropsWithChildren<HtmlGlobalAttributes>;\n sub: PropsWithChildren<HtmlGlobalAttributes>;\n sup: PropsWithChildren<HtmlGlobalAttributes>;\n br: HtmlGlobalAttributes;\n\n // HTML block text elements (for mj-text)\n div: PropsWithChildren<HtmlGlobalAttributes>;\n p: PropsWithChildren<HtmlGlobalAttributes>;\n h1: PropsWithChildren<HtmlGlobalAttributes>;\n h2: PropsWithChildren<HtmlGlobalAttributes>;\n h3: PropsWithChildren<HtmlGlobalAttributes>;\n h4: PropsWithChildren<HtmlGlobalAttributes>;\n h5: PropsWithChildren<HtmlGlobalAttributes>;\n h6: PropsWithChildren<HtmlGlobalAttributes>;\n ul: PropsWithChildren<HtmlListAttributes>;\n ol: PropsWithChildren<HtmlListAttributes>;\n li: PropsWithChildren<HtmlGlobalAttributes>;\n blockquote: PropsWithChildren<HtmlGlobalAttributes>;\n pre: PropsWithChildren<HtmlGlobalAttributes>;\n hr: HtmlGlobalAttributes;\n\n // HTML table elements (for mj-table - use mj-table instead of <table>)\n tr: PropsWithChildren<HtmlGlobalAttributes>;\n td: PropsWithChildren<HtmlTableCellAttributes>;\n th: PropsWithChildren<HtmlTableCellAttributes>;\n thead: PropsWithChildren<HtmlGlobalAttributes>;\n tbody: PropsWithChildren<HtmlGlobalAttributes>;\n\n // HTML media elements (for mj-table - mj-image can't be used inside mj-table)\n img: HtmlImgAttributes;\n\n // HTML head elements (for mj-raw in mj-head - dark mode support)\n meta: HtmlMetaAttributes;\n }\n}\n"],"mappings":";AAAO,IAAM,iBAAiB,uBAAO,IAAI,WAAW;AAE7C,IAAM,WAAW,uBAAO,IAAI,eAAe;AAkB3C,SAAS,WAAW,OAAmC;AAC5D,SACE,OAAO,UAAU,YACjB,UAAU,QACV,cAAc,SACd,MAAM,aAAa;AAEvB;AAEO,SAAS,WACd,KACA,YACA,UACU;AACV,QAAM,mBAAuD,CAAC;AAE9D,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,UAAU,GAAG;AACrD,QAAI,UAAU,UAAa,UAAU,MAAM;AACzC;AAAA,IACF;AACA,QAAI,iBAAiB,KAAK;AACxB,uBAAiB,GAAG,IAAI,MAAM,SAAS;AAAA,IACzC,OAAO;AACL,uBAAiB,GAAG,IAAI,OAAO,KAAK;AAAA,IACtC;AAAA,EACF;AAEA,SAAO;AAAA,IACL,UAAU;AAAA,IACV;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,EACF;AACF;;;ACGO,SAAS,IACd,KACA,OAEA,MACU;AACV,MAAI,OAAO,QAAQ,YAAY;AAC7B,WAAO,IAAI,KAAK;AAAA,EAClB;AAEA,QAAM,EAAE,UAAU,GAAG,WAAW,IAAI;AAEpC,QAAM,aACJ,aAAa,SACT,CAAC,IACD,MAAM,QAAQ,QAAQ,IACpB,WACA,CAAC,QAAqB;AAE9B,SAAO,WAAW,KAAK,YAAY,UAAU;AAC/C;AAEO,IAAM,OAAO;","names":[]}