@emailmaker/emailmaker 1.1.108 → 1.2.0
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 +54 -1
- package/emailmaker-core.fec11667.js +859 -0
- package/emailmaker-esm.js +11 -11
- package/{emailmaker-po.d5e4bde1.js → emailmaker-po.fec11667.js} +1 -1
- package/emailmaker.d.ts +220 -1
- package/emailmaker.js +12 -12
- package/iframe/.vite/manifest.json +4 -4
- package/iframe/{iframe-eblock.d5e4bde1.html → iframe-eblock.fec11667.html} +2 -2
- package/iframe/{iframe.d5e4bde1.html → iframe.fec11667.html} +2 -2
- package/iframe/js/{elMarkupHelper.C66zL1zp.js → elMarkupHelper.Dv3AYDYP.js} +79 -79
- package/iframe/js/{iframe-eblock.body.d5e4bde1.js → iframe-eblock.body.fec11667.js} +1 -1
- package/iframe/js/iframe-eblock.js +2 -2
- package/iframe/js/{iframe.body.d5e4bde1.js → iframe.body.fec11667.js} +1 -1
- package/iframe/js/iframe.js +2 -2
- package/package.json +1 -1
- package/runtime/react/index.js +1 -1
- package/static/core/{6ba8aedc.js → 29b3ccef.js} +1 -1
- package/static/core/{edf49656.js → 2e70fae0.js} +3 -3
- package/static/core/{e1f8b6ea.js → 44fac8d4.js} +1 -1
- package/static/core/{6f6a92e3.js → 5c4239d8.js} +1 -1
- package/static/core/{7e51da74.js → 64c27f91.js} +1 -1
- package/static/core/{b916e437.js → 727a165f.js} +1 -1
- package/static/core/{dbc12df7.js → 790366d3.js} +1 -1
- package/static/core/{2734fa96.js → 7be64bf5.js} +1 -1
- package/static/core/{22140fa1.js → 7d006e7b.js} +1 -1
- package/static/core/{7985de17.js → 83d2ca5d.js} +6 -6
- package/static/core/{d8800deb.js → 8b89090c.js} +1 -1
- package/static/core/{8a621181.js → 8da91a53.js} +1 -1
- package/static/core/{13b2a363.js → 99c15a5d.js} +1 -1
- package/static/core/{ecaf7c36.js → 9f7e0f94.js} +1 -1
- package/static/core/a2c7aeb0.js +1 -0
- package/static/core/{d74c1e57.js → a9235d9e.js} +1 -1
- package/static/core/{566e8ce8.js → b27aec0b.js} +1 -1
- package/static/core/{6e8d008d.js → b74171bd.js} +1 -1
- package/static/core/{8889dbc6.js → b7dee12b.js} +1 -1
- package/static/core/{b43852b9.js → bbb87124.js} +1 -1
- package/static/core/{756e184f.js → c5713f94.js} +1 -1
- package/static/core/{f37da79c.js → ccb090eb.js} +1 -1
- package/static/core/{6c52be40.js → db685f4e.js} +1 -1
- package/static/core/{d5cd2a7b.js → e15ab856.js} +1 -1
- package/static/core/{3a6dbf2b.js → e7bbe544.js} +1 -1
- package/static/core/{7e69b03c.js → ec5f739e.js} +1 -1
- package/static/core/{f20ffa90.js → f2ced98d.js} +2 -2
- package/static/core/{2455e45e.js → f54ef492.js} +1 -1
- package/static/esm/ae0fe329.js +1 -0
- package/static/umd-runtime/runtime.CunK0nEC.js +1 -0
- package/vendor/@emailmaker/ui-kit/package.json +1 -1
- package/emailmaker-core.d5e4bde1.js +0 -859
- package/static/core/a22823f9.js +0 -1
- package/static/esm/73c89921.js +0 -1
- package/static/umd-runtime/runtime.BZcjM8iG.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.0";ct.parsePoCatalog=ta,ct.version=ra});
|
package/emailmaker.d.ts
CHANGED
|
@@ -1178,6 +1178,8 @@ export declare namespace ExportedApi {
|
|
|
1178
1178
|
saveButtonEnabled: boolean;
|
|
1179
1179
|
/** text of the main button */
|
|
1180
1180
|
saveButtonText: string;
|
|
1181
|
+
/** saving by Ctrl+S / Cmd+S; `false` turns it off, the browser's "Save page" dialog stays suppressed. Default `true`. */
|
|
1182
|
+
saveHotkeyEnabled?: boolean;
|
|
1181
1183
|
/** Primary / command row of actions (extended toolbar cluster). */
|
|
1182
1184
|
commandButtonsEnabled?: boolean;
|
|
1183
1185
|
/** displaying the email ID */
|
|
@@ -1769,6 +1771,209 @@ export declare namespace ExportedApi {
|
|
|
1769
1771
|
id: string;
|
|
1770
1772
|
}>;
|
|
1771
1773
|
type ValidateEvent = AppListener<CodeError[]>;
|
|
1774
|
+
/** Code errors of an imported file, found in its own markup before the browser parses it. */
|
|
1775
|
+
interface ImportValidation {
|
|
1776
|
+
/** errors in the file's markup; empty when there is nothing to report */
|
|
1777
|
+
errors: CodeError[];
|
|
1778
|
+
/** name of the imported file */
|
|
1779
|
+
fileName: string;
|
|
1780
|
+
}
|
|
1781
|
+
type ImportValidateEvent = AppListener<ImportValidation>;
|
|
1782
|
+
/** Markup the layout converter recognized; `unknown` is markup it cannot name, handled by the AI converter. */
|
|
1783
|
+
type AnalyticsLayoutSource = 'beefree' | 'stripo' | 'unknown';
|
|
1784
|
+
/** How a layout was converted: the built-in algorithm or the AI converter. */
|
|
1785
|
+
type AnalyticsLayoutMethod = 'algorithm' | 'ai';
|
|
1786
|
+
/**
|
|
1787
|
+
* What started a conversion: `prompt` — the suggestion on opening the email, `import` — a file import, `menu` — the
|
|
1788
|
+
* "Convert" menu item, `retry` — "Retry" after an error. The first three show the same popup first.
|
|
1789
|
+
*/
|
|
1790
|
+
type AnalyticsLayoutTrigger = 'prompt' | 'import' | 'menu' | 'retry';
|
|
1791
|
+
/** Why a conversion failed. */
|
|
1792
|
+
type AnalyticsLayoutErrorCode = 'algorithm_failed' | 'ai_disabled' | 'html_too_large' | 'too_many_active' | 'hourly_limit_reached' | 'timeout' | 'network' | 'unknown';
|
|
1793
|
+
/** What the editor has open. */
|
|
1794
|
+
type AnalyticsEntityType = 'email' | 'block';
|
|
1795
|
+
/**
|
|
1796
|
+
* Analytics events the editor reports through {@link Events.handleAnalyticsEvent}, by name, with their
|
|
1797
|
+
* properties. Properties carry only closed lists, numbers and flags: no ids, names or user text.
|
|
1798
|
+
*/
|
|
1799
|
+
interface AnalyticsEventMap {
|
|
1800
|
+
/** The "convert this layout?" popup was shown. */
|
|
1801
|
+
editor_layout_convert_offered: {
|
|
1802
|
+
source: AnalyticsLayoutSource;
|
|
1803
|
+
trigger: AnalyticsLayoutTrigger;
|
|
1804
|
+
};
|
|
1805
|
+
/** The user dismissed the conversion popup; `never_suggest` — they also asked not to offer it again. */
|
|
1806
|
+
editor_layout_convert_declined: {
|
|
1807
|
+
source: AnalyticsLayoutSource;
|
|
1808
|
+
trigger: AnalyticsLayoutTrigger;
|
|
1809
|
+
never_suggest: boolean;
|
|
1810
|
+
};
|
|
1811
|
+
/** A conversion attempt started. */
|
|
1812
|
+
editor_layout_convert_started: {
|
|
1813
|
+
source: AnalyticsLayoutSource;
|
|
1814
|
+
method: AnalyticsLayoutMethod;
|
|
1815
|
+
trigger: AnalyticsLayoutTrigger;
|
|
1816
|
+
};
|
|
1817
|
+
/** The converted layout is in the editor; `method` is the one that produced it, `fallback_to_ai` — the algorithm failed first. */
|
|
1818
|
+
editor_layout_convert_succeeded: {
|
|
1819
|
+
source: AnalyticsLayoutSource;
|
|
1820
|
+
method: AnalyticsLayoutMethod;
|
|
1821
|
+
trigger: AnalyticsLayoutTrigger;
|
|
1822
|
+
duration_ms: number;
|
|
1823
|
+
fallback_to_ai: boolean;
|
|
1824
|
+
};
|
|
1825
|
+
/** A conversion attempt failed. */
|
|
1826
|
+
editor_layout_convert_failed: {
|
|
1827
|
+
source: AnalyticsLayoutSource;
|
|
1828
|
+
method: AnalyticsLayoutMethod;
|
|
1829
|
+
trigger: AnalyticsLayoutTrigger;
|
|
1830
|
+
duration_ms: number;
|
|
1831
|
+
error_code: AnalyticsLayoutErrorCode;
|
|
1832
|
+
};
|
|
1833
|
+
/** The email was saved. */
|
|
1834
|
+
editor_email_saved: Record<string, never>;
|
|
1835
|
+
/** The block was saved. */
|
|
1836
|
+
editor_block_saved: Record<string, never>;
|
|
1837
|
+
/** The "Back" button in the editor header was clicked. */
|
|
1838
|
+
editor_back_clicked: {
|
|
1839
|
+
entity_type: AnalyticsEntityType;
|
|
1840
|
+
};
|
|
1841
|
+
/** The email was deleted. */
|
|
1842
|
+
editor_email_deleted: Record<string, never>;
|
|
1843
|
+
/** "Delete" was clicked in the email menu. */
|
|
1844
|
+
editor_email_delete_clicked: Record<string, never>;
|
|
1845
|
+
/** The delete confirmation was opened. */
|
|
1846
|
+
editor_email_delete_modal_opened: Record<string, never>;
|
|
1847
|
+
/** "Duplicate" was clicked in the email menu. */
|
|
1848
|
+
editor_email_duplicate_clicked: Record<string, never>;
|
|
1849
|
+
/** The email copy was created. */
|
|
1850
|
+
editor_email_duplicated: Record<string, never>;
|
|
1851
|
+
/** "Import" was clicked. */
|
|
1852
|
+
editor_email_import_clicked: Record<string, never>;
|
|
1853
|
+
/** A file was imported into the email. */
|
|
1854
|
+
editor_email_imported: Record<string, never>;
|
|
1855
|
+
/** The email was exported. */
|
|
1856
|
+
editor_email_exported: {
|
|
1857
|
+
format: 'html' | 'text' | 'markdown' | 'clipboard' | 'image' | 'outlook' | 'zip';
|
|
1858
|
+
};
|
|
1859
|
+
/** The email was locked against edits. */
|
|
1860
|
+
editor_email_locked: Record<string, never>;
|
|
1861
|
+
/** The email was unlocked. */
|
|
1862
|
+
editor_email_unlocked: Record<string, never>;
|
|
1863
|
+
/** The block was locked against edits. */
|
|
1864
|
+
editor_block_locked: Record<string, never>;
|
|
1865
|
+
/** The block was unlocked. */
|
|
1866
|
+
editor_block_unlocked: Record<string, never>;
|
|
1867
|
+
/** An element was added to the canvas. */
|
|
1868
|
+
editor_element_added: {
|
|
1869
|
+
element_type: 'block' | 'structure' | 'atom';
|
|
1870
|
+
};
|
|
1871
|
+
/**
|
|
1872
|
+
* A setting of the selected element changed; sent once the user pauses. `property` is the setting name;
|
|
1873
|
+
* `value` is sent only for numeric, on/off, choice and color settings, never for links, images or text.
|
|
1874
|
+
*/
|
|
1875
|
+
editor_element_setting_changed: {
|
|
1876
|
+
element_type: string;
|
|
1877
|
+
property: string;
|
|
1878
|
+
value?: string | number | boolean;
|
|
1879
|
+
};
|
|
1880
|
+
/** The canvas width changed; sent once the user pauses. */
|
|
1881
|
+
editor_canvas_resized: {
|
|
1882
|
+
width: number | 'full';
|
|
1883
|
+
view_type: 'mobile' | 'desktop';
|
|
1884
|
+
};
|
|
1885
|
+
/** A tab of the side panel was opened; `tab` is the tab key, `disabled_tab` for a locked one. */
|
|
1886
|
+
editor_pane_tab_opened: {
|
|
1887
|
+
tab: string;
|
|
1888
|
+
};
|
|
1889
|
+
/** The editor configuration mode changed. */
|
|
1890
|
+
editor_config_mode_changed: {
|
|
1891
|
+
mode: 'simple' | 'editor' | 'pro';
|
|
1892
|
+
};
|
|
1893
|
+
/** The editor switched between the visual editor and the code. */
|
|
1894
|
+
editor_mode_changed: {
|
|
1895
|
+
mode: 'code' | 'visual';
|
|
1896
|
+
};
|
|
1897
|
+
/** The code mode was turned on; `direction` is where the code panel sits, `toggle` — the plain switch. */
|
|
1898
|
+
editor_code_mode_activated: {
|
|
1899
|
+
entity_type: AnalyticsEntityType;
|
|
1900
|
+
direction: 'left' | 'right' | 'bottom' | 'none' | 'toggle';
|
|
1901
|
+
};
|
|
1902
|
+
/** A breadcrumb above the canvas was clicked: on its `icon`, `text` or elsewhere on the `element`. */
|
|
1903
|
+
editor_breadcrumb_clicked: {
|
|
1904
|
+
target: 'element' | 'icon' | 'text';
|
|
1905
|
+
element_type?: string;
|
|
1906
|
+
element_index?: number;
|
|
1907
|
+
};
|
|
1908
|
+
/** The email code check ran. */
|
|
1909
|
+
editor_code_checked: {
|
|
1910
|
+
problems_count: number;
|
|
1911
|
+
};
|
|
1912
|
+
/** The link check ran. */
|
|
1913
|
+
editor_links_checked: {
|
|
1914
|
+
links_count: number;
|
|
1915
|
+
};
|
|
1916
|
+
/** The image check ran. */
|
|
1917
|
+
editor_images_checked: {
|
|
1918
|
+
images_count: number;
|
|
1919
|
+
};
|
|
1920
|
+
/** The spam check ran. */
|
|
1921
|
+
editor_spam_checked: {
|
|
1922
|
+
spam_score: number;
|
|
1923
|
+
};
|
|
1924
|
+
/** The preview was opened. */
|
|
1925
|
+
editor_preview_opened: {
|
|
1926
|
+
entity_type: AnalyticsEntityType;
|
|
1927
|
+
};
|
|
1928
|
+
/** The test email dialog was opened. */
|
|
1929
|
+
editor_test_email_modal_opened: {
|
|
1930
|
+
entity_type: AnalyticsEntityType;
|
|
1931
|
+
};
|
|
1932
|
+
/** A test email was sent. */
|
|
1933
|
+
editor_test_email_sent: {
|
|
1934
|
+
recipients_count: number;
|
|
1935
|
+
};
|
|
1936
|
+
/** The email was shared. */
|
|
1937
|
+
editor_email_shared: {
|
|
1938
|
+
entity_type: AnalyticsEntityType;
|
|
1939
|
+
};
|
|
1940
|
+
/** Inbox tests were opened. */
|
|
1941
|
+
editor_inbox_tests_opened: {
|
|
1942
|
+
entity_type: AnalyticsEntityType;
|
|
1943
|
+
};
|
|
1944
|
+
/** The version history was opened. */
|
|
1945
|
+
editor_version_history_opened: {
|
|
1946
|
+
entity_type: AnalyticsEntityType;
|
|
1947
|
+
};
|
|
1948
|
+
/** The web version was opened. */
|
|
1949
|
+
editor_web_version_opened: {
|
|
1950
|
+
entity_type: AnalyticsEntityType;
|
|
1951
|
+
};
|
|
1952
|
+
/** A message was sent to the AI assistant. */
|
|
1953
|
+
editor_ai_message_sent: Record<string, never>;
|
|
1954
|
+
/** The AI assistant replied. */
|
|
1955
|
+
editor_ai_reply_received: Record<string, never>;
|
|
1956
|
+
/** An AI assistant role was picked. */
|
|
1957
|
+
editor_ai_role_selected: {
|
|
1958
|
+
role: string;
|
|
1959
|
+
};
|
|
1960
|
+
/** A generated subject was put into the email. */
|
|
1961
|
+
editor_ai_subject_inserted: Record<string, never>;
|
|
1962
|
+
/** A generated preheader was put into the email. */
|
|
1963
|
+
editor_ai_preheader_inserted: Record<string, never>;
|
|
1964
|
+
/** A comment was posted. */
|
|
1965
|
+
editor_comment_sent: {
|
|
1966
|
+
entity_type: AnalyticsEntityType;
|
|
1967
|
+
};
|
|
1968
|
+
/** AI image generation started. */
|
|
1969
|
+
editor_ai_image_generation_started: Record<string, never>;
|
|
1970
|
+
}
|
|
1971
|
+
/** One analytics event: its name and properties. */
|
|
1972
|
+
type AnalyticsEvent = { [Name in keyof AnalyticsEventMap]: {
|
|
1973
|
+
name: Name;
|
|
1974
|
+
properties: AnalyticsEventMap[Name];
|
|
1975
|
+
}; }[keyof AnalyticsEventMap];
|
|
1976
|
+
type AnalyticsEventHandler = AppListener<AnalyticsEvent>;
|
|
1772
1977
|
interface Events {
|
|
1773
1978
|
/** read email handler */
|
|
1774
1979
|
handleReadEmail: AppEvent<ReadEmailHandler>;
|
|
@@ -1871,8 +2076,22 @@ export declare namespace ExportedApi {
|
|
|
1871
2076
|
handleLivePreviewEmail: AppEvent<LivePreviewHandler>;
|
|
1872
2077
|
/** fires when open preview */
|
|
1873
2078
|
handlePreviewEmail: AppEvent<PreviewHandler>;
|
|
1874
|
-
/**
|
|
2079
|
+
/**
|
|
2080
|
+
* Errors of the code editor (Monaco), the ones it underlines: fires on every edit while there are errors and once
|
|
2081
|
+
* when they are gone; no event without errors. Only after the code mode has been opened; on demand use `validateCode()`.
|
|
2082
|
+
*/
|
|
1875
2083
|
handleValidate: AppEvent<ValidateEvent>;
|
|
2084
|
+
/**
|
|
2085
|
+
* Errors of an imported file's own markup, checked before the browser parses (and silently repairs) it. The file is
|
|
2086
|
+
* checked only while someone listens to this event; the import itself is not delayed or cancelled.
|
|
2087
|
+
*/
|
|
2088
|
+
handleImportValidate: AppEvent<ImportValidateEvent>;
|
|
2089
|
+
/**
|
|
2090
|
+
* Fires on user actions in the editor, for the integrator's analytics: see {@link AnalyticsEventMap} for
|
|
2091
|
+
* the events. Fire-and-forget: the return value is ignored, and an exception in the listener does not
|
|
2092
|
+
* affect the editor.
|
|
2093
|
+
*/
|
|
2094
|
+
handleAnalyticsEvent: AppEvent<AnalyticsEventHandler>;
|
|
1876
2095
|
}
|
|
1877
2096
|
type Listeners = { [K in keyof Events]?: Events[K] extends AppEvent<infer Listener> ? Listener : never; };
|
|
1878
2097
|
interface Options extends Listeners {
|