@seliseblocks/mailcraft 0.2.15 → 0.2.18
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 +40 -0
- package/DOCS.md +70 -67
- package/README.md +8 -8
- package/README.md.txt +8 -8
- package/dist/mailcraft-editor.bundle.js +86 -78
- package/dist/mailcraft-editor.bundle.js.map +3 -3
- package/examples/templates/activate-your-account.html +1 -1
- package/examples/templates/back-in-stock.html +4 -4
- package/examples/templates/cart-left-behind.html +3 -3
- package/examples/templates/community-giveaway.html +3 -3
- package/examples/templates/frontend-futures-invite.html +3 -3
- package/examples/templates/give-25-get-25.html +2 -2
- package/examples/templates/invoice-paid.html +3 -3
- package/examples/templates/meet-nova-launch.html +7 -7
- package/examples/templates/mega-weekend-sale.html +1 -1
- package/examples/templates/order-confirmed.html +6 -6
- package/examples/templates/rate-your-headphones.html +3 -3
- package/examples/templates/reset-your-password.html +1 -1
- package/examples/templates/thankyou-promo-code.html +3 -3
- package/examples/templates/the-sunday-brief.html +4 -4
- package/examples/templates/welcome-to-your-workspace.html +4 -4
- package/examples/templates/your-password-was-changed.html +2 -2
- package/examples/templates/your-signin-code.html +1 -1
- package/examples/vanilla.html +63 -63
- package/package.json +1 -1
- package/src/core/binder.js +10 -0
- package/src/core/blocks.js +2 -2
- package/src/core/editor-core.js +195 -6
- package/src/core/export.js +311 -22
- package/src/core/i18n/ar.js +2 -0
- package/src/core/i18n/bg.js +2 -0
- package/src/core/i18n/bn.js +2 -0
- package/src/core/i18n/ca.js +2 -0
- package/src/core/i18n/cs.js +2 -0
- package/src/core/i18n/da.js +2 -0
- package/src/core/i18n/de-CH.js +2 -0
- package/src/core/i18n/de.js +2 -0
- package/src/core/i18n/dz.js +2 -0
- package/src/core/i18n/el.js +2 -0
- package/src/core/i18n/en.js +2 -0
- package/src/core/i18n/es.js +2 -0
- package/src/core/i18n/et.js +2 -0
- package/src/core/i18n/fi.js +2 -0
- package/src/core/i18n/fr.js +2 -0
- package/src/core/i18n/hr.js +2 -0
- package/src/core/i18n/hu.js +2 -0
- package/src/core/i18n/it.js +2 -0
- package/src/core/i18n/lt.js +2 -0
- package/src/core/i18n/lv.js +2 -0
- package/src/core/i18n/nb.js +2 -0
- package/src/core/i18n/nl.js +2 -0
- package/src/core/i18n/pl.js +2 -0
- package/src/core/i18n/pt.js +2 -0
- package/src/core/i18n/ro.js +2 -0
- package/src/core/i18n/ru.js +2 -0
- package/src/core/i18n/sk.js +2 -0
- package/src/core/i18n/sl.js +2 -0
- package/src/core/i18n/sv.js +2 -0
- package/src/core/i18n/tr.js +2 -0
- package/src/core/i18n/uk.js +2 -0
- package/src/core/import-html.js +390 -20
- package/src/core/layout-style.js +25 -0
- package/src/core/sanitize.js +4 -1
- package/src/core/theme.js +22 -1
- package/src/mailcraft-editor.js +14 -2
- package/src/render/block-body.js +129 -17
- package/src/render/canvas.js +35 -6
- package/src/render/fields.js +19 -0
- package/src/render/screenshot.js +40 -5
- package/src/render/story.js +46 -18
- package/src/render/style.js +1 -1
package/README.md.txt
CHANGED
|
@@ -31,7 +31,7 @@ editor.exportHtml();
|
|
|
31
31
|
editor.destroy();
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
That is a working editor. It speaks HTML in both directions
|
|
34
|
+
That is a working editor. It speaks HTML in both directions; there is no document format to store or migrate:
|
|
35
35
|
|
|
36
36
|
```js
|
|
37
37
|
editor.loadTemplate({ name: 'Welcome', html }); // give it HTML
|
|
@@ -45,7 +45,7 @@ Exported HTML is valid input to `loadTemplate`, so saving the export *is* saving
|
|
|
45
45
|
| | |
|
|
46
46
|
|---|---|
|
|
47
47
|
| `variables="first_name,company"` | merge tags, exported as `{{first_name}}` |
|
|
48
|
-
| Condition / Loop blocks | dynamic content
|
|
48
|
+
| Condition / Loop blocks | dynamic content, exported as `{{#if …}}` / `{{#each …}}` for your sending engine |
|
|
49
49
|
| `locale="de"` | 31 languages, RTL automatic |
|
|
50
50
|
| `theme="light" \| "dark"` | host owns light/dark; hides the built-in toggle |
|
|
51
51
|
| `ui-font="inherit"` | match your app's font |
|
|
@@ -64,7 +64,7 @@ Every attribute is also a property. TypeScript declarations ship with the packag
|
|
|
64
64
|
Everything an assistant needs to wire this up correctly:
|
|
65
65
|
|
|
66
66
|
```
|
|
67
|
-
PACKAGE @seliseblocks/mailcraft
|
|
67
|
+
PACKAGE @seliseblocks/mailcraft: Web Component, zero runtime deps
|
|
68
68
|
IMPORT import '@seliseblocks/mailcraft' (side effect: registers the element)
|
|
69
69
|
Safe to import under SSR; the element itself renders in a browser only.
|
|
70
70
|
TYPES TypeScript declarations ship in the package (types/index.d.ts) for every
|
|
@@ -117,18 +117,18 @@ UPLOADS A provider plus `maxBytes` are required, or every upload is refused;
|
|
|
117
117
|
limits? }
|
|
118
118
|
provider.limits is merged per key under .storageLimits, and satisfies
|
|
119
119
|
the requirement on its own. With no provider the library is empty and
|
|
120
|
-
local to the draft
|
|
120
|
+
local to the draft; the package ships no files of its own.
|
|
121
121
|
The editor never talks to a backend of its own; its only fetch is the
|
|
122
122
|
screenshot capture inlining the template's own images.
|
|
123
123
|
|
|
124
124
|
TOOLBAR Parts: logo status device undo redo theme ai code preview export
|
|
125
125
|
Attribute = allow-list (keep these). Property = { part: false } (drop these).
|
|
126
126
|
none|hidden|off|false = no bar at all; all = the default.
|
|
127
|
-
Hidden undo/redo/export stay reachable
|
|
127
|
+
Hidden undo/redo/export stay reachable: methods, plus Ctrl/Cmd+Z, +E.
|
|
128
128
|
preview, code and ai are bar-only: hiding them removes the panel.
|
|
129
129
|
|
|
130
|
-
DO NOT Do not use getContent()/setContent()
|
|
131
|
-
Do not expect a campaign/title option
|
|
130
|
+
DO NOT Do not use getContent()/setContent(): internal, shape may change.
|
|
131
|
+
Do not expect a campaign/title option; there is none. <title> is "Email".
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
## Develop
|
|
@@ -137,6 +137,6 @@ DO NOT Do not use getContent()/setContent() — internal, shape may change.
|
|
|
137
137
|
npm install && node build.js && npm test
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
`examples/vanilla.html` is a complete host page
|
|
140
|
+
`examples/vanilla.html` is a complete host page: open it directly, no server needed. It ships in the npm package too, so it is there after an install; the [hosted copy](https://mailcraft.seliseblocks.com/examples/vanilla.html) is the same file.
|
|
141
141
|
|
|
142
142
|
MIT
|