🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@react-email/markdown

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-email/markdown - npm Package Compare versions

Comparing version
0.0.16
to
0.0.17-canary.0
+1
-3
dist/index.js

@@ -25,7 +25,5 @@ //#region rolldown:runtime

let marked = require("marked");
marked = __toESM(marked);
let react = require("react");
react = __toESM(react);
let react_jsx_runtime = require("react/jsx-runtime");
react_jsx_runtime = __toESM(react_jsx_runtime);

@@ -232,3 +230,3 @@ //#region src/styles.ts

renderer.listitem = ({ tokens }) => {
const text = renderer.parser.parseInline(tokens);
const text = tokens.some((token) => token.type === "list") ? renderer.parser.parse(tokens) : renderer.parser.parseInline(tokens);
return `<li${parseCssInJsToInlineCss(finalStyles.li) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.li)}"` : ""}>${text}</li>\n`;

@@ -235,0 +233,0 @@ };

@@ -205,3 +205,3 @@ import { Renderer, marked } from "marked";

renderer.listitem = ({ tokens }) => {
const text = renderer.parser.parseInline(tokens);
const text = tokens.some((token) => token.type === "list") ? renderer.parser.parse(tokens) : renderer.parser.parseInline(tokens);
return `<li${parseCssInJsToInlineCss(finalStyles.li) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.li)}"` : ""}>${text}</li>\n`;

@@ -208,0 +208,0 @@ };

@@ -1,1 +0,1 @@

{"version":3,"file":"index.mjs","names":["styles: StylesType","styles"],"sources":["../src/styles.ts","../src/utils/parse-css-in-js-to-inline-css.ts","../src/markdown.tsx"],"sourcesContent":["const emptyStyle = {};\n\nconst baseHeaderStyles = {\n fontWeight: '500',\n paddingTop: 20,\n};\n\nconst h1 = {\n ...baseHeaderStyles,\n fontSize: '2.5rem',\n};\n\nconst h2 = {\n ...baseHeaderStyles,\n fontSize: '2rem',\n};\nconst h3 = {\n ...baseHeaderStyles,\n fontSize: '1.75rem',\n};\nconst h4 = {\n ...baseHeaderStyles,\n fontSize: '1.5rem',\n};\nconst h5 = {\n ...baseHeaderStyles,\n fontSize: '1.25rem',\n};\nconst h6 = {\n ...baseHeaderStyles,\n fontSize: '1rem',\n};\n\nconst bold = {\n fontWeight: 'bold',\n};\n\nconst italic = {\n fontStyle: 'italic',\n};\n\nconst blockQuote = {\n background: '#f9f9f9',\n borderLeft: '10px solid #ccc',\n margin: '1.5em 10px',\n padding: '1em 10px',\n};\n\nconst codeInline = {\n color: '#212529',\n fontSize: '87.5%',\n display: 'inline',\n background: ' #f8f8f8',\n fontFamily: 'SFMono-Regular,Menlo,Monaco,Consolas,monospace',\n};\n\nconst codeBlock = {\n ...codeInline,\n display: 'block',\n paddingTop: 10,\n paddingRight: 10,\n paddingLeft: 10,\n paddingBottom: 1,\n marginBottom: 20,\n background: ' #f8f8f8',\n};\n\nconst link = {\n color: '#007bff',\n textDecoration: 'underline',\n backgroundColor: 'transparent',\n};\n\nexport type StylesType = {\n h1?: React.CSSProperties;\n h2?: React.CSSProperties;\n h3?: React.CSSProperties;\n h4?: React.CSSProperties;\n h5?: React.CSSProperties;\n h6?: React.CSSProperties;\n blockQuote?: React.CSSProperties;\n bold?: React.CSSProperties;\n italic?: React.CSSProperties;\n link?: React.CSSProperties;\n codeBlock?: React.CSSProperties;\n codeInline?: React.CSSProperties;\n p?: React.CSSProperties;\n li?: React.CSSProperties;\n ul?: React.CSSProperties;\n ol?: React.CSSProperties;\n image?: React.CSSProperties;\n br?: React.CSSProperties;\n hr?: React.CSSProperties;\n table?: React.CSSProperties;\n thead?: React.CSSProperties;\n tbody?: React.CSSProperties;\n tr?: React.CSSProperties;\n th?: React.CSSProperties;\n td?: React.CSSProperties;\n strikethrough?: React.CSSProperties;\n};\n\nexport const styles: StylesType = {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n blockQuote,\n bold,\n italic,\n link,\n codeBlock: { ...codeBlock, wordWrap: 'break-word' },\n codeInline: { ...codeInline, wordWrap: 'break-word' },\n p: emptyStyle,\n li: emptyStyle,\n ul: emptyStyle,\n ol: emptyStyle,\n image: emptyStyle,\n br: emptyStyle,\n hr: emptyStyle,\n table: emptyStyle,\n thead: emptyStyle,\n tbody: emptyStyle,\n th: emptyStyle,\n td: emptyStyle,\n tr: emptyStyle,\n strikethrough: emptyStyle,\n};\n","function camelToKebabCase(str: string): string {\n return str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\nfunction escapeQuotes(value: unknown) {\n if (typeof value === 'string' && value.includes('\"')) {\n return value.replace(/\"/g, '&#x27;');\n }\n return value;\n}\n\nexport function parseCssInJsToInlineCss(\n cssProperties: React.CSSProperties | undefined,\n): string {\n if (!cssProperties) return '';\n\n const numericalCssProperties = [\n 'width',\n 'height',\n 'margin',\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n 'padding',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n 'borderWidth',\n 'borderTopWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'outlineWidth',\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'fontSize',\n 'letterSpacing',\n 'wordSpacing',\n 'maxWidth',\n 'minWidth',\n 'maxHeight',\n 'minHeight',\n 'borderRadius',\n 'borderTopLeftRadius',\n 'borderTopRightRadius',\n 'borderBottomLeftRadius',\n 'borderBottomRightRadius',\n 'textIndent',\n 'gridColumnGap',\n 'gridRowGap',\n 'gridGap',\n 'translateX',\n 'translateY',\n ];\n\n return Object.entries(cssProperties)\n .map(([property, value]) => {\n if (\n typeof value === 'number' &&\n numericalCssProperties.includes(property)\n ) {\n return `${camelToKebabCase(property)}:${value}px`;\n }\n\n const escapedValue = escapeQuotes(value);\n return `${camelToKebabCase(property)}:${escapedValue}`;\n })\n .join(';');\n}\n","import { marked, Renderer } from 'marked';\nimport * as React from 'react';\nimport { type StylesType, styles } from './styles';\nimport { parseCssInJsToInlineCss } from './utils/parse-css-in-js-to-inline-css';\n\nexport type MarkdownProps = Readonly<{\n children: string;\n markdownCustomStyles?: StylesType;\n markdownContainerStyles?: React.CSSProperties;\n}>;\n\nexport const Markdown = React.forwardRef<HTMLDivElement, MarkdownProps>(\n (\n { children, markdownContainerStyles, markdownCustomStyles, ...props },\n ref,\n ) => {\n const finalStyles = { ...styles, ...markdownCustomStyles };\n\n const renderer = new Renderer();\n renderer.blockquote = ({ tokens }) => {\n const text = renderer.parser.parse(tokens);\n\n return `<blockquote${\n parseCssInJsToInlineCss(finalStyles.blockQuote) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.blockQuote)}\"`\n : ''\n }>\\n${text}</blockquote>\\n`;\n };\n\n renderer.br = () => {\n return `<br${\n parseCssInJsToInlineCss(finalStyles.br) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.br)}\"`\n : ''\n } />`;\n };\n\n // TODO: Support all options\n renderer.code = ({ text }) => {\n text = `${text.replace(/\\n$/, '')}\\n`;\n\n return `<pre${\n parseCssInJsToInlineCss(finalStyles.codeBlock) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.codeBlock)}\"`\n : ''\n }><code>${text}</code></pre>\\n`;\n };\n\n renderer.codespan = ({ text }) => {\n return `<code${\n parseCssInJsToInlineCss(finalStyles.codeInline) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.codeInline)}\"`\n : ''\n }>${text}</code>`;\n };\n\n renderer.del = ({ tokens }) => {\n const text = renderer.parser.parseInline(tokens);\n\n return `<del${\n parseCssInJsToInlineCss(finalStyles.strikethrough) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.strikethrough)}\"`\n : ''\n }>${text}</del>`;\n };\n\n renderer.em = ({ tokens }) => {\n const text = renderer.parser.parseInline(tokens);\n\n return `<em${\n parseCssInJsToInlineCss(finalStyles.italic) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.italic)}\"`\n : ''\n }>${text}</em>`;\n };\n\n renderer.heading = ({ tokens, depth }) => {\n const text = renderer.parser.parseInline(tokens);\n\n return `<h${depth}${\n parseCssInJsToInlineCss(\n finalStyles[`h${depth}` as keyof StylesType],\n ) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(\n finalStyles[`h${depth}` as keyof StylesType],\n )}\"`\n : ''\n }>${text}</h${depth}>`;\n };\n\n renderer.hr = () => {\n return `<hr${\n parseCssInJsToInlineCss(finalStyles.hr) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.hr)}\"`\n : ''\n } />\\n`;\n };\n\n renderer.image = ({ href, text, title }) => {\n return `<img src=\"${href.replaceAll('\"', '&quot;')}\" alt=\"${text.replaceAll('\"', '&quot;')}\"${\n title ? ` title=\"${title}\"` : ''\n }${\n parseCssInJsToInlineCss(finalStyles.image) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.image)}\"`\n : ''\n }>`;\n };\n\n renderer.link = ({ href, title, tokens }) => {\n const text = renderer.parser.parseInline(tokens);\n\n return `<a href=\"${href}\" target=\"_blank\"${\n title ? ` title=\"${title}\"` : ''\n }${\n parseCssInJsToInlineCss(finalStyles.link) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.link)}\"`\n : ''\n }>${text}</a>`;\n };\n\n renderer.listitem = ({ tokens }) => {\n const text = renderer.parser.parseInline(tokens);\n\n return `<li${\n parseCssInJsToInlineCss(finalStyles.li) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.li)}\"`\n : ''\n }>${text}</li>\\n`;\n };\n\n renderer.list = ({ items, ordered, start }) => {\n const type = ordered ? 'ol' : 'ul';\n const startAt = ordered && start !== 1 ? ` start=\"${start}\"` : '';\n const styles = parseCssInJsToInlineCss(\n finalStyles[ordered ? 'ol' : 'ul'],\n );\n\n return (\n '<' +\n type +\n startAt +\n `${styles !== '' ? ` style=\"${styles}\"` : ''}>\\n` +\n items.map((item) => renderer.listitem(item)).join('') +\n '</' +\n type +\n '>\\n'\n );\n };\n\n renderer.paragraph = ({ tokens }) => {\n const text = renderer.parser.parseInline(tokens);\n\n return `<p${\n parseCssInJsToInlineCss(finalStyles.p) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.p)}\"`\n : ''\n }>${text}</p>\\n`;\n };\n\n renderer.strong = ({ tokens }) => {\n const text = renderer.parser.parseInline(tokens);\n\n return `<strong${\n parseCssInJsToInlineCss(finalStyles.bold) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.bold)}\"`\n : ''\n }>${text}</strong>`;\n };\n\n renderer.table = ({ header, rows }) => {\n const styleTable = parseCssInJsToInlineCss(finalStyles.table);\n const styleThead = parseCssInJsToInlineCss(finalStyles.thead);\n const styleTbody = parseCssInJsToInlineCss(finalStyles.tbody);\n\n const theadRow = renderer.tablerow({\n text: header.map((cell) => renderer.tablecell(cell)).join(''),\n });\n\n const tbodyRows = rows\n .map((row) =>\n renderer.tablerow({\n text: row.map((cell) => renderer.tablecell(cell)).join(''),\n }),\n )\n .join('');\n\n const thead = `<thead${styleThead ? ` style=\"${styleThead}\"` : ''}>\\n${theadRow}</thead>`;\n const tbody = `<tbody${styleTbody ? ` style=\"${styleTbody}\"` : ''}>${tbodyRows}</tbody>`;\n\n return `<table${styleTable ? ` style=\"${styleTable}\"` : ''}>\\n${thead}\\n${tbody}</table>\\n`;\n };\n\n renderer.tablecell = ({ tokens, align, header }) => {\n const text = renderer.parser.parseInline(tokens);\n const type = header ? 'th' : 'td';\n const tag = align\n ? `<${type} align=\"${align}\"${\n parseCssInJsToInlineCss(finalStyles.td) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.td)}\"`\n : ''\n }>`\n : `<${type}${\n parseCssInJsToInlineCss(finalStyles.td) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.td)}\"`\n : ''\n }>`;\n return `${tag}${text}</${type}>\\n`;\n };\n\n renderer.tablerow = ({ text }) => {\n return `<tr${\n parseCssInJsToInlineCss(finalStyles.tr) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.tr)}\"`\n : ''\n }>\\n${text}</tr>\\n`;\n };\n\n return (\n <div\n {...props}\n dangerouslySetInnerHTML={{\n __html: marked.parse(children, {\n renderer,\n async: false,\n }),\n }}\n data-id=\"react-email-markdown\"\n ref={ref}\n style={markdownContainerStyles}\n />\n );\n },\n);\n\nMarkdown.displayName = 'Markdown';\n"],"mappings":";;;;;AAAA,MAAM,aAAa,EAAE;AAErB,MAAM,mBAAmB;CACvB,YAAY;CACZ,YAAY;CACb;AAED,MAAM,KAAK;CACT,GAAG;CACH,UAAU;CACX;AAED,MAAM,KAAK;CACT,GAAG;CACH,UAAU;CACX;AACD,MAAM,KAAK;CACT,GAAG;CACH,UAAU;CACX;AACD,MAAM,KAAK;CACT,GAAG;CACH,UAAU;CACX;AACD,MAAM,KAAK;CACT,GAAG;CACH,UAAU;CACX;AACD,MAAM,KAAK;CACT,GAAG;CACH,UAAU;CACX;AAED,MAAM,OAAO,EACX,YAAY,QACb;AAED,MAAM,SAAS,EACb,WAAW,UACZ;AAED,MAAM,aAAa;CACjB,YAAY;CACZ,YAAY;CACZ,QAAQ;CACR,SAAS;CACV;AAED,MAAM,aAAa;CACjB,OAAO;CACP,UAAU;CACV,SAAS;CACT,YAAY;CACZ,YAAY;CACb;AAED,MAAM,YAAY;CAChB,GAAG;CACH,SAAS;CACT,YAAY;CACZ,cAAc;CACd,aAAa;CACb,eAAe;CACf,cAAc;CACd,YAAY;CACb;AAED,MAAM,OAAO;CACX,OAAO;CACP,gBAAgB;CAChB,iBAAiB;CAClB;AA+BD,MAAaA,SAAqB;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,WAAW;EAAE,GAAG;EAAW,UAAU;EAAc;CACnD,YAAY;EAAE,GAAG;EAAY,UAAU;EAAc;CACrD,GAAG;CACH,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,IAAI;CACJ,IAA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EACH;EACL,OAAO;GACP;EAGP;AAED,SAAS,cAAc"}
{"version":3,"file":"index.mjs","names":["styles: StylesType","styles"],"sources":["../src/styles.ts","../src/utils/parse-css-in-js-to-inline-css.ts","../src/markdown.tsx"],"sourcesContent":["const emptyStyle = {};\n\nconst baseHeaderStyles = {\n fontWeight: '500',\n paddingTop: 20,\n};\n\nconst h1 = {\n ...baseHeaderStyles,\n fontSize: '2.5rem',\n};\n\nconst h2 = {\n ...baseHeaderStyles,\n fontSize: '2rem',\n};\nconst h3 = {\n ...baseHeaderStyles,\n fontSize: '1.75rem',\n};\nconst h4 = {\n ...baseHeaderStyles,\n fontSize: '1.5rem',\n};\nconst h5 = {\n ...baseHeaderStyles,\n fontSize: '1.25rem',\n};\nconst h6 = {\n ...baseHeaderStyles,\n fontSize: '1rem',\n};\n\nconst bold = {\n fontWeight: 'bold',\n};\n\nconst italic = {\n fontStyle: 'italic',\n};\n\nconst blockQuote = {\n background: '#f9f9f9',\n borderLeft: '10px solid #ccc',\n margin: '1.5em 10px',\n padding: '1em 10px',\n};\n\nconst codeInline = {\n color: '#212529',\n fontSize: '87.5%',\n display: 'inline',\n background: ' #f8f8f8',\n fontFamily: 'SFMono-Regular,Menlo,Monaco,Consolas,monospace',\n};\n\nconst codeBlock = {\n ...codeInline,\n display: 'block',\n paddingTop: 10,\n paddingRight: 10,\n paddingLeft: 10,\n paddingBottom: 1,\n marginBottom: 20,\n background: ' #f8f8f8',\n};\n\nconst link = {\n color: '#007bff',\n textDecoration: 'underline',\n backgroundColor: 'transparent',\n};\n\nexport type StylesType = {\n h1?: React.CSSProperties;\n h2?: React.CSSProperties;\n h3?: React.CSSProperties;\n h4?: React.CSSProperties;\n h5?: React.CSSProperties;\n h6?: React.CSSProperties;\n blockQuote?: React.CSSProperties;\n bold?: React.CSSProperties;\n italic?: React.CSSProperties;\n link?: React.CSSProperties;\n codeBlock?: React.CSSProperties;\n codeInline?: React.CSSProperties;\n p?: React.CSSProperties;\n li?: React.CSSProperties;\n ul?: React.CSSProperties;\n ol?: React.CSSProperties;\n image?: React.CSSProperties;\n br?: React.CSSProperties;\n hr?: React.CSSProperties;\n table?: React.CSSProperties;\n thead?: React.CSSProperties;\n tbody?: React.CSSProperties;\n tr?: React.CSSProperties;\n th?: React.CSSProperties;\n td?: React.CSSProperties;\n strikethrough?: React.CSSProperties;\n};\n\nexport const styles: StylesType = {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n blockQuote,\n bold,\n italic,\n link,\n codeBlock: { ...codeBlock, wordWrap: 'break-word' },\n codeInline: { ...codeInline, wordWrap: 'break-word' },\n p: emptyStyle,\n li: emptyStyle,\n ul: emptyStyle,\n ol: emptyStyle,\n image: emptyStyle,\n br: emptyStyle,\n hr: emptyStyle,\n table: emptyStyle,\n thead: emptyStyle,\n tbody: emptyStyle,\n th: emptyStyle,\n td: emptyStyle,\n tr: emptyStyle,\n strikethrough: emptyStyle,\n};\n","function camelToKebabCase(str: string): string {\n return str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\nfunction escapeQuotes(value: unknown) {\n if (typeof value === 'string' && value.includes('\"')) {\n return value.replace(/\"/g, '&#x27;');\n }\n return value;\n}\n\nexport function parseCssInJsToInlineCss(\n cssProperties: React.CSSProperties | undefined,\n): string {\n if (!cssProperties) return '';\n\n const numericalCssProperties = [\n 'width',\n 'height',\n 'margin',\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n 'padding',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n 'borderWidth',\n 'borderTopWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'outlineWidth',\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'fontSize',\n 'letterSpacing',\n 'wordSpacing',\n 'maxWidth',\n 'minWidth',\n 'maxHeight',\n 'minHeight',\n 'borderRadius',\n 'borderTopLeftRadius',\n 'borderTopRightRadius',\n 'borderBottomLeftRadius',\n 'borderBottomRightRadius',\n 'textIndent',\n 'gridColumnGap',\n 'gridRowGap',\n 'gridGap',\n 'translateX',\n 'translateY',\n ];\n\n return Object.entries(cssProperties)\n .map(([property, value]) => {\n if (\n typeof value === 'number' &&\n numericalCssProperties.includes(property)\n ) {\n return `${camelToKebabCase(property)}:${value}px`;\n }\n\n const escapedValue = escapeQuotes(value);\n return `${camelToKebabCase(property)}:${escapedValue}`;\n })\n .join(';');\n}\n","import { marked, Renderer } from 'marked';\nimport * as React from 'react';\nimport { type StylesType, styles } from './styles';\nimport { parseCssInJsToInlineCss } from './utils/parse-css-in-js-to-inline-css';\n\nexport type MarkdownProps = Readonly<{\n children: string;\n markdownCustomStyles?: StylesType;\n markdownContainerStyles?: React.CSSProperties;\n}>;\n\nexport const Markdown = React.forwardRef<HTMLDivElement, MarkdownProps>(\n (\n { children, markdownContainerStyles, markdownCustomStyles, ...props },\n ref,\n ) => {\n const finalStyles = { ...styles, ...markdownCustomStyles };\n\n const renderer = new Renderer();\n renderer.blockquote = ({ tokens }) => {\n const text = renderer.parser.parse(tokens);\n\n return `<blockquote${\n parseCssInJsToInlineCss(finalStyles.blockQuote) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.blockQuote)}\"`\n : ''\n }>\\n${text}</blockquote>\\n`;\n };\n\n renderer.br = () => {\n return `<br${\n parseCssInJsToInlineCss(finalStyles.br) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.br)}\"`\n : ''\n } />`;\n };\n\n // TODO: Support all options\n renderer.code = ({ text }) => {\n text = `${text.replace(/\\n$/, '')}\\n`;\n\n return `<pre${\n parseCssInJsToInlineCss(finalStyles.codeBlock) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.codeBlock)}\"`\n : ''\n }><code>${text}</code></pre>\\n`;\n };\n\n renderer.codespan = ({ text }) => {\n return `<code${\n parseCssInJsToInlineCss(finalStyles.codeInline) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.codeInline)}\"`\n : ''\n }>${text}</code>`;\n };\n\n renderer.del = ({ tokens }) => {\n const text = renderer.parser.parseInline(tokens);\n\n return `<del${\n parseCssInJsToInlineCss(finalStyles.strikethrough) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.strikethrough)}\"`\n : ''\n }>${text}</del>`;\n };\n\n renderer.em = ({ tokens }) => {\n const text = renderer.parser.parseInline(tokens);\n\n return `<em${\n parseCssInJsToInlineCss(finalStyles.italic) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.italic)}\"`\n : ''\n }>${text}</em>`;\n };\n\n renderer.heading = ({ tokens, depth }) => {\n const text = renderer.parser.parseInline(tokens);\n\n return `<h${depth}${\n parseCssInJsToInlineCss(\n finalStyles[`h${depth}` as keyof StylesType],\n ) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(\n finalStyles[`h${depth}` as keyof StylesType],\n )}\"`\n : ''\n }>${text}</h${depth}>`;\n };\n\n renderer.hr = () => {\n return `<hr${\n parseCssInJsToInlineCss(finalStyles.hr) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.hr)}\"`\n : ''\n } />\\n`;\n };\n\n renderer.image = ({ href, text, title }) => {\n return `<img src=\"${href.replaceAll('\"', '&quot;')}\" alt=\"${text.replaceAll('\"', '&quot;')}\"${\n title ? ` title=\"${title}\"` : ''\n }${\n parseCssInJsToInlineCss(finalStyles.image) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.image)}\"`\n : ''\n }>`;\n };\n\n renderer.link = ({ href, title, tokens }) => {\n const text = renderer.parser.parseInline(tokens);\n\n return `<a href=\"${href}\" target=\"_blank\"${\n title ? ` title=\"${title}\"` : ''\n }${\n parseCssInJsToInlineCss(finalStyles.link) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.link)}\"`\n : ''\n }>${text}</a>`;\n };\n\n renderer.listitem = ({ tokens }) => {\n const hasNestedList = tokens.some((token) => token.type === 'list');\n const text = hasNestedList\n ? renderer.parser.parse(tokens)\n : renderer.parser.parseInline(tokens);\n\n return `<li${\n parseCssInJsToInlineCss(finalStyles.li) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.li)}\"`\n : ''\n }>${text}</li>\\n`;\n };\n\n renderer.list = ({ items, ordered, start }) => {\n const type = ordered ? 'ol' : 'ul';\n const startAt = ordered && start !== 1 ? ` start=\"${start}\"` : '';\n const styles = parseCssInJsToInlineCss(\n finalStyles[ordered ? 'ol' : 'ul'],\n );\n\n return (\n '<' +\n type +\n startAt +\n `${styles !== '' ? ` style=\"${styles}\"` : ''}>\\n` +\n items.map((item) => renderer.listitem(item)).join('') +\n '</' +\n type +\n '>\\n'\n );\n };\n\n renderer.paragraph = ({ tokens }) => {\n const text = renderer.parser.parseInline(tokens);\n\n return `<p${\n parseCssInJsToInlineCss(finalStyles.p) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.p)}\"`\n : ''\n }>${text}</p>\\n`;\n };\n\n renderer.strong = ({ tokens }) => {\n const text = renderer.parser.parseInline(tokens);\n\n return `<strong${\n parseCssInJsToInlineCss(finalStyles.bold) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.bold)}\"`\n : ''\n }>${text}</strong>`;\n };\n\n renderer.table = ({ header, rows }) => {\n const styleTable = parseCssInJsToInlineCss(finalStyles.table);\n const styleThead = parseCssInJsToInlineCss(finalStyles.thead);\n const styleTbody = parseCssInJsToInlineCss(finalStyles.tbody);\n\n const theadRow = renderer.tablerow({\n text: header.map((cell) => renderer.tablecell(cell)).join(''),\n });\n\n const tbodyRows = rows\n .map((row) =>\n renderer.tablerow({\n text: row.map((cell) => renderer.tablecell(cell)).join(''),\n }),\n )\n .join('');\n\n const thead = `<thead${styleThead ? ` style=\"${styleThead}\"` : ''}>\\n${theadRow}</thead>`;\n const tbody = `<tbody${styleTbody ? ` style=\"${styleTbody}\"` : ''}>${tbodyRows}</tbody>`;\n\n return `<table${styleTable ? ` style=\"${styleTable}\"` : ''}>\\n${thead}\\n${tbody}</table>\\n`;\n };\n\n renderer.tablecell = ({ tokens, align, header }) => {\n const text = renderer.parser.parseInline(tokens);\n const type = header ? 'th' : 'td';\n const tag = align\n ? `<${type} align=\"${align}\"${\n parseCssInJsToInlineCss(finalStyles.td) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.td)}\"`\n : ''\n }>`\n : `<${type}${\n parseCssInJsToInlineCss(finalStyles.td) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.td)}\"`\n : ''\n }>`;\n return `${tag}${text}</${type}>\\n`;\n };\n\n renderer.tablerow = ({ text }) => {\n return `<tr${\n parseCssInJsToInlineCss(finalStyles.tr) !== ''\n ? ` style=\"${parseCssInJsToInlineCss(finalStyles.tr)}\"`\n : ''\n }>\\n${text}</tr>\\n`;\n };\n\n return (\n <div\n {...props}\n dangerouslySetInnerHTML={{\n __html: marked.parse(children, {\n renderer,\n async: false,\n }),\n }}\n data-id=\"react-email-markdown\"\n ref={ref}\n style={markdownContainerStyles}\n />\n );\n },\n);\n\nMarkdown.displayName = 'Markdown';\n"],"mappings":";;;;;AAAA,MAAM,aAAa,EAAE;AAErB,MAAM,mBAAmB;CACvB,YAAY;CACZ,YAAY;CACb;AAED,MAAM,KAAK;CACT,GAAG;CACH,UAAU;CACX;AAED,MAAM,KAAK;CACT,GAAG;CACH,UAAU;CACX;AACD,MAAM,KAAK;CACT,GAAG;CACH,UAAU;CACX;AACD,MAAM,KAAK;CACT,GAAG;CACH,UAAU;CACX;AACD,MAAM,KAAK;CACT,GAAG;CACH,UAAU;CACX;AACD,MAAM,KAAK;CACT,GAAG;CACH,UAAU;CACX;AAED,MAAM,OAAO,EACX,YAAY,QACb;AAED,MAAM,SAAS,EACb,WAAW,UACZ;AAED,MAAM,aAAa;CACjB,YAAY;CACZ,YAAY;CACZ,QAAQ;CACR,SAAS;CACV;AAED,MAAM,aAAa;CACjB,OAAO;CACP,UAAU;CACV,SAAS;CACT,YA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Y7B,SAAO,GAXK,QACR,IAAI,KAAK,UAAU,MAAM,GACvB,wBAAwB,YAAY,GAAG,KAAK,KACxC,WAAW,wBAAwB,YAAY,GAAG,CAAC,KACnD,GACL,KACD,IAAI,OACF,wBAAwB,YAAY,GAAG,KAAK,KACxC,WAAW,wBAAwB,YAAY,GAAG,CAAC,KACnD,GACL,KACW,KAAK,IAAI,KAAK;;AAGhC,UAAS,YAAY,EAAE,WAAW;AAChC,SAAO,MACL,wBAAwB,YAAY,GAAG,KAAK,KACxC,WAAW,wBAAwB,YAAY,GAAG,CAAC,KACnD,GACL,KAAK,KAAK;;AAGb,QACE,oBAAC;EACC,GAAI;EACJ,yBAAyB,EACvB,QAAQ,OAAO,MAAM,UAAU;GAC7B;GACA,OAAO;GACR,CAAC,EACH;EACD,WAAQ;EACH;EACL,OAAO;GACP;EAGP;AAED,SAAS,cAAc"}
{
"name": "@react-email/markdown",
"version": "0.0.16",
"version": "0.0.17-canary.0",
"description": "Convert Markdown to valid React Email template code.",

@@ -35,3 +35,3 @@ "sideEffects": false,

"engines": {
"node": ">=18.0.0"
"node": ">=22.0.0"
},

@@ -50,3 +50,3 @@ "publishConfig": {

"typescript": "5.8.3",
"@react-email/render": "1.4.0",
"@react-email/render": "2.0.0-canary.0",
"tsconfig": "0.0.0"

@@ -53,0 +53,0 @@ },