best-email-builder 0.16.0 → 0.17.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.
- package/CHANGELOG.md +33 -0
- package/README.md +3 -1
- package/dist/ai-server.js +3 -3
- package/dist/ai.js +20 -20
- package/dist/ai.js.map +1 -1
- package/dist/builder.js +8 -8
- package/dist/{chunk-AGA3BLRI.js → chunk-2F7P4FXX.js} +2 -2
- package/dist/{chunk-MC7JUFHI.js → chunk-4AUHYQPE.js} +7 -5
- package/dist/chunk-4AUHYQPE.js.map +1 -0
- package/dist/{chunk-W5AJWWHH.js → chunk-5OUMNUJS.js} +3 -3
- package/dist/{chunk-W5AJWWHH.js.map → chunk-5OUMNUJS.js.map} +1 -1
- package/dist/{chunk-7H7TLQBL.js → chunk-DOK6E6GK.js} +17 -13
- package/dist/chunk-DOK6E6GK.js.map +1 -0
- package/dist/{chunk-EFE245KW.js → chunk-FPJF77MO.js} +19 -1
- package/dist/chunk-FPJF77MO.js.map +1 -0
- package/dist/{chunk-RPDQABWZ.js → chunk-PCLRIXAQ.js} +2 -2
- package/dist/{chunk-MSHGCLCA.js → chunk-QDAVDMA4.js} +2 -2
- package/dist/{chunk-QLUCTFJ2.js → chunk-U3BA4NK3.js} +2 -2
- package/dist/{chunk-F5H7ITED.js → chunk-V2PO42EN.js} +4 -4
- package/dist/{chunk-F5H7ITED.js.map → chunk-V2PO42EN.js.map} +1 -1
- package/dist/{chunk-HAHHRMQG.js → chunk-X4WTY6LC.js} +801 -583
- package/dist/chunk-X4WTY6LC.js.map +1 -0
- package/dist/{chunk-6OR6W4KJ.js → chunk-ZRER4JD4.js} +3 -3
- package/dist/index.js +10 -10
- package/dist/library.js +5 -5
- package/dist/server.js +5 -5
- package/dist/styles.css +1 -1
- package/dist/types/blocks/navbar/index.d.ts +1 -1
- package/dist/types/blocks/social/index.d.ts +7 -3
- package/dist/types/core/EmailEditor.d.ts +69 -0
- package/dist/types/core/constants.d.ts +1 -1
- package/dist/types/engine/NativeAdapter.d.ts +1 -1
- package/dist/types/engine/canvas/CanvasView.d.ts +20 -3
- package/dist/types/engine/canvas/canvasStyles.d.ts +1 -1
- package/dist/types/engine/canvas/icons.d.ts +1 -8
- package/dist/types/features/variables/VariablesPanel.d.ts +5 -0
- package/dist/types/ui/BlockSidebar.d.ts +34 -0
- package/dist/types/ui/CanvasAddMenu.d.ts +14 -0
- package/dist/types/ui/primitives/misc.d.ts +3 -1
- package/dist/types/ui/primitives/overlays.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunk-7H7TLQBL.js.map +0 -1
- package/dist/chunk-EFE245KW.js.map +0 -1
- package/dist/chunk-HAHHRMQG.js.map +0 -1
- package/dist/chunk-MC7JUFHI.js.map +0 -1
- /package/dist/{chunk-AGA3BLRI.js.map → chunk-2F7P4FXX.js.map} +0 -0
- /package/dist/{chunk-RPDQABWZ.js.map → chunk-PCLRIXAQ.js.map} +0 -0
- /package/dist/{chunk-MSHGCLCA.js.map → chunk-QDAVDMA4.js.map} +0 -0
- /package/dist/{chunk-QLUCTFJ2.js.map → chunk-U3BA4NK3.js.map} +0 -0
- /package/dist/{chunk-6OR6W4KJ.js.map → chunk-ZRER4JD4.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,39 @@ All notable changes are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.17.0] — 2026-10-26
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- A "+" on the canvas, as in Unlayer. Under the selected element, it opens
|
|
13
|
+
the blocks, and the one picked goes after the element (at the end of a
|
|
14
|
+
selected column). After the last icon of a social block, it opens the
|
|
15
|
+
networks with their icons; after a menu's last link, it adds a link at
|
|
16
|
+
once. The new icon or link copies the last one's look and is selected.
|
|
17
|
+
- `editor.addItem(choice, id)`: one more item in a row (a social block's
|
|
18
|
+
icons, a menu's links). A block declares its row's choices in `items`;
|
|
19
|
+
the canvas's "+" emits the editor's `add-menu` event with where it is on
|
|
20
|
+
screen.
|
|
21
|
+
- Variables move by drag and drop: a badge dragged onto another group of
|
|
22
|
+
the *Variables* panel moves there and is saved, as its dialog would save
|
|
23
|
+
it. The other groups are outlined, the one under the pointer lit; Esc
|
|
24
|
+
cancels, and a click still inserts.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- The template library, wide: the list takes a fifth of the width (never
|
|
28
|
+
under 260 px), and the template's details and its preview share the rest
|
|
29
|
+
equally.
|
|
30
|
+
- One corner for every control, the button's (10 px): fields, selects and
|
|
31
|
+
their lists, filter chips, the ribbon's buttons, cards. Badges under
|
|
32
|
+
24 px tall (tags, variables, the AI's quick actions) take 6 px instead of
|
|
33
|
+
a pill, and items inside a list 6 px, following its corners. The rule is
|
|
34
|
+
written next to the radius tokens in `styles.css`.
|
|
35
|
+
|
|
36
|
+
### Removed
|
|
37
|
+
- The formatting bar over a text being edited in the canvas: the ribbon
|
|
38
|
+
above the canvas has the same tools (bold, italic, underline, strike,
|
|
39
|
+
link, unlink, clear) and stays the one place for them. Its link field
|
|
40
|
+
now takes an address without `https://` too, as the bar did.
|
|
41
|
+
|
|
9
42
|
## [0.16.0] — 2026-10-26
|
|
10
43
|
|
|
11
44
|
### Added
|
package/README.md
CHANGED
|
@@ -52,6 +52,8 @@ once and given away.
|
|
|
52
52
|
- Columns from 1/4 to 3/4 of the row, background images on sections,
|
|
53
53
|
full-width images on phones.
|
|
54
54
|
- Drag with a drop line, type in place, a toolbar and shortcuts on every element.
|
|
55
|
+
- A "+" under the selected element adds a block after it; a "+" after the
|
|
56
|
+
last social icon or menu link adds one more.
|
|
55
57
|
- A ribbon above the canvas, as in a word processor: bold, italic, underline,
|
|
56
58
|
strikethrough, link, size, line height and alignment, each tool
|
|
57
59
|
named in a tooltip. At its end, panels beside the canvas for the emojis
|
|
@@ -85,7 +87,7 @@ once and given away.
|
|
|
85
87
|
- A template library: search, favorites, up to three colored tags per
|
|
86
88
|
template that also filter the list, and *Edit*, *Duplicate*, *Copy HTML*,
|
|
87
89
|
*Download*, *Delete*.
|
|
88
|
-
- Merge-tag variables, including ones your users create.
|
|
90
|
+
- Merge-tag variables, including ones your users create, sorted into groups by drag and drop.
|
|
89
91
|
- Your brand read from your website: logo, colors and font.
|
|
90
92
|
- One Fetch-API handler for Next.js, Hono, Bun, Deno, Cloudflare Workers and Express.
|
|
91
93
|
- Seven interface languages, and any other through a dictionary.
|
package/dist/ai-server.js
CHANGED
|
@@ -28,9 +28,9 @@ import {
|
|
|
28
28
|
reviewFix,
|
|
29
29
|
reviewRewrite,
|
|
30
30
|
reviewSubjects
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-ZRER4JD4.js";
|
|
32
|
+
import "./chunk-2F7P4FXX.js";
|
|
33
|
+
import "./chunk-FPJF77MO.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-
|
|
3
|
+
} from "./chunk-PCLRIXAQ.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-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-DOK6E6GK.js";
|
|
24
|
+
import "./chunk-5OUMNUJS.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-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
49
|
+
} from "./chunk-ZRER4JD4.js";
|
|
50
|
+
import "./chunk-2F7P4FXX.js";
|
|
51
|
+
import "./chunk-FPJF77MO.js";
|
|
52
52
|
|
|
53
53
|
// src/ai/keys.js
|
|
54
54
|
var STORAGE_PREFIX = "best-email-builder:ai-key:";
|
|
@@ -334,8 +334,8 @@ function ModelPicker({ aiKey, provider, apiKey, address = "", delay = 0, value,
|
|
|
334
334
|
};
|
|
335
335
|
const optionId = (at) => `${listId}-${at}`;
|
|
336
336
|
const badges = (model) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
337
|
-
model.free && /* @__PURE__ */ jsx("span", { className: "eb:shrink-0 eb:rounded-
|
|
338
|
-
model.id === provider.model && /* @__PURE__ */ jsx("span", { className: "eb:shrink-0 eb:rounded-
|
|
337
|
+
model.free && /* @__PURE__ */ jsx("span", { className: "eb:shrink-0 eb:rounded-md eb:bg-success/10 eb:px-1.5 eb:py-px eb:text-[10.5px] eb:font-medium eb:text-success", children: t("Free") }),
|
|
338
|
+
model.id === provider.model && /* @__PURE__ */ jsx("span", { className: "eb:shrink-0 eb:rounded-md eb:bg-muted eb:px-1.5 eb:py-px eb:text-[10.5px] eb:font-medium eb:text-foreground-lighter", children: t("Default") })
|
|
339
339
|
] });
|
|
340
340
|
const status = {
|
|
341
341
|
loading: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -361,7 +361,7 @@ function ModelPicker({ aiKey, provider, apiKey, address = "", delay = 0, value,
|
|
|
361
361
|
"aria-describedby": hintId,
|
|
362
362
|
onClick: () => onOpenChange(!open),
|
|
363
363
|
className: cn(
|
|
364
|
-
"eb:flex eb:h-9 eb:w-full eb:min-w-0 eb:items-center eb:gap-2 eb:rounded-
|
|
364
|
+
"eb:flex eb:h-9 eb:w-full eb:min-w-0 eb:items-center eb:gap-2 eb:rounded-lg2 eb:border eb:border-input eb:bg-transparent eb:px-3 eb:text-left eb:shadow-xs eb:transition-[color,box-shadow] eb:outline-none eb:focus-visible:border-ring eb:focus-visible:ring-[3px] eb:focus-visible:ring-ring/50",
|
|
365
365
|
open && "eb:border-ring"
|
|
366
366
|
),
|
|
367
367
|
"data-testid": "eb-ai-connect-model",
|
|
@@ -375,7 +375,7 @@ function ModelPicker({ aiKey, provider, apiKey, address = "", delay = 0, value,
|
|
|
375
375
|
open && /* @__PURE__ */ jsxs(
|
|
376
376
|
"div",
|
|
377
377
|
{
|
|
378
|
-
className: "eb:flex eb:flex-col eb:overflow-hidden eb:rounded-
|
|
378
|
+
className: "eb:flex eb:flex-col eb:overflow-hidden eb:rounded-lg2 eb:border eb:border-border eb:bg-background",
|
|
379
379
|
onKeyDown: (event) => event.key === "Escape" && close(),
|
|
380
380
|
"data-eb-models": "",
|
|
381
381
|
"data-testid": "eb-ai-connect-models",
|
|
@@ -401,7 +401,7 @@ function ModelPicker({ aiKey, provider, apiKey, address = "", delay = 0, value,
|
|
|
401
401
|
autoCapitalize: "off",
|
|
402
402
|
autoCorrect: "off",
|
|
403
403
|
spellCheck: false,
|
|
404
|
-
className: "eb:h-8 eb:w-full eb:rounded-
|
|
404
|
+
className: "eb:h-8 eb:w-full eb:rounded-lg2 eb:bg-surface-75 eb:pr-2 eb:pl-7 eb:text-[13px] eb:text-foreground eb:outline-none eb:placeholder:text-foreground-muted eb:focus-visible:ring-2 eb:focus-visible:ring-ring/40",
|
|
405
405
|
"data-testid": "eb-ai-connect-model-search"
|
|
406
406
|
}
|
|
407
407
|
)
|
|
@@ -413,7 +413,7 @@ function ModelPicker({ aiKey, provider, apiKey, address = "", delay = 0, value,
|
|
|
413
413
|
"aria-pressed": freeOnly,
|
|
414
414
|
onClick: () => setFreeOnly((on) => !on),
|
|
415
415
|
className: cn(
|
|
416
|
-
"eb:inline-flex eb:h-8 eb:shrink-0 eb:items-center eb:rounded-
|
|
416
|
+
"eb:inline-flex eb:h-8 eb:shrink-0 eb:items-center eb:rounded-lg2 eb:border eb:px-2.5 eb:text-[12px] eb:font-medium eb:transition-colors eb:outline-none eb:focus-visible:ring-[3px] eb:focus-visible:ring-ring/50",
|
|
417
417
|
freeOnly ? "eb:border-success/40 eb:bg-success/10 eb:text-success" : "eb:border-border eb:text-foreground-lighter eb:hover:bg-muted"
|
|
418
418
|
),
|
|
419
419
|
children: t("Free only")
|
|
@@ -599,7 +599,7 @@ function ConnectAi({ aiKey }) {
|
|
|
599
599
|
tabIndex: checked ? 0 : -1,
|
|
600
600
|
onClick: () => choose(provider.id),
|
|
601
601
|
className: cn(
|
|
602
|
-
"eb:flex eb:min-w-0 eb:flex-col eb:gap-0.5 eb:rounded-
|
|
602
|
+
"eb:flex eb:min-w-0 eb:flex-col eb:gap-0.5 eb:rounded-lg2 eb:border eb:px-2.5 eb:py-2 eb:text-left eb:transition-colors eb:outline-none eb:focus-visible:ring-[3px] eb:focus-visible:ring-ring/50",
|
|
603
603
|
checked ? "eb:border-primary eb:bg-primary/10" : "eb:border-border eb:hover:bg-muted"
|
|
604
604
|
),
|
|
605
605
|
children: [
|
|
@@ -615,7 +615,7 @@ function ConnectAi({ aiKey }) {
|
|
|
615
615
|
})
|
|
616
616
|
}
|
|
617
617
|
),
|
|
618
|
-
refused && /* @__PURE__ */ jsxs2("p", { role: "alert", className: "eb:flex eb:items-start eb:gap-2 eb:rounded-
|
|
618
|
+
refused && /* @__PURE__ */ jsxs2("p", { role: "alert", className: "eb:flex eb:items-start eb:gap-2 eb:rounded-lg2 eb:border eb:border-destructive/30 eb:bg-destructive/10 eb:px-3 eb:py-2 eb:text-[12.5px] eb:text-destructive", children: [
|
|
619
619
|
/* @__PURE__ */ jsx2(TriangleAlert, { className: "eb:mt-px eb:size-3.5 eb:shrink-0", "aria-hidden": "true" }),
|
|
620
620
|
t("{provider} refused the last key. Paste another one.", { provider: name })
|
|
621
621
|
] }),
|
|
@@ -637,7 +637,7 @@ function ConnectAi({ aiKey }) {
|
|
|
637
637
|
]
|
|
638
638
|
}
|
|
639
639
|
) }),
|
|
640
|
-
free && /* @__PURE__ */ jsx2("span", { className: "eb:rounded-
|
|
640
|
+
free && /* @__PURE__ */ jsx2("span", { className: "eb:rounded-md eb:bg-success/10 eb:px-2.5 eb:py-1 eb:text-[11.5px] eb:font-medium eb:text-success", children: t(free) })
|
|
641
641
|
] }),
|
|
642
642
|
needsAddress && /* @__PURE__ */ jsxs2("div", { className: "eb:flex eb:flex-col eb:gap-1.5", children: [
|
|
643
643
|
/* @__PURE__ */ jsx2(Label, { htmlFor: addressId, children: t("API address") }),
|
|
@@ -688,7 +688,7 @@ function ConnectAi({ aiKey }) {
|
|
|
688
688
|
"button",
|
|
689
689
|
{
|
|
690
690
|
type: "button",
|
|
691
|
-
className: "eb:absolute eb:top-1/2 eb:right-1 eb:flex eb:size-7 eb:-translate-y-1/2 eb:items-center eb:justify-center eb:rounded eb:text-foreground-muted eb:transition-colors eb:outline-none eb:hover:bg-muted eb:hover:text-foreground eb:focus-visible:ring-[3px] eb:focus-visible:ring-ring/50",
|
|
691
|
+
className: "eb:absolute eb:top-1/2 eb:right-1 eb:flex eb:size-7 eb:-translate-y-1/2 eb:items-center eb:justify-center eb:rounded-md eb:text-foreground-muted eb:transition-colors eb:outline-none eb:hover:bg-muted eb:hover:text-foreground eb:focus-visible:ring-[3px] eb:focus-visible:ring-ring/50",
|
|
692
692
|
onClick: () => setShown((current) => !current),
|
|
693
693
|
"aria-label": shown ? t("Hide the key") : t("Show the key"),
|
|
694
694
|
"aria-pressed": shown,
|
|
@@ -884,7 +884,7 @@ function ProofreadButton({ context, proofread }) {
|
|
|
884
884
|
fixes && fixes.length > 0 && /* @__PURE__ */ jsx3("ul", { className: "eb:flex eb:flex-col eb:gap-2.5", "aria-label": t("Corrections"), children: fixes.map((fix) => /* @__PURE__ */ jsxs3(
|
|
885
885
|
"li",
|
|
886
886
|
{
|
|
887
|
-
className: cn("eb:rounded-
|
|
887
|
+
className: cn("eb:rounded-lg2 eb:border eb:border-border eb:p-3", fix.state !== "open" && "eb:bg-muted/40"),
|
|
888
888
|
"data-testid": "eb-proofread-fix",
|
|
889
889
|
"data-state": fix.state,
|
|
890
890
|
children: [
|
|
@@ -938,7 +938,7 @@ import { ChevronDown as ChevronDown2, Languages, Loader2 as Loader22, Sparkles,
|
|
|
938
938
|
|
|
939
939
|
// src/ai/chip.js
|
|
940
940
|
var chipClassName = (selected = false) => cn(
|
|
941
|
-
"eb:inline-flex eb:h-[22px] eb:items-center eb:gap-1 eb:rounded-
|
|
941
|
+
"eb:inline-flex eb:h-[22px] eb:items-center eb:gap-1 eb:rounded-md eb:border eb:px-2.5 eb:text-[12px] eb:font-medium eb:transition-colors eb:outline-none eb:focus-visible:ring-[3px] eb:focus-visible:ring-ring/50 eb:disabled:opacity-50",
|
|
942
942
|
selected ? "eb:border-primary eb:bg-primary eb:text-primary-foreground" : "eb:border-border eb:bg-background eb:text-foreground eb:hover:border-primary/50 eb:hover:bg-primary/5"
|
|
943
943
|
);
|
|
944
944
|
|
|
@@ -1228,7 +1228,7 @@ function SubjectIdeas({ editor, meta, onSubject, suggest, variables = null }) {
|
|
|
1228
1228
|
running ? spinner : /* @__PURE__ */ jsx5(Sparkles2, { className: "eb:size-3", "aria-hidden": "true" }),
|
|
1229
1229
|
t("Suggest subjects")
|
|
1230
1230
|
] }),
|
|
1231
|
-
ideas && /* @__PURE__ */ jsxs5("div", { className: "eb:space-y-2 eb:rounded-
|
|
1231
|
+
ideas && /* @__PURE__ */ jsxs5("div", { className: "eb:space-y-2 eb:rounded-lg2 eb:border eb:border-border eb:p-1.5", children: [
|
|
1232
1232
|
/* @__PURE__ */ jsx5("div", { role: "radiogroup", "aria-label": t("Subject ideas"), className: "eb:space-y-0.5", onKeyDown, children: options.map((option, index) => {
|
|
1233
1233
|
const chosen = index === checked;
|
|
1234
1234
|
return /* @__PURE__ */ jsxs5(
|
|
@@ -1239,7 +1239,7 @@ function SubjectIdeas({ editor, meta, onSubject, suggest, variables = null }) {
|
|
|
1239
1239
|
"aria-checked": chosen,
|
|
1240
1240
|
tabIndex: index === tabStop ? 0 : -1,
|
|
1241
1241
|
className: cn(
|
|
1242
|
-
"eb:flex eb:w-full eb:items-start eb:gap-2 eb:rounded eb:px-2 eb:py-1.5 eb:text-left eb:text-[12.5px] eb:leading-snug eb:transition-colors eb:outline-none eb:focus-visible:ring-[3px] eb:focus-visible:ring-ring/50",
|
|
1242
|
+
"eb:flex eb:w-full eb:items-start eb:gap-2 eb:rounded-md eb:px-2 eb:py-1.5 eb:text-left eb:text-[12.5px] eb:leading-snug eb:transition-colors eb:outline-none eb:focus-visible:ring-[3px] eb:focus-visible:ring-ring/50",
|
|
1243
1243
|
chosen ? "eb:bg-primary/10 eb:text-foreground" : "eb:text-foreground-lighter eb:hover:bg-muted"
|
|
1244
1244
|
),
|
|
1245
1245
|
onClick: () => onSubject(option.text),
|