useblocks 1.2.3 → 1.3.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 +83 -0
- package/iframe/.vite/manifest.json +4 -4
- package/iframe/css/sandbox.css +19 -0
- package/iframe/{iframe-eblock.0f8a7cdc.html → iframe-eblock.93ad29cb.html} +2 -2
- package/iframe/{iframe.0f8a7cdc.html → iframe.93ad29cb.html} +2 -2
- package/iframe/js/elMarkupHelper.DIwsI5Kn.js +278 -0
- package/iframe/js/iframe-eblock.body.93ad29cb.js +9 -0
- package/iframe/js/iframe-eblock.js +2 -2
- package/iframe/js/iframe.body.93ad29cb.js +129 -0
- package/iframe/js/iframe.js +2 -2
- package/iframe/js/sanitize-html/sanitize-html.js +46 -21756
- package/package.json +1 -1
- package/runtime/react/index.js +1 -1
- package/static/core/{cc6447d7.js → 1145ca23.js} +1 -1
- package/static/core/118506d6.js +1 -0
- package/static/core/{af791cc2.js → 1a6b1a16.js} +1 -1
- package/static/core/{772dbf26.js → 1ad19645.js} +1 -1
- package/static/core/{14db5918.js → 3b4f1ea6.js} +1 -1
- package/static/core/{980125d2.js → 420225e5.js} +1 -1
- package/static/core/{24514bff.js → 4e636cba.js} +1 -1
- package/static/core/{ec5c9b68.js → 5aa5d7aa.js} +1 -1
- package/static/core/5d016517.js +7 -0
- package/static/core/{5f9e49c5.js → 6cd8eb59.js} +2 -2
- package/static/core/{23bd4db7.js → 6e9925ab.js} +1 -1
- package/static/core/{de1624b4.js → 73700c9c.js} +3 -3
- package/static/core/{4714d568.js → 7a68c0fa.js} +1 -1
- package/static/core/{f369973d.js → 7b850506.js} +1 -1
- package/static/core/7f0ff3a4.js +28 -0
- package/static/core/{e56fc965.js → 8ad21dba.js} +1 -1
- package/static/core/{7bcc8e64.js → 8e591d23.js} +1 -1
- package/static/core/93efe4e9.js +2 -0
- package/static/core/{7bdd0086.js → 99a951e3.js} +2 -2
- package/static/core/{4c6480d1.js → a0351c52.js} +1 -1
- package/static/core/{50e5a944.js → a5935021.js} +1 -1
- package/static/core/{501559e1.js → a6303cb2.js} +1 -1
- package/static/core/{d19c0f8b.js → a971abbf.js} +1 -1
- package/static/core/{d894dc76.js → b526b4ff.js} +2 -2
- package/static/core/{730b266e.js → bc06e36e.js} +1 -1
- package/static/core/{ce15bbe4.js → be3fdb1c.js} +1 -1
- package/static/core/{4bcf1434.js → c108718d.js} +1 -1
- package/static/core/{b870ed7e.js → c2b2463c.js} +1 -1
- package/static/core/e142a2c6.js +1 -0
- package/static/core/{b5ce7e85.js → f4d448cc.js} +11 -11
- package/static/core/{49be45c4.js → ff7d14e8.js} +1 -1
- package/static/esm/{73935695.js → b49a4ecd.js} +1 -1
- package/static/umd-runtime/{runtime.DKIA3Mo3.js → runtime.C42f6jli.js} +1 -1
- package/useblocks-core.93ad29cb.js +859 -0
- package/useblocks-esm.js +11 -11
- package/{useblocks-po.0f8a7cdc.js → useblocks-po.93ad29cb.js} +1 -1
- package/useblocks.js +12 -12
- package/vendor/useblocks-ui-kit/package.json +1 -1
- package/iframe/js/elMarkupHelper.CVRl29u5.js +0 -277
- package/iframe/js/iframe-eblock.body.0f8a7cdc.js +0 -9
- package/iframe/js/iframe.body.0f8a7cdc.js +0 -129
- package/iframe/js/sanitize-html/sanitize-html.min.js +0 -16923
- package/static/core/423b60ed.js +0 -28
- package/static/core/962d3bd3.js +0 -7
- package/static/core/97fd2a9c.js +0 -2
- package/static/core/9f02da15.js +0 -1
- package/static/core/d4984fc6.js +0 -1
- 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.
|
|
15
|
-
"file": "js/elMarkupHelper.
|
|
14
|
+
"_elMarkupHelper.DIwsI5Kn.js": {
|
|
15
|
+
"file": "js/elMarkupHelper.DIwsI5Kn.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.
|
|
29
|
+
"_elMarkupHelper.DIwsI5Kn.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.
|
|
38
|
+
"_elMarkupHelper.DIwsI5Kn.js"
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
41
|
"js/typograf/typograf.all.js": {
|
package/iframe/css/sandbox.css
CHANGED
|
@@ -2220,3 +2220,22 @@ em-replace::after {
|
|
|
2220
2220
|
.em-disable-element-table-menu {
|
|
2221
2221
|
display: none;
|
|
2222
2222
|
}
|
|
2223
|
+
|
|
2224
|
+
/* Buttons and items of the custom table menu look like the buttons of the atom toolbar. */
|
|
2225
|
+
.em-table-menu-group,
|
|
2226
|
+
.em-table-menu-item {
|
|
2227
|
+
display: block;
|
|
2228
|
+
box-sizing: border-box;
|
|
2229
|
+
width: 20px;
|
|
2230
|
+
height: 20px;
|
|
2231
|
+
font-size: 16px;
|
|
2232
|
+
text-align: center;
|
|
2233
|
+
color: var(--ub-colorAtomToolbarIcon, #344966);
|
|
2234
|
+
cursor: pointer;
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
.em-table-menu-group:hover,
|
|
2238
|
+
.em-table-menu-item:hover {
|
|
2239
|
+
background: var(--ub-colorPrimaryBgHover, #b8d4e9);
|
|
2240
|
+
border-radius: 3px;
|
|
2241
|
+
}
|
|
@@ -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=
|
|
7
|
-
<script defer src="./js/boot-guard.js" data-entry="./js/iframe-eblock.js?v=
|
|
6
|
+
__useblocks__.bootCanvas("./js/iframe-eblock.js?v=93ad29cb");</script>
|
|
7
|
+
<script defer src="./js/boot-guard.js" data-entry="./js/iframe-eblock.js?v=93ad29cb" 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=
|
|
7
|
-
<script defer src="./js/boot-guard.js" data-entry="./js/iframe.js?v=
|
|
6
|
+
__useblocks__.bootCanvas("./js/iframe.js?v=93ad29cb");</script>
|
|
7
|
+
<script defer src="./js/boot-guard.js" data-entry="./js/iframe.js?v=93ad29cb" data-ns="__useblocks__"></script>
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
</body>
|