@seliseblocks/mailcraft 0.2.16 → 0.2.19

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 (78) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/DOCS.md +70 -67
  3. package/README.md +8 -8
  4. package/README.md.txt +8 -8
  5. package/dist/mailcraft-editor.bundle.js +89 -76
  6. package/dist/mailcraft-editor.bundle.js.map +3 -3
  7. package/examples/templates/activate-your-account.html +1 -1
  8. package/examples/templates/back-in-stock.html +4 -4
  9. package/examples/templates/cart-left-behind.html +3 -3
  10. package/examples/templates/community-giveaway.html +3 -3
  11. package/examples/templates/frontend-futures-invite.html +3 -3
  12. package/examples/templates/give-25-get-25.html +2 -2
  13. package/examples/templates/invoice-paid.html +3 -3
  14. package/examples/templates/meet-nova-launch.html +7 -7
  15. package/examples/templates/mega-weekend-sale.html +1 -1
  16. package/examples/templates/order-confirmed.html +6 -6
  17. package/examples/templates/rate-your-headphones.html +3 -3
  18. package/examples/templates/reset-your-password.html +1 -1
  19. package/examples/templates/thankyou-promo-code.html +3 -3
  20. package/examples/templates/the-sunday-brief.html +4 -4
  21. package/examples/templates/welcome-to-your-workspace.html +4 -4
  22. package/examples/templates/your-order-shipped.html +2 -2
  23. package/examples/templates/your-password-was-changed.html +2 -2
  24. package/examples/templates/your-signin-code.html +1 -1
  25. package/examples/vanilla.html +66 -66
  26. package/package.json +1 -1
  27. package/src/core/binder.js +10 -0
  28. package/src/core/blocks.js +3 -3
  29. package/src/core/editor-core.js +195 -6
  30. package/src/core/export.js +311 -22
  31. package/src/core/i18n/ar.js +2 -0
  32. package/src/core/i18n/bg.js +2 -0
  33. package/src/core/i18n/bn.js +2 -0
  34. package/src/core/i18n/ca.js +2 -0
  35. package/src/core/i18n/cs.js +2 -0
  36. package/src/core/i18n/da.js +2 -0
  37. package/src/core/i18n/de-CH.js +2 -0
  38. package/src/core/i18n/de.js +2 -0
  39. package/src/core/i18n/dz.js +2 -0
  40. package/src/core/i18n/el.js +2 -0
  41. package/src/core/i18n/en.js +2 -0
  42. package/src/core/i18n/es.js +2 -0
  43. package/src/core/i18n/et.js +2 -0
  44. package/src/core/i18n/fi.js +2 -0
  45. package/src/core/i18n/fr.js +2 -0
  46. package/src/core/i18n/hr.js +2 -0
  47. package/src/core/i18n/hu.js +2 -0
  48. package/src/core/i18n/index.js +83 -83
  49. package/src/core/i18n/it.js +2 -0
  50. package/src/core/i18n/lt.js +2 -0
  51. package/src/core/i18n/lv.js +2 -0
  52. package/src/core/i18n/nb.js +2 -0
  53. package/src/core/i18n/nl.js +2 -0
  54. package/src/core/i18n/pl.js +2 -0
  55. package/src/core/i18n/pt.js +2 -0
  56. package/src/core/i18n/ro.js +2 -0
  57. package/src/core/i18n/ru.js +2 -0
  58. package/src/core/i18n/sk.js +2 -0
  59. package/src/core/i18n/sl.js +2 -0
  60. package/src/core/i18n/sv.js +2 -0
  61. package/src/core/i18n/tr.js +2 -0
  62. package/src/core/i18n/uk.js +2 -0
  63. package/src/core/icons.js +17 -43
  64. package/src/core/ids.js +1 -1
  65. package/src/core/import-html.js +390 -20
  66. package/src/core/layout-style.js +25 -0
  67. package/src/core/parse.js +10 -10
  68. package/src/core/placeholder.js +15 -15
  69. package/src/core/sanitize.js +4 -1
  70. package/src/core/theme.js +22 -1
  71. package/src/core/variables.js +11 -11
  72. package/src/mailcraft-editor.js +11 -1
  73. package/src/render/block-body.js +129 -17
  74. package/src/render/canvas.js +35 -6
  75. package/src/render/fields.js +19 -0
  76. package/src/render/focus-preserve.js +158 -158
  77. package/src/render/screenshot.js +26 -3
  78. package/src/render/style.js +6 -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 there is no document format to store or migrate:
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 exported as `{{#if …}}` / `{{#each …}}` for your sending engine |
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 Web Component, zero runtime deps
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 the package ships no files of its own.
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 methods, plus Ctrl/Cmd+Z, +E.
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() internal, shape may change.
131
- Do not expect a campaign/title option there is none; <title> is "Email".
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 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.
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