useblocks 1.3.4 → 1.3.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 (47) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/iframe/.vite/manifest.json +4 -4
  3. package/iframe/css/sandbox-dark.css +2 -9
  4. package/iframe/css/sandbox-light.css +2 -9
  5. package/iframe/css/sandbox.css +7 -23
  6. package/iframe/{iframe-eblock.6067f806.html → iframe-eblock.cc33bf3e.html} +2 -2
  7. package/iframe/{iframe.6067f806.html → iframe.cc33bf3e.html} +2 -2
  8. package/iframe/js/{elMarkupHelper.CnysQPQn.js → elMarkupHelper.DXAm8_Hg.js} +3 -3
  9. package/iframe/js/{iframe-eblock.body.6067f806.js → iframe-eblock.body.cc33bf3e.js} +1 -1
  10. package/iframe/js/iframe-eblock.js +2 -2
  11. package/iframe/js/{iframe.body.6067f806.js → iframe.body.cc33bf3e.js} +1 -1
  12. package/iframe/js/iframe.js +2 -2
  13. package/package.json +1 -1
  14. package/runtime/react/index.js +1 -1
  15. package/static/core/{a598ff39.js → 100d863a.js} +1 -1
  16. package/static/core/{4f3c76a3.js → 23b6bc56.js} +1 -1
  17. package/static/core/{398809e7.js → 2a1ca143.js} +1 -1
  18. package/static/core/{eb02ff3a.js → 2a88a7ce.js} +1 -1
  19. package/static/core/{8b7571c7.js → 2de2e937.js} +1 -1
  20. package/static/core/{17083884.js → 3b8edeff.js} +1 -1
  21. package/static/core/{2135fa81.js → 43ebd972.js} +1 -1
  22. package/static/core/{20f8e2cc.js → 5d75a7d6.js} +1 -1
  23. package/static/core/{19740098.js → 61af94af.js} +2 -2
  24. package/static/core/{18ab364c.js → 70467601.js} +1 -1
  25. package/static/core/{b060be67.js → 7d6f6c29.js} +1 -1
  26. package/static/core/{e7a5e467.js → 7d879bb5.js} +1 -1
  27. package/static/core/{401a0cfb.js → 80391bda.js} +1 -1
  28. package/static/core/{28a3c758.js → 875e46a6.js} +1 -1
  29. package/static/core/{807a1f00.js → 87aedddb.js} +1 -1
  30. package/static/core/{f8eeeaf9.js → 93382e36.js} +1 -1
  31. package/static/core/{840b1cdc.js → 95f608ad.js} +1 -1
  32. package/static/core/{94ba164b.js → 9a39a2dd.js} +5 -5
  33. package/static/core/{d3a3d35f.js → ac9606f9.js} +2 -2
  34. package/static/core/{ea7c2c44.js → b99d703d.js} +1 -1
  35. package/static/core/{13b95c98.js → bb91f8dd.js} +1 -1
  36. package/static/core/{0f33f820.js → bc6678e8.js} +1 -1
  37. package/static/core/{760dd956.js → c0fa9d67.js} +1 -1
  38. package/static/core/{7bf0fabd.js → cb30c7d7.js} +1 -1
  39. package/static/core/{78d9a411.js → d26051be.js} +1 -1
  40. package/static/core/{5519258a.js → d98674b7.js} +1 -1
  41. package/static/core/{3e34d695.js → f3f60a1a.js} +1 -1
  42. package/static/umd-runtime/{runtime.BqqI2xz2.js → runtime.CpvZ7_Hr.js} +1 -1
  43. package/{useblocks-core.6067f806.js → useblocks-core.cc33bf3e.js} +12 -12
  44. package/useblocks-esm.js +7 -7
  45. package/{useblocks-po.6067f806.js → useblocks-po.cc33bf3e.js} +1 -1
  46. package/useblocks.js +11 -11
  47. package/vendor/useblocks-ui-kit/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,51 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
6
 
7
7
  ---
8
8
 
9
+ ## [1.3.5] - 2026-11-03
10
+
11
+ ### Added
12
+
13
+ - Plugin platform, first stage: `defineCommand`, `defineView`, `domView`, `createSource`, `ok`, `err` and
14
+ `Arg` in `extensions-api`, plus the `Commands` and `Ui` services. A plugin can add its own commands, items
15
+ and panels to the `toolbar`, `sidebar`, `dialog`, `documentSettings`, `menu:document`, `menu:export`,
16
+ `menu:view`, `menu:save`, `statusBar` and `notices` locations
17
+ - Editor commands for plugins: `ui.openView`, `ui.closeView`, `document.getSnapshot`, `document.save` (saves
18
+ the same way as the "Save" button); `useCommand`, `useSource` and `useEditor` hooks in `extensions-react`;
19
+ `extensions-api/testing` test kit
20
+ - Block trash: "Empty trash" button for owners and admins
21
+ - AI layout conversion is now available on paid plans
22
+
23
+ ### Fixed
24
+
25
+ - A copy of a global block is a regular block: `handleCloneBlock` receives `code` without `em-block-id` and
26
+ `em-block-version`, and inserting the copy no longer counts as inserting the original or overwrites it.
27
+ "Create new block" from a copy no longer carries over the previous block's mark either
28
+ - Global block version: renaming and tagging no longer bump it, so emails don't see a fresh block as
29
+ outdated; `saveBlock()` sets a new version
30
+ - "Update current block": a block missing from the loaded list is looked up through `handleReadBlock`, then
31
+ in `handleReadBlocks`; if it isn't found, the edit is refused with `BLOCK_EDITING_ERROR` and
32
+ `handleSaveBlock` never receives an incomplete block. If `handleReadBlock` reports the block is gone, the
33
+ global block is created again
34
+ - The global block update window also appears when entering through the hidden editor, and "Updated" counts
35
+ only the instances actually replaced; the rest are shown as a warning
36
+ - The global block icon on the canvas matches the device icons and no longer breaks the "Drop here" label
37
+ - A new email with no edits is again created after 10 seconds, not after the `autosaveTimeout` interval
38
+ - ESM package: webpack no longer reports "Critical dependency", and its dev server no longer covers the page
39
+ with a warnings overlay
40
+ - Integrator sandbox scripts: `App` from `extensions-sandbox` no longer fails with "App not registered in DI
41
+ container"
42
+ - `ModalApi`: `update()` now changes the open window (the call used to have no effect) and keeps whatever you
43
+ didn't pass; `onClose` fires both on the close icon and on `close(id)`
44
+ - CLI plugin templates: the development stand and the `minimal` template no longer pull in React, the project
45
+ passes `tsc`, and the stand's demo email no longer triggers history requests that return 404
46
+
47
+ ### Changed
48
+
49
+ - An email created by autosave now arrives with `source` set to `AUTOSAVE`. It used to be empty: if you
50
+ detect this case by the empty value, update your check
51
+
52
+ ---
53
+
9
54
  ## [1.2.5] - 2026-10-28
10
55
 
11
56
  ### Added
@@ -11,8 +11,8 @@
11
11
  "src": "../packages/html2amp/rules.json",
12
12
  "isDynamicEntry": true
13
13
  },
14
- "_elMarkupHelper.CnysQPQn.js": {
15
- "file": "js/elMarkupHelper.CnysQPQn.js",
14
+ "_elMarkupHelper.DXAm8_Hg.js": {
15
+ "file": "js/elMarkupHelper.DXAm8_Hg.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.CnysQPQn.js"
29
+ "_elMarkupHelper.DXAm8_Hg.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.CnysQPQn.js"
38
+ "_elMarkupHelper.DXAm8_Hg.js"
39
39
  ]
40
40
  },
41
41
  "js/typograf/typograf.all.js": {
@@ -38,7 +38,8 @@
38
38
  }
39
39
 
40
40
  [class*='em-show']::before,
41
- [class*='em-amp-show']::before {
41
+ [class*='em-amp-show']::before,
42
+ :where([em='block'][em-block-id]:not(tr), tr[em='block'][em-block-id] > td:first-of-type)::before {
42
43
  color: hsl(0deg 0% 100% / 85%);
43
44
  background-color: #1d1d1d;
44
45
  }
@@ -305,11 +306,3 @@ img[src*='<!--']::after {
305
306
  em-replace::after {
306
307
  background-color: var(--ub-colorBgBase);
307
308
  }
308
-
309
- /* Маркер глобального блока в превью (псевдоэлемент, см. sandbox.css) */
310
- [em='block'][em-block-id]:not(tr)::after,
311
- tr[em='block'][em-block-id] > td:first-of-type::after {
312
- background: rgb(0 0 0 / 0.5);
313
- box-shadow: 0 1px 3px rgb(0 0 0 / 0.35);
314
- color: rgb(255 255 255 / 0.88);
315
- }
@@ -42,7 +42,8 @@
42
42
  }
43
43
 
44
44
  [class*='em-show']::before,
45
- [class*='em-amp-show']::before {
45
+ [class*='em-amp-show']::before,
46
+ :where([em='block'][em-block-id]:not(tr), tr[em='block'][em-block-id] > td:first-of-type)::before {
46
47
  color: #758192;
47
48
  background-color: #fff;
48
49
  }
@@ -201,11 +202,3 @@ img[src*='<!--']::after {
201
202
  em-replace::after {
202
203
  background-color: var(--ub-colorLink);
203
204
  }
204
-
205
- /* Маркер глобального блока в превью (псевдоэлемент, см. sandbox.css) */
206
- [em='block'][em-block-id]:not(tr)::after,
207
- tr[em='block'][em-block-id] > td:first-of-type::after {
208
- background: rgb(255 255 255 / 0.85);
209
- box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
210
- color: #8c8c8c;
211
- }
@@ -801,9 +801,11 @@ tinymce *.em-code[em-edit='active'] {
801
801
  position: relative;
802
802
  }
803
803
 
804
+ /* The global block marker has zero specificity: on a drop target the striped band takes this ::before and must override it. */
804
805
  [class*='em-show']::before,
805
806
  .hide-for-small > tbody > tr > td::before,
806
- .hide-for-desktop > tbody > tr > td::before {
807
+ .hide-for-desktop > tbody > tr > td::before,
808
+ :where([em='block'][em-block-id]:not(tr), tr[em='block'][em-block-id] > td:first-of-type)::before {
807
809
  font-family: 'Line Awesome Free';
808
810
  position: absolute;
809
811
  right: 5px;
@@ -867,29 +869,8 @@ tr[em='block'][em-block-id] > td:first-of-type {
867
869
  position: relative;
868
870
  }
869
871
 
870
- [em='block'][em-block-id]:not(tr)::after,
871
- tr[em='block'][em-block-id] > td:first-of-type::after {
872
- font-family: 'Line Awesome Free';
873
- position: absolute;
874
- right: 5px;
875
- top: 5px;
876
- -webkit-font-smoothing: antialiased;
877
- display: flex;
878
- font-style: normal;
879
- font-variant: normal;
880
- text-rendering: auto;
881
- line-height: 1;
882
- font-weight: 900;
883
- font-size: 16px;
884
- width: 26px;
885
- height: 26px;
886
- border-radius: 6px;
887
- text-align: center;
888
- box-sizing: border-box;
872
+ :where([em='block'][em-block-id]:not(tr), tr[em='block'][em-block-id] > td:first-of-type)::before {
889
873
  content: '\f0ac';
890
- z-index: 35;
891
- align-items: center;
892
- justify-content: center;
893
874
  pointer-events: none;
894
875
  }
895
876
 
@@ -1566,6 +1547,9 @@ body:not(.mceNonEditable, .em-sandbox-discuss) .em-blockatom-insert::before {
1566
1547
  box-sizing: border-box;
1567
1548
  margin: 0;
1568
1549
  border: none;
1550
+ border-radius: 0;
1551
+ box-shadow: none;
1552
+ background-color: transparent;
1569
1553
  pointer-events: none;
1570
1554
  }
1571
1555
 
@@ -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=6067f806");</script>
7
- <script defer src="./js/boot-guard.js" data-entry="./js/iframe-eblock.js?v=6067f806" data-ns="__useblocks__"></script>
6
+ __useblocks__.bootCanvas("./js/iframe-eblock.js?v=cc33bf3e");</script>
7
+ <script defer src="./js/boot-guard.js" data-entry="./js/iframe-eblock.js?v=cc33bf3e" 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=6067f806");</script>
7
- <script defer src="./js/boot-guard.js" data-entry="./js/iframe.js?v=6067f806" data-ns="__useblocks__"></script>
6
+ __useblocks__.bootCanvas("./js/iframe.js?v=cc33bf3e");</script>
7
+ <script defer src="./js/boot-guard.js" data-entry="./js/iframe.js?v=cc33bf3e" data-ns="__useblocks__"></script>
8
8
  </head>
9
9
  <body>
10
10
  </body>