@one-million-lines/email-builder 0.6.0 → 0.6.2
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 +59 -0
- package/dist/core/plugins.d.ts +6 -0
- package/dist/email-builder.cjs +1 -1
- package/dist/email-builder.cjs.map +1 -1
- package/dist/email-builder.js +2208 -2129
- package/dist/email-builder.js.map +1 -1
- package/dist/index.d.ts +25 -0
- package/dist/plugins/recommendations/state.d.ts +8 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,65 @@ All notable changes to this package are documented here.
|
|
|
4
4
|
This project adheres to [Semantic Versioning](https://semver.org/) and the
|
|
5
5
|
[Keep a Changelog](https://keepachangelog.com/) format.
|
|
6
6
|
|
|
7
|
+
## [0.6.2] — 2026-09-03
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **Link popover — complete UX overhaul**
|
|
12
|
+
- **Shows linked text preview** — a "Text:" row displays the selected text so
|
|
13
|
+
users know exactly what will become clickable.
|
|
14
|
+
- **URL ↔ special link are now two-way synced** — selecting a special link type
|
|
15
|
+
(Unsubscribe, View in browser, etc.) auto-fills the URL field with the
|
|
16
|
+
corresponding placeholder (`{{unsubscribe_url}}`). Typing a placeholder URL
|
|
17
|
+
in the field auto-selects the matching link type. Selecting "— Custom URL —"
|
|
18
|
+
clears the placeholder.
|
|
19
|
+
- **Placeholder appears in the URL field** — the href that will be written into
|
|
20
|
+
the `<a>` tag is always visible and editable in the URL input, so users
|
|
21
|
+
understand that the placeholder IS the href value.
|
|
22
|
+
- **"Insert link" / "Update link" primary CTA** — replaced the small "Apply"
|
|
23
|
+
button with a full-width blue primary button. The label changes to
|
|
24
|
+
"Update link" when re-opening an existing link.
|
|
25
|
+
- **Detects existing links on re-open** — when the cursor is inside or a
|
|
26
|
+
selection spans an existing `<a>` tag, the popover pre-fills the href and
|
|
27
|
+
auto-selects the special link type (if the href matches a known placeholder).
|
|
28
|
+
- **Enter key** confirms the link; **Escape** closes without applying.
|
|
29
|
+
- Link type select now shows the placeholder inline in each option for
|
|
30
|
+
clarity: `Unsubscribe — {{unsubscribe_url}}`.
|
|
31
|
+
|
|
32
|
+
## [0.6.1] — 2026-09-03
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- **Rich-text toolbar position** — removed incorrect `window.scrollY` / `scrollX`
|
|
37
|
+
offsets from the `position: fixed` toolbar. `getBoundingClientRect()` already
|
|
38
|
+
returns viewport-relative coordinates; adding scroll offsets pushed the toolbar
|
|
39
|
+
far off-screen when the canvas was scrolled. Also: toolbar is now clamped to
|
|
40
|
+
the viewport on all four edges; all popovers (link, colour, emoji, merge-tag)
|
|
41
|
+
now open **upward** (`bottom-full`) instead of downward, preventing them from
|
|
42
|
+
falling off-screen when the toolbar is near the bottom of the visible area.
|
|
43
|
+
- **Color inputs show resolved hex** — `ColorInput` in the right sidebar now
|
|
44
|
+
displays the resolved hex value (e.g., `#FFFFFF`) in the text field instead of
|
|
45
|
+
the raw theme token string (e.g., `{colors.buttonText}`). The token is still
|
|
46
|
+
preserved in the document until the user types a custom value. The **Reset to
|
|
47
|
+
theme token** button tooltip was updated to show the token path.
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- **Recommendations → opt-in plugin** — the Recommendations panel in the right
|
|
52
|
+
sidebar is now hidden by default and only appears when explicitly enabled.
|
|
53
|
+
This decouples the feature from the core editor for hosts that do not use
|
|
54
|
+
personalised recommendations.
|
|
55
|
+
- New React prop: `<EmailBuilder enableRecommendations />`.
|
|
56
|
+
- New plugin object: `recommendationsPlugin` (pass to `registerPlugin()`).
|
|
57
|
+
- New `BuilderHandle` method: `builder.registerRecommendationsPlugin()`.
|
|
58
|
+
- New reactive store export: `useRecommendationsStore`.
|
|
59
|
+
- New documentation: `src/recommendations/README.md` — covers the data
|
|
60
|
+
schema, algorithm catalog, activation, backend processor integration, and
|
|
61
|
+
the legacy Vibetrace interop shape.
|
|
62
|
+
- **No breaking change for existing documents** — any `module.data.recommendations`
|
|
63
|
+
already in saved JSON is preserved; the panel just won't be visible until
|
|
64
|
+
the plugin is registered.
|
|
65
|
+
|
|
7
66
|
## [0.6.0] — 2026-09-03
|
|
8
67
|
|
|
9
68
|
### Added
|
package/dist/core/plugins.d.ts
CHANGED
|
@@ -51,6 +51,12 @@ export interface BuilderHandle {
|
|
|
51
51
|
setAIProvider: (provider: AIProvider) => void;
|
|
52
52
|
/** Configure the list of merge tags available in the text element sidebar. */
|
|
53
53
|
registerMergeTags: (tags: MergeTag[]) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Opt in to the recommendations engine. When called, the Recommendations
|
|
56
|
+
* panel appears in the right sidebar for any module that contains a
|
|
57
|
+
* `productGrid` element. Without this call the panel stays hidden.
|
|
58
|
+
*/
|
|
59
|
+
registerRecommendationsPlugin: () => void;
|
|
54
60
|
}
|
|
55
61
|
export type PluginType = "modules" | "themes" | "asset-provider" | "product-provider" | "voucher-provider" | "ai-provider";
|
|
56
62
|
export interface Plugin {
|