@blocknote/xl-email-exporter 0.51.3 → 0.52.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.
@@ -140,17 +140,21 @@ var y = {
140
140
  },
141
141
  children: n.transformInlineContent(t.content)
142
142
  }),
143
- codeBlock: (t) => /* @__PURE__ */ h(i, {
144
- code: t.content[0]?.text || "",
145
- fontFamily: "'CommitMono', monospace",
146
- language: t.props.language,
147
- theme: m,
148
- ...e.codeBlock,
149
- style: {
150
- ...b.codeBlock.style,
151
- ...e.codeBlock?.style
152
- }
153
- }),
143
+ codeBlock: (t) => {
144
+ let [n, ...r] = t.content;
145
+ if (r.length > 0 || n && !("text" in n)) throw Error("expected plain block content to be a single text item");
146
+ return /* @__PURE__ */ h(i, {
147
+ code: n?.text ?? "",
148
+ fontFamily: "'CommitMono', monospace",
149
+ language: t.props.language,
150
+ theme: m,
151
+ ...e.codeBlock,
152
+ style: {
153
+ ...b.codeBlock.style,
154
+ ...e.codeBlock?.style
155
+ }
156
+ });
157
+ },
154
158
  audio: (t) => {
155
159
  let n = /* @__PURE__ */ h("svg", {
156
160
  height: "18",
@@ -358,6 +362,7 @@ var T = { link: {} }, E = (e = T) => ({
358
362
  inlineContentMapping: E(e.linkStyles),
359
363
  styleMapping: k(e.styleTransformStyles)
360
364
  }), P = class extends t {
365
+ schema;
361
366
  constructor(t, n, r) {
362
367
  let i = {
363
368
  colors: e,
@@ -1 +1 @@
1
- {"version":3,"file":"blocknote-xl-email-exporter.js","names":[],"sources":["../src/react-email/defaultSchema/blocks.tsx","../src/react-email/defaultSchema/inlinecontent.tsx","../src/react-email/defaultSchema/styles.tsx","../src/react-email/defaultSchema/index.ts","../src/react-email/reactEmailExporter.tsx"],"sourcesContent":["import {\n BlockMapping,\n createPageBreakBlockConfig,\n DefaultBlockSchema,\n mapTableCell,\n StyledText,\n} from \"@blocknote/core\";\nimport {\n CodeBlock,\n dracula,\n Heading,\n Img,\n Link,\n PrismLanguage,\n Text,\n} from \"@react-email/components\";\n\n// Define TextProps type based on React Email Text component\ntype TextProps = React.ComponentPropsWithoutRef<typeof Text>;\n\n// Define the styles interface for configurable Text components\nexport interface ReactEmailTextStyles {\n paragraph?: Partial<TextProps>;\n bulletListItem?: Partial<TextProps>;\n toggleListItem?: Partial<TextProps>;\n numberedListItem?: Partial<TextProps>;\n checkListItem?: Partial<TextProps>;\n quote?: Partial<TextProps>;\n tableError?: Partial<TextProps>;\n tableCell?: Partial<TextProps>;\n caption?: Partial<TextProps>;\n heading1?: Partial<TextProps>;\n heading2?: Partial<TextProps>;\n heading3?: Partial<TextProps>;\n heading4?: Partial<TextProps>;\n heading5?: Partial<TextProps>;\n heading6?: Partial<TextProps>;\n codeBlock?: Partial<React.ComponentProps<typeof CodeBlock>>;\n}\n\nconst defaultTextStyle: TextProps[\"style\"] = {\n fontSize: 16,\n lineHeight: 1.5,\n margin: 3,\n minHeight: 24,\n};\n\n// Default styles for Text components\nexport const defaultReactEmailTextStyles = {\n paragraph: {\n style: defaultTextStyle,\n },\n bulletListItem: {\n style: defaultTextStyle,\n },\n toggleListItem: {\n style: defaultTextStyle,\n },\n numberedListItem: {\n style: defaultTextStyle,\n },\n checkListItem: {\n style: defaultTextStyle,\n },\n quote: {\n style: defaultTextStyle,\n },\n tableError: {\n style: defaultTextStyle,\n },\n tableCell: {\n style: defaultTextStyle,\n },\n caption: {\n style: defaultTextStyle,\n },\n heading1: {\n style: {\n fontSize: 48,\n margin: 3,\n },\n },\n heading2: {\n style: {\n fontSize: 36,\n margin: 3,\n },\n },\n heading3: {\n style: {\n fontSize: 24,\n margin: 3,\n },\n },\n heading4: {\n style: {\n fontSize: 20,\n margin: 3,\n },\n },\n heading5: {\n style: {\n fontSize: 18,\n margin: 3,\n },\n },\n heading6: {\n style: {\n fontSize: 16,\n margin: 3,\n },\n },\n codeBlock: {\n style: defaultTextStyle,\n },\n} satisfies ReactEmailTextStyles;\n\nexport const createReactEmailBlockMappingForDefaultSchema = (\n textStyles: ReactEmailTextStyles = defaultReactEmailTextStyles,\n): BlockMapping<\n DefaultBlockSchema & {\n pageBreak: ReturnType<typeof createPageBreakBlockConfig>;\n },\n any,\n any,\n React.ReactElement<any>,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>\n> => ({\n paragraph: (block, t) => {\n return (\n <Text\n {...textStyles.paragraph}\n style={{\n ...defaultReactEmailTextStyles.paragraph.style,\n ...textStyles.paragraph?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n bulletListItem: (block, t) => {\n // Return only the <li> for grouping in the exporter\n return (\n <Text\n {...textStyles.bulletListItem}\n style={{\n ...defaultReactEmailTextStyles.bulletListItem.style,\n ...textStyles.bulletListItem?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n toggleListItem: (block, t) => {\n // Return only the <li> for grouping in the exporter\n return (\n <Text\n {...textStyles.toggleListItem}\n style={{\n ...defaultReactEmailTextStyles.toggleListItem.style,\n ...textStyles.toggleListItem?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n numberedListItem: (block, t, _nestingLevel) => {\n // Return only the <li> for grouping in the exporter\n return (\n <Text\n {...textStyles.numberedListItem}\n style={{\n ...defaultReactEmailTextStyles.numberedListItem.style,\n ...textStyles.numberedListItem?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n checkListItem: (block, t) => {\n // Render a checkbox using inline SVG for better appearance in email\n // block.props.checked should be true/false\n const checked = block.props?.checked;\n const checkboxSvg = checked ? (\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n style={{ display: \"inline\", verticalAlign: \"middle\", marginRight: 8 }}\n >\n <rect\n x=\"2\"\n y=\"2\"\n width=\"14\"\n height=\"14\"\n rx=\"3\"\n fill=\"#4F8A10\"\n stroke=\"#4F8A10\"\n strokeWidth=\"2\"\n />\n <polyline\n points=\"5,10 8,13 13,6\"\n fill=\"none\"\n stroke=\"#fff\"\n strokeWidth=\"2\"\n />\n </svg>\n ) : (\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n style={{ display: \"inline\", verticalAlign: \"middle\", marginRight: 8 }}\n >\n <rect\n x=\"2\"\n y=\"2\"\n width=\"14\"\n height=\"14\"\n rx=\"3\"\n fill=\"#fff\"\n stroke=\"#888\"\n strokeWidth=\"2\"\n />\n </svg>\n );\n return (\n <Text\n {...textStyles.checkListItem}\n style={{\n ...defaultReactEmailTextStyles.checkListItem.style,\n ...textStyles.checkListItem?.style,\n }}\n >\n {checkboxSvg}\n <span>{t.transformInlineContent(block.content)}</span>\n </Text>\n );\n },\n heading: (block, t) => {\n return (\n <Heading\n as={`h${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`}\n {...textStyles[`heading${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`]}\n style={{\n ...defaultReactEmailTextStyles[\n `heading${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`\n ].style,\n ...textStyles[`heading${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`]\n ?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Heading>\n );\n },\n\n codeBlock: (block) => {\n const textContent = (block.content as StyledText<any>[])[0]?.text || \"\";\n\n return (\n <CodeBlock\n code={textContent}\n fontFamily=\"'CommitMono', monospace\"\n language={block.props.language as PrismLanguage}\n theme={dracula}\n {...textStyles.codeBlock}\n style={{\n ...defaultReactEmailTextStyles.codeBlock.style,\n ...textStyles.codeBlock?.style,\n }}\n />\n );\n },\n audio: (block) => {\n // Audio icon SVG\n const icon = (\n <svg\n height=\"18\"\n width=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"#4F8A10\"\n style={{ display: \"inline\", verticalAlign: \"middle\" }}\n >\n <path d=\"M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z\" />\n </svg>\n );\n const previewWidth =\n \"previewWidth\" in block.props\n ? (block.props as any).previewWidth\n : undefined;\n return (\n <div style={{ margin: \"8px 0\" }}>\n <FileLink\n url={block.props.url}\n name={block.props.name}\n defaultText=\"Open audio file\"\n icon={icon}\n />\n <Caption\n caption={block.props.caption}\n width={previewWidth}\n textStyles={textStyles}\n />\n </div>\n );\n },\n video: (block) => {\n // Video icon SVG\n const icon = (\n <svg\n height=\"18\"\n width=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"#1976D2\"\n style={{ display: \"inline\", verticalAlign: \"middle\" }}\n >\n <path d=\"M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z\" />\n </svg>\n );\n const previewWidth =\n \"previewWidth\" in block.props\n ? (block.props as any).previewWidth\n : undefined;\n return (\n <div style={{ margin: \"8px 0\" }}>\n <FileLink\n url={block.props.url}\n name={block.props.name}\n defaultText=\"Open video file\"\n icon={icon}\n />\n <Caption\n caption={block.props.caption}\n width={previewWidth}\n textStyles={textStyles}\n />\n </div>\n );\n },\n file: (block) => {\n // File icon SVG\n const icon = (\n <svg\n height=\"18\"\n width=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"#888\"\n style={{ display: \"inline\", verticalAlign: \"middle\" }}\n >\n <path d=\"M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z\" />\n </svg>\n );\n const previewWidth =\n \"previewWidth\" in block.props\n ? (block.props as any).previewWidth\n : undefined;\n return (\n <div style={{ margin: \"8px 0\" }}>\n <FileLink\n url={block.props.url}\n name={block.props.name}\n defaultText=\"Open file\"\n icon={icon}\n />\n <Caption\n caption={block.props.caption}\n width={previewWidth}\n textStyles={textStyles}\n />\n </div>\n );\n },\n image: (block) => {\n return (\n <Img\n src={block.props.url}\n width={block.props.previewWidth}\n alt={block.props.caption}\n />\n );\n },\n table: (block, t) => {\n // Render table using standard HTML table elements for email compatibility\n const table = block.content;\n if (!table || typeof table !== \"object\" || !Array.isArray(table.rows)) {\n return <Text {...textStyles.tableError}>Table data not available</Text>;\n }\n const headerRowsCount = (table.headerRows as number) ?? 0;\n const headerColsCount = (table.headerCols as number) ?? 0;\n\n return (\n <table\n style={{\n borderCollapse: \"collapse\",\n width: \"100%\",\n margin: \"16px 0\",\n border: \"1px solid #ddd\",\n borderRadius: 4,\n overflow: \"hidden\",\n }}\n border={0}\n cellPadding={0}\n cellSpacing={0}\n >\n <tbody>\n {table.rows.map((row: any, rowIndex: number) => (\n <tr key={\"row-\" + rowIndex}>\n {row.cells.map((cell: any, colIndex: number) => {\n // Use mapTableCell to normalize table cell data into a standard interface\n // This handles partial cells, provides default values, and ensures consistent structure\n const normalizedCell = mapTableCell(cell);\n const isHeaderRow = rowIndex < headerRowsCount;\n const isHeaderCol = colIndex < headerColsCount;\n const isHeader = isHeaderRow || isHeaderCol;\n const CellTag = isHeader ? \"th\" : \"td\";\n return (\n <CellTag\n key={\"row_\" + rowIndex + \"_col_\" + colIndex}\n style={{\n border: \"1px solid #ddd\",\n padding: \"8px 12px\",\n background:\n normalizedCell.props.backgroundColor !== \"default\"\n ? t.options.colors[\n normalizedCell.props\n .backgroundColor as keyof typeof t.options.colors\n ].background\n : \"inherit\",\n fontWeight: isHeader ? \"bold\" : undefined,\n textAlign: normalizedCell.props.textAlignment || \"left\",\n color:\n normalizedCell.props.textColor !== \"default\"\n ? t.options.colors[\n normalizedCell.props\n .textColor as keyof typeof t.options.colors\n ].text\n : \"inherit\",\n ...defaultReactEmailTextStyles.tableCell.style,\n ...textStyles.tableCell?.style,\n }}\n {...((normalizedCell.props.colspan || 1) > 1 && {\n colSpan: normalizedCell.props.colspan || 1,\n })}\n {...((normalizedCell.props.rowspan || 1) > 1 && {\n rowSpan: normalizedCell.props.rowspan || 1,\n })}\n >\n {t.transformInlineContent(normalizedCell.content)}\n </CellTag>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n );\n },\n quote: (block, t) => {\n // Render block quote with a left border and subtle background for email compatibility\n return (\n <Text\n {...textStyles.quote}\n style={{\n borderLeft: \"2px solid #bdbdbd\",\n padding: \"0px 12px\",\n fontStyle: \"italic\",\n color: t.options.colors.gray.text,\n display: \"block\",\n ...defaultReactEmailTextStyles.quote.style,\n ...textStyles.quote?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n pageBreak: () => {\n // In email, a page break can be represented as a horizontal rule\n return (\n <hr\n style={{\n border: \"none\",\n borderTop: \"2px dashed #ccc\",\n margin: \"24px 0\",\n }}\n />\n );\n },\n divider: () => {\n return (\n <hr\n style={{\n border: \"none\",\n borderTop: \"1px solid #ccc\",\n margin: \"11.5px 0\",\n }}\n />\n );\n },\n});\n\n// Export the original mapping for backward compatibility\nexport const reactEmailBlockMappingForDefaultSchema =\n createReactEmailBlockMappingForDefaultSchema();\n\n// Helper for file-like blocks (audio, video, file)\nfunction FileLink({\n url,\n name,\n defaultText,\n icon,\n}: {\n url?: string;\n name?: string;\n defaultText: string;\n icon: React.ReactElement;\n}) {\n return (\n <Link\n href={url}\n style={{\n textDecoration: \"none\",\n color: \"#333\",\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 8,\n fontSize: 16,\n }}\n >\n {icon}\n <span style={{ verticalAlign: \"middle\" }}>{name || defaultText}</span>\n </Link>\n );\n}\n\nfunction Caption({\n caption,\n width,\n textStyles,\n}: {\n caption?: string;\n width?: number;\n textStyles: ReactEmailTextStyles;\n}) {\n if (!caption) {\n return null;\n }\n return (\n <Text\n {...textStyles.caption}\n style={{\n width,\n fontSize: 13,\n color: \"#888\",\n margin: \"4px 0 0 0\",\n ...defaultReactEmailTextStyles.caption.style,\n ...textStyles.caption?.style,\n }}\n >\n {caption}\n </Text>\n );\n}\n","import {\n DefaultInlineContentSchema,\n DefaultStyleSchema,\n InlineContentMapping,\n} from \"@blocknote/core\";\nimport { Link } from \"@react-email/components\";\n\n// Define the styles interface for configurable Link components\nexport interface ReactEmailLinkStyles {\n link?: Partial<React.ComponentPropsWithoutRef<typeof Link>>;\n}\n\n// Default styles for Link components\nexport const defaultReactEmailLinkStyles: ReactEmailLinkStyles = {\n link: {},\n};\n\nexport const createReactEmailInlineContentMappingForDefaultSchema = (\n linkStyles: ReactEmailLinkStyles = defaultReactEmailLinkStyles,\n): InlineContentMapping<\n DefaultInlineContentSchema,\n DefaultStyleSchema,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>,\n React.ReactElement<HTMLSpanElement>\n> => ({\n link: (ic, t) => {\n return (\n <Link href={ic.href} {...linkStyles.link}>\n {...ic.content.map((content) => {\n return t.transformStyledText(content);\n })}\n </Link>\n );\n },\n text: (ic, t) => {\n return t.transformStyledText(ic);\n },\n});\n\n// Export the original mapping for backward compatibility\nexport const reactEmailInlineContentMappingForDefaultSchema =\n createReactEmailInlineContentMappingForDefaultSchema();\n","import { DefaultStyleSchema, StyleMapping } from \"@blocknote/core\";\nimport { CSSProperties } from \"react\";\n\n// Define the styles interface for configurable style transformations\n// This can be extended in the future to allow customizing style transformations\nexport type ReactEmailStyleTransformStyles = Record<string, never>;\n\n// Default styles for style transformations\nexport const defaultReactEmailStyleTransformStyles: ReactEmailStyleTransformStyles =\n {};\n\nexport const createReactEmailStyleMappingForDefaultSchema = (\n _styleTransformStyles: ReactEmailStyleTransformStyles = defaultReactEmailStyleTransformStyles,\n): StyleMapping<DefaultStyleSchema, CSSProperties> => ({\n bold: (val) => {\n if (!val) {\n return {};\n }\n return {\n fontWeight: \"bold\",\n };\n },\n italic: (val) => {\n if (!val) {\n return {};\n }\n return {\n fontStyle: \"italic\",\n };\n },\n underline: (val) => {\n if (!val) {\n return {};\n }\n return {\n textDecoration: \"underline\", // TODO: could conflict with strike\n };\n },\n strike: (val) => {\n if (!val) {\n return {};\n }\n return {\n textDecoration: \"line-through\",\n };\n },\n backgroundColor: (val, exporter) => {\n if (!val) {\n return {};\n }\n return {\n backgroundColor:\n exporter.options.colors[val as keyof typeof exporter.options.colors]\n .background,\n };\n },\n textColor: (val, exporter) => {\n if (!val) {\n return {};\n }\n return {\n color:\n exporter.options.colors[val as keyof typeof exporter.options.colors]\n .text,\n };\n },\n code: (val) => {\n if (!val) {\n return {};\n }\n return {\n fontFamily: \"GeistMono\",\n };\n },\n});\n\n// Export the original mapping for backward compatibility\nexport const reactEmailStyleMappingForDefaultSchema =\n createReactEmailStyleMappingForDefaultSchema();\n","import {\n reactEmailBlockMappingForDefaultSchema,\n createReactEmailBlockMappingForDefaultSchema,\n type ReactEmailTextStyles,\n defaultReactEmailTextStyles,\n} from \"./blocks.js\";\nimport {\n reactEmailInlineContentMappingForDefaultSchema,\n createReactEmailInlineContentMappingForDefaultSchema,\n type ReactEmailLinkStyles,\n defaultReactEmailLinkStyles,\n} from \"./inlinecontent.js\";\nimport {\n reactEmailStyleMappingForDefaultSchema,\n createReactEmailStyleMappingForDefaultSchema,\n type ReactEmailStyleTransformStyles,\n defaultReactEmailStyleTransformStyles,\n} from \"./styles.js\";\n\n// Re-export for backward compatibility\nexport { reactEmailBlockMappingForDefaultSchema } from \"./blocks.js\";\nexport { reactEmailInlineContentMappingForDefaultSchema } from \"./inlinecontent.js\";\nexport { reactEmailStyleMappingForDefaultSchema } from \"./styles.js\";\n\n// Export the new configurable functions\nexport {\n createReactEmailBlockMappingForDefaultSchema,\n type ReactEmailTextStyles,\n defaultReactEmailTextStyles,\n} from \"./blocks.js\";\nexport {\n createReactEmailInlineContentMappingForDefaultSchema,\n type ReactEmailLinkStyles,\n defaultReactEmailLinkStyles,\n} from \"./inlinecontent.js\";\nexport {\n createReactEmailStyleMappingForDefaultSchema,\n type ReactEmailStyleTransformStyles,\n defaultReactEmailStyleTransformStyles,\n} from \"./styles.js\";\n\n// Export the combined styles interface\nexport interface ReactEmailDefaultSchemaStyles {\n textStyles?: ReactEmailTextStyles;\n linkStyles?: ReactEmailLinkStyles;\n styleTransformStyles?: ReactEmailStyleTransformStyles;\n}\n\n// Export the default combined styles\nexport const defaultReactEmailDefaultSchemaStyles: ReactEmailDefaultSchemaStyles =\n {\n textStyles: defaultReactEmailTextStyles,\n linkStyles: defaultReactEmailLinkStyles,\n styleTransformStyles: defaultReactEmailStyleTransformStyles,\n };\n\nexport const reactEmailDefaultSchemaMappings = {\n blockMapping: reactEmailBlockMappingForDefaultSchema,\n inlineContentMapping: reactEmailInlineContentMappingForDefaultSchema,\n styleMapping: reactEmailStyleMappingForDefaultSchema,\n};\n\nexport const reactEmailDefaultSchemaMappingsWithStyles = (\n styles: ReactEmailDefaultSchemaStyles = defaultReactEmailDefaultSchemaStyles,\n): typeof reactEmailDefaultSchemaMappings => {\n return {\n blockMapping: createReactEmailBlockMappingForDefaultSchema(\n styles.textStyles,\n ),\n inlineContentMapping: createReactEmailInlineContentMappingForDefaultSchema(\n styles.linkStyles,\n ),\n styleMapping: createReactEmailStyleMappingForDefaultSchema(\n styles.styleTransformStyles,\n ),\n };\n};\n","import {\n Block,\n BlockNoteSchema,\n BlockSchema,\n COLORS_DEFAULT,\n DefaultProps,\n Exporter,\n ExporterOptions,\n InlineContentSchema,\n StyleSchema,\n StyledText,\n} from \"@blocknote/core\";\nimport {\n Body,\n Head,\n Html,\n Link,\n Preview,\n Section,\n Tailwind,\n} from \"@react-email/components\";\nimport { render as renderEmail } from \"@react-email/render\";\nimport React, { CSSProperties } from \"react\";\n\nexport class ReactEmailExporter<\n B extends BlockSchema,\n S extends StyleSchema,\n I extends InlineContentSchema,\n> extends Exporter<\n B,\n I,\n S,\n React.ReactElement<any>,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>,\n CSSProperties,\n React.ReactElement<HTMLSpanElement>\n> {\n public constructor(\n public readonly schema: BlockNoteSchema<B, I, S>,\n mappings: Exporter<\n NoInfer<B>,\n NoInfer<I>,\n NoInfer<S>,\n React.ReactElement<any>,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>,\n CSSProperties,\n React.ReactElement<HTMLSpanElement>\n >[\"mappings\"],\n options?: Partial<ExporterOptions>,\n ) {\n const defaults = {\n colors: COLORS_DEFAULT,\n } satisfies Partial<ExporterOptions>;\n\n const newOptions = {\n ...defaults,\n ...options,\n };\n super(schema, mappings, newOptions);\n }\n\n public transformStyledText(styledText: StyledText<S>) {\n const stylesArray = this.mapStyles(styledText.styles);\n const styles = Object.assign({}, ...stylesArray);\n return (\n <span\n style={styles}\n dangerouslySetInnerHTML={{\n __html: styledText.text.replace(/\\n/g, \"<br />\"),\n }}\n />\n );\n }\n\n private async renderGroupedListBlocks(\n blocks: Block<B, I, S>[],\n startIndex: number,\n nestingLevel: number,\n ): Promise<{ element: React.ReactElement; nextIndex: number }> {\n const listType = blocks[startIndex].type;\n const listItems: React.ReactElement<any>[] = [];\n let j = startIndex;\n\n for (\n let itemIndex = 1;\n j < blocks.length && blocks[j].type === listType;\n j++, itemIndex++\n ) {\n const block = blocks[j];\n const liContent = (await this.mapBlock(\n block as any,\n nestingLevel,\n itemIndex,\n )) as any;\n let nestedList: React.ReactElement<any>[] = [];\n if (block.children && block.children.length > 0) {\n nestedList = await this.renderNestedLists(\n block.children,\n nestingLevel + 1,\n block.id,\n );\n }\n listItems.push(\n <li key={block.id}>\n {liContent}\n {nestedList.length > 0 && nestedList}\n </li>,\n );\n }\n let element: React.ReactElement;\n if (listType === \"bulletListItem\" || listType === \"toggleListItem\") {\n element = (\n <ul className=\"mb-2 list-disc pl-6\" key={blocks[startIndex].id + \"-ul\"}>\n {listItems}\n </ul>\n );\n } else {\n element = (\n <ol\n className=\"mb-2 list-decimal pl-6\"\n start={1}\n key={blocks[startIndex].id + \"-ol\"}\n >\n {listItems}\n </ol>\n );\n }\n return { element, nextIndex: j };\n }\n\n private async renderNestedLists(\n children: Block<B, I, S>[],\n nestingLevel: number,\n parentId: string,\n ): Promise<React.ReactElement<any>[]> {\n const nestedList: React.ReactElement<any>[] = [];\n let i = 0;\n while (i < children.length) {\n const child = children[i];\n if (\n child.type === \"bulletListItem\" ||\n child.type === \"numberedListItem\"\n ) {\n // Group consecutive list items of the same type\n const listType = child.type;\n const listItems: React.ReactElement<any>[] = [];\n let j = i;\n\n for (\n let itemIndex = 1;\n j < children.length && children[j].type === listType;\n j++, itemIndex++\n ) {\n const listItem = children[j];\n const liContent = (await this.mapBlock(\n listItem as any,\n nestingLevel,\n itemIndex,\n )) as any;\n const style = this.blocknoteDefaultPropsToReactEmailStyle(\n listItem.props as any,\n );\n let nestedContent: React.ReactElement<any>[] = [];\n if (listItem.children && listItem.children.length > 0) {\n // If children are list items, render as nested list; otherwise, as normal blocks\n if (\n listItem.children[0] &&\n (listItem.children[0].type === \"bulletListItem\" ||\n listItem.children[0].type === \"numberedListItem\")\n ) {\n nestedContent = await this.renderNestedLists(\n listItem.children,\n nestingLevel + 1,\n listItem.id,\n );\n } else {\n nestedContent = await this.transformBlocks(\n listItem.children,\n nestingLevel + 1,\n );\n }\n }\n listItems.push(\n <li key={listItem.id} style={style}>\n {liContent}\n {nestedContent.length > 0 && (\n <div style={{ marginTop: \"8px\" }}>{nestedContent}</div>\n )}\n </li>,\n );\n }\n if (listType === \"bulletListItem\") {\n nestedList.push(\n <ul\n className=\"mb-2 list-disc pl-6\"\n key={parentId + \"-ul-nested-\" + i}\n >\n {listItems}\n </ul>,\n );\n } else {\n nestedList.push(\n <ol\n className=\"mb-2 list-decimal pl-6\"\n start={1}\n key={parentId + \"-ol-nested-\" + i}\n >\n {listItems}\n </ol>,\n );\n }\n i = j;\n } else {\n // Non-list child, render as normal with indentation\n const childBlocks = await this.transformBlocks([child], nestingLevel);\n nestedList.push(\n <Section key={child.id} style={{ marginLeft: \"24px\" }}>\n {childBlocks}\n </Section>,\n );\n i++;\n }\n }\n return nestedList;\n }\n\n public async transformBlocks(\n blocks: Block<B, I, S>[],\n nestingLevel = 0,\n ): Promise<React.ReactElement<any>[]> {\n const ret: React.ReactElement<any>[] = [];\n let i = 0;\n while (i < blocks.length) {\n const b = blocks[i];\n if (\n b.type === \"bulletListItem\" ||\n b.type === \"numberedListItem\" ||\n b.type === \"toggleListItem\"\n ) {\n const { element, nextIndex } = await this.renderGroupedListBlocks(\n blocks,\n i,\n nestingLevel,\n );\n ret.push(element);\n i = nextIndex;\n continue;\n }\n // Non-list blocks\n const children = await this.transformBlocks(b.children, nestingLevel + 1);\n const self = (await this.mapBlock(b as any, nestingLevel, 0)) as any;\n const style = this.blocknoteDefaultPropsToReactEmailStyle(b.props as any);\n\n ret.push(\n <React.Fragment key={b.id}>\n {Object.entries(style).length > 0 ? (\n <div style={style}>{self}</div> // TODO: maybe nicer to set style on child element instead of wrapping in a div?\n ) : (\n self\n )}\n {children.length > 0 && (\n <div style={{ marginLeft: \"24px\" }}>{children}</div>\n )}\n </React.Fragment>,\n );\n i++;\n }\n return ret;\n }\n\n public async toReactEmailDocument(\n blocks: Block<B, I, S>[],\n options?: {\n /**\n * Inject elements into the {@link Head} element\n * @see https://react.email/docs/components/head\n */\n head?: React.ReactElement;\n /**\n * Set the preview text for the email\n * @see https://react.email/docs/components/preview\n */\n preview?: string | string[];\n /**\n * Add a header to every page.\n * The React component passed must be a React-Email component\n * @see https://react.email/components\n */\n header?: React.ReactElement;\n /**\n * Add a footer to every page.\n * The React component passed must be a React-Email component\n * @see https://react.email/components\n */\n footer?: React.ReactElement;\n /**\n * Customize the container element\n */\n container?: React.FC<{ children: React.ReactNode }>;\n /**\n * Customize the body styles\n * @default {\n * fontFamily: \"'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif\",\n * fontSize: \"16px\",\n * lineHeight: \"1.5\",\n * color: \"#333\",\n * }\n */\n bodyStyles?: CSSProperties;\n },\n ) {\n const transformedBlocks = await this.transformBlocks(blocks);\n const DefaultContainer =\n options?.container ||\n (({ children }: { children: React.ReactNode }) => (\n <React.Fragment>{children}</React.Fragment>\n ));\n const needsPolyfill = !globalThis.ReadableByteStreamController;\n if (needsPolyfill) {\n // needed for safari compatibility;\n // https://github.com/resend/react-email/blob/f02e21e998d507aa3fdfbb7b8639f915b8df6cb5/apps/docs/utilities/render.mdx#3-convert-to-html\n (globalThis as any).ReadableByteStreamController = (\n await import(\"web-streams-polyfill\")\n ).default.ReadableByteStreamController;\n }\n const ret = await renderEmail(\n <Html>\n <Head>{options?.head}</Head>\n <Body\n style={\n options?.bodyStyles ?? {\n fontFamily:\n \"'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif\",\n fontSize: \"16px\",\n lineHeight: \"1.5\",\n color: \"#333\",\n }\n }\n >\n {options?.preview && <Preview>{options.preview}</Preview>}\n <Tailwind>\n <DefaultContainer>\n {options?.header}\n {transformedBlocks}\n {options?.footer}\n </DefaultContainer>\n </Tailwind>\n </Body>\n </Html>,\n );\n if (needsPolyfill) {\n delete (globalThis as any).ReadableByteStreamController;\n }\n return ret;\n }\n\n protected blocknoteDefaultPropsToReactEmailStyle(\n props: Partial<DefaultProps>,\n ): CSSProperties {\n const style: CSSProperties = {\n textAlign:\n props.textAlignment === \"left\" ? undefined : props.textAlignment,\n backgroundColor:\n props.backgroundColor === \"default\" || !props.backgroundColor\n ? undefined\n : this.options.colors[props.backgroundColor]?.background,\n color:\n props.textColor === \"default\" || !props.textColor\n ? undefined\n : this.options.colors[props.textColor]?.text,\n alignItems:\n props.textAlignment === \"right\"\n ? \"flex-end\"\n : props.textAlignment === \"center\"\n ? \"center\"\n : undefined,\n };\n return Object.fromEntries(\n Object.entries(style).filter(([_, value]) => value !== undefined),\n );\n }\n}\n"],"mappings":";;;;;;AAwCA,IAAM,IAAuC;CAC3C,UAAU;CACV,YAAY;CACZ,QAAQ;CACR,WAAW;CACZ,EAGY,IAA8B;CACzC,WAAW,EACT,OAAO,GACR;CACD,gBAAgB,EACd,OAAO,GACR;CACD,gBAAgB,EACd,OAAO,GACR;CACD,kBAAkB,EAChB,OAAO,GACR;CACD,eAAe,EACb,OAAO,GACR;CACD,OAAO,EACL,OAAO,GACR;CACD,YAAY,EACV,OAAO,GACR;CACD,WAAW,EACT,OAAO,GACR;CACD,SAAS,EACP,OAAO,GACR;CACD,UAAU,EACR,OAAO;EACL,UAAU;EACV,QAAQ;EACT,EACF;CACD,UAAU,EACR,OAAO;EACL,UAAU;EACV,QAAQ;EACT,EACF;CACD,UAAU,EACR,OAAO;EACL,UAAU;EACV,QAAQ;EACT,EACF;CACD,UAAU,EACR,OAAO;EACL,UAAU;EACV,QAAQ;EACT,EACF;CACD,UAAU,EACR,OAAO;EACL,UAAU;EACV,QAAQ;EACT,EACF;CACD,UAAU,EACR,OAAO;EACL,UAAU;EACV,QAAQ;EACT,EACF;CACD,WAAW,EACT,OAAO,GACR;CACF,EAEY,KACX,IAAmC,OAS/B;CACJ,YAAY,GAAO,MAEf,kBAAC,GAAD;EACE,GAAI,EAAW;EACf,OAAO;GACL,GA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B,CAAC,WAAW;AAClC,EAAI,MAGD,WAAmB,gCAClB,MAAM,OAAO,yBACb,QAAQ;EAEZ,IAAM,IAAM,MAAM,EAChB,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UAAO,GAAS,MAAY,CAAA,EAC5B,kBAAC,GAAD;GACE,OACE,GAAS,cAAc;IACrB,YACE;IACF,UAAU;IACV,YAAY;IACZ,OAAO;IACR;aARL,CAWG,GAAS,WAAW,kBAAC,GAAD,EAAA,UAAU,EAAQ,SAAkB,CAAA,EACzD,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UAAA;IACG,GAAS;IACT;IACA,GAAS;IACO,EAAA,CAAA,EACV,CAAA,CACN;KACF,EAAA,CAAA,CACR;AAID,SAHI,KACF,OAAQ,WAAmB,8BAEtB;;CAGT,uCACE,GACe;EACf,IAAM,IAAuB;GAC3B,WACE,EAAM,kBAAkB,SAAS,KAAA,IAAY,EAAM;GACrD,iBACE,EAAM,oBAAoB,aAAa,CAAC,EAAM,kBAC1C,KAAA,IACA,KAAK,QAAQ,OAAO,EAAM,kBAAkB;GAClD,OACE,EAAM,cAAc,aAAa,CAAC,EAAM,YACpC,KAAA,IACA,KAAK,QAAQ,OAAO,EAAM,YAAY;GAC5C,YACE,EAAM,kBAAkB,UACpB,aACA,EAAM,kBAAkB,WACtB,WACA,KAAA;GACT;AACD,SAAO,OAAO,YACZ,OAAO,QAAQ,EAAM,CAAC,QAAQ,CAAC,GAAG,OAAW,MAAU,KAAA,EAAU,CAClE"}
1
+ {"version":3,"file":"blocknote-xl-email-exporter.js","names":[],"sources":["../src/react-email/defaultSchema/blocks.tsx","../src/react-email/defaultSchema/inlinecontent.tsx","../src/react-email/defaultSchema/styles.tsx","../src/react-email/defaultSchema/index.ts","../src/react-email/reactEmailExporter.tsx"],"sourcesContent":["import {\n BlockMapping,\n createPageBreakBlockConfig,\n DefaultBlockSchema,\n mapTableCell,\n} from \"@blocknote/core\";\nimport {\n CodeBlock,\n dracula,\n Heading,\n Img,\n Link,\n PrismLanguage,\n Text,\n} from \"@react-email/components\";\n\n// Define TextProps type based on React Email Text component\ntype TextProps = React.ComponentPropsWithoutRef<typeof Text>;\n\n// Define the styles interface for configurable Text components\nexport interface ReactEmailTextStyles {\n paragraph?: Partial<TextProps>;\n bulletListItem?: Partial<TextProps>;\n toggleListItem?: Partial<TextProps>;\n numberedListItem?: Partial<TextProps>;\n checkListItem?: Partial<TextProps>;\n quote?: Partial<TextProps>;\n tableError?: Partial<TextProps>;\n tableCell?: Partial<TextProps>;\n caption?: Partial<TextProps>;\n heading1?: Partial<TextProps>;\n heading2?: Partial<TextProps>;\n heading3?: Partial<TextProps>;\n heading4?: Partial<TextProps>;\n heading5?: Partial<TextProps>;\n heading6?: Partial<TextProps>;\n codeBlock?: Partial<React.ComponentProps<typeof CodeBlock>>;\n}\n\nconst defaultTextStyle: TextProps[\"style\"] = {\n fontSize: 16,\n lineHeight: 1.5,\n margin: 3,\n minHeight: 24,\n};\n\n// Default styles for Text components\nexport const defaultReactEmailTextStyles = {\n paragraph: {\n style: defaultTextStyle,\n },\n bulletListItem: {\n style: defaultTextStyle,\n },\n toggleListItem: {\n style: defaultTextStyle,\n },\n numberedListItem: {\n style: defaultTextStyle,\n },\n checkListItem: {\n style: defaultTextStyle,\n },\n quote: {\n style: defaultTextStyle,\n },\n tableError: {\n style: defaultTextStyle,\n },\n tableCell: {\n style: defaultTextStyle,\n },\n caption: {\n style: defaultTextStyle,\n },\n heading1: {\n style: {\n fontSize: 48,\n margin: 3,\n },\n },\n heading2: {\n style: {\n fontSize: 36,\n margin: 3,\n },\n },\n heading3: {\n style: {\n fontSize: 24,\n margin: 3,\n },\n },\n heading4: {\n style: {\n fontSize: 20,\n margin: 3,\n },\n },\n heading5: {\n style: {\n fontSize: 18,\n margin: 3,\n },\n },\n heading6: {\n style: {\n fontSize: 16,\n margin: 3,\n },\n },\n codeBlock: {\n style: defaultTextStyle,\n },\n} satisfies ReactEmailTextStyles;\n\nexport const createReactEmailBlockMappingForDefaultSchema = (\n textStyles: ReactEmailTextStyles = defaultReactEmailTextStyles,\n): BlockMapping<\n DefaultBlockSchema & {\n pageBreak: ReturnType<typeof createPageBreakBlockConfig>;\n },\n any,\n any,\n React.ReactElement<any>,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>\n> => ({\n paragraph: (block, t) => {\n return (\n <Text\n {...textStyles.paragraph}\n style={{\n ...defaultReactEmailTextStyles.paragraph.style,\n ...textStyles.paragraph?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n bulletListItem: (block, t) => {\n // Return only the <li> for grouping in the exporter\n return (\n <Text\n {...textStyles.bulletListItem}\n style={{\n ...defaultReactEmailTextStyles.bulletListItem.style,\n ...textStyles.bulletListItem?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n toggleListItem: (block, t) => {\n // Return only the <li> for grouping in the exporter\n return (\n <Text\n {...textStyles.toggleListItem}\n style={{\n ...defaultReactEmailTextStyles.toggleListItem.style,\n ...textStyles.toggleListItem?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n numberedListItem: (block, t, _nestingLevel) => {\n // Return only the <li> for grouping in the exporter\n return (\n <Text\n {...textStyles.numberedListItem}\n style={{\n ...defaultReactEmailTextStyles.numberedListItem.style,\n ...textStyles.numberedListItem?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n checkListItem: (block, t) => {\n // Render a checkbox using inline SVG for better appearance in email\n // block.props.checked should be true/false\n const checked = block.props?.checked;\n const checkboxSvg = checked ? (\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n style={{ display: \"inline\", verticalAlign: \"middle\", marginRight: 8 }}\n >\n <rect\n x=\"2\"\n y=\"2\"\n width=\"14\"\n height=\"14\"\n rx=\"3\"\n fill=\"#4F8A10\"\n stroke=\"#4F8A10\"\n strokeWidth=\"2\"\n />\n <polyline\n points=\"5,10 8,13 13,6\"\n fill=\"none\"\n stroke=\"#fff\"\n strokeWidth=\"2\"\n />\n </svg>\n ) : (\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n style={{ display: \"inline\", verticalAlign: \"middle\", marginRight: 8 }}\n >\n <rect\n x=\"2\"\n y=\"2\"\n width=\"14\"\n height=\"14\"\n rx=\"3\"\n fill=\"#fff\"\n stroke=\"#888\"\n strokeWidth=\"2\"\n />\n </svg>\n );\n return (\n <Text\n {...textStyles.checkListItem}\n style={{\n ...defaultReactEmailTextStyles.checkListItem.style,\n ...textStyles.checkListItem?.style,\n }}\n >\n {checkboxSvg}\n <span>{t.transformInlineContent(block.content)}</span>\n </Text>\n );\n },\n heading: (block, t) => {\n return (\n <Heading\n as={`h${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`}\n {...textStyles[`heading${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`]}\n style={{\n ...defaultReactEmailTextStyles[\n `heading${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`\n ].style,\n ...textStyles[`heading${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`]\n ?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Heading>\n );\n },\n\n codeBlock: (block) => {\n // Code blocks hold plain content: at most a single unstyled text item.\n const [textItem, ...excessItems] = block.content;\n if (excessItems.length > 0 || (textItem && !(\"text\" in textItem))) {\n throw new Error(\"expected plain block content to be a single text item\");\n }\n const textContent = textItem?.text ?? \"\";\n\n return (\n <CodeBlock\n code={textContent}\n fontFamily=\"'CommitMono', monospace\"\n language={block.props.language as PrismLanguage}\n theme={dracula}\n {...textStyles.codeBlock}\n style={{\n ...defaultReactEmailTextStyles.codeBlock.style,\n ...textStyles.codeBlock?.style,\n }}\n />\n );\n },\n audio: (block) => {\n // Audio icon SVG\n const icon = (\n <svg\n height=\"18\"\n width=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"#4F8A10\"\n style={{ display: \"inline\", verticalAlign: \"middle\" }}\n >\n <path d=\"M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z\" />\n </svg>\n );\n const previewWidth =\n \"previewWidth\" in block.props\n ? (block.props as any).previewWidth\n : undefined;\n return (\n <div style={{ margin: \"8px 0\" }}>\n <FileLink\n url={block.props.url}\n name={block.props.name}\n defaultText=\"Open audio file\"\n icon={icon}\n />\n <Caption\n caption={block.props.caption}\n width={previewWidth}\n textStyles={textStyles}\n />\n </div>\n );\n },\n video: (block) => {\n // Video icon SVG\n const icon = (\n <svg\n height=\"18\"\n width=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"#1976D2\"\n style={{ display: \"inline\", verticalAlign: \"middle\" }}\n >\n <path d=\"M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z\" />\n </svg>\n );\n const previewWidth =\n \"previewWidth\" in block.props\n ? (block.props as any).previewWidth\n : undefined;\n return (\n <div style={{ margin: \"8px 0\" }}>\n <FileLink\n url={block.props.url}\n name={block.props.name}\n defaultText=\"Open video file\"\n icon={icon}\n />\n <Caption\n caption={block.props.caption}\n width={previewWidth}\n textStyles={textStyles}\n />\n </div>\n );\n },\n file: (block) => {\n // File icon SVG\n const icon = (\n <svg\n height=\"18\"\n width=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"#888\"\n style={{ display: \"inline\", verticalAlign: \"middle\" }}\n >\n <path d=\"M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z\" />\n </svg>\n );\n const previewWidth =\n \"previewWidth\" in block.props\n ? (block.props as any).previewWidth\n : undefined;\n return (\n <div style={{ margin: \"8px 0\" }}>\n <FileLink\n url={block.props.url}\n name={block.props.name}\n defaultText=\"Open file\"\n icon={icon}\n />\n <Caption\n caption={block.props.caption}\n width={previewWidth}\n textStyles={textStyles}\n />\n </div>\n );\n },\n image: (block) => {\n return (\n <Img\n src={block.props.url}\n width={block.props.previewWidth}\n alt={block.props.caption}\n />\n );\n },\n table: (block, t) => {\n // Render table using standard HTML table elements for email compatibility\n const table = block.content;\n if (!table || typeof table !== \"object\" || !Array.isArray(table.rows)) {\n return <Text {...textStyles.tableError}>Table data not available</Text>;\n }\n const headerRowsCount = (table.headerRows as number) ?? 0;\n const headerColsCount = (table.headerCols as number) ?? 0;\n\n return (\n <table\n style={{\n borderCollapse: \"collapse\",\n width: \"100%\",\n margin: \"16px 0\",\n border: \"1px solid #ddd\",\n borderRadius: 4,\n overflow: \"hidden\",\n }}\n border={0}\n cellPadding={0}\n cellSpacing={0}\n >\n <tbody>\n {table.rows.map((row: any, rowIndex: number) => (\n <tr key={\"row-\" + rowIndex}>\n {row.cells.map((cell: any, colIndex: number) => {\n // Use mapTableCell to normalize table cell data into a standard interface\n // This handles partial cells, provides default values, and ensures consistent structure\n const normalizedCell = mapTableCell(cell);\n const isHeaderRow = rowIndex < headerRowsCount;\n const isHeaderCol = colIndex < headerColsCount;\n const isHeader = isHeaderRow || isHeaderCol;\n const CellTag = isHeader ? \"th\" : \"td\";\n return (\n <CellTag\n key={\"row_\" + rowIndex + \"_col_\" + colIndex}\n style={{\n border: \"1px solid #ddd\",\n padding: \"8px 12px\",\n background:\n normalizedCell.props.backgroundColor !== \"default\"\n ? t.options.colors[\n normalizedCell.props\n .backgroundColor as keyof typeof t.options.colors\n ].background\n : \"inherit\",\n fontWeight: isHeader ? \"bold\" : undefined,\n textAlign: normalizedCell.props.textAlignment || \"left\",\n color:\n normalizedCell.props.textColor !== \"default\"\n ? t.options.colors[\n normalizedCell.props\n .textColor as keyof typeof t.options.colors\n ].text\n : \"inherit\",\n ...defaultReactEmailTextStyles.tableCell.style,\n ...textStyles.tableCell?.style,\n }}\n {...((normalizedCell.props.colspan || 1) > 1 && {\n colSpan: normalizedCell.props.colspan || 1,\n })}\n {...((normalizedCell.props.rowspan || 1) > 1 && {\n rowSpan: normalizedCell.props.rowspan || 1,\n })}\n >\n {t.transformInlineContent(normalizedCell.content)}\n </CellTag>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n );\n },\n quote: (block, t) => {\n // Render block quote with a left border and subtle background for email compatibility\n return (\n <Text\n {...textStyles.quote}\n style={{\n borderLeft: \"2px solid #bdbdbd\",\n padding: \"0px 12px\",\n fontStyle: \"italic\",\n color: t.options.colors.gray.text,\n display: \"block\",\n ...defaultReactEmailTextStyles.quote.style,\n ...textStyles.quote?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n pageBreak: () => {\n // In email, a page break can be represented as a horizontal rule\n return (\n <hr\n style={{\n border: \"none\",\n borderTop: \"2px dashed #ccc\",\n margin: \"24px 0\",\n }}\n />\n );\n },\n divider: () => {\n return (\n <hr\n style={{\n border: \"none\",\n borderTop: \"1px solid #ccc\",\n margin: \"11.5px 0\",\n }}\n />\n );\n },\n});\n\n// Export the original mapping for backward compatibility\nexport const reactEmailBlockMappingForDefaultSchema =\n createReactEmailBlockMappingForDefaultSchema();\n\n// Helper for file-like blocks (audio, video, file)\nfunction FileLink({\n url,\n name,\n defaultText,\n icon,\n}: {\n url?: string;\n name?: string;\n defaultText: string;\n icon: React.ReactElement;\n}) {\n return (\n <Link\n href={url}\n style={{\n textDecoration: \"none\",\n color: \"#333\",\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 8,\n fontSize: 16,\n }}\n >\n {icon}\n <span style={{ verticalAlign: \"middle\" }}>{name || defaultText}</span>\n </Link>\n );\n}\n\nfunction Caption({\n caption,\n width,\n textStyles,\n}: {\n caption?: string;\n width?: number;\n textStyles: ReactEmailTextStyles;\n}) {\n if (!caption) {\n return null;\n }\n return (\n <Text\n {...textStyles.caption}\n style={{\n width,\n fontSize: 13,\n color: \"#888\",\n margin: \"4px 0 0 0\",\n ...defaultReactEmailTextStyles.caption.style,\n ...textStyles.caption?.style,\n }}\n >\n {caption}\n </Text>\n );\n}\n","import {\n DefaultInlineContentSchema,\n DefaultStyleSchema,\n InlineContentMapping,\n} from \"@blocknote/core\";\nimport { Link } from \"@react-email/components\";\n\n// Define the styles interface for configurable Link components\nexport interface ReactEmailLinkStyles {\n link?: Partial<React.ComponentPropsWithoutRef<typeof Link>>;\n}\n\n// Default styles for Link components\nexport const defaultReactEmailLinkStyles: ReactEmailLinkStyles = {\n link: {},\n};\n\nexport const createReactEmailInlineContentMappingForDefaultSchema = (\n linkStyles: ReactEmailLinkStyles = defaultReactEmailLinkStyles,\n): InlineContentMapping<\n DefaultInlineContentSchema,\n DefaultStyleSchema,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>,\n React.ReactElement<HTMLSpanElement>\n> => ({\n link: (ic, t) => {\n return (\n <Link href={ic.href} {...linkStyles.link}>\n {...ic.content.map((content) => {\n return t.transformStyledText(content);\n })}\n </Link>\n );\n },\n text: (ic, t) => {\n return t.transformStyledText(ic);\n },\n});\n\n// Export the original mapping for backward compatibility\nexport const reactEmailInlineContentMappingForDefaultSchema =\n createReactEmailInlineContentMappingForDefaultSchema();\n","import { DefaultStyleSchema, StyleMapping } from \"@blocknote/core\";\nimport { CSSProperties } from \"react\";\n\n// Define the styles interface for configurable style transformations\n// This can be extended in the future to allow customizing style transformations\nexport type ReactEmailStyleTransformStyles = Record<string, never>;\n\n// Default styles for style transformations\nexport const defaultReactEmailStyleTransformStyles: ReactEmailStyleTransformStyles =\n {};\n\nexport const createReactEmailStyleMappingForDefaultSchema = (\n _styleTransformStyles: ReactEmailStyleTransformStyles = defaultReactEmailStyleTransformStyles,\n): StyleMapping<DefaultStyleSchema, CSSProperties> => ({\n bold: (val) => {\n if (!val) {\n return {};\n }\n return {\n fontWeight: \"bold\",\n };\n },\n italic: (val) => {\n if (!val) {\n return {};\n }\n return {\n fontStyle: \"italic\",\n };\n },\n underline: (val) => {\n if (!val) {\n return {};\n }\n return {\n textDecoration: \"underline\", // TODO: could conflict with strike\n };\n },\n strike: (val) => {\n if (!val) {\n return {};\n }\n return {\n textDecoration: \"line-through\",\n };\n },\n backgroundColor: (val, exporter) => {\n if (!val) {\n return {};\n }\n return {\n backgroundColor:\n exporter.options.colors[val as keyof typeof exporter.options.colors]\n .background,\n };\n },\n textColor: (val, exporter) => {\n if (!val) {\n return {};\n }\n return {\n color:\n exporter.options.colors[val as keyof typeof exporter.options.colors]\n .text,\n };\n },\n code: (val) => {\n if (!val) {\n return {};\n }\n return {\n fontFamily: \"GeistMono\",\n };\n },\n});\n\n// Export the original mapping for backward compatibility\nexport const reactEmailStyleMappingForDefaultSchema =\n createReactEmailStyleMappingForDefaultSchema();\n","import {\n reactEmailBlockMappingForDefaultSchema,\n createReactEmailBlockMappingForDefaultSchema,\n type ReactEmailTextStyles,\n defaultReactEmailTextStyles,\n} from \"./blocks.js\";\nimport {\n reactEmailInlineContentMappingForDefaultSchema,\n createReactEmailInlineContentMappingForDefaultSchema,\n type ReactEmailLinkStyles,\n defaultReactEmailLinkStyles,\n} from \"./inlinecontent.js\";\nimport {\n reactEmailStyleMappingForDefaultSchema,\n createReactEmailStyleMappingForDefaultSchema,\n type ReactEmailStyleTransformStyles,\n defaultReactEmailStyleTransformStyles,\n} from \"./styles.js\";\n\n// Re-export for backward compatibility\nexport { reactEmailBlockMappingForDefaultSchema } from \"./blocks.js\";\nexport { reactEmailInlineContentMappingForDefaultSchema } from \"./inlinecontent.js\";\nexport { reactEmailStyleMappingForDefaultSchema } from \"./styles.js\";\n\n// Export the new configurable functions\nexport {\n createReactEmailBlockMappingForDefaultSchema,\n type ReactEmailTextStyles,\n defaultReactEmailTextStyles,\n} from \"./blocks.js\";\nexport {\n createReactEmailInlineContentMappingForDefaultSchema,\n type ReactEmailLinkStyles,\n defaultReactEmailLinkStyles,\n} from \"./inlinecontent.js\";\nexport {\n createReactEmailStyleMappingForDefaultSchema,\n type ReactEmailStyleTransformStyles,\n defaultReactEmailStyleTransformStyles,\n} from \"./styles.js\";\n\n// Export the combined styles interface\nexport interface ReactEmailDefaultSchemaStyles {\n textStyles?: ReactEmailTextStyles;\n linkStyles?: ReactEmailLinkStyles;\n styleTransformStyles?: ReactEmailStyleTransformStyles;\n}\n\n// Export the default combined styles\nexport const defaultReactEmailDefaultSchemaStyles: ReactEmailDefaultSchemaStyles =\n {\n textStyles: defaultReactEmailTextStyles,\n linkStyles: defaultReactEmailLinkStyles,\n styleTransformStyles: defaultReactEmailStyleTransformStyles,\n };\n\nexport const reactEmailDefaultSchemaMappings = {\n blockMapping: reactEmailBlockMappingForDefaultSchema,\n inlineContentMapping: reactEmailInlineContentMappingForDefaultSchema,\n styleMapping: reactEmailStyleMappingForDefaultSchema,\n};\n\nexport const reactEmailDefaultSchemaMappingsWithStyles = (\n styles: ReactEmailDefaultSchemaStyles = defaultReactEmailDefaultSchemaStyles,\n): typeof reactEmailDefaultSchemaMappings => {\n return {\n blockMapping: createReactEmailBlockMappingForDefaultSchema(\n styles.textStyles,\n ),\n inlineContentMapping: createReactEmailInlineContentMappingForDefaultSchema(\n styles.linkStyles,\n ),\n styleMapping: createReactEmailStyleMappingForDefaultSchema(\n styles.styleTransformStyles,\n ),\n };\n};\n","import {\n Block,\n BlockNoteSchema,\n BlockSchema,\n COLORS_DEFAULT,\n DefaultProps,\n Exporter,\n ExporterOptions,\n InlineContentSchema,\n StyleSchema,\n StyledText,\n} from \"@blocknote/core\";\nimport {\n Body,\n Head,\n Html,\n Link,\n Preview,\n Section,\n Tailwind,\n} from \"@react-email/components\";\nimport { render as renderEmail } from \"@react-email/render\";\nimport React, { CSSProperties } from \"react\";\n\nexport class ReactEmailExporter<\n B extends BlockSchema,\n S extends StyleSchema,\n I extends InlineContentSchema,\n> extends Exporter<\n B,\n I,\n S,\n React.ReactElement<any>,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>,\n CSSProperties,\n React.ReactElement<HTMLSpanElement>\n> {\n public constructor(\n public readonly schema: BlockNoteSchema<B, I, S>,\n mappings: Exporter<\n NoInfer<B>,\n NoInfer<I>,\n NoInfer<S>,\n React.ReactElement<any>,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>,\n CSSProperties,\n React.ReactElement<HTMLSpanElement>\n >[\"mappings\"],\n options?: Partial<ExporterOptions>,\n ) {\n const defaults = {\n colors: COLORS_DEFAULT,\n } satisfies Partial<ExporterOptions>;\n\n const newOptions = {\n ...defaults,\n ...options,\n };\n super(schema, mappings, newOptions);\n }\n\n public transformStyledText(styledText: StyledText<S>) {\n const stylesArray = this.mapStyles(styledText.styles);\n const styles = Object.assign({}, ...stylesArray);\n return (\n <span\n style={styles}\n dangerouslySetInnerHTML={{\n __html: styledText.text.replace(/\\n/g, \"<br />\"),\n }}\n />\n );\n }\n\n private async renderGroupedListBlocks(\n blocks: Block<B, I, S>[],\n startIndex: number,\n nestingLevel: number,\n ): Promise<{ element: React.ReactElement; nextIndex: number }> {\n const listType = blocks[startIndex].type;\n const listItems: React.ReactElement<any>[] = [];\n let j = startIndex;\n\n for (\n let itemIndex = 1;\n j < blocks.length && blocks[j].type === listType;\n j++, itemIndex++\n ) {\n const block = blocks[j];\n const liContent = (await this.mapBlock(\n block as any,\n nestingLevel,\n itemIndex,\n )) as any;\n let nestedList: React.ReactElement<any>[] = [];\n if (block.children && block.children.length > 0) {\n nestedList = await this.renderNestedLists(\n block.children,\n nestingLevel + 1,\n block.id,\n );\n }\n listItems.push(\n <li key={block.id}>\n {liContent}\n {nestedList.length > 0 && nestedList}\n </li>,\n );\n }\n let element: React.ReactElement;\n if (listType === \"bulletListItem\" || listType === \"toggleListItem\") {\n element = (\n <ul className=\"mb-2 list-disc pl-6\" key={blocks[startIndex].id + \"-ul\"}>\n {listItems}\n </ul>\n );\n } else {\n element = (\n <ol\n className=\"mb-2 list-decimal pl-6\"\n start={1}\n key={blocks[startIndex].id + \"-ol\"}\n >\n {listItems}\n </ol>\n );\n }\n return { element, nextIndex: j };\n }\n\n private async renderNestedLists(\n children: Block<B, I, S>[],\n nestingLevel: number,\n parentId: string,\n ): Promise<React.ReactElement<any>[]> {\n const nestedList: React.ReactElement<any>[] = [];\n let i = 0;\n while (i < children.length) {\n const child = children[i];\n if (\n child.type === \"bulletListItem\" ||\n child.type === \"numberedListItem\"\n ) {\n // Group consecutive list items of the same type\n const listType = child.type;\n const listItems: React.ReactElement<any>[] = [];\n let j = i;\n\n for (\n let itemIndex = 1;\n j < children.length && children[j].type === listType;\n j++, itemIndex++\n ) {\n const listItem = children[j];\n const liContent = (await this.mapBlock(\n listItem as any,\n nestingLevel,\n itemIndex,\n )) as any;\n const style = this.blocknoteDefaultPropsToReactEmailStyle(\n listItem.props as any,\n );\n let nestedContent: React.ReactElement<any>[] = [];\n if (listItem.children && listItem.children.length > 0) {\n // If children are list items, render as nested list; otherwise, as normal blocks\n if (\n listItem.children[0] &&\n (listItem.children[0].type === \"bulletListItem\" ||\n listItem.children[0].type === \"numberedListItem\")\n ) {\n nestedContent = await this.renderNestedLists(\n listItem.children,\n nestingLevel + 1,\n listItem.id,\n );\n } else {\n nestedContent = await this.transformBlocks(\n listItem.children,\n nestingLevel + 1,\n );\n }\n }\n listItems.push(\n <li key={listItem.id} style={style}>\n {liContent}\n {nestedContent.length > 0 && (\n <div style={{ marginTop: \"8px\" }}>{nestedContent}</div>\n )}\n </li>,\n );\n }\n if (listType === \"bulletListItem\") {\n nestedList.push(\n <ul\n className=\"mb-2 list-disc pl-6\"\n key={parentId + \"-ul-nested-\" + i}\n >\n {listItems}\n </ul>,\n );\n } else {\n nestedList.push(\n <ol\n className=\"mb-2 list-decimal pl-6\"\n start={1}\n key={parentId + \"-ol-nested-\" + i}\n >\n {listItems}\n </ol>,\n );\n }\n i = j;\n } else {\n // Non-list child, render as normal with indentation\n const childBlocks = await this.transformBlocks([child], nestingLevel);\n nestedList.push(\n <Section key={child.id} style={{ marginLeft: \"24px\" }}>\n {childBlocks}\n </Section>,\n );\n i++;\n }\n }\n return nestedList;\n }\n\n public async transformBlocks(\n blocks: Block<B, I, S>[],\n nestingLevel = 0,\n ): Promise<React.ReactElement<any>[]> {\n const ret: React.ReactElement<any>[] = [];\n let i = 0;\n while (i < blocks.length) {\n const b = blocks[i];\n if (\n b.type === \"bulletListItem\" ||\n b.type === \"numberedListItem\" ||\n b.type === \"toggleListItem\"\n ) {\n const { element, nextIndex } = await this.renderGroupedListBlocks(\n blocks,\n i,\n nestingLevel,\n );\n ret.push(element);\n i = nextIndex;\n continue;\n }\n // Non-list blocks\n const children = await this.transformBlocks(b.children, nestingLevel + 1);\n const self = (await this.mapBlock(b as any, nestingLevel, 0)) as any;\n const style = this.blocknoteDefaultPropsToReactEmailStyle(b.props as any);\n\n ret.push(\n <React.Fragment key={b.id}>\n {Object.entries(style).length > 0 ? (\n <div style={style}>{self}</div> // TODO: maybe nicer to set style on child element instead of wrapping in a div?\n ) : (\n self\n )}\n {children.length > 0 && (\n <div style={{ marginLeft: \"24px\" }}>{children}</div>\n )}\n </React.Fragment>,\n );\n i++;\n }\n return ret;\n }\n\n public async toReactEmailDocument(\n blocks: Block<B, I, S>[],\n options?: {\n /**\n * Inject elements into the {@link Head} element\n * @see https://react.email/docs/components/head\n */\n head?: React.ReactElement;\n /**\n * Set the preview text for the email\n * @see https://react.email/docs/components/preview\n */\n preview?: string | string[];\n /**\n * Add a header to every page.\n * The React component passed must be a React-Email component\n * @see https://react.email/components\n */\n header?: React.ReactElement;\n /**\n * Add a footer to every page.\n * The React component passed must be a React-Email component\n * @see https://react.email/components\n */\n footer?: React.ReactElement;\n /**\n * Customize the container element\n */\n container?: React.FC<{ children: React.ReactNode }>;\n /**\n * Customize the body styles\n * @default {\n * fontFamily: \"'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif\",\n * fontSize: \"16px\",\n * lineHeight: \"1.5\",\n * color: \"#333\",\n * }\n */\n bodyStyles?: CSSProperties;\n },\n ) {\n const transformedBlocks = await this.transformBlocks(blocks);\n const DefaultContainer =\n options?.container ||\n (({ children }: { children: React.ReactNode }) => (\n <React.Fragment>{children}</React.Fragment>\n ));\n const needsPolyfill = !globalThis.ReadableByteStreamController;\n if (needsPolyfill) {\n // needed for safari compatibility;\n // https://github.com/resend/react-email/blob/f02e21e998d507aa3fdfbb7b8639f915b8df6cb5/apps/docs/utilities/render.mdx#3-convert-to-html\n (globalThis as any).ReadableByteStreamController = (\n await import(\"web-streams-polyfill\")\n ).default.ReadableByteStreamController;\n }\n const ret = await renderEmail(\n <Html>\n <Head>{options?.head}</Head>\n <Body\n style={\n options?.bodyStyles ?? {\n fontFamily:\n \"'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif\",\n fontSize: \"16px\",\n lineHeight: \"1.5\",\n color: \"#333\",\n }\n }\n >\n {options?.preview && <Preview>{options.preview}</Preview>}\n <Tailwind>\n <DefaultContainer>\n {options?.header}\n {transformedBlocks}\n {options?.footer}\n </DefaultContainer>\n </Tailwind>\n </Body>\n </Html>,\n );\n if (needsPolyfill) {\n delete (globalThis as any).ReadableByteStreamController;\n }\n return ret;\n }\n\n protected blocknoteDefaultPropsToReactEmailStyle(\n props: Partial<DefaultProps>,\n ): CSSProperties {\n const style: CSSProperties = {\n textAlign:\n props.textAlignment === \"left\" ? undefined : props.textAlignment,\n backgroundColor:\n props.backgroundColor === \"default\" || !props.backgroundColor\n ? undefined\n : this.options.colors[props.backgroundColor]?.background,\n color:\n props.textColor === \"default\" || !props.textColor\n ? undefined\n : this.options.colors[props.textColor]?.text,\n alignItems:\n props.textAlignment === \"right\"\n ? \"flex-end\"\n : props.textAlignment === \"center\"\n ? \"center\"\n : undefined,\n };\n return Object.fromEntries(\n Object.entries(style).filter(([_, value]) => value !== undefined),\n );\n }\n}\n"],"mappings":";;;;;;AAuCA,IAAM,IAAuC;CAC3C,UAAU;CACV,YAAY;CACZ,QAAQ;CACR,WAAW;AACb,GAGa,IAA8B;CACzC,WAAW,EACT,OAAO,EACT;CACA,gBAAgB,EACd,OAAO,EACT;CACA,gBAAgB,EACd,OAAO,EACT;CACA,kBAAkB,EAChB,OAAO,EACT;CACA,eAAe,EACb,OAAO,EACT;CACA,OAAO,EACL,OAAO,EACT;CACA,YAAY,EACV,OAAO,EACT;CACA,WAAW,EACT,OAAO,EACT;CACA,SAAS,EACP,OAAO,EACT;CACA,UAAU,EACR,OAAO;EACL,UAAU;EACV,QAAQ;CACV,EACF;CACA,UAAU,EACR,OAAO;EACL,UAAU;EACV,QAAQ;CACV,EACF;CACA,UAAU,EACR,OAAO;EACL,UAAU;EACV,QAAQ;CACV,EACF;CACA,UAAU,EACR,OAAO;EACL,UAAU;EACV,QAAQ;CACV,EACF;CACA,UAAU,EACR,OAAO;EACL,UAAU;EACV,QAAQ;CACV,EACF;CACA,UAAU,EACR,OAAO;EACL,UAAU;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AO,QAAQ,CAAK,EAAE,QAAQ,CAAC,GAAG,OAAW,MAAU,KAAA,CAAS,CAClE;CACF;AACF"}
@@ -1,2 +1,2 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`@blocknote/core`),require(`@react-email/components`),require(`react/jsx-runtime`),require(`@react-email/render`),require(`react`)):typeof define==`function`&&define.amd?define([`exports`,`@blocknote/core`,`@react-email/components`,`react/jsx-runtime`,`@react-email/render`,`react`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`blocknote-xl-email-exporter`]={},e._blocknote_core,e._react_email_components,e.react_jsx_runtime,e._react_email_render,e.react))})(this,function(e,t,n,r,i,a){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var o=Object.create,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,f=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=l(t),a=0,o=i.length,u;a<o;a++)u=i[a],!d.call(e,u)&&u!==n&&s(e,u,{get:(e=>t[e]).bind(null,u),enumerable:!(r=c(t,u))||r.enumerable});return e};a=((e,t,n)=>(n=e==null?{}:o(u(e)),f(t||!e||!e.__esModule?s(n,`default`,{value:e,enumerable:!0}):n,e)))(a,1);var p={fontSize:16,lineHeight:1.5,margin:3,minHeight:24},m={paragraph:{style:p},bulletListItem:{style:p},toggleListItem:{style:p},numberedListItem:{style:p},checkListItem:{style:p},quote:{style:p},tableError:{style:p},tableCell:{style:p},caption:{style:p},heading1:{style:{fontSize:48,margin:3}},heading2:{style:{fontSize:36,margin:3}},heading3:{style:{fontSize:24,margin:3}},heading4:{style:{fontSize:20,margin:3}},heading5:{style:{fontSize:18,margin:3}},heading6:{style:{fontSize:16,margin:3}},codeBlock:{style:p}},h=(e=m)=>({paragraph:(t,i)=>(0,r.jsx)(n.Text,{...e.paragraph,style:{...m.paragraph.style,...e.paragraph?.style},children:i.transformInlineContent(t.content)}),bulletListItem:(t,i)=>(0,r.jsx)(n.Text,{...e.bulletListItem,style:{...m.bulletListItem.style,...e.bulletListItem?.style},children:i.transformInlineContent(t.content)}),toggleListItem:(t,i)=>(0,r.jsx)(n.Text,{...e.toggleListItem,style:{...m.toggleListItem.style,...e.toggleListItem?.style},children:i.transformInlineContent(t.content)}),numberedListItem:(t,i,a)=>(0,r.jsx)(n.Text,{...e.numberedListItem,style:{...m.numberedListItem.style,...e.numberedListItem?.style},children:i.transformInlineContent(t.content)}),checkListItem:(t,i)=>{let a=t.props?.checked?(0,r.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 18 18`,style:{display:`inline`,verticalAlign:`middle`,marginRight:8},children:[(0,r.jsx)(`rect`,{x:`2`,y:`2`,width:`14`,height:`14`,rx:`3`,fill:`#4F8A10`,stroke:`#4F8A10`,strokeWidth:`2`}),(0,r.jsx)(`polyline`,{points:`5,10 8,13 13,6`,fill:`none`,stroke:`#fff`,strokeWidth:`2`})]}):(0,r.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 18 18`,style:{display:`inline`,verticalAlign:`middle`,marginRight:8},children:(0,r.jsx)(`rect`,{x:`2`,y:`2`,width:`14`,height:`14`,rx:`3`,fill:`#fff`,stroke:`#888`,strokeWidth:`2`})});return(0,r.jsxs)(n.Text,{...e.checkListItem,style:{...m.checkListItem.style,...e.checkListItem?.style},children:[a,(0,r.jsx)(`span`,{children:i.transformInlineContent(t.content)})]})},heading:(t,i)=>(0,r.jsx)(n.Heading,{as:`h${t.props.level}`,...e[`heading${t.props.level}`],style:{...m[`heading${t.props.level}`].style,...e[`heading${t.props.level}`]?.style},children:i.transformInlineContent(t.content)}),codeBlock:t=>(0,r.jsx)(n.CodeBlock,{code:t.content[0]?.text||``,fontFamily:`'CommitMono', monospace`,language:t.props.language,theme:n.dracula,...e.codeBlock,style:{...m.codeBlock.style,...e.codeBlock?.style}}),audio:t=>{let n=(0,r.jsx)(`svg`,{height:`18`,width:`18`,viewBox:`0 0 24 24`,fill:`#4F8A10`,style:{display:`inline`,verticalAlign:`middle`},children:(0,r.jsx)(`path`,{d:`M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z`})}),i=`previewWidth`in t.props?t.props.previewWidth:void 0;return(0,r.jsxs)(`div`,{style:{margin:`8px 0`},children:[(0,r.jsx)(_,{url:t.props.url,name:t.props.name,defaultText:`Open audio file`,icon:n}),(0,r.jsx)(v,{caption:t.props.caption,width:i,textStyles:e})]})},video:t=>{let n=(0,r.jsx)(`svg`,{height:`18`,width:`18`,viewBox:`0 0 24 24`,fill:`#1976D2`,style:{display:`inline`,verticalAlign:`middle`},children:(0,r.jsx)(`path`,{d:`M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z`})}),i=`previewWidth`in t.props?t.props.previewWidth:void 0;return(0,r.jsxs)(`div`,{style:{margin:`8px 0`},children:[(0,r.jsx)(_,{url:t.props.url,name:t.props.name,defaultText:`Open video file`,icon:n}),(0,r.jsx)(v,{caption:t.props.caption,width:i,textStyles:e})]})},file:t=>{let n=(0,r.jsx)(`svg`,{height:`18`,width:`18`,viewBox:`0 0 24 24`,fill:`#888`,style:{display:`inline`,verticalAlign:`middle`},children:(0,r.jsx)(`path`,{d:`M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z`})}),i=`previewWidth`in t.props?t.props.previewWidth:void 0;return(0,r.jsxs)(`div`,{style:{margin:`8px 0`},children:[(0,r.jsx)(_,{url:t.props.url,name:t.props.name,defaultText:`Open file`,icon:n}),(0,r.jsx)(v,{caption:t.props.caption,width:i,textStyles:e})]})},image:e=>(0,r.jsx)(n.Img,{src:e.props.url,width:e.props.previewWidth,alt:e.props.caption}),table:(i,a)=>{let o=i.content;if(!o||typeof o!=`object`||!Array.isArray(o.rows))return(0,r.jsx)(n.Text,{...e.tableError,children:`Table data not available`});let s=o.headerRows??0,c=o.headerCols??0;return(0,r.jsx)(`table`,{style:{borderCollapse:`collapse`,width:`100%`,margin:`16px 0`,border:`1px solid #ddd`,borderRadius:4,overflow:`hidden`},border:0,cellPadding:0,cellSpacing:0,children:(0,r.jsx)(`tbody`,{children:o.rows.map((n,i)=>(0,r.jsx)(`tr`,{children:n.cells.map((n,o)=>{let l=(0,t.mapTableCell)(n),u=i<s||o<c;return(0,r.jsx)(u?`th`:`td`,{style:{border:`1px solid #ddd`,padding:`8px 12px`,background:l.props.backgroundColor===`default`?`inherit`:a.options.colors[l.props.backgroundColor].background,fontWeight:u?`bold`:void 0,textAlign:l.props.textAlignment||`left`,color:l.props.textColor===`default`?`inherit`:a.options.colors[l.props.textColor].text,...m.tableCell.style,...e.tableCell?.style},...(l.props.colspan||1)>1&&{colSpan:l.props.colspan||1},...(l.props.rowspan||1)>1&&{rowSpan:l.props.rowspan||1},children:a.transformInlineContent(l.content)},`row_`+i+`_col_`+o)})},`row-`+i))})})},quote:(t,i)=>(0,r.jsx)(n.Text,{...e.quote,style:{borderLeft:`2px solid #bdbdbd`,padding:`0px 12px`,fontStyle:`italic`,color:i.options.colors.gray.text,display:`block`,...m.quote.style,...e.quote?.style},children:i.transformInlineContent(t.content)}),pageBreak:()=>(0,r.jsx)(`hr`,{style:{border:`none`,borderTop:`2px dashed #ccc`,margin:`24px 0`}}),divider:()=>(0,r.jsx)(`hr`,{style:{border:`none`,borderTop:`1px solid #ccc`,margin:`11.5px 0`}})}),g=h();function _({url:e,name:t,defaultText:i,icon:a}){return(0,r.jsxs)(n.Link,{href:e,style:{textDecoration:`none`,color:`#333`,display:`inline-flex`,alignItems:`center`,gap:8,fontSize:16},children:[a,(0,r.jsx)(`span`,{style:{verticalAlign:`middle`},children:t||i})]})}function v({caption:e,width:t,textStyles:i}){return e?(0,r.jsx)(n.Text,{...i.caption,style:{width:t,fontSize:13,color:`#888`,margin:`4px 0 0 0`,...m.caption.style,...i.caption?.style},children:e}):null}var y={link:{}},b=(e=y)=>({link:(t,i)=>(0,r.jsx)(n.Link,{href:t.href,...e.link,children:[...t.content.map(e=>i.transformStyledText(e))]}),text:(e,t)=>t.transformStyledText(e)}),x=b(),S={},C=(e=S)=>({bold:e=>e?{fontWeight:`bold`}:{},italic:e=>e?{fontStyle:`italic`}:{},underline:e=>e?{textDecoration:`underline`}:{},strike:e=>e?{textDecoration:`line-through`}:{},backgroundColor:(e,t)=>e?{backgroundColor:t.options.colors[e].background}:{},textColor:(e,t)=>e?{color:t.options.colors[e].text}:{},code:e=>e?{fontFamily:`GeistMono`}:{}}),w=C(),T={textStyles:m,linkStyles:y,styleTransformStyles:S},E={blockMapping:g,inlineContentMapping:x,styleMapping:w};e.ReactEmailExporter=class extends t.Exporter{constructor(e,n,r){let i={colors:t.COLORS_DEFAULT,...r};super(e,n,i),this.schema=e}transformStyledText(e){let t=this.mapStyles(e.styles);return(0,r.jsx)(`span`,{style:Object.assign({},...t),dangerouslySetInnerHTML:{__html:e.text.replace(/\n/g,`<br />`)}})}async renderGroupedListBlocks(e,t,n){let i=e[t].type,a=[],o=t;for(let t=1;o<e.length&&e[o].type===i;o++,t++){let i=e[o],s=await this.mapBlock(i,n,t),c=[];i.children&&i.children.length>0&&(c=await this.renderNestedLists(i.children,n+1,i.id)),a.push((0,r.jsxs)(`li`,{children:[s,c.length>0&&c]},i.id))}let s;return s=i===`bulletListItem`||i===`toggleListItem`?(0,r.jsx)(`ul`,{className:`mb-2 list-disc pl-6`,children:a},e[t].id+`-ul`):(0,r.jsx)(`ol`,{className:`mb-2 list-decimal pl-6`,start:1,children:a},e[t].id+`-ol`),{element:s,nextIndex:o}}async renderNestedLists(e,t,i){let a=[],o=0;for(;o<e.length;){let s=e[o];if(s.type===`bulletListItem`||s.type===`numberedListItem`){let n=s.type,c=[],l=o;for(let i=1;l<e.length&&e[l].type===n;l++,i++){let n=e[l],a=await this.mapBlock(n,t,i),o=this.blocknoteDefaultPropsToReactEmailStyle(n.props),s=[];n.children&&n.children.length>0&&(s=n.children[0]&&(n.children[0].type===`bulletListItem`||n.children[0].type===`numberedListItem`)?await this.renderNestedLists(n.children,t+1,n.id):await this.transformBlocks(n.children,t+1)),c.push((0,r.jsxs)(`li`,{style:o,children:[a,s.length>0&&(0,r.jsx)(`div`,{style:{marginTop:`8px`},children:s})]},n.id))}n===`bulletListItem`?a.push((0,r.jsx)(`ul`,{className:`mb-2 list-disc pl-6`,children:c},i+`-ul-nested-`+o)):a.push((0,r.jsx)(`ol`,{className:`mb-2 list-decimal pl-6`,start:1,children:c},i+`-ol-nested-`+o)),o=l}else{let e=await this.transformBlocks([s],t);a.push((0,r.jsx)(n.Section,{style:{marginLeft:`24px`},children:e},s.id)),o++}}return a}async transformBlocks(e,t=0){let n=[],i=0;for(;i<e.length;){let o=e[i];if(o.type===`bulletListItem`||o.type===`numberedListItem`||o.type===`toggleListItem`){let{element:r,nextIndex:a}=await this.renderGroupedListBlocks(e,i,t);n.push(r),i=a;continue}let s=await this.transformBlocks(o.children,t+1),c=await this.mapBlock(o,t,0),l=this.blocknoteDefaultPropsToReactEmailStyle(o.props);n.push((0,r.jsxs)(a.default.Fragment,{children:[Object.entries(l).length>0?(0,r.jsx)(`div`,{style:l,children:c}):c,s.length>0&&(0,r.jsx)(`div`,{style:{marginLeft:`24px`},children:s})]},o.id)),i++}return n}async toReactEmailDocument(e,t){let o=await this.transformBlocks(e),s=t?.container||(({children:e})=>(0,r.jsx)(a.default.Fragment,{children:e})),c=!globalThis.ReadableByteStreamController;c&&(globalThis.ReadableByteStreamController=(await import(`web-streams-polyfill`)).default.ReadableByteStreamController);let l=await(0,i.render)((0,r.jsxs)(n.Html,{children:[(0,r.jsx)(n.Head,{children:t?.head}),(0,r.jsxs)(n.Body,{style:t?.bodyStyles??{fontFamily:`'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif`,fontSize:`16px`,lineHeight:`1.5`,color:`#333`},children:[t?.preview&&(0,r.jsx)(n.Preview,{children:t.preview}),(0,r.jsx)(n.Tailwind,{children:(0,r.jsxs)(s,{children:[t?.header,o,t?.footer]})})]})]}));return c&&delete globalThis.ReadableByteStreamController,l}blocknoteDefaultPropsToReactEmailStyle(e){let t={textAlign:e.textAlignment===`left`?void 0:e.textAlignment,backgroundColor:e.backgroundColor===`default`||!e.backgroundColor?void 0:this.options.colors[e.backgroundColor]?.background,color:e.textColor===`default`||!e.textColor?void 0:this.options.colors[e.textColor]?.text,alignItems:e.textAlignment===`right`?`flex-end`:e.textAlignment===`center`?`center`:void 0};return Object.fromEntries(Object.entries(t).filter(([e,t])=>t!==void 0))}},e.createReactEmailBlockMappingForDefaultSchema=h,e.createReactEmailInlineContentMappingForDefaultSchema=b,e.createReactEmailStyleMappingForDefaultSchema=C,e.defaultReactEmailDefaultSchemaStyles=T,e.defaultReactEmailLinkStyles=y,e.defaultReactEmailStyleTransformStyles=S,e.defaultReactEmailTextStyles=m,e.reactEmailBlockMappingForDefaultSchema=g,e.reactEmailDefaultSchemaMappings=E,e.reactEmailDefaultSchemaMappingsWithStyles=(e=T)=>({blockMapping:h(e.textStyles),inlineContentMapping:b(e.linkStyles),styleMapping:C(e.styleTransformStyles)}),e.reactEmailInlineContentMappingForDefaultSchema=x,e.reactEmailStyleMappingForDefaultSchema=w});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@blocknote/core"),require("@react-email/components"),require("react/jsx-runtime"),require("@react-email/render"),require("react")):typeof define==`function`&&define.amd?define([`exports`,`@blocknote/core`,`@react-email/components`,`react/jsx-runtime`,`@react-email/render`,`react`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`blocknote-xl-email-exporter`]={},e._blocknote_core,e._react_email_components,e.react_jsx_runtime,e._react_email_render,e.react))})(this,function(e,t,n,r,i,a){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var o=Object.create,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,f=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=l(t),a=0,o=i.length,u;a<o;a++)u=i[a],!d.call(e,u)&&u!==n&&s(e,u,{get:(e=>t[e]).bind(null,u),enumerable:!(r=c(t,u))||r.enumerable});return e};a=((e,t,n)=>(n=e==null?{}:o(u(e)),f(t||!e||!e.__esModule?s(n,`default`,{value:e,enumerable:!0}):n,e)))(a,1);var p={fontSize:16,lineHeight:1.5,margin:3,minHeight:24},m={paragraph:{style:p},bulletListItem:{style:p},toggleListItem:{style:p},numberedListItem:{style:p},checkListItem:{style:p},quote:{style:p},tableError:{style:p},tableCell:{style:p},caption:{style:p},heading1:{style:{fontSize:48,margin:3}},heading2:{style:{fontSize:36,margin:3}},heading3:{style:{fontSize:24,margin:3}},heading4:{style:{fontSize:20,margin:3}},heading5:{style:{fontSize:18,margin:3}},heading6:{style:{fontSize:16,margin:3}},codeBlock:{style:p}},h=(e=m)=>({paragraph:(t,i)=>(0,r.jsx)(n.Text,{...e.paragraph,style:{...m.paragraph.style,...e.paragraph?.style},children:i.transformInlineContent(t.content)}),bulletListItem:(t,i)=>(0,r.jsx)(n.Text,{...e.bulletListItem,style:{...m.bulletListItem.style,...e.bulletListItem?.style},children:i.transformInlineContent(t.content)}),toggleListItem:(t,i)=>(0,r.jsx)(n.Text,{...e.toggleListItem,style:{...m.toggleListItem.style,...e.toggleListItem?.style},children:i.transformInlineContent(t.content)}),numberedListItem:(t,i,a)=>(0,r.jsx)(n.Text,{...e.numberedListItem,style:{...m.numberedListItem.style,...e.numberedListItem?.style},children:i.transformInlineContent(t.content)}),checkListItem:(t,i)=>{let a=t.props?.checked?(0,r.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 18 18`,style:{display:`inline`,verticalAlign:`middle`,marginRight:8},children:[(0,r.jsx)(`rect`,{x:`2`,y:`2`,width:`14`,height:`14`,rx:`3`,fill:`#4F8A10`,stroke:`#4F8A10`,strokeWidth:`2`}),(0,r.jsx)(`polyline`,{points:`5,10 8,13 13,6`,fill:`none`,stroke:`#fff`,strokeWidth:`2`})]}):(0,r.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 18 18`,style:{display:`inline`,verticalAlign:`middle`,marginRight:8},children:(0,r.jsx)(`rect`,{x:`2`,y:`2`,width:`14`,height:`14`,rx:`3`,fill:`#fff`,stroke:`#888`,strokeWidth:`2`})});return(0,r.jsxs)(n.Text,{...e.checkListItem,style:{...m.checkListItem.style,...e.checkListItem?.style},children:[a,(0,r.jsx)(`span`,{children:i.transformInlineContent(t.content)})]})},heading:(t,i)=>(0,r.jsx)(n.Heading,{as:`h${t.props.level}`,...e[`heading${t.props.level}`],style:{...m[`heading${t.props.level}`].style,...e[`heading${t.props.level}`]?.style},children:i.transformInlineContent(t.content)}),codeBlock:t=>{let[i,...a]=t.content;if(a.length>0||i&&!(`text`in i))throw Error(`expected plain block content to be a single text item`);return(0,r.jsx)(n.CodeBlock,{code:i?.text??``,fontFamily:`'CommitMono', monospace`,language:t.props.language,theme:n.dracula,...e.codeBlock,style:{...m.codeBlock.style,...e.codeBlock?.style}})},audio:t=>{let n=(0,r.jsx)(`svg`,{height:`18`,width:`18`,viewBox:`0 0 24 24`,fill:`#4F8A10`,style:{display:`inline`,verticalAlign:`middle`},children:(0,r.jsx)(`path`,{d:`M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z`})}),i=`previewWidth`in t.props?t.props.previewWidth:void 0;return(0,r.jsxs)(`div`,{style:{margin:`8px 0`},children:[(0,r.jsx)(_,{url:t.props.url,name:t.props.name,defaultText:`Open audio file`,icon:n}),(0,r.jsx)(v,{caption:t.props.caption,width:i,textStyles:e})]})},video:t=>{let n=(0,r.jsx)(`svg`,{height:`18`,width:`18`,viewBox:`0 0 24 24`,fill:`#1976D2`,style:{display:`inline`,verticalAlign:`middle`},children:(0,r.jsx)(`path`,{d:`M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z`})}),i=`previewWidth`in t.props?t.props.previewWidth:void 0;return(0,r.jsxs)(`div`,{style:{margin:`8px 0`},children:[(0,r.jsx)(_,{url:t.props.url,name:t.props.name,defaultText:`Open video file`,icon:n}),(0,r.jsx)(v,{caption:t.props.caption,width:i,textStyles:e})]})},file:t=>{let n=(0,r.jsx)(`svg`,{height:`18`,width:`18`,viewBox:`0 0 24 24`,fill:`#888`,style:{display:`inline`,verticalAlign:`middle`},children:(0,r.jsx)(`path`,{d:`M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z`})}),i=`previewWidth`in t.props?t.props.previewWidth:void 0;return(0,r.jsxs)(`div`,{style:{margin:`8px 0`},children:[(0,r.jsx)(_,{url:t.props.url,name:t.props.name,defaultText:`Open file`,icon:n}),(0,r.jsx)(v,{caption:t.props.caption,width:i,textStyles:e})]})},image:e=>(0,r.jsx)(n.Img,{src:e.props.url,width:e.props.previewWidth,alt:e.props.caption}),table:(i,a)=>{let o=i.content;if(!o||typeof o!=`object`||!Array.isArray(o.rows))return(0,r.jsx)(n.Text,{...e.tableError,children:`Table data not available`});let s=o.headerRows??0,c=o.headerCols??0;return(0,r.jsx)(`table`,{style:{borderCollapse:`collapse`,width:`100%`,margin:`16px 0`,border:`1px solid #ddd`,borderRadius:4,overflow:`hidden`},border:0,cellPadding:0,cellSpacing:0,children:(0,r.jsx)(`tbody`,{children:o.rows.map((n,i)=>(0,r.jsx)(`tr`,{children:n.cells.map((n,o)=>{let l=(0,t.mapTableCell)(n),u=i<s||o<c;return(0,r.jsx)(u?`th`:`td`,{style:{border:`1px solid #ddd`,padding:`8px 12px`,background:l.props.backgroundColor==="default"?`inherit`:a.options.colors[l.props.backgroundColor].background,fontWeight:u?`bold`:void 0,textAlign:l.props.textAlignment||`left`,color:l.props.textColor==="default"?`inherit`:a.options.colors[l.props.textColor].text,...m.tableCell.style,...e.tableCell?.style},...(l.props.colspan||1)>1&&{colSpan:l.props.colspan||1},...(l.props.rowspan||1)>1&&{rowSpan:l.props.rowspan||1},children:a.transformInlineContent(l.content)},`row_`+i+`_col_`+o)})},`row-`+i))})})},quote:(t,i)=>(0,r.jsx)(n.Text,{...e.quote,style:{borderLeft:`2px solid #bdbdbd`,padding:`0px 12px`,fontStyle:`italic`,color:i.options.colors.gray.text,display:`block`,...m.quote.style,...e.quote?.style},children:i.transformInlineContent(t.content)}),pageBreak:()=>(0,r.jsx)(`hr`,{style:{border:`none`,borderTop:`2px dashed #ccc`,margin:`24px 0`}}),divider:()=>(0,r.jsx)(`hr`,{style:{border:`none`,borderTop:`1px solid #ccc`,margin:`11.5px 0`}})}),g=h();function _({url:e,name:t,defaultText:i,icon:a}){return(0,r.jsxs)(n.Link,{href:e,style:{textDecoration:`none`,color:`#333`,display:`inline-flex`,alignItems:`center`,gap:8,fontSize:16},children:[a,(0,r.jsx)(`span`,{style:{verticalAlign:`middle`},children:t||i})]})}function v({caption:e,width:t,textStyles:i}){return e?(0,r.jsx)(n.Text,{...i.caption,style:{width:t,fontSize:13,color:`#888`,margin:`4px 0 0 0`,...m.caption.style,...i.caption?.style},children:e}):null}var y={link:{}},b=(e=y)=>({link:(t,i)=>(0,r.jsx)(n.Link,{href:t.href,...e.link,children:[...t.content.map(e=>i.transformStyledText(e))]}),text:(e,t)=>t.transformStyledText(e)}),x=b(),S={},C=(e=S)=>({bold:e=>e?{fontWeight:`bold`}:{},italic:e=>e?{fontStyle:`italic`}:{},underline:e=>e?{textDecoration:`underline`}:{},strike:e=>e?{textDecoration:`line-through`}:{},backgroundColor:(e,t)=>e?{backgroundColor:t.options.colors[e].background}:{},textColor:(e,t)=>e?{color:t.options.colors[e].text}:{},code:e=>e?{fontFamily:`GeistMono`}:{}}),w=C(),T={textStyles:m,linkStyles:y,styleTransformStyles:S},E={blockMapping:g,inlineContentMapping:x,styleMapping:w};e.ReactEmailExporter=class extends t.Exporter{schema;constructor(e,n,r){let i={colors:t.COLORS_DEFAULT,...r};super(e,n,i),this.schema=e}transformStyledText(e){let t=this.mapStyles(e.styles);return(0,r.jsx)(`span`,{style:Object.assign({},...t),dangerouslySetInnerHTML:{__html:e.text.replace(/\n/g,`<br />`)}})}async renderGroupedListBlocks(e,t,n){let i=e[t].type,a=[],o=t;for(let t=1;o<e.length&&e[o].type===i;o++,t++){let i=e[o],s=await this.mapBlock(i,n,t),c=[];i.children&&i.children.length>0&&(c=await this.renderNestedLists(i.children,n+1,i.id)),a.push((0,r.jsxs)(`li`,{children:[s,c.length>0&&c]},i.id))}let s;return s=i===`bulletListItem`||i===`toggleListItem`?(0,r.jsx)(`ul`,{className:`mb-2 list-disc pl-6`,children:a},e[t].id+`-ul`):(0,r.jsx)(`ol`,{className:`mb-2 list-decimal pl-6`,start:1,children:a},e[t].id+`-ol`),{element:s,nextIndex:o}}async renderNestedLists(e,t,i){let a=[],o=0;for(;o<e.length;){let s=e[o];if(s.type===`bulletListItem`||s.type===`numberedListItem`){let n=s.type,c=[],l=o;for(let i=1;l<e.length&&e[l].type===n;l++,i++){let n=e[l],a=await this.mapBlock(n,t,i),o=this.blocknoteDefaultPropsToReactEmailStyle(n.props),s=[];n.children&&n.children.length>0&&(s=n.children[0]&&(n.children[0].type===`bulletListItem`||n.children[0].type===`numberedListItem`)?await this.renderNestedLists(n.children,t+1,n.id):await this.transformBlocks(n.children,t+1)),c.push((0,r.jsxs)(`li`,{style:o,children:[a,s.length>0&&(0,r.jsx)(`div`,{style:{marginTop:`8px`},children:s})]},n.id))}n===`bulletListItem`?a.push((0,r.jsx)(`ul`,{className:`mb-2 list-disc pl-6`,children:c},i+`-ul-nested-`+o)):a.push((0,r.jsx)(`ol`,{className:`mb-2 list-decimal pl-6`,start:1,children:c},i+`-ol-nested-`+o)),o=l}else{let e=await this.transformBlocks([s],t);a.push((0,r.jsx)(n.Section,{style:{marginLeft:`24px`},children:e},s.id)),o++}}return a}async transformBlocks(e,t=0){let n=[],i=0;for(;i<e.length;){let o=e[i];if(o.type===`bulletListItem`||o.type===`numberedListItem`||o.type===`toggleListItem`){let{element:r,nextIndex:a}=await this.renderGroupedListBlocks(e,i,t);n.push(r),i=a;continue}let s=await this.transformBlocks(o.children,t+1),c=await this.mapBlock(o,t,0),l=this.blocknoteDefaultPropsToReactEmailStyle(o.props);n.push((0,r.jsxs)(a.default.Fragment,{children:[Object.entries(l).length>0?(0,r.jsx)(`div`,{style:l,children:c}):c,s.length>0&&(0,r.jsx)(`div`,{style:{marginLeft:`24px`},children:s})]},o.id)),i++}return n}async toReactEmailDocument(e,t){let o=await this.transformBlocks(e),s=t?.container||(({children:e})=>(0,r.jsx)(a.default.Fragment,{children:e})),c=!globalThis.ReadableByteStreamController;c&&(globalThis.ReadableByteStreamController=(await import(`web-streams-polyfill`)).default.ReadableByteStreamController);let l=await(0,i.render)((0,r.jsxs)(n.Html,{children:[(0,r.jsx)(n.Head,{children:t?.head}),(0,r.jsxs)(n.Body,{style:t?.bodyStyles??{fontFamily:`'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif`,fontSize:`16px`,lineHeight:`1.5`,color:`#333`},children:[t?.preview&&(0,r.jsx)(n.Preview,{children:t.preview}),(0,r.jsx)(n.Tailwind,{children:(0,r.jsxs)(s,{children:[t?.header,o,t?.footer]})})]})]}));return c&&delete globalThis.ReadableByteStreamController,l}blocknoteDefaultPropsToReactEmailStyle(e){let t={textAlign:e.textAlignment===`left`?void 0:e.textAlignment,backgroundColor:e.backgroundColor==="default"||!e.backgroundColor?void 0:this.options.colors[e.backgroundColor]?.background,color:e.textColor==="default"||!e.textColor?void 0:this.options.colors[e.textColor]?.text,alignItems:e.textAlignment===`right`?`flex-end`:e.textAlignment===`center`?`center`:void 0};return Object.fromEntries(Object.entries(t).filter(([e,t])=>t!==void 0))}},e.createReactEmailBlockMappingForDefaultSchema=h,e.createReactEmailInlineContentMappingForDefaultSchema=b,e.createReactEmailStyleMappingForDefaultSchema=C,e.defaultReactEmailDefaultSchemaStyles=T,e.defaultReactEmailLinkStyles=y,e.defaultReactEmailStyleTransformStyles=S,e.defaultReactEmailTextStyles=m,e.reactEmailBlockMappingForDefaultSchema=g,e.reactEmailDefaultSchemaMappings=E,e.reactEmailDefaultSchemaMappingsWithStyles=(e=T)=>({blockMapping:h(e.textStyles),inlineContentMapping:b(e.linkStyles),styleMapping:C(e.styleTransformStyles)}),e.reactEmailInlineContentMappingForDefaultSchema=x,e.reactEmailStyleMappingForDefaultSchema=w});
2
2
  //# sourceMappingURL=blocknote-xl-email-exporter.umd.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"blocknote-xl-email-exporter.umd.cjs","names":[],"sources":["../src/react-email/defaultSchema/blocks.tsx","../src/react-email/defaultSchema/inlinecontent.tsx","../src/react-email/defaultSchema/styles.tsx","../src/react-email/defaultSchema/index.ts","../src/react-email/reactEmailExporter.tsx"],"sourcesContent":["import {\n BlockMapping,\n createPageBreakBlockConfig,\n DefaultBlockSchema,\n mapTableCell,\n StyledText,\n} from \"@blocknote/core\";\nimport {\n CodeBlock,\n dracula,\n Heading,\n Img,\n Link,\n PrismLanguage,\n Text,\n} from \"@react-email/components\";\n\n// Define TextProps type based on React Email Text component\ntype TextProps = React.ComponentPropsWithoutRef<typeof Text>;\n\n// Define the styles interface for configurable Text components\nexport interface ReactEmailTextStyles {\n paragraph?: Partial<TextProps>;\n bulletListItem?: Partial<TextProps>;\n toggleListItem?: Partial<TextProps>;\n numberedListItem?: Partial<TextProps>;\n checkListItem?: Partial<TextProps>;\n quote?: Partial<TextProps>;\n tableError?: Partial<TextProps>;\n tableCell?: Partial<TextProps>;\n caption?: Partial<TextProps>;\n heading1?: Partial<TextProps>;\n heading2?: Partial<TextProps>;\n heading3?: Partial<TextProps>;\n heading4?: Partial<TextProps>;\n heading5?: Partial<TextProps>;\n heading6?: Partial<TextProps>;\n codeBlock?: Partial<React.ComponentProps<typeof CodeBlock>>;\n}\n\nconst defaultTextStyle: TextProps[\"style\"] = {\n fontSize: 16,\n lineHeight: 1.5,\n margin: 3,\n minHeight: 24,\n};\n\n// Default styles for Text components\nexport const defaultReactEmailTextStyles = {\n paragraph: {\n style: defaultTextStyle,\n },\n bulletListItem: {\n style: defaultTextStyle,\n },\n toggleListItem: {\n style: defaultTextStyle,\n },\n numberedListItem: {\n style: defaultTextStyle,\n },\n checkListItem: {\n style: defaultTextStyle,\n },\n quote: {\n style: defaultTextStyle,\n },\n tableError: {\n style: defaultTextStyle,\n },\n tableCell: {\n style: defaultTextStyle,\n },\n caption: {\n style: defaultTextStyle,\n },\n heading1: {\n style: {\n fontSize: 48,\n margin: 3,\n },\n },\n heading2: {\n style: {\n fontSize: 36,\n margin: 3,\n },\n },\n heading3: {\n style: {\n fontSize: 24,\n margin: 3,\n },\n },\n heading4: {\n style: {\n fontSize: 20,\n margin: 3,\n },\n },\n heading5: {\n style: {\n fontSize: 18,\n margin: 3,\n },\n },\n heading6: {\n style: {\n fontSize: 16,\n margin: 3,\n },\n },\n codeBlock: {\n style: defaultTextStyle,\n },\n} satisfies ReactEmailTextStyles;\n\nexport const createReactEmailBlockMappingForDefaultSchema = (\n textStyles: ReactEmailTextStyles = defaultReactEmailTextStyles,\n): BlockMapping<\n DefaultBlockSchema & {\n pageBreak: ReturnType<typeof createPageBreakBlockConfig>;\n },\n any,\n any,\n React.ReactElement<any>,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>\n> => ({\n paragraph: (block, t) => {\n return (\n <Text\n {...textStyles.paragraph}\n style={{\n ...defaultReactEmailTextStyles.paragraph.style,\n ...textStyles.paragraph?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n bulletListItem: (block, t) => {\n // Return only the <li> for grouping in the exporter\n return (\n <Text\n {...textStyles.bulletListItem}\n style={{\n ...defaultReactEmailTextStyles.bulletListItem.style,\n ...textStyles.bulletListItem?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n toggleListItem: (block, t) => {\n // Return only the <li> for grouping in the exporter\n return (\n <Text\n {...textStyles.toggleListItem}\n style={{\n ...defaultReactEmailTextStyles.toggleListItem.style,\n ...textStyles.toggleListItem?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n numberedListItem: (block, t, _nestingLevel) => {\n // Return only the <li> for grouping in the exporter\n return (\n <Text\n {...textStyles.numberedListItem}\n style={{\n ...defaultReactEmailTextStyles.numberedListItem.style,\n ...textStyles.numberedListItem?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n checkListItem: (block, t) => {\n // Render a checkbox using inline SVG for better appearance in email\n // block.props.checked should be true/false\n const checked = block.props?.checked;\n const checkboxSvg = checked ? (\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n style={{ display: \"inline\", verticalAlign: \"middle\", marginRight: 8 }}\n >\n <rect\n x=\"2\"\n y=\"2\"\n width=\"14\"\n height=\"14\"\n rx=\"3\"\n fill=\"#4F8A10\"\n stroke=\"#4F8A10\"\n strokeWidth=\"2\"\n />\n <polyline\n points=\"5,10 8,13 13,6\"\n fill=\"none\"\n stroke=\"#fff\"\n strokeWidth=\"2\"\n />\n </svg>\n ) : (\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n style={{ display: \"inline\", verticalAlign: \"middle\", marginRight: 8 }}\n >\n <rect\n x=\"2\"\n y=\"2\"\n width=\"14\"\n height=\"14\"\n rx=\"3\"\n fill=\"#fff\"\n stroke=\"#888\"\n strokeWidth=\"2\"\n />\n </svg>\n );\n return (\n <Text\n {...textStyles.checkListItem}\n style={{\n ...defaultReactEmailTextStyles.checkListItem.style,\n ...textStyles.checkListItem?.style,\n }}\n >\n {checkboxSvg}\n <span>{t.transformInlineContent(block.content)}</span>\n </Text>\n );\n },\n heading: (block, t) => {\n return (\n <Heading\n as={`h${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`}\n {...textStyles[`heading${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`]}\n style={{\n ...defaultReactEmailTextStyles[\n `heading${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`\n ].style,\n ...textStyles[`heading${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`]\n ?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Heading>\n );\n },\n\n codeBlock: (block) => {\n const textContent = (block.content as StyledText<any>[])[0]?.text || \"\";\n\n return (\n <CodeBlock\n code={textContent}\n fontFamily=\"'CommitMono', monospace\"\n language={block.props.language as PrismLanguage}\n theme={dracula}\n {...textStyles.codeBlock}\n style={{\n ...defaultReactEmailTextStyles.codeBlock.style,\n ...textStyles.codeBlock?.style,\n }}\n />\n );\n },\n audio: (block) => {\n // Audio icon SVG\n const icon = (\n <svg\n height=\"18\"\n width=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"#4F8A10\"\n style={{ display: \"inline\", verticalAlign: \"middle\" }}\n >\n <path d=\"M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z\" />\n </svg>\n );\n const previewWidth =\n \"previewWidth\" in block.props\n ? (block.props as any).previewWidth\n : undefined;\n return (\n <div style={{ margin: \"8px 0\" }}>\n <FileLink\n url={block.props.url}\n name={block.props.name}\n defaultText=\"Open audio file\"\n icon={icon}\n />\n <Caption\n caption={block.props.caption}\n width={previewWidth}\n textStyles={textStyles}\n />\n </div>\n );\n },\n video: (block) => {\n // Video icon SVG\n const icon = (\n <svg\n height=\"18\"\n width=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"#1976D2\"\n style={{ display: \"inline\", verticalAlign: \"middle\" }}\n >\n <path d=\"M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z\" />\n </svg>\n );\n const previewWidth =\n \"previewWidth\" in block.props\n ? (block.props as any).previewWidth\n : undefined;\n return (\n <div style={{ margin: \"8px 0\" }}>\n <FileLink\n url={block.props.url}\n name={block.props.name}\n defaultText=\"Open video file\"\n icon={icon}\n />\n <Caption\n caption={block.props.caption}\n width={previewWidth}\n textStyles={textStyles}\n />\n </div>\n );\n },\n file: (block) => {\n // File icon SVG\n const icon = (\n <svg\n height=\"18\"\n width=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"#888\"\n style={{ display: \"inline\", verticalAlign: \"middle\" }}\n >\n <path d=\"M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z\" />\n </svg>\n );\n const previewWidth =\n \"previewWidth\" in block.props\n ? (block.props as any).previewWidth\n : undefined;\n return (\n <div style={{ margin: \"8px 0\" }}>\n <FileLink\n url={block.props.url}\n name={block.props.name}\n defaultText=\"Open file\"\n icon={icon}\n />\n <Caption\n caption={block.props.caption}\n width={previewWidth}\n textStyles={textStyles}\n />\n </div>\n );\n },\n image: (block) => {\n return (\n <Img\n src={block.props.url}\n width={block.props.previewWidth}\n alt={block.props.caption}\n />\n );\n },\n table: (block, t) => {\n // Render table using standard HTML table elements for email compatibility\n const table = block.content;\n if (!table || typeof table !== \"object\" || !Array.isArray(table.rows)) {\n return <Text {...textStyles.tableError}>Table data not available</Text>;\n }\n const headerRowsCount = (table.headerRows as number) ?? 0;\n const headerColsCount = (table.headerCols as number) ?? 0;\n\n return (\n <table\n style={{\n borderCollapse: \"collapse\",\n width: \"100%\",\n margin: \"16px 0\",\n border: \"1px solid #ddd\",\n borderRadius: 4,\n overflow: \"hidden\",\n }}\n border={0}\n cellPadding={0}\n cellSpacing={0}\n >\n <tbody>\n {table.rows.map((row: any, rowIndex: number) => (\n <tr key={\"row-\" + rowIndex}>\n {row.cells.map((cell: any, colIndex: number) => {\n // Use mapTableCell to normalize table cell data into a standard interface\n // This handles partial cells, provides default values, and ensures consistent structure\n const normalizedCell = mapTableCell(cell);\n const isHeaderRow = rowIndex < headerRowsCount;\n const isHeaderCol = colIndex < headerColsCount;\n const isHeader = isHeaderRow || isHeaderCol;\n const CellTag = isHeader ? \"th\" : \"td\";\n return (\n <CellTag\n key={\"row_\" + rowIndex + \"_col_\" + colIndex}\n style={{\n border: \"1px solid #ddd\",\n padding: \"8px 12px\",\n background:\n normalizedCell.props.backgroundColor !== \"default\"\n ? t.options.colors[\n normalizedCell.props\n .backgroundColor as keyof typeof t.options.colors\n ].background\n : \"inherit\",\n fontWeight: isHeader ? \"bold\" : undefined,\n textAlign: normalizedCell.props.textAlignment || \"left\",\n color:\n normalizedCell.props.textColor !== \"default\"\n ? t.options.colors[\n normalizedCell.props\n .textColor as keyof typeof t.options.colors\n ].text\n : \"inherit\",\n ...defaultReactEmailTextStyles.tableCell.style,\n ...textStyles.tableCell?.style,\n }}\n {...((normalizedCell.props.colspan || 1) > 1 && {\n colSpan: normalizedCell.props.colspan || 1,\n })}\n {...((normalizedCell.props.rowspan || 1) > 1 && {\n rowSpan: normalizedCell.props.rowspan || 1,\n })}\n >\n {t.transformInlineContent(normalizedCell.content)}\n </CellTag>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n );\n },\n quote: (block, t) => {\n // Render block quote with a left border and subtle background for email compatibility\n return (\n <Text\n {...textStyles.quote}\n style={{\n borderLeft: \"2px solid #bdbdbd\",\n padding: \"0px 12px\",\n fontStyle: \"italic\",\n color: t.options.colors.gray.text,\n display: \"block\",\n ...defaultReactEmailTextStyles.quote.style,\n ...textStyles.quote?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n pageBreak: () => {\n // In email, a page break can be represented as a horizontal rule\n return (\n <hr\n style={{\n border: \"none\",\n borderTop: \"2px dashed #ccc\",\n margin: \"24px 0\",\n }}\n />\n );\n },\n divider: () => {\n return (\n <hr\n style={{\n border: \"none\",\n borderTop: \"1px solid #ccc\",\n margin: \"11.5px 0\",\n }}\n />\n );\n },\n});\n\n// Export the original mapping for backward compatibility\nexport const reactEmailBlockMappingForDefaultSchema =\n createReactEmailBlockMappingForDefaultSchema();\n\n// Helper for file-like blocks (audio, video, file)\nfunction FileLink({\n url,\n name,\n defaultText,\n icon,\n}: {\n url?: string;\n name?: string;\n defaultText: string;\n icon: React.ReactElement;\n}) {\n return (\n <Link\n href={url}\n style={{\n textDecoration: \"none\",\n color: \"#333\",\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 8,\n fontSize: 16,\n }}\n >\n {icon}\n <span style={{ verticalAlign: \"middle\" }}>{name || defaultText}</span>\n </Link>\n );\n}\n\nfunction Caption({\n caption,\n width,\n textStyles,\n}: {\n caption?: string;\n width?: number;\n textStyles: ReactEmailTextStyles;\n}) {\n if (!caption) {\n return null;\n }\n return (\n <Text\n {...textStyles.caption}\n style={{\n width,\n fontSize: 13,\n color: \"#888\",\n margin: \"4px 0 0 0\",\n ...defaultReactEmailTextStyles.caption.style,\n ...textStyles.caption?.style,\n }}\n >\n {caption}\n </Text>\n );\n}\n","import {\n DefaultInlineContentSchema,\n DefaultStyleSchema,\n InlineContentMapping,\n} from \"@blocknote/core\";\nimport { Link } from \"@react-email/components\";\n\n// Define the styles interface for configurable Link components\nexport interface ReactEmailLinkStyles {\n link?: Partial<React.ComponentPropsWithoutRef<typeof Link>>;\n}\n\n// Default styles for Link components\nexport const defaultReactEmailLinkStyles: ReactEmailLinkStyles = {\n link: {},\n};\n\nexport const createReactEmailInlineContentMappingForDefaultSchema = (\n linkStyles: ReactEmailLinkStyles = defaultReactEmailLinkStyles,\n): InlineContentMapping<\n DefaultInlineContentSchema,\n DefaultStyleSchema,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>,\n React.ReactElement<HTMLSpanElement>\n> => ({\n link: (ic, t) => {\n return (\n <Link href={ic.href} {...linkStyles.link}>\n {...ic.content.map((content) => {\n return t.transformStyledText(content);\n })}\n </Link>\n );\n },\n text: (ic, t) => {\n return t.transformStyledText(ic);\n },\n});\n\n// Export the original mapping for backward compatibility\nexport const reactEmailInlineContentMappingForDefaultSchema =\n createReactEmailInlineContentMappingForDefaultSchema();\n","import { DefaultStyleSchema, StyleMapping } from \"@blocknote/core\";\nimport { CSSProperties } from \"react\";\n\n// Define the styles interface for configurable style transformations\n// This can be extended in the future to allow customizing style transformations\nexport type ReactEmailStyleTransformStyles = Record<string, never>;\n\n// Default styles for style transformations\nexport const defaultReactEmailStyleTransformStyles: ReactEmailStyleTransformStyles =\n {};\n\nexport const createReactEmailStyleMappingForDefaultSchema = (\n _styleTransformStyles: ReactEmailStyleTransformStyles = defaultReactEmailStyleTransformStyles,\n): StyleMapping<DefaultStyleSchema, CSSProperties> => ({\n bold: (val) => {\n if (!val) {\n return {};\n }\n return {\n fontWeight: \"bold\",\n };\n },\n italic: (val) => {\n if (!val) {\n return {};\n }\n return {\n fontStyle: \"italic\",\n };\n },\n underline: (val) => {\n if (!val) {\n return {};\n }\n return {\n textDecoration: \"underline\", // TODO: could conflict with strike\n };\n },\n strike: (val) => {\n if (!val) {\n return {};\n }\n return {\n textDecoration: \"line-through\",\n };\n },\n backgroundColor: (val, exporter) => {\n if (!val) {\n return {};\n }\n return {\n backgroundColor:\n exporter.options.colors[val as keyof typeof exporter.options.colors]\n .background,\n };\n },\n textColor: (val, exporter) => {\n if (!val) {\n return {};\n }\n return {\n color:\n exporter.options.colors[val as keyof typeof exporter.options.colors]\n .text,\n };\n },\n code: (val) => {\n if (!val) {\n return {};\n }\n return {\n fontFamily: \"GeistMono\",\n };\n },\n});\n\n// Export the original mapping for backward compatibility\nexport const reactEmailStyleMappingForDefaultSchema =\n createReactEmailStyleMappingForDefaultSchema();\n","import {\n reactEmailBlockMappingForDefaultSchema,\n createReactEmailBlockMappingForDefaultSchema,\n type ReactEmailTextStyles,\n defaultReactEmailTextStyles,\n} from \"./blocks.js\";\nimport {\n reactEmailInlineContentMappingForDefaultSchema,\n createReactEmailInlineContentMappingForDefaultSchema,\n type ReactEmailLinkStyles,\n defaultReactEmailLinkStyles,\n} from \"./inlinecontent.js\";\nimport {\n reactEmailStyleMappingForDefaultSchema,\n createReactEmailStyleMappingForDefaultSchema,\n type ReactEmailStyleTransformStyles,\n defaultReactEmailStyleTransformStyles,\n} from \"./styles.js\";\n\n// Re-export for backward compatibility\nexport { reactEmailBlockMappingForDefaultSchema } from \"./blocks.js\";\nexport { reactEmailInlineContentMappingForDefaultSchema } from \"./inlinecontent.js\";\nexport { reactEmailStyleMappingForDefaultSchema } from \"./styles.js\";\n\n// Export the new configurable functions\nexport {\n createReactEmailBlockMappingForDefaultSchema,\n type ReactEmailTextStyles,\n defaultReactEmailTextStyles,\n} from \"./blocks.js\";\nexport {\n createReactEmailInlineContentMappingForDefaultSchema,\n type ReactEmailLinkStyles,\n defaultReactEmailLinkStyles,\n} from \"./inlinecontent.js\";\nexport {\n createReactEmailStyleMappingForDefaultSchema,\n type ReactEmailStyleTransformStyles,\n defaultReactEmailStyleTransformStyles,\n} from \"./styles.js\";\n\n// Export the combined styles interface\nexport interface ReactEmailDefaultSchemaStyles {\n textStyles?: ReactEmailTextStyles;\n linkStyles?: ReactEmailLinkStyles;\n styleTransformStyles?: ReactEmailStyleTransformStyles;\n}\n\n// Export the default combined styles\nexport const defaultReactEmailDefaultSchemaStyles: ReactEmailDefaultSchemaStyles =\n {\n textStyles: defaultReactEmailTextStyles,\n linkStyles: defaultReactEmailLinkStyles,\n styleTransformStyles: defaultReactEmailStyleTransformStyles,\n };\n\nexport const reactEmailDefaultSchemaMappings = {\n blockMapping: reactEmailBlockMappingForDefaultSchema,\n inlineContentMapping: reactEmailInlineContentMappingForDefaultSchema,\n styleMapping: reactEmailStyleMappingForDefaultSchema,\n};\n\nexport const reactEmailDefaultSchemaMappingsWithStyles = (\n styles: ReactEmailDefaultSchemaStyles = defaultReactEmailDefaultSchemaStyles,\n): typeof reactEmailDefaultSchemaMappings => {\n return {\n blockMapping: createReactEmailBlockMappingForDefaultSchema(\n styles.textStyles,\n ),\n inlineContentMapping: createReactEmailInlineContentMappingForDefaultSchema(\n styles.linkStyles,\n ),\n styleMapping: createReactEmailStyleMappingForDefaultSchema(\n styles.styleTransformStyles,\n ),\n };\n};\n","import {\n Block,\n BlockNoteSchema,\n BlockSchema,\n COLORS_DEFAULT,\n DefaultProps,\n Exporter,\n ExporterOptions,\n InlineContentSchema,\n StyleSchema,\n StyledText,\n} from \"@blocknote/core\";\nimport {\n Body,\n Head,\n Html,\n Link,\n Preview,\n Section,\n Tailwind,\n} from \"@react-email/components\";\nimport { render as renderEmail } from \"@react-email/render\";\nimport React, { CSSProperties } from \"react\";\n\nexport class ReactEmailExporter<\n B extends BlockSchema,\n S extends StyleSchema,\n I extends InlineContentSchema,\n> extends Exporter<\n B,\n I,\n S,\n React.ReactElement<any>,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>,\n CSSProperties,\n React.ReactElement<HTMLSpanElement>\n> {\n public constructor(\n public readonly schema: BlockNoteSchema<B, I, S>,\n mappings: Exporter<\n NoInfer<B>,\n NoInfer<I>,\n NoInfer<S>,\n React.ReactElement<any>,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>,\n CSSProperties,\n React.ReactElement<HTMLSpanElement>\n >[\"mappings\"],\n options?: Partial<ExporterOptions>,\n ) {\n const defaults = {\n colors: COLORS_DEFAULT,\n } satisfies Partial<ExporterOptions>;\n\n const newOptions = {\n ...defaults,\n ...options,\n };\n super(schema, mappings, newOptions);\n }\n\n public transformStyledText(styledText: StyledText<S>) {\n const stylesArray = this.mapStyles(styledText.styles);\n const styles = Object.assign({}, ...stylesArray);\n return (\n <span\n style={styles}\n dangerouslySetInnerHTML={{\n __html: styledText.text.replace(/\\n/g, \"<br />\"),\n }}\n />\n );\n }\n\n private async renderGroupedListBlocks(\n blocks: Block<B, I, S>[],\n startIndex: number,\n nestingLevel: number,\n ): Promise<{ element: React.ReactElement; nextIndex: number }> {\n const listType = blocks[startIndex].type;\n const listItems: React.ReactElement<any>[] = [];\n let j = startIndex;\n\n for (\n let itemIndex = 1;\n j < blocks.length && blocks[j].type === listType;\n j++, itemIndex++\n ) {\n const block = blocks[j];\n const liContent = (await this.mapBlock(\n block as any,\n nestingLevel,\n itemIndex,\n )) as any;\n let nestedList: React.ReactElement<any>[] = [];\n if (block.children && block.children.length > 0) {\n nestedList = await this.renderNestedLists(\n block.children,\n nestingLevel + 1,\n block.id,\n );\n }\n listItems.push(\n <li key={block.id}>\n {liContent}\n {nestedList.length > 0 && nestedList}\n </li>,\n );\n }\n let element: React.ReactElement;\n if (listType === \"bulletListItem\" || listType === \"toggleListItem\") {\n element = (\n <ul className=\"mb-2 list-disc pl-6\" key={blocks[startIndex].id + \"-ul\"}>\n {listItems}\n </ul>\n );\n } else {\n element = (\n <ol\n className=\"mb-2 list-decimal pl-6\"\n start={1}\n key={blocks[startIndex].id + \"-ol\"}\n >\n {listItems}\n </ol>\n );\n }\n return { element, nextIndex: j };\n }\n\n private async renderNestedLists(\n children: Block<B, I, S>[],\n nestingLevel: number,\n parentId: string,\n ): Promise<React.ReactElement<any>[]> {\n const nestedList: React.ReactElement<any>[] = [];\n let i = 0;\n while (i < children.length) {\n const child = children[i];\n if (\n child.type === \"bulletListItem\" ||\n child.type === \"numberedListItem\"\n ) {\n // Group consecutive list items of the same type\n const listType = child.type;\n const listItems: React.ReactElement<any>[] = [];\n let j = i;\n\n for (\n let itemIndex = 1;\n j < children.length && children[j].type === listType;\n j++, itemIndex++\n ) {\n const listItem = children[j];\n const liContent = (await this.mapBlock(\n listItem as any,\n nestingLevel,\n itemIndex,\n )) as any;\n const style = this.blocknoteDefaultPropsToReactEmailStyle(\n listItem.props as any,\n );\n let nestedContent: React.ReactElement<any>[] = [];\n if (listItem.children && listItem.children.length > 0) {\n // If children are list items, render as nested list; otherwise, as normal blocks\n if (\n listItem.children[0] &&\n (listItem.children[0].type === \"bulletListItem\" ||\n listItem.children[0].type === \"numberedListItem\")\n ) {\n nestedContent = await this.renderNestedLists(\n listItem.children,\n nestingLevel + 1,\n listItem.id,\n );\n } else {\n nestedContent = await this.transformBlocks(\n listItem.children,\n nestingLevel + 1,\n );\n }\n }\n listItems.push(\n <li key={listItem.id} style={style}>\n {liContent}\n {nestedContent.length > 0 && (\n <div style={{ marginTop: \"8px\" }}>{nestedContent}</div>\n )}\n </li>,\n );\n }\n if (listType === \"bulletListItem\") {\n nestedList.push(\n <ul\n className=\"mb-2 list-disc pl-6\"\n key={parentId + \"-ul-nested-\" + i}\n >\n {listItems}\n </ul>,\n );\n } else {\n nestedList.push(\n <ol\n className=\"mb-2 list-decimal pl-6\"\n start={1}\n key={parentId + \"-ol-nested-\" + i}\n >\n {listItems}\n </ol>,\n );\n }\n i = j;\n } else {\n // Non-list child, render as normal with indentation\n const childBlocks = await this.transformBlocks([child], nestingLevel);\n nestedList.push(\n <Section key={child.id} style={{ marginLeft: \"24px\" }}>\n {childBlocks}\n </Section>,\n );\n i++;\n }\n }\n return nestedList;\n }\n\n public async transformBlocks(\n blocks: Block<B, I, S>[],\n nestingLevel = 0,\n ): Promise<React.ReactElement<any>[]> {\n const ret: React.ReactElement<any>[] = [];\n let i = 0;\n while (i < blocks.length) {\n const b = blocks[i];\n if (\n b.type === \"bulletListItem\" ||\n b.type === \"numberedListItem\" ||\n b.type === \"toggleListItem\"\n ) {\n const { element, nextIndex } = await this.renderGroupedListBlocks(\n blocks,\n i,\n nestingLevel,\n );\n ret.push(element);\n i = nextIndex;\n continue;\n }\n // Non-list blocks\n const children = await this.transformBlocks(b.children, nestingLevel + 1);\n const self = (await this.mapBlock(b as any, nestingLevel, 0)) as any;\n const style = this.blocknoteDefaultPropsToReactEmailStyle(b.props as any);\n\n ret.push(\n <React.Fragment key={b.id}>\n {Object.entries(style).length > 0 ? (\n <div style={style}>{self}</div> // TODO: maybe nicer to set style on child element instead of wrapping in a div?\n ) : (\n self\n )}\n {children.length > 0 && (\n <div style={{ marginLeft: \"24px\" }}>{children}</div>\n )}\n </React.Fragment>,\n );\n i++;\n }\n return ret;\n }\n\n public async toReactEmailDocument(\n blocks: Block<B, I, S>[],\n options?: {\n /**\n * Inject elements into the {@link Head} element\n * @see https://react.email/docs/components/head\n */\n head?: React.ReactElement;\n /**\n * Set the preview text for the email\n * @see https://react.email/docs/components/preview\n */\n preview?: string | string[];\n /**\n * Add a header to every page.\n * The React component passed must be a React-Email component\n * @see https://react.email/components\n */\n header?: React.ReactElement;\n /**\n * Add a footer to every page.\n * The React component passed must be a React-Email component\n * @see https://react.email/components\n */\n footer?: React.ReactElement;\n /**\n * Customize the container element\n */\n container?: React.FC<{ children: React.ReactNode }>;\n /**\n * Customize the body styles\n * @default {\n * fontFamily: \"'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif\",\n * fontSize: \"16px\",\n * lineHeight: \"1.5\",\n * color: \"#333\",\n * }\n */\n bodyStyles?: CSSProperties;\n },\n ) {\n const transformedBlocks = await this.transformBlocks(blocks);\n const DefaultContainer =\n options?.container ||\n (({ children }: { children: React.ReactNode }) => (\n <React.Fragment>{children}</React.Fragment>\n ));\n const needsPolyfill = !globalThis.ReadableByteStreamController;\n if (needsPolyfill) {\n // needed for safari compatibility;\n // https://github.com/resend/react-email/blob/f02e21e998d507aa3fdfbb7b8639f915b8df6cb5/apps/docs/utilities/render.mdx#3-convert-to-html\n (globalThis as any).ReadableByteStreamController = (\n await import(\"web-streams-polyfill\")\n ).default.ReadableByteStreamController;\n }\n const ret = await renderEmail(\n <Html>\n <Head>{options?.head}</Head>\n <Body\n style={\n options?.bodyStyles ?? {\n fontFamily:\n \"'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif\",\n fontSize: \"16px\",\n lineHeight: \"1.5\",\n color: \"#333\",\n }\n }\n >\n {options?.preview && <Preview>{options.preview}</Preview>}\n <Tailwind>\n <DefaultContainer>\n {options?.header}\n {transformedBlocks}\n {options?.footer}\n </DefaultContainer>\n </Tailwind>\n </Body>\n </Html>,\n );\n if (needsPolyfill) {\n delete (globalThis as any).ReadableByteStreamController;\n }\n return ret;\n }\n\n protected blocknoteDefaultPropsToReactEmailStyle(\n props: Partial<DefaultProps>,\n ): CSSProperties {\n const style: CSSProperties = {\n textAlign:\n props.textAlignment === \"left\" ? undefined : props.textAlignment,\n backgroundColor:\n props.backgroundColor === \"default\" || !props.backgroundColor\n ? undefined\n : this.options.colors[props.backgroundColor]?.background,\n color:\n props.textColor === \"default\" || !props.textColor\n ? undefined\n : this.options.colors[props.textColor]?.text,\n alignItems:\n props.textAlignment === \"right\"\n ? \"flex-end\"\n : props.textAlignment === \"center\"\n ? \"center\"\n : undefined,\n };\n return Object.fromEntries(\n Object.entries(style).filter(([_, value]) => value !== undefined),\n );\n }\n}\n"],"mappings":"4lCAwCA,IAAM,EAAuC,CAC3C,SAAU,GACV,WAAY,IACZ,OAAQ,EACR,UAAW,GACZ,CAGY,EAA8B,CACzC,UAAW,CACT,MAAO,EACR,CACD,eAAgB,CACd,MAAO,EACR,CACD,eAAgB,CACd,MAAO,EACR,CACD,iBAAkB,CAChB,MAAO,EACR,CACD,cAAe,CACb,MAAO,EACR,CACD,MAAO,CACL,MAAO,EACR,CACD,WAAY,CACV,MAAO,EACR,CACD,UAAW,CACT,MAAO,EACR,CACD,QAAS,CACP,MAAO,EACR,CACD,SAAU,CACR,MAAO,CACL,SAAU,GACV,OAAQ,EACT,CACF,CACD,SAAU,CACR,MAAO,CACL,SAAU,GACV,OAAQ,EACT,CACF,CACD,SAAU,CACR,MAAO,CACL,SAAU,GACV,OAAQ,EACT,CACF,CACD,SAAU,CACR,MAAO,CACL,SAAU,GACV,OAAQ,EACT,CACF,CACD,SAAU,CACR,MAAO,CACL,SAAU,GACV,OAAQ,EACT,CACF,CACD,SAAU,CACR,MAAO,CACL,SAAU,GACV,OAAQ,EACT,CACF,CACD,UAAW,CACT,MAAO,EACR,CACF,CAEY,GACX,EAAmC,KAS/B,CACJ,WAAY,EAAO,KAEf,EAAA,EAAA,KAAC,EAAA,KAAD,CACE,GAAI,EAAW,UACf,MAAO,CACL,GAAG,EAA4B,UAAU,MACzC,GAAG,EAAW,WAAW,MAC1B,UAEA,EAAE,uBAAuB,EAAM,QAAQ,CACnC,CAAA,CAGX,gBAAiB,EAAO,KAGpB,EAAA,EAAA,KAAC,EAAA,KAAD,CACE,GAAI,EAAW,eACf,MAAO,CACL,GAAG,EAA4B,eAAe,MAC9C,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,IAAA,GACT,CACD,OAAO,OAAO,YACZ,OAAO,QAAQ,EAAM,CAAC,QAAQ,CAAC,EAAG,KAAW,IAAU,IAAA,GAAU,CAClE,6aD5TH,EAAwC,KAEjC,CACL,aAAc,EACZ,EAAO,WACR,CACD,qBAAsB,EACpB,EAAO,WACR,CACD,aAAc,EACZ,EAAO,qBACR,CACF"}
1
+ {"version":3,"file":"blocknote-xl-email-exporter.umd.cjs","names":[],"sources":["../src/react-email/defaultSchema/blocks.tsx","../src/react-email/defaultSchema/inlinecontent.tsx","../src/react-email/defaultSchema/styles.tsx","../src/react-email/defaultSchema/index.ts","../src/react-email/reactEmailExporter.tsx"],"sourcesContent":["import {\n BlockMapping,\n createPageBreakBlockConfig,\n DefaultBlockSchema,\n mapTableCell,\n} from \"@blocknote/core\";\nimport {\n CodeBlock,\n dracula,\n Heading,\n Img,\n Link,\n PrismLanguage,\n Text,\n} from \"@react-email/components\";\n\n// Define TextProps type based on React Email Text component\ntype TextProps = React.ComponentPropsWithoutRef<typeof Text>;\n\n// Define the styles interface for configurable Text components\nexport interface ReactEmailTextStyles {\n paragraph?: Partial<TextProps>;\n bulletListItem?: Partial<TextProps>;\n toggleListItem?: Partial<TextProps>;\n numberedListItem?: Partial<TextProps>;\n checkListItem?: Partial<TextProps>;\n quote?: Partial<TextProps>;\n tableError?: Partial<TextProps>;\n tableCell?: Partial<TextProps>;\n caption?: Partial<TextProps>;\n heading1?: Partial<TextProps>;\n heading2?: Partial<TextProps>;\n heading3?: Partial<TextProps>;\n heading4?: Partial<TextProps>;\n heading5?: Partial<TextProps>;\n heading6?: Partial<TextProps>;\n codeBlock?: Partial<React.ComponentProps<typeof CodeBlock>>;\n}\n\nconst defaultTextStyle: TextProps[\"style\"] = {\n fontSize: 16,\n lineHeight: 1.5,\n margin: 3,\n minHeight: 24,\n};\n\n// Default styles for Text components\nexport const defaultReactEmailTextStyles = {\n paragraph: {\n style: defaultTextStyle,\n },\n bulletListItem: {\n style: defaultTextStyle,\n },\n toggleListItem: {\n style: defaultTextStyle,\n },\n numberedListItem: {\n style: defaultTextStyle,\n },\n checkListItem: {\n style: defaultTextStyle,\n },\n quote: {\n style: defaultTextStyle,\n },\n tableError: {\n style: defaultTextStyle,\n },\n tableCell: {\n style: defaultTextStyle,\n },\n caption: {\n style: defaultTextStyle,\n },\n heading1: {\n style: {\n fontSize: 48,\n margin: 3,\n },\n },\n heading2: {\n style: {\n fontSize: 36,\n margin: 3,\n },\n },\n heading3: {\n style: {\n fontSize: 24,\n margin: 3,\n },\n },\n heading4: {\n style: {\n fontSize: 20,\n margin: 3,\n },\n },\n heading5: {\n style: {\n fontSize: 18,\n margin: 3,\n },\n },\n heading6: {\n style: {\n fontSize: 16,\n margin: 3,\n },\n },\n codeBlock: {\n style: defaultTextStyle,\n },\n} satisfies ReactEmailTextStyles;\n\nexport const createReactEmailBlockMappingForDefaultSchema = (\n textStyles: ReactEmailTextStyles = defaultReactEmailTextStyles,\n): BlockMapping<\n DefaultBlockSchema & {\n pageBreak: ReturnType<typeof createPageBreakBlockConfig>;\n },\n any,\n any,\n React.ReactElement<any>,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>\n> => ({\n paragraph: (block, t) => {\n return (\n <Text\n {...textStyles.paragraph}\n style={{\n ...defaultReactEmailTextStyles.paragraph.style,\n ...textStyles.paragraph?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n bulletListItem: (block, t) => {\n // Return only the <li> for grouping in the exporter\n return (\n <Text\n {...textStyles.bulletListItem}\n style={{\n ...defaultReactEmailTextStyles.bulletListItem.style,\n ...textStyles.bulletListItem?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n toggleListItem: (block, t) => {\n // Return only the <li> for grouping in the exporter\n return (\n <Text\n {...textStyles.toggleListItem}\n style={{\n ...defaultReactEmailTextStyles.toggleListItem.style,\n ...textStyles.toggleListItem?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n numberedListItem: (block, t, _nestingLevel) => {\n // Return only the <li> for grouping in the exporter\n return (\n <Text\n {...textStyles.numberedListItem}\n style={{\n ...defaultReactEmailTextStyles.numberedListItem.style,\n ...textStyles.numberedListItem?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n checkListItem: (block, t) => {\n // Render a checkbox using inline SVG for better appearance in email\n // block.props.checked should be true/false\n const checked = block.props?.checked;\n const checkboxSvg = checked ? (\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n style={{ display: \"inline\", verticalAlign: \"middle\", marginRight: 8 }}\n >\n <rect\n x=\"2\"\n y=\"2\"\n width=\"14\"\n height=\"14\"\n rx=\"3\"\n fill=\"#4F8A10\"\n stroke=\"#4F8A10\"\n strokeWidth=\"2\"\n />\n <polyline\n points=\"5,10 8,13 13,6\"\n fill=\"none\"\n stroke=\"#fff\"\n strokeWidth=\"2\"\n />\n </svg>\n ) : (\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n style={{ display: \"inline\", verticalAlign: \"middle\", marginRight: 8 }}\n >\n <rect\n x=\"2\"\n y=\"2\"\n width=\"14\"\n height=\"14\"\n rx=\"3\"\n fill=\"#fff\"\n stroke=\"#888\"\n strokeWidth=\"2\"\n />\n </svg>\n );\n return (\n <Text\n {...textStyles.checkListItem}\n style={{\n ...defaultReactEmailTextStyles.checkListItem.style,\n ...textStyles.checkListItem?.style,\n }}\n >\n {checkboxSvg}\n <span>{t.transformInlineContent(block.content)}</span>\n </Text>\n );\n },\n heading: (block, t) => {\n return (\n <Heading\n as={`h${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`}\n {...textStyles[`heading${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`]}\n style={{\n ...defaultReactEmailTextStyles[\n `heading${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`\n ].style,\n ...textStyles[`heading${block.props.level as 1 | 2 | 3 | 4 | 5 | 6}`]\n ?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Heading>\n );\n },\n\n codeBlock: (block) => {\n // Code blocks hold plain content: at most a single unstyled text item.\n const [textItem, ...excessItems] = block.content;\n if (excessItems.length > 0 || (textItem && !(\"text\" in textItem))) {\n throw new Error(\"expected plain block content to be a single text item\");\n }\n const textContent = textItem?.text ?? \"\";\n\n return (\n <CodeBlock\n code={textContent}\n fontFamily=\"'CommitMono', monospace\"\n language={block.props.language as PrismLanguage}\n theme={dracula}\n {...textStyles.codeBlock}\n style={{\n ...defaultReactEmailTextStyles.codeBlock.style,\n ...textStyles.codeBlock?.style,\n }}\n />\n );\n },\n audio: (block) => {\n // Audio icon SVG\n const icon = (\n <svg\n height=\"18\"\n width=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"#4F8A10\"\n style={{ display: \"inline\", verticalAlign: \"middle\" }}\n >\n <path d=\"M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z\" />\n </svg>\n );\n const previewWidth =\n \"previewWidth\" in block.props\n ? (block.props as any).previewWidth\n : undefined;\n return (\n <div style={{ margin: \"8px 0\" }}>\n <FileLink\n url={block.props.url}\n name={block.props.name}\n defaultText=\"Open audio file\"\n icon={icon}\n />\n <Caption\n caption={block.props.caption}\n width={previewWidth}\n textStyles={textStyles}\n />\n </div>\n );\n },\n video: (block) => {\n // Video icon SVG\n const icon = (\n <svg\n height=\"18\"\n width=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"#1976D2\"\n style={{ display: \"inline\", verticalAlign: \"middle\" }}\n >\n <path d=\"M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z\" />\n </svg>\n );\n const previewWidth =\n \"previewWidth\" in block.props\n ? (block.props as any).previewWidth\n : undefined;\n return (\n <div style={{ margin: \"8px 0\" }}>\n <FileLink\n url={block.props.url}\n name={block.props.name}\n defaultText=\"Open video file\"\n icon={icon}\n />\n <Caption\n caption={block.props.caption}\n width={previewWidth}\n textStyles={textStyles}\n />\n </div>\n );\n },\n file: (block) => {\n // File icon SVG\n const icon = (\n <svg\n height=\"18\"\n width=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"#888\"\n style={{ display: \"inline\", verticalAlign: \"middle\" }}\n >\n <path d=\"M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z\" />\n </svg>\n );\n const previewWidth =\n \"previewWidth\" in block.props\n ? (block.props as any).previewWidth\n : undefined;\n return (\n <div style={{ margin: \"8px 0\" }}>\n <FileLink\n url={block.props.url}\n name={block.props.name}\n defaultText=\"Open file\"\n icon={icon}\n />\n <Caption\n caption={block.props.caption}\n width={previewWidth}\n textStyles={textStyles}\n />\n </div>\n );\n },\n image: (block) => {\n return (\n <Img\n src={block.props.url}\n width={block.props.previewWidth}\n alt={block.props.caption}\n />\n );\n },\n table: (block, t) => {\n // Render table using standard HTML table elements for email compatibility\n const table = block.content;\n if (!table || typeof table !== \"object\" || !Array.isArray(table.rows)) {\n return <Text {...textStyles.tableError}>Table data not available</Text>;\n }\n const headerRowsCount = (table.headerRows as number) ?? 0;\n const headerColsCount = (table.headerCols as number) ?? 0;\n\n return (\n <table\n style={{\n borderCollapse: \"collapse\",\n width: \"100%\",\n margin: \"16px 0\",\n border: \"1px solid #ddd\",\n borderRadius: 4,\n overflow: \"hidden\",\n }}\n border={0}\n cellPadding={0}\n cellSpacing={0}\n >\n <tbody>\n {table.rows.map((row: any, rowIndex: number) => (\n <tr key={\"row-\" + rowIndex}>\n {row.cells.map((cell: any, colIndex: number) => {\n // Use mapTableCell to normalize table cell data into a standard interface\n // This handles partial cells, provides default values, and ensures consistent structure\n const normalizedCell = mapTableCell(cell);\n const isHeaderRow = rowIndex < headerRowsCount;\n const isHeaderCol = colIndex < headerColsCount;\n const isHeader = isHeaderRow || isHeaderCol;\n const CellTag = isHeader ? \"th\" : \"td\";\n return (\n <CellTag\n key={\"row_\" + rowIndex + \"_col_\" + colIndex}\n style={{\n border: \"1px solid #ddd\",\n padding: \"8px 12px\",\n background:\n normalizedCell.props.backgroundColor !== \"default\"\n ? t.options.colors[\n normalizedCell.props\n .backgroundColor as keyof typeof t.options.colors\n ].background\n : \"inherit\",\n fontWeight: isHeader ? \"bold\" : undefined,\n textAlign: normalizedCell.props.textAlignment || \"left\",\n color:\n normalizedCell.props.textColor !== \"default\"\n ? t.options.colors[\n normalizedCell.props\n .textColor as keyof typeof t.options.colors\n ].text\n : \"inherit\",\n ...defaultReactEmailTextStyles.tableCell.style,\n ...textStyles.tableCell?.style,\n }}\n {...((normalizedCell.props.colspan || 1) > 1 && {\n colSpan: normalizedCell.props.colspan || 1,\n })}\n {...((normalizedCell.props.rowspan || 1) > 1 && {\n rowSpan: normalizedCell.props.rowspan || 1,\n })}\n >\n {t.transformInlineContent(normalizedCell.content)}\n </CellTag>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n );\n },\n quote: (block, t) => {\n // Render block quote with a left border and subtle background for email compatibility\n return (\n <Text\n {...textStyles.quote}\n style={{\n borderLeft: \"2px solid #bdbdbd\",\n padding: \"0px 12px\",\n fontStyle: \"italic\",\n color: t.options.colors.gray.text,\n display: \"block\",\n ...defaultReactEmailTextStyles.quote.style,\n ...textStyles.quote?.style,\n }}\n >\n {t.transformInlineContent(block.content)}\n </Text>\n );\n },\n pageBreak: () => {\n // In email, a page break can be represented as a horizontal rule\n return (\n <hr\n style={{\n border: \"none\",\n borderTop: \"2px dashed #ccc\",\n margin: \"24px 0\",\n }}\n />\n );\n },\n divider: () => {\n return (\n <hr\n style={{\n border: \"none\",\n borderTop: \"1px solid #ccc\",\n margin: \"11.5px 0\",\n }}\n />\n );\n },\n});\n\n// Export the original mapping for backward compatibility\nexport const reactEmailBlockMappingForDefaultSchema =\n createReactEmailBlockMappingForDefaultSchema();\n\n// Helper for file-like blocks (audio, video, file)\nfunction FileLink({\n url,\n name,\n defaultText,\n icon,\n}: {\n url?: string;\n name?: string;\n defaultText: string;\n icon: React.ReactElement;\n}) {\n return (\n <Link\n href={url}\n style={{\n textDecoration: \"none\",\n color: \"#333\",\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 8,\n fontSize: 16,\n }}\n >\n {icon}\n <span style={{ verticalAlign: \"middle\" }}>{name || defaultText}</span>\n </Link>\n );\n}\n\nfunction Caption({\n caption,\n width,\n textStyles,\n}: {\n caption?: string;\n width?: number;\n textStyles: ReactEmailTextStyles;\n}) {\n if (!caption) {\n return null;\n }\n return (\n <Text\n {...textStyles.caption}\n style={{\n width,\n fontSize: 13,\n color: \"#888\",\n margin: \"4px 0 0 0\",\n ...defaultReactEmailTextStyles.caption.style,\n ...textStyles.caption?.style,\n }}\n >\n {caption}\n </Text>\n );\n}\n","import {\n DefaultInlineContentSchema,\n DefaultStyleSchema,\n InlineContentMapping,\n} from \"@blocknote/core\";\nimport { Link } from \"@react-email/components\";\n\n// Define the styles interface for configurable Link components\nexport interface ReactEmailLinkStyles {\n link?: Partial<React.ComponentPropsWithoutRef<typeof Link>>;\n}\n\n// Default styles for Link components\nexport const defaultReactEmailLinkStyles: ReactEmailLinkStyles = {\n link: {},\n};\n\nexport const createReactEmailInlineContentMappingForDefaultSchema = (\n linkStyles: ReactEmailLinkStyles = defaultReactEmailLinkStyles,\n): InlineContentMapping<\n DefaultInlineContentSchema,\n DefaultStyleSchema,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>,\n React.ReactElement<HTMLSpanElement>\n> => ({\n link: (ic, t) => {\n return (\n <Link href={ic.href} {...linkStyles.link}>\n {...ic.content.map((content) => {\n return t.transformStyledText(content);\n })}\n </Link>\n );\n },\n text: (ic, t) => {\n return t.transformStyledText(ic);\n },\n});\n\n// Export the original mapping for backward compatibility\nexport const reactEmailInlineContentMappingForDefaultSchema =\n createReactEmailInlineContentMappingForDefaultSchema();\n","import { DefaultStyleSchema, StyleMapping } from \"@blocknote/core\";\nimport { CSSProperties } from \"react\";\n\n// Define the styles interface for configurable style transformations\n// This can be extended in the future to allow customizing style transformations\nexport type ReactEmailStyleTransformStyles = Record<string, never>;\n\n// Default styles for style transformations\nexport const defaultReactEmailStyleTransformStyles: ReactEmailStyleTransformStyles =\n {};\n\nexport const createReactEmailStyleMappingForDefaultSchema = (\n _styleTransformStyles: ReactEmailStyleTransformStyles = defaultReactEmailStyleTransformStyles,\n): StyleMapping<DefaultStyleSchema, CSSProperties> => ({\n bold: (val) => {\n if (!val) {\n return {};\n }\n return {\n fontWeight: \"bold\",\n };\n },\n italic: (val) => {\n if (!val) {\n return {};\n }\n return {\n fontStyle: \"italic\",\n };\n },\n underline: (val) => {\n if (!val) {\n return {};\n }\n return {\n textDecoration: \"underline\", // TODO: could conflict with strike\n };\n },\n strike: (val) => {\n if (!val) {\n return {};\n }\n return {\n textDecoration: \"line-through\",\n };\n },\n backgroundColor: (val, exporter) => {\n if (!val) {\n return {};\n }\n return {\n backgroundColor:\n exporter.options.colors[val as keyof typeof exporter.options.colors]\n .background,\n };\n },\n textColor: (val, exporter) => {\n if (!val) {\n return {};\n }\n return {\n color:\n exporter.options.colors[val as keyof typeof exporter.options.colors]\n .text,\n };\n },\n code: (val) => {\n if (!val) {\n return {};\n }\n return {\n fontFamily: \"GeistMono\",\n };\n },\n});\n\n// Export the original mapping for backward compatibility\nexport const reactEmailStyleMappingForDefaultSchema =\n createReactEmailStyleMappingForDefaultSchema();\n","import {\n reactEmailBlockMappingForDefaultSchema,\n createReactEmailBlockMappingForDefaultSchema,\n type ReactEmailTextStyles,\n defaultReactEmailTextStyles,\n} from \"./blocks.js\";\nimport {\n reactEmailInlineContentMappingForDefaultSchema,\n createReactEmailInlineContentMappingForDefaultSchema,\n type ReactEmailLinkStyles,\n defaultReactEmailLinkStyles,\n} from \"./inlinecontent.js\";\nimport {\n reactEmailStyleMappingForDefaultSchema,\n createReactEmailStyleMappingForDefaultSchema,\n type ReactEmailStyleTransformStyles,\n defaultReactEmailStyleTransformStyles,\n} from \"./styles.js\";\n\n// Re-export for backward compatibility\nexport { reactEmailBlockMappingForDefaultSchema } from \"./blocks.js\";\nexport { reactEmailInlineContentMappingForDefaultSchema } from \"./inlinecontent.js\";\nexport { reactEmailStyleMappingForDefaultSchema } from \"./styles.js\";\n\n// Export the new configurable functions\nexport {\n createReactEmailBlockMappingForDefaultSchema,\n type ReactEmailTextStyles,\n defaultReactEmailTextStyles,\n} from \"./blocks.js\";\nexport {\n createReactEmailInlineContentMappingForDefaultSchema,\n type ReactEmailLinkStyles,\n defaultReactEmailLinkStyles,\n} from \"./inlinecontent.js\";\nexport {\n createReactEmailStyleMappingForDefaultSchema,\n type ReactEmailStyleTransformStyles,\n defaultReactEmailStyleTransformStyles,\n} from \"./styles.js\";\n\n// Export the combined styles interface\nexport interface ReactEmailDefaultSchemaStyles {\n textStyles?: ReactEmailTextStyles;\n linkStyles?: ReactEmailLinkStyles;\n styleTransformStyles?: ReactEmailStyleTransformStyles;\n}\n\n// Export the default combined styles\nexport const defaultReactEmailDefaultSchemaStyles: ReactEmailDefaultSchemaStyles =\n {\n textStyles: defaultReactEmailTextStyles,\n linkStyles: defaultReactEmailLinkStyles,\n styleTransformStyles: defaultReactEmailStyleTransformStyles,\n };\n\nexport const reactEmailDefaultSchemaMappings = {\n blockMapping: reactEmailBlockMappingForDefaultSchema,\n inlineContentMapping: reactEmailInlineContentMappingForDefaultSchema,\n styleMapping: reactEmailStyleMappingForDefaultSchema,\n};\n\nexport const reactEmailDefaultSchemaMappingsWithStyles = (\n styles: ReactEmailDefaultSchemaStyles = defaultReactEmailDefaultSchemaStyles,\n): typeof reactEmailDefaultSchemaMappings => {\n return {\n blockMapping: createReactEmailBlockMappingForDefaultSchema(\n styles.textStyles,\n ),\n inlineContentMapping: createReactEmailInlineContentMappingForDefaultSchema(\n styles.linkStyles,\n ),\n styleMapping: createReactEmailStyleMappingForDefaultSchema(\n styles.styleTransformStyles,\n ),\n };\n};\n","import {\n Block,\n BlockNoteSchema,\n BlockSchema,\n COLORS_DEFAULT,\n DefaultProps,\n Exporter,\n ExporterOptions,\n InlineContentSchema,\n StyleSchema,\n StyledText,\n} from \"@blocknote/core\";\nimport {\n Body,\n Head,\n Html,\n Link,\n Preview,\n Section,\n Tailwind,\n} from \"@react-email/components\";\nimport { render as renderEmail } from \"@react-email/render\";\nimport React, { CSSProperties } from \"react\";\n\nexport class ReactEmailExporter<\n B extends BlockSchema,\n S extends StyleSchema,\n I extends InlineContentSchema,\n> extends Exporter<\n B,\n I,\n S,\n React.ReactElement<any>,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>,\n CSSProperties,\n React.ReactElement<HTMLSpanElement>\n> {\n public constructor(\n public readonly schema: BlockNoteSchema<B, I, S>,\n mappings: Exporter<\n NoInfer<B>,\n NoInfer<I>,\n NoInfer<S>,\n React.ReactElement<any>,\n React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>,\n CSSProperties,\n React.ReactElement<HTMLSpanElement>\n >[\"mappings\"],\n options?: Partial<ExporterOptions>,\n ) {\n const defaults = {\n colors: COLORS_DEFAULT,\n } satisfies Partial<ExporterOptions>;\n\n const newOptions = {\n ...defaults,\n ...options,\n };\n super(schema, mappings, newOptions);\n }\n\n public transformStyledText(styledText: StyledText<S>) {\n const stylesArray = this.mapStyles(styledText.styles);\n const styles = Object.assign({}, ...stylesArray);\n return (\n <span\n style={styles}\n dangerouslySetInnerHTML={{\n __html: styledText.text.replace(/\\n/g, \"<br />\"),\n }}\n />\n );\n }\n\n private async renderGroupedListBlocks(\n blocks: Block<B, I, S>[],\n startIndex: number,\n nestingLevel: number,\n ): Promise<{ element: React.ReactElement; nextIndex: number }> {\n const listType = blocks[startIndex].type;\n const listItems: React.ReactElement<any>[] = [];\n let j = startIndex;\n\n for (\n let itemIndex = 1;\n j < blocks.length && blocks[j].type === listType;\n j++, itemIndex++\n ) {\n const block = blocks[j];\n const liContent = (await this.mapBlock(\n block as any,\n nestingLevel,\n itemIndex,\n )) as any;\n let nestedList: React.ReactElement<any>[] = [];\n if (block.children && block.children.length > 0) {\n nestedList = await this.renderNestedLists(\n block.children,\n nestingLevel + 1,\n block.id,\n );\n }\n listItems.push(\n <li key={block.id}>\n {liContent}\n {nestedList.length > 0 && nestedList}\n </li>,\n );\n }\n let element: React.ReactElement;\n if (listType === \"bulletListItem\" || listType === \"toggleListItem\") {\n element = (\n <ul className=\"mb-2 list-disc pl-6\" key={blocks[startIndex].id + \"-ul\"}>\n {listItems}\n </ul>\n );\n } else {\n element = (\n <ol\n className=\"mb-2 list-decimal pl-6\"\n start={1}\n key={blocks[startIndex].id + \"-ol\"}\n >\n {listItems}\n </ol>\n );\n }\n return { element, nextIndex: j };\n }\n\n private async renderNestedLists(\n children: Block<B, I, S>[],\n nestingLevel: number,\n parentId: string,\n ): Promise<React.ReactElement<any>[]> {\n const nestedList: React.ReactElement<any>[] = [];\n let i = 0;\n while (i < children.length) {\n const child = children[i];\n if (\n child.type === \"bulletListItem\" ||\n child.type === \"numberedListItem\"\n ) {\n // Group consecutive list items of the same type\n const listType = child.type;\n const listItems: React.ReactElement<any>[] = [];\n let j = i;\n\n for (\n let itemIndex = 1;\n j < children.length && children[j].type === listType;\n j++, itemIndex++\n ) {\n const listItem = children[j];\n const liContent = (await this.mapBlock(\n listItem as any,\n nestingLevel,\n itemIndex,\n )) as any;\n const style = this.blocknoteDefaultPropsToReactEmailStyle(\n listItem.props as any,\n );\n let nestedContent: React.ReactElement<any>[] = [];\n if (listItem.children && listItem.children.length > 0) {\n // If children are list items, render as nested list; otherwise, as normal blocks\n if (\n listItem.children[0] &&\n (listItem.children[0].type === \"bulletListItem\" ||\n listItem.children[0].type === \"numberedListItem\")\n ) {\n nestedContent = await this.renderNestedLists(\n listItem.children,\n nestingLevel + 1,\n listItem.id,\n );\n } else {\n nestedContent = await this.transformBlocks(\n listItem.children,\n nestingLevel + 1,\n );\n }\n }\n listItems.push(\n <li key={listItem.id} style={style}>\n {liContent}\n {nestedContent.length > 0 && (\n <div style={{ marginTop: \"8px\" }}>{nestedContent}</div>\n )}\n </li>,\n );\n }\n if (listType === \"bulletListItem\") {\n nestedList.push(\n <ul\n className=\"mb-2 list-disc pl-6\"\n key={parentId + \"-ul-nested-\" + i}\n >\n {listItems}\n </ul>,\n );\n } else {\n nestedList.push(\n <ol\n className=\"mb-2 list-decimal pl-6\"\n start={1}\n key={parentId + \"-ol-nested-\" + i}\n >\n {listItems}\n </ol>,\n );\n }\n i = j;\n } else {\n // Non-list child, render as normal with indentation\n const childBlocks = await this.transformBlocks([child], nestingLevel);\n nestedList.push(\n <Section key={child.id} style={{ marginLeft: \"24px\" }}>\n {childBlocks}\n </Section>,\n );\n i++;\n }\n }\n return nestedList;\n }\n\n public async transformBlocks(\n blocks: Block<B, I, S>[],\n nestingLevel = 0,\n ): Promise<React.ReactElement<any>[]> {\n const ret: React.ReactElement<any>[] = [];\n let i = 0;\n while (i < blocks.length) {\n const b = blocks[i];\n if (\n b.type === \"bulletListItem\" ||\n b.type === \"numberedListItem\" ||\n b.type === \"toggleListItem\"\n ) {\n const { element, nextIndex } = await this.renderGroupedListBlocks(\n blocks,\n i,\n nestingLevel,\n );\n ret.push(element);\n i = nextIndex;\n continue;\n }\n // Non-list blocks\n const children = await this.transformBlocks(b.children, nestingLevel + 1);\n const self = (await this.mapBlock(b as any, nestingLevel, 0)) as any;\n const style = this.blocknoteDefaultPropsToReactEmailStyle(b.props as any);\n\n ret.push(\n <React.Fragment key={b.id}>\n {Object.entries(style).length > 0 ? (\n <div style={style}>{self}</div> // TODO: maybe nicer to set style on child element instead of wrapping in a div?\n ) : (\n self\n )}\n {children.length > 0 && (\n <div style={{ marginLeft: \"24px\" }}>{children}</div>\n )}\n </React.Fragment>,\n );\n i++;\n }\n return ret;\n }\n\n public async toReactEmailDocument(\n blocks: Block<B, I, S>[],\n options?: {\n /**\n * Inject elements into the {@link Head} element\n * @see https://react.email/docs/components/head\n */\n head?: React.ReactElement;\n /**\n * Set the preview text for the email\n * @see https://react.email/docs/components/preview\n */\n preview?: string | string[];\n /**\n * Add a header to every page.\n * The React component passed must be a React-Email component\n * @see https://react.email/components\n */\n header?: React.ReactElement;\n /**\n * Add a footer to every page.\n * The React component passed must be a React-Email component\n * @see https://react.email/components\n */\n footer?: React.ReactElement;\n /**\n * Customize the container element\n */\n container?: React.FC<{ children: React.ReactNode }>;\n /**\n * Customize the body styles\n * @default {\n * fontFamily: \"'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif\",\n * fontSize: \"16px\",\n * lineHeight: \"1.5\",\n * color: \"#333\",\n * }\n */\n bodyStyles?: CSSProperties;\n },\n ) {\n const transformedBlocks = await this.transformBlocks(blocks);\n const DefaultContainer =\n options?.container ||\n (({ children }: { children: React.ReactNode }) => (\n <React.Fragment>{children}</React.Fragment>\n ));\n const needsPolyfill = !globalThis.ReadableByteStreamController;\n if (needsPolyfill) {\n // needed for safari compatibility;\n // https://github.com/resend/react-email/blob/f02e21e998d507aa3fdfbb7b8639f915b8df6cb5/apps/docs/utilities/render.mdx#3-convert-to-html\n (globalThis as any).ReadableByteStreamController = (\n await import(\"web-streams-polyfill\")\n ).default.ReadableByteStreamController;\n }\n const ret = await renderEmail(\n <Html>\n <Head>{options?.head}</Head>\n <Body\n style={\n options?.bodyStyles ?? {\n fontFamily:\n \"'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif\",\n fontSize: \"16px\",\n lineHeight: \"1.5\",\n color: \"#333\",\n }\n }\n >\n {options?.preview && <Preview>{options.preview}</Preview>}\n <Tailwind>\n <DefaultContainer>\n {options?.header}\n {transformedBlocks}\n {options?.footer}\n </DefaultContainer>\n </Tailwind>\n </Body>\n </Html>,\n );\n if (needsPolyfill) {\n delete (globalThis as any).ReadableByteStreamController;\n }\n return ret;\n }\n\n protected blocknoteDefaultPropsToReactEmailStyle(\n props: Partial<DefaultProps>,\n ): CSSProperties {\n const style: CSSProperties = {\n textAlign:\n props.textAlignment === \"left\" ? undefined : props.textAlignment,\n backgroundColor:\n props.backgroundColor === \"default\" || !props.backgroundColor\n ? undefined\n : this.options.colors[props.backgroundColor]?.background,\n color:\n props.textColor === \"default\" || !props.textColor\n ? undefined\n : this.options.colors[props.textColor]?.text,\n alignItems:\n props.textAlignment === \"right\"\n ? \"flex-end\"\n : props.textAlignment === \"center\"\n ? \"center\"\n : undefined,\n };\n return Object.fromEntries(\n Object.entries(style).filter(([_, value]) => value !== undefined),\n );\n }\n}\n"],"mappings":"4lCAuCA,IAAM,EAAuC,CAC3C,SAAU,GACV,WAAY,IACZ,OAAQ,EACR,UAAW,EACb,EAGa,EAA8B,CACzC,UAAW,CACT,MAAO,CACT,EACA,eAAgB,CACd,MAA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L,aAAc,EACZ,EAAO,UACT,EACA,qBAAsB,EACpB,EAAO,UACT,EACA,aAAc,EACZ,EAAO,oBACT,CACF"}
@@ -1 +1 @@
1
- {"builtAt":1779805049804,"assets":[{"name":"blocknote-xl-email-exporter.umd.cjs","size":13184},{"name":"blocknote-xl-email-exporter.umd.cjs.map","size":45007}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote-xl-email-exporter.umd.cjs"],"names":["index"]}],"modules":[{"name":"./rolldown/runtime.js","size":1032,"chunks":["a1ee98a"]},{"name":"./src/react-email/defaultSchema/blocks.tsx","size":12486,"chunks":["a1ee98a"]},{"name":"./src/react-email/defaultSchema/inlinecontent.tsx","size":667,"chunks":["a1ee98a"]},{"name":"./src/react-email/defaultSchema/styles.tsx","size":1039,"chunks":["a1ee98a"]},{"name":"./src/react-email/defaultSchema/index.ts","size":881,"chunks":["a1ee98a"]},{"name":"./src/react-email/reactEmailExporter.tsx","size":7053,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]}]}
1
+ {"builtAt":1784541410893,"assets":[{"name":"blocknote-xl-email-exporter.umd.cjs","size":13311},{"name":"blocknote-xl-email-exporter.umd.cjs.map","size":45484}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote-xl-email-exporter.umd.cjs"],"names":["index"]}],"modules":[{"name":"./rolldown/runtime.js","size":1032,"chunks":["a1ee98a"]},{"name":"./src/react-email/defaultSchema/blocks.tsx","size":12673,"chunks":["a1ee98a"]},{"name":"./src/react-email/defaultSchema/inlinecontent.tsx","size":667,"chunks":["a1ee98a"]},{"name":"./src/react-email/defaultSchema/styles.tsx","size":1039,"chunks":["a1ee98a"]},{"name":"./src/react-email/defaultSchema/index.ts","size":881,"chunks":["a1ee98a"]},{"name":"./src/react-email/reactEmailExporter.tsx","size":7063,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]}]}
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "directory": "packages/xl-email-exporter"
10
10
  },
11
11
  "license": "GPL-3.0 OR PROPRIETARY",
12
- "version": "0.51.3",
12
+ "version": "0.52.0",
13
13
  "files": [
14
14
  "dist",
15
15
  "types",
@@ -46,43 +46,35 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "@blocknote/core": "0.51.3",
50
- "@blocknote/react": "0.51.3",
51
- "@react-email/components": "^1.0.5",
52
- "@react-email/render": "^2.0.4",
53
- "buffer": "^6.0.3",
54
- "react": "^19.2.5",
55
- "react-dom": "^19.2.5",
56
- "react-email": "^5.2.5",
57
- "web-streams-polyfill": "^4.2.0"
49
+ "@react-email/components": "^1.0.12",
50
+ "@react-email/render": "^2.1.0",
51
+ "web-streams-polyfill": "^4.2.0",
52
+ "@blocknote/core": "^0.52.0"
58
53
  },
59
54
  "devDependencies": {
60
55
  "@types/jsdom": "^21.1.7",
61
56
  "@types/react": "^19.2.3",
62
57
  "@types/react-dom": "^19.2.3",
63
- "eslint": "^8.57.1",
58
+ "react": "^19.2.5",
59
+ "react-dom": "^19.2.5",
60
+ "react-email": "^5.2.5",
61
+ "rimraf": "^5.0.10",
64
62
  "rollup-plugin-webpack-stats": "^0.2.6",
65
63
  "typescript": "^5.9.3",
66
- "vite": "^8.0.8",
67
- "vite-plugin-eslint": "^1.8.1",
68
- "vitest": "^4.1.2"
64
+ "vite-plus": "^0.1.24",
65
+ "@blocknote/shared": "^0.30.0"
69
66
  },
70
67
  "peerDependencies": {
71
68
  "react": "^18.0 || ^19.0 || >= 19.0.0-rc",
72
69
  "react-dom": "^18.0 || ^19.0 || >= 19.0.0-rc"
73
70
  },
74
- "eslintConfig": {
75
- "extends": [
76
- "../../.eslintrc.json"
77
- ]
78
- },
79
71
  "gitHead": "37614ab348dcc7faa830a9a88437b37197a2162d",
80
72
  "scripts": {
81
- "dev": "vite",
82
- "build": "tsc && vite build",
83
- "lint": "eslint src --max-warnings 0",
84
- "test": "vitest --run",
85
- "test-watch": "vitest watch",
73
+ "dev": "vp dev",
74
+ "lint": "vp lint src",
75
+ "test": "vp test --run",
76
+ "test-watch": "vp test watch",
77
+ "clean": "rimraf dist && rimraf types",
86
78
  "email": "email dev"
87
79
  }
88
80
  }
@@ -1,10 +1,10 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
- exports[`react email exporter > should export a document (HTML snapshot) > __snapshots__/reactEmailExporter 1`] = `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en"><head><link rel="preload" as="image" href="https://placehold.co/332x322.jpg"/><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><meta name="x-apple-disable-message-reformatting"/></head><body><!--$--><!--html--><!--head--><!--body--><table border="0" width="100%" cellPadding="0" cellSpacing="0" role="presentation" align="center"><tbody><tr><td style="font-family:&#x27;SF Pro Display&#x27;, -apple-system, BlinkMacSystemFont, &#x27;Segoe UI&#x27;, &#x27;Roboto&#x27;, &#x27;Helvetica Neue&#x27;, Arial, sans-serif;font-size:16px;line-height:1.5;color:#333"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-style:italic">Welcome to this </span><span style="font-style:italic;font-weight:bold">demo 🙌!</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World nested</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World double nested</span></p></div></div><div style="background-color:#fbe4e4"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">This paragraph has a background color</span></p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Paragraph</span></p><h1 style="font-size:48px;margin:3px"><span>Heading</span></h1><div style="text-align:right;align-items:flex-end"><h1 style="font-size:48px;margin:3px"><span>Heading right</span></h1></div><div style="text-align:justify"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>justified paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></div><hr style="border:none;border-top:2px dashed #ccc;margin:24px 0"/><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li><li style="text-align:right;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item right. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 2</span></p><div style="margin-top:8px"><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 2</span></p></li><li style="text-align:right;background-color:#fbe4e4;color:#0b6e99;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky right</span></p></li><li style="text-align:center;background-color:#fbe4e4;color:#0b6e99;align-items:center"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky center</span></p></li></ol></div></li></ol></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item</span></p></li></ol><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><svg width="18" height="18" viewBox="0 0 18 18" style="display:inline;vertical-align:middle;margin-right:8px"><rect x="2" y="2" width="14" height="14" rx="3" fill="#fff" stroke="#888" stroke-width="2"></rect></svg><span><span>Check List Item</span></span></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr></tbody></table><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#888" style="display:inline;vertical-align:middle"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg><span style="vertical-align:middle">Open file</span></a></div><img alt="From https://placehold.co/332x322.jpg" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none"/><div style="text-align:right;align-items:flex-end"><img alt="" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none" width="200"/></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#1976D2" style="display:inline;vertical-align:middle"><path d="M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z"></path></svg><span style="vertical-align:middle">Open video file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm</p></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">Open audio file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"></p><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">audio.mp3</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">Audio file caption</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Inline Content:</span></p><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold;font-style:italic;color:#e03e3e;background-color:#ddebf1">Styled Text</span><span> </span><a href="https://www.blocknotejs.org" style="color:#067df7;text-decoration-line:none" target="_blank"><span>Link</span></a></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 1</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 2</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 3</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 4</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span style="font-weight:bold">Table Cell Bold 5</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 6</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 7</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 8</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 9</span></td></tr></tbody></table><pre style="color:#f8f8f2;background:#282a36;text-shadow:0 1px rgba(0, 0, 0, 0.3);font-family:Consolas, Monaco, &#x27;Andale Mono&#x27;, &#x27;Ubuntu Mono&#x27;, monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;hyphens:none;padding:1em;margin:3px;overflow:auto;border-radius:0.3em;width:100%;font-size:16px;min-height:24px"><code><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#8be9fd">const</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">helloWorld</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace">message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=&gt;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">{</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​ ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">console</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">.</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">log</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#50fa7b">&quot;Hello World&quot;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">,</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">}</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/></code></pre><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Some inline code: </span><span style="font-family:GeistMono">var foo = 'bar';</span></p><hr style="border:none;border-top:1px solid #ccc;margin:11.5px 0"/><p style="font-size:16px;line-height:1.5;border-left:2px solid #bdbdbd;padding:0px 12px;font-style:italic;color:#9b9a97;display:block;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>All those moments will be lost in time, like tears in rain.</span></p></td></tr></tbody></table><!--/$--></body></html>"`;
3
+ exports[`react email exporter > should export a document (HTML snapshot) > __snapshots__/reactEmailExporter 1`] = `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><meta name="x-apple-disable-message-reformatting"/></head><body><!--$--><!--html--><!--head--><!--body--><table border="0" width="100%" cellPadding="0" cellSpacing="0" role="presentation" align="center"><tbody><tr><td style="font-family:&#x27;SF Pro Display&#x27;, -apple-system, BlinkMacSystemFont, &#x27;Segoe UI&#x27;, &#x27;Roboto&#x27;, &#x27;Helvetica Neue&#x27;, Arial, sans-serif;font-size:16px;line-height:1.5;color:#333"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-style:italic">Welcome to this </span><span style="font-style:italic;font-weight:bold">demo 🙌!</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World nested</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World double nested</span></p></div></div><div style="background-color:#fbe4e4"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">This paragraph has a background color</span></p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Paragraph</span></p><h1 style="font-size:48px;margin:3px"><span>Heading</span></h1><div style="text-align:right;align-items:flex-end"><h1 style="font-size:48px;margin:3px"><span>Heading right</span></h1></div><div style="text-align:justify"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>justified paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></div><hr style="border:none;border-top:2px dashed #ccc;margin:24px 0"/><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li><li style="text-align:right;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item right. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 2</span></p><div style="margin-top:8px"><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 2</span></p></li><li style="text-align:right;background-color:#fbe4e4;color:#0b6e99;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky right</span></p></li><li style="text-align:center;background-color:#fbe4e4;color:#0b6e99;align-items:center"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky center</span></p></li></ol></div></li></ol></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item</span></p></li></ol><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><svg width="18" height="18" viewBox="0 0 18 18" style="display:inline;vertical-align:middle;margin-right:8px"><rect x="2" y="2" width="14" height="14" rx="3" fill="#fff" stroke="#888" stroke-width="2"></rect></svg><span><span>Check List Item</span></span></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr></tbody></table><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#888" style="display:inline;vertical-align:middle"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg><span style="vertical-align:middle">Open file</span></a></div><img alt="From https://placehold.co/332x322.jpg" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none"/><div style="text-align:right;align-items:flex-end"><img alt="" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none" width="200"/></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#1976D2" style="display:inline;vertical-align:middle"><path d="M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z"></path></svg><span style="vertical-align:middle">Open video file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm</p></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">Open audio file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"></p><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">audio.mp3</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">Audio file caption</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Inline Content:</span></p><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold;font-style:italic;color:#e03e3e;background-color:#ddebf1">Styled Text</span><span> </span><a href="https://www.blocknotejs.org" style="color:#067df7;text-decoration-line:none" target="_blank"><span>Link</span></a></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 1</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 2</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 3</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 4</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span style="font-weight:bold">Table Cell Bold 5</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 6</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 7</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 8</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 9</span></td></tr></tbody></table><pre style="color:#f8f8f2;background:#282a36;text-shadow:0 1px rgba(0, 0, 0, 0.3);font-family:Consolas, Monaco, &#x27;Andale Mono&#x27;, &#x27;Ubuntu Mono&#x27;, monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;hyphens:none;padding:1em;margin:3px;overflow:auto;border-radius:0.3em;width:100%;font-size:16px;min-height:24px"><code><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#8be9fd">const</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">helloWorld</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace">message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=&gt;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">{</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​ ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">console</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">.</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">log</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#50fa7b">&quot;Hello World&quot;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">,</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">}</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/></code></pre><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Some inline code: </span><span style="font-family:GeistMono">var foo = 'bar';</span></p><hr style="border:none;border-top:1px solid #ccc;margin:11.5px 0"/><p style="font-size:16px;line-height:1.5;border-left:2px solid #bdbdbd;padding:0px 12px;font-style:italic;color:#9b9a97;display:block;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>All those moments will be lost in time, like tears in rain.</span></p></td></tr></tbody></table><!--/$--></body></html>"`;
4
4
 
5
- exports[`react email exporter > should export a document with multiple preview lines > __snapshots__/reactEmailExporterWithMultiplePreview 1`] = `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en"><head><link rel="preload" as="image" href="https://placehold.co/332x322.jpg"/><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><meta name="x-apple-disable-message-reformatting"/></head><body><!--$--><!--html--><!--head--><!--body--><table border="0" width="100%" cellPadding="0" cellSpacing="0" role="presentation" align="center"><tbody><tr><td style="font-family:&#x27;SF Pro Display&#x27;, -apple-system, BlinkMacSystemFont, &#x27;Segoe UI&#x27;, &#x27;Roboto&#x27;, &#x27;Helvetica Neue&#x27;, Arial, sans-serif;font-size:16px;line-height:1.5;color:#333"><div style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0" data-skip-in-text="true">First preview lineSecond preview line<div> ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏</div></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-style:italic">Welcome to this </span><span style="font-style:italic;font-weight:bold">demo 🙌!</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World nested</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World double nested</span></p></div></div><div style="background-color:#fbe4e4"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">This paragraph has a background color</span></p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Paragraph</span></p><h1 style="font-size:48px;margin:3px"><span>Heading</span></h1><div style="text-align:right;align-items:flex-end"><h1 style="font-size:48px;margin:3px"><span>Heading right</span></h1></div><div style="text-align:justify"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>justified paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></div><hr style="border:none;border-top:2px dashed #ccc;margin:24px 0"/><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li><li style="text-align:right;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item right. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 2</span></p><div style="margin-top:8px"><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 2</span></p></li><li style="text-align:right;background-color:#fbe4e4;color:#0b6e99;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky right</span></p></li><li style="text-align:center;background-color:#fbe4e4;color:#0b6e99;align-items:center"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky center</span></p></li></ol></div></li></ol></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item</span></p></li></ol><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><svg width="18" height="18" viewBox="0 0 18 18" style="display:inline;vertical-align:middle;margin-right:8px"><rect x="2" y="2" width="14" height="14" rx="3" fill="#fff" stroke="#888" stroke-width="2"></rect></svg><span><span>Check List Item</span></span></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr></tbody></table><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#888" style="display:inline;vertical-align:middle"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg><span style="vertical-align:middle">Open file</span></a></div><img alt="From https://placehold.co/332x322.jpg" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none"/><div style="text-align:right;align-items:flex-end"><img alt="" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none" width="200"/></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#1976D2" style="display:inline;vertical-align:middle"><path d="M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z"></path></svg><span style="vertical-align:middle">Open video file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm</p></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">Open audio file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"></p><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">audio.mp3</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">Audio file caption</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Inline Content:</span></p><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold;font-style:italic;color:#e03e3e;background-color:#ddebf1">Styled Text</span><span> </span><a href="https://www.blocknotejs.org" style="color:#067df7;text-decoration-line:none" target="_blank"><span>Link</span></a></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 1</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 2</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 3</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 4</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span style="font-weight:bold">Table Cell Bold 5</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 6</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 7</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 8</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 9</span></td></tr></tbody></table><pre style="color:#f8f8f2;background:#282a36;text-shadow:0 1px rgba(0, 0, 0, 0.3);font-family:Consolas, Monaco, &#x27;Andale Mono&#x27;, &#x27;Ubuntu Mono&#x27;, monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;hyphens:none;padding:1em;margin:3px;overflow:auto;border-radius:0.3em;width:100%;font-size:16px;min-height:24px"><code><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#8be9fd">const</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">helloWorld</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace">message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=&gt;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">{</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​ ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">console</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">.</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">log</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#50fa7b">&quot;Hello World&quot;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">,</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">}</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/></code></pre><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Some inline code: </span><span style="font-family:GeistMono">var foo = 'bar';</span></p><hr style="border:none;border-top:1px solid #ccc;margin:11.5px 0"/><p style="font-size:16px;line-height:1.5;border-left:2px solid #bdbdbd;padding:0px 12px;font-style:italic;color:#9b9a97;display:block;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>All those moments will be lost in time, like tears in rain.</span></p></td></tr></tbody></table><!--/$--></body></html>"`;
5
+ exports[`react email exporter > should export a document with multiple preview lines > __snapshots__/reactEmailExporterWithMultiplePreview 1`] = `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><meta name="x-apple-disable-message-reformatting"/></head><body><!--$--><!--html--><!--head--><!--body--><table border="0" width="100%" cellPadding="0" cellSpacing="0" role="presentation" align="center"><tbody><tr><td style="font-family:&#x27;SF Pro Display&#x27;, -apple-system, BlinkMacSystemFont, &#x27;Segoe UI&#x27;, &#x27;Roboto&#x27;, &#x27;Helvetica Neue&#x27;, Arial, sans-serif;font-size:16px;line-height:1.5;color:#333"><div style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0" data-skip-in-text="true">First preview lineSecond preview line<div> ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏</div></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-style:italic">Welcome to this </span><span style="font-style:italic;font-weight:bold">demo 🙌!</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World nested</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World double nested</span></p></div></div><div style="background-color:#fbe4e4"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">This paragraph has a background color</span></p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Paragraph</span></p><h1 style="font-size:48px;margin:3px"><span>Heading</span></h1><div style="text-align:right;align-items:flex-end"><h1 style="font-size:48px;margin:3px"><span>Heading right</span></h1></div><div style="text-align:justify"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>justified paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></div><hr style="border:none;border-top:2px dashed #ccc;margin:24px 0"/><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li><li style="text-align:right;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item right. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 2</span></p><div style="margin-top:8px"><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 2</span></p></li><li style="text-align:right;background-color:#fbe4e4;color:#0b6e99;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky right</span></p></li><li style="text-align:center;background-color:#fbe4e4;color:#0b6e99;align-items:center"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky center</span></p></li></ol></div></li></ol></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item</span></p></li></ol><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><svg width="18" height="18" viewBox="0 0 18 18" style="display:inline;vertical-align:middle;margin-right:8px"><rect x="2" y="2" width="14" height="14" rx="3" fill="#fff" stroke="#888" stroke-width="2"></rect></svg><span><span>Check List Item</span></span></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr></tbody></table><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#888" style="display:inline;vertical-align:middle"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg><span style="vertical-align:middle">Open file</span></a></div><img alt="From https://placehold.co/332x322.jpg" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none"/><div style="text-align:right;align-items:flex-end"><img alt="" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none" width="200"/></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#1976D2" style="display:inline;vertical-align:middle"><path d="M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z"></path></svg><span style="vertical-align:middle">Open video file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm</p></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">Open audio file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"></p><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">audio.mp3</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">Audio file caption</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Inline Content:</span></p><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold;font-style:italic;color:#e03e3e;background-color:#ddebf1">Styled Text</span><span> </span><a href="https://www.blocknotejs.org" style="color:#067df7;text-decoration-line:none" target="_blank"><span>Link</span></a></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 1</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 2</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 3</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 4</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span style="font-weight:bold">Table Cell Bold 5</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 6</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 7</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 8</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 9</span></td></tr></tbody></table><pre style="color:#f8f8f2;background:#282a36;text-shadow:0 1px rgba(0, 0, 0, 0.3);font-family:Consolas, Monaco, &#x27;Andale Mono&#x27;, &#x27;Ubuntu Mono&#x27;, monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;hyphens:none;padding:1em;margin:3px;overflow:auto;border-radius:0.3em;width:100%;font-size:16px;min-height:24px"><code><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#8be9fd">const</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">helloWorld</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace">message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=&gt;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">{</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​ ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">console</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">.</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">log</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#50fa7b">&quot;Hello World&quot;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">,</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">}</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/></code></pre><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Some inline code: </span><span style="font-family:GeistMono">var foo = 'bar';</span></p><hr style="border:none;border-top:1px solid #ccc;margin:11.5px 0"/><p style="font-size:16px;line-height:1.5;border-left:2px solid #bdbdbd;padding:0px 12px;font-style:italic;color:#9b9a97;display:block;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>All those moments will be lost in time, like tears in rain.</span></p></td></tr></tbody></table><!--/$--></body></html>"`;
6
6
 
7
- exports[`react email exporter > should export a document with preview > __snapshots__/reactEmailExporterWithPreview 1`] = `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en"><head><link rel="preload" as="image" href="https://placehold.co/332x322.jpg"/><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><meta name="x-apple-disable-message-reformatting"/></head><body><!--$--><!--html--><!--head--><!--body--><table border="0" width="100%" cellPadding="0" cellSpacing="0" role="presentation" align="center"><tbody><tr><td style="font-family:&#x27;SF Pro Display&#x27;, -apple-system, BlinkMacSystemFont, &#x27;Segoe UI&#x27;, &#x27;Roboto&#x27;, &#x27;Helvetica Neue&#x27;, Arial, sans-serif;font-size:16px;line-height:1.5;color:#333"><div style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0" data-skip-in-text="true">This is a preview of the email content<div> ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏</div></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-style:italic">Welcome to this </span><span style="font-style:italic;font-weight:bold">demo 🙌!</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World nested</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World double nested</span></p></div></div><div style="background-color:#fbe4e4"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">This paragraph has a background color</span></p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Paragraph</span></p><h1 style="font-size:48px;margin:3px"><span>Heading</span></h1><div style="text-align:right;align-items:flex-end"><h1 style="font-size:48px;margin:3px"><span>Heading right</span></h1></div><div style="text-align:justify"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>justified paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></div><hr style="border:none;border-top:2px dashed #ccc;margin:24px 0"/><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li><li style="text-align:right;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item right. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 2</span></p><div style="margin-top:8px"><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 2</span></p></li><li style="text-align:right;background-color:#fbe4e4;color:#0b6e99;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky right</span></p></li><li style="text-align:center;background-color:#fbe4e4;color:#0b6e99;align-items:center"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky center</span></p></li></ol></div></li></ol></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item</span></p></li></ol><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><svg width="18" height="18" viewBox="0 0 18 18" style="display:inline;vertical-align:middle;margin-right:8px"><rect x="2" y="2" width="14" height="14" rx="3" fill="#fff" stroke="#888" stroke-width="2"></rect></svg><span><span>Check List Item</span></span></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr></tbody></table><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#888" style="display:inline;vertical-align:middle"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg><span style="vertical-align:middle">Open file</span></a></div><img alt="From https://placehold.co/332x322.jpg" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none"/><div style="text-align:right;align-items:flex-end"><img alt="" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none" width="200"/></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#1976D2" style="display:inline;vertical-align:middle"><path d="M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z"></path></svg><span style="vertical-align:middle">Open video file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm</p></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">Open audio file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"></p><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">audio.mp3</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">Audio file caption</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Inline Content:</span></p><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold;font-style:italic;color:#e03e3e;background-color:#ddebf1">Styled Text</span><span> </span><a href="https://www.blocknotejs.org" style="color:#067df7;text-decoration-line:none" target="_blank"><span>Link</span></a></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 1</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 2</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 3</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 4</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span style="font-weight:bold">Table Cell Bold 5</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 6</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 7</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 8</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 9</span></td></tr></tbody></table><pre style="color:#f8f8f2;background:#282a36;text-shadow:0 1px rgba(0, 0, 0, 0.3);font-family:Consolas, Monaco, &#x27;Andale Mono&#x27;, &#x27;Ubuntu Mono&#x27;, monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;hyphens:none;padding:1em;margin:3px;overflow:auto;border-radius:0.3em;width:100%;font-size:16px;min-height:24px"><code><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#8be9fd">const</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">helloWorld</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace">message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=&gt;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">{</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​ ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">console</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">.</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">log</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#50fa7b">&quot;Hello World&quot;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">,</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">}</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/></code></pre><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Some inline code: </span><span style="font-family:GeistMono">var foo = 'bar';</span></p><hr style="border:none;border-top:1px solid #ccc;margin:11.5px 0"/><p style="font-size:16px;line-height:1.5;border-left:2px solid #bdbdbd;padding:0px 12px;font-style:italic;color:#9b9a97;display:block;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>All those moments will be lost in time, like tears in rain.</span></p></td></tr></tbody></table><!--/$--></body></html>"`;
7
+ exports[`react email exporter > should export a document with preview > __snapshots__/reactEmailExporterWithPreview 1`] = `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><meta name="x-apple-disable-message-reformatting"/></head><body><!--$--><!--html--><!--head--><!--body--><table border="0" width="100%" cellPadding="0" cellSpacing="0" role="presentation" align="center"><tbody><tr><td style="font-family:&#x27;SF Pro Display&#x27;, -apple-system, BlinkMacSystemFont, &#x27;Segoe UI&#x27;, &#x27;Roboto&#x27;, &#x27;Helvetica Neue&#x27;, Arial, sans-serif;font-size:16px;line-height:1.5;color:#333"><div style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0" data-skip-in-text="true">This is a preview of the email content<div> ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏</div></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-style:italic">Welcome to this </span><span style="font-style:italic;font-weight:bold">demo 🙌!</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World nested</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World double nested</span></p></div></div><div style="background-color:#fbe4e4"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">This paragraph has a background color</span></p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Paragraph</span></p><h1 style="font-size:48px;margin:3px"><span>Heading</span></h1><div style="text-align:right;align-items:flex-end"><h1 style="font-size:48px;margin:3px"><span>Heading right</span></h1></div><div style="text-align:justify"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>justified paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></div><hr style="border:none;border-top:2px dashed #ccc;margin:24px 0"/><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li><li style="text-align:right;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item right. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 2</span></p><div style="margin-top:8px"><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 2</span></p></li><li style="text-align:right;background-color:#fbe4e4;color:#0b6e99;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky right</span></p></li><li style="text-align:center;background-color:#fbe4e4;color:#0b6e99;align-items:center"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky center</span></p></li></ol></div></li></ol></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item</span></p></li></ol><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><svg width="18" height="18" viewBox="0 0 18 18" style="display:inline;vertical-align:middle;margin-right:8px"><rect x="2" y="2" width="14" height="14" rx="3" fill="#fff" stroke="#888" stroke-width="2"></rect></svg><span><span>Check List Item</span></span></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr></tbody></table><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#888" style="display:inline;vertical-align:middle"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg><span style="vertical-align:middle">Open file</span></a></div><img alt="From https://placehold.co/332x322.jpg" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none"/><div style="text-align:right;align-items:flex-end"><img alt="" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none" width="200"/></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#1976D2" style="display:inline;vertical-align:middle"><path d="M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z"></path></svg><span style="vertical-align:middle">Open video file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm</p></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">Open audio file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"></p><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">audio.mp3</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">Audio file caption</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Inline Content:</span></p><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold;font-style:italic;color:#e03e3e;background-color:#ddebf1">Styled Text</span><span> </span><a href="https://www.blocknotejs.org" style="color:#067df7;text-decoration-line:none" target="_blank"><span>Link</span></a></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 1</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 2</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 3</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 4</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span style="font-weight:bold">Table Cell Bold 5</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 6</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 7</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 8</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 9</span></td></tr></tbody></table><pre style="color:#f8f8f2;background:#282a36;text-shadow:0 1px rgba(0, 0, 0, 0.3);font-family:Consolas, Monaco, &#x27;Andale Mono&#x27;, &#x27;Ubuntu Mono&#x27;, monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;hyphens:none;padding:1em;margin:3px;overflow:auto;border-radius:0.3em;width:100%;font-size:16px;min-height:24px"><code><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#8be9fd">const</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">helloWorld</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace">message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=&gt;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">{</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​ ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">console</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">.</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">log</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#50fa7b">&quot;Hello World&quot;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">,</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">}</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/></code></pre><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Some inline code: </span><span style="font-family:GeistMono">var foo = 'bar';</span></p><hr style="border:none;border-top:1px solid #ccc;margin:11.5px 0"/><p style="font-size:16px;line-height:1.5;border-left:2px solid #bdbdbd;padding:0px 12px;font-style:italic;color:#9b9a97;display:block;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>All those moments will be lost in time, like tears in rain.</span></p></td></tr></tbody></table><!--/$--></body></html>"`;
8
8
 
9
9
  exports[`react email exporter > should handle document with background colors > __snapshots__/reactEmailExporterBackgroundColor 1`] = `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><meta name="x-apple-disable-message-reformatting"/></head><body><!--$--><!--html--><!--head--><!--body--><table border="0" width="100%" cellPadding="0" cellSpacing="0" role="presentation" align="center"><tbody><tr><td style="font-family:&#x27;SF Pro Display&#x27;, -apple-system, BlinkMacSystemFont, &#x27;Segoe UI&#x27;, &#x27;Roboto&#x27;, &#x27;Helvetica Neue&#x27;, Arial, sans-serif;font-size:16px;line-height:1.5;color:#333"><div style="background-color:#ddebf1"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Text with background color</span></p></div></td></tr></tbody></table><!--/$--></body></html>"`;
10
10
 
@@ -14,7 +14,7 @@ exports[`react email exporter > should handle document with code blocks > __snap
14
14
 
15
15
  exports[`react email exporter > should handle document with complex nested structure > __snapshots__/reactEmailExporterComplexNested 1`] = `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><meta name="x-apple-disable-message-reformatting"/></head><body><!--$--><!--html--><!--head--><!--body--><table border="0" width="100%" cellPadding="0" cellSpacing="0" role="presentation" align="center"><tbody><tr><td style="font-family:&#x27;SF Pro Display&#x27;, -apple-system, BlinkMacSystemFont, &#x27;Segoe UI&#x27;, &#x27;Roboto&#x27;, &#x27;Helvetica Neue&#x27;, Arial, sans-serif;font-size:16px;line-height:1.5;color:#333"><h1 style="font-size:48px;margin:3px"><span style="font-weight:bold">Complex Document</span></h1><div style="text-align:center;align-items:center"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>This is a paragraph with </span><span style="font-weight:bold">bold</span><span> and </span><span style="font-style:italic">italic</span><span> text, plus a </span><a href="https://example.com" style="color:#067df7;text-decoration-line:none" target="_blank"><span>link</span></a><span>.</span></p></div><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>List item with nested content</span></p><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="margin-left:24px"><tbody><tr><td><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Nested paragraph</span></p></td></tr></tbody></table><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Nested numbered item</span></p></li></ol></li></ul></td></tr></tbody></table><!--/$--></body></html>"`;
16
16
 
17
- exports[`react email exporter > should handle document with custom body styles > __snapshots__/reactEmailExporterCustomBodyStyles 1`] = `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en"><head><link rel="preload" as="image" href="https://placehold.co/332x322.jpg"/><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><meta name="x-apple-disable-message-reformatting"/></head><body><!--$--><!--html--><!--head--><!--body--><table border="0" width="100%" cellPadding="0" cellSpacing="0" role="presentation" align="center"><tbody><tr><td style="font-family:Arial, sans-serif"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-style:italic">Welcome to this </span><span style="font-style:italic;font-weight:bold">demo 🙌!</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World nested</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World double nested</span></p></div></div><div style="background-color:#fbe4e4"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">This paragraph has a background color</span></p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Paragraph</span></p><h1 style="font-size:48px;margin:3px"><span>Heading</span></h1><div style="text-align:right;align-items:flex-end"><h1 style="font-size:48px;margin:3px"><span>Heading right</span></h1></div><div style="text-align:justify"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>justified paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></div><hr style="border:none;border-top:2px dashed #ccc;margin:24px 0"/><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li><li style="text-align:right;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item right. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 2</span></p><div style="margin-top:8px"><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 2</span></p></li><li style="text-align:right;background-color:#fbe4e4;color:#0b6e99;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky right</span></p></li><li style="text-align:center;background-color:#fbe4e4;color:#0b6e99;align-items:center"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky center</span></p></li></ol></div></li></ol></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item</span></p></li></ol><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><svg width="18" height="18" viewBox="0 0 18 18" style="display:inline;vertical-align:middle;margin-right:8px"><rect x="2" y="2" width="14" height="14" rx="3" fill="#fff" stroke="#888" stroke-width="2"></rect></svg><span><span>Check List Item</span></span></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr></tbody></table><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#888" style="display:inline;vertical-align:middle"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg><span style="vertical-align:middle">Open file</span></a></div><img alt="From https://placehold.co/332x322.jpg" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none"/><div style="text-align:right;align-items:flex-end"><img alt="" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none" width="200"/></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#1976D2" style="display:inline;vertical-align:middle"><path d="M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z"></path></svg><span style="vertical-align:middle">Open video file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm</p></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">Open audio file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"></p><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">audio.mp3</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">Audio file caption</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Inline Content:</span></p><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold;font-style:italic;color:#e03e3e;background-color:#ddebf1">Styled Text</span><span> </span><a href="https://www.blocknotejs.org" style="color:#067df7;text-decoration-line:none" target="_blank"><span>Link</span></a></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 1</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 2</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 3</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 4</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span style="font-weight:bold">Table Cell Bold 5</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 6</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 7</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 8</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 9</span></td></tr></tbody></table><pre style="color:#f8f8f2;background:#282a36;text-shadow:0 1px rgba(0, 0, 0, 0.3);font-family:Consolas, Monaco, &#x27;Andale Mono&#x27;, &#x27;Ubuntu Mono&#x27;, monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;hyphens:none;padding:1em;margin:3px;overflow:auto;border-radius:0.3em;width:100%;font-size:16px;min-height:24px"><code><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#8be9fd">const</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">helloWorld</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace">message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=&gt;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">{</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​ ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">console</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">.</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">log</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#50fa7b">&quot;Hello World&quot;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">,</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">}</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/></code></pre><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Some inline code: </span><span style="font-family:GeistMono">var foo = 'bar';</span></p><hr style="border:none;border-top:1px solid #ccc;margin:11.5px 0"/><p style="font-size:16px;line-height:1.5;border-left:2px solid #bdbdbd;padding:0px 12px;font-style:italic;color:#9b9a97;display:block;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>All those moments will be lost in time, like tears in rain.</span></p></td></tr></tbody></table><!--/$--></body></html>"`;
17
+ exports[`react email exporter > should handle document with custom body styles > __snapshots__/reactEmailExporterCustomBodyStyles 1`] = `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><meta name="x-apple-disable-message-reformatting"/></head><body><!--$--><!--html--><!--head--><!--body--><table border="0" width="100%" cellPadding="0" cellSpacing="0" role="presentation" align="center"><tbody><tr><td style="font-family:Arial, sans-serif"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-style:italic">Welcome to this </span><span style="font-style:italic;font-weight:bold">demo 🙌!</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World nested</span></p><div style="margin-left:24px"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Hello World double nested</span></p></div></div><div style="background-color:#fbe4e4"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">This paragraph has a background color</span></p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Paragraph</span></p><h1 style="font-size:48px;margin:3px"><span>Heading</span></h1><div style="text-align:right;align-items:flex-end"><h1 style="font-size:48px;margin:3px"><span>Heading right</span></h1></div><div style="text-align:justify"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>justified paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></div><hr style="border:none;border-top:2px dashed #ccc;margin:24px 0"/><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p><ul style="margin-bottom:0.5rem;list-style-type:disc;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li><li style="text-align:right;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Bullet List Item right. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</span></p></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item 2</span></p><div style="margin-top:8px"><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 1</span></p></li><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested 2</span></p></li><li style="text-align:right;background-color:#fbe4e4;color:#0b6e99;align-items:flex-end"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky right</span></p></li><li style="text-align:center;background-color:#fbe4e4;color:#0b6e99;align-items:center"><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item Nested funky center</span></p></li></ol></div></li></ol></li></ul><ol start="1" style="margin-bottom:0.5rem;list-style-type:decimal;padding-left:1.5rem"><li><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>Numbered List Item</span></p></li></ol><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><svg width="18" height="18" viewBox="0 0 18 18" style="display:inline;vertical-align:middle;margin-right:8px"><rect x="2" y="2" width="14" height="14" rx="3" fill="#fff" stroke="#888" stroke-width="2"></rect></svg><span><span>Check List Item</span></span></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Wide Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell</span></td></tr></tbody></table><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#888" style="display:inline;vertical-align:middle"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg><span style="vertical-align:middle">Open file</span></a></div><img alt="From https://placehold.co/332x322.jpg" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none"/><div style="text-align:right;align-items:flex-end"><img alt="" src="https://placehold.co/332x322.jpg" style="display:block;outline:none;border:none;text-decoration:none" width="200"/></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#1976D2" style="display:inline;vertical-align:middle"><path d="M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z"></path></svg><span style="vertical-align:middle">Open video file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm</p></div><div style="margin:8px 0"><a href="https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">Open audio file</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">From https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"></p><div style="margin:8px 0"><a href="" style="color:#333;text-decoration-line:none;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:16px" target="_blank"><svg height="18" width="18" viewBox="0 0 24 24" fill="#4F8A10" style="display:inline;vertical-align:middle"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg><span style="vertical-align:middle">audio.mp3</span></a><p style="font-size:16px;line-height:1.5;color:#888;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px">Audio file caption</p></div><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Inline Content:</span></p><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold;font-style:italic;color:#e03e3e;background-color:#ddebf1">Styled Text</span><span> </span><a href="https://www.blocknotejs.org" style="color:#067df7;text-decoration-line:none" target="_blank"><span>Link</span></a></p><table style="border-collapse:collapse;width:100%;margin:16px 0;border:1px solid #ddd;border-radius:4px;overflow:hidden" border="0" cellPadding="0" cellSpacing="0"><tbody><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 1</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 2</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 3</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 4</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span style="font-weight:bold">Table Cell Bold 5</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 6</span></td></tr><tr><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 7</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 8</span></td><td style="border:1px solid #ddd;padding:8px 12px;background:inherit;text-align:left;color:inherit;font-size:16px;line-height:1.5;margin:3px;min-height:24px"><span>Table Cell 9</span></td></tr></tbody></table><pre style="color:#f8f8f2;background:#282a36;text-shadow:0 1px rgba(0, 0, 0, 0.3);font-family:Consolas, Monaco, &#x27;Andale Mono&#x27;, &#x27;Ubuntu Mono&#x27;, monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;hyphens:none;padding:1em;margin:3px;overflow:auto;border-radius:0.3em;width:100%;font-size:16px;min-height:24px"><code><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#8be9fd">const</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">helloWorld</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace">message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">=&gt;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">{</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​ ‍​</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">console</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">.</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f1fa8c">log</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">(</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#50fa7b">&quot;Hello World&quot;</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">,</span><span style="font-family:&#x27;CommitMono&#x27;, monospace"> ‍​message</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">)</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">}</span><span style="font-family:&#x27;CommitMono&#x27;, monospace;color:#f8f8f2">;</span><br/></code></pre><p style="font-size:16px;line-height:1.5;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span style="font-weight:bold">Some inline code: </span><span style="font-family:GeistMono">var foo = 'bar';</span></p><hr style="border:none;border-top:1px solid #ccc;margin:11.5px 0"/><p style="font-size:16px;line-height:1.5;border-left:2px solid #bdbdbd;padding:0px 12px;font-style:italic;color:#9b9a97;display:block;margin:3px;min-height:24px;margin-top:3px;margin-bottom:3px;margin-left:3px;margin-right:3px"><span>All those moments will be lost in time, like tears in rain.</span></p></td></tr></tbody></table><!--/$--></body></html>"`;
18
18
 
19
19
  exports[`react email exporter > should handle document with headings of different levels > __snapshots__/reactEmailExporterHeadings 1`] = `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><meta name="x-apple-disable-message-reformatting"/></head><body><!--$--><!--html--><!--head--><!--body--><table border="0" width="100%" cellPadding="0" cellSpacing="0" role="presentation" align="center"><tbody><tr><td style="font-family:&#x27;SF Pro Display&#x27;, -apple-system, BlinkMacSystemFont, &#x27;Segoe UI&#x27;, &#x27;Roboto&#x27;, &#x27;Helvetica Neue&#x27;, Arial, sans-serif;font-size:16px;line-height:1.5;color:#333"><h1 style="font-size:48px;margin:3px"><span>Heading 1</span></h1><h2 style="font-size:36px;margin:3px"><span>Heading 2</span></h2><h3 style="font-size:24px;margin:3px"><span>Heading 3</span></h3></td></tr></tbody></table><!--/$--></body></html>"`;
20
20
 
@@ -3,7 +3,6 @@ import {
3
3
  createPageBreakBlockConfig,
4
4
  DefaultBlockSchema,
5
5
  mapTableCell,
6
- StyledText,
7
6
  } from "@blocknote/core";
8
7
  import {
9
8
  CodeBlock,
@@ -260,7 +259,12 @@ export const createReactEmailBlockMappingForDefaultSchema = (
260
259
  },
261
260
 
262
261
  codeBlock: (block) => {
263
- const textContent = (block.content as StyledText<any>[])[0]?.text || "";
262
+ // Code blocks hold plain content: at most a single unstyled text item.
263
+ const [textItem, ...excessItems] = block.content;
264
+ if (excessItems.length > 0 || (textItem && !("text" in textItem))) {
265
+ throw new Error("expected plain block content to be a single text item");
266
+ }
267
+ const textContent = textItem?.text ?? "";
264
268
 
265
269
  return (
266
270
  <CodeBlock
@@ -1,4 +1,4 @@
1
- import { describe, it, expect } from "vitest";
1
+ import { describe, it, expect } from "vite-plus/test";
2
2
  import { ReactEmailExporter } from "./reactEmailExporter.jsx";
3
3
  import { reactEmailDefaultSchemaMappings } from "./defaultSchema/index.js";
4
4
  import {
@@ -490,6 +490,7 @@ describe("react email exporter", () => {
490
490
  {
491
491
  id: "1",
492
492
  type: "codeBlock",
493
+ // Code blocks hold plain content.
493
494
  content: [
494
495
  {
495
496
  type: "text",
package/src/vite-env.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /// <reference types="vite/client" />
1
+ /// <reference types="vite-plus/client" />
2
2
 
3
3
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
4
4
  interface ImportMetaEnv {