@emailmaker/emailmaker 1.0.117-alpha.3 → 1.0.117-alpha.4
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.en.md +40 -3
- package/CHANGELOG.md +40 -0
- package/README.md +3 -2
- package/asset-manifest.json +44 -38
- package/emailmaker-esm.js +1 -1
- package/emailmaker.d.ts +7 -0
- package/emailmaker.js +1 -1
- package/iframe/429.js +1 -1
- package/iframe/766.js +1 -1
- package/iframe/css/sandbox-dark.css +8 -0
- package/iframe/css/sandbox-light.css +8 -0
- package/iframe/css/sandbox.css +32 -0
- package/iframe/iframe-eblock.3d39ec0d6695dfd04dfe.html +1 -0
- package/iframe/iframe.3d39ec0d6695dfd04dfe.html +1 -0
- package/iframe/index.html +1 -1
- package/iframe/js/525.f6e2f6b3.js +1 -0
- package/iframe/js/781.94ac3161.js +1 -0
- package/iframe/js/{667.a3109c1d.js.LICENSE.txt → 781.94ac3161.js.LICENSE.txt} +2 -0
- package/iframe/js/882.7804f4a0.js +1 -0
- package/iframe/sandbox-eblock.js +1 -1
- package/iframe/sandbox-eblock.js.LICENSE.txt +0 -2
- package/package.json +1 -1
- package/react/index.js +1 -1
- package/react/index.mjs +1 -1
- package/static/css/2016.6d88154a.chunk.css +2 -0
- package/static/css/2854.eaf83aed.chunk.css +2 -0
- package/static/css/8727.566a7baa.chunk.css +2 -0
- package/static/css/main.ec0d79d0.css +2 -0
- package/static/js/{1807.2f873ba8.js → 1807.544be549.js} +3 -3
- package/static/js/{1902.59ed55f8.js → 1902.46b497c9.js} +3 -3
- package/static/js/{5072.a7444daa.js → 2016.d527f648.js} +3 -3
- package/static/js/{262.3062229e.js → 262.a0c80d6d.js} +3 -3
- package/static/js/3195.56b10745.js +2 -0
- package/static/js/6256.e81830e2.js +2 -0
- package/static/js/{1716.2d977604.js → 6802.8b81b864.js} +3 -3
- package/static/js/7251.a53ab2ce.js +2 -0
- package/static/js/817.00be8b68.js +2 -0
- package/static/js/8245.117e8e2d.js +2 -0
- package/static/js/8559.f5ef7cd8.js +3 -0
- package/static/js/8727.11fb3035.js +2 -0
- package/static/js/9688.dddd5b80.js +2 -0
- package/static/js/emailmaker_core.767054b1.js +2 -0
- package/iframe/iframe-eblock.6ba89053b8c4bd89671b.html +0 -1
- package/iframe/iframe.6ba89053b8c4bd89671b.html +0 -1
- package/iframe/js/525.2a5bee62.js +0 -1
- package/iframe/js/667.a3109c1d.js +0 -1
- package/iframe/js/882.b65c6b97.js +0 -1
- package/iframe/js/882.b65c6b97.js.LICENSE.txt +0 -1
- package/static/css/2854.257728de.chunk.css +0 -2
- package/static/css/5072.72467a43.chunk.css +0 -2
- package/static/css/8727.2f8ba497.chunk.css +0 -2
- package/static/css/main.4fad2cb5.css +0 -2
- package/static/js/5243.413e6220.js +0 -3
- package/static/js/817.93306766.js +0 -2
- package/static/js/8245.d98fa2d7.js +0 -2
- package/static/js/8727.ef480f4b.js +0 -2
- package/static/js/9535.1da6d801.js +0 -2
- package/static/js/emailmaker_core.d8816d78.js +0 -2
- /package/iframe/js/{525.2a5bee62.js.LICENSE.txt → 525.f6e2f6b3.js.LICENSE.txt} +0 -0
- /package/static/js/{1807.2f873ba8.js.LICENSE.txt → 1807.544be549.js.LICENSE.txt} +0 -0
- /package/static/js/{1902.59ed55f8.js.LICENSE.txt → 1902.46b497c9.js.LICENSE.txt} +0 -0
- /package/static/js/{5072.a7444daa.js.LICENSE.txt → 2016.d527f648.js.LICENSE.txt} +0 -0
- /package/static/js/{262.3062229e.js.LICENSE.txt → 262.a0c80d6d.js.LICENSE.txt} +0 -0
- /package/static/js/{1716.2d977604.js.LICENSE.txt → 6802.8b81b864.js.LICENSE.txt} +0 -0
- /package/static/js/{5243.413e6220.js.LICENSE.txt → 8559.f5ef7cd8.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[7251],{37251:(e,a,t)=>{t.r(a),t.d(a,{default:()=>b});var r=t(81516),n=t(1936),o=t(90947),i=t(28378),s=t(92927),l=t(28380),c=t(98489),d=t(45331),h=t(77550),u=t(59878),m=t(78559);t(55054),t(18005);const g=({size:e=24,color:a="currentColor",...t})=>n.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},n.createElement("path",{d:"m14 10 7-7m0 0h-6m6 0v6m-11 5-7 7m0 0h6m-6 0v-6"}));g.displayName="Expand01";var x={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"};const b=({customRequest:e,state:a,setState:b})=>{var p,w;const{t:v}=(0,m.u)(),{options:f}=(0,m.a)(),C=null!==(w=null===(p=null==f?void 0:f.config)||void 0===p?void 0:p.iconStrokeWidth)&&void 0!==w?w:1.75,j=(0,n.useRef)(null),{mode:k,rawText:N,foregroundHex:M,backgroundHex:y,transparentBackground:B,qrSidePx:S,barcodeBarHeightPx:z}=a,E=(0,n.useCallback)(e=>b(a=>Object.assign(Object.assign({},a),{mode:e})),[b]),R=(0,n.useCallback)(e=>b(a=>Object.assign(Object.assign({},a),{rawText:e})),[b]),A=(0,n.useCallback)(e=>b(a=>Object.assign(Object.assign({},a),{foregroundHex:e})),[b]),L=(0,n.useCallback)(e=>b(a=>Object.assign(Object.assign({},a),{backgroundHex:e})),[b]),P=(0,n.useCallback)(e=>b(a=>Object.assign(Object.assign({},a),{transparentBackground:e})),[b]),T=(0,n.useCallback)(e=>b(a=>Object.assign(Object.assign({},a),{qrSidePx:e})),[b]),O=(0,n.useCallback)(e=>b(a=>Object.assign(Object.assign({},a),{barcodeBarHeightPx:e})),[b]),[W,q]=(0,n.useState)(N),[H,I]=(0,n.useState)(null),[F,G]=(0,n.useState)(!1),D=(0,n.useMemo)(()=>m.q.debounce(e=>q(e),300),[]);(0,n.useEffect)(()=>(D(N),()=>{D.cancel()}),[N,D]);const Q=B?"#00000000":y,V=(0,n.useCallback)(async(e,a)=>{const r=(await t.e(6256).then(t.bind(t,16256)).then(function(e){return e.b})).default,n=a.trim(),o=Math.min(280,Math.max(80,S));if(!n){e.width=o,e.height=o;const a=e.getContext("2d");return void(a&&a.clearRect(0,0,e.width,e.height))}e.width=o,e.height=o,await r.toCanvas(e,n,{width:o,margin:2,color:{dark:M,light:Q}})},[M,Q,S]),J=(0,n.useCallback)(async(e,a)=>{const r=(await t.e(9688).then(t.bind(t,79688)).then(function(e){return e.J})).default,n=a.trim(),o=B?"rgba(0,0,0,0)":y,i=Math.min(72,Math.max(24,z)),s=Math.max(1,Math.round(i/42)),l=Math.max(4,Math.round(.07*i)),c=Math.max(10,Math.round(.15*i));if(!n){e.width=Math.round(4*i),e.height=Math.round(1.65*i);const a=e.getContext("2d");return void(a&&a.clearRect(0,0,e.width,e.height))}e.width=Math.round(4.2*i),e.height=Math.round(1.65*i),r(e,n,{format:"CODE128",displayValue:!0,background:o,lineColor:M,margin:l,width:s,height:i,fontSize:c})},[M,y,B,z]);(0,n.useEffect)(()=>{const a=j.current;if(!a)return;let t=!1;return(async()=>{try{"qr"===k?await V(a,W):await J(a,W),t||I(null)}catch(e){const n=e instanceof Error?e.message:String(e);if(!t){I("barcode"===k?v("Barcode generation failed"):n);const e=a.getContext("2d");e&&e.clearRect(0,0,a.width,a.height)}}})(),()=>{t=!0}},[k,W,J,V,v]);const U=(0,n.useCallback)(async()=>{D.flush();const e=N.trim();if(!e)throw new Error(v("Enter text or URL to preview"));const a="undefined"==typeof window?2:Math.min(3,Math.max(2,window.devicePixelRatio||2));if("qr"===k){const r=Math.min(600,Math.max(80,S)),n=Math.round(r*a),o=document.createElement("canvas");o.width=n,o.height=n;const i=(await t.e(6256).then(t.bind(t,16256)).then(function(e){return e.b})).default;await i.toCanvas(o,e,{width:n,margin:2,color:{dark:M,light:Q}});const s=await new Promise(e=>o.toBlob(e,"image/png"));if(!s)throw new Error("PNG export failed");return s}const r=(await t.e(9688).then(t.bind(t,79688)).then(function(e){return e.J})).default,n=document.createElement("canvas"),o=B?"rgba(0,0,0,0)":y,i=Math.min(130,Math.max(24,z)),s=Math.max(6,Math.round(.1*i)),l=Math.max(2,Math.round(i/36)),c=Math.max(12,Math.round(.16*i));r(n,e,{format:"CODE128",displayValue:!0,background:o,lineColor:M,margin:Math.round(s*a),width:Math.round(l*a),height:Math.round(i*a),fontSize:Math.round(c*a)});const d=await new Promise(e=>n.toBlob(e,"image/png"));if(!d)throw new Error("PNG export failed");return d},[k,N,M,Q,y,B,S,z,D,v]),$=(0,n.useCallback)(async()=>{if(!F&&N.trim()){G(!0);try{let t;try{t=await U()}catch(a){const e=a instanceof Error?a.message:String(a);return void I(e)}const r=new File([t],`${"qr"===k?"qr-code":"barcode"}-${Date.now()}.png`,{type:"image/png",lastModified:Date.now()});await Promise.resolve(e({file:r}))}finally{G(!1)}}},[e,U,k,N,F]),_=Boolean(N.trim())&&!H;return(0,r.jsx)("div",{className:x.root,children:(0,r.jsxs)("div",{className:x.controls,children:[(0,r.jsx)(o.A,{block:!0,className:x.segmentedControl,value:k,onChange:e=>{E(e),I(null)},options:[{label:v("QR code"),value:"qr"},{label:v("Barcode"),value:"barcode"}]}),H&&(0,r.jsx)(i.A,{type:"error",message:v("Validation error"),description:H,showIcon:!0,closable:!0,onClose:()=>I(null)}),(0,r.jsx)(s.A.TextArea,{value:N,onChange:e=>{R(e.target.value),I(null)},placeholder:v("Text or URL"),rows:3,spellCheck:!1,autoComplete:"off"}),(0,r.jsxs)("div",{className:x.sizeRow,children:[(0,r.jsx)(l.A.Text,{type:"secondary",className:x.sizeRowLabel,children:v("qr"===k?"QR image size px":"Barcode bar height px")}),(0,r.jsx)(c.A,"qr"===k?{className:x.sizeInputNumber,min:80,max:600,step:8,value:S,onChange:e=>T("number"!=typeof e||Number.isNaN(e)?200:e),prefix:(0,r.jsx)(g,{size:18,strokeWidth:C}),suffix:(0,r.jsx)("span",{className:x.sizeSuffix,children:"px"}),"aria-label":v("QR image size px")}:{className:x.sizeInputNumber,min:24,max:130,step:4,value:z,onChange:e=>O("number"!=typeof e||Number.isNaN(e)?60:e),prefix:(0,r.jsx)(g,{size:18,strokeWidth:C}),suffix:(0,r.jsx)("span",{className:x.sizeSuffix,children:"px"}),"aria-label":v("Barcode bar height px")})]}),(0,r.jsxs)("div",{className:x.colorGrid,children:[(0,r.jsxs)("div",{className:x.colorCell,children:[(0,r.jsx)(l.A.Text,{type:"secondary",className:x.colorCellLabel,children:v("Code color","Code color")}),(0,r.jsx)(d.A,{className:x.colorPickerFull,value:M,format:"hex",disabledAlpha:!0,showText:!0,onChange:(e,a)=>{const t="string"==typeof e?e:(null==e?void 0:e.toHexString)?e.toHexString():a;A(t)}})]}),(0,r.jsxs)("div",{className:x.colorCell,children:[(0,r.jsx)(l.A.Text,{type:"secondary",className:x.colorCellLabel,children:v("Background color","Background color")}),(0,r.jsx)(d.A,{className:x.colorPickerFull,value:y,format:"hex",disabledAlpha:!0,showText:!0,disabled:B,onChange:(e,a)=>{const t="string"==typeof e?e:(null==e?void 0:e.toHexString)?e.toHexString():a;L(t)}})]}),(0,r.jsxs)("div",{className:x.bgExtras,children:[(0,r.jsx)(h.A,{checked:B,onChange:e=>P(e.target.checked),children:v("Transparent background","Transparent background")}),B&&(0,r.jsx)(i.A,{type:"warning",showIcon:!0,message:v("QR transparent background hint"),className:x.bgWarning})]})]}),(0,r.jsxs)("div",{className:x.previewSection,children:[(0,r.jsx)(l.A.Text,{className:x.previewTitle,children:v("Preview","Preview")}),(0,r.jsxs)("div",{className:[x.previewWrap,"barcode"===k&&x.previewWrapBarcode].filter(Boolean).join(" "),children:[(0,r.jsx)("div",{className:[x.scanLine,"barcode"===k&&x.scanLineBarcode].filter(Boolean).join(" ")}),(0,r.jsx)("canvas",{ref:j,className:[x.previewCanvas,"barcode"===k&&x.previewCanvasBarcode].filter(Boolean).join(" "),"aria-label":v("Preview")})]})]}),(0,r.jsx)("div",{className:x.actions,children:(0,r.jsx)(u.Ay,{type:"primary",onClick:()=>{$()},loading:F,disabled:!_,children:v("Add to My files")})})]})})}}}]);
|
|
2
|
+
//# sourceMappingURL=7251.a53ab2ce.js.map
|