@emailmaker/emailmaker 1.1.30 → 1.1.32
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.2378a16e.js → emailmaker-core.8bdd92fb.js} +1 -1
- package/emailmaker-esm.js +5 -5
- package/emailmaker.d.ts +7 -2
- package/emailmaker.js +11 -11
- package/iframe/js/amp.DieSnBUu.js +1 -0
- package/iframe/js/iframe-eblock.js +1 -1
- package/iframe/js/iframe.js +1 -1
- package/iframe/js/rules.CNqvmp_P.js +1 -1
- package/package.json +1 -1
- package/singlepage_headless_plugin.html +1 -1
- package/static/core/{b7559974.js → 0a752305.js} +1 -1
- package/static/core/{24359c2b2.js → 1369407e2.js} +1 -1
- package/static/core/{50b3488f.js → 2c12aa51.js} +2 -2
- package/static/core/{69be5772.js → 34ed48da.js} +3 -3
- package/static/core/{3c4d8253.js → 3d1e7c2e.js} +2 -2
- package/static/core/4698f05f.js +51 -0
- package/static/core/{6301b88d.js → 7760eab7.js} +2 -2
- package/static/core/{25d26369.js → 7865066d.js} +2 -2
- package/static/core/{3509b8fe.js → 7ae09748.js} +1 -1
- package/static/core/96583da0.js +3 -0
- package/static/core/{ca58f6cf.js → a73f6ffb.js} +1 -1
- package/static/core/b7b90cb5.js +78 -0
- package/static/core/{91634ef3.js → ba40f70e.js} +1 -1
- package/static/core/{4a9d6b60.js → d5670b2e.js} +2 -2
- package/static/core/db185a82.js +895 -0
- package/static/core/e1095f09.js +1 -0
- package/static/core/{558afaa1.js → ef4e808c.js} +1 -1
- package/static/core/{e4ba0190.js → fc5712ae.js} +1 -1
- package/static/esm/533d7587.js +1 -0
- package/two_step_headless_plugin.html +1 -1
- package/iframe/js/amp.BLBsfH3J.js +0 -1
- package/static/core/4685dd44.js +0 -3
- package/static/core/4d7a8040.js +0 -51
- package/static/core/5ef557ea.js +0 -895
- package/static/core/ed6c0f8c.js +0 -78
- package/static/core/f7436c59.js +0 -1
- /package/iframe/{iframe-eblock.2378a16e.html → iframe-eblock.8bdd92fb.html} +0 -0
- /package/iframe/{iframe.2378a16e.html → iframe.8bdd92fb.html} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
__emailmaker__.define(`static/core/
|
|
1
|
+
__emailmaker__.define(`static/core/fc5712ae.js`,[`require`,`exports`,`module`,`static/core/354bf8a9.js`,`static/core/7865066d.js`,`react`,`react-dom`,`react/jsx-runtime`,`antd`,`react-dom/client`,`@ant-design/icons`,`@ant-design/cssinjs`],function(e,t,n){let r=e("./354bf8a9.js"),i=e("./7865066d.js"),a=e("react");a=r.l(a,1),e("react-dom");let o=e("react/jsx-runtime"),s=e("antd");e("react-dom/client"),e("@ant-design/icons"),e("@ant-design/cssinjs");var c=({size:e=24,color:t=`currentColor`,...n})=>a.createElement(`svg`,{viewBox:`0 0 24 24`,width:e,height:e,stroke:t,strokeWidth:`2`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,...n},a.createElement(`path`,{d:`m14 10 7-7m0 0h-6m6 0v6m-11 5-7 7m0 0h6m-6 0v-6`}));c.displayName=`Expand01`;var l={root:`root`,controls:`controls`,segmentedControl:`segmentedControl`,sizeRow:`sizeRow`,sizeRowLabel:`sizeRowLabel`,sizeInputNumber:`sizeInputNumber`,sizeSuffix:`sizeSuffix`,colorGrid:`colorGrid`,colorCell:`colorCell`,colorCellLabel:`colorCellLabel`,colorPickerFull:`colorPickerFull`,bgExtras:`bgExtras`,bgWarning:`bgWarning`,previewSection:`previewSection`,previewTitle:`previewTitle`,previewWrap:`previewWrap`,scanLine:`scanLine`,scanLineBarcode:`scanLineBarcode`,previewWrapBarcode:`previewWrapBarcode`,previewCanvas:`previewCanvas`,previewCanvasBarcode:`previewCanvasBarcode`,actions:`actions`};t.default=({customRequest:t,state:n,setState:r})=>{let{t:u}=i.v(),{options:d}=i.S(),f=d?.config?.iconStrokeWidth??1.75,p=(0,a.useRef)(null),{mode:m,rawText:h,foregroundHex:g,backgroundHex:_,transparentBackground:v,qrSidePx:y,barcodeBarHeightPx:b}=n,x=(0,a.useCallback)(e=>r(t=>Object.assign(Object.assign({},t),{mode:e})),[r]),S=(0,a.useCallback)(e=>r(t=>Object.assign(Object.assign({},t),{rawText:e})),[r]),C=(0,a.useCallback)(e=>r(t=>Object.assign(Object.assign({},t),{foregroundHex:e})),[r]),w=(0,a.useCallback)(e=>r(t=>Object.assign(Object.assign({},t),{backgroundHex:e})),[r]),T=(0,a.useCallback)(e=>r(t=>Object.assign(Object.assign({},t),{transparentBackground:e})),[r]),E=(0,a.useCallback)(e=>r(t=>Object.assign(Object.assign({},t),{qrSidePx:e})),[r]),D=(0,a.useCallback)(e=>r(t=>Object.assign(Object.assign({},t),{barcodeBarHeightPx:e})),[r]),[O,k]=(0,a.useState)(h),[A,j]=(0,a.useState)(null),[M,N]=(0,a.useState)(!1),P=(0,a.useMemo)(()=>i.u.debounce(e=>k(e),300),[]);(0,a.useEffect)(()=>(P(h),()=>{P.cancel()}),[h,P]);let F=v?`#00000000`:_,I=(0,a.useCallback)(async(t,n)=>{let r=(await Promise.resolve().then(()=>e("./a73f6ffb.js")).then(function(e){return e.b})).default,i=n.trim(),a=Math.min(280,Math.max(80,y));if(!i){t.width=a,t.height=a;let e=t.getContext(`2d`);e&&e.clearRect(0,0,t.width,t.height);return}t.width=a,t.height=a,await r.toCanvas(t,i,{width:a,margin:2,color:{dark:g,light:F}})},[g,F,y]),L=(0,a.useCallback)(async(t,n)=>{let r=(await Promise.resolve().then(()=>e("./ba40f70e.js")).then(function(e){return e.J})).default,i=n.trim(),a=v?`rgba(0,0,0,0)`:_,o=Math.min(72,Math.max(24,b)),s=Math.max(1,Math.round(o/42)),c=Math.max(4,Math.round(.07*o)),l=Math.max(10,Math.round(.15*o));if(!i){t.width=Math.round(4*o),t.height=Math.round(1.65*o);let e=t.getContext(`2d`);e&&e.clearRect(0,0,t.width,t.height);return}t.width=Math.round(4.2*o),t.height=Math.round(1.65*o),r(t,i,{format:`CODE128`,displayValue:!0,background:a,lineColor:g,margin:c,width:s,height:o,fontSize:l})},[g,_,v,b]);(0,a.useEffect)(()=>{let e=p.current;if(!e)return;let t=!1;return(async()=>{try{m===`qr`?await I(e,O):await L(e,O),t||j(null)}catch(n){let r=n instanceof Error?n.message:String(n);if(!t){j(m===`barcode`?u(`Barcode generation failed`):r);let t=e.getContext(`2d`);t&&t.clearRect(0,0,e.width,e.height)}}})(),()=>{t=!0}},[m,O,L,I,u]);let R=(0,a.useCallback)(async()=>{P.flush();let t=h.trim();if(!t)throw Error(u(`Enter text or URL to preview`));let n=typeof window>`u`?2:Math.min(3,Math.max(2,window.devicePixelRatio||2));if(m===`qr`){let r=Math.round(Math.min(600,Math.max(80,y))*n),i=document.createElement(`canvas`);i.width=r,i.height=r,await(await Promise.resolve().then(()=>e("./a73f6ffb.js")).then(function(e){return e.b})).default.toCanvas(i,t,{width:r,margin:2,color:{dark:g,light:F}});let a=await new Promise(e=>i.toBlob(e,`image/png`));if(!a)throw Error(`PNG export failed`);return a}let r=(await Promise.resolve().then(()=>e("./ba40f70e.js")).then(function(e){return e.J})).default,i=document.createElement(`canvas`),a=v?`rgba(0,0,0,0)`:_,o=Math.min(130,Math.max(24,b)),s=Math.max(6,Math.round(.1*o)),c=Math.max(2,Math.round(o/36)),l=Math.max(12,Math.round(.16*o));r(i,t,{format:`CODE128`,displayValue:!0,background:a,lineColor:g,margin:Math.round(s*n),width:Math.round(c*n),height:Math.round(o*n),fontSize:Math.round(l*n)});let d=await new Promise(e=>i.toBlob(e,`image/png`));if(!d)throw Error(`PNG export failed`);return d},[m,h,g,F,_,v,y,b,P,u]),z=(0,a.useCallback)(async()=>{if(!M&&h.trim()){N(!0);try{let e;try{e=await R()}catch(e){j(e instanceof Error?e.message:String(e));return}let n=new File([e],`${m===`qr`?`qr-code`:`barcode`}-${Date.now()}.png`,{type:`image/png`,lastModified:Date.now()});await Promise.resolve(t({file:n}))}finally{N(!1)}}},[t,R,m,h,M]),B=!!h.trim()&&!A;return(0,o.jsx)(`div`,{className:l.root,children:(0,o.jsxs)(`div`,{className:l.controls,children:[(0,o.jsx)(s.Segmented,{block:!0,className:l.segmentedControl,value:m,onChange:e=>{x(e),j(null)},options:[{label:u(`QR code`),value:`qr`},{label:u(`Barcode`),value:`barcode`}]}),A&&(0,o.jsx)(s.Alert,{type:`error`,title:u(`Validation error`),description:A,showIcon:!0,closable:!0,onClose:()=>j(null)}),(0,o.jsx)(s.Input.TextArea,{value:h,onChange:e=>{S(e.target.value),j(null)},placeholder:u(`Text or URL`),rows:3,spellCheck:!1,autoComplete:`off`}),(0,o.jsxs)(`div`,{className:l.sizeRow,children:[(0,o.jsx)(s.Typography.Text,{type:`secondary`,className:l.sizeRowLabel,children:u(m===`qr`?`QR image size px`:`Barcode bar height px`)}),(0,o.jsx)(s.InputNumber,m===`qr`?{className:l.sizeInputNumber,min:80,max:600,step:8,value:y,onChange:e=>E(typeof e!=`number`||Number.isNaN(e)?200:e),prefix:(0,o.jsx)(c,{size:18,strokeWidth:f}),suffix:(0,o.jsx)(`span`,{className:l.sizeSuffix,children:`px`}),"aria-label":u(`QR image size px`)}:{className:l.sizeInputNumber,min:24,max:130,step:4,value:b,onChange:e=>D(typeof e!=`number`||Number.isNaN(e)?60:e),prefix:(0,o.jsx)(c,{size:18,strokeWidth:f}),suffix:(0,o.jsx)(`span`,{className:l.sizeSuffix,children:`px`}),"aria-label":u(`Barcode bar height px`)})]}),(0,o.jsxs)(`div`,{className:l.colorGrid,children:[(0,o.jsxs)(`div`,{className:l.colorCell,children:[(0,o.jsx)(s.Typography.Text,{type:`secondary`,className:l.colorCellLabel,children:u(`Code color`,`Code color`)}),(0,o.jsx)(s.ColorPicker,{className:l.colorPickerFull,value:g,format:`hex`,disabledAlpha:!0,showText:!0,onChange:(e,t)=>{C(typeof e==`string`?e:e?.toHexString?e.toHexString():t)}})]}),(0,o.jsxs)(`div`,{className:l.colorCell,children:[(0,o.jsx)(s.Typography.Text,{type:`secondary`,className:l.colorCellLabel,children:u(`Background color`,`Background color`)}),(0,o.jsx)(s.ColorPicker,{className:l.colorPickerFull,value:_,format:`hex`,disabledAlpha:!0,showText:!0,disabled:v,onChange:(e,t)=>{w(typeof e==`string`?e:e?.toHexString?e.toHexString():t)}})]}),(0,o.jsxs)(`div`,{className:l.bgExtras,children:[(0,o.jsx)(s.Checkbox,{checked:v,onChange:e=>T(e.target.checked),children:u(`Transparent background`,`Transparent background`)}),v&&(0,o.jsx)(s.Alert,{type:`warning`,showIcon:!0,title:u(`QR transparent background hint`),className:l.bgWarning})]})]}),(0,o.jsxs)(`div`,{className:l.previewSection,children:[(0,o.jsx)(s.Typography.Text,{className:l.previewTitle,children:u(`Preview`,`Preview`)}),(0,o.jsxs)(`div`,{className:[l.previewWrap,m===`barcode`&&l.previewWrapBarcode].filter(Boolean).join(` `),children:[(0,o.jsx)(`div`,{className:[l.scanLine,m===`barcode`&&l.scanLineBarcode].filter(Boolean).join(` `)}),(0,o.jsx)(`canvas`,{ref:p,className:[l.previewCanvas,m===`barcode`&&l.previewCanvasBarcode].filter(Boolean).join(` `),"aria-label":u(`Preview`)})]})]}),(0,o.jsx)(`div`,{className:l.actions,children:(0,o.jsx)(s.Button,{type:`primary`,onClick:()=>{z()},loading:M,disabled:!B,children:u(`Add to My files`)})})]})})}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)r!==`__proto__`&&(e[r]=n[r])}return e}var t={read:function(e){return e[0]===`"`&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function n(t,r){function i(n,i,a){if(!(typeof document>`u`)){a=e({},r,a),typeof a.expires==`number`&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&=a.expires.toUTCString(),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o=``;for(var s in a)a[s]&&(o+=`; `+s,a[s]!==!0&&(o+=`=`+a[s].split(`;`)[0]));return document.cookie=n+`=`+t.write(i,n)+o}}function a(e){if(!(typeof document>`u`||arguments.length&&!e)){for(var n=document.cookie?document.cookie.split(`; `):[],r={},i=0;i<n.length;i++){var a=n[i].split(`=`),o=a.slice(1).join(`=`);try{var s=decodeURIComponent(a[0]);if(s in r||(r[s]=t.read(o,s)),e===s)break}catch{}}return e?r[e]:r}}return Object.create({set:i,get:a,remove:function(t,n){i(t,``,e({},n,{expires:-1}))},withAttributes:function(t){return n(this.converter,e({},this.attributes,t))},withConverter:function(t){return n(e({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}var r=n(t,{path:`/`});export{r as t};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<title>Two-step flow: design → subject/preheader (headless)</title>
|
|
6
|
-
<script id="plugin-script" type="text/javascript" src="emailmaker.js?
|
|
6
|
+
<script id="plugin-script" type="text/javascript" src="emailmaker.js?8bdd92fb"></script>
|
|
7
7
|
<style>
|
|
8
8
|
body {
|
|
9
9
|
margin: 0;
|