@emailmaker/emailmaker 1.1.103 → 1.1.108
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 +34 -0
- package/README.md +1 -0
- package/emailmaker-core.d5e4bde1.js +859 -0
- package/emailmaker-esm.js +11 -11
- package/{emailmaker-po.3529b1de.js → emailmaker-po.d5e4bde1.js} +1 -1
- package/emailmaker.d.ts +144 -13
- package/emailmaker.js +12 -12
- package/iframe/.vite/manifest.json +13 -25
- package/iframe/css/sandbox.css +11 -9
- package/iframe/{iframe-eblock.3529b1de.html → iframe-eblock.d5e4bde1.html} +2 -2
- package/iframe/{iframe.3529b1de.html → iframe.d5e4bde1.html} +2 -2
- package/iframe/js/elMarkupHelper.C66zL1zp.js +279 -0
- package/iframe/js/iframe-eblock.body.d5e4bde1.js +9 -0
- package/iframe/js/iframe-eblock.js +2 -2
- package/iframe/js/iframe.body.d5e4bde1.js +129 -0
- package/iframe/js/iframe.js +2 -2
- package/iframe/js/{typograf.all.B0pVhMV_.js → typograf.all.Mun9CrLC.js} +12 -12
- package/package.json +1 -1
- package/runtime/react/index.js +1 -1
- package/static/core/{6efc4a78.js → 13b2a363.js} +3 -3
- package/static/core/{a4d1fdc5.js → 22140fa1.js} +1 -1
- package/static/core/{71d7c710.js → 2455e45e.js} +11 -11
- package/static/core/{7fd8d843.js → 2734fa96.js} +1 -1
- package/static/core/3a6dbf2b.js +7 -0
- package/static/core/{0cb54b92.js → 4797d4f7.js} +6 -6
- package/static/core/{5eaa42ac.js → 566e8ce8.js} +1 -1
- package/static/core/{b99c36c9.js → 6ba8aedc.js} +1 -1
- package/static/core/{9909de51.js → 6c52be40.js} +1 -1
- package/static/core/{73291b7c.js → 6e8d008d.js} +1 -1
- package/static/core/{c1460335.js → 6f6a92e3.js} +1 -1
- package/static/core/{2a6bfcb1.js → 756e184f.js} +1 -1
- package/static/core/7985de17.js +28 -0
- package/static/core/{b3d5871e.js → 7e51da74.js} +1 -1
- package/static/core/{3b315cf0.js → 7e69b03c.js} +1 -1
- package/static/core/{82f5152d.js → 8889dbc6.js} +1 -1
- package/static/core/8a621181.js +2 -0
- package/static/core/a22823f9.js +1 -0
- package/static/core/{1922419a.js → abcacabc.js} +1 -1
- package/static/core/{48387a41.js → b43852b9.js} +1 -1
- package/static/core/{9f7f5230.js → b712bb05.js} +1 -1
- package/static/core/{e420456c.js → b916e437.js} +1 -1
- package/static/core/{8fe408ef.js → d5cd2a7b.js} +1 -1
- package/static/core/{91e9b542.js → d74c1e57.js} +1 -1
- package/static/core/{66be8204.js → d8800deb.js} +1 -1
- package/static/core/{fbd1b42a.js → dbc12df7.js} +2 -2
- package/static/core/{5de7475e.js → e1f8b6ea.js} +1 -1
- package/static/core/e88db487.js +1 -0
- package/static/core/{9ca4cda3.js → ecaf7c36.js} +1 -1
- package/static/core/edf49656.js +4 -0
- package/static/core/{6dd152e5.js → f20ffa90.js} +3 -3
- package/static/core/{682a8e2c.js → f37da79c.js} +1 -1
- package/static/esm/73c89921.js +1 -0
- package/static/esm/delivery-libs.js +1 -1
- package/static/umd-runtime/delivery-libs.eFZaeVgo.js +1 -0
- package/static/umd-runtime/{runtime.D9PiY8Jx.js → runtime.BZcjM8iG.js} +1 -1
- package/vendor/@emailmaker/ui-kit/package.json +1 -1
- package/emailmaker-core.3529b1de.js +0 -859
- package/iframe/js/discussHandlers.BrvInbT7.js +0 -88
- package/iframe/js/iframe-eblock.body.3529b1de.js +0 -233
- package/iframe/js/iframe.body.3529b1de.js +0 -319
- package/iframe/js/rolldown-runtime.qcwTIabA.js +0 -1
- package/static/core/90715222.js +0 -28
- package/static/core/c9a013a6.js +0 -4
- package/static/core/d4619860.js +0 -7
- package/static/core/e6f6edff.js +0 -1
- package/static/esm/d4338c39.js +0 -1
- package/static/umd-runtime/delivery-libs.Cmqsjupj.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.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.1.108";ct.parsePoCatalog=ta,ct.version=ra});
|
package/emailmaker.d.ts
CHANGED
|
@@ -275,9 +275,25 @@ interface IFrameErrorEntry {
|
|
|
275
275
|
/** The canvas instance that reported the error; a reloaded canvas gets a new one. */
|
|
276
276
|
instance?: string;
|
|
277
277
|
}
|
|
278
|
+
/** A node of foreign structure: tag and class only, never the content. */
|
|
279
|
+
interface IFrameForeignNodeInfo {
|
|
280
|
+
tag: string;
|
|
281
|
+
class?: string;
|
|
282
|
+
}
|
|
283
|
+
/** What a commit was about to carry into the email text from nodes the canvas does not own. */
|
|
284
|
+
interface IFrameForeignStructureInfo {
|
|
285
|
+
/** Kind of the first finding: `inserted`, `moved`, `moved-own-node`, `attribute`, `text` or `implicit-tbody`. */
|
|
286
|
+
kind: string;
|
|
287
|
+
/** Distinct kinds of all findings of the commit. */
|
|
288
|
+
kinds: string[];
|
|
289
|
+
/** How many findings the commit had. */
|
|
290
|
+
count: number;
|
|
291
|
+
node: IFrameForeignNodeInfo;
|
|
292
|
+
parent?: IFrameForeignNodeInfo;
|
|
293
|
+
}
|
|
278
294
|
/** A canvas sync drift found without a parsing error. Positions and lengths only, never the email markup. */
|
|
279
295
|
interface IFrameSyncDriftInfo {
|
|
280
|
-
/** `tree-node-out-of-place`, `host-copy-drift` and so on. */
|
|
296
|
+
/** `tree-node-out-of-place`, `host-copy-drift`, `foreign-structure-in-commit`, `implicit-tbody-in-canvas` and so on. */
|
|
281
297
|
reason: string;
|
|
282
298
|
/** Where the drift was noticed, when a reason has several places. */
|
|
283
299
|
at?: string;
|
|
@@ -288,6 +304,8 @@ interface IFrameSyncDriftInfo {
|
|
|
288
304
|
ownLength: number;
|
|
289
305
|
cachedLength: number;
|
|
290
306
|
};
|
|
307
|
+
/** The foreign structure a commit met; set for `foreign-structure-in-commit` and `implicit-tbody-in-canvas`. */
|
|
308
|
+
foreign?: IFrameForeignStructureInfo;
|
|
291
309
|
}
|
|
292
310
|
interface IFrameErrorInfo {
|
|
293
311
|
/** `parse-error` when absent; `sync-drift` is a warning report with nothing rolled back. */
|
|
@@ -649,6 +667,8 @@ export declare namespace ExportedApi {
|
|
|
649
667
|
date_gmt?: string | null;
|
|
650
668
|
/** The unique identifier of the record. */
|
|
651
669
|
id?: string;
|
|
670
|
+
/** Set by the editor: `true` while the block has not been saved yet and has no `id`. */
|
|
671
|
+
isNew?: boolean;
|
|
652
672
|
/**
|
|
653
673
|
* The URL of the record.
|
|
654
674
|
* @format uri
|
|
@@ -849,6 +869,8 @@ export declare namespace ExportedApi {
|
|
|
849
869
|
date_gmt?: string | null;
|
|
850
870
|
/** Unique identifier of the record. */
|
|
851
871
|
id?: string;
|
|
872
|
+
/** Set by the editor: `true` while the email has not been saved yet and has no `id`. */
|
|
873
|
+
isNew?: boolean;
|
|
852
874
|
/** The name of the letter. */
|
|
853
875
|
title?: string;
|
|
854
876
|
/** Preheader of the letter. */
|
|
@@ -1310,6 +1332,13 @@ export declare namespace ExportedApi {
|
|
|
1310
1332
|
};
|
|
1311
1333
|
/** Local “upload from computer” entry in Image Center. */
|
|
1312
1334
|
imageCenterLocalUploadEnabled: boolean;
|
|
1335
|
+
/**
|
|
1336
|
+
* Insert a link from the Image Center URL field (image and background pickers) into the email as is:
|
|
1337
|
+
* the image is neither downloaded nor uploaded to storage, `handleLoadImage` is not called. A pasted
|
|
1338
|
+
* link goes in right away, a typed one on Enter. Stock and GIF tabs are not affected; with
|
|
1339
|
+
* `imageCenterFileManagerView: true` the field is absent and the option has no effect. Default `false`.
|
|
1340
|
+
*/
|
|
1341
|
+
imageCenterInsertUrlAsIs?: boolean;
|
|
1313
1342
|
/** Stock photo tab in Image Center / file manager. */
|
|
1314
1343
|
imageCenterStockEnabled: boolean;
|
|
1315
1344
|
/** GIF / animated stock tab in Image Center. */
|
|
@@ -1421,6 +1450,11 @@ export declare namespace ExportedApi {
|
|
|
1421
1450
|
blocksSearchEnabled?: boolean;
|
|
1422
1451
|
/** showing the panel for adding a block in the visual editor */
|
|
1423
1452
|
blocksAddPanelEnabled?: boolean;
|
|
1453
|
+
/**
|
|
1454
|
+
* Plugin: «Edit block» in the block library of the email editor opens the block editor over the
|
|
1455
|
+
* email (see `openBlock`). Default `false` — the item is not shown. Does not affect `openBlock()` itself.
|
|
1456
|
+
*/
|
|
1457
|
+
openBlockFromEmailEnabled?: boolean;
|
|
1424
1458
|
/** Read-only templates: forbid structure edits beyond allowed regions. */
|
|
1425
1459
|
lockEditor?: boolean;
|
|
1426
1460
|
/** Disables editing of preheader / title chrome when integrated with locking flows. */
|
|
@@ -1635,15 +1669,26 @@ export declare namespace ExportedApi {
|
|
|
1635
1669
|
export declare namespace ExportedApi {
|
|
1636
1670
|
namespace DataMixin {
|
|
1637
1671
|
type BlockShowOptions = {
|
|
1638
|
-
/**
|
|
1672
|
+
/**
|
|
1673
|
+
* block content: an entity, or a string with the block code. A block given as `{ id }` only is
|
|
1674
|
+
* read through `handleReadBlock`, falling back to `handleReadBlocks`.
|
|
1675
|
+
*/
|
|
1639
1676
|
block: Block | string;
|
|
1640
|
-
/**
|
|
1677
|
+
/**
|
|
1678
|
+
* Re-read the block instead of applying the passed fields over the open session — the same
|
|
1679
|
+
* command as {@link EmailShowOptions.reload}. Showing the same block again keeps the editing
|
|
1680
|
+
* session by default; with this flag the session is closed, `handleReadBlock` is called again,
|
|
1681
|
+
* the undo history and the dirty mark are reset, and anything passed along is applied on top of
|
|
1682
|
+
* what was read. Only meaningful together with a block id.
|
|
1683
|
+
*/
|
|
1684
|
+
reload?: boolean;
|
|
1685
|
+
/** the block's autosaves (same role as `autosaves` of an email): unsaved work is recovered from the newest one */
|
|
1641
1686
|
revisions?: BlockRevision[];
|
|
1642
|
-
/** comments */
|
|
1643
|
-
comments?: Comment[];
|
|
1644
1687
|
/** blocks */
|
|
1645
1688
|
blocks?: Block[];
|
|
1646
|
-
/**
|
|
1689
|
+
/** @deprecated Ignored for blocks: comments belong to emails. */
|
|
1690
|
+
comments?: Comment[];
|
|
1691
|
+
/** @deprecated Ignored for blocks: templates belong to emails. */
|
|
1647
1692
|
templateId?: string | number;
|
|
1648
1693
|
};
|
|
1649
1694
|
type EmailShowOptions = {
|
|
@@ -1661,18 +1706,35 @@ export declare namespace ExportedApi {
|
|
|
1661
1706
|
* Only meaningful together with an email id: a show without an id always starts a new draft.
|
|
1662
1707
|
*/
|
|
1663
1708
|
reload?: boolean;
|
|
1664
|
-
/** autosaves */
|
|
1709
|
+
/** the email's autosaves: unsaved work is recovered from the newest one */
|
|
1665
1710
|
autosaves?: EmailRevision[];
|
|
1666
1711
|
/** comments */
|
|
1667
1712
|
comments?: Comment[];
|
|
1668
1713
|
/** blocks */
|
|
1669
1714
|
blocks?: Block[];
|
|
1670
|
-
/** template identifier for
|
|
1715
|
+
/** template identifier for the email */
|
|
1671
1716
|
templateId?: number;
|
|
1672
1717
|
};
|
|
1673
|
-
|
|
1718
|
+
/**
|
|
1719
|
+
* What to show: an email (code, entity or {@link EmailShowOptions}) or a block ({@link BlockShowOptions}).
|
|
1720
|
+
* A block given as `{ id }` only is read through `handleReadBlock`, falling back to `handleReadBlocks`.
|
|
1721
|
+
*/
|
|
1722
|
+
type Content = string | Email | EmailShowOptions | BlockShowOptions;
|
|
1674
1723
|
type ReadEmailHandler = (id: string) => MayBePromise<Email>;
|
|
1724
|
+
/** Reads one block by id; return nothing when the block does not exist. */
|
|
1725
|
+
type ReadBlockHandler = (id: string) => MayBePromise<Block | undefined>;
|
|
1726
|
+
/** Block navigation payload: the block that was opened or closed. */
|
|
1727
|
+
type BlockNavigationPayload = {
|
|
1728
|
+
block: Block;
|
|
1729
|
+
/** Set on close: the block had changes that were not saved. */
|
|
1730
|
+
hasUnsavedChanges?: boolean;
|
|
1731
|
+
};
|
|
1732
|
+
type BlockNavigationHandler = AppListener<BlockNavigationPayload>;
|
|
1733
|
+
type BlockHandler = AppListener<Block>;
|
|
1675
1734
|
type ReadEmailAutosavesHandler = (emailId: string) => MayBePromise<EmailRevision[]>;
|
|
1735
|
+
/** Reads a block's autosaves; return an empty list when there are none. */
|
|
1736
|
+
type ReadBlockAutosavesHandler = (blockId: string) => MayBePromise<BlockRevision[]>;
|
|
1737
|
+
type ReadBlockAutosaveHandler = (blockId: string) => MayBePromise<BlockRevision | null | undefined>;
|
|
1676
1738
|
type ReadEmailAutosaveHandler = (emailId: string) => MayBePromise<EmailRevision | null | undefined>;
|
|
1677
1739
|
type ReadBlocksHandler = (project: string) => MayBePromise<Block[]>;
|
|
1678
1740
|
type ReadTemplateBlocksHandler = (block: {
|
|
@@ -1733,6 +1795,34 @@ export declare namespace ExportedApi {
|
|
|
1733
1795
|
handleReadTemplateBlocks: AppEvent<ReadTemplateBlocksHandler>;
|
|
1734
1796
|
/** read blocks handler */
|
|
1735
1797
|
handleReadBlocks: AppEvent<ReadBlocksHandler>;
|
|
1798
|
+
/** read one block by id; optional — without it the block is looked up via `handleReadBlocks` */
|
|
1799
|
+
handleReadBlock: AppEvent<ReadBlockHandler>;
|
|
1800
|
+
/** fires when a block editor is opened over the current email (`openBlock` or "Edit block") */
|
|
1801
|
+
handleOpenBlock: AppEvent<BlockNavigationHandler>;
|
|
1802
|
+
/**
|
|
1803
|
+
* fires when the user leaves the block editor ("Back" or `closeBlock`); a block opened over an email
|
|
1804
|
+
* is closed and the email is back, otherwise the editor stays on the block and the host decides
|
|
1805
|
+
*/
|
|
1806
|
+
handleCloseBlock: AppEvent<BlockNavigationHandler>;
|
|
1807
|
+
/** read a block's autosaves (block editor history and recovery) */
|
|
1808
|
+
handleReadBlockRevisions: AppEvent<ReadBlockAutosavesHandler>;
|
|
1809
|
+
/**
|
|
1810
|
+
* Returns the latest autosave snapshot of the block, or `null` if there is none. Optional: when it
|
|
1811
|
+
* is set, the editor recovers unsaved work from it; without it the editor looks for the newest
|
|
1812
|
+
* revision with `autosave: true` in `handleReadBlockRevisions`. Either way the snapshot is
|
|
1813
|
+
* recovered only if it is newer than the block's `modified`.
|
|
1814
|
+
*/
|
|
1815
|
+
handleReadBlockAutosave: AppEvent<ReadBlockAutosaveHandler>;
|
|
1816
|
+
/** fires when the open block is autosaved */
|
|
1817
|
+
handleBlockAutosave: CreateEvent<BlockRevision>;
|
|
1818
|
+
/** fires when a block autosave is deleted */
|
|
1819
|
+
handleRemoveBlockAutoSave: RemoveEvent<BlockRevision>;
|
|
1820
|
+
/** fires when the block is shown in the editor (its content is on the canvas) */
|
|
1821
|
+
handleBlockInit: AppEvent<BlockHandler>;
|
|
1822
|
+
/** fires when the open block changes (content or fields), debounced like `handleEmailChanged` */
|
|
1823
|
+
handleBlockChanged: AppEvent<BlockHandler>;
|
|
1824
|
+
/** fires when the user asks to clone the open block */
|
|
1825
|
+
handleCloneBlock: AppEvent<BlockHandler>;
|
|
1736
1826
|
/** fires when block save */
|
|
1737
1827
|
handleSaveBlock: SaveEvent<Block>;
|
|
1738
1828
|
/** fires when block delete */
|
|
@@ -1743,8 +1833,13 @@ export declare namespace ExportedApi {
|
|
|
1743
1833
|
handleSaveComment: SaveEvent<Comment>;
|
|
1744
1834
|
/** fires when comment delete */
|
|
1745
1835
|
handleRemoveComment: RemoveEvent<Comment>;
|
|
1746
|
-
/** fires when user clicked on 'save' button */
|
|
1747
|
-
handleSaveButtonClick: AppEvent<
|
|
1836
|
+
/** fires when user clicked on 'save' button of the email; return `false` to cancel the save */
|
|
1837
|
+
handleSaveButtonClick: AppEvent<AppListener<Email, false | void>>;
|
|
1838
|
+
/**
|
|
1839
|
+
* fires when user asked to save the open block (the 'save' button or Ctrl+S); return `false` to
|
|
1840
|
+
* cancel the save. The block counterpart of {@link handleSaveButtonClick}.
|
|
1841
|
+
*/
|
|
1842
|
+
handleSaveBlockButtonClick: AppEvent<AppListener<Block, false | void>>;
|
|
1748
1843
|
/** fires when user clicked on 'next' button */
|
|
1749
1844
|
handleNextButtonClick: AppEvent<EmailHandler>;
|
|
1750
1845
|
/** fires when user clicked on 'previous' button */
|
|
@@ -1787,11 +1882,33 @@ export declare namespace ExportedApi {
|
|
|
1787
1882
|
interface Instance extends Events {
|
|
1788
1883
|
/**
|
|
1789
1884
|
* show block or email
|
|
1885
|
+
*
|
|
1886
|
+
* A string is code: `show('<html>…')` shows email code, `show({ block: '<div em="block">…' })` shows
|
|
1887
|
+
* block code. `show({ block })` replaces what is open and fires no navigation events; to open a block
|
|
1888
|
+
* over the email and come back to it, use {@link openBlock}.
|
|
1790
1889
|
* @param content entity content
|
|
1791
1890
|
*/
|
|
1792
1891
|
show(content: Content): Promise<void>;
|
|
1793
1892
|
/**
|
|
1794
|
-
*
|
|
1893
|
+
* open a block editor over the current email; the email stays open and comes back on {@link closeBlock}
|
|
1894
|
+
* @param block block id or entity. Unlike `show({ block })`, a string here is an id, not code; it is
|
|
1895
|
+
* read through `handleReadBlock`, falling back to `handleReadBlocks`
|
|
1896
|
+
*/
|
|
1897
|
+
openBlock(block: string | Block): Promise<void>;
|
|
1898
|
+
/**
|
|
1899
|
+
* show a block in place of what is open — the same as `show({ block, ...options })`
|
|
1900
|
+
* @param block block entity, or block code as a string (unlike {@link openBlock}, where a string is an id)
|
|
1901
|
+
* @param options `reload`, `blocks`, `revisions` — as in `BlockShowOptions`
|
|
1902
|
+
*/
|
|
1903
|
+
showBlock(block: string | Block, options?: Omit<DataMixin.BlockShowOptions, 'block'>): Promise<void>;
|
|
1904
|
+
/** leave the block editor: a block opened by {@link openBlock} is closed and the email is back */
|
|
1905
|
+
closeBlock(): Promise<void>;
|
|
1906
|
+
/**
|
|
1907
|
+
* Save the email. While a block is open over the email (see {@link openBlock}), the email under it is
|
|
1908
|
+
* saved; the block is saved with {@link saveBlock}. Rejects when there is no email to save (only a block
|
|
1909
|
+
* is shown with {@link showBlock}).
|
|
1910
|
+
*
|
|
1911
|
+
* Resolves with the saved email; rejects when the save did not happen:
|
|
1795
1912
|
* - the error thrown (or the rejection) of your `handleSaveEmail`, passed through unchanged;
|
|
1796
1913
|
* - {@link errors.IntegratorSaveTimeoutError} — `handleSaveEmail` did not settle in time;
|
|
1797
1914
|
* - {@link errors.SaveRefusedError} — the save was refused by a rule (`reason`: `'locked'`, `'too-many-tags'`, `'empty-content'`).
|
|
@@ -1799,6 +1916,12 @@ export declare namespace ExportedApi {
|
|
|
1799
1916
|
* Tell them apart with `instanceof` against `errors.*` or by `error.name`.
|
|
1800
1917
|
*/
|
|
1801
1918
|
save(): Promise<Email>;
|
|
1919
|
+
/**
|
|
1920
|
+
* Save the open block through `handleSaveBlock`. Rejects when no block is open; also rejects with the
|
|
1921
|
+
* error of your `handleSaveBlock`, or with {@link errors.IntegratorSaveTimeoutError} when it did not
|
|
1922
|
+
* settle in time.
|
|
1923
|
+
*/
|
|
1924
|
+
saveBlock(): Promise<Block>;
|
|
1802
1925
|
/**
|
|
1803
1926
|
* get the open email's fields without compiling it
|
|
1804
1927
|
*
|
|
@@ -1807,6 +1930,14 @@ export declare namespace ExportedApi {
|
|
|
1807
1930
|
* `preheader` does not require a compilation.
|
|
1808
1931
|
*/
|
|
1809
1932
|
getEmailSnapshot(): Promise<Email>;
|
|
1933
|
+
/**
|
|
1934
|
+
* get the open block's fields without saving it
|
|
1935
|
+
*
|
|
1936
|
+
* The block counterpart of {@link getEmailSnapshot}: the same entity {@link save} would send, read
|
|
1937
|
+
* from the editor as it is now. Resolves to `null` when no block is open — while the block editor
|
|
1938
|
+
* is closed, `getEmailSnapshot` describes what is open.
|
|
1939
|
+
*/
|
|
1940
|
+
getBlockSnapshot(): Promise<Block | null>;
|
|
1810
1941
|
/**
|
|
1811
1942
|
* get email from inner storage
|
|
1812
1943
|
*
|
|
@@ -3402,4 +3533,4 @@ export declare namespace helpers {
|
|
|
3402
3533
|
*/
|
|
3403
3534
|
export function mapHttpStatusToErrorCode(status: number, defaultCode?: FileManagerErrorCode): FileManagerErrorCode;
|
|
3404
3535
|
}
|
|
3405
|
-
export { ApiPaginationResponse, AppEvent, AppListener, BatchResult, BlockDesc, COMMON_STYLES, CommonStyles, CommonStylesBlock, CommonStylesBorder, CommonStylesBorderRadius, CommonStylesBorderSide, CommonStylesButton, CommonStylesCard, CommonStylesHeading, CommonStylesLink, CommonStylesPadding, CommonStylesText, Config, CreateEvent, CreateEventPayload, CreateListener, EditHistorySnapshot, EditStepChangeInfo, EditStepInfo, EditorStartFailedError, EmailDesc, ExtractPluginOptions, notification_d_exports as FileManager, FileManagerApiErrorInfo, FileSystemItem, FileSystemItemUpdate, GetFileDataOptions, IFrameErrorCause, IFrameErrorEntry, IFrameErrorInfo, IFrameErrorMutationInfo, IFrameErrorNodeInfo, IFrameErrorSource, IFrameSyncDriftInfo, IPlugin, IPluginConstructor, IUndoRedoService, Instance, InstanceOfPluginType, MayBePromise, MergeTag, MergeTagGroup, MergeTagItem, ModulePluginDescriptor, NotifyEvent, OperationResult, Options, ParsedAMP, PluginClassConstructor, PluginDescriptor, PluginEntryItem, PluginFunctionConstructor, PluginLoader, PluginRegistry, PluginTypeMap, PreloadOptions, PromiseWrap, RecursivePartial, RegistryPluginDescriptor, RemoveEvent, RemoveEventPayload, RemoveListener, SaveEvent, SaveEventPayload, SaveListener, SortState, StorageProvider, StorageProviderController, UploadFileItemInput, UploadFilesRequest, WindowPluginDescriptor, create, getInstance, init, parseAMP, pluginRegistry, preload, version };
|
|
3536
|
+
export { ApiPaginationResponse, AppEvent, AppListener, BatchResult, BlockDesc, COMMON_STYLES, CommonStyles, CommonStylesBlock, CommonStylesBorder, CommonStylesBorderRadius, CommonStylesBorderSide, CommonStylesButton, CommonStylesCard, CommonStylesHeading, CommonStylesLink, CommonStylesPadding, CommonStylesText, Config, CreateEvent, CreateEventPayload, CreateListener, EditHistorySnapshot, EditStepChangeInfo, EditStepInfo, EditorStartFailedError, EmailDesc, ExtractPluginOptions, notification_d_exports as FileManager, FileManagerApiErrorInfo, FileSystemItem, FileSystemItemUpdate, GetFileDataOptions, IFrameErrorCause, IFrameErrorEntry, IFrameErrorInfo, IFrameErrorMutationInfo, IFrameErrorNodeInfo, IFrameErrorSource, IFrameForeignNodeInfo, IFrameForeignStructureInfo, IFrameSyncDriftInfo, IPlugin, IPluginConstructor, IUndoRedoService, Instance, InstanceOfPluginType, MayBePromise, MergeTag, MergeTagGroup, MergeTagItem, ModulePluginDescriptor, NotifyEvent, OperationResult, Options, ParsedAMP, PluginClassConstructor, PluginDescriptor, PluginEntryItem, PluginFunctionConstructor, PluginLoader, PluginRegistry, PluginTypeMap, PreloadOptions, PromiseWrap, RecursivePartial, RegistryPluginDescriptor, RemoveEvent, RemoveEventPayload, RemoveListener, SaveEvent, SaveEventPayload, SaveListener, SortState, StorageProvider, StorageProviderController, UploadFileItemInput, UploadFilesRequest, WindowPluginDescriptor, create, getInstance, init, parseAMP, pluginRegistry, preload, version };
|