@react-email/editor 1.6.13 → 1.7.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.
@@ -265,7 +265,7 @@ const THEME_BASIC = [
265
265
  {
266
266
  label: "Align",
267
267
  type: "select",
268
- value: "left",
268
+ value: "center",
269
269
  options: {
270
270
  left: "Left",
271
271
  center: "Center",
@@ -264,7 +264,7 @@ const THEME_BASIC = [
264
264
  {
265
265
  label: "Align",
266
266
  type: "select",
267
- value: "left",
267
+ value: "center",
268
268
  options: {
269
269
  left: "Left",
270
270
  center: "Center",
@@ -1732,4 +1732,4 @@ const EmailTheming = Extension.create({
1732
1732
  //#endregion
1733
1733
  export { getThemeBodyFontSizePx as C, getGlobalContent as E, getPanelTitle as S, GlobalContent as T, DEFAULT_INBOX_FONT_SIZE_PX as _, getResolvedNodeStyles as a, RESET_THEMES as b, setGlobalCssInjected as c, useEmailTheming as d, createTheme as f, themeStylesToPanelOverrides as g, parseCssValue as h, getMergedCssJs as i, setGlobalStyles as l, isThemeConfig as m, RESET_NODE_TYPES as n, getThemeComponentKey as o, extendTheme as p, getEmailTheming as r, setCurrentTheme as s, EmailTheming as t, stylesToCss as u, EDITOR_THEMES as v, resolveResetValue as w, SUPPORTED_CSS_PROPERTIES as x, INBOX_EMAIL_DEFAULTS as y };
1734
1734
 
1735
- //# sourceMappingURL=extension-DPl6ZtKu.mjs.map
1735
+ //# sourceMappingURL=extension-DjBptEVp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension-DjBptEVp.mjs","names":[],"sources":["../src/extensions/global-content.ts","../src/plugins/email-theming/css-transforms.ts","../src/plugins/email-theming/themes.ts","../src/plugins/email-theming/normalization.ts","../src/plugins/email-theming/theme-config.ts","../src/plugins/email-theming/extension.tsx"],"sourcesContent":["import { type Editor, mergeAttributes, Node } from '@tiptap/core';\n\nconst GLOBAL_CONTENT_NODE_TYPE = 'globalContent' as const;\n\nexport interface GlobalContentOptions {\n key: string;\n data: Record<string, unknown>;\n}\n\ndeclare module '@tiptap/core' {\n interface GlobalContent<ReturnType> {\n setGlobalContent: (key: string, value: unknown) => ReturnType;\n }\n\n interface Commands<ReturnType> {\n globalContent: GlobalContent<ReturnType>;\n }\n}\n\nlet cachedGlobalPosition: number | null = null;\n\nfunction findGlobalContentPositions(doc: Editor['state']['doc']) {\n const positions: number[] = [];\n\n doc.descendants((node, position) => {\n if (node.type.name === GLOBAL_CONTENT_NODE_TYPE) {\n positions.push(position);\n }\n });\n\n return positions;\n}\n\nfunction getCachedGlobalContentPosition(doc: Editor['state']['doc']) {\n if (cachedGlobalPosition != null) {\n try {\n if (\n doc.nodeAt(cachedGlobalPosition)?.type.name === GLOBAL_CONTENT_NODE_TYPE\n ) {\n return cachedGlobalPosition;\n }\n } catch {\n cachedGlobalPosition = null;\n }\n }\n\n const positions = findGlobalContentPositions(doc);\n cachedGlobalPosition = positions[0] ?? null;\n return cachedGlobalPosition;\n}\n\nexport function getGlobalContent(key: string, editor: Editor): unknown | null {\n const position = getCachedGlobalContentPosition(editor.state.doc);\n if (cachedGlobalPosition == null) {\n return null;\n }\n return editor.state.doc.nodeAt(position)?.attrs.data[key] ?? null;\n}\n\nexport const GlobalContent = Node.create<GlobalContentOptions>({\n name: GLOBAL_CONTENT_NODE_TYPE,\n\n addOptions() {\n return {\n key: GLOBAL_CONTENT_NODE_TYPE,\n data: {},\n };\n },\n\n group: 'block',\n\n selectable: false,\n draggable: false,\n atom: true,\n\n addAttributes() {\n return {\n data: {\n default: this.options.data,\n },\n };\n },\n\n parseHTML() {\n return [{ tag: `div[data-type=\"${this.name}\"]` }];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n 'div',\n mergeAttributes(HTMLAttributes, {\n 'data-type': this.name,\n // The node needs to have a width and height, so then\n // internal TipTap extension can find the first node position\n // and calculate the correct position of the document container\n style:\n 'width: 100%; height: 1px; visibility: hidden; background-color: transparent;',\n }),\n ];\n },\n\n addCommands() {\n return {\n setGlobalContent:\n (key: string, value: unknown) =>\n ({ tr, dispatch }) => {\n const ensureGlobalPosition = () => {\n const positions = findGlobalContentPositions(tr.doc);\n\n for (let i = positions.length - 1; i > 0; i--) {\n tr.delete(positions[i], positions[i] + 1);\n }\n\n const pos = positions[0] ?? -1;\n if (pos >= 0) {\n cachedGlobalPosition = pos;\n } else {\n cachedGlobalPosition = 0;\n tr.insert(0, this.type.create());\n }\n };\n\n if (dispatch) {\n ensureGlobalPosition();\n\n if (cachedGlobalPosition == null) {\n return false;\n }\n tr.setNodeAttribute(cachedGlobalPosition, 'data', {\n ...tr.doc.nodeAt(cachedGlobalPosition)?.attrs.data,\n [key]: value,\n });\n }\n\n return true;\n },\n };\n },\n});\n","import { ensureBorderStyleFallback } from '../../utils/styles';\nimport { RESET_NODE_TYPES } from './extension';\nimport type { CssJs, KnownThemeComponents, PanelGroup } from './types';\n\nexport function transformToCssJs(\n styleArray: PanelGroup[],\n baseFontSize: number,\n): CssJs {\n // Use prototype-less objects so attacker-supplied keys like `__proto__`,\n // `constructor`, or `prototype` are stored as plain own properties instead\n // of routing through the Object.prototype setter, which would mutate the\n // global prototype.\n const cssJS = Object.create(null) as CssJs;\n\n if (!Array.isArray(styleArray)) {\n return cssJS;\n }\n\n for (const style of styleArray) {\n for (const input of style.inputs) {\n let value = input.value;\n\n // If there's a unit property, append it to the value\n if (input.unit && typeof value === 'number') {\n // if font size prop convert px unit to em to adjust size in mobile\n if (input.prop === 'fontSize') {\n value = `${value / baseFontSize}em`;\n } else {\n value = `${value}${input.unit}`;\n }\n }\n\n if (!input.classReference) {\n continue;\n }\n\n if (!cssJS[input.classReference]) {\n cssJS[input.classReference] = Object.create(null);\n }\n\n // @ts-expect-error -- backward compatibility: 'h-padding' is a legacy prop not in KnownCssProperties\n if (input.prop === 'h-padding') {\n cssJS[input.classReference].paddingLeft = value;\n cssJS[input.classReference].paddingRight = value;\n\n continue;\n }\n\n // @ts-expect-error -- input.prop is KnownCssProperties but CssJs values are React.CSSProperties; dynamic assignment is intentional\n cssJS[input.classReference][input.prop] = value;\n }\n }\n\n for (const key of Object.keys(cssJS)) {\n ensureBorderStyleFallback(\n cssJS[key as keyof CssJs] as Record<string, string | number>,\n );\n }\n\n return cssJS;\n}\n\nexport function mergeCssJs(original: CssJs, newCssJs: CssJs) {\n // Same defensive pattern as `transformToCssJs`: a prototype-less root keeps\n // a hostile `__proto__` key in the input from triggering the\n // Object.prototype setter during assignment.\n const merged = Object.assign(Object.create(null), original) as CssJs;\n\n for (const key in newCssJs) {\n const keyType = key as keyof CssJs;\n\n if (\n Object.hasOwn(merged, key) &&\n typeof merged[keyType] === 'object' &&\n !Array.isArray(merged[keyType])\n ) {\n merged[keyType] = Object.assign(\n Object.create(null),\n merged[keyType],\n newCssJs[keyType],\n );\n } else {\n merged[keyType] = newCssJs[keyType];\n }\n }\n\n return merged;\n}\n\nexport function injectThemeCss(\n styles: CssJs,\n options: { styleId?: string; scopeSelector?: string } = {},\n) {\n const container =\n options.scopeSelector ?? '.tiptap-extended .tiptap.ProseMirror';\n const prefix = '.node-';\n const styleId = options.styleId ?? 'tiptap-extended-theme-css';\n const getNodeSelector = (classReference: string) =>\n `${container} ${prefix}${classReference}`;\n const getSelectors = (classReference: KnownThemeComponents) => {\n switch (classReference) {\n case 'body':\n return [container];\n case 'reset':\n return [];\n case 'list':\n return [\n getNodeSelector('list'),\n getNodeSelector('bulletList'),\n getNodeSelector('orderedList'),\n ];\n case 'bulletList':\n return [getNodeSelector('bulletList')];\n case 'orderedList':\n return [getNodeSelector('orderedList')];\n case 'nestedList':\n return [\n getNodeSelector('nestedList'),\n `${container} .node-list .node-list`,\n `${container} .node-bulletList .node-bulletList`,\n `${container} .node-bulletList .node-orderedList`,\n `${container} .node-orderedList .node-bulletList`,\n `${container} .node-orderedList .node-orderedList`,\n ];\n case 'listParagraph':\n return [`${container} .node-listItem > .node-paragraph`];\n default:\n return [getNodeSelector(classReference)];\n }\n };\n const resetStyles = styles.reset ?? {};\n\n const css = Object.entries(styles).reduce((acc, [key, value]) => {\n const classReference = key as KnownThemeComponents;\n const selectors = getSelectors(classReference);\n if (selectors.length === 0) {\n return acc;\n }\n\n const resolvedStyles = RESET_NODE_TYPES.has(classReference)\n ? { ...resetStyles, ...value }\n : value;\n\n const cssString = Object.entries(resolvedStyles).reduce(\n (acc, [prop, val]) => {\n const normalizeProp = prop.replace(/([A-Z])/g, '-$1').toLowerCase();\n\n if (val === undefined) {\n return acc;\n }\n\n return `${acc}${normalizeProp}:${val};`;\n },\n '',\n );\n\n return `${acc}${selectors.join(',')}{${cssString}}`;\n }, '');\n\n let styleTag = document.getElementById(styleId) as HTMLStyleElement;\n\n if (!styleTag) {\n styleTag = document.createElement('style');\n styleTag.textContent = css;\n styleTag.id = styleId;\n\n document.head.appendChild(styleTag);\n\n return;\n }\n\n styleTag.textContent = css;\n}\n\nexport function injectGlobalPlainCss(\n css?: string | null,\n options: { styleId?: string; scopeSelector?: string } = {},\n) {\n const styleId = options.styleId ?? 'global-editor-style';\n const container = options.scopeSelector ?? '.tiptap-extended .ProseMirror';\n let styleElement = document.getElementById(styleId);\n\n if (!css) {\n if (styleElement) {\n styleElement.textContent = '';\n }\n return;\n }\n\n if (!styleElement) {\n styleElement = document.createElement('style');\n styleElement.id = styleId;\n document.head.appendChild(styleElement);\n }\n\n // Remove CSS within @media (prefers-color-scheme: dark) blocks\n const cleanedCSS = css.replace(\n /@media\\s?\\(prefers-color-scheme:\\s?dark\\)\\s?{([\\s\\S]+?})\\s*}/g,\n '',\n );\n\n // TODO: Figure out a way to extract the body and apply the styles out of the nested .tiptap-extended\n styleElement.textContent = `${container} { ${cleanedCSS} }`;\n}\n","import type {\n EditorTheme,\n PanelGroup,\n PanelSectionId,\n ResetTheme,\n SupportedCssProperties,\n} from './types';\n\n/**\n * Single source of truth for panel section display titles.\n * Titles are resolved from here at render time via `getPanelTitle`,\n * so they never depend on what's persisted in the DB.\n */\nconst PANEL_SECTION_TITLES: Record<PanelSectionId, string> = {\n body: 'Background',\n container: 'Body',\n typography: 'Text',\n h1: 'Title',\n h2: 'Subtitle',\n h3: 'Heading',\n paragraph: 'Paragraph',\n list: 'List',\n 'nested-list': 'Nested List',\n 'list-item': 'List Item',\n link: 'Link',\n image: 'Image',\n button: 'Button',\n 'code-block': 'Code Block',\n 'inline-code': 'Inline Code',\n};\n\n/**\n * Resolves the display title for a panel group.\n * Uses the `id` lookup when available, falls back to the\n * DB-persisted `title` for backwards compatibility.\n */\nexport function getPanelTitle(group: PanelGroup): string {\n if (group.id && group.id in PANEL_SECTION_TITLES) {\n return PANEL_SECTION_TITLES[group.id];\n }\n return group.title;\n}\n\nconst THEME_BASIC: PanelGroup[] = [\n {\n id: 'body',\n title: 'Background',\n classReference: 'body',\n inputs: [\n {\n label: 'Background',\n type: 'color',\n value: '#ffffff',\n prop: 'backgroundColor',\n classReference: 'body',\n },\n {\n label: 'Padding Top',\n type: 'number',\n value: undefined,\n unit: 'px',\n prop: 'paddingTop',\n classReference: 'body',\n },\n {\n label: 'Padding Right',\n type: 'number',\n value: undefined,\n unit: 'px',\n prop: 'paddingRight',\n classReference: 'body',\n },\n {\n label: 'Padding Bottom',\n type: 'number',\n value: undefined,\n unit: 'px',\n prop: 'paddingBottom',\n classReference: 'body',\n },\n {\n label: 'Padding Left',\n type: 'number',\n value: undefined,\n unit: 'px',\n prop: 'paddingLeft',\n classReference: 'body',\n },\n ],\n },\n {\n id: 'container',\n title: 'Content',\n classReference: 'container',\n inputs: [\n {\n label: 'Align',\n type: 'select',\n value: 'center',\n options: {\n left: 'Left',\n center: 'Center',\n right: 'Right',\n },\n prop: 'align',\n classReference: 'container',\n },\n {\n label: 'Width',\n type: 'number',\n value: 600,\n unit: 'px',\n prop: 'width',\n classReference: 'container',\n },\n {\n label: 'Height',\n type: 'number',\n unit: 'px',\n prop: 'height',\n classReference: 'container',\n },\n {\n label: 'Text',\n type: 'color',\n value: '#000000',\n prop: 'color',\n classReference: 'container',\n },\n {\n label: 'Background',\n type: 'color',\n value: '#ffffff',\n prop: 'backgroundColor',\n classReference: 'container',\n },\n {\n label: 'Padding Top',\n type: 'number',\n value: 0,\n unit: 'px',\n prop: 'paddingTop',\n classReference: 'container',\n },\n {\n label: 'Padding Right',\n type: 'number',\n value: 0,\n unit: 'px',\n prop: 'paddingRight',\n classReference: 'container',\n },\n {\n label: 'Padding Bottom',\n type: 'number',\n value: 0,\n unit: 'px',\n prop: 'paddingBottom',\n classReference: 'container',\n },\n {\n label: 'Padding Left',\n type: 'number',\n value: 0,\n unit: 'px',\n prop: 'paddingLeft',\n classReference: 'container',\n },\n {\n label: 'Corner radius',\n type: 'number',\n value: 0,\n unit: 'px',\n prop: 'borderRadius',\n classReference: 'container',\n },\n {\n label: 'Border color',\n type: 'color',\n value: '#000000',\n prop: 'borderColor',\n classReference: 'container',\n },\n ],\n },\n {\n id: 'typography',\n title: 'Text',\n classReference: 'body',\n inputs: [\n {\n label: 'Font size',\n type: 'number',\n value: 14,\n unit: 'px',\n prop: 'fontSize',\n classReference: 'body',\n },\n {\n label: 'Line Height',\n type: 'number',\n value: 155,\n unit: '%',\n prop: 'lineHeight',\n classReference: 'container',\n },\n ],\n },\n {\n id: 'h1',\n title: 'Title',\n category: 'Text',\n classReference: 'h1',\n inputs: [],\n },\n {\n id: 'h2',\n title: 'Subtitle',\n category: 'Text',\n classReference: 'h2',\n inputs: [],\n },\n {\n id: 'h3',\n title: 'Heading',\n category: 'Text',\n classReference: 'h3',\n inputs: [],\n },\n {\n id: 'paragraph',\n title: 'Paragraph',\n category: 'Text',\n classReference: 'paragraph',\n inputs: [],\n },\n {\n id: 'list',\n title: 'List',\n category: 'Text',\n classReference: 'list',\n inputs: [],\n },\n {\n id: 'nested-list',\n title: 'Nested List',\n category: 'Text',\n classReference: 'nestedList',\n inputs: [],\n },\n {\n id: 'list-item',\n title: 'List Item',\n category: 'Text',\n classReference: 'listItem',\n inputs: [],\n },\n {\n id: 'link',\n title: 'Link',\n classReference: 'link',\n inputs: [\n {\n label: 'Color',\n type: 'color',\n value: '#0670DB',\n prop: 'color',\n classReference: 'link',\n },\n {\n label: 'Decoration',\n type: 'select',\n value: 'underline',\n prop: 'textDecoration',\n options: {\n underline: 'Underline',\n none: 'None',\n },\n classReference: 'link',\n },\n ],\n },\n {\n id: 'image',\n title: 'Image',\n classReference: 'image',\n inputs: [\n {\n label: 'Border radius',\n type: 'number',\n value: 8,\n unit: 'px',\n prop: 'borderRadius',\n classReference: 'image',\n },\n ],\n },\n {\n id: 'button',\n title: 'Button',\n classReference: 'button',\n inputs: [\n {\n label: 'Background',\n type: 'color',\n value: '#000000',\n prop: 'backgroundColor',\n classReference: 'button',\n },\n {\n label: 'Text color',\n type: 'color',\n value: '#ffffff',\n prop: 'color',\n classReference: 'button',\n },\n {\n label: 'Radius',\n type: 'number',\n value: 4,\n unit: 'px',\n prop: 'borderRadius',\n classReference: 'button',\n },\n {\n label: 'Padding Top',\n type: 'number',\n value: 7,\n unit: 'px',\n prop: 'paddingTop',\n classReference: 'button',\n },\n {\n label: 'Padding Right',\n type: 'number',\n value: 12,\n unit: 'px',\n prop: 'paddingRight',\n classReference: 'button',\n },\n {\n label: 'Padding Bottom',\n type: 'number',\n value: 7,\n unit: 'px',\n prop: 'paddingBottom',\n classReference: 'button',\n },\n {\n label: 'Padding Left',\n type: 'number',\n value: 12,\n unit: 'px',\n prop: 'paddingLeft',\n classReference: 'button',\n },\n ],\n },\n {\n id: 'code-block',\n title: 'Code Block',\n classReference: 'codeBlock',\n inputs: [\n {\n label: 'Border Radius',\n type: 'number',\n value: 4,\n unit: 'px',\n prop: 'borderRadius',\n classReference: 'codeBlock',\n },\n {\n label: 'Padding Top',\n type: 'number',\n value: 12,\n unit: 'px',\n prop: 'paddingTop',\n classReference: 'codeBlock',\n },\n {\n label: 'Padding Bottom',\n type: 'number',\n value: 12,\n unit: 'px',\n prop: 'paddingBottom',\n classReference: 'codeBlock',\n },\n {\n label: 'Padding Left',\n type: 'number',\n value: 16,\n unit: 'px',\n prop: 'paddingLeft',\n classReference: 'codeBlock',\n },\n {\n label: 'Padding Right',\n type: 'number',\n value: 16,\n unit: 'px',\n prop: 'paddingRight',\n classReference: 'codeBlock',\n },\n ],\n },\n {\n id: 'inline-code',\n title: 'Inline Code',\n classReference: 'inlineCode',\n inputs: [\n {\n label: 'Background',\n type: 'color',\n value: '#e5e7eb',\n prop: 'backgroundColor',\n classReference: 'inlineCode',\n },\n {\n label: 'Text color',\n type: 'color',\n value: '#1e293b',\n prop: 'color',\n classReference: 'inlineCode',\n },\n {\n label: 'Radius',\n type: 'number',\n value: 4,\n unit: 'px',\n prop: 'borderRadius',\n classReference: 'inlineCode',\n },\n ],\n },\n];\n\nconst THEME_MINIMAL: PanelGroup[] = [\n {\n id: 'body',\n title: 'Background',\n classReference: 'body',\n inputs: [\n {\n label: 'Background',\n type: 'color',\n value: '#ffffff',\n prop: 'backgroundColor',\n classReference: 'body',\n },\n {\n label: 'Margin',\n type: 'number',\n value: 0,\n unit: 'px',\n prop: 'margin',\n classReference: 'body',\n },\n {\n label: 'Padding Top',\n type: 'number',\n value: 0,\n unit: 'px',\n prop: 'paddingTop',\n classReference: 'body',\n },\n {\n label: 'Padding Right',\n type: 'number',\n value: 0,\n unit: 'px',\n prop: 'paddingRight',\n classReference: 'body',\n },\n {\n label: 'Padding Bottom',\n type: 'number',\n value: 0,\n unit: 'px',\n prop: 'paddingBottom',\n classReference: 'body',\n },\n {\n label: 'Padding Left',\n type: 'number',\n value: 0,\n unit: 'px',\n prop: 'paddingLeft',\n classReference: 'body',\n },\n ],\n },\n {\n id: 'container',\n title: 'Content',\n classReference: 'container',\n inputs: [\n {\n label: 'Align',\n type: 'select',\n value: 'left',\n options: {\n left: 'Left',\n center: 'Center',\n right: 'Right',\n },\n prop: 'align',\n classReference: 'container',\n },\n {\n label: 'Width',\n type: 'number',\n value: 600,\n unit: 'px',\n prop: 'width',\n classReference: 'container',\n },\n {\n label: 'Height',\n type: 'number',\n unit: 'px',\n prop: 'height',\n classReference: 'container',\n },\n {\n label: 'Text',\n type: 'color',\n value: '#000000',\n prop: 'color',\n classReference: 'container',\n },\n {\n label: 'Background',\n type: 'color',\n value: '#ffffff',\n prop: 'backgroundColor',\n classReference: 'container',\n },\n {\n label: 'Padding Top',\n type: 'number',\n value: 0,\n unit: 'px',\n prop: 'paddingTop',\n classReference: 'container',\n },\n {\n label: 'Padding Right',\n type: 'number',\n value: 0,\n unit: 'px',\n prop: 'paddingRight',\n classReference: 'container',\n },\n {\n label: 'Padding Bottom',\n type: 'number',\n value: 0,\n unit: 'px',\n prop: 'paddingBottom',\n classReference: 'container',\n },\n {\n label: 'Padding Left',\n type: 'number',\n value: 0,\n unit: 'px',\n prop: 'paddingLeft',\n classReference: 'container',\n },\n {\n label: 'Corner radius',\n type: 'number',\n value: 0,\n unit: 'px',\n prop: 'borderRadius',\n classReference: 'container',\n },\n {\n label: 'Border color',\n type: 'color',\n value: '#000000',\n prop: 'borderColor',\n classReference: 'container',\n },\n ],\n },\n {\n id: 'typography',\n title: 'Text',\n classReference: 'body',\n inputs: [],\n },\n {\n id: 'h1',\n title: 'Title',\n category: 'Text',\n classReference: 'h1',\n inputs: [],\n },\n {\n id: 'h2',\n title: 'Subtitle',\n category: 'Text',\n classReference: 'h2',\n inputs: [],\n },\n {\n id: 'h3',\n title: 'Heading',\n category: 'Text',\n classReference: 'h3',\n inputs: [],\n },\n {\n id: 'paragraph',\n title: 'Paragraph',\n category: 'Text',\n classReference: 'paragraph',\n inputs: [],\n },\n {\n id: 'list',\n title: 'List',\n category: 'Text',\n classReference: 'list',\n inputs: [],\n },\n {\n id: 'nested-list',\n title: 'Nested List',\n category: 'Text',\n classReference: 'nestedList',\n inputs: [],\n },\n {\n id: 'list-item',\n title: 'List Item',\n category: 'Text',\n classReference: 'listItem',\n inputs: [],\n },\n {\n id: 'link',\n title: 'Link',\n classReference: 'link',\n inputs: [],\n },\n {\n id: 'image',\n title: 'Image',\n classReference: 'image',\n inputs: [],\n },\n {\n id: 'button',\n title: 'Button',\n classReference: 'button',\n inputs: [],\n },\n {\n id: 'code-block',\n title: 'Code Block',\n classReference: 'codeBlock',\n inputs: [],\n },\n {\n id: 'inline-code',\n title: 'Inline Code',\n classReference: 'inlineCode',\n inputs: [],\n },\n];\n\nconst RESET_BASIC: ResetTheme = {\n reset: {\n margin: '0',\n padding: '0',\n },\n body: {\n fontFamily:\n \"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif\",\n fontSize: '14px',\n minHeight: '100%',\n lineHeight: '155%',\n },\n container: {},\n h1: {\n fontSize: '2.25em',\n lineHeight: '1.44em',\n paddingTop: '0.389em',\n fontWeight: 600,\n },\n h2: {\n fontSize: '1.8em',\n lineHeight: '1.44em',\n paddingTop: '0.389em',\n fontWeight: 600,\n },\n h3: {\n fontSize: '1.4em',\n lineHeight: '1.08em',\n paddingTop: '0.389em',\n fontWeight: 600,\n },\n paragraph: {\n fontSize: '1em',\n paddingTop: '0.5em',\n paddingBottom: '0.5em',\n },\n list: {\n paddingLeft: '1.1em',\n paddingBottom: '1em',\n },\n bulletList: {\n listStyleType: 'disc',\n },\n orderedList: {\n listStyleType: 'decimal',\n },\n nestedList: {\n paddingLeft: '1.1em',\n paddingBottom: '0',\n },\n listItem: {\n marginLeft: '1em',\n paddingBottom: '0.3em',\n paddingTop: '0.3em',\n },\n listParagraph: { padding: '0', margin: '0' },\n blockquote: {\n borderLeft: '3px solid #acb3be',\n color: '#7e8a9a',\n marginLeft: 0,\n paddingLeft: '0.8em',\n fontSize: '1.1em',\n fontFamily:\n \"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif\",\n },\n link: { color: '#0670DB', textDecoration: 'underline' },\n footer: {\n fontSize: '0.8em',\n },\n hr: {\n paddingBottom: '1em',\n borderStyle: 'solid',\n borderWidth: 0,\n borderTopWidth: '2px',\n },\n image: {\n maxWidth: '100%',\n },\n button: {\n lineHeight: '100%',\n display: 'inline-block',\n paddingTop: '0.625em',\n paddingRight: '1.25em',\n paddingBottom: '0.625em',\n paddingLeft: '1.25em',\n backgroundColor: '#000000',\n color: '#ffffff',\n borderRadius: '0.375em',\n fontWeight: 500,\n fontSize: '0.875em',\n textDecoration: 'none',\n textAlign: 'center',\n },\n inlineCode: {\n paddingTop: '0.25em',\n paddingBottom: '0.25em',\n paddingLeft: '0.4em',\n paddingRight: '0.4em',\n background: '#e5e7eb',\n color: '#1e293b',\n borderRadius: '4px',\n },\n codeBlock: {\n background: '#f1f5f9',\n borderRadius: '4px',\n paddingTop: '0.75rem',\n paddingRight: '1rem',\n paddingBottom: '0.75rem',\n paddingLeft: '1rem',\n overflowX: 'auto',\n fontFamily: 'monospace',\n fontWeight: '500',\n fontSize: '.92em',\n },\n codeTag: {\n lineHeight: '130%',\n fontFamily: 'monospace',\n fontSize: '.92em',\n },\n section: {\n padding: '10px 20px 10px 20px',\n boxSizing: 'border-box' as const,\n },\n};\n\nconst RESET_MINIMAL: ResetTheme = {\n ...Object.keys(RESET_BASIC).reduce<ResetTheme>((acc, key) => {\n acc[key as keyof ResetTheme] = {};\n return acc;\n }, {} as ResetTheme),\n reset: RESET_BASIC.reset,\n button: {\n lineHeight: RESET_BASIC.button.lineHeight,\n display: RESET_BASIC.button.display,\n },\n image: RESET_BASIC.image,\n list: RESET_BASIC.list,\n bulletList: RESET_BASIC.bulletList,\n orderedList: RESET_BASIC.orderedList,\n nestedList: RESET_BASIC.nestedList,\n listItem: RESET_BASIC.listItem,\n listParagraph: RESET_BASIC.listParagraph,\n link: RESET_BASIC.link,\n};\n\nexport const RESET_THEMES: Record<EditorTheme, ResetTheme> = {\n basic: RESET_BASIC,\n minimal: RESET_MINIMAL,\n};\n\nexport function resolveResetValue(\n value: string | number | undefined,\n targetUnit: 'px' | '%',\n bodyFontSizePx: number,\n): number | undefined {\n if (value === undefined) {\n return undefined;\n }\n const str = String(value);\n const num = Number.parseFloat(str);\n if (Number.isNaN(num)) {\n return undefined;\n }\n if (str.endsWith('em')) {\n return targetUnit === 'px' ? Math.floor(num * bodyFontSizePx) : num * 100;\n }\n return num;\n}\n\nexport const EDITOR_THEMES: Record<EditorTheme, PanelGroup[]> = {\n minimal: THEME_MINIMAL,\n basic: THEME_BASIC,\n};\n\nexport function getThemeBodyFontSizePx(theme: EditorTheme): number {\n for (const group of EDITOR_THEMES[theme]) {\n if (group.classReference !== 'body') {\n continue;\n }\n for (const input of group.inputs) {\n if (input.prop === 'fontSize' && typeof input.value === 'number') {\n return input.value;\n }\n }\n }\n return 14;\n}\n\n/**\n * Use to make the preview nicer once the theme might miss some\n * important properties to make layout accurate\n */\nexport const DEFAULT_INBOX_FONT_SIZE_PX = 14;\nexport const INBOX_EMAIL_DEFAULTS: Partial<ResetTheme> = {\n body: {\n color: '#000000',\n fontFamily:\n \"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif\",\n fontSize: `${DEFAULT_INBOX_FONT_SIZE_PX}px`,\n },\n container: {\n width: 600,\n },\n};\n\nexport const SUPPORTED_CSS_PROPERTIES: SupportedCssProperties = {\n align: {\n label: 'Align',\n type: 'select',\n options: {\n left: 'Left',\n center: 'Center',\n right: 'Right',\n },\n defaultValue: 'left',\n category: 'layout',\n },\n backgroundColor: {\n label: 'Background',\n type: 'color',\n excludeNodes: ['image', 'youtube'],\n defaultValue: '#ffffff',\n category: 'appearance',\n },\n color: {\n label: 'Text color',\n type: 'color',\n excludeNodes: ['image', 'youtube'],\n defaultValue: '#000000',\n category: 'typography',\n },\n fontSize: {\n label: 'Font size',\n type: 'number',\n unit: 'px',\n excludeNodes: ['image', 'youtube'],\n defaultValue: 14,\n category: 'typography',\n },\n fontWeight: {\n label: 'Font weight',\n type: 'select',\n options: {\n 300: 'Light',\n 400: 'Normal',\n 600: 'Semi Bold',\n 700: 'Bold',\n 800: 'Extra Bold',\n },\n excludeNodes: ['image', 'youtube'],\n defaultValue: 400,\n category: 'typography',\n },\n letterSpacing: {\n label: 'Letter spacing',\n type: 'number',\n unit: 'px',\n excludeNodes: ['image', 'youtube'],\n defaultValue: 0,\n category: 'typography',\n },\n lineHeight: {\n label: 'Line height',\n type: 'number',\n unit: '%',\n defaultValue: 155,\n category: 'typography',\n },\n textDecoration: {\n label: 'Text decoration',\n type: 'select',\n options: {\n none: 'None',\n underline: 'Underline',\n 'line-through': 'Line-through',\n },\n defaultValue: 'none',\n category: 'typography',\n },\n borderRadius: {\n label: 'Border Radius',\n type: 'number',\n unit: 'px',\n defaultValue: 8,\n category: 'appearance',\n },\n borderTopLeftRadius: {\n label: 'Border Radius (Top-Left)',\n type: 'number',\n unit: 'px',\n defaultValue: 8,\n category: 'appearance',\n },\n borderTopRightRadius: {\n label: 'Border Radius (Top-Right)',\n type: 'number',\n unit: 'px',\n defaultValue: 8,\n category: 'appearance',\n },\n borderBottomLeftRadius: {\n label: 'Border Radius (Bottom-Left)',\n type: 'number',\n unit: 'px',\n defaultValue: 8,\n category: 'appearance',\n },\n borderBottomRightRadius: {\n label: 'Border Radius (Bottom-Right)',\n type: 'number',\n unit: 'px',\n defaultValue: 8,\n category: 'appearance',\n },\n borderWidth: {\n label: 'Border Width',\n type: 'number',\n unit: 'px',\n defaultValue: 1,\n category: 'appearance',\n },\n borderTopWidth: {\n label: 'Border Top Width',\n type: 'number',\n unit: 'px',\n defaultValue: 1,\n category: 'appearance',\n },\n borderRightWidth: {\n label: 'Border Right Width',\n type: 'number',\n unit: 'px',\n defaultValue: 1,\n category: 'appearance',\n },\n borderBottomWidth: {\n label: 'Border Bottom Width',\n type: 'number',\n unit: 'px',\n defaultValue: 1,\n category: 'appearance',\n },\n borderLeftWidth: {\n label: 'Border Left Width',\n type: 'number',\n unit: 'px',\n defaultValue: 1,\n category: 'appearance',\n },\n borderStyle: {\n label: 'Border Style',\n type: 'select',\n options: {\n solid: 'Solid',\n dashed: 'Dashed',\n dotted: 'Dotted',\n },\n defaultValue: 'solid',\n category: 'appearance',\n },\n borderTopStyle: {\n label: 'Border Top Style',\n type: 'select',\n options: {\n solid: 'Solid',\n dashed: 'Dashed',\n dotted: 'Dotted',\n },\n defaultValue: 'solid',\n category: 'appearance',\n },\n borderRightStyle: {\n label: 'Border Right Style',\n type: 'select',\n options: {\n solid: 'Solid',\n dashed: 'Dashed',\n dotted: 'Dotted',\n },\n defaultValue: 'solid',\n category: 'appearance',\n },\n borderBottomStyle: {\n label: 'Border Bottom Style',\n type: 'select',\n options: {\n solid: 'Solid',\n dashed: 'Dashed',\n dotted: 'Dotted',\n },\n defaultValue: 'solid',\n category: 'appearance',\n },\n borderLeftStyle: {\n label: 'Border Left Style',\n type: 'select',\n options: {\n solid: 'Solid',\n dashed: 'Dashed',\n dotted: 'Dotted',\n },\n defaultValue: 'solid',\n category: 'appearance',\n },\n borderColor: {\n label: 'Border Color',\n type: 'color',\n defaultValue: '#000000',\n category: 'appearance',\n },\n borderTopColor: {\n label: 'Border Top Color',\n type: 'color',\n defaultValue: '#000000',\n category: 'appearance',\n },\n borderRightColor: {\n label: 'Border Right Color',\n type: 'color',\n defaultValue: '#000000',\n category: 'appearance',\n },\n borderBottomColor: {\n label: 'Border Bottom Color',\n type: 'color',\n defaultValue: '#000000',\n category: 'appearance',\n },\n borderLeftColor: {\n label: 'Border Left Color',\n type: 'color',\n defaultValue: '#000000',\n category: 'appearance',\n },\n margin: {\n label: 'Margin',\n type: 'number',\n unit: 'px',\n defaultValue: 0,\n category: 'layout',\n },\n padding: {\n label: 'Padding',\n type: 'number',\n unit: 'px',\n defaultValue: 8,\n category: 'layout',\n },\n paddingTop: {\n label: 'Padding Top',\n type: 'number',\n unit: 'px',\n defaultValue: 8,\n category: 'layout',\n },\n paddingLeft: {\n label: 'Padding Left',\n type: 'number',\n unit: 'px',\n defaultValue: 8,\n category: 'layout',\n },\n paddingBottom: {\n label: 'Padding Bottom',\n type: 'number',\n unit: 'px',\n defaultValue: 8,\n category: 'layout',\n },\n paddingRight: {\n label: 'Padding Right',\n type: 'number',\n unit: 'px',\n defaultValue: 8,\n category: 'layout',\n },\n width: {\n label: 'Width',\n type: 'number',\n unit: 'px',\n defaultValue: 600,\n category: 'layout',\n },\n height: {\n label: 'Height',\n type: 'number',\n unit: 'px',\n defaultValue: 400,\n category: 'layout',\n },\n};\n","import { EDITOR_THEMES } from './themes';\nimport type {\n EditorTheme,\n KnownThemeComponents,\n PanelGroup,\n PanelSectionId,\n} from './types';\n\nconst PANEL_SECTION_IDS = new Set<PanelSectionId>([\n 'body',\n 'container',\n 'typography',\n 'paragraph',\n 'list',\n 'nested-list',\n 'list-item',\n 'link',\n 'image',\n 'button',\n 'code-block',\n 'inline-code',\n]);\n\nconst PANEL_SECTION_IDS_BY_TITLE: Record<string, PanelSectionId> = {\n background: 'body',\n body: 'body',\n content: 'container',\n container: 'container',\n typography: 'typography',\n paragraph: 'paragraph',\n list: 'list',\n 'nested list': 'nested-list',\n 'list item': 'list-item',\n link: 'link',\n image: 'image',\n button: 'button',\n 'code block': 'code-block',\n 'inline code': 'inline-code',\n};\n\nconst PANEL_SECTION_IDS_BY_CLASS_REFERENCE: Partial<\n Record<KnownThemeComponents, PanelSectionId>\n> = {\n container: 'container',\n paragraph: 'paragraph',\n list: 'list',\n nestedList: 'nested-list',\n listItem: 'list-item',\n link: 'link',\n image: 'image',\n button: 'button',\n codeBlock: 'code-block',\n inlineCode: 'inline-code',\n};\n\nfunction isPanelSectionId(value: unknown): value is PanelSectionId {\n return (\n typeof value === 'string' && PANEL_SECTION_IDS.has(value as PanelSectionId)\n );\n}\n\nfunction normalizeTitle(title: string | undefined): string {\n return title?.trim().toLowerCase().replace(/\\s+/g, ' ') ?? '';\n}\n\nfunction resolvePanelSectionId(group: PanelGroup): PanelSectionId | null {\n if (isPanelSectionId(group.id)) {\n return group.id;\n }\n\n const normalizedTitle = normalizeTitle(group.title);\n\n if (group.classReference === 'body') {\n if (normalizedTitle === 'typography') {\n return 'typography';\n }\n\n return 'body';\n }\n\n if (\n group.classReference &&\n PANEL_SECTION_IDS_BY_CLASS_REFERENCE[group.classReference]\n ) {\n return PANEL_SECTION_IDS_BY_CLASS_REFERENCE[group.classReference] ?? null;\n }\n\n return PANEL_SECTION_IDS_BY_TITLE[normalizedTitle] ?? null;\n}\n\nfunction normalizePanelInputs(\n inputs: PanelGroup['inputs'],\n defaultInputs: PanelGroup['inputs'],\n fallbackClassReference?: KnownThemeComponents,\n): PanelGroup['inputs'] {\n if (!Array.isArray(inputs)) {\n return [];\n }\n\n return inputs.map((input) => {\n const defaultInput = defaultInputs.find(\n (candidate) => candidate.prop === input.prop,\n );\n\n return {\n ...defaultInput,\n ...input,\n classReference:\n input.classReference ??\n defaultInput?.classReference ??\n fallbackClassReference,\n };\n });\n}\n\nexport function inferThemeFromPanelStyles(\n panelStyles: PanelGroup[] | null | undefined,\n): EditorTheme | null {\n if (!Array.isArray(panelStyles) || panelStyles.length === 0) {\n return null;\n }\n\n let finalTheme: EditorTheme | null = null;\n for (const group of panelStyles) {\n if (!Array.isArray(group?.inputs)) {\n finalTheme = null;\n break;\n }\n\n if (group.inputs.length !== 0) {\n finalTheme = 'basic';\n break;\n }\n\n finalTheme = 'minimal';\n }\n\n return finalTheme;\n}\n\nexport function normalizeThemePanelStyles(\n theme: EditorTheme,\n panelStyles: PanelGroup[] | null | undefined,\n): PanelGroup[] | null {\n if (!Array.isArray(panelStyles)) {\n return null;\n }\n\n return panelStyles.map((group) => {\n const panelId = resolvePanelSectionId(group);\n\n if (!panelId) {\n return group;\n }\n\n const defaultGroup = EDITOR_THEMES[theme].find(\n (candidate) => candidate.id === panelId,\n );\n\n if (!defaultGroup) {\n return group;\n }\n\n return {\n ...group,\n id: panelId,\n title: defaultGroup.title,\n classReference: defaultGroup.classReference,\n inputs: normalizePanelInputs(\n group.inputs,\n defaultGroup.inputs,\n defaultGroup.classReference,\n ),\n };\n });\n}\n","import { SUPPORTED_CSS_PROPERTIES } from './themes';\nimport type {\n EditorTheme,\n EditorThemeInput,\n KnownCssProperties,\n PanelGroup,\n PanelSectionId,\n ThemeableComponent,\n ThemeComponentStyles,\n ThemeConfig,\n} from './types';\n\nconst CLASS_REFERENCE_TO_PANEL_ID: Record<ThemeableComponent, PanelSectionId> =\n {\n body: 'body',\n container: 'container',\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n paragraph: 'paragraph',\n link: 'link',\n image: 'image',\n button: 'button',\n list: 'list',\n nestedList: 'nested-list',\n listItem: 'list-item',\n codeBlock: 'code-block',\n inlineCode: 'inline-code',\n };\n\nexport function parseCssValue(value: string | number): {\n value: string | number;\n unit?: 'px' | '%';\n} {\n if (typeof value === 'number') {\n return { value };\n }\n const pxMatch = /^(-?\\d+(?:\\.\\d+)?)px$/.exec(value);\n if (pxMatch) {\n return { value: Number.parseFloat(pxMatch[1]), unit: 'px' };\n }\n const percentMatch = /^(-?\\d+(?:\\.\\d+)?)%$/.exec(value);\n if (percentMatch) {\n return { value: Number.parseFloat(percentMatch[1]), unit: '%' };\n }\n return { value };\n}\n\nexport function isThemeConfig(\n theme: EditorThemeInput | undefined,\n): theme is ThemeConfig {\n return typeof theme === 'object' && theme !== null && 'styles' in theme;\n}\n\nexport function themeStylesToPanelOverrides(\n styles: ThemeComponentStyles,\n basePanels: PanelGroup[],\n): PanelGroup[] {\n const result: PanelGroup[] = basePanels.map((group) => ({\n ...group,\n inputs: group.inputs.map((input) => ({ ...input })),\n }));\n\n for (const [component, cssProps] of Object.entries(styles) as [\n ThemeableComponent,\n React.CSSProperties,\n ][]) {\n if (!cssProps) continue;\n const panelId = CLASS_REFERENCE_TO_PANEL_ID[component];\n\n const group = result.find((g) => g.id === panelId);\n if (!group) continue;\n\n for (const [cssProp, cssValue] of Object.entries(cssProps) as [\n KnownCssProperties,\n string | number,\n ][]) {\n if (cssValue === undefined) continue;\n\n const existingInput = group.inputs.find(\n (i) => i.prop === cssProp && i.classReference === component,\n );\n\n const parsed = parseCssValue(cssValue);\n\n if (existingInput) {\n existingInput.value = parsed.value;\n if (parsed.unit !== undefined) {\n existingInput.unit = parsed.unit;\n }\n } else {\n const propMeta = SUPPORTED_CSS_PROPERTIES[cssProp];\n group.inputs.push({\n label: propMeta?.label ?? cssProp,\n type: propMeta?.type ?? 'text',\n prop: cssProp,\n classReference: component,\n value: parsed.value,\n unit: parsed.unit ?? propMeta?.unit,\n options: propMeta?.options,\n });\n }\n }\n }\n\n return result;\n}\n\nexport function createTheme(styles: ThemeComponentStyles): ThemeConfig {\n return { styles };\n}\n\nexport function extendTheme(\n base: EditorTheme,\n overrides: ThemeComponentStyles,\n): ThemeConfig {\n return { extends: base, styles: overrides };\n}\n","import type { Editor, JSONContent } from '@tiptap/core';\nimport { Extension } from '@tiptap/core';\nimport { Plugin, PluginKey } from '@tiptap/pm/state';\nimport { useEditorState } from '@tiptap/react';\nimport type * as React from 'react';\nimport { Body, Head, Html, Preview } from 'react-email';\nimport type { SerializerPlugin } from '../../core/serializer/serializer-plugin';\nimport { getGlobalContent } from '../../extensions/global-content';\nimport { DARK_MODE_CSS } from '../../utils/dark-mode';\nimport {\n injectGlobalPlainCss,\n injectThemeCss,\n mergeCssJs,\n transformToCssJs,\n} from './css-transforms';\nimport {\n inferThemeFromPanelStyles,\n normalizeThemePanelStyles,\n} from './normalization';\nimport { isThemeConfig, themeStylesToPanelOverrides } from './theme-config';\nimport {\n DEFAULT_INBOX_FONT_SIZE_PX,\n EDITOR_THEMES,\n RESET_THEMES,\n} from './themes';\nimport type {\n CssJs,\n EditorTheme,\n EditorThemeInput,\n KnownThemeComponents,\n PanelGroup,\n} from './types';\n\n/**\n * Maps a document node (type + attrs) to the theme component key used for style lookup.\n * Centralizes all node-type → theme-component knowledge.\n */\nexport function getThemeComponentKey(\n nodeType: string,\n depth: number,\n attrs: Record<string, unknown> = {},\n): KnownThemeComponents | null {\n switch (nodeType) {\n case 'paragraph':\n if (depth > 0) {\n return 'listParagraph';\n }\n return 'paragraph';\n case 'heading': {\n const level = attrs.level as number | undefined;\n return `h${level ?? 1}` as KnownThemeComponents;\n }\n case 'blockquote':\n return 'blockquote';\n case 'button':\n return 'button';\n case 'container':\n return 'container';\n case 'section':\n return 'section';\n case 'footer':\n return 'footer';\n case 'image':\n return 'image';\n case 'youtube':\n case 'twitter':\n return 'image';\n case 'orderedList':\n case 'bulletList':\n if (depth > 0) {\n return 'nestedList';\n }\n return 'list';\n case 'listItem':\n return 'listItem';\n case 'codeBlock':\n return 'codeBlock';\n case 'code':\n return 'inlineCode';\n case 'link':\n return 'link';\n case 'horizontalRule':\n return 'hr';\n default:\n return null;\n }\n}\n\n/**\n * Returns merged theme styles (reset + panel styles) for the given editor.\n * Use when you have editor access and need the full CssJs map.\n */\nexport function getMergedCssJs(\n theme: EditorTheme,\n panelStyles: PanelGroup[] | undefined,\n): CssJs {\n const panels: PanelGroup[] =\n normalizeThemePanelStyles(theme, panelStyles) ?? EDITOR_THEMES[theme];\n const parsed = transformToCssJs(panels, DEFAULT_INBOX_FONT_SIZE_PX);\n const merged = mergeCssJs(RESET_THEMES[theme], parsed);\n\n return merged;\n}\n\n/**\n * Node types and theme component keys that should receive the universal\n * `reset` CSS (e.g. `margin: 0; padding: 0`) layered underneath their own\n * theme styles. Shared between `getResolvedNodeStyles` (email serializer)\n * and `injectThemeCss` (editor preview) so both surfaces stay in sync.\n *\n * Includes both raw tiptap node names (e.g. `tableCell`) and theme\n * component keys (e.g. `list`) because the serializer matches against both.\n *\n * `bulletList` and `orderedList` are intentionally omitted: their elements\n * already carry the shared `node-list` class, so the `list` reset rule\n * covers them without forcing the dedicated `.node-bulletList` /\n * `.node-orderedList` rules to redundantly emit `margin: 0; padding: 0`.\n */\nexport const RESET_NODE_TYPES = new Set<string>([\n 'body',\n 'button',\n 'columns',\n 'div',\n 'h1',\n 'h2',\n 'h3',\n 'list',\n 'listItem',\n 'listParagraph',\n 'nestedList',\n 'table',\n 'paragraph',\n 'tableCell',\n 'tableHeader',\n 'tableRow',\n 'youtube',\n]);\n\n/**\n * Returns resolved React.CSSProperties for a node when you already have merged CssJs\n * (e.g. in the serializer where there is no editor). Centralizes which theme keys\n * apply to which node type.\n */\nexport function getResolvedNodeStyles(\n node: JSONContent,\n depth: number,\n mergedCssJs: CssJs,\n): React.CSSProperties {\n const key = getThemeComponentKey(node.type ?? '', depth, node.attrs ?? {});\n if (!key) {\n if (RESET_NODE_TYPES.has(node.type ?? '')) {\n return mergedCssJs.reset ?? {};\n }\n return {};\n }\n const component = mergedCssJs[key] ?? {};\n const shouldReset =\n RESET_NODE_TYPES.has(key) || RESET_NODE_TYPES.has(node.type ?? '');\n if (shouldReset) {\n const reset = mergedCssJs.reset ?? {};\n return { ...reset, ...component };\n }\n return { ...component };\n}\n\nexport function stylesToCss(\n styles: PanelGroup[],\n theme: EditorTheme,\n): Record<KnownThemeComponents, React.CSSProperties> {\n const parsed = transformToCssJs(\n normalizeThemePanelStyles(theme, styles) ?? EDITOR_THEMES[theme],\n DEFAULT_INBOX_FONT_SIZE_PX,\n );\n return mergeCssJs(RESET_THEMES[theme], parsed);\n}\n\nfunction resolveThemeConfig(config: EditorThemeInput): {\n baseTheme: EditorTheme;\n panels: PanelGroup[] | undefined;\n} {\n if (!isThemeConfig(config)) {\n return { baseTheme: config, panels: undefined };\n }\n const baseTheme: EditorTheme = config.extends ?? 'minimal';\n const basePanels = EDITOR_THEMES[baseTheme];\n const panels = themeStylesToPanelOverrides(config.styles, basePanels);\n return { baseTheme, panels };\n}\n\nexport function getEmailTheming(editor: Editor) {\n const theme = getEmailTheme(editor);\n const normalizedStyles =\n normalizeThemePanelStyles(theme, getEmailStyles(editor)) ??\n EDITOR_THEMES[theme];\n\n return {\n styles: normalizedStyles,\n theme,\n css: getEmailCss(editor),\n };\n}\n\nexport function useEmailTheming(editor: Editor | null) {\n return useEditorState({\n editor,\n selector({ editor: ed }) {\n if (!ed) {\n return null;\n }\n return getEmailTheming(ed);\n },\n });\n}\n\nfunction getEmailStyles(editor: Editor) {\n return getGlobalContent('styles', editor) as PanelGroup[] | null;\n}\n\n/**\n * Sets the global panel styles on the editor document.\n * Persists into the `GlobalContent` node under the `'styles'` key.\n */\nexport function setGlobalStyles(editor: Editor, styles: PanelGroup[]): boolean {\n return editor.commands.setGlobalContent('styles', styles);\n}\n\n/**\n * Sets the current email theme on the editor document.\n * Persists into the `GlobalContent` node under the `'theme'` key.\n */\nexport function setCurrentTheme(editor: Editor, theme: EditorTheme): boolean {\n return editor.commands.setGlobalContent('theme', theme);\n}\n\n/**\n * Sets the global CSS string injected into the email `<head>`.\n * Persists into the `GlobalContent` node under the `'css'` key.\n */\nexport function setGlobalCssInjected(editor: Editor, css: string): boolean {\n return editor.commands.setGlobalContent('css', css);\n}\n\nfunction getEmailTheme(editor: Editor): EditorTheme {\n const extensionOptions = (\n editor.extensionManager.extensions.find(\n (extension) => extension.name === 'theming',\n ) as { options?: { theme?: EditorThemeInput } }\n )?.options?.theme;\n\n if (isThemeConfig(extensionOptions)) {\n return extensionOptions.extends ?? 'minimal';\n }\n\n if (extensionOptions === 'basic' || extensionOptions === 'minimal') {\n return extensionOptions;\n }\n\n const globalTheme = getGlobalContent('theme', editor) as EditorTheme | null;\n if (globalTheme === 'basic' || globalTheme === 'minimal') {\n return globalTheme;\n }\n\n const inferredTheme = inferThemeFromPanelStyles(getEmailStyles(editor));\n if (inferredTheme) {\n return inferredTheme;\n }\n\n return 'basic';\n}\n\nfunction getEmailCss(editor: Editor) {\n return getGlobalContent('css', editor) as string | null;\n}\n\nexport const EmailTheming = Extension.create<{\n theme?: EditorThemeInput;\n serializerPlugin: SerializerPlugin;\n}>({\n name: 'theming',\n\n addOptions() {\n return {\n theme: undefined as EditorThemeInput | undefined,\n serializerPlugin: {\n getNodeStyles(node, depth, editor): React.CSSProperties {\n const theming = getEmailTheming(editor);\n\n return getResolvedNodeStyles(\n node,\n depth,\n getMergedCssJs(theming.theme, theming.styles),\n );\n },\n BaseTemplate({ previewText, children, editor, previewMode = false }) {\n const { css: globalCss, styles, theme } = getEmailTheming(editor);\n const mergedStyles = getMergedCssJs(theme, styles);\n\n return (\n <Html>\n <Head>\n <meta content=\"width=device-width\" name=\"viewport\" />\n <meta content=\"IE=edge\" httpEquiv=\"X-UA-Compatible\" />\n <meta name=\"x-apple-disable-message-reformatting\" />\n <meta\n content=\"telephone=no,address=no,email=no,date=no,url=no\"\n name=\"format-detection\"\n />\n\n {!previewMode && <style>{DARK_MODE_CSS}</style>}\n {globalCss && <style>{globalCss}</style>}\n </Head>\n {previewText && previewText !== '' && (\n <Preview>{previewText}</Preview>\n )}\n\n <Body style={mergedStyles.body}>{children}</Body>\n </Html>\n );\n },\n } satisfies SerializerPlugin,\n };\n },\n\n addProseMirrorPlugins() {\n const { editor } = this;\n const scopeId = `tiptap-theme-${Math.random().toString(36).slice(2, 10)}`;\n const scopeAttribute = 'data-editor-theme-scope';\n const scopeSelector = `.tiptap.ProseMirror[${scopeAttribute}=\"${scopeId}\"]`;\n const themeStyleId = `${scopeId}-theme`;\n const globalStyleId = `${scopeId}-global`;\n\n return [\n new Plugin({\n key: new PluginKey('themingStyleInjector'),\n view(view) {\n let prevStyles: PanelGroup[] | null = null;\n let prevTheme: EditorTheme | null = null;\n let prevCss: string | null = null;\n let seededFromConfig = false;\n\n view.dom.setAttribute(scopeAttribute, scopeId);\n\n const sync = () => {\n if (!seededFromConfig) {\n seededFromConfig = true;\n const extensionTheme = (\n editor.extensionManager.extensions.find(\n (ext) => ext.name === 'theming',\n ) as { options?: { theme?: EditorThemeInput } }\n )?.options?.theme;\n\n if (isThemeConfig(extensionTheme)) {\n const { baseTheme, panels } =\n resolveThemeConfig(extensionTheme);\n if (panels && !getGlobalContent('styles', editor)) {\n editor.commands.setGlobalContent('styles', panels);\n }\n if (!getGlobalContent('theme', editor)) {\n editor.commands.setGlobalContent('theme', baseTheme);\n }\n }\n }\n\n const theme = getEmailTheme(editor);\n const styles = getEmailStyles(editor);\n const resolvedStyles = styles ?? EDITOR_THEMES[theme];\n const css = getEmailCss(editor);\n\n if (styles !== prevStyles || theme !== prevTheme) {\n prevStyles = styles as PanelGroup[] | null;\n prevTheme = theme;\n const mergedCssJs = getMergedCssJs(theme, resolvedStyles);\n injectThemeCss(mergedCssJs, {\n scopeSelector,\n styleId: themeStyleId,\n });\n }\n\n if (css !== prevCss) {\n prevCss = css;\n injectGlobalPlainCss(css, {\n scopeSelector,\n styleId: globalStyleId,\n });\n }\n };\n\n sync();\n\n return {\n update: sync,\n destroy() {\n document.getElementById(themeStyleId)?.remove();\n document.getElementById(globalStyleId)?.remove();\n view.dom.removeAttribute(scopeAttribute);\n },\n };\n },\n }),\n ];\n },\n});\n"],"mappings":";;;;;;;AAEA,MAAM,2BAA2B;AAiBjC,IAAI,uBAAsC;AAE1C,SAAS,2BAA2B,KAA6B;CAC/D,MAAM,YAAsB,EAAE;AAE9B,KAAI,aAAa,MAAM,aAAa;AAClC,MAAI,KAAK,KAAK,SAAS,yBACrB,WAAU,KAAK,SAAS;GAE1B;AAEF,QAAO;;AAGT,SAAS,+BAA+B,KAA6B;AACnE,KAAI,wBAAwB,KAC1B,KAAI;AACF,MACE,IAAI,OAAO,qBAAqB,EAAE,KAAK,SAAS,yBAEhD,QAAO;SAEH;AACN,yBAAuB;;AAK3B,wBADkB,2BAA2B,IAAI,CAChB,MAAM;AACvC,QAAO;;AAGT,SAAgB,iBAAiB,KAAa,QAAgC;CAC5E,MAAM,WAAW,+BAA+B,OAAO,MAAM,IAAI;AACjE,KAAI,wBAAwB,KAC1B,QAAO;AAET,QAAO,OAAO,MAAM,IAAI,OAAO,SAAS,EAAE,MAAM,KAAK,QAAQ;;AAG/D,MAAa,gBAAgB,KAAK,OAA6B;CAC7D,MAAM;CAEN,aAAa;AACX,SAAO;GACL,KAAK;GACL,MAAM,EAAE;GACT;;CAGH,OAAO;CAEP,YAAY;CAC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IACN,OAAO;IACP,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,gBAAgB;IACjB;GACF;EACF;CACD;EACE,IAAI;EACJ,OAAO;EACP,gBAAgB;EAChB,QAAQ,CACN;GACE,OAAO;GACP,MAAM;GACN,OAAO;GACP,MAAM;GACN,MAAM;GACN,gBAAgB;GACjB,EACD;GACE,OAAO;GACP,MAAM;GACN,OAAO;GACP,MAAM;GACN,MAAM;GACN,gBAAgB;GACjB,CACF;EACF;CACD;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,gBAAgB;EAChB,QAAQ,EAAE;EACX;CACD;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,gBAAgB;EAChB,QAAQ,EAAE;EACX;CACD;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,gBAAgB;EAChB,QAAQ,EAAE;EACX;CACD;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,gBAAgB;EAChB,QAAQ,EAAE;EACX;CACD;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,gBAAgB;EAChB,QAAQ,EAAE;EACX;CACD;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,gBAAgB;EAChB,QAAQ,EAAE;EACX;CACD;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,gBAAgB;EAChB,QAAQ,EAAE;EACX;CACD;EACE,IAAI;EACJ,OAAO;EACP,gBAAgB;EAChB,QAAQ,CACN;GACE,OAAO;GACP,MAAM;GACN,OAAO;GACP,MAAM;GACN,gBAAgB;GACjB,EACD;GACE,OAAO;GACP,MAAM;GACN,OAAO;GACP,MAAM;GACN,SAAS;IACP,WAAW;IACX,MAAM;IACP;GACD,gBAAgB;GACjB,CACF;EACF;CACD;EACE,IAAI;EACJ,OAAO;EACP,gBAAgB;EAChB,QAAQ,CACN;GACE,OAAO;GACP,MAAM;GACN,OAAO;GACP,MAAM;GACN,MAAM;GACN,gBAAgB;GACjB,CACF;EACF;CACD;EACE,IAAI;EACJ,OAAO;EACP,gBAAgB;EAChB,QAAQ;GACN;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACF;EACF;CACD;EACE,IAAI;EACJ,OAAO;EACP,gBAAgB;EAChB,QAAQ;GACN;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACF;EACF;CACD;EACE,IAAI;EACJ,OAAO;EACP,gBAAgB;EAChB,QAAQ;GACN;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACF;EACF;CACF;AAED,MAAM,gBAA8B;CAClC;EACE,IAAI;EACJ,OAAO;EACP,gBAAgB;EAChB,QAAQ;GACN;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACF;EACF;CACD;EACE,IAAI;EACJ,OAAO;EACP,gBAAgB;EAChB,QAAQ;GACN;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,SAAS;KACP,MAAM;KACN,QAAQ;KACR,OAAO;KACR;IACD,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,gBAAgB;IACjB;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,gBAAgB;IACjB;GACF;EACF;CACD;EACE,IAAI;EACJ,OAAO;EACP,gBAAgB;EAChB,QAAQ,EAAE;EACX;CACD;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,gBAAgB;EAChB,QAAQ,EAAE;EACX;CACD;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,gBAAgB;EAChB,QAAQ,EAAE;EACX;CACD;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,gBAAgB;EAChB,QAAQ,EAAE;EACX;CACD;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,gBAAgB;EAChB,QAAQ,EAAE;EACX;CACD;EACE,IAAI;EACJ,OAAO;EACP,UAAU;EACV,gBAAgB;EAChB,QAAQ,EA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jB;EACD,cAAc;EACd,UAAU;EACX;CACD,cAAc;EACZ,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,qBAAqB;EACnB,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,sBAAsB;EACpB,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,wBAAwB;EACtB,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,yBAAyB;EACvB,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,aAAa;EACX,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,gBAAgB;EACd,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,kBAAkB;EAChB,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,mBAAmB;EACjB,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,iBAAiB;EACf,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,aAAa;EACX,OAAO;EACP,MAAM;EACN,SAAS;GACP,OAAO;GACP,QAAQ;GACR,QAAQ;GACT;EACD,cAAc;EACd,UAAU;EACX;CACD,gBAAgB;EACd,OAAO;EACP,MAAM;EACN,SAAS;GACP,OAAO;GACP,QAAQ;GACR,QAAQ;GACT;EACD,cAAc;EACd,UAAU;EACX;CACD,kBAAkB;EAChB,OAAO;EACP,MAAM;EACN,SAAS;GACP,OAAO;GACP,QAAQ;GACR,QAAQ;GACT;EACD,cAAc;EACd,UAAU;EACX;CACD,mBAAmB;EACjB,OAAO;EACP,MAAM;EACN,SAAS;GACP,OAAO;GACP,QAAQ;GACR,QAAQ;GACT;EACD,cAAc;EACd,UAAU;EACX;CACD,iBAAiB;EACf,OAAO;EACP,MAAM;EACN,SAAS;GACP,OAAO;GACP,QAAQ;GACR,QAAQ;GACT;EACD,cAAc;EACd,UAAU;EACX;CACD,aAAa;EACX,OAAO;EACP,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,gBAAgB;EACd,OAAO;EACP,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,kBAAkB;EAChB,OAAO;EACP,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,mBAAmB;EACjB,OAAO;EACP,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,iBAAiB;EACf,OAAO;EACP,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,QAAQ;EACN,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,SAAS;EACP,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,YAAY;EACV,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,aAAa;EACX,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,eAAe;EACb,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,cAAc;EACZ,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,OAAO;EACL,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACD,QAAQ;EACN,OAAO;EACP,MAAM;EACN,MAAM;EACN,cAAc;EACd,UAAU;EACX;CACF;;;ACnoCD,MAAM,oBAAoB,IAAI,IAAoB;CAChD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAEF,MAAM,6BAA6D;CACjE,YAAY;CACZ,MAAM;CACN,SAAS;CACT,WAAW;CACX,YAAY;CACZ,WAAW;CACX,MAAM;CACN,eAAe;CACf,aAAa;CACb,MAAM;CACN,OAAO;CACP,QAAQ;CACR,cAAc;C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UACvB,EACA,SAAS;AAEZ,UAAI,cAAc,eAAe,EAAE;OACjC,MAAM,EAAE,WAAW,WACjB,mBAAmB,eAAe;AACpC,WAAI,UAAU,CAAC,iBAAiB,UAAU,OAAO,CAC/C,QAAO,SAAS,iBAAiB,UAAU,OAAO;AAEpD,WAAI,CAAC,iBAAiB,SAAS,OAAO,CACpC,QAAO,SAAS,iBAAiB,SAAS,UAAU;;;KAK1D,MAAM,QAAQ,cAAc,OAAO;KACnC,MAAM,SAAS,eAAe,OAAO;KACrC,MAAM,iBAAiB,UAAU,cAAc;KAC/C,MAAM,MAAM,YAAY,OAAO;AAE/B,SAAI,WAAW,cAAc,UAAU,WAAW;AAChD,mBAAa;AACb,kBAAY;AAEZ,qBADoB,eAAe,OAAO,eAAe,EAC7B;OAC1B;OACA,SAAS;OACV,CAAC;;AAGJ,SAAI,QAAQ,SAAS;AACnB,gBAAU;AACV,2BAAqB,KAAK;OACxB;OACA,SAAS;OACV,CAAC;;;AAIN,UAAM;AAEN,WAAO;KACL,QAAQ;KACR,UAAU;AACR,eAAS,eAAe,aAAa,EAAE,QAAQ;AAC/C,eAAS,eAAe,cAAc,EAAE,QAAQ;AAChD,WAAK,IAAI,gBAAgB,eAAe;;KAE3C;;GAEJ,CAAC,CACH;;CAEJ,CAAC"}
@@ -1,13 +1,14 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_focus_scopes = require("../focus-scopes-Dc-BaxG2.cjs");
3
- const require_extensions = require("../extensions-BRR4GIPC.cjs");
4
- const require_extension = require("../extension-BIu3RDuB.cjs");
3
+ const require_extensions = require("../extensions-D-rSBBN1.cjs");
4
+ const require_extension = require("../extension-CrxrCWuL.cjs");
5
5
  exports.AlignmentAttribute = require_extensions.AlignmentAttribute;
6
6
  exports.Blockquote = require_extensions.Blockquote;
7
7
  exports.Body = require_extensions.Body;
8
8
  exports.Bold = require_extensions.Bold;
9
9
  exports.BulletList = require_extensions.BulletList;
10
10
  exports.Button = require_extensions.Button;
11
+ exports.COLLABORATIVE_WRAP_DEBOUNCE_MS = require_extensions.COLLABORATIVE_WRAP_DEBOUNCE_MS;
11
12
  exports.COLUMN_PARENT_TYPES = require_focus_scopes.COLUMN_PARENT_TYPES;
12
13
  exports.ClassAttribute = require_extensions.ClassAttribute;
13
14
  exports.Code = require_extensions.Code;
@@ -96,6 +96,7 @@ declare const CodeBlockPrism: EmailNode<CodeBlockPrismOptions, any>;
96
96
  interface ContainerOptions {
97
97
  HTMLAttributes: Record<string, unknown>;
98
98
  }
99
+ declare const COLLABORATIVE_WRAP_DEBOUNCE_MS = 500;
99
100
  declare const Container: EmailNode<ContainerOptions, Record<string, never>>;
100
101
  //#endregion
101
102
  //#region src/extensions/div.d.ts
@@ -390,5 +391,5 @@ type StarterKitOptions = {
390
391
  };
391
392
  declare const StarterKit: Extension<StarterKitOptions, any>;
392
393
  //#endregion
393
- export { AlignmentAttribute, AlignmentOptions, Blockquote, Body, BodyOptions, Bold, BoldOptions, BulletList, Button, COLUMN_PARENT_TYPES, ClassAttribute, ClassAttributeOptions, Code, CodeBlockPrism, CodeBlockPrismOptions, ColumnsColumn, Container, ContainerOptions, Div, DivOptions, Divider, DividerOptions, EditorButtonOptions, FocusScopes, FocusScopesOptions, FocusScopesStorage, FourColumns, GlobalContent, GlobalContentOptions, HardBreak, Heading, HeadingOptions, Italic, Link, LinkOptions, ListItem, MAX_COLUMNS_DEPTH, MaxNesting, MaxNestingOptions, OrderedList, Paragraph, PreservedStyle, PreviewText, PreviewTextOptions, Section, SectionOptions, StarterKit, StarterKitOptions, Strike, StyleAttribute, StyleAttributeOptions, Sup, SupOptions, Table, TableCell, TableCellOptions, TableHeader, TableOptions, TableRow, TableRowOptions, Text, ThreeColumns, TrailingNode, TrailingNodeOptions, TwoColumns, Underline, UnderlineOptions, Uppercase, UppercaseOptions, createFocusScopePlugin, createFocusScopesStorage, focusScopePluginKey, getColumnsDepth, getGlobalContent, processStylesForUnlink, skipTrailingNodeMeta };
394
+ export { AlignmentAttribute, AlignmentOptions, Blockquote, Body, BodyOptions, Bold, BoldOptions, BulletList, Button, COLLABORATIVE_WRAP_DEBOUNCE_MS, COLUMN_PARENT_TYPES, ClassAttribute, ClassAttributeOptions, Code, CodeBlockPrism, CodeBlockPrismOptions, ColumnsColumn, Container, ContainerOptions, Div, DivOptions, Divider, DividerOptions, EditorButtonOptions, FocusScopes, FocusScopesOptions, FocusScopesStorage, FourColumns, GlobalContent, GlobalContentOptions, HardBreak, Heading, HeadingOptions, Italic, Link, LinkOptions, ListItem, MAX_COLUMNS_DEPTH, MaxNesting, MaxNestingOptions, OrderedList, Paragraph, PreservedStyle, PreviewText, PreviewTextOptions, Section, SectionOptions, StarterKit, StarterKitOptions, Strike, StyleAttribute, StyleAttributeOptions, Sup, SupOptions, Table, TableCell, TableCellOptions, TableHeader, TableOptions, TableRow, TableRowOptions, Text, ThreeColumns, TrailingNode, TrailingNodeOptions, TwoColumns, Underline, UnderlineOptions, Uppercase, UppercaseOptions, createFocusScopePlugin, createFocusScopesStorage, focusScopePluginKey, getColumnsDepth, getGlobalContent, processStylesForUnlink, skipTrailingNodeMeta };
394
395
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/extensions/alignment-attribute.tsx","../../src/extensions/body.tsx","../../src/extensions/bold.tsx","../../src/extensions/button.tsx","../../src/extensions/class-attribute.tsx","../../src/extensions/code-block.tsx","../../src/extensions/container.tsx","../../src/extensions/div.tsx","../../src/extensions/divider.tsx","../../src/extensions/global-content.ts","../../src/extensions/heading.tsx","../../src/extensions/link.tsx","../../src/extensions/max-nesting.ts","../../src/extensions/preview-text.ts","../../src/extensions/section.tsx","../../src/extensions/style-attribute.tsx","../../src/extensions/sup.tsx","../../src/extensions/table.tsx","../../src/extensions/trailing-node.tsx","../../src/extensions/underline.tsx","../../src/extensions/uppercase.tsx","../../src/extensions/blockquote.tsx","../../src/extensions/bullet-list.tsx","../../src/extensions/code.tsx","../../src/extensions/columns.tsx","../../src/extensions/hard-break.tsx","../../src/extensions/italic.tsx","../../src/extensions/list-item.tsx","../../src/extensions/ordered-list.tsx","../../src/extensions/paragraph.tsx","../../src/extensions/preserved-style.tsx","../../src/extensions/strike.tsx","../../src/extensions/text.tsx","../../src/extensions/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;UAEiB,gBAAA;EACf,KAAA;EACA,UAAA;AAAA;AAAA;EAAA,UAIU,QAAA;IACR,SAAA;;;;MAIE,YAAA,GAAe,SAAA,aAAsB,UAAA;IAAA;EAAA;AAAA;AAAA,cAK9B,kBAAA,EAAkB,SAAA,CAAA,gBAAA;;;UCTd,WAAA;EACf,cAAA,EAAgB,MAAA;AAAA;AAAA,cAGL,IAAA,EAAI,SAAA,CAAA,WAAA,EAAA,MAAA;;;KCTL,WAAA,GAAc,aAAA;AAAA,cAqBb,IAAA,EAAM,SAAA,CAAU,aAAA;;;UCpBZ,mBAAA;EACf,cAAA,EAAgB,MAAA;EAAA,CACf,GAAA;AAAA;AAAA;EAAA,UAIS,QAAA;IACR,MAAA;MACE,SAAA,QAAiB,UAAA;MACjB,YAAA,GAAe,UAAA,EAAY,MAAA,sBAA4B,UAAA;IAAA;EAAA;AAAA;AAAA,cAKhD,MAAA,EAAM,SAAA,CAAA,mBAAA,EAAA,MAAA;;;UCjBF,qBAAA;EACf,KAAA;EACA,KAAA;AAAA;AAAA;EAAA,UAIU,QAAA;IACR,KAAA;;;;MAIE,QAAA,GAAW,SAAA,aAAsB,UAAA;;;;MAIjC,UAAA,QAAkB,UAAA;IAAA;EAAA;AAAA;AAAA,cAKX,cAAA,EAAc,SAAA,CAAA,qBAAA;;;UCRV,qBAAA,SAA8B,gBAAA;EAC7C,eAAA;EACA,YAAA;AAAA;AAAA,cAOW,cAAA,EAAc,SAAA,CAAA,qBAAA;;;UC0BV,gBAAA;EACf,cAAA,EAAgB,MAAA;AAAA;AAAA,cAGL,SAAA,EAAS,SAA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CAAQ,mBAAA;AAAA;AAAA,cAGf,UAAA,EAAU,SAAA,CAAA,iBAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/extensions/alignment-attribute.tsx","../../src/extensions/body.tsx","../../src/extensions/bold.tsx","../../src/extensions/button.tsx","../../src/extensions/class-attribute.tsx","../../src/extensions/code-block.tsx","../../src/extensions/container.tsx","../../src/extensions/div.tsx","../../src/extensions/divider.tsx","../../src/extensions/global-content.ts","../../src/extensions/heading.tsx","../../src/extensions/link.tsx","../../src/extensions/max-nesting.ts","../../src/extensions/preview-text.ts","../../src/extensions/section.tsx","../../src/extensions/style-attribute.tsx","../../src/extensions/sup.tsx","../../src/extensions/table.tsx","../../src/extensions/trailing-node.tsx","../../src/extensions/underline.tsx","../../src/extensions/uppercase.tsx","../../src/extensions/blockquote.tsx","../../src/extensions/bullet-list.tsx","../../src/extensions/code.tsx","../../src/extensions/columns.tsx","../../src/extensions/hard-break.tsx","../../src/extensions/italic.tsx","../../src/extensions/list-item.tsx","../../src/extensions/ordered-list.tsx","../../src/extensions/paragraph.tsx","../../src/extensions/preserved-style.tsx","../../src/extensions/strike.tsx","../../src/extensions/text.tsx","../../src/extensions/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;UAEiB,gBAAA;EACf,KAAA;EACA,UAAA;AAAA;AAAA;EAAA,UAIU,QAAA;IACR,SAAA;;;;MAIE,YAAA,GAAe,SAAA,aAAsB,UAAA;IAAA;EAAA;AAAA;AAAA,cAK9B,kBAAA,EAAkB,SAAA,CAAA,gBAAA;;;UCTd,WAAA;EACf,cAAA,EAAgB,MAAA;AAAA;AAAA,cAGL,IAAA,EAAI,SAAA,CAAA,WAAA,EAAA,MAAA;;;KCTL,WAAA,GAAc,aAAA;AAAA,cAqBb,IAAA,EAAM,SAAA,CAAU,aAAA;;;UCpBZ,mBAAA;EACf,cAAA,EAAgB,MAAA;EAAA,CACf,GAAA;AAAA;AAAA;EAAA,UAIS,QAAA;IACR,MAA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AQ,gBAAA;EACnB,WAAA,EAAa,OAAA,CAAQ,MAAA;EACrB,IAAA,EAAM,OAAA,CAAQ,WAAA;EACd,SAAA,EAAW,OAAA,CAAQ,gBAAA;EACnB,GAAA,EAAK,OAAA,CAAQ,UAAA;EACb,IAAA,EAAM,MAAA;EACN,MAAA,EAAQ,OAAA,CAAQ,mBAAA;EAChB,OAAA,EAAS,OAAA,CAAQ,cAAA;EACjB,aAAA,EAAe,OAAA,CAAQ,oBAAA;EACvB,kBAAA,EAAoB,OAAA,CAAQ,gBAAA;EAC5B,cAAA,EAAgB,OAAA,CAAQ,qBAAA;EACxB,cAAA,EAAgB,OAAA,CAAQ,qBAAA;EACxB,UAAA,EAAY,OAAA,CAAQ,iBAAA;EACpB,QAAA,EAAU,OAAA,CAAQ,eAAA;EAClB,WAAA,EAAa,OAAA,CAAQ,kBAAA;EACrB,gBAAA,EAAkB,OAAA,CAAQ,mBAAA;AAAA;AAAA,cAGf,UAAA,EAAU,SAAA,CAAA,iBAAA"}
@@ -96,6 +96,7 @@ declare const CodeBlockPrism: EmailNode<CodeBlockPrismOptions, any>;
96
96
  interface ContainerOptions {
97
97
  HTMLAttributes: Record<string, unknown>;
98
98
  }
99
+ declare const COLLABORATIVE_WRAP_DEBOUNCE_MS = 500;
99
100
  declare const Container: EmailNode<ContainerOptions, Record<string, never>>;
100
101
  //#endregion
101
102
  //#region src/extensions/div.d.ts
@@ -390,5 +391,5 @@ type StarterKitOptions = {
390
391
  };
391
392
  declare const StarterKit: Extension<StarterKitOptions, any>;
392
393
  //#endregion
393
- export { AlignmentAttribute, AlignmentOptions, Blockquote, Body, BodyOptions, Bold, BoldOptions, BulletList, Button, COLUMN_PARENT_TYPES, ClassAttribute, ClassAttributeOptions, Code, CodeBlockPrism, CodeBlockPrismOptions, ColumnsColumn, Container, ContainerOptions, Div, DivOptions, Divider, DividerOptions, EditorButtonOptions, FocusScopes, FocusScopesOptions, FocusScopesStorage, FourColumns, GlobalContent, GlobalContentOptions, HardBreak, Heading, HeadingOptions, Italic, Link, LinkOptions, ListItem, MAX_COLUMNS_DEPTH, MaxNesting, MaxNestingOptions, OrderedList, Paragraph, PreservedStyle, PreviewText, PreviewTextOptions, Section, SectionOptions, StarterKit, StarterKitOptions, Strike, StyleAttribute, StyleAttributeOptions, Sup, SupOptions, Table, TableCell, TableCellOptions, TableHeader, TableOptions, TableRow, TableRowOptions, Text, ThreeColumns, TrailingNode, TrailingNodeOptions, TwoColumns, Underline, UnderlineOptions, Uppercase, UppercaseOptions, createFocusScopePlugin, createFocusScopesStorage, focusScopePluginKey, getColumnsDepth, getGlobalContent, processStylesForUnlink, skipTrailingNodeMeta };
394
+ export { AlignmentAttribute, AlignmentOptions, Blockquote, Body, BodyOptions, Bold, BoldOptions, BulletList, Button, COLLABORATIVE_WRAP_DEBOUNCE_MS, COLUMN_PARENT_TYPES, ClassAttribute, ClassAttributeOptions, Code, CodeBlockPrism, CodeBlockPrismOptions, ColumnsColumn, Container, ContainerOptions, Div, DivOptions, Divider, DividerOptions, EditorButtonOptions, FocusScopes, FocusScopesOptions, FocusScopesStorage, FourColumns, GlobalContent, GlobalContentOptions, HardBreak, Heading, HeadingOptions, Italic, Link, LinkOptions, ListItem, MAX_COLUMNS_DEPTH, MaxNesting, MaxNestingOptions, OrderedList, Paragraph, PreservedStyle, PreviewText, PreviewTextOptions, Section, SectionOptions, StarterKit, StarterKitOptions, Strike, StyleAttribute, StyleAttributeOptions, Sup, SupOptions, Table, TableCell, TableCellOptions, TableHeader, TableOptions, TableRow, TableRowOptions, Text, ThreeColumns, TrailingNode, TrailingNodeOptions, TwoColumns, Underline, UnderlineOptions, Uppercase, UppercaseOptions, createFocusScopePlugin, createFocusScopesStorage, focusScopePluginKey, getColumnsDepth, getGlobalContent, processStylesForUnlink, skipTrailingNodeMeta };
394
395
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/extensions/alignment-attribute.tsx","../../src/extensions/body.tsx","../../src/extensions/bold.tsx","../../src/extensions/button.tsx","../../src/extensions/class-attribute.tsx","../../src/extensions/code-block.tsx","../../src/extensions/container.tsx","../../src/extensions/div.tsx","../../src/extensions/divider.tsx","../../src/extensions/global-content.ts","../../src/extensions/heading.tsx","../../src/extensions/link.tsx","../../src/extensions/max-nesting.ts","../../src/extensions/preview-text.ts","../../src/extensions/section.tsx","../../src/extensions/style-attribute.tsx","../../src/extensions/sup.tsx","../../src/extensions/table.tsx","../../src/extensions/trailing-node.tsx","../../src/extensions/underline.tsx","../../src/extensions/uppercase.tsx","../../src/extensions/blockquote.tsx","../../src/extensions/bullet-list.tsx","../../src/extensions/code.tsx","../../src/extensions/columns.tsx","../../src/extensions/hard-break.tsx","../../src/extensions/italic.tsx","../../src/extensions/list-item.tsx","../../src/extensions/ordered-list.tsx","../../src/extensions/paragraph.tsx","../../src/extensions/preserved-style.tsx","../../src/extensions/strike.tsx","../../src/extensions/text.tsx","../../src/extensions/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;UAEiB,gBAAA;EACf,KAAA;EACA,UAAA;AAAA;AAAA;EAAA,UAIU,QAAA;IACR,SAAA;;;;MAIE,YAAA,GAAe,SAAA,aAAsB,UAAA;IAAA;EAAA;AAAA;AAAA,cAK9B,kBAAA,EAAkB,SAAA,CAAA,gBAAA;;;UCTd,WAAA;EACf,cAAA,EAAgB,MAAA;AAAA;AAAA,cAGL,IAAA,EAAI,SAAA,CAAA,WAAA,EAAA,MAAA;;;KCTL,WAAA,GAAc,aAAA;AAAA,cAqBb,IAAA,EAAM,SAAA,CAAU,aAAA;;;UCpBZ,mBAAA;EACf,cAAA,EAAgB,MAAA;EAAA,CACf,GAAA;AAAA;AAAA;EAAA,UAIS,QAAA;IACR,MAAA;MACE,SAAA,QAAiB,UAAA;MACjB,YAAA,GAAe,UAAA,EAAY,MAAA,sBAA4B,UAAA;IAAA;EAAA;AAAA;AAAA,cAKhD,MAAA,EAAM,SAAA,CAAA,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Q,UAAA;EACb,IAAA,EAAM,MAAA;EACN,MAAA,EAAQ,OAAA,CAAQ,mBAAA;EAChB,OAAA,EAAS,OAAA,CAAQ,cAAA;EACjB,aAAA,EAAe,OAAA,CAAQ,oBAAA;EACvB,kBAAA,EAAoB,OAAA,CAAQ,gBAAA;EAC5B,cAAA,EAAgB,OAAA,CAAQ,qBAAA;EACxB,cAAA,EAAgB,OAAA,CAAQ,qBAAA;EACxB,UAAA,EAAY,OAAA,CAAQ,iBAAA;EACpB,QAAA,EAAU,OAAA,CAAQ,eAAA;EAClB,WAAA,EAAa,OAAA,CAAQ,kBAAA;EACrB,gBAAA,EAAkB,OAAA,CAAQ,mBAAA;AAAA;AAAA,cAGf,UAAA,EAAU,SAAA,CAAA,iBAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/extensions/alignment-attribute.tsx","../../src/extensions/body.tsx","../../src/extensions/bold.tsx","../../src/extensions/button.tsx","../../src/extensions/class-attribute.tsx","../../src/extensions/code-block.tsx","../../src/extensions/container.tsx","../../src/extensions/div.tsx","../../src/extensions/divider.tsx","../../src/extensions/global-content.ts","../../src/extensions/heading.tsx","../../src/extensions/link.tsx","../../src/extensions/max-nesting.ts","../../src/extensions/preview-text.ts","../../src/extensions/section.tsx","../../src/extensions/style-attribute.tsx","../../src/extensions/sup.tsx","../../src/extensions/table.tsx","../../src/extensions/trailing-node.tsx","../../src/extensions/underline.tsx","../../src/extensions/uppercase.tsx","../../src/extensions/blockquote.tsx","../../src/extensions/bullet-list.tsx","../../src/extensions/code.tsx","../../src/extensions/columns.tsx","../../src/extensions/hard-break.tsx","../../src/extensions/italic.tsx","../../src/extensions/list-item.tsx","../../src/extensions/ordered-list.tsx","../../src/extensions/paragraph.tsx","../../src/extensions/preserved-style.tsx","../../src/extensions/strike.tsx","../../src/extensions/text.tsx","../../src/extensions/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;UAEiB,gBAAA;EACf,KAAA;EACA,UAAA;AAA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Q,WAAA;EACd,MAAA,EAAQ,OAAA,CAAQ,aAAA;EAChB,OAAA,EAAS,OAAA,CAAQ,cAAA;EACjB,OAAA,EAAS,OAAA,CAAQ,cAAA;EACjB,IAAA,EAAM,OAAA,CAAQ,WAAA;EACd,GAAA,EAAK,OAAA,CAAQ,UAAA;EACb,SAAA,EAAW,OAAA,CAAQ,gBAAA;EACnB,SAAA,EAAW,OAAA,CAAQ,gBAAA;EACnB,cAAA,EAAgB,OAAA,CAAQ,MAAA;EACxB,KAAA,EAAO,OAAA,CAAQ,YAAA;EACf,QAAA,EAAU,OAAA,CAAQ,eAAA;EAClB,SAAA,EAAW,OAAA,CAAQ,gBAAA;EACnB,WAAA,EAAa,OAAA,CAAQ,MAAA;EACrB,IAAA,EAAM,OAAA,CAAQ,WAAA;EACd,SAAA,EAAW,OAAA,CAAQ,gBAAA;EACnB,GAAA,EAAK,OAAA,CAAQ,UAAA;EACb,IAAA,EAAM,MAAA;EACN,MAAA,EAAQ,OAAA,CAAQ,mBAAA;EAChB,OAAA,EAAS,OAAA,CAAQ,cAAA;EACjB,aAAA,EAAe,OAAA,CAAQ,oBAAA;EACvB,kBAAA,EAAoB,OAAA,CAAQ,gBAAA;EAC5B,cAAA,EAAgB,OAAA,CAAQ,qBAAA;EACxB,cAAA,EAAgB,OAAA,CAAQ,qBAAA;EACxB,UAAA,EAAY,OAAA,CAAQ,iBAAA;EACpB,QAAA,EAAU,OAAA,CAAQ,eAAA;EAClB,WAAA,EAAa,OAAA,CAAQ,kBAAA;EACrB,gBAAA,EAAkB,OAAA,CAAQ,mBAAA;AAAA;AAAA,cAGf,UAAA,EAAU,SAAA,CAAA,iBAAA"}
@@ -1,4 +1,4 @@
1
- import { A as Code, C as Italic, D as Div, E as Divider, F as Body, I as Blockquote, L as AlignmentAttribute, M as Button, N as BulletList, O as Container, P as Bold, S as processStylesForUnlink, T as HardBreak, _ as OrderedList, a as skipTrailingNodeMeta, b as Link, c as TableCell, d as Sup, f as StyleAttribute, g as Paragraph, h as PreviewText, i as TrailingNode, j as ClassAttribute, k as CodeBlockPrism, l as TableHeader, m as Section, n as Uppercase, o as Text, p as Strike, r as Underline, s as Table, t as StarterKit, u as TableRow, v as MaxNesting, w as Heading, x as PreservedStyle, y as ListItem } from "../extensions-C_QgwNlg.mjs";
1
+ import { A as CodeBlockPrism, C as Italic, D as Div, E as Divider, F as Bold, I as Body, L as Blockquote, M as ClassAttribute, N as Button, O as COLLABORATIVE_WRAP_DEBOUNCE_MS, P as BulletList, R as AlignmentAttribute, S as processStylesForUnlink, T as HardBreak, _ as OrderedList, a as skipTrailingNodeMeta, b as Link, c as TableCell, d as Sup, f as StyleAttribute, g as Paragraph, h as PreviewText, i as TrailingNode, j as Code, k as Container, l as TableHeader, m as Section, n as Uppercase, o as Text, p as Strike, r as Underline, s as Table, t as StarterKit, u as TableRow, v as MaxNesting, w as Heading, x as PreservedStyle, y as ListItem } from "../extensions-o5tHvgEQ.mjs";
2
2
  import { a as COLUMN_PARENT_TYPES, c as MAX_COLUMNS_DEPTH, d as getColumnsDepth, i as focusScopePluginKey, l as ThreeColumns, n as createFocusScopePlugin, o as ColumnsColumn, r as createFocusScopesStorage, s as FourColumns, t as FocusScopes, u as TwoColumns } from "../focus-scopes-DAH-GsSU.mjs";
3
- import { E as getGlobalContent, T as GlobalContent } from "../extension-DPl6ZtKu.mjs";
4
- export { AlignmentAttribute, Blockquote, Body, Bold, BulletList, Button, COLUMN_PARENT_TYPES, ClassAttribute, Code, CodeBlockPrism, ColumnsColumn, Container, Div, Divider, FocusScopes, FourColumns, GlobalContent, HardBreak, Heading, Italic, Link, ListItem, MAX_COLUMNS_DEPTH, MaxNesting, OrderedList, Paragraph, PreservedStyle, PreviewText, Section, StarterKit, Strike, StyleAttribute, Sup, Table, TableCell, TableHeader, TableRow, Text, ThreeColumns, TrailingNode, TwoColumns, Underline, Uppercase, createFocusScopePlugin, createFocusScopesStorage, focusScopePluginKey, getColumnsDepth, getGlobalContent, processStylesForUnlink, skipTrailingNodeMeta };
3
+ import { E as getGlobalContent, T as GlobalContent } from "../extension-DjBptEVp.mjs";
4
+ export { AlignmentAttribute, Blockquote, Body, Bold, BulletList, Button, COLLABORATIVE_WRAP_DEBOUNCE_MS, COLUMN_PARENT_TYPES, ClassAttribute, Code, CodeBlockPrism, ColumnsColumn, Container, Div, Divider, FocusScopes, FourColumns, GlobalContent, HardBreak, Heading, Italic, Link, ListItem, MAX_COLUMNS_DEPTH, MaxNesting, OrderedList, Paragraph, PreservedStyle, PreviewText, Section, StarterKit, Strike, StyleAttribute, Sup, Table, TableCell, TableHeader, TableRow, Text, ThreeColumns, TrailingNode, TwoColumns, Underline, Uppercase, createFocusScopePlugin, createFocusScopesStorage, focusScopePluginKey, getColumnsDepth, getGlobalContent, processStylesForUnlink, skipTrailingNodeMeta };
@@ -2,7 +2,7 @@ const require_focus_scopes = require("./focus-scopes-Dc-BaxG2.cjs");
2
2
  const require_email_node = require("./email-node-C9npP8Qi.cjs");
3
3
  const require_core = require("./core-CVuVY_7y.cjs");
4
4
  const require_event_bus = require("./event-bus-DimtgsCE.cjs");
5
- const require_extension = require("./extension-BIu3RDuB.cjs");
5
+ const require_extension = require("./extension-CrxrCWuL.cjs");
6
6
  let _tiptap_react = require("@tiptap/react");
7
7
  let react_email = require("react-email");
8
8
  react_email = require_focus_scopes.__toESM(react_email);
@@ -584,11 +584,8 @@ function hasCollaborationExtension(exts) {
584
584
  //#endregion
585
585
  //#region src/extensions/container.tsx
586
586
  function hasContainerNode(doc) {
587
- let found = false;
588
- doc.forEach((node) => {
589
- if (node.type.name === "container") found = true;
590
- });
591
- return found;
587
+ for (let i = 0; i < doc.childCount; i++) if (doc.child(i).type.name === "container") return true;
588
+ return false;
592
589
  }
593
590
  function wrapInContainer(state) {
594
591
  const { doc } = state;
@@ -607,6 +604,10 @@ function wrapInContainer(state) {
607
604
  tr.setMeta("addToHistory", false);
608
605
  return tr;
609
606
  }
607
+ const COLLABORATIVE_WRAP_DEBOUNCE_MS = 500;
608
+ function isBareEmptyDoc(doc) {
609
+ return doc.childCount === 1 && doc.firstChild !== null && doc.firstChild.type.name === "paragraph" && doc.firstChild.childCount === 0;
610
+ }
610
611
  const Container = require_email_node.EmailNode.create({
611
612
  name: "container",
612
613
  group: "block",
@@ -643,14 +644,10 @@ const Container = require_email_node.EmailNode.create({
643
644
  ];
644
645
  },
645
646
  addProseMirrorPlugins() {
646
- const isCollaborative = hasCollaborationExtension(this.editor.extensionManager.extensions);
647
- return [new _tiptap_pm_state.Plugin({
647
+ if (!hasCollaborationExtension(this.editor.extensionManager.extensions)) return [new _tiptap_pm_state.Plugin({
648
648
  key: new _tiptap_pm_state.PluginKey("containerEnforcer"),
649
- view: isCollaborative ? void 0 : (editorView) => {
650
- if (!hasContainerNode(editorView.state.doc)) {
651
- const tr = wrapInContainer(editorView.state);
652
- editorView.dispatch(tr);
653
- }
649
+ view: (editorView) => {
650
+ if (!hasContainerNode(editorView.state.doc)) editorView.dispatch(wrapInContainer(editorView.state));
654
651
  return {};
655
652
  },
656
653
  appendTransaction(_transactions, oldState, newState) {
@@ -659,6 +656,41 @@ const Container = require_email_node.EmailNode.create({
659
656
  return wrapInContainer(newState);
660
657
  }
661
658
  })];
659
+ let wrapTimer = null;
660
+ return [new _tiptap_pm_state.Plugin({
661
+ key: new _tiptap_pm_state.PluginKey("containerEnforcer"),
662
+ view: (editorView) => {
663
+ const cancelPendingWrap = () => {
664
+ if (wrapTimer !== null) {
665
+ clearTimeout(wrapTimer);
666
+ wrapTimer = null;
667
+ }
668
+ };
669
+ const scheduleWrap = () => {
670
+ cancelPendingWrap();
671
+ wrapTimer = setTimeout(() => {
672
+ wrapTimer = null;
673
+ if (editorView.isDestroyed) return;
674
+ if (editorView.composing) {
675
+ scheduleWrap();
676
+ return;
677
+ }
678
+ const state = editorView.state;
679
+ if (hasContainerNode(state.doc)) return;
680
+ if (isBareEmptyDoc(state.doc)) return;
681
+ editorView.dispatch(wrapInContainer(state));
682
+ }, 500);
683
+ };
684
+ return { update: (view, prevState) => {
685
+ if (view.state.doc.eq(prevState.doc)) return;
686
+ if (hasContainerNode(view.state.doc)) {
687
+ cancelPendingWrap();
688
+ return;
689
+ }
690
+ scheduleWrap();
691
+ } };
692
+ }
693
+ })];
662
694
  },
663
695
  renderToReactEmail({ children, node, style }) {
664
696
  const inlineStyles = require_email_node.inlineCssToJs(node.attrs?.style);
@@ -1536,6 +1568,7 @@ const TrailingNode = _tiptap_core.Extension.create({
1536
1568
  if (!shouldInsert) return;
1537
1569
  const positions = getInsertPositions(doc);
1538
1570
  for (const pos of positions.sort((a, b) => b - a)) tr.insert(pos, type.create());
1571
+ if (positions.length > 0) tr.setMeta("autoTrailingNode", true);
1539
1572
  return positions.length > 0 ? tr : void 0;
1540
1573
  },
1541
1574
  state: {
@@ -1855,6 +1888,12 @@ Object.defineProperty(exports, "Button", {
1855
1888
  return Button;
1856
1889
  }
1857
1890
  });
1891
+ Object.defineProperty(exports, "COLLABORATIVE_WRAP_DEBOUNCE_MS", {
1892
+ enumerable: true,
1893
+ get: function() {
1894
+ return COLLABORATIVE_WRAP_DEBOUNCE_MS;
1895
+ }
1896
+ });
1858
1897
  Object.defineProperty(exports, "ClassAttribute", {
1859
1898
  enumerable: true,
1860
1899
  get: function() {
@@ -2,7 +2,7 @@ import { a as inlineCssToJs, o as jsToInlineCss, s as resolveConflictingStyles,
2
2
  import { r as EmailMark } from "./core-CtoP6qua.mjs";
3
3
  import { _ as TABLE_ATTRIBUTES, b as createStandardAttributes, f as hasPrismThemeLoaded, g as LAYOUT_ATTRIBUTES, h as COMMON_HTML_ATTRIBUTES, l as ThreeColumns, m as removePrismTheme, o as ColumnsColumn, p as loadPrismTheme, s as FourColumns, t as FocusScopes, u as TwoColumns, v as TABLE_CELL_ATTRIBUTES, y as TABLE_HEADER_ATTRIBUTES } from "./focus-scopes-DAH-GsSU.mjs";
4
4
  import { t as editorEventBus } from "./event-bus-CqrIUE24.mjs";
5
- import { T as GlobalContent, a as getResolvedNodeStyles, i as getMergedCssJs, r as getEmailTheming } from "./extension-DPl6ZtKu.mjs";
5
+ import { T as GlobalContent, a as getResolvedNodeStyles, i as getMergedCssJs, r as getEmailTheming } from "./extension-DjBptEVp.mjs";
6
6
  import { NodeViewContent, NodeViewWrapper, ReactNodeViewRenderer } from "@tiptap/react";
7
7
  import * as ReactEmailComponents from "react-email";
8
8
  import { Button, CodeBlock, Column, Container, Heading, Hr, Link, Row, Section } from "react-email";
@@ -567,11 +567,8 @@ function hasCollaborationExtension(exts) {
567
567
  //#endregion
568
568
  //#region src/extensions/container.tsx
569
569
  function hasContainerNode(doc) {
570
- let found = false;
571
- doc.forEach((node) => {
572
- if (node.type.name === "container") found = true;
573
- });
574
- return found;
570
+ for (let i = 0; i < doc.childCount; i++) if (doc.child(i).type.name === "container") return true;
571
+ return false;
575
572
  }
576
573
  function wrapInContainer(state) {
577
574
  const { doc } = state;
@@ -590,6 +587,10 @@ function wrapInContainer(state) {
590
587
  tr.setMeta("addToHistory", false);
591
588
  return tr;
592
589
  }
590
+ const COLLABORATIVE_WRAP_DEBOUNCE_MS = 500;
591
+ function isBareEmptyDoc(doc) {
592
+ return doc.childCount === 1 && doc.firstChild !== null && doc.firstChild.type.name === "paragraph" && doc.firstChild.childCount === 0;
593
+ }
593
594
  const Container$1 = EmailNode.create({
594
595
  name: "container",
595
596
  group: "block",
@@ -626,14 +627,10 @@ const Container$1 = EmailNode.create({
626
627
  ];
627
628
  },
628
629
  addProseMirrorPlugins() {
629
- const isCollaborative = hasCollaborationExtension(this.editor.extensionManager.extensions);
630
- return [new Plugin({
630
+ if (!hasCollaborationExtension(this.editor.extensionManager.extensions)) return [new Plugin({
631
631
  key: new PluginKey("containerEnforcer"),
632
- view: isCollaborative ? void 0 : (editorView) => {
633
- if (!hasContainerNode(editorView.state.doc)) {
634
- const tr = wrapInContainer(editorView.state);
635
- editorView.dispatch(tr);
636
- }
632
+ view: (editorView) => {
633
+ if (!hasContainerNode(editorView.state.doc)) editorView.dispatch(wrapInContainer(editorView.state));
637
634
  return {};
638
635
  },
639
636
  appendTransaction(_transactions, oldState, newState) {
@@ -642,6 +639,41 @@ const Container$1 = EmailNode.create({
642
639
  return wrapInContainer(newState);
643
640
  }
644
641
  })];
642
+ let wrapTimer = null;
643
+ return [new Plugin({
644
+ key: new PluginKey("containerEnforcer"),
645
+ view: (editorView) => {
646
+ const cancelPendingWrap = () => {
647
+ if (wrapTimer !== null) {
648
+ clearTimeout(wrapTimer);
649
+ wrapTimer = null;
650
+ }
651
+ };
652
+ const scheduleWrap = () => {
653
+ cancelPendingWrap();
654
+ wrapTimer = setTimeout(() => {
655
+ wrapTimer = null;
656
+ if (editorView.isDestroyed) return;
657
+ if (editorView.composing) {
658
+ scheduleWrap();
659
+ return;
660
+ }
661
+ const state = editorView.state;
662
+ if (hasContainerNode(state.doc)) return;
663
+ if (isBareEmptyDoc(state.doc)) return;
664
+ editorView.dispatch(wrapInContainer(state));
665
+ }, 500);
666
+ };
667
+ return { update: (view, prevState) => {
668
+ if (view.state.doc.eq(prevState.doc)) return;
669
+ if (hasContainerNode(view.state.doc)) {
670
+ cancelPendingWrap();
671
+ return;
672
+ }
673
+ scheduleWrap();
674
+ } };
675
+ }
676
+ })];
645
677
  },
646
678
  renderToReactEmail({ children, node, style }) {
647
679
  const inlineStyles = inlineCssToJs(node.attrs?.style);
@@ -1519,6 +1551,7 @@ const TrailingNode = Extension.create({
1519
1551
  if (!shouldInsert) return;
1520
1552
  const positions = getInsertPositions(doc);
1521
1553
  for (const pos of positions.sort((a, b) => b - a)) tr.insert(pos, type.create());
1554
+ if (positions.length > 0) tr.setMeta("autoTrailingNode", true);
1522
1555
  return positions.length > 0 ? tr : void 0;
1523
1556
  },
1524
1557
  state: {
@@ -1802,6 +1835,6 @@ const StarterKit = Extension.create({
1802
1835
  }
1803
1836
  });
1804
1837
  //#endregion
1805
- export { Code as A, Italic as C, Div as D, Divider as E, Body$1 as F, Blockquote as I, AlignmentAttribute as L, Button$1 as M, BulletList as N, Container$1 as O, Bold as P, processStylesForUnlink as S, HardBreak as T, OrderedList as _, skipTrailingNodeMeta as a, Link$1 as b, TableCell as c, Sup as d, StyleAttribute as f, Paragraph as g, PreviewText as h, TrailingNode as i, ClassAttribute as j, CodeBlockPrism as k, TableHeader as l, Section$1 as m, Uppercase as n, Text$1 as o, Strike as p, Underline as r, Table as s, StarterKit as t, TableRow as u, MaxNesting as v, Heading$2 as w, PreservedStyle as x, ListItem as y };
1838
+ export { CodeBlockPrism as A, Italic as C, Div as D, Divider as E, Bold as F, Body$1 as I, Blockquote as L, ClassAttribute as M, Button$1 as N, COLLABORATIVE_WRAP_DEBOUNCE_MS as O, BulletList as P, AlignmentAttribute as R, processStylesForUnlink as S, HardBreak as T, OrderedList as _, skipTrailingNodeMeta as a, Link$1 as b, TableCell as c, Sup as d, StyleAttribute as f, Paragraph as g, PreviewText as h, TrailingNode as i, Code as j, Container$1 as k, TableHeader as l, Section$1 as m, Uppercase as n, Text$1 as o, Strike as p, Underline as r, Table as s, StarterKit as t, TableRow as u, MaxNesting as v, Heading$2 as w, PreservedStyle as x, ListItem as y };
1806
1839
 
1807
- //# sourceMappingURL=extensions-C_QgwNlg.mjs.map
1840
+ //# sourceMappingURL=extensions-o5tHvgEQ.mjs.map