@emailmaker/emailmaker 1.1.104 → 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/emailmaker-core.d5e4bde1.js +859 -0
- package/emailmaker-esm.js +11 -11
- package/{emailmaker-po.d92031f0.js → emailmaker-po.d5e4bde1.js} +1 -1
- package/emailmaker.d.ts +137 -13
- package/emailmaker.js +12 -12
- package/iframe/.vite/manifest.json +13 -25
- package/iframe/css/sandbox.css +9 -8
- package/iframe/{iframe-eblock.d92031f0.html → iframe-eblock.d5e4bde1.html} +2 -2
- package/iframe/{iframe.d92031f0.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/{2d570b04.js → 13b2a363.js} +3 -3
- package/static/core/{1cdd0eaa.js → 22140fa1.js} +1 -1
- package/static/core/{62b7892b.js → 2455e45e.js} +11 -11
- package/static/core/{c67adee2.js → 2734fa96.js} +1 -1
- package/static/core/3a6dbf2b.js +7 -0
- package/static/core/{0cb54b92.js → 4797d4f7.js} +6 -6
- package/static/core/{dc45a033.js → 566e8ce8.js} +1 -1
- package/static/core/{e76ed3bd.js → 6ba8aedc.js} +1 -1
- package/static/core/{4b7442c5.js → 6c52be40.js} +1 -1
- package/static/core/{36f15937.js → 6e8d008d.js} +1 -1
- package/static/core/{bd852c3b.js → 6f6a92e3.js} +1 -1
- package/static/core/{2a6bfcb1.js → 756e184f.js} +1 -1
- package/static/core/7985de17.js +28 -0
- package/static/core/{9596ee39.js → 7e51da74.js} +1 -1
- package/static/core/{448f5a93.js → 7e69b03c.js} +1 -1
- package/static/core/{20fae5cb.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/{f173fdc6.js → b43852b9.js} +1 -1
- package/static/core/{9f7f5230.js → b712bb05.js} +1 -1
- package/static/core/{ba4d44b4.js → b916e437.js} +1 -1
- package/static/core/{d3f1d83d.js → d5cd2a7b.js} +1 -1
- package/static/core/{c100433a.js → d74c1e57.js} +1 -1
- package/static/core/{fff40495.js → d8800deb.js} +1 -1
- package/static/core/{25095aa6.js → dbc12df7.js} +2 -2
- package/static/core/{eee25d75.js → e1f8b6ea.js} +1 -1
- package/static/core/e88db487.js +1 -0
- package/static/core/{360afb24.js → ecaf7c36.js} +1 -1
- package/static/core/edf49656.js +4 -0
- package/static/core/f20ffa90.js +4 -0
- package/static/core/{432ad49d.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.Wy6_YzQx.js → runtime.BZcjM8iG.js} +1 -1
- package/vendor/@emailmaker/ui-kit/package.json +1 -1
- package/emailmaker-core.d92031f0.js +0 -859
- package/iframe/js/discussHandlers.cyZrdU7c.js +0 -88
- package/iframe/js/iframe-eblock.body.d92031f0.js +0 -233
- package/iframe/js/iframe.body.d92031f0.js +0 -319
- package/iframe/js/rolldown-runtime.qcwTIabA.js +0 -1
- package/static/core/123fc796.js +0 -4
- package/static/core/5dc1b7fa.js +0 -7
- package/static/core/a866296c.js +0 -4
- package/static/core/cd6c8848.js +0 -28
- 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. */
|
|
@@ -1428,6 +1450,11 @@ export declare namespace ExportedApi {
|
|
|
1428
1450
|
blocksSearchEnabled?: boolean;
|
|
1429
1451
|
/** showing the panel for adding a block in the visual editor */
|
|
1430
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;
|
|
1431
1458
|
/** Read-only templates: forbid structure edits beyond allowed regions. */
|
|
1432
1459
|
lockEditor?: boolean;
|
|
1433
1460
|
/** Disables editing of preheader / title chrome when integrated with locking flows. */
|
|
@@ -1642,15 +1669,26 @@ export declare namespace ExportedApi {
|
|
|
1642
1669
|
export declare namespace ExportedApi {
|
|
1643
1670
|
namespace DataMixin {
|
|
1644
1671
|
type BlockShowOptions = {
|
|
1645
|
-
/**
|
|
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
|
+
*/
|
|
1646
1676
|
block: Block | string;
|
|
1647
|
-
/**
|
|
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 */
|
|
1648
1686
|
revisions?: BlockRevision[];
|
|
1649
|
-
/** comments */
|
|
1650
|
-
comments?: Comment[];
|
|
1651
1687
|
/** blocks */
|
|
1652
1688
|
blocks?: Block[];
|
|
1653
|
-
/**
|
|
1689
|
+
/** @deprecated Ignored for blocks: comments belong to emails. */
|
|
1690
|
+
comments?: Comment[];
|
|
1691
|
+
/** @deprecated Ignored for blocks: templates belong to emails. */
|
|
1654
1692
|
templateId?: string | number;
|
|
1655
1693
|
};
|
|
1656
1694
|
type EmailShowOptions = {
|
|
@@ -1668,18 +1706,35 @@ export declare namespace ExportedApi {
|
|
|
1668
1706
|
* Only meaningful together with an email id: a show without an id always starts a new draft.
|
|
1669
1707
|
*/
|
|
1670
1708
|
reload?: boolean;
|
|
1671
|
-
/** autosaves */
|
|
1709
|
+
/** the email's autosaves: unsaved work is recovered from the newest one */
|
|
1672
1710
|
autosaves?: EmailRevision[];
|
|
1673
1711
|
/** comments */
|
|
1674
1712
|
comments?: Comment[];
|
|
1675
1713
|
/** blocks */
|
|
1676
1714
|
blocks?: Block[];
|
|
1677
|
-
/** template identifier for
|
|
1715
|
+
/** template identifier for the email */
|
|
1678
1716
|
templateId?: number;
|
|
1679
1717
|
};
|
|
1680
|
-
|
|
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;
|
|
1681
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>;
|
|
1682
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>;
|
|
1683
1738
|
type ReadEmailAutosaveHandler = (emailId: string) => MayBePromise<EmailRevision | null | undefined>;
|
|
1684
1739
|
type ReadBlocksHandler = (project: string) => MayBePromise<Block[]>;
|
|
1685
1740
|
type ReadTemplateBlocksHandler = (block: {
|
|
@@ -1740,6 +1795,34 @@ export declare namespace ExportedApi {
|
|
|
1740
1795
|
handleReadTemplateBlocks: AppEvent<ReadTemplateBlocksHandler>;
|
|
1741
1796
|
/** read blocks handler */
|
|
1742
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>;
|
|
1743
1826
|
/** fires when block save */
|
|
1744
1827
|
handleSaveBlock: SaveEvent<Block>;
|
|
1745
1828
|
/** fires when block delete */
|
|
@@ -1750,8 +1833,13 @@ export declare namespace ExportedApi {
|
|
|
1750
1833
|
handleSaveComment: SaveEvent<Comment>;
|
|
1751
1834
|
/** fires when comment delete */
|
|
1752
1835
|
handleRemoveComment: RemoveEvent<Comment>;
|
|
1753
|
-
/** fires when user clicked on 'save' button */
|
|
1754
|
-
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>>;
|
|
1755
1843
|
/** fires when user clicked on 'next' button */
|
|
1756
1844
|
handleNextButtonClick: AppEvent<EmailHandler>;
|
|
1757
1845
|
/** fires when user clicked on 'previous' button */
|
|
@@ -1794,11 +1882,33 @@ export declare namespace ExportedApi {
|
|
|
1794
1882
|
interface Instance extends Events {
|
|
1795
1883
|
/**
|
|
1796
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}.
|
|
1797
1889
|
* @param content entity content
|
|
1798
1890
|
*/
|
|
1799
1891
|
show(content: Content): Promise<void>;
|
|
1800
1892
|
/**
|
|
1801
|
-
*
|
|
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:
|
|
1802
1912
|
* - the error thrown (or the rejection) of your `handleSaveEmail`, passed through unchanged;
|
|
1803
1913
|
* - {@link errors.IntegratorSaveTimeoutError} — `handleSaveEmail` did not settle in time;
|
|
1804
1914
|
* - {@link errors.SaveRefusedError} — the save was refused by a rule (`reason`: `'locked'`, `'too-many-tags'`, `'empty-content'`).
|
|
@@ -1806,6 +1916,12 @@ export declare namespace ExportedApi {
|
|
|
1806
1916
|
* Tell them apart with `instanceof` against `errors.*` or by `error.name`.
|
|
1807
1917
|
*/
|
|
1808
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>;
|
|
1809
1925
|
/**
|
|
1810
1926
|
* get the open email's fields without compiling it
|
|
1811
1927
|
*
|
|
@@ -1814,6 +1930,14 @@ export declare namespace ExportedApi {
|
|
|
1814
1930
|
* `preheader` does not require a compilation.
|
|
1815
1931
|
*/
|
|
1816
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>;
|
|
1817
1941
|
/**
|
|
1818
1942
|
* get email from inner storage
|
|
1819
1943
|
*
|
|
@@ -3409,4 +3533,4 @@ export declare namespace helpers {
|
|
|
3409
3533
|
*/
|
|
3410
3534
|
export function mapHttpStatusToErrorCode(status: number, defaultCode?: FileManagerErrorCode): FileManagerErrorCode;
|
|
3411
3535
|
}
|
|
3412
|
-
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 };
|