best-email-builder 0.19.0 → 0.21.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 (43) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/ai-server.js +3 -3
  3. package/dist/ai.js +6 -6
  4. package/dist/builder.js +8 -8
  5. package/dist/{chunk-4662C22G.js → chunk-4SRNGFAV.js} +3 -3
  6. package/dist/{chunk-NSNODUL6.js → chunk-52FIAPS6.js} +3 -3
  7. package/dist/{chunk-MW3ZGK34.js → chunk-HE2VAOLR.js} +37 -1
  8. package/dist/chunk-HE2VAOLR.js.map +1 -0
  9. package/dist/{chunk-HWNNYG45.js → chunk-HLYCDUYM.js} +120 -4
  10. package/dist/chunk-HLYCDUYM.js.map +1 -0
  11. package/dist/{chunk-WYYATB37.js → chunk-I7OE75MA.js} +218 -43
  12. package/dist/chunk-I7OE75MA.js.map +1 -0
  13. package/dist/{chunk-GUF6MIXZ.js → chunk-IGC3I4XL.js} +2 -2
  14. package/dist/{chunk-UR3UTVC5.js → chunk-K4JJ4MA6.js} +4 -4
  15. package/dist/{chunk-K43QP3TX.js → chunk-KWJE4E2W.js} +3 -3
  16. package/dist/{chunk-LJXCMXYI.js → chunk-OSQ5YGHL.js} +2 -2
  17. package/dist/{chunk-CYTZO2MW.js → chunk-PZV2QAFF.js} +3 -3
  18. package/dist/{chunk-CYTZO2MW.js.map → chunk-PZV2QAFF.js.map} +1 -1
  19. package/dist/{chunk-BMCXSP4Q.js → chunk-XYXN3UBQ.js} +2 -2
  20. package/dist/index.js +10 -10
  21. package/dist/library.js +5 -5
  22. package/dist/server.js +5 -5
  23. package/dist/styles.css +1 -1
  24. package/dist/types/core/EmailEditor.d.ts +14 -3
  25. package/dist/types/core/constants.d.ts +1 -1
  26. package/dist/types/core/mjmlAttributes.d.ts +22 -0
  27. package/dist/types/engine/NativeAdapter.d.ts +1 -1
  28. package/dist/types/engine/canvas/CanvasView.d.ts +4 -0
  29. package/dist/types/engine/canvas/canvasStyles.d.ts +1 -1
  30. package/dist/types/features/variables/VariablesPanel.d.ts +1 -2
  31. package/dist/types/renderer/compileEditorMjml.d.ts +5 -1
  32. package/dist/types/renderer/mobileStyles.d.ts +20 -0
  33. package/package.json +1 -1
  34. package/dist/chunk-HWNNYG45.js.map +0 -1
  35. package/dist/chunk-MW3ZGK34.js.map +0 -1
  36. package/dist/chunk-WYYATB37.js.map +0 -1
  37. /package/dist/{chunk-4662C22G.js.map → chunk-4SRNGFAV.js.map} +0 -0
  38. /package/dist/{chunk-NSNODUL6.js.map → chunk-52FIAPS6.js.map} +0 -0
  39. /package/dist/{chunk-GUF6MIXZ.js.map → chunk-IGC3I4XL.js.map} +0 -0
  40. /package/dist/{chunk-UR3UTVC5.js.map → chunk-K4JJ4MA6.js.map} +0 -0
  41. /package/dist/{chunk-K43QP3TX.js.map → chunk-KWJE4E2W.js.map} +0 -0
  42. /package/dist/{chunk-LJXCMXYI.js.map → chunk-OSQ5YGHL.js.map} +0 -0
  43. /package/dist/{chunk-BMCXSP4Q.js.map → chunk-XYXN3UBQ.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -6,6 +6,46 @@ All notable changes are documented here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.21.0] — 2026-10-30
10
+
11
+ ### Added
12
+ - Desktop and phone styles apart: in the Mobile view, every style changed
13
+ (font, size, color, spacing, borders, alignment, backgrounds…) applies to
14
+ phones only, and the computer keeps its own. The values are stored beside
15
+ the others as `mobile-*` attributes (`mobile-font-size="28px"`) and sent as
16
+ a media query under the breakpoint. Links, pictures and column widths stay
17
+ the same on every screen. If an email's phone version were ever built
18
+ differently from the computer's, phones keep the computer's styles and the
19
+ save says so (a compile warning) instead of sending a broken look.
20
+ - The panel lists, in the Mobile view, what differs on phones; each one goes
21
+ back to the computer's value, or all at once ("Same as desktop").
22
+ - `editor.clearMobileStyles(id?)` and `mobileOverrides` on a selected element.
23
+
24
+ ## [0.20.0] — 2026-10-30
25
+
26
+ ### Added
27
+ - Column widths by hand: with a layout selected, or anything inside it, the
28
+ lines between its columns can be dragged on the canvas (or moved with the
29
+ arrow keys, Shift for 5 %). Only the two columns beside the line change,
30
+ never below 10 %; the whole drag is one undo step.
31
+ - A menu link has a line height.
32
+ - `parentId` on a selected element: the element it is in.
33
+
34
+ ### Fixed
35
+ - Bold on a column, a section or a menu: every text, button and menu link
36
+ inside takes the weight.
37
+ - Every ribbon icon acts on a menu link and on a menu: bold, italic,
38
+ underline, strikethrough, clear formatting (their weight, slant and lines
39
+ go), line height, alignment (a link's is its menu's); the link and remove
40
+ the link change a menu link's address, a button's or an image's. A whole
41
+ menu keeps the link off: one address for all its links would make no sense.
42
+ - The unsubscribe link of the Variables panel behaves like every variable:
43
+ its tag (`{{ unsubscribe }}`) is typed and previewed, no longer a ready-made
44
+ "Unsubscribe" link. As an address, it is picked from the `{ }` of the link
45
+ field.
46
+ - The variables of a field open under it, flush with its edges, rather than
47
+ hanging off the `{ }` button.
48
+
9
49
  ## [0.19.0] — 2026-10-30
10
50
 
11
51
  ### Added
package/dist/ai-server.js CHANGED
@@ -28,9 +28,9 @@ import {
28
28
  reviewFix,
29
29
  reviewRewrite,
30
30
  reviewSubjects
31
- } from "./chunk-4662C22G.js";
32
- import "./chunk-LJXCMXYI.js";
33
- import "./chunk-MW3ZGK34.js";
31
+ } from "./chunk-4SRNGFAV.js";
32
+ import "./chunk-OSQ5YGHL.js";
33
+ import "./chunk-HE2VAOLR.js";
34
34
 
35
35
  // src/ai/agentEndpoint.js
36
36
  var TASKS = ["rewrite", "subjects"];
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cleanRichText
3
- } from "./chunk-GUF6MIXZ.js";
3
+ } from "./chunk-IGC3I4XL.js";
4
4
  import {
5
5
  Button,
6
6
  Dialog,
@@ -20,8 +20,8 @@ import {
20
20
  cn,
21
21
  createHttpCaller,
22
22
  useUi
23
- } from "./chunk-K43QP3TX.js";
24
- import "./chunk-CYTZO2MW.js";
23
+ } from "./chunk-KWJE4E2W.js";
24
+ import "./chunk-PZV2QAFF.js";
25
25
  import {
26
26
  AGENT_ERROR_CODES,
27
27
  AGENT_PROTOCOL,
@@ -46,9 +46,9 @@ import {
46
46
  providerEmailModel,
47
47
  resolveProvider,
48
48
  visibleText
49
- } from "./chunk-4662C22G.js";
50
- import "./chunk-LJXCMXYI.js";
51
- import "./chunk-MW3ZGK34.js";
49
+ } from "./chunk-4SRNGFAV.js";
50
+ import "./chunk-OSQ5YGHL.js";
51
+ import "./chunk-HE2VAOLR.js";
52
52
 
53
53
  // src/ai/keys.js
54
54
  var STORAGE_PREFIX = "best-email-builder:ai-key:";
package/dist/builder.js CHANGED
@@ -5,20 +5,20 @@ import {
5
5
  TEMPLATE_GALLERY,
6
6
  buildGallery,
7
7
  createStarterMjml
8
- } from "./chunk-WYYATB37.js";
9
- import "./chunk-NSNODUL6.js";
10
- import "./chunk-HWNNYG45.js";
8
+ } from "./chunk-I7OE75MA.js";
9
+ import "./chunk-52FIAPS6.js";
10
+ import "./chunk-HLYCDUYM.js";
11
11
  import "./chunk-UFKCLU2D.js";
12
- import "./chunk-GUF6MIXZ.js";
12
+ import "./chunk-IGC3I4XL.js";
13
13
  import {
14
14
  StorageError,
15
15
  createHttpStorage,
16
16
  createMemoryStorage
17
- } from "./chunk-K43QP3TX.js";
17
+ } from "./chunk-KWJE4E2W.js";
18
18
  import {
19
19
  EMAIL_BUILDER_VERSION
20
- } from "./chunk-CYTZO2MW.js";
21
- import "./chunk-LJXCMXYI.js";
20
+ } from "./chunk-PZV2QAFF.js";
21
+ import "./chunk-OSQ5YGHL.js";
22
22
  import {
23
23
  CUSTOM_GROUP,
24
24
  DEFAULT_VARIABLES,
@@ -28,7 +28,7 @@ import {
28
28
  defineVariables,
29
29
  mergeVariables,
30
30
  translatorFor
31
- } from "./chunk-MW3ZGK34.js";
31
+ } from "./chunk-HE2VAOLR.js";
32
32
  export {
33
33
  CUSTOM_GROUP,
34
34
  DEFAULT_VARIABLES,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  validateMjml
3
- } from "./chunk-LJXCMXYI.js";
3
+ } from "./chunk-OSQ5YGHL.js";
4
4
  import {
5
5
  DEFAULT_VARIABLES
6
- } from "./chunk-MW3ZGK34.js";
6
+ } from "./chunk-HE2VAOLR.js";
7
7
 
8
8
  // src/ai/errors.js
9
9
  var GENERATION_ERRORS = {
@@ -2046,4 +2046,4 @@ export {
2046
2046
  LANGUAGETOOL_PUBLIC_API,
2047
2047
  createLanguageToolProofreader
2048
2048
  };
2049
- //# sourceMappingURL=chunk-4662C22G.js.map
2049
+ //# sourceMappingURL=chunk-4SRNGFAV.js.map
@@ -15,10 +15,10 @@ import {
15
15
  TabsTrigger,
16
16
  cn,
17
17
  useUi
18
- } from "./chunk-K43QP3TX.js";
18
+ } from "./chunk-KWJE4E2W.js";
19
19
  import {
20
20
  EMAIL_MOBILE_WIDTH
21
- } from "./chunk-CYTZO2MW.js";
21
+ } from "./chunk-PZV2QAFF.js";
22
22
 
23
23
  // src/features/templates/thumbnails.js
24
24
  var THUMBNAIL_IMAGE = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 300'%3E%3Crect width='600' height='300' fill='%23dfe6f0'/%3E%3C/svg%3E";
@@ -291,4 +291,4 @@ export {
291
291
  SearchKeyHint,
292
292
  useLayoutWidth
293
293
  };
294
- //# sourceMappingURL=chunk-NSNODUL6.js.map
294
+ //# sourceMappingURL=chunk-52FIAPS6.js.map
@@ -315,6 +315,12 @@ var de = {
315
315
  "Insecure http link ({count})": "Unsichere http-Links: {count}",
316
316
  "Insert a variable in the preview text": "Variable in den Vorschautext einf\xFCgen",
317
317
  "Insert a variable in the link": "Variable in den Link einf\xFCgen",
318
+ "Mobile view: the styles you change here apply to phones only. Links and pictures are the same on every screen.": "Mobilansicht: Die hier ge\xE4nderten Stile gelten nur f\xFCr Telefone. Links und Bilder sind auf allen Bildschirmen gleich.",
319
+ "Different on phones": "Auf dem Telefon anders",
320
+ "Back to the desktop value: {name}": "Zur\xFCck zum Desktop-Wert: {name}",
321
+ "Same as desktop": "Wie auf dem Desktop",
322
+ "Column width": "Spaltenbreite",
323
+ "Drag to change the widths of the columns": "Ziehen, um die Breite der Spalten zu \xE4ndern",
318
324
  "Insert a variable in the subject": "Variable in den Betreff einf\xFCgen",
319
325
  "Internal error": "Interner Fehler",
320
326
  "Invalid JSON": "Ung\xFCltiges JSON",
@@ -928,6 +934,12 @@ var es = {
928
934
  "Insecure http link ({count})": "Enlace http no seguro ({count})",
929
935
  "Insert a variable in the preview text": "Insertar una variable en el texto de vista previa",
930
936
  "Insert a variable in the link": "Insertar una variable en el enlace",
937
+ "Mobile view: the styles you change here apply to phones only. Links and pictures are the same on every screen.": "Vista m\xF3vil: los estilos que cambies aqu\xED solo se aplican a los tel\xE9fonos. Los enlaces y las im\xE1genes son los mismos en todas las pantallas.",
938
+ "Different on phones": "Distinto en el tel\xE9fono",
939
+ "Back to the desktop value: {name}": "Volver al valor de escritorio: {name}",
940
+ "Same as desktop": "Igual que en escritorio",
941
+ "Column width": "Ancho de columna",
942
+ "Drag to change the widths of the columns": "Arrastra para cambiar el ancho de las columnas",
931
943
  "Insert a variable in the subject": "Insertar una variable en el asunto",
932
944
  "Internal error": "Error interno",
933
945
  "Invalid JSON": "JSON no v\xE1lido",
@@ -1541,6 +1553,12 @@ var fr = {
1541
1553
  "Insecure http link ({count})": "Lien non s\xE9curis\xE9 en http ({count})",
1542
1554
  "Insert a variable in the preview text": "Ins\xE9rer une variable dans le texte d\u2019aper\xE7u",
1543
1555
  "Insert a variable in the link": "Ins\xE9rer une variable dans le lien",
1556
+ "Mobile view: the styles you change here apply to phones only. Links and pictures are the same on every screen.": "Vue mobile : les styles modifi\xE9s ici s'appliquent aux t\xE9l\xE9phones seulement. Les liens et les images sont les m\xEAmes sur tous les \xE9crans.",
1557
+ "Different on phones": "Diff\xE9rent sur t\xE9l\xE9phone",
1558
+ "Back to the desktop value: {name}": "Revenir \xE0 la valeur du bureau : {name}",
1559
+ "Same as desktop": "Comme sur ordinateur",
1560
+ "Column width": "Largeur de colonne",
1561
+ "Drag to change the widths of the columns": "Faites glisser pour changer la largeur des colonnes",
1544
1562
  "Insert a variable in the subject": "Ins\xE9rer une variable dans l\u2019objet",
1545
1563
  "Internal error": "Erreur interne",
1546
1564
  "Invalid JSON": "JSON invalide",
@@ -2154,6 +2172,12 @@ var pt = {
2154
2172
  "Insecure http link ({count})": "Links http n\xE3o seguros: {count}",
2155
2173
  "Insert a variable in the preview text": "Inserir uma vari\xE1vel no texto de pr\xE9-visualiza\xE7\xE3o",
2156
2174
  "Insert a variable in the link": "Inserir uma vari\xE1vel no link",
2175
+ "Mobile view: the styles you change here apply to phones only. Links and pictures are the same on every screen.": "Vista m\xF3vel: os estilos que alterar aqui aplicam-se apenas aos telem\xF3veis. As liga\xE7\xF5es e as imagens s\xE3o as mesmas em todos os ecr\xE3s.",
2176
+ "Different on phones": "Diferente no telem\xF3vel",
2177
+ "Back to the desktop value: {name}": "Voltar ao valor do computador: {name}",
2178
+ "Same as desktop": "Igual ao computador",
2179
+ "Column width": "Largura da coluna",
2180
+ "Drag to change the widths of the columns": "Arraste para alterar a largura das colunas",
2157
2181
  "Insert a variable in the subject": "Inserir uma vari\xE1vel no assunto",
2158
2182
  "Internal error": "Erro interno",
2159
2183
  "Invalid JSON": "JSON inv\xE1lido",
@@ -2767,6 +2791,12 @@ var ru = {
2767
2791
  "Insecure http link ({count})": "\u041D\u0435\u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438 http: {count}",
2768
2792
  "Insert a variable in the preview text": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0443\u044E \u0432 \u043F\u0440\u0435\u0445\u0435\u0434\u0435\u0440",
2769
2793
  "Insert a variable in the link": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0443\u044E \u0432 \u0441\u0441\u044B\u043B\u043A\u0443",
2794
+ "Mobile view: the styles you change here apply to phones only. Links and pictures are the same on every screen.": "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u0439 \u0432\u0438\u0434: \u0441\u0442\u0438\u043B\u0438, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0432\u044B \u043C\u0435\u043D\u044F\u0435\u0442\u0435 \u0437\u0434\u0435\u0441\u044C, \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044E\u0442 \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430\u0445. \u0421\u0441\u044B\u043B\u043A\u0438 \u0438 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438 \u043E\u0434\u0438\u043D\u0430\u043A\u043E\u0432\u044B \u043D\u0430 \u0432\u0441\u0435\u0445 \u044D\u043A\u0440\u0430\u043D\u0430\u0445.",
2795
+ "Different on phones": "\u0418\u043D\u0430\u0447\u0435 \u043D\u0430 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0435",
2796
+ "Back to the desktop value: {name}": "\u0412\u0435\u0440\u043D\u0443\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043A\u043E\u043C\u043F\u044C\u044E\u0442\u0435\u0440\u0430: {name}",
2797
+ "Same as desktop": "\u041A\u0430\u043A \u043D\u0430 \u043A\u043E\u043C\u043F\u044C\u044E\u0442\u0435\u0440\u0435",
2798
+ "Column width": "\u0428\u0438\u0440\u0438\u043D\u0430 \u043A\u043E\u043B\u043E\u043D\u043A\u0438",
2799
+ "Drag to change the widths of the columns": "\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0448\u0438\u0440\u0438\u043D\u0443 \u043A\u043E\u043B\u043E\u043D\u043E\u043A",
2770
2800
  "Insert a variable in the subject": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0443\u044E \u0432 \u0442\u0435\u043C\u0443",
2771
2801
  "Internal error": "\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u043E\u0448\u0438\u0431\u043A\u0430",
2772
2802
  "Invalid JSON": "\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 JSON",
@@ -3380,6 +3410,12 @@ var zh = {
3380
3410
  "Insecure http link ({count})": "\u4E0D\u5B89\u5168\u7684 http \u94FE\u63A5\uFF08{count}\uFF09",
3381
3411
  "Insert a variable in the preview text": "\u5728\u9884\u89C8\u6587\u672C\u4E2D\u63D2\u5165\u53D8\u91CF",
3382
3412
  "Insert a variable in the link": "\u5728\u94FE\u63A5\u4E2D\u63D2\u5165\u53D8\u91CF",
3413
+ "Mobile view: the styles you change here apply to phones only. Links and pictures are the same on every screen.": "\u79FB\u52A8\u89C6\u56FE\uFF1A\u6B64\u5904\u66F4\u6539\u7684\u6837\u5F0F\u4EC5\u9002\u7528\u4E8E\u624B\u673A\u3002\u94FE\u63A5\u548C\u56FE\u7247\u5728\u6240\u6709\u5C4F\u5E55\u4E0A\u90FD\u76F8\u540C\u3002",
3414
+ "Different on phones": "\u624B\u673A\u4E0A\u4E0D\u540C",
3415
+ "Back to the desktop value: {name}": "\u6062\u590D\u4E3A\u684C\u9762\u503C\uFF1A{name}",
3416
+ "Same as desktop": "\u4E0E\u684C\u9762\u76F8\u540C",
3417
+ "Column width": "\u5217\u5BBD",
3418
+ "Drag to change the widths of the columns": "\u62D6\u52A8\u4EE5\u66F4\u6539\u5217\u5BBD",
3383
3419
  "Insert a variable in the subject": "\u5728\u4E3B\u9898\u4E2D\u63D2\u5165\u53D8\u91CF",
3384
3420
  "Internal error": "\u5185\u90E8\u9519\u8BEF",
3385
3421
  "Invalid JSON": "JSON \u65E0\u6548",
@@ -3863,4 +3899,4 @@ export {
3863
3899
  absoluteAssetUrls,
3864
3900
  applyServiceLinks
3865
3901
  };
3866
- //# sourceMappingURL=chunk-MW3ZGK34.js.map
3902
+ //# sourceMappingURL=chunk-HE2VAOLR.js.map