@emailmaker/emailmaker 1.1.29 → 1.1.31
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.2232d9b3.js → emailmaker-core.25e2342b.js} +1 -1
- package/emailmaker-esm.js +4 -4
- package/emailmaker.js +4 -4
- package/iframe/js/amp.BLBsfH3J.js +1 -1
- 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/{e264ceb42.js → 13ca3f502.js} +1 -1
- package/static/core/{c47b6f8f.js → 1da27b3c.js} +1 -1
- package/static/core/{6d4ce55c.js → 25d26369.js} +2 -2
- package/static/core/{ed6c0f8c.js → 3c291097.js} +6 -6
- package/static/core/{c9dc587b.js → 4686eabe.js} +3 -3
- package/static/core/{62e29412.js → 558afaa1.js} +1 -1
- package/static/core/{4685dd44.js → 62c48605.js} +2 -2
- package/static/core/{3509b8fe.js → 76f5295d.js} +1 -1
- package/static/core/{4d7a8040.js → 8a188b85.js} +4 -4
- package/static/core/8aba252b.js +1 -0
- package/static/core/{8efa85c9.js → 91634ef3.js} +1 -1
- package/static/core/{6301b88d.js → bfefb58d.js} +2 -2
- package/static/core/{4bc4ae3a.js → ca58f6cf.js} +1 -1
- package/static/core/{44e7fb49.js → cc38c423.js} +2 -2
- package/static/core/{54c47c63.js → d06bc0bd.js} +11 -11
- package/static/core/{3c4d8253.js → df4b4fe2.js} +2 -2
- package/static/core/{50b3488f.js → e37f6763.js} +2 -2
- package/static/core/{e047c74a.js → e4ba0190.js} +1 -1
- package/two_step_headless_plugin.html +1 -1
- package/static/core/58b68481.js +0 -1
- /package/iframe/{iframe-eblock.2232d9b3.html → iframe-eblock.25e2342b.html} +0 -0
- /package/iframe/{iframe.2232d9b3.html → iframe.25e2342b.html} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
__emailmaker__.define(`static/core/
|
|
1
|
+
__emailmaker__.define(`static/core/e4ba0190.js`,[`require`,`exports`,`module`,`static/core/354bf8a9.js`,`static/core/25d26369.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("./25d26369.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("./ca58f6cf.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("./91634ef3.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("./ca58f6cf.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("./91634ef3.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`)})})]})})}});
|
|
@@ -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?25e2342b"></script>
|
|
7
7
|
<style>
|
|
8
8
|
body {
|
|
9
9
|
margin: 0;
|
package/static/core/58b68481.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__emailmaker__.define(`static/core/58b68481.js`,[`require`,`exports`,`module`,`static/core/354bf8a9.js`,`static/core/54c47c63.js`],function(e,t,n){e("./354bf8a9.js"),t.default=e("./54c47c63.js").t});
|
|
File without changes
|
|
File without changes
|