email-builder-online 4.0.0 → 4.1.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.
Files changed (499) hide show
  1. package/LICENSE +661 -21
  2. package/README.md +792 -789
  3. package/dist/email-builder-standalone/src/App/AIGeneration/AIGenerationDialog.d.ts +18 -0
  4. package/dist/email-builder-standalone/src/App/AIGeneration/AIGenerationDialog.d.ts.map +1 -0
  5. package/dist/email-builder-standalone/src/App/AIGeneration/AIPreviewPanel.d.ts +29 -0
  6. package/dist/email-builder-standalone/src/App/AIGeneration/AIPreviewPanel.d.ts.map +1 -0
  7. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/AIVisualWizard.d.ts +14 -0
  8. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/AIVisualWizard.d.ts.map +1 -0
  9. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/ChipQuestion.d.ts +23 -0
  10. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/ChipQuestion.d.ts.map +1 -0
  11. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/EntryPicker.d.ts +6 -0
  12. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/EntryPicker.d.ts.map +1 -0
  13. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/SummaryStep.d.ts +11 -0
  14. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/SummaryStep.d.ts.map +1 -0
  15. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/WizardField.d.ts +14 -0
  16. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/WizardField.d.ts.map +1 -0
  17. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/WizardHeader.d.ts +8 -0
  18. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/WizardHeader.d.ts.map +1 -0
  19. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/briefDefaults.d.ts +44 -0
  20. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/briefDefaults.d.ts.map +1 -0
  21. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/compileBriefClient.d.ts +12 -0
  22. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/compileBriefClient.d.ts.map +1 -0
  23. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/steps/Step01Strategy.d.ts +9 -0
  24. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/steps/Step01Strategy.d.ts.map +1 -0
  25. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/steps/Step02Tone.d.ts +9 -0
  26. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/steps/Step02Tone.d.ts.map +1 -0
  27. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/steps/Step03Visual.d.ts +9 -0
  28. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/steps/Step03Visual.d.ts.map +1 -0
  29. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/steps/Step04Imagery.d.ts +9 -0
  30. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/steps/Step04Imagery.d.ts.map +1 -0
  31. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/steps/Step05Layout.d.ts +9 -0
  32. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/steps/Step05Layout.d.ts.map +1 -0
  33. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/useVisualBrief.d.ts +41 -0
  34. package/dist/email-builder-standalone/src/App/AIGeneration/Wizard/useVisualBrief.d.ts.map +1 -0
  35. package/dist/email-builder-standalone/src/App/AIGeneration/index.d.ts +18 -0
  36. package/dist/email-builder-standalone/src/App/AIGeneration/index.d.ts.map +1 -0
  37. package/dist/email-builder-standalone/src/App/AIGeneration/ndjsonStreamClient.d.ts +75 -0
  38. package/dist/email-builder-standalone/src/App/AIGeneration/ndjsonStreamClient.d.ts.map +1 -0
  39. package/dist/email-builder-standalone/src/App/AIGeneration/repairOrphanedBlocks.d.ts +154 -0
  40. package/dist/email-builder-standalone/src/App/AIGeneration/repairOrphanedBlocks.d.ts.map +1 -0
  41. package/dist/email-builder-standalone/src/App/AIGeneration/trackUnsplashFromDocument.d.ts +24 -0
  42. package/dist/email-builder-standalone/src/App/AIGeneration/trackUnsplashFromDocument.d.ts.map +1 -0
  43. package/dist/email-builder-standalone/src/App/AIGeneration/validateGeneratedTemplate.d.ts +53 -0
  44. package/dist/email-builder-standalone/src/App/AIGeneration/validateGeneratedTemplate.d.ts.map +1 -0
  45. package/dist/{editor-sample → email-builder-standalone}/src/App/ComponentTree/ComponentTreeColumnIcons.d.ts +1 -1
  46. package/dist/{editor-sample → email-builder-standalone}/src/App/ComponentTree/ComponentTreeColumnIcons.d.ts.map +1 -1
  47. package/dist/{editor-sample → email-builder-standalone}/src/App/ComponentTree/ComponentTreePanel.d.ts.map +1 -1
  48. package/dist/{editor-sample → email-builder-standalone}/src/App/ComponentTree/ToggleComponentTreeButton.d.ts.map +1 -1
  49. package/dist/email-builder-standalone/src/App/ComponentsLibrary/ApplyTemplateConfirmDialog.d.ts +20 -0
  50. package/dist/email-builder-standalone/src/App/ComponentsLibrary/ApplyTemplateConfirmDialog.d.ts.map +1 -0
  51. package/dist/email-builder-standalone/src/App/ComponentsLibrary/ComponentsLibraryDrawer.d.ts +28 -0
  52. package/dist/email-builder-standalone/src/App/ComponentsLibrary/ComponentsLibraryDrawer.d.ts.map +1 -0
  53. package/dist/email-builder-standalone/src/App/ComponentsLibrary/ComponentsLibraryHandle.d.ts +12 -0
  54. package/dist/email-builder-standalone/src/App/ComponentsLibrary/ComponentsLibraryHandle.d.ts.map +1 -0
  55. package/dist/email-builder-standalone/src/App/ComponentsLibrary/LibraryHoverPreviewPortal.d.ts +9 -0
  56. package/dist/email-builder-standalone/src/App/ComponentsLibrary/LibraryHoverPreviewPortal.d.ts.map +1 -0
  57. package/dist/email-builder-standalone/src/App/ComponentsLibrary/LibrarySearchToolbar.d.ts +10 -0
  58. package/dist/email-builder-standalone/src/App/ComponentsLibrary/LibrarySearchToolbar.d.ts.map +1 -0
  59. package/dist/email-builder-standalone/src/App/ComponentsLibrary/RenameSubtreeDialog.d.ts +18 -0
  60. package/dist/email-builder-standalone/src/App/ComponentsLibrary/RenameSubtreeDialog.d.ts.map +1 -0
  61. package/dist/email-builder-standalone/src/App/ComponentsLibrary/SaveSubtreeDialog.d.ts +27 -0
  62. package/dist/email-builder-standalone/src/App/ComponentsLibrary/SaveSubtreeDialog.d.ts.map +1 -0
  63. package/dist/email-builder-standalone/src/App/ComponentsLibrary/SaveTemplateDialog.d.ts +21 -0
  64. package/dist/email-builder-standalone/src/App/ComponentsLibrary/SaveTemplateDialog.d.ts.map +1 -0
  65. package/dist/email-builder-standalone/src/App/ComponentsLibrary/TagsInput.d.ts +13 -0
  66. package/dist/email-builder-standalone/src/App/ComponentsLibrary/TagsInput.d.ts.map +1 -0
  67. package/dist/email-builder-standalone/src/App/ComponentsLibrary/ThemesList.d.ts +26 -0
  68. package/dist/email-builder-standalone/src/App/ComponentsLibrary/ThemesList.d.ts.map +1 -0
  69. package/dist/email-builder-standalone/src/App/ComponentsLibrary/devSeedTemplates.d.ts +31 -0
  70. package/dist/email-builder-standalone/src/App/ComponentsLibrary/devSeedTemplates.d.ts.map +1 -0
  71. package/dist/email-builder-standalone/src/App/ComponentsLibrary/dnd.d.ts +36 -0
  72. package/dist/email-builder-standalone/src/App/ComponentsLibrary/dnd.d.ts.map +1 -0
  73. package/dist/email-builder-standalone/src/App/ComponentsLibrary/fetchSavedSubtree.d.ts +12 -0
  74. package/dist/email-builder-standalone/src/App/ComponentsLibrary/fetchSavedSubtree.d.ts.map +1 -0
  75. package/dist/email-builder-standalone/src/App/ComponentsLibrary/fetchTheme.d.ts +70 -0
  76. package/dist/email-builder-standalone/src/App/ComponentsLibrary/fetchTheme.d.ts.map +1 -0
  77. package/dist/email-builder-standalone/src/App/ComponentsLibrary/hoverPreviewStore.d.ts +58 -0
  78. package/dist/email-builder-standalone/src/App/ComponentsLibrary/hoverPreviewStore.d.ts.map +1 -0
  79. package/dist/email-builder-standalone/src/App/ComponentsLibrary/index.d.ts +15 -0
  80. package/dist/email-builder-standalone/src/App/ComponentsLibrary/index.d.ts.map +1 -0
  81. package/dist/email-builder-standalone/src/App/ComponentsLibrary/librarySearch.d.ts +48 -0
  82. package/dist/email-builder-standalone/src/App/ComponentsLibrary/librarySearch.d.ts.map +1 -0
  83. package/dist/email-builder-standalone/src/App/ComponentsLibrary/localLibraryStore.d.ts +91 -0
  84. package/dist/email-builder-standalone/src/App/ComponentsLibrary/localLibraryStore.d.ts.map +1 -0
  85. package/dist/email-builder-standalone/src/App/ComponentsLibrary/styles.d.ts +3 -0
  86. package/dist/email-builder-standalone/src/App/ComponentsLibrary/styles.d.ts.map +1 -0
  87. package/dist/email-builder-standalone/src/App/ComponentsLibrary/thumbnail/LibraryCardPrimitiveRender.d.ts +41 -0
  88. package/dist/email-builder-standalone/src/App/ComponentsLibrary/thumbnail/LibraryCardPrimitiveRender.d.ts.map +1 -0
  89. package/dist/email-builder-standalone/src/App/ComponentsLibrary/thumbnail/LibraryCardThemeSwatch.d.ts +52 -0
  90. package/dist/email-builder-standalone/src/App/ComponentsLibrary/thumbnail/LibraryCardThemeSwatch.d.ts.map +1 -0
  91. package/dist/email-builder-standalone/src/App/ComponentsLibrary/thumbnail/LibraryCardThumbnail.d.ts +31 -0
  92. package/dist/email-builder-standalone/src/App/ComponentsLibrary/thumbnail/LibraryCardThumbnail.d.ts.map +1 -0
  93. package/dist/email-builder-standalone/src/App/ComponentsLibrary/thumbnail/buildThumbnailHtml.d.ts +34 -0
  94. package/dist/email-builder-standalone/src/App/ComponentsLibrary/thumbnail/buildThumbnailHtml.d.ts.map +1 -0
  95. package/dist/email-builder-standalone/src/App/ComponentsLibrary/thumbnail/captureThumbnail.d.ts +76 -0
  96. package/dist/email-builder-standalone/src/App/ComponentsLibrary/thumbnail/captureThumbnail.d.ts.map +1 -0
  97. package/dist/email-builder-standalone/src/App/ComponentsLibrary/thumbnail/thumbnailUrl.d.ts +29 -0
  98. package/dist/email-builder-standalone/src/App/ComponentsLibrary/thumbnail/thumbnailUrl.d.ts.map +1 -0
  99. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/index.d.ts +1 -1
  100. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/index.d.ts.map +1 -0
  101. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/ButtonSidebarPanel.d.ts.map +1 -1
  102. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/ColumnsContainerSidebarPanel.d.ts.map +1 -1
  103. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/ContainerSidebarPanel.d.ts.map +1 -1
  104. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/DividerSidebarPanel.d.ts.map +1 -1
  105. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/EmailLayoutSidebarPanel.d.ts +8 -0
  106. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/EmailLayoutSidebarPanel.d.ts.map +1 -0
  107. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/ImageSidebarPanel.d.ts.map +1 -1
  108. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/NotionTextSidebarPanel.d.ts.map +1 -1
  109. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/SocialSidebarPanel.d.ts.map +1 -0
  110. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/SpacerSidebarPanel.d.ts.map +1 -1
  111. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/BaseSidebarPanel.d.ts +1 -1
  112. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/containers/StickyWrapper.d.ts.map +1 -1
  113. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/containers/Wrapper.d.ts +1 -1
  114. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/containers/Wrapper.d.ts.map +1 -0
  115. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/BackgroundImageInput.d.ts +1 -1
  116. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/BackgroundImageInput.d.ts.map +1 -1
  117. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/BooleanInput.d.ts.map +1 -1
  118. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/BorderInput.d.ts +2 -2
  119. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/BorderInput.d.ts.map +1 -0
  120. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/BaseColorInput.d.ts +29 -0
  121. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/BaseColorInput.d.ts.map +1 -0
  122. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/EyeDropperButton.d.ts +6 -0
  123. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/EyeDropperButton.d.ts.map +1 -0
  124. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/LinksInput.d.ts +1 -1
  125. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/LinksInput.d.ts.map +1 -1
  126. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/Picker.d.ts.map +1 -1
  127. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/Swatch.d.ts +1 -1
  128. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/Swatch.d.ts.map +1 -1
  129. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/eyedropper.types.d.ts +16 -0
  130. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/eyedropper.types.d.ts.map +1 -0
  131. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/index.d.ts +36 -0
  132. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/index.d.ts.map +1 -0
  133. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/useEyeDropper.d.ts +5 -0
  134. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/useEyeDropper.d.ts.map +1 -0
  135. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColumnWidthsInput.d.ts +1 -1
  136. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColumnWidthsInput.d.ts.map +1 -0
  137. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ContentAligment.d.ts.map +1 -1
  138. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontFamily.d.ts +10 -0
  139. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontFamily.d.ts.map +1 -0
  140. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontSizeInput.d.ts +20 -0
  141. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontSizeInput.d.ts.map +1 -0
  142. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontWeightInput.d.ts +10 -0
  143. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontWeightInput.d.ts.map +1 -0
  144. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/HeightInput.d.ts +4 -1
  145. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/HeightInput.d.ts.map +1 -1
  146. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ImageInput.d.ts +1 -1
  147. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ImageInput.d.ts.map +1 -1
  148. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/InputSizeButton.d.ts +1 -1
  149. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/InputSizeButton.d.ts.map +1 -1
  150. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/InputSizeSelector.d.ts.map +1 -1
  151. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/InputWidth.d.ts +1 -1
  152. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/InputWidth.d.ts.map +1 -1
  153. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/InspectorPillToggleGroup.d.ts +1 -1
  154. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/LabelProperty.d.ts +7 -0
  155. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/LabelProperty.d.ts.map +1 -1
  156. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/LayoutSelectorInput.d.ts +1 -1
  157. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/LayoutSelectorInput.d.ts.map +1 -0
  158. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/LineHeightInput.d.ts.map +1 -1
  159. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/PaddingInput.d.ts +26 -0
  160. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/PaddingInput.d.ts.map +1 -0
  161. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/PropertyLabelWithWarning.d.ts +1 -1
  162. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/RadioGroupInput.d.ts +11 -0
  163. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/RadioGroupInput.d.ts.map +1 -0
  164. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/SelectScreen.d.ts.map +1 -1
  165. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/Shape.d.ts +1 -1
  166. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/Shape.d.ts.map +1 -1
  167. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/SliderInput.d.ts +1 -1
  168. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/SliderInput.d.ts.map +1 -1
  169. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/SocialMediaInput.d.ts.map +1 -0
  170. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/TextAlignInput.d.ts +10 -0
  171. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/TextAlignInput.d.ts.map +1 -0
  172. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/TextDimensionInput.d.ts +1 -1
  173. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/TextDimensionInput.d.ts.map +1 -1
  174. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/TextInput.d.ts +1 -1
  175. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/TextInput.d.ts.map +1 -1
  176. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/WidthInput.d.ts +1 -1
  177. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/WidthInput.d.ts.map +1 -1
  178. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ai-image-generation.d.ts +1 -1
  179. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ai-image-generation.d.ts.map +1 -0
  180. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/CloseButton.d.ts.map +1 -1
  181. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/ErrorDialog.d.ts +1 -1
  182. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/ErrorDialog.d.ts.map +1 -1
  183. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/ImagePreview.d.ts.map +1 -1
  184. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/PromptInput.d.ts.map +1 -1
  185. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/Select.d.ts +1 -1
  186. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/Select.d.ts.map +1 -1
  187. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/SkeletonImage.d.ts.map +1 -1
  188. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/SourceImagePreview.d.ts +30 -0
  189. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/SourceImagePreview.d.ts.map +1 -0
  190. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/hooks.d.ts +1 -1
  191. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/hooks.d.ts.map +1 -1
  192. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/positionIcons.d.ts +22 -0
  193. package/dist/email-builder-standalone/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/positionIcons.d.ts.map +1 -0
  194. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/raw/RawSliderInput.d.ts +1 -1
  195. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/raw/RawSliderInput.d.ts.map +1 -1
  196. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/utils/errorHandling.d.ts.map +1 -1
  197. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/style-inputs/MultiStylePropertyPanel.d.ts +1 -1
  198. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/style-inputs/MultiStylePropertyPanel.d.ts.map +1 -1
  199. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/style-inputs/SingleStylePropertyPanel.d.ts +1 -1
  200. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/style-inputs/SingleStylePropertyPanel.d.ts.map +1 -1
  201. package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/StylesPanel.d.ts.map +1 -1
  202. package/dist/email-builder-standalone/src/App/InspectorDrawer/index.d.ts.map +1 -0
  203. package/dist/{editor-sample → email-builder-standalone}/src/App/SamplesDrawer/SidebarButton.d.ts +1 -1
  204. package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/HtmlPanel.d.ts.map +1 -1
  205. package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/MainTabsGroup.d.ts.map +1 -1
  206. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/ApplyThemeConfirmDialog.d.ts +21 -0
  207. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/ApplyThemeConfirmDialog.d.ts.map +1 -0
  208. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/BlockTypeAccordion.d.ts +22 -0
  209. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/BlockTypeAccordion.d.ts.map +1 -0
  210. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/RenameThemeDialog.d.ts +9 -0
  211. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/RenameThemeDialog.d.ts.map +1 -0
  212. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/ResetButton.d.ts +25 -0
  213. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/ResetButton.d.ts.map +1 -0
  214. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/RootAccordion.d.ts +15 -0
  215. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/RootAccordion.d.ts.map +1 -0
  216. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/SaveThemeDialog.d.ts +17 -0
  217. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/SaveThemeDialog.d.ts.map +1 -0
  218. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/ThemeFieldRow.d.ts +22 -0
  219. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/ThemeFieldRow.d.ts.map +1 -0
  220. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/index.d.ts +19 -0
  221. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/index.d.ts.map +1 -0
  222. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/registry.d.ts +26 -0
  223. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePanel/registry.d.ts.map +1 -0
  224. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePresets/ThemePresetsButton.d.ts +7 -0
  225. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePresets/ThemePresetsButton.d.ts.map +1 -0
  226. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePresets/defaults/index.d.ts +9 -0
  227. package/dist/email-builder-standalone/src/App/TemplatePanel/ThemePresets/defaults/index.d.ts.map +1 -0
  228. package/dist/email-builder-standalone/src/App/TemplatePanel/helper/cleanDocument.d.ts +12 -0
  229. package/dist/email-builder-standalone/src/App/TemplatePanel/helper/cleanDocument.d.ts.map +1 -0
  230. package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/helper/extraFunctions.d.ts +8 -8
  231. package/dist/email-builder-standalone/src/App/TemplatePanel/helper/extraFunctions.d.ts.map +1 -0
  232. package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/helper/formatting.d.ts.map +1 -1
  233. package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/helper/globalsStyles.d.ts.map +1 -1
  234. package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/helper/highlighters.d.ts.map +1 -1
  235. package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/helper/qlcss.d.ts.map +1 -1
  236. package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/index.d.ts.map +1 -1
  237. package/dist/email-builder-standalone/src/App/TemplatePanel/renderToStaticMarkup.d.ts +22 -0
  238. package/dist/email-builder-standalone/src/App/TemplatePanel/renderToStaticMarkup.d.ts.map +1 -0
  239. package/dist/email-builder-standalone/src/App/index.d.ts +22 -0
  240. package/dist/email-builder-standalone/src/App/index.d.ts.map +1 -0
  241. package/dist/email-builder-standalone/src/EmailBuilderStandalone.d.ts +5 -0
  242. package/dist/email-builder-standalone/src/EmailBuilderStandalone.d.ts.map +1 -0
  243. package/dist/email-builder-standalone/src/ShadowDomProvider.d.ts +23 -0
  244. package/dist/email-builder-standalone/src/ShadowDomProvider.d.ts.map +1 -0
  245. package/dist/email-builder-standalone/src/components/ImageSourceTabs.d.ts +32 -0
  246. package/dist/email-builder-standalone/src/components/ImageSourceTabs.d.ts.map +1 -0
  247. package/dist/{editor-sample → email-builder-standalone}/src/components/SampleImageGallery.d.ts.map +1 -1
  248. package/dist/email-builder-standalone/src/components/UnsplashImagePicker/UnsplashCreditLine.d.ts +14 -0
  249. package/dist/email-builder-standalone/src/components/UnsplashImagePicker/UnsplashCreditLine.d.ts.map +1 -0
  250. package/dist/email-builder-standalone/src/components/UnsplashImagePicker/index.d.ts +24 -0
  251. package/dist/email-builder-standalone/src/components/UnsplashImagePicker/index.d.ts.map +1 -0
  252. package/dist/email-builder-standalone/src/components/UnsplashImagePicker/unsplash-api.d.ts +84 -0
  253. package/dist/email-builder-standalone/src/components/UnsplashImagePicker/unsplash-api.d.ts.map +1 -0
  254. package/dist/{editor-sample → email-builder-standalone}/src/constants.d.ts.map +1 -1
  255. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/ColumnsContainer/ColumnsContainerEditor.d.ts.map +1 -1
  256. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/ColumnsContainer/ColumnsContainerPropsSchema.d.ts +90 -90
  257. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/ColumnsContainer/ColumnsContainerPropsSchema.d.ts.map +1 -1
  258. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/Container/ContainerPropsSchema.d.ts +126 -126
  259. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/Container/ContainerPropsSchema.d.ts.map +1 -1
  260. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/EmailLayout/EmailLayoutPropsSchema.d.ts +44 -4
  261. package/dist/email-builder-standalone/src/documents/blocks/EmailLayout/EmailLayoutPropsSchema.d.ts.map +1 -0
  262. package/dist/email-builder-standalone/src/documents/blocks/customHooks/useParentImageWidth.d.ts.map +1 -0
  263. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/BlockButton.d.ts +1 -1
  264. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/BlocksMenu.d.ts.map +1 -1
  265. package/dist/email-builder-standalone/src/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/buttons.d.ts +34 -0
  266. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/buttons.d.ts.map +1 -1
  267. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/index.d.ts.map +1 -1
  268. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/EditorChildrenIds/EditorChildrenNoDragable.d.ts.map +1 -1
  269. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/EditorChildrenIds/index.d.ts.map +1 -1
  270. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/TStyle.d.ts.map +1 -1
  271. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/block-wrappers/EditorBlockWrapper.d.ts +1 -1
  272. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/block-wrappers/EditorBlockWrapper.d.ts.map +1 -1
  273. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/block-wrappers/ReaderBlockWrapper.d.ts +1 -1
  274. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/block-wrappers/TuneMenu.d.ts +1 -1
  275. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/block-wrappers/TuneMenu.d.ts.map +1 -1
  276. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/changeWidth.d.ts.map +1 -1
  277. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/constants.d.ts.map +1 -1
  278. package/dist/email-builder-standalone/src/documents/blocks/helpers/fontFamily.d.ts.map +1 -0
  279. package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/zod.d.ts +4 -4
  280. package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/ClientOnly.d.ts +1 -1
  281. package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/EJEMPLO_USO_GRANULAR.d.ts +1 -1
  282. package/dist/email-builder-standalone/src/documents/editor/EJEMPLO_USO_GRANULAR.d.ts.map +1 -0
  283. package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/EditorBlock.d.ts +1 -1
  284. package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/EditorBlock.d.ts.map +1 -1
  285. package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/EditorContext.d.ts +1063 -852
  286. package/dist/email-builder-standalone/src/documents/editor/EditorContext.d.ts.map +1 -0
  287. package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/blockHooks.d.ts.map +1 -1
  288. package/dist/email-builder-standalone/src/documents/editor/blockSelectors.d.ts.map +1 -0
  289. package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/blockUpdaters.d.ts.map +1 -1
  290. package/dist/email-builder-standalone/src/documents/editor/classifyBlockSubtree.d.ts +11 -0
  291. package/dist/email-builder-standalone/src/documents/editor/classifyBlockSubtree.d.ts.map +1 -0
  292. package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/componentTreeColumnSlot.d.ts.map +1 -1
  293. package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/core.d.ts +2039 -2120
  294. package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/core.d.ts.map +1 -1
  295. package/dist/email-builder-standalone/src/documents/editor/migrateDocument.d.ts +15 -0
  296. package/dist/email-builder-standalone/src/documents/editor/migrateDocument.d.ts.map +1 -0
  297. package/dist/email-builder-standalone/src/documents/editor/unsplashCreditsStore.d.ts +15 -0
  298. package/dist/email-builder-standalone/src/documents/editor/unsplashCreditsStore.d.ts.map +1 -0
  299. package/dist/email-builder-standalone/src/getConfiguration/sample/empty-email-message.d.ts +19 -0
  300. package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/empty-email-message.d.ts.map +1 -1
  301. package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/one-time-passcode.d.ts.map +1 -1
  302. package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/order-ecommerce.d.ts.map +1 -1
  303. package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/post-metrics-report.d.ts.map +1 -1
  304. package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/reservation-reminder.d.ts.map +1 -1
  305. package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/reset-password.d.ts.map +1 -1
  306. package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/subscription-receipt.d.ts.map +1 -1
  307. package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/test-load-json.d.ts.map +1 -1
  308. package/dist/{editor-sample → email-builder-standalone}/src/i18n.d.ts +1 -1
  309. package/dist/email-builder-standalone/src/i18n.d.ts.map +1 -0
  310. package/dist/email-builder-standalone/src/index.d.ts +164 -0
  311. package/dist/email-builder-standalone/src/index.d.ts.map +1 -0
  312. package/dist/email-builder-standalone/src/locales/en-US/aiWizard.json.d.ts +140 -0
  313. package/dist/{editor-sample → email-builder-standalone}/src/locales/en-US/common.json.d.ts +43 -43
  314. package/dist/email-builder-standalone/src/locales/en-US/inspector.json.d.ts +558 -0
  315. package/dist/email-builder-standalone/src/locales/es-419/aiWizard.json.d.ts +140 -0
  316. package/dist/{editor-sample → email-builder-standalone}/src/locales/es-419/common.json.d.ts +43 -43
  317. package/dist/email-builder-standalone/src/locales/es-419/inspector.json.d.ts +558 -0
  318. package/dist/email-builder-standalone/src/locales/it-IT/aiWizard.json.d.ts +140 -0
  319. package/dist/{editor-sample → email-builder-standalone}/src/locales/it-IT/common.json.d.ts +43 -43
  320. package/dist/email-builder-standalone/src/locales/it-IT/inspector.json.d.ts +558 -0
  321. package/dist/email-builder-standalone/src/standalone.d.ts +4 -0
  322. package/dist/email-builder-standalone/src/standalone.d.ts.map +1 -0
  323. package/dist/{editor-sample → email-builder-standalone}/src/theme.d.ts +1 -1
  324. package/dist/{editor-sample → email-builder-standalone}/src/theme.d.ts.map +1 -1
  325. package/dist/index.cjs +342 -313
  326. package/dist/index.d.ts +3 -3
  327. package/dist/index.mjs +71392 -71343
  328. package/dist/standalone.js +1401 -0
  329. package/dist/standalone.mjs +159706 -0
  330. package/dist/style.css +1 -1
  331. package/package.json +34 -15
  332. package/vite.config.standalone.ts +106 -0
  333. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/index.d.ts.map +0 -1
  334. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/EmailLayoutSidebarPanel.d.ts.map +0 -1
  335. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/HeadingSidebarPanel.d.ts +0 -8
  336. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/HeadingSidebarPanel.d.ts.map +0 -1
  337. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/HtmlSidebarPanel.d.ts +0 -8
  338. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/HtmlSidebarPanel.d.ts.map +0 -1
  339. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/SocialSidebarPanel.d.ts.map +0 -1
  340. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/containers/Wrapper.d.ts.map +0 -1
  341. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/BorderInput.d.ts.map +0 -1
  342. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/BaseColorInput.d.ts +0 -16
  343. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/BaseColorInput.d.ts.map +0 -1
  344. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/index.d.ts +0 -16
  345. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/index.d.ts.map +0 -1
  346. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColumnWidthsInput.d.ts.map +0 -1
  347. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontFamily.d.ts +0 -8
  348. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontFamily.d.ts.map +0 -1
  349. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontSizeInput.d.ts +0 -11
  350. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontSizeInput.d.ts.map +0 -1
  351. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontWeightInput.d.ts +0 -8
  352. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontWeightInput.d.ts.map +0 -1
  353. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/LabelProperty.d.ts +0 -6
  354. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/LayoutSelectorInput.d.ts.map +0 -1
  355. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/PaddingInput.d.ts +0 -17
  356. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/PaddingInput.d.ts.map +0 -1
  357. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/RadioGroupInput.d.ts +0 -10
  358. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/RadioGroupInput.d.ts.map +0 -1
  359. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/SocialMediaInput.d.ts.map +0 -1
  360. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/TextAlignInput.d.ts +0 -8
  361. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/TextAlignInput.d.ts.map +0 -1
  362. package/dist/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ai-image-generation.d.ts.map +0 -1
  363. package/dist/editor-sample/src/App/InspectorDrawer/index.d.ts.map +0 -1
  364. package/dist/editor-sample/src/App/TemplatePanel/CustomReader/CustomReader.d.ts +0 -10
  365. package/dist/editor-sample/src/App/TemplatePanel/CustomReader/CustomReader.d.ts.map +0 -1
  366. package/dist/editor-sample/src/App/TemplatePanel/helper/cleanDocument.d.ts +0 -9
  367. package/dist/editor-sample/src/App/TemplatePanel/helper/cleanDocument.d.ts.map +0 -1
  368. package/dist/editor-sample/src/App/TemplatePanel/helper/extraFunctions.d.ts.map +0 -1
  369. package/dist/editor-sample/src/App/TemplatePanel/renderToStaticMarkup.d.ts +0 -7
  370. package/dist/editor-sample/src/App/TemplatePanel/renderToStaticMarkup.d.ts.map +0 -1
  371. package/dist/editor-sample/src/App/index.d.ts +0 -17
  372. package/dist/editor-sample/src/App/index.d.ts.map +0 -1
  373. package/dist/editor-sample/src/documents/blocks/EmailLayout/EmailLayoutPropsSchema.d.ts.map +0 -1
  374. package/dist/editor-sample/src/documents/blocks/customHooks/useParentImageWidth.d.ts.map +0 -1
  375. package/dist/editor-sample/src/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/buttons.d.ts +0 -10
  376. package/dist/editor-sample/src/documents/blocks/helpers/fontFamily.d.ts.map +0 -1
  377. package/dist/editor-sample/src/documents/editor/EJEMPLO_USO_GRANULAR.d.ts.map +0 -1
  378. package/dist/editor-sample/src/documents/editor/EditorContext.d.ts.map +0 -1
  379. package/dist/editor-sample/src/documents/editor/blockSelectors.d.ts.map +0 -1
  380. package/dist/editor-sample/src/documents/editor/migrateDocument.d.ts +0 -7
  381. package/dist/editor-sample/src/documents/editor/migrateDocument.d.ts.map +0 -1
  382. package/dist/editor-sample/src/getConfiguration/sample/empty-email-message.d.ts +0 -5
  383. package/dist/editor-sample/src/i18n.d.ts.map +0 -1
  384. package/dist/editor-sample/src/index.d.ts +0 -57
  385. package/dist/editor-sample/src/index.d.ts.map +0 -1
  386. package/dist/editor-sample/src/locales/en-US/inspector.json.d.ts +0 -259
  387. package/dist/editor-sample/src/locales/es-419/inspector.json.d.ts +0 -258
  388. package/dist/editor-sample/src/locales/it-IT/inspector.json.d.ts +0 -258
  389. /package/dist/{editor-sample → email-builder-standalone}/src/App/ComponentTree/ComponentTreePanel.d.ts +0 -0
  390. /package/dist/{editor-sample → email-builder-standalone}/src/App/ComponentTree/ToggleComponentTreeButton.d.ts +0 -0
  391. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/ButtonSidebarPanel.d.ts +0 -0
  392. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/ColumnsContainerSidebarPanel.d.ts +0 -0
  393. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/ContainerSidebarPanel.d.ts +0 -0
  394. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/DividerSidebarPanel.d.ts +0 -0
  395. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/ImageSidebarPanel.d.ts +0 -0
  396. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/NotionTextSidebarPanel.d.ts +0 -0
  397. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/SocialSidebarPanel.d.ts +0 -0
  398. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/SpacerSidebarPanel.d.ts +0 -0
  399. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/BaseSidebarPanel.d.ts.map +0 -0
  400. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/containers/StickyWrapper.d.ts +0 -0
  401. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/BooleanInput.d.ts +0 -0
  402. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/Picker.d.ts +0 -0
  403. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ContentAligment.d.ts +0 -0
  404. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/InputSizeSelector.d.ts +0 -0
  405. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/InspectorPillToggleGroup.d.ts.map +0 -0
  406. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/LineHeightInput.d.ts +0 -0
  407. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/PropertyLabelWithWarning.d.ts.map +0 -0
  408. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/SelectScreen.d.ts +0 -0
  409. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/SocialMediaInput.d.ts +0 -0
  410. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/WarningIcon.d.ts +0 -0
  411. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/WarningIcon.d.ts.map +0 -0
  412. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/CloseButton.d.ts +0 -0
  413. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/ImagePreview.d.ts +0 -0
  414. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/PromptInput.d.ts +0 -0
  415. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/SkeletonImage.d.ts +0 -0
  416. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/inputStyles.d.ts +0 -0
  417. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/components/inputStyles.d.ts.map +0 -0
  418. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/types/errors.d.ts +0 -0
  419. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/types/errors.d.ts.map +0 -0
  420. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/utils/errorHandling.d.ts +0 -0
  421. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/StylesPanel.d.ts +0 -0
  422. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ToggleInspectorPanelButton.d.ts +0 -0
  423. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/ToggleInspectorPanelButton.d.ts.map +0 -0
  424. /package/dist/{editor-sample → email-builder-standalone}/src/App/InspectorDrawer/index.d.ts +0 -0
  425. /package/dist/{editor-sample → email-builder-standalone}/src/App/SamplesDrawer/SidebarButton.d.ts.map +0 -0
  426. /package/dist/{editor-sample → email-builder-standalone}/src/App/SamplesDrawer/ToggleSamplesPanelButton.d.ts +0 -0
  427. /package/dist/{editor-sample → email-builder-standalone}/src/App/SamplesDrawer/ToggleSamplesPanelButton.d.ts.map +0 -0
  428. /package/dist/{editor-sample → email-builder-standalone}/src/App/SamplesDrawer/index.d.ts +0 -0
  429. /package/dist/{editor-sample → email-builder-standalone}/src/App/SamplesDrawer/index.d.ts.map +0 -0
  430. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/DownloadJson/index.d.ts +0 -0
  431. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/DownloadJson/index.d.ts.map +0 -0
  432. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/HtmlPanel.d.ts +0 -0
  433. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/ImportJson/ImportJsonDialog.d.ts +0 -0
  434. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/ImportJson/ImportJsonDialog.d.ts.map +0 -0
  435. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/ImportJson/index.d.ts +0 -0
  436. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/ImportJson/index.d.ts.map +0 -0
  437. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/ImportJson/validateJsonStringValue.d.ts +0 -0
  438. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/ImportJson/validateJsonStringValue.d.ts.map +0 -0
  439. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/JsonPanel.d.ts +0 -0
  440. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/JsonPanel.d.ts.map +0 -0
  441. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/MainTabsGroup.d.ts +0 -0
  442. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/ShareButton.d.ts +0 -0
  443. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/ShareButton.d.ts.map +0 -0
  444. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/helper/HighlightedCodePanel.d.ts +0 -0
  445. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/helper/HighlightedCodePanel.d.ts.map +0 -0
  446. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/helper/formatting.d.ts +0 -0
  447. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/helper/globalsStyles.d.ts +0 -0
  448. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/helper/highlighters.d.ts +0 -0
  449. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/helper/qlcss.d.ts +0 -0
  450. /package/dist/{editor-sample → email-builder-standalone}/src/App/TemplatePanel/index.d.ts +0 -0
  451. /package/dist/{editor-sample → email-builder-standalone}/src/components/SampleImageGallery.d.ts +0 -0
  452. /package/dist/{editor-sample → email-builder-standalone}/src/constants.d.ts +0 -0
  453. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/ColumnsContainer/ColumnsContainerEditor.d.ts +0 -0
  454. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/Container/ContainerEditor.d.ts +0 -0
  455. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/Container/ContainerEditor.d.ts.map +0 -0
  456. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/EmailLayout/EmailLayoutEditor.d.ts +0 -0
  457. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/EmailLayout/EmailLayoutEditor.d.ts.map +0 -0
  458. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/customHooks/useParentImageWidth.d.ts +0 -0
  459. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/BlockButton.d.ts.map +0 -0
  460. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/BlocksMenu.d.ts +0 -0
  461. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/DividerButton.d.ts +0 -0
  462. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/DividerButton.d.ts.map +0 -0
  463. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/PlaceholderButton.d.ts +0 -0
  464. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/PlaceholderButton.d.ts.map +0 -0
  465. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/index.d.ts +0 -0
  466. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/EditorChildrenIds/EditorChildrenNoDragable.d.ts +0 -0
  467. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/EditorChildrenIds/index.d.ts +0 -0
  468. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/TStyle.d.ts +0 -0
  469. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/block-wrappers/ReaderBlockWrapper.d.ts.map +0 -0
  470. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/changeWidth.d.ts +0 -0
  471. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/constants.d.ts +0 -0
  472. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/fontFamily.d.ts +0 -0
  473. /package/dist/{editor-sample → email-builder-standalone}/src/documents/blocks/helpers/zod.d.ts.map +0 -0
  474. /package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/ClientOnly.d.ts.map +0 -0
  475. /package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/UndoRedoStore.d.ts +0 -0
  476. /package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/UndoRedoStore.d.ts.map +0 -0
  477. /package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/blockHooks.d.ts +0 -0
  478. /package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/blockSelectors.d.ts +0 -0
  479. /package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/blockUpdaters.d.ts +0 -0
  480. /package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/componentTreeColumnSlot.d.ts +0 -0
  481. /package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/granular.d.ts +0 -0
  482. /package/dist/{editor-sample → email-builder-standalone}/src/documents/editor/granular.d.ts.map +0 -0
  483. /package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/index.d.ts +0 -0
  484. /package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/index.d.ts.map +0 -0
  485. /package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/gallery-test.d.ts +0 -0
  486. /package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/gallery-test.d.ts.map +0 -0
  487. /package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/one-time-passcode.d.ts +0 -0
  488. /package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/order-ecommerce.d.ts +0 -0
  489. /package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/post-metrics-report.d.ts +0 -0
  490. /package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/reservation-reminder.d.ts +0 -0
  491. /package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/reset-password.d.ts +0 -0
  492. /package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/respond-to-message.d.ts +0 -0
  493. /package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/respond-to-message.d.ts.map +0 -0
  494. /package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/subscription-receipt.d.ts +0 -0
  495. /package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/test-load-json.d.ts +0 -0
  496. /package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/welcome.d.ts +0 -0
  497. /package/dist/{editor-sample → email-builder-standalone}/src/getConfiguration/sample/welcome.d.ts.map +0 -0
  498. /package/dist/{editor-sample → email-builder-standalone}/src/utils/useDebounce.d.ts +0 -0
  499. /package/dist/{editor-sample → email-builder-standalone}/src/utils/useDebounce.d.ts.map +0 -0
package/README.md CHANGED
@@ -1,789 +1,792 @@
1
- # email-builder-online
2
-
3
- Powerful, modern email builder with drag-and-drop blocks, live preview, and HTML export. Built with React and Material UI, distributed as a React component and as a Web Component so it can be embedded in other frameworks (Nuxt 3, Next.js, SvelteKit, etc.). Compatible with React 18 and 19.
4
-
5
- 🚀 **[Live Demo](https://emailbuilder.online/)**
6
-
7
- ## Features
8
-
9
- - **Drag-and-drop blocks**: Text (Rich Text Editor), Heading, Image, Button, Columns, Divider, Spacer, HTML, Social Media, Container
10
- - **Editor and Preview tabs** with responsive screen sizes (Desktop/Mobile)
11
- - **Undo/Redo** and keyboard shortcuts
12
- - **HTML export** and copy-to-clipboard helpers
13
- - **CSS size guard** for email client compatibility
14
- - **Dark mode** support
15
- - **AI features** for text (rewrite, grammar, continue, tone) and image generation
16
- - **Image gallery** integration with custom image provider support
17
- - **Internationalization (i18n)** with English, Spanish, and Italian support
18
- - **Works as React component or Web Component** - embed in any framework (Nuxt 3, Next.js, SvelteKit, Vue, etc.)
19
- - **Built with TypeScript** for better developer experience
20
- - **Responsive design** that works on mobile and desktop
21
-
22
- ## Installation
23
-
24
- Install the package:
25
-
26
- ```bash
27
- npm i email-builder-online
28
- # or
29
- yarn add email-builder-online
30
- # or
31
- pnpm add email-builder-online
32
- ```
33
-
34
- > **Note:** All dependencies (React, Material UI, i18n, drag-and-drop, etc.) are bundled with the package — no extra installs needed.
35
-
36
- ### Peer dependencies (React / React-DOM)
37
-
38
- **`react` and `react-dom` must be the same major/minor version** (e.g. both 18.x or both 19.x). Mixing versions (e.g. react@18 with react-dom@19) can cause runtime errors such as "Cannot read properties of undefined (reading 'S')".
39
-
40
- If your project uses **Vite**, add this to your `vite.config` to avoid multiple instances of React (recommended on Windows and in monorepos):
41
-
42
- ```ts
43
- export default defineConfig({
44
- resolve: {
45
- dedupe: ['react', 'react-dom', 'react-dom/client'],
46
- },
47
- // ...
48
- });
49
- ```
50
-
51
- Add the stylesheet (required):
52
-
53
- ```ts
54
- // React / Vite / Nuxt / Next
55
- import 'email-builder-online/style.css';
56
- ```
57
-
58
- ## AI Features
59
-
60
- The builder supports AI-powered features for both text and image blocks, controlled by a single `enableAI` prop.
61
-
62
- ### Text AI
63
-
64
- When `enableAI` is `true`, the rich text editor (NotionText) shows AI actions in the bubble menu toolbar and slash menu:
65
- - Rewrite, grammar check, continue writing
66
- - Tone adjustments: shorter, descriptive, detailed, friendly, professional
67
-
68
- Text AI uses the `onAIRequest` callback to process requests. You provide the backend integration:
69
-
70
- ```tsx
71
- <EmailBuilder
72
- enableAI={true}
73
- onAIRequest={async ({ text, content, action, blockId }) => {
74
- const response = await fetch('/api/ai', {
75
- method: 'POST',
76
- body: JSON.stringify({ text, content, action }),
77
- headers: { 'Content-Type': 'application/json' },
78
- });
79
- const data = await response.json();
80
- return data.processedContent;
81
- }}
82
- />
83
- ```
84
-
85
- ### Image AI Generation
86
-
87
- When `enableAI` is `true`, image blocks and background image inputs show a "Generate with AI" button that opens a dialog for prompt-based image generation.
88
-
89
- #### Events
90
-
91
- The image AI generation uses a custom event system:
92
-
93
- **`request-ai-image`** - Fired when the user submits a prompt to generate an image
94
-
95
- ```tsx
96
- window.addEventListener('request-ai-image', (event: CustomEvent) => {
97
- const prompt = event.detail; // string: the user's prompt
98
-
99
- // Call your AI image generation API
100
- const imageUrl = await generateImage(prompt);
101
-
102
- // Respond with the generated image
103
- window.dispatchEvent(
104
- new CustomEvent('generated-image', {
105
- detail: { url: imageUrl, success: true },
106
- })
107
- );
108
- });
109
- ```
110
-
111
- **`store-ai-image`** - Fired when the user confirms and inserts the generated image
112
-
113
- ```tsx
114
- window.addEventListener('store-ai-image', (event: CustomEvent) => {
115
- const imageUrl = event.detail; // string: URL of the image to store
116
- // Persist the image to your storage if needed
117
- });
118
- ```
119
-
120
- **`generated-image`** - Dispatch this event to return the generated image to the builder
121
-
122
- ```tsx
123
- // Success
124
- window.dispatchEvent(
125
- new CustomEvent('generated-image', {
126
- detail: { url: 'https://example.com/generated.png', success: true },
127
- })
128
- );
129
-
130
- // Error
131
- window.dispatchEvent(
132
- new CustomEvent('generated-image', {
133
- detail: { url: null, success: false, error: { code: 500, message: 'Generation failed' } },
134
- })
135
- );
136
- ```
137
-
138
- ## Custom Image Provider
139
-
140
- You can integrate your own image selector/gallery by passing a React component through the `customImageProvider` prop. This component will be rendered at the top of the image input panel, allowing users to select images from your custom source.
141
-
142
- ### Events
143
-
144
- The custom image provider can listen to and dispatch the following events:
145
-
146
- #### Listening to Events
147
-
148
- **`email-builder-image-panel-opened`** - Fired when an Image block is selected/opened in the editor
149
-
150
- ```tsx
151
- window.addEventListener('email-builder-image-panel-opened', (event: CustomEvent) => {
152
- const { blockId, currentImageUrl, alt } = event.detail;
153
- // You can use this to highlight the current image in your gallery
154
- // or load additional data based on the current selection
155
- });
156
- ```
157
-
158
- Event detail properties:
159
-
160
- - `blockId` (string): The ID of the selected image block
161
- - `currentImageUrl` (string | null): The URL of the currently selected image, or null if no image is set
162
- - `alt` (string | null): The alt text of the current image, or null if not set
163
-
164
- #### Dispatching Events
165
-
166
- **`email-builder-set-image`** - Dispatch this event to set an image in the currently selected block
167
-
168
- ```tsx
169
- window.dispatchEvent(
170
- new CustomEvent('email-builder-set-image', {
171
- detail: imageUrl, // string: URL of the image to set
172
- })
173
- );
174
- ```
175
-
176
- ### Complete Example
177
-
178
- ```tsx
179
- import React, { useEffect, useState } from 'react';
180
- import { EmailBuilder } from 'email-builder-online';
181
-
182
- function MyImageGallery() {
183
- const [currentImageUrl, setCurrentImageUrl] = useState<string | null>(null);
184
-
185
- useEffect(() => {
186
- // Listen for when the image panel opens
187
- const handlePanelOpened = (event: CustomEvent) => {
188
- const { currentImageUrl } = event.detail;
189
- setCurrentImageUrl(currentImageUrl);
190
- };
191
-
192
- window.addEventListener('email-builder-image-panel-opened', handlePanelOpened);
193
-
194
- return () => {
195
- window.removeEventListener('email-builder-image-panel-opened', handlePanelOpened);
196
- };
197
- }, []);
198
-
199
- const handleImageSelect = (imageUrl: string) => {
200
- // Dispatch event to set the image
201
- window.dispatchEvent(
202
- new CustomEvent('email-builder-set-image', {
203
- detail: imageUrl,
204
- })
205
- );
206
- };
207
-
208
- return (
209
- <div>
210
- <h4>My Custom Gallery</h4>
211
- {currentImageUrl && <p style={{ fontSize: '12px', color: '#666' }}>Current: {currentImageUrl}</p>}
212
- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: '8px' }}>
213
- <img
214
- src="https://example.com/image1.jpg"
215
- onClick={() => handleImageSelect('https://example.com/image1.jpg')}
216
- style={{
217
- cursor: 'pointer',
218
- width: '100%',
219
- border: currentImageUrl === 'https://example.com/image1.jpg' ? '2px solid blue' : 'none',
220
- }}
221
- />
222
- {/* More images... */}
223
- </div>
224
- </div>
225
- );
226
- }
227
-
228
- export default function Page() {
229
- return (
230
- <EmailBuilder
231
- customImageProvider={<MyImageGallery />}
232
- // ... other props
233
- />
234
- );
235
- }
236
- ```
237
-
238
- > **Live Example**: Check out the working implementation in `packages/editor-sample/src/components/SampleImageGallery.tsx` and see it in action in the demo app.
239
-
240
- ## Custom Merge Tags
241
-
242
- You can provide your own merge tags that will appear in the text editor's merge tag menu. Pass an array of tags or a complete group configuration:
243
-
244
- ### Simple Array of Tags
245
-
246
- ```tsx
247
- import { EmailBuilder, MergeTag } from 'email-builder-online';
248
-
249
- const myMergeTags: MergeTag[] = [
250
- {
251
- label: 'First Name',
252
- value: '[first_name]',
253
- },
254
- {
255
- label: 'Last Name',
256
- value: '[last_name]',
257
- },
258
- {
259
- label: 'Company',
260
- value: '[company]',
261
- },
262
- {
263
- type: 'divider', // Add a divider
264
- },
265
- {
266
- label: 'Custom Link',
267
- value: '{custom_link}Click here{/custom_link}',
268
- },
269
- ];
270
-
271
- export default function Page() {
272
- return (
273
- <EmailBuilder
274
- mergeTags={myMergeTags}
275
- // ... other props
276
- />
277
- );
278
- }
279
- ```
280
-
281
- ### Complete Group with Custom Icons
282
-
283
- ```tsx
284
- import { EmailBuilder, MergeTagGroup } from 'email-builder-online';
285
- import { User, Building, Mail } from 'lucide-react'; // or any icon library
286
-
287
- const myMergeTagGroup: MergeTagGroup = {
288
- label: 'My Custom Tags',
289
- icon: <Mail />,
290
- children: [
291
- {
292
- label: 'First Name',
293
- value: '[first_name]',
294
- icon: <User />,
295
- },
296
- {
297
- label: 'Company Name',
298
- value: '[company]',
299
- icon: <Building />,
300
- },
301
- {
302
- type: 'divider',
303
- },
304
- {
305
- label: 'Verification Link',
306
- value: '{verify}Verify Account{/verify}',
307
- icon: <Mail />,
308
- },
309
- ],
310
- };
311
-
312
- export default function Page() {
313
- return (
314
- <EmailBuilder
315
- mergeTags={myMergeTagGroup}
316
- // ... other props
317
- />
318
- );
319
- }
320
- ```
321
-
322
- ## Programmatic Image Loading
323
-
324
- You can load images programmatically using the ref:
325
-
326
- ```tsx
327
- import { useRef } from 'react';
328
- import { EmailBuilder, EmailBuilderRef } from 'email-builder-online';
329
-
330
- export default function Page() {
331
- const emailBuilderRef = useRef<EmailBuilderRef>(null);
332
-
333
- const handleSelectFromMyGallery = (imageUrl: string, blockId: string) => {
334
- // Set image URL for a specific block
335
- emailBuilderRef.current?.setImageUrl(blockId, imageUrl);
336
- };
337
-
338
- return (
339
- <EmailBuilder
340
- ref={emailBuilderRef}
341
- customImageProvider={<MyCustomGallery onSelect={handleSelectFromMyGallery} />}
342
- />
343
- );
344
- }
345
- ```
346
-
347
- ### Using with Custom Image Provider Events
348
-
349
- You can combine the ref approach with the event system for a more robust solution:
350
-
351
- ```tsx
352
- import { useRef, useEffect, useState } from 'react';
353
- import { EmailBuilder, EmailBuilderRef } from 'email-builder-online';
354
-
355
- function MyCustomGallery() {
356
- const [currentBlockId, setCurrentBlockId] = useState<string | null>(null);
357
- const [currentImageUrl, setCurrentImageUrl] = useState<string | null>(null);
358
-
359
- useEffect(() => {
360
- const handlePanelOpened = (event: CustomEvent) => {
361
- const { blockId, currentImageUrl } = event.detail;
362
- setCurrentBlockId(blockId);
363
- setCurrentImageUrl(currentImageUrl);
364
- };
365
-
366
- window.addEventListener('email-builder-image-panel-opened', handlePanelOpened);
367
- return () => window.removeEventListener('email-builder-image-panel-opened', handlePanelOpened);
368
- }, []);
369
-
370
- const handleImageSelect = (imageUrl: string) => {
371
- // Use the event system to set the image
372
- window.dispatchEvent(
373
- new CustomEvent('email-builder-set-image', {
374
- detail: imageUrl,
375
- })
376
- );
377
- };
378
-
379
- return (
380
- <div>
381
- <h4>Select Image</h4>
382
- {currentImageUrl && <p>Current: {currentImageUrl}</p>}
383
- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: '8px' }}>
384
- {/* Your image gallery */}
385
- </div>
386
- </div>
387
- );
388
- }
389
-
390
- export default function Page() {
391
- const emailBuilderRef = useRef<EmailBuilderRef>(null);
392
-
393
- // Alternative: Use ref method directly
394
- const handleSelectFromGallery = (imageUrl: string, blockId: string) => {
395
- emailBuilderRef.current?.setImageUrl(blockId, imageUrl);
396
- };
397
-
398
- return <EmailBuilder ref={emailBuilderRef} customImageProvider={<MyCustomGallery />} />;
399
- }
400
- ```
401
-
402
- ## Available Blocks
403
-
404
- The email builder includes the following drag-and-drop blocks:
405
-
406
- - **Text** - Rich text editor with formatting options (uses CustomEditor)
407
- - **Notion Text** - Advanced rich text editor with Notion-like editing experience
408
- - **WYSIWYG** - What-You-See-Is-What-You-Get rich text editor
409
- - **Heading** - Heading block for titles and subtitles
410
- - **Image** - Image block with link support
411
- - **Button** - Call-to-action button with customizable styling
412
- - **Columns** - Multi-column layout container
413
- - **Divider** - Horizontal divider/separator line
414
- - **Spacer** - Vertical spacing block
415
- - **Avatar** - Profile picture/avatar image
416
- - **HTML** - Raw HTML block for custom code
417
- - **Social Media** - Social media icons with links
418
- - **Container** - Container block for grouping content
419
-
420
- ## Backward Compatibility
421
-
422
- The email builder automatically migrates legacy blocks to ensure compatibility with older templates:
423
-
424
- - **CustomEditor blocks** Automatically converted to **NotionText**
425
- - **Wysiwyg blocks** → Automatically converted to **NotionText**
426
- - **Avatar blocks** → Automatically converted to **Image** (circular style maps to pill shape)
427
-
428
- This migration happens automatically when loading a document, so templates created before the introduction of the NotionText block will continue to work seamlessly. The migration preserves all content and styling while enabling the new editing features.
429
-
430
- ## Usage
431
-
432
- There are three ways to use the builder:
433
-
434
- ### 1) As a React component with Ref (recommended for programmatic control)
435
-
436
- Use a ref to control saving and access the document programmatically:
437
-
438
- ```tsx
439
- import React, { useRef, useState, useEffect } from 'react';
440
- import { EmailBuilder, EmailBuilderRef, TEditorConfiguration, MergeTag } from 'email-builder-online';
441
- import 'email-builder-online/style.css';
442
-
443
- // Custom Image Gallery Component
444
- function MyImageGallery() {
445
- const images = ['https://example.com/image1.jpg', 'https://example.com/image2.jpg', 'https://example.com/image3.jpg'];
446
-
447
- const handleImageSelect = (imageUrl: string) => {
448
- window.dispatchEvent(
449
- new CustomEvent('email-builder-set-image', {
450
- detail: imageUrl,
451
- })
452
- );
453
- };
454
-
455
- return (
456
- <div>
457
- <h4>My Custom Gallery</h4>
458
- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: '8px' }}>
459
- {images.map((img, idx) => (
460
- <img
461
- key={idx}
462
- src={img}
463
- onClick={() => handleImageSelect(img)}
464
- style={{ cursor: 'pointer', width: '100%', borderRadius: '4px' }}
465
- />
466
- ))}
467
- </div>
468
- </div>
469
- );
470
- }
471
-
472
- // Custom Merge Tags
473
- const customMergeTags: MergeTag[] = [
474
- {
475
- label: 'First Name',
476
- value: '[first_name]',
477
- },
478
- {
479
- label: 'Last Name',
480
- value: '[last_name]',
481
- },
482
- {
483
- label: 'Company',
484
- value: '[company]',
485
- },
486
- {
487
- type: 'divider',
488
- },
489
- {
490
- label: 'Verification Link',
491
- value: '{verify}Verify your account{/verify}',
492
- },
493
- ];
494
-
495
- export default function Page() {
496
- const emailBuilderRef = useRef<EmailBuilderRef>(null);
497
- const [document, setDocument] = useState<TEditorConfiguration | null>(null);
498
-
499
- // Load saved document on mount
500
- useEffect(() => {
501
- const saved = localStorage.getItem('draft');
502
- if (saved) {
503
- setDocument(JSON.parse(saved));
504
- }
505
- }, []);
506
-
507
- const handleSave = () => {
508
- if (emailBuilderRef.current) {
509
- const document = emailBuilderRef.current.save();
510
- // Send to your backend
511
- fetch('/api/save', {
512
- method: 'POST',
513
- body: JSON.stringify(document),
514
- headers: { 'Content-Type': 'application/json' },
515
- });
516
- }
517
- };
518
-
519
- const handleExportHtml = () => {
520
- if (emailBuilderRef.current) {
521
- const html = emailBuilderRef.current.getHtml();
522
- // Download HTML file or send to backend
523
- const blob = new Blob([html], { type: 'text/html' });
524
- const url = URL.createObjectURL(blob);
525
- const a = document.createElement('a');
526
- a.href = url;
527
- a.download = 'email.html';
528
- a.click();
529
- URL.revokeObjectURL(url);
530
- }
531
- };
532
-
533
- const handleSendEmail = async () => {
534
- if (emailBuilderRef.current) {
535
- const html = emailBuilderRef.current.getHtml();
536
- // Send email via your backend
537
- await fetch('/api/send-email', {
538
- method: 'POST',
539
- body: JSON.stringify({ html }),
540
- headers: { 'Content-Type': 'application/json' },
541
- });
542
- }
543
- };
544
-
545
- return (
546
- <div style={{ height: '100vh' }}>
547
- <button onClick={handleSave}>Save</button>
548
- <button onClick={handleExportHtml}>Export HTML</button>
549
- <button onClick={handleSendEmail}>Send Email</button>
550
- <EmailBuilder
551
- ref={emailBuilderRef}
552
- data={document}
553
- onAutoSave={(doc) => localStorage.setItem('draft', JSON.stringify(doc))}
554
- customImageProvider={<MyImageGallery />}
555
- mergeTags={customMergeTags}
556
- primaryColor="#0d9488"
557
- secondaryColor="#0ea5a6"
558
- locale="en"
559
- height="calc(100vh - 80px)"
560
- />
561
- </div>
562
- );
563
- }
564
- ```
565
-
566
- **Ref Methods:**
567
-
568
- The `EmailBuilderRef` exposes the following methods:
569
-
570
- - `getDocument(): TEditorConfiguration` - Returns the current editor document
571
- - `setDocument(document: TEditorConfiguration): void` - Replaces the current document
572
- - `save(): TEditorConfiguration` - Flushes pending changes, calls `onSave` (if provided) and returns the document
573
- - `getHtml(): string` - Returns the rendered HTML for the current document
574
- - `setImageUrl(blockId: string, url: string): void` - Sets the URL of an image block with the given ID and updates the document
575
-
576
- ### 2) As a React component (basic usage)
577
-
578
- ```tsx
579
- import React from 'react';
580
- import { EmailBuilder } from 'email-builder-online';
581
- import 'email-builder-online/style.css';
582
-
583
- export default function Page() {
584
- return (
585
- <div style={{ height: '100vh' }}>
586
- <EmailBuilder
587
- primaryColor="#0d9488"
588
- secondaryColor="#0ea5a6"
589
- darkMode={false}
590
- stickyHeader
591
- locale="en"
592
- height="calc(100vh - 80px)"
593
- />
594
- </div>
595
- );
596
- }
597
- ```
598
-
599
- ### 3) As a Web Component (works in Nuxt 3, Vue, Svelte, plain HTML)
600
-
601
- For Web Component usage, the component auto-registers in browser environments. Here's how to use it in different frameworks:
602
-
603
- #### Nuxt 3 Example
604
-
605
- 1. Register the email builder component:
606
-
607
- ```ts
608
- // plugins/email-builder.client.ts
609
- import { registerEmailBuilder } from 'email-builder-online';
610
- import 'email-builder-online/style.css';
611
-
612
- export default defineNuxtPlugin(() => {
613
- // Register the web component
614
- registerEmailBuilder('email-builder');
615
- });
616
- ```
617
-
618
- #### Vanilla JavaScript Example
619
-
620
- ```html
621
- <!DOCTYPE html>
622
- <html>
623
- <head>
624
- <link rel="stylesheet" href="path/to/email-builder-online/style.css" />
625
- <script src="path/to/email-builder-online/dist/index.umd.js"></script>
626
- </head>
627
- <body>
628
- <script>
629
- // Register the web component
630
- window.EmailBuilder.registerEmailBuilder('email-builder');
631
- </script>
632
-
633
- <email-builder></email-builder>
634
- </body>
635
- </html>
636
- ```
637
-
638
- Then use it anywhere in your templates (wrap in `<ClientOnly>` for Nuxt):
639
-
640
- ```vue
641
- <template>
642
- <ClientOnly>
643
- <email-builder
644
- primary-color="#0d9488"
645
- secondary-color="#0ea5a6"
646
- dark-mode="false"
647
- sticky-header="true"
648
- locale="en"
649
- height="calc(100vh - 80px)"
650
- />
651
- </ClientOnly>
652
- </template>
653
- ```
654
-
655
- For Vue/Nuxt, you can silence unknown element warnings by marking the tag as a custom element:
656
-
657
- ```ts
658
- // nuxt.config.ts
659
- export default defineNuxtConfig({
660
- vue: {
661
- compilerOptions: {
662
- isCustomElement: (tag) => tag === 'email-builder',
663
- },
664
- },
665
- css: ['email-builder-online/style.css'],
666
- });
667
- ```
668
-
669
- **Notes on SSR and dependencies:**
670
-
671
- - The Web Component wrapper is registered only on the client. Use a client-only plugin in SSR frameworks.
672
- - React and ReactDOM are peer dependencies even for the Web Component. Install them in your app or use a bundler that provides them. React 18 and 19 are supported.
673
- - i18n dependencies (`i18next`, `react-i18next`, `i18next-browser-languagedetector`) are required for internationalization support and must be installed in your project.
674
-
675
- ## Custom Editor Standalone
676
-
677
- The package also ships the `CustomEditorInputStandalone` component so the rich text block can be embedded outside of the full builder experience.
678
-
679
- ### React
680
-
681
- ```tsx
682
- import { useState } from 'react';
683
- import { CustomEditorInputStandalone } from 'email-builder-online';
684
- import 'email-builder-online/style.css';
685
-
686
- export default function CustomEditorExample() {
687
- const [value, setValue] = useState('<p>Write your custom content here…</p>');
688
-
689
- return (
690
- <CustomEditorInputStandalone
691
- initialData={value}
692
- onChange={setValue}
693
- editorBackgroundColor="#ffffff"
694
- editorColorDefault="#1f2937"
695
- fontFamily="MODERN_SANS"
696
- lineHeight={1.6}
697
- />
698
- );
699
- }
700
- ```
701
-
702
- ### Web Component
703
-
704
- ```ts
705
- import { registerCustomEditorInput } from 'email-builder-online';
706
- import 'email-builder-online/style.css';
707
-
708
- if (typeof window !== 'undefined') {
709
- registerCustomEditorInput('custom-editor'); // default is "custom-editor-input"
710
- }
711
- ```
712
-
713
- ## Props / Attributes
714
-
715
- React Props (camelCase) and Web Component attributes (dash-case) map 1:1:
716
-
717
- | React Prop | Web Component Attribute | Type | Default | Description |
718
- | ------------------- | ----------------------- | ---------------------------------------- | ------- | ---------------------------------------------------------------------------------------- |
719
- | ref | - | React.Ref<EmailBuilderRef> | - | Ref to access component methods (getDocument, setDocument, save, getHtml, setImageUrl) |
720
- | onSave | - | (document: TEditorConfiguration) => void | - | Callback when ref.save() is called |
721
- | onAutoSave | - | (document: TEditorConfiguration) => void | - | Callback for auto-save (2s after changes) |
722
- | data | data | TEditorConfiguration \| string | - | Document to load (reactive - updates when changed) |
723
- | initialDocument | - | TEditorConfiguration \| string | - | Initial document to load on mount (one-time only) |
724
- | customImageProvider | - | React.ReactNode | - | Custom image selector component to integrate your own image gallery |
725
- | mergeTags | - | MergeTag[] \| MergeTagGroup | - | Custom merge tags to show in the text editor |
726
- | primaryColor | primary-color | string | #058705 | Primary theme color |
727
- | secondaryColor | secondary-color | string | #079707 | Secondary theme color |
728
- | darkMode | dark-mode | boolean | false | Enable dark mode |
729
- | height | height | string | - | Container height (e.g. "calc(100vh - 80px)") |
730
- | stickyHeader | sticky-header | boolean | true | Sticky header behavior |
731
- | sticky | sticky | boolean | false | Sticky content behavior |
732
- | galleryImages | gallery-images | boolean | false | Enable image gallery |
733
- | locale | locale | string | - | UI language (en, es, it, en-US, es-419, it-IT). Falls back to dataLocale if not provided |
734
- | dataLocale | data-locale | string | - | Alternative locale prop (used as fallback if locale is not provided) |
735
- | htmlTab | html-tab | boolean | true | Show HTML tab |
736
- | jsonTab | json-tab | boolean | true | Show JSON tab |
737
- | imagePlaceholder | image-placeholder | string | - | Default placeholder for images |
738
- | enableAI | enable-ai | boolean | false | Enable AI features for text and image generation |
739
- | onAIRequest | - | (request: AIFeatureRequest) => Promise\<string\> | - | Callback for AI text processing requests |
740
- | freeMode | free-mode | boolean | true | Enable free editing mode |
741
- | showVersion | show-version | boolean | - | Show version indicator in the editor |
742
- | componentTree | component-tree | boolean | true | Show the component tree panel |
743
-
744
- ## Internationalization (i18n)
745
-
746
- The builder supports multiple languages. Pass the `locale` prop with one of the supported values:
747
-
748
- - `en` or `en-US` - English (default)
749
- - `es` or `es-419` - Spanish
750
- - `it` or `it-IT` - Italian
751
-
752
- ```tsx
753
- <EmailBuilder locale="es" />
754
- ```
755
-
756
- ## TypeScript
757
-
758
- Types are shipped. You can import them as:
759
-
760
- ```ts
761
- import type { EmailBuilderProps, AIFeatureRequest, MergeTag, MergeTagGroup, EmailBuilderRef } from 'email-builder-online';
762
- ```
763
-
764
- The `AIFeatureRequest` interface:
765
-
766
- ```ts
767
- interface AIFeatureRequest {
768
- text: string; // Selected or relevant text
769
- content: string; // Full block content
770
- action: string; // AI action (rewrite, grammar_check, continue_writing, shorter, descriptive, detailed, friendly, professional)
771
- blockId?: string; // Block ID where the request originated
772
- }
773
- ```
774
-
775
- ## License
776
-
777
- MIT © Laravel42
778
-
779
- ## Links
780
-
781
- - 🌐 **Website:** [laravel42.com](https://laravel42.com/)
782
- - 📦 **More Open Source:** [npmjs.com/~laravel42](https://www.npmjs.com/~laravel42)
783
- - 💼 **LinkedIn:** [Laravel42](https://www.linkedin.com/company/laravel42/)
784
- - 📘 **Facebook:** [Laravel42](https://www.facebook.com/Laravel42)
785
- - 📸 **Instagram:** [@laravel42\_](https://www.instagram.com/laravel42_/)
786
-
787
- ## Changelog
788
-
789
- See Git history for details. Please open issues or PRs for bugs and improvements.
1
+ # email-builder-online
2
+
3
+ Powerful, modern email builder with drag-and-drop blocks, live preview, and HTML export. Built with React and Material UI, distributed as a React component and as a Web Component so it can be embedded in other frameworks (Nuxt 3, Next.js, SvelteKit, etc.). Compatible with React 18 and 19.
4
+
5
+ 🚀 **[Live Demo](https://emailbuilder.online/)**
6
+
7
+ ## Features
8
+
9
+ - **Drag-and-drop blocks**: Text (Rich Text Editor), Image, Button, Columns, Divider, Spacer, Social Media, Container
10
+ - **Editor and Preview tabs** with responsive screen sizes (Desktop/Mobile)
11
+ - **Undo/Redo** and keyboard shortcuts
12
+ - **HTML export** and copy-to-clipboard helpers
13
+ - **CSS size guard** for email client compatibility
14
+ - **Dark mode** support
15
+ - **AI features** for text (rewrite, grammar, continue, tone) and image generation
16
+ - **Image gallery** integration with custom image provider support
17
+ - **Internationalization (i18n)** with English, Spanish, and Italian support
18
+ - **Works as React component or Web Component** - embed in any framework (Nuxt 3, Next.js, SvelteKit, Vue, etc.)
19
+ - **Built with TypeScript** for better developer experience
20
+ - **Responsive design** that works on mobile and desktop
21
+
22
+ ## Installation
23
+
24
+ Install the package along with React:
25
+
26
+ ```bash
27
+ npm i email-builder-online react react-dom
28
+ # or
29
+ yarn add email-builder-online react react-dom
30
+ # or
31
+ pnpm add email-builder-online react react-dom
32
+ ```
33
+
34
+ > **Note:** All other dependencies (Material UI, i18n, drag-and-drop, Tiptap, etc.) are bundled with the package — no extra installs needed.
35
+
36
+ > **Requirements:** This package targets **Node 24+** and **pnpm** (declared in `engines`). Node 24 + pnpm are required when building or self-hosting the builder from source.
37
+
38
+ ### Peer dependencies (React / React-DOM)
39
+
40
+ **`react` and `react-dom` must be the same major/minor version** (e.g. both 18.x or both 19.x). Mixing versions (e.g. react@18 with react-dom@19) can cause runtime errors such as "Cannot read properties of undefined (reading 'S')".
41
+
42
+ If your project uses **Vite**, add this to your `vite.config` to avoid multiple instances of React (recommended on Windows and in monorepos):
43
+
44
+ ```ts
45
+ export default defineConfig({
46
+ resolve: {
47
+ dedupe: ['react', 'react-dom', 'react-dom/client'],
48
+ },
49
+ // ...
50
+ });
51
+ ```
52
+
53
+ Add the stylesheet (required):
54
+
55
+ ```ts
56
+ // React / Vite / Nuxt / Next
57
+ import 'email-builder-online/style.css';
58
+ ```
59
+
60
+ ## AI Features
61
+
62
+ The builder supports AI-powered features for both text and image blocks, controlled by a single `enableAI` prop.
63
+
64
+ ### Text AI
65
+
66
+ When `enableAI` is `true`, the rich text editor (NotionText) shows AI actions in the bubble menu toolbar and slash menu:
67
+ - Rewrite, grammar check, continue writing
68
+ - Tone adjustments: shorter, descriptive, detailed, friendly, professional
69
+
70
+ Text AI uses the `onAIRequest` callback to process requests. You provide the backend integration:
71
+
72
+ ```tsx
73
+ <EmailBuilder
74
+ enableAI={true}
75
+ onAIRequest={async ({ text, content, action, blockId }) => {
76
+ const response = await fetch('/api/ai', {
77
+ method: 'POST',
78
+ body: JSON.stringify({ text, content, action }),
79
+ headers: { 'Content-Type': 'application/json' },
80
+ });
81
+ const data = await response.json();
82
+ return data.processedContent;
83
+ }}
84
+ />
85
+ ```
86
+
87
+ ### Image AI Generation
88
+
89
+ When `enableAI` is `true`, image blocks and background image inputs show a "Generate with AI" button that opens a dialog for prompt-based image generation.
90
+
91
+ #### Events
92
+
93
+ The image AI generation uses a custom event system:
94
+
95
+ **`request-ai-image`** - Fired when the user submits a prompt to generate an image
96
+
97
+ ```tsx
98
+ window.addEventListener('request-ai-image', (event: CustomEvent) => {
99
+ const prompt = event.detail; // string: the user's prompt
100
+
101
+ // Call your AI image generation API
102
+ const imageUrl = await generateImage(prompt);
103
+
104
+ // Respond with the generated image
105
+ window.dispatchEvent(
106
+ new CustomEvent('generated-image', {
107
+ detail: { url: imageUrl, success: true },
108
+ })
109
+ );
110
+ });
111
+ ```
112
+
113
+ **`store-ai-image`** - Fired when the user confirms and inserts the generated image
114
+
115
+ ```tsx
116
+ window.addEventListener('store-ai-image', (event: CustomEvent) => {
117
+ const imageUrl = event.detail; // string: URL of the image to store
118
+ // Persist the image to your storage if needed
119
+ });
120
+ ```
121
+
122
+ **`generated-image`** - Dispatch this event to return the generated image to the builder
123
+
124
+ ```tsx
125
+ // Success
126
+ window.dispatchEvent(
127
+ new CustomEvent('generated-image', {
128
+ detail: { url: 'https://example.com/generated.png', success: true },
129
+ })
130
+ );
131
+
132
+ // Error
133
+ window.dispatchEvent(
134
+ new CustomEvent('generated-image', {
135
+ detail: { url: null, success: false, error: { code: 500, message: 'Generation failed' } },
136
+ })
137
+ );
138
+ ```
139
+
140
+ ### Template AI Generation (demo)
141
+
142
+ The dev playground wires `onAIGenerateTemplate` to the bundled
143
+ [`@eb/backend`](../backend) workspace package so you can try the
144
+ end-to-end flow (prompt SSE NDJSON stream live preview Apply).
145
+
146
+ Run both packages in parallel from the repo root (two terminals):
147
+
148
+ ```bash
149
+ # Terminal 1 — AI backend on http://localhost:3100
150
+ cp packages/backend/.env.example packages/backend/.env
151
+ # edit OPENAI_API_KEY inside packages/backend/.env
152
+ pnpm dev:backend
153
+
154
+ # Terminal 2 React 19 playground on http://localhost:2501
155
+ pnpm dev
156
+ ```
157
+
158
+ The consumer code in `playground/react-19/src/App.tsx` is the minimal
159
+ reference: a single `fetch` to `http://localhost:3100/api/generate` that
160
+ returns the SSE response body as a `ReadableStream<string>` to the
161
+ builder's dialog. The backend URL is hardcoded there change the
162
+ `AI_BACKEND_URL` constant if your backend runs elsewhere.
163
+
164
+ ## Custom Image Provider
165
+
166
+ You can integrate your own image selector/gallery by passing a React component through the `customImageProvider` prop. This component will be rendered at the top of the image input panel, allowing users to select images from your custom source.
167
+
168
+ ### Events
169
+
170
+ The custom image provider can listen to and dispatch the following events:
171
+
172
+ #### Listening to Events
173
+
174
+ **`email-builder-image-panel-opened`** - Fired when an Image block is selected/opened in the editor
175
+
176
+ ```tsx
177
+ window.addEventListener('email-builder-image-panel-opened', (event: CustomEvent) => {
178
+ const { blockId, currentImageUrl, alt } = event.detail;
179
+ // You can use this to highlight the current image in your gallery
180
+ // or load additional data based on the current selection
181
+ });
182
+ ```
183
+
184
+ Event detail properties:
185
+
186
+ - `blockId` (string): The ID of the selected image block
187
+ - `currentImageUrl` (string | null): The URL of the currently selected image, or null if no image is set
188
+ - `alt` (string | null): The alt text of the current image, or null if not set
189
+
190
+ #### Dispatching Events
191
+
192
+ **`email-builder-set-image`** - Dispatch this event to set an image in the currently selected block
193
+
194
+ ```tsx
195
+ window.dispatchEvent(
196
+ new CustomEvent('email-builder-set-image', {
197
+ detail: imageUrl, // string: URL of the image to set
198
+ })
199
+ );
200
+ ```
201
+
202
+ ### Complete Example
203
+
204
+ ```tsx
205
+ import React, { useEffect, useState } from 'react';
206
+ import { EmailBuilder } from 'email-builder-online';
207
+
208
+ function MyImageGallery() {
209
+ const [currentImageUrl, setCurrentImageUrl] = useState<string | null>(null);
210
+
211
+ useEffect(() => {
212
+ // Listen for when the image panel opens
213
+ const handlePanelOpened = (event: CustomEvent) => {
214
+ const { currentImageUrl } = event.detail;
215
+ setCurrentImageUrl(currentImageUrl);
216
+ };
217
+
218
+ window.addEventListener('email-builder-image-panel-opened', handlePanelOpened);
219
+
220
+ return () => {
221
+ window.removeEventListener('email-builder-image-panel-opened', handlePanelOpened);
222
+ };
223
+ }, []);
224
+
225
+ const handleImageSelect = (imageUrl: string) => {
226
+ // Dispatch event to set the image
227
+ window.dispatchEvent(
228
+ new CustomEvent('email-builder-set-image', {
229
+ detail: imageUrl,
230
+ })
231
+ );
232
+ };
233
+
234
+ return (
235
+ <div>
236
+ <h4>My Custom Gallery</h4>
237
+ {currentImageUrl && <p style={{ fontSize: '12px', color: '#666' }}>Current: {currentImageUrl}</p>}
238
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: '8px' }}>
239
+ <img
240
+ src="https://example.com/image1.jpg"
241
+ onClick={() => handleImageSelect('https://example.com/image1.jpg')}
242
+ style={{
243
+ cursor: 'pointer',
244
+ width: '100%',
245
+ border: currentImageUrl === 'https://example.com/image1.jpg' ? '2px solid blue' : 'none',
246
+ }}
247
+ />
248
+ {/* More images... */}
249
+ </div>
250
+ </div>
251
+ );
252
+ }
253
+
254
+ export default function Page() {
255
+ return (
256
+ <EmailBuilder
257
+ customImageProvider={<MyImageGallery />}
258
+ // ... other props
259
+ />
260
+ );
261
+ }
262
+ ```
263
+
264
+ > **Live Example**: Check out the working implementation in `packages/email-builder-online/src/components/SampleImageGallery.tsx` and see it in action in the demo app.
265
+
266
+ ## Custom Merge Tags
267
+
268
+ You can provide your own merge tags that will appear in the text editor's merge tag menu. Pass an array of tags or a complete group configuration:
269
+
270
+ ### Simple Array of Tags
271
+
272
+ ```tsx
273
+ import { EmailBuilder, MergeTag } from 'email-builder-online';
274
+
275
+ const myMergeTags: MergeTag[] = [
276
+ {
277
+ label: 'First Name',
278
+ value: '[first_name]',
279
+ },
280
+ {
281
+ label: 'Last Name',
282
+ value: '[last_name]',
283
+ },
284
+ {
285
+ label: 'Company',
286
+ value: '[company]',
287
+ },
288
+ {
289
+ type: 'divider', // Add a divider
290
+ },
291
+ {
292
+ label: 'Custom Link',
293
+ value: '{custom_link}Click here{/custom_link}',
294
+ },
295
+ ];
296
+
297
+ export default function Page() {
298
+ return (
299
+ <EmailBuilder
300
+ mergeTags={myMergeTags}
301
+ // ... other props
302
+ />
303
+ );
304
+ }
305
+ ```
306
+
307
+ ### Complete Group with Custom Icons
308
+
309
+ ```tsx
310
+ import { EmailBuilder, MergeTagGroup } from 'email-builder-online';
311
+ import { User, Building, Mail } from 'lucide-react'; // or any icon library
312
+
313
+ const myMergeTagGroup: MergeTagGroup = {
314
+ label: 'My Custom Tags',
315
+ icon: <Mail />,
316
+ children: [
317
+ {
318
+ label: 'First Name',
319
+ value: '[first_name]',
320
+ icon: <User />,
321
+ },
322
+ {
323
+ label: 'Company Name',
324
+ value: '[company]',
325
+ icon: <Building />,
326
+ },
327
+ {
328
+ type: 'divider',
329
+ },
330
+ {
331
+ label: 'Verification Link',
332
+ value: '{verify}Verify Account{/verify}',
333
+ icon: <Mail />,
334
+ },
335
+ ],
336
+ };
337
+
338
+ export default function Page() {
339
+ return (
340
+ <EmailBuilder
341
+ mergeTags={myMergeTagGroup}
342
+ // ... other props
343
+ />
344
+ );
345
+ }
346
+ ```
347
+
348
+ ## Programmatic Image Loading
349
+
350
+ You can load images programmatically using the ref:
351
+
352
+ ```tsx
353
+ import { useRef } from 'react';
354
+ import { EmailBuilder, EmailBuilderRef } from 'email-builder-online';
355
+
356
+ export default function Page() {
357
+ const emailBuilderRef = useRef<EmailBuilderRef>(null);
358
+
359
+ const handleSelectFromMyGallery = (imageUrl: string, blockId: string) => {
360
+ // Set image URL for a specific block
361
+ emailBuilderRef.current?.setImageUrl(blockId, imageUrl);
362
+ };
363
+
364
+ return (
365
+ <EmailBuilder
366
+ ref={emailBuilderRef}
367
+ customImageProvider={<MyCustomGallery onSelect={handleSelectFromMyGallery} />}
368
+ />
369
+ );
370
+ }
371
+ ```
372
+
373
+ ### Using with Custom Image Provider Events
374
+
375
+ You can combine the ref approach with the event system for a more robust solution:
376
+
377
+ ```tsx
378
+ import { useRef, useEffect, useState } from 'react';
379
+ import { EmailBuilder, EmailBuilderRef } from 'email-builder-online';
380
+
381
+ function MyCustomGallery() {
382
+ const [currentBlockId, setCurrentBlockId] = useState<string | null>(null);
383
+ const [currentImageUrl, setCurrentImageUrl] = useState<string | null>(null);
384
+
385
+ useEffect(() => {
386
+ const handlePanelOpened = (event: CustomEvent) => {
387
+ const { blockId, currentImageUrl } = event.detail;
388
+ setCurrentBlockId(blockId);
389
+ setCurrentImageUrl(currentImageUrl);
390
+ };
391
+
392
+ window.addEventListener('email-builder-image-panel-opened', handlePanelOpened);
393
+ return () => window.removeEventListener('email-builder-image-panel-opened', handlePanelOpened);
394
+ }, []);
395
+
396
+ const handleImageSelect = (imageUrl: string) => {
397
+ // Use the event system to set the image
398
+ window.dispatchEvent(
399
+ new CustomEvent('email-builder-set-image', {
400
+ detail: imageUrl,
401
+ })
402
+ );
403
+ };
404
+
405
+ return (
406
+ <div>
407
+ <h4>Select Image</h4>
408
+ {currentImageUrl && <p>Current: {currentImageUrl}</p>}
409
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: '8px' }}>
410
+ {/* Your image gallery */}
411
+ </div>
412
+ </div>
413
+ );
414
+ }
415
+
416
+ export default function Page() {
417
+ const emailBuilderRef = useRef<EmailBuilderRef>(null);
418
+
419
+ // Alternative: Use ref method directly
420
+ const handleSelectFromGallery = (imageUrl: string, blockId: string) => {
421
+ emailBuilderRef.current?.setImageUrl(blockId, imageUrl);
422
+ };
423
+
424
+ return <EmailBuilder ref={emailBuilderRef} customImageProvider={<MyCustomGallery />} />;
425
+ }
426
+ ```
427
+
428
+ ## Available Blocks
429
+
430
+ The email builder includes the following drag-and-drop blocks:
431
+
432
+ - **Notion Text** - Rich text editor with Notion-like editing experience (Tiptap-based)
433
+ - **Image** - Image block with link support
434
+ - **Button** - Call-to-action button with customizable styling
435
+ - **Columns** - Multi-column layout container
436
+ - **Divider** - Horizontal divider/separator line
437
+ - **Spacer** - Vertical spacing block
438
+ - **Social Media** - Social media icons with links
439
+ - **Container** - Container block for grouping content
440
+
441
+ ## Backward Compatibility
442
+
443
+ The email builder automatically migrates legacy blocks when loading a document so templates created before the NotionText block was introduced still hydrate cleanly. The following retired block types are converted to **NotionText** on load:
444
+
445
+ - **CustomEditor** **NotionText** (type rename, compatible data)
446
+ - **Html** → **NotionText** (`props.contents` wrapped into `props.html`)
447
+ - **Heading** **NotionText** (`props.text` wrapped into `<hN>…</hN>` in `props.html`)
448
+
449
+ Other previously-supported types (`Wysiwyg`, `Text`, `Avatar`) were fully retired and are no longer migrated — old documents containing them will silently drop those blocks.
450
+
451
+ ## Usage
452
+
453
+ There are three ways to use the builder:
454
+
455
+ ### 1) As a React component with Ref (recommended for programmatic control)
456
+
457
+ Use a ref to control saving and access the document programmatically:
458
+
459
+ ```tsx
460
+ import React, { useRef, useState, useEffect } from 'react';
461
+ import { EmailBuilder, EmailBuilderRef, TEditorConfiguration, MergeTag } from 'email-builder-online';
462
+ import 'email-builder-online/style.css';
463
+
464
+ // Custom Image Gallery Component
465
+ function MyImageGallery() {
466
+ const images = ['https://example.com/image1.jpg', 'https://example.com/image2.jpg', 'https://example.com/image3.jpg'];
467
+
468
+ const handleImageSelect = (imageUrl: string) => {
469
+ window.dispatchEvent(
470
+ new CustomEvent('email-builder-set-image', {
471
+ detail: imageUrl,
472
+ })
473
+ );
474
+ };
475
+
476
+ return (
477
+ <div>
478
+ <h4>My Custom Gallery</h4>
479
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: '8px' }}>
480
+ {images.map((img, idx) => (
481
+ <img
482
+ key={idx}
483
+ src={img}
484
+ onClick={() => handleImageSelect(img)}
485
+ style={{ cursor: 'pointer', width: '100%', borderRadius: '4px' }}
486
+ />
487
+ ))}
488
+ </div>
489
+ </div>
490
+ );
491
+ }
492
+
493
+ // Custom Merge Tags
494
+ const customMergeTags: MergeTag[] = [
495
+ {
496
+ label: 'First Name',
497
+ value: '[first_name]',
498
+ },
499
+ {
500
+ label: 'Last Name',
501
+ value: '[last_name]',
502
+ },
503
+ {
504
+ label: 'Company',
505
+ value: '[company]',
506
+ },
507
+ {
508
+ type: 'divider',
509
+ },
510
+ {
511
+ label: 'Verification Link',
512
+ value: '{verify}Verify your account{/verify}',
513
+ },
514
+ ];
515
+
516
+ export default function Page() {
517
+ const emailBuilderRef = useRef<EmailBuilderRef>(null);
518
+ const [document, setDocument] = useState<TEditorConfiguration | null>(null);
519
+
520
+ // Load saved document on mount
521
+ useEffect(() => {
522
+ const saved = localStorage.getItem('draft');
523
+ if (saved) {
524
+ setDocument(JSON.parse(saved));
525
+ }
526
+ }, []);
527
+
528
+ const handleSave = () => {
529
+ if (emailBuilderRef.current) {
530
+ const document = emailBuilderRef.current.save();
531
+ // Send to your backend
532
+ fetch('/api/save', {
533
+ method: 'POST',
534
+ body: JSON.stringify(document),
535
+ headers: { 'Content-Type': 'application/json' },
536
+ });
537
+ }
538
+ };
539
+
540
+ const handleExportHtml = () => {
541
+ if (emailBuilderRef.current) {
542
+ const html = emailBuilderRef.current.getHtml();
543
+ // Download HTML file or send to backend
544
+ const blob = new Blob([html], { type: 'text/html' });
545
+ const url = URL.createObjectURL(blob);
546
+ const a = document.createElement('a');
547
+ a.href = url;
548
+ a.download = 'email.html';
549
+ a.click();
550
+ URL.revokeObjectURL(url);
551
+ }
552
+ };
553
+
554
+ const handleSendEmail = async () => {
555
+ if (emailBuilderRef.current) {
556
+ const html = emailBuilderRef.current.getHtml();
557
+ // Send email via your backend
558
+ await fetch('/api/send-email', {
559
+ method: 'POST',
560
+ body: JSON.stringify({ html }),
561
+ headers: { 'Content-Type': 'application/json' },
562
+ });
563
+ }
564
+ };
565
+
566
+ return (
567
+ <div style={{ height: '100vh' }}>
568
+ <button onClick={handleSave}>Save</button>
569
+ <button onClick={handleExportHtml}>Export HTML</button>
570
+ <button onClick={handleSendEmail}>Send Email</button>
571
+ <EmailBuilder
572
+ ref={emailBuilderRef}
573
+ data={document}
574
+ onAutoSave={(doc) => localStorage.setItem('draft', JSON.stringify(doc))}
575
+ customImageProvider={<MyImageGallery />}
576
+ mergeTags={customMergeTags}
577
+ primaryColor="#0d9488"
578
+ secondaryColor="#0ea5a6"
579
+ locale="en"
580
+ height="calc(100vh - 80px)"
581
+ />
582
+ </div>
583
+ );
584
+ }
585
+ ```
586
+
587
+ **Ref Methods:**
588
+
589
+ The `EmailBuilderRef` exposes the following methods:
590
+
591
+ - `getDocument(): TEditorConfiguration` - Returns the current editor document
592
+ - `setDocument(document: TEditorConfiguration): void` - Replaces the current document
593
+ - `save(): TEditorConfiguration` - Flushes pending changes, calls `onSave` (if provided) and returns the document
594
+ - `getHtml(): string` - Returns the rendered HTML for the current document
595
+ - `setImageUrl(blockId: string, url: string): void` - Sets the URL of an image block with the given ID and updates the document
596
+
597
+ ### 2) As a React component (basic usage)
598
+
599
+ ```tsx
600
+ import React from 'react';
601
+ import { EmailBuilder } from 'email-builder-online';
602
+ import 'email-builder-online/style.css';
603
+
604
+ export default function Page() {
605
+ return (
606
+ <div style={{ height: '100vh' }}>
607
+ <EmailBuilder
608
+ primaryColor="#0d9488"
609
+ secondaryColor="#0ea5a6"
610
+ darkMode={false}
611
+ stickyHeader
612
+ locale="en"
613
+ height="calc(100vh - 80px)"
614
+ />
615
+ </div>
616
+ );
617
+ }
618
+ ```
619
+
620
+ ### 3) As a Web Component (works in Nuxt 3, Vue, Svelte, plain HTML)
621
+
622
+ For Web Component usage, the component auto-registers in browser environments. Here's how to use it in different frameworks:
623
+
624
+ #### Nuxt 3 Example
625
+
626
+ 1. Register the email builder component:
627
+
628
+ ```ts
629
+ // plugins/email-builder.client.ts
630
+ import { registerEmailBuilder } from 'email-builder-online';
631
+ import 'email-builder-online/style.css';
632
+
633
+ export default defineNuxtPlugin(() => {
634
+ // Register the web component
635
+ registerEmailBuilder('email-builder');
636
+ });
637
+ ```
638
+
639
+ #### Vanilla JavaScript Example
640
+
641
+ For plain HTML (no bundler, no React in the host page), use the **standalone build**.
642
+ It bundles React + ReactDOM, renders inside a Shadow DOM, and auto-registers the
643
+ `<email-builder>` element on load (no manual `registerEmailBuilder` call needed).
644
+
645
+ > The standalone files (`dist/standalone.js`, `dist/standalone.mjs`) are produced by
646
+ > `pnpm build:standalone` (or `pnpm build:all`). The regular `dist/index.*` build
647
+ > externalizes React and is meant for bundler-based apps, not plain `<script>` usage.
648
+
649
+ ```html
650
+ <!DOCTYPE html>
651
+ <html>
652
+ <head>
653
+ <link rel="stylesheet" href="path/to/email-builder-online/dist/style.css" />
654
+ <!-- IIFE build (no module support needed); exposes window.EmailBuilder -->
655
+ <script src="path/to/email-builder-online/dist/standalone.js"></script>
656
+ </head>
657
+ <body>
658
+ <!-- Auto-registered on load -->
659
+ <email-builder></email-builder>
660
+ </body>
661
+ </html>
662
+ ```
663
+
664
+ Or with the ES module variant:
665
+
666
+ ```html
667
+ <link rel="stylesheet" href="path/to/email-builder-online/dist/style.css" />
668
+ <script type="module" src="path/to/email-builder-online/dist/standalone.mjs"></script>
669
+ <email-builder></email-builder>
670
+ ```
671
+
672
+ Then use it anywhere in your templates (wrap in `<ClientOnly>` for Nuxt):
673
+
674
+ ```vue
675
+ <template>
676
+ <ClientOnly>
677
+ <email-builder
678
+ primary-color="#0d9488"
679
+ secondary-color="#0ea5a6"
680
+ dark-mode="false"
681
+ sticky-header="true"
682
+ locale="en"
683
+ height="calc(100vh - 80px)"
684
+ />
685
+ </ClientOnly>
686
+ </template>
687
+ ```
688
+
689
+ For Vue/Nuxt, you can silence unknown element warnings by marking the tag as a custom element:
690
+
691
+ ```ts
692
+ // nuxt.config.ts
693
+ export default defineNuxtConfig({
694
+ vue: {
695
+ compilerOptions: {
696
+ isCustomElement: (tag) => tag === 'email-builder',
697
+ },
698
+ },
699
+ css: ['email-builder-online/style.css'],
700
+ });
701
+ ```
702
+
703
+ **Notes on SSR and dependencies:**
704
+
705
+ - The Web Component wrapper is registered only on the client. Use a client-only plugin in SSR frameworks.
706
+ - React and ReactDOM are peer dependencies for the package-based usage (React component and the `registerEmailBuilder` Web Component). Install them in your app or use a bundler that provides them. React 18 and 19 are supported. (The self-contained `standalone` build bundles its own React.)
707
+ - i18n dependencies (`i18next`, `react-i18next`, `i18next-browser-languagedetector`) are **bundled** with the package — you do not need to install them separately.
708
+
709
+ ## Props / Attributes
710
+
711
+ React Props (camelCase) and Web Component attributes (dash-case) map 1:1:
712
+
713
+ | React Prop | Web Component Attribute | Type | Default | Description |
714
+ | ------------------- | ----------------------- | ---------------------------------------- | ------- | ---------------------------------------------------------------------------------------- |
715
+ | ref | - | React.Ref<EmailBuilderRef> | - | Ref to access component methods (getDocument, setDocument, save, getHtml, setImageUrl) |
716
+ | onSave | - | (document: TEditorConfiguration) => void | - | Callback when ref.save() is called |
717
+ | onAutoSave | - | (document: TEditorConfiguration) => void | - | Callback for auto-save (2s after changes) |
718
+ | data | data | TEditorConfiguration \| string | - | Document to load (reactive - updates when changed) |
719
+ | initialDocument | - | TEditorConfiguration \| string | - | Initial document to load on mount (one-time only) |
720
+ | customImageProvider | - | React.ReactNode | - | Custom image selector component to integrate your own image gallery |
721
+ | mergeTags | - | MergeTag[] \| MergeTagGroup | - | Custom merge tags to show in the text editor |
722
+ | primaryColor | primary-color | string | #058705 | Primary theme color |
723
+ | secondaryColor | secondary-color | string | #079707 | Secondary theme color |
724
+ | darkMode | dark-mode | boolean | false | Enable dark mode |
725
+ | height | height | string | - | Container height (e.g. "calc(100vh - 80px)") |
726
+ | stickyHeader | sticky-header | boolean | true | Sticky header behavior |
727
+ | sticky | sticky | boolean | false | Sticky content behavior |
728
+ | galleryImages | gallery-images | boolean | false | Enable image gallery |
729
+ | locale | locale | string | - | UI language (en, es, it, en-US, es-419, it-IT). Falls back to dataLocale if not provided |
730
+ | dataLocale | data-locale | string | - | Alternative locale prop (used as fallback if locale is not provided) |
731
+ | htmlTab | html-tab | boolean | true | Show HTML tab |
732
+ | jsonTab | json-tab | boolean | true | Show JSON tab |
733
+ | imagePlaceholder | image-placeholder | string | - | Default placeholder for images |
734
+ | imageUrlInput | image-url-input | boolean | true | Show the URL field in the Image block picker's Upload tab. When `false`, only the dropzone is rendered (subject to `imageUploadInput`). When both `imageUrlInput` and `imageUploadInput` are `false`, the Upload tab is hidden. |
735
+ | imageUploadInput | image-upload-input | boolean | true | Show the drag & drop / file upload zone in the Image block picker's Upload tab. When `false`, only the URL field is rendered (subject to `imageUrlInput`). When both `imageUrlInput` and `imageUploadInput` are `false`, the Upload tab is hidden. |
736
+ | backgroundUrlInput | background-url-input | boolean | true | Show the URL field in the Background image picker's Upload tab (Container, ColumnsContainer, EmailLayout). Same hide-on-both-false behavior as `imageUrlInput`. |
737
+ | backgroundUploadInput | background-upload-input | boolean | true | Show the drag & drop / file upload zone in the Background image picker's Upload tab. Same hide-on-both-false behavior as `imageUploadInput`. |
738
+ | enableAI | enable-ai | boolean | false | Enable AI features for text and image generation |
739
+ | onAIRequest | - | (request: AIFeatureRequest) => Promise\<string\> | - | Callback for AI text processing requests |
740
+ | onAIGenerateTemplate | - | (request: AIGenerateTemplateRequest, options: { signal: AbortSignal }) => Promise\<AIGenerateTemplateResponse\> | - | Callback for AI template generation (prompt → template). When undefined, the "Generate with AI" entry point is hidden |
741
+ | unsplashEnabled | - | boolean | false | Show the built-in Unsplash picker tab (requires the backend proxy) |
742
+ | unsplashBackendUrl | - | string | - | Override the backend URL used for Unsplash proxy calls |
743
+ | portalContainer | - | HTMLElement | - | Container element for MUI portals (menus, dialogs); useful when mounting inside Shadow DOM |
744
+ | showVersion | show-version | boolean | - | Show version indicator in the editor |
745
+ | componentTree | component-tree | boolean | true | Show the component tree panel |
746
+
747
+ ## Internationalization (i18n)
748
+
749
+ The builder supports multiple languages. Pass the `locale` prop with one of the supported values:
750
+
751
+ - `en` or `en-US` - English (default)
752
+ - `es` or `es-419` - Spanish
753
+ - `it` or `it-IT` - Italian
754
+
755
+ ```tsx
756
+ <EmailBuilder locale="es" />
757
+ ```
758
+
759
+ ## TypeScript
760
+
761
+ Types are shipped. You can import them as:
762
+
763
+ ```ts
764
+ import type { EmailBuilderProps, AIFeatureRequest, MergeTag, MergeTagGroup, EmailBuilderRef } from 'email-builder-online';
765
+ ```
766
+
767
+ The `AIFeatureRequest` interface:
768
+
769
+ ```ts
770
+ interface AIFeatureRequest {
771
+ text: string; // Selected or relevant text
772
+ content: string; // Full block content
773
+ action: string; // AI action (rewrite, grammar_check, continue_writing, shorter, descriptive, detailed, friendly, professional)
774
+ blockId?: string; // Block ID where the request originated
775
+ }
776
+ ```
777
+
778
+ ## License
779
+
780
+ Free to use. © Laravel42. All rights reserved.
781
+
782
+ ## Links
783
+
784
+ - 🌐 **Website:** [laravel42.com](https://laravel42.com/)
785
+ - 📦 **More Packages:** [npmjs.com/~laravel42](https://www.npmjs.com/~laravel42)
786
+ - 💼 **LinkedIn:** [Laravel42](https://www.linkedin.com/company/laravel42/)
787
+ - 📘 **Facebook:** [Laravel42](https://www.facebook.com/Laravel42)
788
+ - 📸 **Instagram:** [@laravel42\_](https://www.instagram.com/laravel42_/)
789
+
790
+ ## Changelog
791
+
792
+ See Git history for details. Please open issues or PRs for bugs and improvements.