@emailmaker/emailmaker 1.1.109 → 1.2.3
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/README.md +58 -1
- package/emailmaker-core.8c2b05d7.js +859 -0
- package/emailmaker-esm.js +11 -11
- package/{emailmaker-po.7b3c64f5.js → emailmaker-po.8c2b05d7.js} +1 -1
- package/emailmaker.d.ts +254 -3
- package/emailmaker.js +12 -12
- package/iframe/.vite/manifest.json +4 -4
- package/iframe/{iframe-eblock.7b3c64f5.html → iframe-eblock.8c2b05d7.html} +2 -2
- package/iframe/{iframe.7b3c64f5.html → iframe.8c2b05d7.html} +2 -2
- package/iframe/js/elMarkupHelper.DnlKn-Lc.js +277 -0
- package/iframe/js/iframe-eblock.body.8c2b05d7.js +9 -0
- package/iframe/js/iframe-eblock.js +2 -2
- package/iframe/js/iframe.body.8c2b05d7.js +129 -0
- package/iframe/js/iframe.js +2 -2
- package/package.json +1 -1
- package/runtime/react/index.js +1 -1
- package/static/core/{efb5b933.js → 1687225b.js} +1 -1
- package/static/core/{86b377fd.js → 1912a30e.js} +1 -1
- package/static/core/{2f32a31d.js → 286097e2.js} +2 -2
- package/static/core/{874f77d2.js → 316f71b7.js} +1 -1
- package/static/core/{26971a74.js → 42ec1ce9.js} +2 -2
- package/static/core/466f98bb.js +28 -0
- package/static/core/{8c37b60d.js → 48e93de9.js} +1 -1
- package/static/core/{26473b73.js → 492992bb.js} +1 -1
- package/static/core/{98ab1508.js → 60b75c99.js} +1 -1
- package/static/core/{f115f982.js → 6535dd13.js} +7 -7
- package/static/core/{5c4304c8.js → 6e548251.js} +1 -1
- package/static/core/844fbb88.js +1 -0
- package/static/core/{9ef544f4.js → 97aabe39.js} +1 -1
- package/static/core/{cebc7ae2.js → 9e7c400d.js} +10 -10
- package/static/core/9ff19e12.js +4 -0
- package/static/core/{b35140b6.js → aab84cf4.js} +1 -1
- package/static/core/{a85c7f02.js → b6999cba.js} +1 -1
- package/static/core/{1157da89.js → b752ed52.js} +1 -1
- package/static/core/{ee6c9aa1.js → b99f4f42.js} +1 -1
- package/static/core/{213ffad0.js → bbb11e65.js} +1 -1
- package/static/core/{6314ae82.js → c2daae71.js} +1 -1
- package/static/core/{3bfab25b.js → c6cd3dc2.js} +1 -1
- package/static/core/{2e29db3c.js → c7b2d60e.js} +1 -1
- package/static/core/{850805d7.js → d2a90b69.js} +1 -1
- package/static/core/{756e184f.js → dfbe3ba4.js} +1 -1
- package/static/core/{87dcdb89.js → e13d6875.js} +1 -1
- package/static/core/{e8fa95c8.js → ed4586a5.js} +1 -1
- package/static/core/{dfcb8d34.js → ee6a6899.js} +1 -1
- package/static/esm/ea997fe3.js +1 -0
- package/static/umd-runtime/runtime.BqNyFZPj.js +1 -0
- package/vendor/@emailmaker/ui-kit/package.json +1 -1
- package/emailmaker-core.7b3c64f5.js +0 -859
- package/iframe/js/elMarkupHelper.BcpgksI_.js +0 -279
- package/iframe/js/iframe-eblock.body.7b3c64f5.js +0 -9
- package/iframe/js/iframe.body.7b3c64f5.js +0 -129
- package/static/core/6fb2f217.js +0 -4
- package/static/core/e4b8362a.js +0 -28
- package/static/core/e90908e7.js +0 -1
- package/static/esm/73c89921.js +0 -1
- package/static/umd-runtime/runtime.DaVzSc6X.js +0 -1
|
@@ -42,4 +42,4 @@ __emailmaker__.define("po",["require","exports","module"],function(na,ct,aa){Obj
|
|
|
42
42
|
|
|
43
43
|
`),"utf-8"):u.convert(i.join(`
|
|
44
44
|
|
|
45
|
-
`),this._charset)}})),Hn=R(((o,t)=>{var e=je(),u=st();t.exports=function(p,h){return new f(p,h).parse()};function f(p,h){this._fileContents=p,this._writeFunc="writeUInt32LE",this._readFunc="readUInt32LE",this._charset=h||"iso-8859-1",this._table={charset:this._charset,headers:void 0,translations:{}}}f.prototype.MAGIC=2500072158,f.prototype._checkMagick=function(){return this._fileContents.readUInt32LE(0)===this.MAGIC?(this._readFunc="readUInt32LE",this._writeFunc="writeUInt32LE",!0):this._fileContents.readUInt32BE(0)===this.MAGIC?(this._readFunc="readUInt32BE",this._writeFunc="writeUInt32BE",!0):!1},f.prototype._loadTranslationTable=function(){for(var p=this._offsetOriginals,h=this._offsetTranslations,i,r,s,n,l=0;l<this._total;l++)r=this._fileContents[this._readFunc](p),p+=4,i=this._fileContents[this._readFunc](p),p+=4,s=this._fileContents.slice(i,i+r),r=this._fileContents[this._readFunc](h),h+=4,i=this._fileContents[this._readFunc](h),h+=4,n=this._fileContents.slice(i,i+r),!l&&!s.toString()&&this._handleCharset(n),s=e.convert(s,"utf-8",this._charset).toString("utf-8"),n=e.convert(n,"utf-8",this._charset).toString("utf-8"),this._addString(s,n);this._fileContents=null},f.prototype._handleCharset=function(p){var h=p.toString(),i;(i=h.match(/[; ]charset\s*=\s*([\w-]+)/i))&&(this._charset=this._table.charset=u.formatCharset(i[1],this._charset)),p=e.convert(p,"utf-8",this._charset).toString("utf-8"),this._table.headers=u.parseHeader(p)},f.prototype._addString=function(p,h){var i={},r,s,n;p=p.split(""),p.length>1?(s=p.shift(),i.msgctxt=s):s="",p=p.join(""),r=p.split("\0"),p=r.shift(),i.msgid=p,(n=r.join("\0"))&&(i.msgid_plural=n),h=h.split("\0"),i.msgstr=[].concat(h||[]),this._table.translations[s]||(this._table.translations[s]={}),this._table.translations[s][p]=i},f.prototype.parse=function(){return this._checkMagick()?(this._revision=this._fileContents[this._readFunc](4),this._total=this._fileContents[this._readFunc](8),this._offsetOriginals=this._fileContents[this._readFunc](12),this._offsetTranslations=this._fileContents[this._readFunc](16),this._loadTranslationTable(),this._table):!1}})),Jn=R(((o,t)=>{var e=ot().Buffer,u=je(),f=st();t.exports=function(h){return new p(h).compile()};function p(h){this._table=h||{},this._table.headers=this._table.headers||{},this._table.translations=this._table.translations||{},this._translations=[],this._writeFunc="writeUInt32LE",this._handleCharset()}p.prototype.MAGIC=2500072158,p.prototype._handleCharset=function(){var h=(this._table.headers["content-type"]||"text/plain").split(";"),i=h.shift(),r=f.formatCharset(this._table.charset),s=[];s=h.map(function(n){var l=n.split("="),y=l.shift().trim(),g=l.join("=");return y.toLowerCase()==="charset"?(r||(r=f.formatCharset(g.trim()||"utf-8")),"charset="+r):n}),r||(r=this._table.charset||"utf-8",s.push("charset="+r)),this._table.charset=r,this._table.headers["content-type"]=i+"; "+s.join("; "),this._charset=r},p.prototype._generateList=function(){var h=[];return h.push({msgid:e.alloc(0),msgstr:u.convert(f.generateHeader(this._table.headers),this._charset)}),Object.keys(this._table.translations).forEach(function(i){typeof this._table.translations[i]=="object"&&Object.keys(this._table.translations[i]).forEach(function(r){if(typeof this._table.translations[i][r]=="object"&&!(i===""&&r==="")){var s=this._table.translations[i][r].msgid_plural,n=r,l;i&&(n=i+""+n),s&&(n+="\0"+s),l=[].concat(this._table.translations[i][r].msgstr||[]).join("\0"),h.push({msgid:u.convert(n,this._charset),msgstr:u.convert(l,this._charset)})}}.bind(this))}.bind(this)),h},p.prototype._calculateSize=function(h){var i=0,r=0,s=0;return h.forEach(function(n){i+=n.msgid.length+1,r+=n.msgstr.length+1}),s=28+8*h.length+8*h.length+i+r,{msgid:i,msgstr:r,total:s}},p.prototype._build=function(h,i){var r=e.alloc(i.total),s=0,n,l;for(r[this._writeFunc](this.MAGIC,0),r[this._writeFunc](0,4),r[this._writeFunc](h.length,8),r[this._writeFunc](28,12),r[this._writeFunc](28+8*h.length,16),r[this._writeFunc](0,20),r[this._writeFunc](28+8*h.length*2,24),s=28+16*h.length,n=0,l=h.length;n<l;n++)h[n].msgid.copy(r,s),r[this._writeFunc](h[n].msgid.length,28+n*8),r[this._writeFunc](s,28+n*8+4),r[s+h[n].msgid.length]=0,s+=h[n].msgid.length+1;for(n=0,l=h.length;n<l;n++)h[n].msgstr.copy(r,s),r[this._writeFunc](h[n].msgstr.length,28+8*h.length+n*8),r[this._writeFunc](s,28+8*h.length+n*8+4),r[s+h[n].msgstr.length]=0,s+=h[n].msgstr.length+1;return r},p.prototype.compile=function(){var h=this._generateList(),i=this._calculateSize(h);return h.sort(function(r,s){return r.msgid>s.msgid?1:r.msgid<s.msgid?-1:0}),this._build(h,i)}})),Xn=R(((o,t)=>{var e=Yn();t.exports={po:{parse:e.parse,createParseStream:e.stream,compile:Vn()},mo:{parse:Hn(),compile:Jn()}}})),Kn=R(((o,t)=>{var e=Wn();t.exports=function(u,f){f=f||{};const p={pretty:!1,fuzzy:!1,stringify:!1,format:"raw",domain:"messages",charset:"utf8",fullMF:!1,mfOptions:{}};for(const n in p)f[n]=typeof f[n]<"u"?f[n]:p[n];let h={},i={};if(f.format==="mf"){const n=u.toString().includes('"Plural-Forms:')?f.mfOptions:Object.assign({},{pluralFunction:()=>0},f.mfOptions);return i=Object.keys(n).length>0?e.parsePo(u,n):e.parsePo(u),f.fullMF?f.stringify?JSON.stringify(i,null,f.pretty?" ":null):i:(i&&(i.translations&&i.translations[""]?(h=i.translations[""],Object.keys(i.translations).forEach(function(l){l===""?Object.keys(i.translations[""]).forEach(function(y){h[y]=i.translations[""][y]}):h[l]=i.translations[l]})):h=i.translations||{}),f.stringify?JSON.stringify(h,null,f.pretty?" ":null):h)}const r=Xn().po.parse(u,p.charset),s=r.translations;if(Object.keys(s).forEach(function(n){const l=r.translations[n],y=r.headers?r.headers["plural-forms"]:"";Object.keys(l).forEach(function(g,b){const w=l[g],v=n.length?n+""+g:g,B=w.comments&&w.comments.flag&&w.comments.flag.match(/fuzzy/)!==null;(!B||f.fuzzy)&&(f.format==="jed"?i[v]=[w.msgid_plural?w.msgid_plural:null].concat(w.msgstr):y==="nplurals=1; plural=0;"?(msgstr=w.msgid_plural?[w.msgstr]:w.msgstr,i[v]=[w.msgid_plural?w.msgid_plural:null].concat(msgstr)):i[v]=[w.msgid_plural?w.msgid_plural:null].concat(w.msgstr)),f["fallback-to-msgid"]&&(B&&!f.fuzzy||w.msgstr[0]==="")&&(i[v]=[w.msgid_plural?w.msgid_plural:null].concat(w.msgid_plural?[g,w.msgid_plural]:[g]))})}),r.headers&&(i[""]=r.headers),f.format==="mf"&&delete i[""],f.format.indexOf("jed")===0){const n={domain:f.domain,locale_data:{}};if(f.format==="jed"){for(const l in i)if(i.hasOwnProperty(l)&&l!==""){for(let y=2;y<i[l].length;y++)i[l][y]===""&&(i[l][y]=i[l][0]);i[l].shift()}}n.locale_data[f.domain]=i,n.locale_data[f.domain][""]={domain:f.domain,plural_forms:i[""]["plural-forms"],lang:i[""].language},i=n}return f.stringify?JSON.stringify(i,null,f.pretty?" ":null):i}})),Zn=It(Kn());function Qn(o){if(typeof o=="function")return o;const t=o?.default;return typeof t=="function"?t:void 0}function ea(o){if(!(o==null||typeof o!="object"||Array.isArray(o)))return o}function ta(o){const t=Qn(Zn.default)?.(o,{format:"jed",fuzzy:!0,domain:"default"});return ea(t?.locale_data?.default)}var ra="1.
|
|
45
|
+
`),this._charset)}})),Hn=R(((o,t)=>{var e=je(),u=st();t.exports=function(p,h){return new f(p,h).parse()};function f(p,h){this._fileContents=p,this._writeFunc="writeUInt32LE",this._readFunc="readUInt32LE",this._charset=h||"iso-8859-1",this._table={charset:this._charset,headers:void 0,translations:{}}}f.prototype.MAGIC=2500072158,f.prototype._checkMagick=function(){return this._fileContents.readUInt32LE(0)===this.MAGIC?(this._readFunc="readUInt32LE",this._writeFunc="writeUInt32LE",!0):this._fileContents.readUInt32BE(0)===this.MAGIC?(this._readFunc="readUInt32BE",this._writeFunc="writeUInt32BE",!0):!1},f.prototype._loadTranslationTable=function(){for(var p=this._offsetOriginals,h=this._offsetTranslations,i,r,s,n,l=0;l<this._total;l++)r=this._fileContents[this._readFunc](p),p+=4,i=this._fileContents[this._readFunc](p),p+=4,s=this._fileContents.slice(i,i+r),r=this._fileContents[this._readFunc](h),h+=4,i=this._fileContents[this._readFunc](h),h+=4,n=this._fileContents.slice(i,i+r),!l&&!s.toString()&&this._handleCharset(n),s=e.convert(s,"utf-8",this._charset).toString("utf-8"),n=e.convert(n,"utf-8",this._charset).toString("utf-8"),this._addString(s,n);this._fileContents=null},f.prototype._handleCharset=function(p){var h=p.toString(),i;(i=h.match(/[; ]charset\s*=\s*([\w-]+)/i))&&(this._charset=this._table.charset=u.formatCharset(i[1],this._charset)),p=e.convert(p,"utf-8",this._charset).toString("utf-8"),this._table.headers=u.parseHeader(p)},f.prototype._addString=function(p,h){var i={},r,s,n;p=p.split(""),p.length>1?(s=p.shift(),i.msgctxt=s):s="",p=p.join(""),r=p.split("\0"),p=r.shift(),i.msgid=p,(n=r.join("\0"))&&(i.msgid_plural=n),h=h.split("\0"),i.msgstr=[].concat(h||[]),this._table.translations[s]||(this._table.translations[s]={}),this._table.translations[s][p]=i},f.prototype.parse=function(){return this._checkMagick()?(this._revision=this._fileContents[this._readFunc](4),this._total=this._fileContents[this._readFunc](8),this._offsetOriginals=this._fileContents[this._readFunc](12),this._offsetTranslations=this._fileContents[this._readFunc](16),this._loadTranslationTable(),this._table):!1}})),Jn=R(((o,t)=>{var e=ot().Buffer,u=je(),f=st();t.exports=function(h){return new p(h).compile()};function p(h){this._table=h||{},this._table.headers=this._table.headers||{},this._table.translations=this._table.translations||{},this._translations=[],this._writeFunc="writeUInt32LE",this._handleCharset()}p.prototype.MAGIC=2500072158,p.prototype._handleCharset=function(){var h=(this._table.headers["content-type"]||"text/plain").split(";"),i=h.shift(),r=f.formatCharset(this._table.charset),s=[];s=h.map(function(n){var l=n.split("="),y=l.shift().trim(),g=l.join("=");return y.toLowerCase()==="charset"?(r||(r=f.formatCharset(g.trim()||"utf-8")),"charset="+r):n}),r||(r=this._table.charset||"utf-8",s.push("charset="+r)),this._table.charset=r,this._table.headers["content-type"]=i+"; "+s.join("; "),this._charset=r},p.prototype._generateList=function(){var h=[];return h.push({msgid:e.alloc(0),msgstr:u.convert(f.generateHeader(this._table.headers),this._charset)}),Object.keys(this._table.translations).forEach(function(i){typeof this._table.translations[i]=="object"&&Object.keys(this._table.translations[i]).forEach(function(r){if(typeof this._table.translations[i][r]=="object"&&!(i===""&&r==="")){var s=this._table.translations[i][r].msgid_plural,n=r,l;i&&(n=i+""+n),s&&(n+="\0"+s),l=[].concat(this._table.translations[i][r].msgstr||[]).join("\0"),h.push({msgid:u.convert(n,this._charset),msgstr:u.convert(l,this._charset)})}}.bind(this))}.bind(this)),h},p.prototype._calculateSize=function(h){var i=0,r=0,s=0;return h.forEach(function(n){i+=n.msgid.length+1,r+=n.msgstr.length+1}),s=28+8*h.length+8*h.length+i+r,{msgid:i,msgstr:r,total:s}},p.prototype._build=function(h,i){var r=e.alloc(i.total),s=0,n,l;for(r[this._writeFunc](this.MAGIC,0),r[this._writeFunc](0,4),r[this._writeFunc](h.length,8),r[this._writeFunc](28,12),r[this._writeFunc](28+8*h.length,16),r[this._writeFunc](0,20),r[this._writeFunc](28+8*h.length*2,24),s=28+16*h.length,n=0,l=h.length;n<l;n++)h[n].msgid.copy(r,s),r[this._writeFunc](h[n].msgid.length,28+n*8),r[this._writeFunc](s,28+n*8+4),r[s+h[n].msgid.length]=0,s+=h[n].msgid.length+1;for(n=0,l=h.length;n<l;n++)h[n].msgstr.copy(r,s),r[this._writeFunc](h[n].msgstr.length,28+8*h.length+n*8),r[this._writeFunc](s,28+8*h.length+n*8+4),r[s+h[n].msgstr.length]=0,s+=h[n].msgstr.length+1;return r},p.prototype.compile=function(){var h=this._generateList(),i=this._calculateSize(h);return h.sort(function(r,s){return r.msgid>s.msgid?1:r.msgid<s.msgid?-1:0}),this._build(h,i)}})),Xn=R(((o,t)=>{var e=Yn();t.exports={po:{parse:e.parse,createParseStream:e.stream,compile:Vn()},mo:{parse:Hn(),compile:Jn()}}})),Kn=R(((o,t)=>{var e=Wn();t.exports=function(u,f){f=f||{};const p={pretty:!1,fuzzy:!1,stringify:!1,format:"raw",domain:"messages",charset:"utf8",fullMF:!1,mfOptions:{}};for(const n in p)f[n]=typeof f[n]<"u"?f[n]:p[n];let h={},i={};if(f.format==="mf"){const n=u.toString().includes('"Plural-Forms:')?f.mfOptions:Object.assign({},{pluralFunction:()=>0},f.mfOptions);return i=Object.keys(n).length>0?e.parsePo(u,n):e.parsePo(u),f.fullMF?f.stringify?JSON.stringify(i,null,f.pretty?" ":null):i:(i&&(i.translations&&i.translations[""]?(h=i.translations[""],Object.keys(i.translations).forEach(function(l){l===""?Object.keys(i.translations[""]).forEach(function(y){h[y]=i.translations[""][y]}):h[l]=i.translations[l]})):h=i.translations||{}),f.stringify?JSON.stringify(h,null,f.pretty?" ":null):h)}const r=Xn().po.parse(u,p.charset),s=r.translations;if(Object.keys(s).forEach(function(n){const l=r.translations[n],y=r.headers?r.headers["plural-forms"]:"";Object.keys(l).forEach(function(g,b){const w=l[g],v=n.length?n+""+g:g,B=w.comments&&w.comments.flag&&w.comments.flag.match(/fuzzy/)!==null;(!B||f.fuzzy)&&(f.format==="jed"?i[v]=[w.msgid_plural?w.msgid_plural:null].concat(w.msgstr):y==="nplurals=1; plural=0;"?(msgstr=w.msgid_plural?[w.msgstr]:w.msgstr,i[v]=[w.msgid_plural?w.msgid_plural:null].concat(msgstr)):i[v]=[w.msgid_plural?w.msgid_plural:null].concat(w.msgstr)),f["fallback-to-msgid"]&&(B&&!f.fuzzy||w.msgstr[0]==="")&&(i[v]=[w.msgid_plural?w.msgid_plural:null].concat(w.msgid_plural?[g,w.msgid_plural]:[g]))})}),r.headers&&(i[""]=r.headers),f.format==="mf"&&delete i[""],f.format.indexOf("jed")===0){const n={domain:f.domain,locale_data:{}};if(f.format==="jed"){for(const l in i)if(i.hasOwnProperty(l)&&l!==""){for(let y=2;y<i[l].length;y++)i[l][y]===""&&(i[l][y]=i[l][0]);i[l].shift()}}n.locale_data[f.domain]=i,n.locale_data[f.domain][""]={domain:f.domain,plural_forms:i[""]["plural-forms"],lang:i[""].language},i=n}return f.stringify?JSON.stringify(i,null,f.pretty?" ":null):i}})),Zn=It(Kn());function Qn(o){if(typeof o=="function")return o;const t=o?.default;return typeof t=="function"?t:void 0}function ea(o){if(!(o==null||typeof o!="object"||Array.isArray(o)))return o}function ta(o){const t=Qn(Zn.default)?.(o,{format:"jed",fuzzy:!0,domain:"default"});return ea(t?.locale_data?.default)}var ra="1.2.3";ct.parsePoCatalog=ta,ct.version=ra});
|
package/emailmaker.d.ts
CHANGED
|
@@ -293,7 +293,11 @@ interface IFrameForeignStructureInfo {
|
|
|
293
293
|
}
|
|
294
294
|
/** A canvas sync drift found without a parsing error. Positions and lengths only, never the email markup. */
|
|
295
295
|
interface IFrameSyncDriftInfo {
|
|
296
|
-
/**
|
|
296
|
+
/**
|
|
297
|
+
* `tree-node-out-of-place`, `host-copy-drift`, `foreign-structure-in-commit`, `implicit-tbody-in-canvas` and so on.
|
|
298
|
+
* `save-timeout`: canvas edits were not sent while waiting for a document. `unaccounted-node`: the canvas has a node
|
|
299
|
+
* that is neither the document's own, foreign, a service node nor part of the canvas page.
|
|
300
|
+
*/
|
|
297
301
|
reason: string;
|
|
298
302
|
/** Where the drift was noticed, when a reason has several places. */
|
|
299
303
|
at?: string;
|
|
@@ -306,6 +310,15 @@ interface IFrameSyncDriftInfo {
|
|
|
306
310
|
};
|
|
307
311
|
/** The foreign structure a commit met; set for `foreign-structure-in-commit` and `implicit-tbody-in-canvas`. */
|
|
308
312
|
foreign?: IFrameForeignStructureInfo;
|
|
313
|
+
/** Canvas nodes outside every accounting bucket and the first of them; set for `unaccounted-node`. */
|
|
314
|
+
unaccounted?: {
|
|
315
|
+
count: number;
|
|
316
|
+
node: {
|
|
317
|
+
path: string;
|
|
318
|
+
tag: string;
|
|
319
|
+
class?: string;
|
|
320
|
+
};
|
|
321
|
+
};
|
|
309
322
|
}
|
|
310
323
|
interface IFrameErrorInfo {
|
|
311
324
|
/** `parse-error` when absent; `sync-drift` is a warning report with nothing rolled back. */
|
|
@@ -485,6 +498,10 @@ export declare namespace Notify {
|
|
|
485
498
|
};
|
|
486
499
|
EMAIL_ACCESS_TO_LOCKED_ERROR: EmailDesc;
|
|
487
500
|
EMAIL_TOO_MANY_TAGS_ERROR: EmailDesc;
|
|
501
|
+
/** Saving was cancelled because the email content is empty and would wipe the saved letter. */
|
|
502
|
+
EMAIL_EMPTY_SAVE_BLOCKED: EmailDesc;
|
|
503
|
+
/** Saving was refused because the canvas has not handed all its edits over to the document yet. */
|
|
504
|
+
EMAIL_CANVAS_NOT_SYNCED_ERROR: EmailDesc;
|
|
488
505
|
BLOCK_GET_ERROR: {};
|
|
489
506
|
BLOCK_ACCESS_TO_LOCKED_ERROR: BlockDesc;
|
|
490
507
|
BLOCK_TOO_MANY_TAGS_ERROR: BlockDesc;
|
|
@@ -1178,6 +1195,8 @@ export declare namespace ExportedApi {
|
|
|
1178
1195
|
saveButtonEnabled: boolean;
|
|
1179
1196
|
/** text of the main button */
|
|
1180
1197
|
saveButtonText: string;
|
|
1198
|
+
/** saving by Ctrl+S / Cmd+S; `false` turns it off, the browser's "Save page" dialog stays suppressed. Default `true`. */
|
|
1199
|
+
saveHotkeyEnabled?: boolean;
|
|
1181
1200
|
/** Primary / command row of actions (extended toolbar cluster). */
|
|
1182
1201
|
commandButtonsEnabled?: boolean;
|
|
1183
1202
|
/** displaying the email ID */
|
|
@@ -1455,7 +1474,13 @@ export declare namespace ExportedApi {
|
|
|
1455
1474
|
* email (see `openBlock`). Default `false` — the item is not shown. Does not affect `openBlock()` itself.
|
|
1456
1475
|
*/
|
|
1457
1476
|
openBlockFromEmailEnabled?: boolean;
|
|
1458
|
-
/**
|
|
1477
|
+
/**
|
|
1478
|
+
* Read-only mode: the user cannot change the email. Locks the canvas, the code editor, the subject
|
|
1479
|
+
* and preheader fields, import, undo/redo (buttons and hotkeys), the version history, email settings
|
|
1480
|
+
* and UTM parameters, the AI chat, layout conversion and Gmail annotations; locked buttons stay
|
|
1481
|
+
* visible but disabled. The integrator
|
|
1482
|
+
* API (`show`, `setEmail`, undo via the API) is not locked. Can be switched with `setConfig`.
|
|
1483
|
+
*/
|
|
1459
1484
|
lockEditor?: boolean;
|
|
1460
1485
|
/** Disables editing of preheader / title chrome when integrated with locking flows. */
|
|
1461
1486
|
lockPreheaderAndTitle?: boolean;
|
|
@@ -1769,6 +1794,209 @@ export declare namespace ExportedApi {
|
|
|
1769
1794
|
id: string;
|
|
1770
1795
|
}>;
|
|
1771
1796
|
type ValidateEvent = AppListener<CodeError[]>;
|
|
1797
|
+
/** Code errors of an imported file, found in its own markup before the browser parses it. */
|
|
1798
|
+
interface ImportValidation {
|
|
1799
|
+
/** errors in the file's markup; empty when there is nothing to report */
|
|
1800
|
+
errors: CodeError[];
|
|
1801
|
+
/** name of the imported file */
|
|
1802
|
+
fileName: string;
|
|
1803
|
+
}
|
|
1804
|
+
type ImportValidateEvent = AppListener<ImportValidation>;
|
|
1805
|
+
/** Markup the layout converter recognized; `unknown` is markup it cannot name, handled by the AI converter. */
|
|
1806
|
+
type AnalyticsLayoutSource = 'beefree' | 'stripo' | 'unknown';
|
|
1807
|
+
/** How a layout was converted: the built-in algorithm or the AI converter. */
|
|
1808
|
+
type AnalyticsLayoutMethod = 'algorithm' | 'ai';
|
|
1809
|
+
/**
|
|
1810
|
+
* What started a conversion: `prompt` — the suggestion on opening the email, `import` — a file import, `menu` — the
|
|
1811
|
+
* "Convert" menu item, `retry` — "Retry" after an error. The first three show the same popup first.
|
|
1812
|
+
*/
|
|
1813
|
+
type AnalyticsLayoutTrigger = 'prompt' | 'import' | 'menu' | 'retry';
|
|
1814
|
+
/** Why a conversion failed. */
|
|
1815
|
+
type AnalyticsLayoutErrorCode = 'algorithm_failed' | 'ai_disabled' | 'html_too_large' | 'too_many_active' | 'hourly_limit_reached' | 'timeout' | 'network' | 'unknown';
|
|
1816
|
+
/** What the editor has open. */
|
|
1817
|
+
type AnalyticsEntityType = 'email' | 'block';
|
|
1818
|
+
/**
|
|
1819
|
+
* Analytics events the editor reports through {@link Events.handleAnalyticsEvent}, by name, with their
|
|
1820
|
+
* properties. Properties carry only closed lists, numbers and flags: no ids, names or user text.
|
|
1821
|
+
*/
|
|
1822
|
+
interface AnalyticsEventMap {
|
|
1823
|
+
/** The "convert this layout?" popup was shown. */
|
|
1824
|
+
editor_layout_convert_offered: {
|
|
1825
|
+
source: AnalyticsLayoutSource;
|
|
1826
|
+
trigger: AnalyticsLayoutTrigger;
|
|
1827
|
+
};
|
|
1828
|
+
/** The user dismissed the conversion popup; `never_suggest` — they also asked not to offer it again. */
|
|
1829
|
+
editor_layout_convert_declined: {
|
|
1830
|
+
source: AnalyticsLayoutSource;
|
|
1831
|
+
trigger: AnalyticsLayoutTrigger;
|
|
1832
|
+
never_suggest: boolean;
|
|
1833
|
+
};
|
|
1834
|
+
/** A conversion attempt started. */
|
|
1835
|
+
editor_layout_convert_started: {
|
|
1836
|
+
source: AnalyticsLayoutSource;
|
|
1837
|
+
method: AnalyticsLayoutMethod;
|
|
1838
|
+
trigger: AnalyticsLayoutTrigger;
|
|
1839
|
+
};
|
|
1840
|
+
/** The converted layout is in the editor; `method` is the one that produced it, `fallback_to_ai` — the algorithm failed first. */
|
|
1841
|
+
editor_layout_convert_succeeded: {
|
|
1842
|
+
source: AnalyticsLayoutSource;
|
|
1843
|
+
method: AnalyticsLayoutMethod;
|
|
1844
|
+
trigger: AnalyticsLayoutTrigger;
|
|
1845
|
+
duration_ms: number;
|
|
1846
|
+
fallback_to_ai: boolean;
|
|
1847
|
+
};
|
|
1848
|
+
/** A conversion attempt failed. */
|
|
1849
|
+
editor_layout_convert_failed: {
|
|
1850
|
+
source: AnalyticsLayoutSource;
|
|
1851
|
+
method: AnalyticsLayoutMethod;
|
|
1852
|
+
trigger: AnalyticsLayoutTrigger;
|
|
1853
|
+
duration_ms: number;
|
|
1854
|
+
error_code: AnalyticsLayoutErrorCode;
|
|
1855
|
+
};
|
|
1856
|
+
/** The email was saved. */
|
|
1857
|
+
editor_email_saved: Record<string, never>;
|
|
1858
|
+
/** The block was saved. */
|
|
1859
|
+
editor_block_saved: Record<string, never>;
|
|
1860
|
+
/** The "Back" button in the editor header was clicked. */
|
|
1861
|
+
editor_back_clicked: {
|
|
1862
|
+
entity_type: AnalyticsEntityType;
|
|
1863
|
+
};
|
|
1864
|
+
/** The email was deleted. */
|
|
1865
|
+
editor_email_deleted: Record<string, never>;
|
|
1866
|
+
/** "Delete" was clicked in the email menu. */
|
|
1867
|
+
editor_email_delete_clicked: Record<string, never>;
|
|
1868
|
+
/** The delete confirmation was opened. */
|
|
1869
|
+
editor_email_delete_modal_opened: Record<string, never>;
|
|
1870
|
+
/** "Duplicate" was clicked in the email menu. */
|
|
1871
|
+
editor_email_duplicate_clicked: Record<string, never>;
|
|
1872
|
+
/** The email copy was created. */
|
|
1873
|
+
editor_email_duplicated: Record<string, never>;
|
|
1874
|
+
/** "Import" was clicked. */
|
|
1875
|
+
editor_email_import_clicked: Record<string, never>;
|
|
1876
|
+
/** A file was imported into the email. */
|
|
1877
|
+
editor_email_imported: Record<string, never>;
|
|
1878
|
+
/** The email was exported. */
|
|
1879
|
+
editor_email_exported: {
|
|
1880
|
+
format: 'html' | 'text' | 'markdown' | 'clipboard' | 'image' | 'outlook' | 'zip';
|
|
1881
|
+
};
|
|
1882
|
+
/** The email was locked against edits. */
|
|
1883
|
+
editor_email_locked: Record<string, never>;
|
|
1884
|
+
/** The email was unlocked. */
|
|
1885
|
+
editor_email_unlocked: Record<string, never>;
|
|
1886
|
+
/** The block was locked against edits. */
|
|
1887
|
+
editor_block_locked: Record<string, never>;
|
|
1888
|
+
/** The block was unlocked. */
|
|
1889
|
+
editor_block_unlocked: Record<string, never>;
|
|
1890
|
+
/** An element was added to the canvas. */
|
|
1891
|
+
editor_element_added: {
|
|
1892
|
+
element_type: 'block' | 'structure' | 'atom';
|
|
1893
|
+
};
|
|
1894
|
+
/**
|
|
1895
|
+
* A setting of the selected element changed; sent once the user pauses. `property` is the setting name;
|
|
1896
|
+
* `value` is sent only for numeric, on/off, choice and color settings, never for links, images or text.
|
|
1897
|
+
*/
|
|
1898
|
+
editor_element_setting_changed: {
|
|
1899
|
+
element_type: string;
|
|
1900
|
+
property: string;
|
|
1901
|
+
value?: string | number | boolean;
|
|
1902
|
+
};
|
|
1903
|
+
/** The canvas width changed; sent once the user pauses. */
|
|
1904
|
+
editor_canvas_resized: {
|
|
1905
|
+
width: number | 'full';
|
|
1906
|
+
view_type: 'mobile' | 'desktop';
|
|
1907
|
+
};
|
|
1908
|
+
/** A tab of the side panel was opened; `tab` is the tab key, `disabled_tab` for a locked one. */
|
|
1909
|
+
editor_pane_tab_opened: {
|
|
1910
|
+
tab: string;
|
|
1911
|
+
};
|
|
1912
|
+
/** The editor configuration mode changed. */
|
|
1913
|
+
editor_config_mode_changed: {
|
|
1914
|
+
mode: 'simple' | 'editor' | 'pro';
|
|
1915
|
+
};
|
|
1916
|
+
/** The editor switched between the visual editor and the code. */
|
|
1917
|
+
editor_mode_changed: {
|
|
1918
|
+
mode: 'code' | 'visual';
|
|
1919
|
+
};
|
|
1920
|
+
/** The code mode was turned on; `direction` is where the code panel sits, `toggle` — the plain switch. */
|
|
1921
|
+
editor_code_mode_activated: {
|
|
1922
|
+
entity_type: AnalyticsEntityType;
|
|
1923
|
+
direction: 'left' | 'right' | 'bottom' | 'none' | 'toggle';
|
|
1924
|
+
};
|
|
1925
|
+
/** A breadcrumb above the canvas was clicked: on its `icon`, `text` or elsewhere on the `element`. */
|
|
1926
|
+
editor_breadcrumb_clicked: {
|
|
1927
|
+
target: 'element' | 'icon' | 'text';
|
|
1928
|
+
element_type?: string;
|
|
1929
|
+
element_index?: number;
|
|
1930
|
+
};
|
|
1931
|
+
/** The email code check ran. */
|
|
1932
|
+
editor_code_checked: {
|
|
1933
|
+
problems_count: number;
|
|
1934
|
+
};
|
|
1935
|
+
/** The link check ran. */
|
|
1936
|
+
editor_links_checked: {
|
|
1937
|
+
links_count: number;
|
|
1938
|
+
};
|
|
1939
|
+
/** The image check ran. */
|
|
1940
|
+
editor_images_checked: {
|
|
1941
|
+
images_count: number;
|
|
1942
|
+
};
|
|
1943
|
+
/** The spam check ran. */
|
|
1944
|
+
editor_spam_checked: {
|
|
1945
|
+
spam_score: number;
|
|
1946
|
+
};
|
|
1947
|
+
/** The preview was opened. */
|
|
1948
|
+
editor_preview_opened: {
|
|
1949
|
+
entity_type: AnalyticsEntityType;
|
|
1950
|
+
};
|
|
1951
|
+
/** The test email dialog was opened. */
|
|
1952
|
+
editor_test_email_modal_opened: {
|
|
1953
|
+
entity_type: AnalyticsEntityType;
|
|
1954
|
+
};
|
|
1955
|
+
/** A test email was sent. */
|
|
1956
|
+
editor_test_email_sent: {
|
|
1957
|
+
recipients_count: number;
|
|
1958
|
+
};
|
|
1959
|
+
/** The email was shared. */
|
|
1960
|
+
editor_email_shared: {
|
|
1961
|
+
entity_type: AnalyticsEntityType;
|
|
1962
|
+
};
|
|
1963
|
+
/** Inbox tests were opened. */
|
|
1964
|
+
editor_inbox_tests_opened: {
|
|
1965
|
+
entity_type: AnalyticsEntityType;
|
|
1966
|
+
};
|
|
1967
|
+
/** The version history was opened. */
|
|
1968
|
+
editor_version_history_opened: {
|
|
1969
|
+
entity_type: AnalyticsEntityType;
|
|
1970
|
+
};
|
|
1971
|
+
/** The web version was opened. */
|
|
1972
|
+
editor_web_version_opened: {
|
|
1973
|
+
entity_type: AnalyticsEntityType;
|
|
1974
|
+
};
|
|
1975
|
+
/** A message was sent to the AI assistant. */
|
|
1976
|
+
editor_ai_message_sent: Record<string, never>;
|
|
1977
|
+
/** The AI assistant replied. */
|
|
1978
|
+
editor_ai_reply_received: Record<string, never>;
|
|
1979
|
+
/** An AI assistant role was picked. */
|
|
1980
|
+
editor_ai_role_selected: {
|
|
1981
|
+
role: string;
|
|
1982
|
+
};
|
|
1983
|
+
/** A generated subject was put into the email. */
|
|
1984
|
+
editor_ai_subject_inserted: Record<string, never>;
|
|
1985
|
+
/** A generated preheader was put into the email. */
|
|
1986
|
+
editor_ai_preheader_inserted: Record<string, never>;
|
|
1987
|
+
/** A comment was posted. */
|
|
1988
|
+
editor_comment_sent: {
|
|
1989
|
+
entity_type: AnalyticsEntityType;
|
|
1990
|
+
};
|
|
1991
|
+
/** AI image generation started. */
|
|
1992
|
+
editor_ai_image_generation_started: Record<string, never>;
|
|
1993
|
+
}
|
|
1994
|
+
/** One analytics event: its name and properties. */
|
|
1995
|
+
type AnalyticsEvent = { [Name in keyof AnalyticsEventMap]: {
|
|
1996
|
+
name: Name;
|
|
1997
|
+
properties: AnalyticsEventMap[Name];
|
|
1998
|
+
}; }[keyof AnalyticsEventMap];
|
|
1999
|
+
type AnalyticsEventHandler = AppListener<AnalyticsEvent>;
|
|
1772
2000
|
interface Events {
|
|
1773
2001
|
/** read email handler */
|
|
1774
2002
|
handleReadEmail: AppEvent<ReadEmailHandler>;
|
|
@@ -1871,8 +2099,22 @@ export declare namespace ExportedApi {
|
|
|
1871
2099
|
handleLivePreviewEmail: AppEvent<LivePreviewHandler>;
|
|
1872
2100
|
/** fires when open preview */
|
|
1873
2101
|
handlePreviewEmail: AppEvent<PreviewHandler>;
|
|
1874
|
-
/**
|
|
2102
|
+
/**
|
|
2103
|
+
* Errors of the code editor (Monaco), the ones it underlines: fires on every edit while there are errors and once
|
|
2104
|
+
* when they are gone; no event without errors. Only after the code mode has been opened; on demand use `validateCode()`.
|
|
2105
|
+
*/
|
|
1875
2106
|
handleValidate: AppEvent<ValidateEvent>;
|
|
2107
|
+
/**
|
|
2108
|
+
* Errors of an imported file's own markup, checked before the browser parses (and silently repairs) it. The file is
|
|
2109
|
+
* checked only while someone listens to this event; the import itself is not delayed or cancelled.
|
|
2110
|
+
*/
|
|
2111
|
+
handleImportValidate: AppEvent<ImportValidateEvent>;
|
|
2112
|
+
/**
|
|
2113
|
+
* Fires on user actions in the editor, for the integrator's analytics: see {@link AnalyticsEventMap} for
|
|
2114
|
+
* the events. Fire-and-forget: the return value is ignored, and an exception in the listener does not
|
|
2115
|
+
* affect the editor.
|
|
2116
|
+
*/
|
|
2117
|
+
handleAnalyticsEvent: AppEvent<AnalyticsEventHandler>;
|
|
1876
2118
|
}
|
|
1877
2119
|
type Listeners = { [K in keyof Events]?: Events[K] extends AppEvent<infer Listener> ? Listener : never; };
|
|
1878
2120
|
interface Options extends Listeners {
|
|
@@ -2502,6 +2744,15 @@ interface StorageProvider {
|
|
|
2502
2744
|
* @default false
|
|
2503
2745
|
*/
|
|
2504
2746
|
useSoftDelete?: boolean;
|
|
2747
|
+
/**
|
|
2748
|
+
* Whether the trash can hold folders. Applies with `useSoftDelete`.
|
|
2749
|
+
* When `false`, deleting a folder moves the files of its whole subtree to the trash as a flat list
|
|
2750
|
+
* (a clashing name gets a number: `photo (1).png`, if `renameItem` is implemented) and then deletes
|
|
2751
|
+
* the emptied folders permanently. Nothing is deleted unless every file reached the trash.
|
|
2752
|
+
*
|
|
2753
|
+
* @default true
|
|
2754
|
+
*/
|
|
2755
|
+
trashSupportsFolders?: boolean;
|
|
2505
2756
|
/**
|
|
2506
2757
|
* Retrieve the file content as a binary blob.
|
|
2507
2758
|
*
|