useblocks 1.2.3 → 1.2.5

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 (54) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/iframe/.vite/manifest.json +4 -4
  3. package/iframe/{iframe-eblock.0f8a7cdc.html → iframe-eblock.ad7a9d1f.html} +2 -2
  4. package/iframe/{iframe.0f8a7cdc.html → iframe.ad7a9d1f.html} +2 -2
  5. package/iframe/js/elMarkupHelper.vJSCLUyq.js +278 -0
  6. package/iframe/js/{iframe-eblock.body.0f8a7cdc.js → iframe-eblock.body.ad7a9d1f.js} +1 -1
  7. package/iframe/js/iframe-eblock.js +2 -2
  8. package/iframe/js/{iframe.body.0f8a7cdc.js → iframe.body.ad7a9d1f.js} +1 -1
  9. package/iframe/js/iframe.js +2 -2
  10. package/iframe/js/sanitize-html/sanitize-html.js +46 -21756
  11. package/package.json +1 -1
  12. package/runtime/react/index.js +1 -1
  13. package/static/core/{4c6480d1.js → 220aeb6e.js} +1 -1
  14. package/static/core/{af791cc2.js → 25e324a7.js} +1 -1
  15. package/static/core/{ec5c9b68.js → 2d7469b5.js} +1 -1
  16. package/static/core/{23bd4db7.js → 35aeebd4.js} +1 -1
  17. package/static/core/35b68c2d.js +7 -0
  18. package/static/core/{b5ce7e85.js → 46b89e4e.js} +1 -1
  19. package/static/core/{d894dc76.js → 50843a12.js} +1 -1
  20. package/static/core/{cc6447d7.js → 51c86df3.js} +1 -1
  21. package/static/core/55135cf2.js +1 -0
  22. package/static/core/{e56fc965.js → 581a610a.js} +1 -1
  23. package/static/core/{4bcf1434.js → 67bd2b51.js} +1 -1
  24. package/static/core/{d19c0f8b.js → 719c3c6f.js} +1 -1
  25. package/static/core/{b870ed7e.js → 76d7fc00.js} +1 -1
  26. package/static/core/861ad8b1.js +28 -0
  27. package/static/core/{d4984fc6.js → 8dc1398d.js} +1 -1
  28. package/static/core/{24514bff.js → 8ddf51c0.js} +1 -1
  29. package/static/core/{7bcc8e64.js → 91a70e6b.js} +1 -1
  30. package/static/core/98e0618f.js +2 -0
  31. package/static/core/{772dbf26.js → 9ec744ee.js} +1 -1
  32. package/static/core/{4714d568.js → ac4fee3c.js} +1 -1
  33. package/static/core/{ce15bbe4.js → be3fdb1c.js} +1 -1
  34. package/static/core/{7bdd0086.js → bf98b554.js} +2 -2
  35. package/static/core/{50e5a944.js → c5066b60.js} +1 -1
  36. package/static/core/{5f9e49c5.js → d24bb113.js} +2 -2
  37. package/static/core/{730b266e.js → d7c1e1d9.js} +1 -1
  38. package/static/core/{de1624b4.js → e22d6382.js} +1 -1
  39. package/static/core/{14db5918.js → e33e9a92.js} +1 -1
  40. package/static/core/{980125d2.js → fb52c612.js} +1 -1
  41. package/static/esm/{73935695.js → 88c4c0b7.js} +1 -1
  42. package/static/umd-runtime/{runtime.DKIA3Mo3.js → runtime.CVHhHBC5.js} +1 -1
  43. package/useblocks-core.ad7a9d1f.js +859 -0
  44. package/useblocks-esm.js +11 -11
  45. package/{useblocks-po.0f8a7cdc.js → useblocks-po.ad7a9d1f.js} +1 -1
  46. package/useblocks.js +12 -12
  47. package/vendor/useblocks-ui-kit/package.json +1 -1
  48. package/iframe/js/elMarkupHelper.CVRl29u5.js +0 -277
  49. package/iframe/js/sanitize-html/sanitize-html.min.js +0 -16923
  50. package/static/core/423b60ed.js +0 -28
  51. package/static/core/962d3bd3.js +0 -7
  52. package/static/core/97fd2a9c.js +0 -2
  53. package/static/core/9f02da15.js +0 -1
  54. package/useblocks-core.0f8a7cdc.js +0 -859
package/CHANGELOG.md CHANGED
@@ -6,6 +6,89 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
6
 
7
7
  ---
8
8
 
9
+ ## [1.2.5] - 2026-10-28
10
+
11
+ ### Added
12
+
13
+ - Block editor in the plugin: `show({ block })` and `showBlock(block, options)` display a block,
14
+ `openBlock(id | block)` opens it on top of the email and `closeBlock()` returns to the email, keeping
15
+ unsaved changes and undo history. `saveBlock()` saves the block, `getBlockSnapshot()` returns its
16
+ current code without saving, `show({ block, reload: true })` reloads the block
17
+ - Block events: `handleReadBlock`, `handleOpenBlock`, `handleCloseBlock`, `handleCloneBlock`,
18
+ `handleBlockInit`, `handleBlockChanged`, `handleSaveBlockButtonClick` (returning `false` cancels the
19
+ save), block autosaves and revisions — `handleBlockAutosave`, `handleRemoveBlockAutoSave`,
20
+ `handleReadBlockRevisions`, `handleReadBlockAutosave`; `isNew` flag on emails and blocks
21
+ - `openBlockFromEmailEnabled` flag (default `false`): the "Edit block" item in the block library opens
22
+ the block editor on top of the email
23
+ - `handleAnalyticsEvent` callback reports user actions in the editor to your analytics: saving, import
24
+ and export, checks, preview, layout conversion, AI. Events carry no IDs, names or email content
25
+ - `handleImportValidate` event reports markup errors in an imported file before the browser silently
26
+ "fixes" them; the import does not wait for it
27
+ - `saveHotkeyEnabled` flag (default `true`): with `false`, Ctrl+S / Cmd+S saves neither the email nor
28
+ the block
29
+ - `formButtonFieldInsertImageEnabled` flag again shows "Add image" in button settings. Outlook does not
30
+ display images inside buttons
31
+ - File Manager: `trashSupportsFolders` flag — when the storage trash cannot hold folders, a deleted
32
+ folder goes to the trash as a flat list of its files. "Empty trash" also works with providers that
33
+ have no `cleanTrash`
34
+
35
+ ### Fixed
36
+
37
+ - Typing on the canvas: fast typing mixed with Ctrl+Z / Ctrl+Y no longer drops characters; the cursor
38
+ stays where you edited after Enter, undo, redo and paste; typing over a selection and deleting a word
39
+ no longer split the text or strip formatting; Ctrl+Backspace and Delete remove a variable as a whole
40
+ - Deleting on the canvas: Delete on an element in a column no longer erases its neighbours, deleting a
41
+ selected list item no longer wipes the whole text block, nearby images and buttons stay in place;
42
+ Ctrl+X and "Delete" from the browser menu remove the text from the email
43
+ - Pasting: plain text keeps its line breaks and never runs scripts, pressing Ctrl+V again while a paste
44
+ is in progress no longer duplicates it, pasting at the edge of a link or variable lands outside it
45
+ - A link applied to a selection that extends past styled text gets its URL and settings
46
+ - Undo and redo: Ctrl+Y on the canvas and in the code editor redoes, like Ctrl+Shift+Z; undo and redo
47
+ from the browser menu go through the editor history; after undo the selection returns to where it was
48
+ - Text typed on the canvas is no longer lost when the editor responds slowly, and saving waits for all
49
+ pending edits
50
+ - Email scripts are no longer re-run when lists and tables are rebuilt, and the filter no longer
51
+ removes them
52
+ - Hovering no longer disrupts the cursor and typing in the block being edited
53
+ - Email code parsing: malformed closing tags, a lone `<`, `<?…>` constructs and table attributes are
54
+ parsed the way browsers do — table rows no longer drop out, a line break after `<style>` is kept
55
+ - Changed styles are written to the email as hex colours instead of `rgb()`
56
+ - Showing an email in the plugin: subject and preheader passed to `show()` are no longer overridden by
57
+ the layout; repeating `show()` or `reset()` for the same email and showing saved code no longer
58
+ overwrite unsaved edits; `setConfig()` without a mode keeps the switcher selection
59
+ - Switching emails: version history, comments, AI chat and AI replies of the previous email no longer
60
+ leak into the new one
61
+ - "Save" stays enabled during autosave, and the first save of a new email keeps the undo history; on
62
+ the free plan autosave keeps working after switching to another email
63
+ - AI email and image generation in the plugin no longer spins forever; subject and preheader from AI
64
+ land in the header fields
65
+ - The typograph no longer breaks email markup: its result is checked before it is applied, and numbers
66
+ and currency are fixed only in text
67
+ - Image compression on upload: photos are compressed by quality rather than resolution; an image that
68
+ already fits the limits is not recompressed
69
+ - Dropping an image file onto an image replaces it again; "Edit" on an image placeholder opens file
70
+ upload
71
+ - The canvas follows the interface theme, and the "system" theme follows the OS after a reload too
72
+ - Importing an email without `<body>` no longer crashes the canvas; Word tags (`<o:p>`) are stripped
73
+ from the subject
74
+ - Outlook export uses the email subject for Subject
75
+ - An empty `<title>` is no longer reported as a code error
76
+ - Server error messages come in the interface language rather than the browser language
77
+ - In Safari a part of the page that failed to load is retried without reloading the page
78
+ - Block editor: button, link and cell settings apply again, clicking the gap between columns no longer
79
+ crashes the canvas, "Merge blocks" works, project fonts and AMP are saved with the block
80
+ - File Manager: file names in table view no longer collapse into a column on narrow screens, and a
81
+ partially emptied trash is no longer reported as a success
82
+ - Translations: timer duration and a duplicated "Custom fonts" in the Russian interface
83
+
84
+ ### Changed
85
+
86
+ - `lockEditor: true` now locks more than the canvas and code: import, undo and redo, version history,
87
+ subject and preheader fields, AI chat, the layout converter, Gmail annotations and the "Template"
88
+ switch are disabled. The buttons stay in place with a "Read only" tooltip; API methods work as before
89
+
90
+ ---
91
+
9
92
  ## [1.1.104] - 2026-10-13
10
93
 
11
94
  ### Added
@@ -11,8 +11,8 @@
11
11
  "src": "../packages/html2amp/rules.json",
12
12
  "isDynamicEntry": true
13
13
  },
14
- "_elMarkupHelper.CVRl29u5.js": {
15
- "file": "js/elMarkupHelper.CVRl29u5.js",
14
+ "_elMarkupHelper.vJSCLUyq.js": {
15
+ "file": "js/elMarkupHelper.vJSCLUyq.js",
16
16
  "name": "elMarkupHelper",
17
17
  "dynamicImports": [
18
18
  "../packages/html2amp/rules.json",
@@ -26,7 +26,7 @@
26
26
  "src": "iframe-eblock.html",
27
27
  "isEntry": true,
28
28
  "imports": [
29
- "_elMarkupHelper.CVRl29u5.js"
29
+ "_elMarkupHelper.vJSCLUyq.js"
30
30
  ]
31
31
  },
32
32
  "iframe.html": {
@@ -35,7 +35,7 @@
35
35
  "src": "iframe.html",
36
36
  "isEntry": true,
37
37
  "imports": [
38
- "_elMarkupHelper.CVRl29u5.js"
38
+ "_elMarkupHelper.vJSCLUyq.js"
39
39
  ]
40
40
  },
41
41
  "js/typograf/typograf.all.js": {
@@ -3,8 +3,8 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
5
5
  <script>var e=window.__useblocks__||(window.__useblocks__={});(function(){"use strict";e===void 0&&(window.__amdEnv={});var t=window.parent&&window.parent!==window?window.parent:null;if(!t||typeof t.postMessage!=`function`)return;var n=`em:module-body`,r=`em:module-body-ack`,i=1e3,a=6e4,o=300,s={},c={},l=0,u=!1,d=!1;function f(){u||typeof window.addEventListener!=`function`||(u=!0,window.addEventListener(`message`,function(e){var n=e&&e.data;if(n&&typeof n==`object`&&e.source===t){if(n.operationId===r){var i=c[n.for];i&&i();return}var a=s[n.operationId];a&&a(n.data)}}))}function p(e){return d?null:(f(),new Promise(function(r){l+=1;var o=`em:body:`+l,u=`em:body-error:`+l,f=!1,p=null;function m(e){f||(f=!0,p!==null&&window.clearTimeout(p),delete s[o],delete s[u],delete c[o],r(e||null))}s[o]=m,s[u]=function(){m(null)},c[o]=function(){p!==null&&window.clearTimeout(p),p=window.setTimeout(function(){m(null)},a)},p=window.setTimeout(function(){d=!0,m(null)},i),t.postMessage({operationId:n,data:{url:e},result:o,error:u},`*`)}))}window.location&&window.location.protocol===`file:`||(e.moduleTransport=p);var m=null;function h(){m=null;try{t.postMessage({mark:`__emmDiagnostics__`,type:`loader`,items:(e.loaderTimings||[]).slice()},`*`)}catch{}}e.onLoaderTiming=function(){m===null&&(m=window.setTimeout(h,o))}})(),(function(){"use strict";e===void 0&&(window.__amdEnv={}),e.bootCanvas=function(t){e.canvasBooted=!0;var n=!1;function r(){if(!n){n=!0;var e=document.createElement(`script`);e.src=t,document.head.appendChild(e)}}var i=e.moduleTransport;if(typeof i!=`function`){r();return}var a;try{a=i(t,t)}catch{a=null}if(!a||typeof a.then!=`function`){r();return}a.then(function(t){if(!t||n){r();return}n=!0;var i=URL.createObjectURL(t),a=document.createElement(`script`);a.src=i,a.onload=function(){URL.revokeObjectURL(i)},a.onerror=function(){URL.revokeObjectURL(i),e.blobBlocked=!0,n=!1,r()},document.head.appendChild(a)},r)}})();
6
- __useblocks__.bootCanvas("./js/iframe-eblock.js?v=0f8a7cdc");</script>
7
- <script defer src="./js/boot-guard.js" data-entry="./js/iframe-eblock.js?v=0f8a7cdc" data-ns="__useblocks__"></script>
6
+ __useblocks__.bootCanvas("./js/iframe-eblock.js?v=ad7a9d1f");</script>
7
+ <script defer src="./js/boot-guard.js" data-entry="./js/iframe-eblock.js?v=ad7a9d1f" data-ns="__useblocks__"></script>
8
8
  </head>
9
9
  <body>
10
10
  </body>
@@ -3,8 +3,8 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
5
5
  <script>var e=window.__useblocks__||(window.__useblocks__={});(function(){"use strict";e===void 0&&(window.__amdEnv={});var t=window.parent&&window.parent!==window?window.parent:null;if(!t||typeof t.postMessage!=`function`)return;var n=`em:module-body`,r=`em:module-body-ack`,i=1e3,a=6e4,o=300,s={},c={},l=0,u=!1,d=!1;function f(){u||typeof window.addEventListener!=`function`||(u=!0,window.addEventListener(`message`,function(e){var n=e&&e.data;if(n&&typeof n==`object`&&e.source===t){if(n.operationId===r){var i=c[n.for];i&&i();return}var a=s[n.operationId];a&&a(n.data)}}))}function p(e){return d?null:(f(),new Promise(function(r){l+=1;var o=`em:body:`+l,u=`em:body-error:`+l,f=!1,p=null;function m(e){f||(f=!0,p!==null&&window.clearTimeout(p),delete s[o],delete s[u],delete c[o],r(e||null))}s[o]=m,s[u]=function(){m(null)},c[o]=function(){p!==null&&window.clearTimeout(p),p=window.setTimeout(function(){m(null)},a)},p=window.setTimeout(function(){d=!0,m(null)},i),t.postMessage({operationId:n,data:{url:e},result:o,error:u},`*`)}))}window.location&&window.location.protocol===`file:`||(e.moduleTransport=p);var m=null;function h(){m=null;try{t.postMessage({mark:`__emmDiagnostics__`,type:`loader`,items:(e.loaderTimings||[]).slice()},`*`)}catch{}}e.onLoaderTiming=function(){m===null&&(m=window.setTimeout(h,o))}})(),(function(){"use strict";e===void 0&&(window.__amdEnv={}),e.bootCanvas=function(t){e.canvasBooted=!0;var n=!1;function r(){if(!n){n=!0;var e=document.createElement(`script`);e.src=t,document.head.appendChild(e)}}var i=e.moduleTransport;if(typeof i!=`function`){r();return}var a;try{a=i(t,t)}catch{a=null}if(!a||typeof a.then!=`function`){r();return}a.then(function(t){if(!t||n){r();return}n=!0;var i=URL.createObjectURL(t),a=document.createElement(`script`);a.src=i,a.onload=function(){URL.revokeObjectURL(i)},a.onerror=function(){URL.revokeObjectURL(i),e.blobBlocked=!0,n=!1,r()},document.head.appendChild(a)},r)}})();
6
- __useblocks__.bootCanvas("./js/iframe.js?v=0f8a7cdc");</script>
7
- <script defer src="./js/boot-guard.js" data-entry="./js/iframe.js?v=0f8a7cdc" data-ns="__useblocks__"></script>
6
+ __useblocks__.bootCanvas("./js/iframe.js?v=ad7a9d1f");</script>
7
+ <script defer src="./js/boot-guard.js" data-entry="./js/iframe.js?v=ad7a9d1f" data-ns="__useblocks__"></script>
8
8
  </head>
9
9
  <body>
10
10
  </body>