@emailmaker/emailmaker 1.0.117-alpha.3 → 1.0.117-alpha.4

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 (65) hide show
  1. package/CHANGELOG.en.md +40 -3
  2. package/CHANGELOG.md +40 -0
  3. package/README.md +3 -2
  4. package/asset-manifest.json +44 -38
  5. package/emailmaker-esm.js +1 -1
  6. package/emailmaker.d.ts +7 -0
  7. package/emailmaker.js +1 -1
  8. package/iframe/429.js +1 -1
  9. package/iframe/766.js +1 -1
  10. package/iframe/css/sandbox-dark.css +8 -0
  11. package/iframe/css/sandbox-light.css +8 -0
  12. package/iframe/css/sandbox.css +32 -0
  13. package/iframe/iframe-eblock.3d39ec0d6695dfd04dfe.html +1 -0
  14. package/iframe/iframe.3d39ec0d6695dfd04dfe.html +1 -0
  15. package/iframe/index.html +1 -1
  16. package/iframe/js/525.f6e2f6b3.js +1 -0
  17. package/iframe/js/781.94ac3161.js +1 -0
  18. package/iframe/js/{667.a3109c1d.js.LICENSE.txt → 781.94ac3161.js.LICENSE.txt} +2 -0
  19. package/iframe/js/882.7804f4a0.js +1 -0
  20. package/iframe/sandbox-eblock.js +1 -1
  21. package/iframe/sandbox-eblock.js.LICENSE.txt +0 -2
  22. package/package.json +1 -1
  23. package/react/index.js +1 -1
  24. package/react/index.mjs +1 -1
  25. package/static/css/2016.6d88154a.chunk.css +2 -0
  26. package/static/css/2854.eaf83aed.chunk.css +2 -0
  27. package/static/css/8727.566a7baa.chunk.css +2 -0
  28. package/static/css/main.ec0d79d0.css +2 -0
  29. package/static/js/{1807.2f873ba8.js → 1807.544be549.js} +3 -3
  30. package/static/js/{1902.59ed55f8.js → 1902.46b497c9.js} +3 -3
  31. package/static/js/{5072.a7444daa.js → 2016.d527f648.js} +3 -3
  32. package/static/js/{262.3062229e.js → 262.a0c80d6d.js} +3 -3
  33. package/static/js/3195.56b10745.js +2 -0
  34. package/static/js/6256.e81830e2.js +2 -0
  35. package/static/js/{1716.2d977604.js → 6802.8b81b864.js} +3 -3
  36. package/static/js/7251.a53ab2ce.js +2 -0
  37. package/static/js/817.00be8b68.js +2 -0
  38. package/static/js/8245.117e8e2d.js +2 -0
  39. package/static/js/8559.f5ef7cd8.js +3 -0
  40. package/static/js/8727.11fb3035.js +2 -0
  41. package/static/js/9688.dddd5b80.js +2 -0
  42. package/static/js/emailmaker_core.767054b1.js +2 -0
  43. package/iframe/iframe-eblock.6ba89053b8c4bd89671b.html +0 -1
  44. package/iframe/iframe.6ba89053b8c4bd89671b.html +0 -1
  45. package/iframe/js/525.2a5bee62.js +0 -1
  46. package/iframe/js/667.a3109c1d.js +0 -1
  47. package/iframe/js/882.b65c6b97.js +0 -1
  48. package/iframe/js/882.b65c6b97.js.LICENSE.txt +0 -1
  49. package/static/css/2854.257728de.chunk.css +0 -2
  50. package/static/css/5072.72467a43.chunk.css +0 -2
  51. package/static/css/8727.2f8ba497.chunk.css +0 -2
  52. package/static/css/main.4fad2cb5.css +0 -2
  53. package/static/js/5243.413e6220.js +0 -3
  54. package/static/js/817.93306766.js +0 -2
  55. package/static/js/8245.d98fa2d7.js +0 -2
  56. package/static/js/8727.ef480f4b.js +0 -2
  57. package/static/js/9535.1da6d801.js +0 -2
  58. package/static/js/emailmaker_core.d8816d78.js +0 -2
  59. /package/iframe/js/{525.2a5bee62.js.LICENSE.txt → 525.f6e2f6b3.js.LICENSE.txt} +0 -0
  60. /package/static/js/{1807.2f873ba8.js.LICENSE.txt → 1807.544be549.js.LICENSE.txt} +0 -0
  61. /package/static/js/{1902.59ed55f8.js.LICENSE.txt → 1902.46b497c9.js.LICENSE.txt} +0 -0
  62. /package/static/js/{5072.a7444daa.js.LICENSE.txt → 2016.d527f648.js.LICENSE.txt} +0 -0
  63. /package/static/js/{262.3062229e.js.LICENSE.txt → 262.a0c80d6d.js.LICENSE.txt} +0 -0
  64. /package/static/js/{1716.2d977604.js.LICENSE.txt → 6802.8b81b864.js.LICENSE.txt} +0 -0
  65. /package/static/js/{5243.413e6220.js.LICENSE.txt → 8559.f5ef7cd8.js.LICENSE.txt} +0 -0
@@ -1,3 +1 @@
1
- /*! typograf | © 2025 Denis Seleznev | MIT License | https://github.com/typograf/typograf */
2
-
3
1
  /*!!pathTargetElement.closest('editor') || */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emailmaker/emailmaker",
3
- "version": "1.0.117-alpha.3",
3
+ "version": "1.0.117-alpha.4",
4
4
  "private": false,
5
5
  "main": "emailmaker.js",
6
6
  "module": "emailmaker-esm.js",
package/react/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var s in n)("object"==typeof exports?exports:e)[s]=n[s]}}(globalThis,()=>(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var s in n)e.o(n,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:n[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>o});const n=require("react");var s=e.n(n);const r=require("@emailmaker/emailmaker");function i(e,t){if(Object.is(e,t))return!0;if(typeof e!=typeof t)return!1;if(!e||!t||"object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;const n=e,s=t,r=Object.keys(n),o=Object.keys(s);return r.length===o.length&&r.every(e=>Object.prototype.hasOwnProperty.call(s,e)&&i(n[e],s[e]))}class o extends s().Component{constructor(...e){super(...e),this._instance=void 0,this._element=null,this._runId=0,this.setElement=e=>{this._element!==e&&(this._element=e,this._reset())}}_reset(){const{props:e,_element:t}=this,n=++this._runId;t?(async()=>{try{const{id:s,className:i,style:o,container:a,...c}=e,l={...c,element:t},d=this._instance?await this._instance.reset(l):await(0,r.init)(l);n===this._runId&&t===this._element?this._instance=d:d!==this._instance&&d.destroy()}catch(e){console.log(e)}})():this._instance&&(this._instance.destroy(),this._instance=void 0)}componentDidUpdate(e){i(e,this.props)||this._reset()}componentWillUnmount(){this._runId+=1,this._instance&&(this._instance.destroy(),this._instance=void 0)}render(){const{id:e,className:t,style:n,container:r}=this.props,i={id:e,className:t,style:n,...r};return s().createElement("div",Object.assign({},i,{ref:this.setElement}))}}return t})());
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(globalThis,()=>(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>c});const n=require("react");var i=e.n(n);const s=require("@emailmaker/emailmaker"),r=new Set(["container","id","className","style","getAuthToken","handleHtmlChanged","handleEmailChanged","handleSaveEmail","handleReadBlocks","handleSaveBlock","handleRemoveBlock","handleTranslate","handleLoad","handleDestroy","handleChunkLoaded","handleLoadImage","handleSaveImage","handleRemoveImage","handleReadImages","handleNotification","handleReadNotifications","handleMarkNotificationRead","handleMarkAllNotificationsRead"]);function o(e,t){if(Object.is(e,t))return!0;if(typeof e!=typeof t)return!1;if(!e||!t||"object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;const n=e,i=t,s=Object.keys(n),r=Object.keys(i);return s.length===r.length&&s.every(e=>Object.prototype.hasOwnProperty.call(i,e)&&o(n[e],i[e]))}function a(e){const t={};for(const[n,i]of Object.entries(e))r.has(n)||"function"==typeof i||(t[n]=i);return t}function l(e,t){return!o(a(e),a(t))}class c extends i().Component{constructor(...e){super(...e),this._instance=void 0,this._element=null,this._runId=0,this._resetChain=Promise.resolve(),this._destroyTimer=null,this._resetDebounceTimer=null,this.state={initError:null},this.setElement=e=>{if(this._element!==e)if(this._cancelScheduledDestroy(),this._element=e,e)this._enqueueReset();else if(this._runId+=1,this._instance){const e=this._instance;this._instance=void 0,this._scheduleDestroy(e)}}}_cancelScheduledDestroy(){null!==this._destroyTimer&&(clearTimeout(this._destroyTimer),this._destroyTimer=null)}_scheduleDestroy(e){this._cancelScheduledDestroy(),this._destroyTimer=setTimeout(()=>{if(this._destroyTimer=null,null===this._element)try{e.destroy()}catch(e){console.error("[EmailMaker] destroy after embed unmount failed",e)}},120)}_enqueueReset(){null!==this._resetDebounceTimer&&clearTimeout(this._resetDebounceTimer),this._resetDebounceTimer=setTimeout(()=>{this._resetDebounceTimer=null,this._runResetNow()},80)}_runResetNow(){const{props:e,_element:t}=this,n=++this._runId;if(t)this._resetChain=this._resetChain.then(async()=>{if(n!==this._runId||t!==this._element)return;const{id:i,className:r,style:o,container:a,...l}=e,c={...l,element:t},h=this._instance?await this._instance.reset(c):await(0,s.init)(c);if(n===this._runId&&t===this._element)this._instance=h,this.setState({initError:null});else if(h!==this._instance)try{h.destroy()}catch(e){console.error("[EmailMaker] discard stale init instance failed",e)}}).catch(e=>{if(n!==this._runId||t!==this._element)return;const i=e instanceof Error?e:new Error(String(e));console.error("[EmailMaker] init/reset failed",i),this.setState({initError:i})});else if(this._instance){const e=this._instance;this._instance=void 0,this._scheduleDestroy(e)}}componentDidUpdate(e){l(e,this.props)&&this._enqueueReset()}componentWillUnmount(){if(this._runId+=1,null!==this._resetDebounceTimer&&(clearTimeout(this._resetDebounceTimer),this._resetDebounceTimer=null),this._instance){const e=this._instance;this._instance=void 0,this._scheduleDestroy(e)}}render(){const{id:e,className:t,style:n,container:s}=this.props,{initError:r}=this.state,o={id:e,className:t,style:n,...s};return r?i().createElement("div",Object.assign({},o,{ref:this.setElement,style:{...o.style,display:"flex",alignItems:"center",justifyContent:"center",padding:16,color:"#b42318",fontSize:14,textAlign:"center"}}),r.message):i().createElement("div",Object.assign({},o,{ref:this.setElement}))}}return t})());
package/react/index.mjs CHANGED
@@ -1 +1 @@
1
- import*as t from"react";import*as e from"@emailmaker/emailmaker";var s={d:(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},n={};s.d(n,{A:()=>l});const i=(r={default:()=>t.default},a={},s.d(a,r),a);var r,a;const o=(t=>{var e={};return s.d(e,t),e})({init:()=>e.init});function c(t,e){if(Object.is(t,e))return!0;if(typeof t!=typeof e)return!1;if(!t||!e||"object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(e))return!1;const s=t,n=e,i=Object.keys(s),r=Object.keys(n);return i.length===r.length&&i.every(t=>Object.prototype.hasOwnProperty.call(n,t)&&c(s[t],n[t]))}class l extends i.default.Component{constructor(...t){super(...t),this._instance=void 0,this._element=null,this._runId=0,this.setElement=t=>{this._element!==t&&(this._element=t,this._reset())}}_reset(){const{props:t,_element:e}=this,s=++this._runId;e?(async()=>{try{const{id:n,className:i,style:r,container:a,...c}=t,l={...c,element:e},h=this._instance?await this._instance.reset(l):await(0,o.init)(l);s===this._runId&&e===this._element?this._instance=h:h!==this._instance&&h.destroy()}catch(t){console.log(t)}})():this._instance&&(this._instance.destroy(),this._instance=void 0)}componentDidUpdate(t){c(t,this.props)||this._reset()}componentWillUnmount(){this._runId+=1,this._instance&&(this._instance.destroy(),this._instance=void 0)}render(){const{id:t,className:e,style:s,container:n}=this.props,r={id:t,className:e,style:s,...n};return i.default.createElement("div",Object.assign({},r,{ref:this.setElement}))}}var h=n.A;export{h as default};
1
+ import*as e from"react";import*as t from"@emailmaker/emailmaker";var n={d:(e,t)=>{for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},s={};n.d(s,{A:()=>u});const i=(r={default:()=>e.default},a={},n.d(a,r),a);var r,a;const o=(e=>{var t={};return n.d(t,e),t})({init:()=>t.init}),l=new Set(["container","id","className","style","getAuthToken","handleHtmlChanged","handleEmailChanged","handleSaveEmail","handleReadBlocks","handleSaveBlock","handleRemoveBlock","handleTranslate","handleLoad","handleDestroy","handleChunkLoaded","handleLoadImage","handleSaveImage","handleRemoveImage","handleReadImages","handleNotification","handleReadNotifications","handleMarkNotificationRead","handleMarkAllNotificationsRead"]);function c(e,t){if(Object.is(e,t))return!0;if(typeof e!=typeof t)return!1;if(!e||!t||"object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;const n=e,s=t,i=Object.keys(n),r=Object.keys(s);return i.length===r.length&&i.every(e=>Object.prototype.hasOwnProperty.call(s,e)&&c(n[e],s[e]))}function h(e){const t={};for(const[n,s]of Object.entries(e))l.has(n)||"function"==typeof s||(t[n]=s);return t}function d(e,t){return!c(h(e),h(t))}class u extends i.default.Component{constructor(...e){super(...e),this._instance=void 0,this._element=null,this._runId=0,this._resetChain=Promise.resolve(),this._destroyTimer=null,this._resetDebounceTimer=null,this.state={initError:null},this.setElement=e=>{if(this._element!==e)if(this._cancelScheduledDestroy(),this._element=e,e)this._enqueueReset();else if(this._runId+=1,this._instance){const e=this._instance;this._instance=void 0,this._scheduleDestroy(e)}}}_cancelScheduledDestroy(){null!==this._destroyTimer&&(clearTimeout(this._destroyTimer),this._destroyTimer=null)}_scheduleDestroy(e){this._cancelScheduledDestroy(),this._destroyTimer=setTimeout(()=>{if(this._destroyTimer=null,null===this._element)try{e.destroy()}catch(e){console.error("[EmailMaker] destroy after embed unmount failed",e)}},120)}_enqueueReset(){null!==this._resetDebounceTimer&&clearTimeout(this._resetDebounceTimer),this._resetDebounceTimer=setTimeout(()=>{this._resetDebounceTimer=null,this._runResetNow()},80)}_runResetNow(){const{props:e,_element:t}=this,n=++this._runId;if(t)this._resetChain=this._resetChain.then(async()=>{if(n!==this._runId||t!==this._element)return;const{id:s,className:i,style:r,container:a,...l}=e,c={...l,element:t},h=this._instance?await this._instance.reset(c):await(0,o.init)(c);if(n===this._runId&&t===this._element)this._instance=h,this.setState({initError:null});else if(h!==this._instance)try{h.destroy()}catch(e){console.error("[EmailMaker] discard stale init instance failed",e)}}).catch(e=>{if(n!==this._runId||t!==this._element)return;const s=e instanceof Error?e:new Error(String(e));console.error("[EmailMaker] init/reset failed",s),this.setState({initError:s})});else if(this._instance){const e=this._instance;this._instance=void 0,this._scheduleDestroy(e)}}componentDidUpdate(e){d(e,this.props)&&this._enqueueReset()}componentWillUnmount(){if(this._runId+=1,null!==this._resetDebounceTimer&&(clearTimeout(this._resetDebounceTimer),this._resetDebounceTimer=null),this._instance){const e=this._instance;this._instance=void 0,this._scheduleDestroy(e)}}render(){const{id:e,className:t,style:n,container:s}=this.props,{initError:r}=this.state,a={id:e,className:t,style:n,...s};return r?i.default.createElement("div",Object.assign({},a,{ref:this.setElement,style:{...a.style,display:"flex",alignItems:"center",justifyContent:"center",padding:16,color:"#b42318",fontSize:14,textAlign:"center"}}),r.message):i.default.createElement("div",Object.assign({},a,{ref:this.setElement}))}}var m=s.A;export{m as default};