@emailmaker/emailmaker 1.1.43 → 1.1.44

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.
@@ -1,9 +1,9 @@
1
- __emailmaker__.define("static/core/5734d163.js", [
1
+ __emailmaker__.define("static/core/a5701653.js", [
2
2
  "require",
3
3
  "exports",
4
4
  "module",
5
5
  "static/core/16c2710d.js",
6
- "static/core/10304f0f.js",
6
+ "static/core/41282200.js",
7
7
  "react",
8
8
  "react-dom",
9
9
  "react/jsx-runtime",
@@ -12,7 +12,7 @@ __emailmaker__.define("static/core/5734d163.js", [
12
12
  "@ant-design/icons",
13
13
  "@ant-design/cssinjs"
14
14
  ], function(c, J, se) {
15
- const U = c("./16c2710d.js"), _ = c("./10304f0f.js");
15
+ const U = c("./16c2710d.js"), S = c("./41282200.js");
16
16
  let n = c("react");
17
17
  n = U.__toESM(n, 1);
18
18
  c("react-dom");
@@ -20,7 +20,7 @@ __emailmaker__.define("static/core/5734d163.js", [
20
20
  c("react-dom/client");
21
21
  c("@ant-design/icons");
22
22
  c("@ant-design/cssinjs");
23
- var S = ({ size: j = 24, color: N = "currentColor", ...l }) => n.createElement("svg", {
23
+ var _ = ({ size: j = 24, color: N = "currentColor", ...l }) => n.createElement("svg", {
24
24
  viewBox: "0 0 24 24",
25
25
  width: j,
26
26
  height: j,
@@ -32,7 +32,7 @@ __emailmaker__.define("static/core/5734d163.js", [
32
32
  "aria-hidden": "true",
33
33
  ...l
34
34
  }, n.createElement("path", { d: "m14 10 7-7m0 0h-6m6 0v6m-11 5-7 7m0 0h6m-6 0v-6" }));
35
- S.displayName = "Expand01";
35
+ _.displayName = "Expand01";
36
36
  var r = {
37
37
  root: "root",
38
38
  controls: "controls",
@@ -58,12 +58,12 @@ __emailmaker__.define("static/core/5734d163.js", [
58
58
  actions: "actions"
59
59
  }, q = ({ customRequest: j, state: N, setState: l }) => {
60
60
  var P, z;
61
- const { t: o } = _.dr(), { options: I } = _.mn(), A = (z = (P = I?.config) === null || P === void 0 ? void 0 : P.iconStrokeWidth) !== null && z !== void 0 ? z : 1.75, F = (0, n.useRef)(null), { mode: h, rawText: g, foregroundHex: x, backgroundHex: f, transparentBackground: p, qrSidePx: C, barcodeBarHeightPx: k } = N, Z = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { mode: e })), [l]), K = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { rawText: e })), [l]), X = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { foregroundHex: e })), [l]), Y = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { backgroundHex: e })), [l]), ee = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { transparentBackground: e })), [l]), ae = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { qrSidePx: e })), [l]), te = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { barcodeBarHeightPx: e })), [l]), [T, re] = (0, n.useState)(g), [E, v] = (0, n.useState)(null), [R, G] = (0, n.useState)(!1), y = (0, n.useMemo)(() => _.Sn.debounce((e) => re(e), 300), []);
61
+ const { t: o } = S.dr(), { options: I } = S.mn(), A = (z = (P = I?.config) === null || P === void 0 ? void 0 : P.iconStrokeWidth) !== null && z !== void 0 ? z : 1.75, F = (0, n.useRef)(null), { mode: h, rawText: g, foregroundHex: x, backgroundHex: f, transparentBackground: p, qrSidePx: C, barcodeBarHeightPx: k } = N, K = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { mode: e })), [l]), X = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { rawText: e })), [l]), Y = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { foregroundHex: e })), [l]), Z = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { backgroundHex: e })), [l]), ee = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { transparentBackground: e })), [l]), ae = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { qrSidePx: e })), [l]), te = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { barcodeBarHeightPx: e })), [l]), [E, re] = (0, n.useState)(g), [T, v] = (0, n.useState)(null), [R, G] = (0, n.useState)(!1), y = (0, n.useMemo)(() => S.Sn.debounce((e) => re(e), 300), []);
62
62
  (0, n.useEffect)(() => (y(g), () => {
63
63
  y.cancel();
64
64
  }), [g, y]);
65
65
  const M = p ? "#00000000" : f, D = (0, n.useCallback)(async (e, a) => {
66
- const i = (await Promise.resolve().then(() => c("./b76b2f0e.js")).then(function(s) {
66
+ const i = (await Promise.resolve().then(() => c("./3684652a.js")).then(function(s) {
67
67
  return s.b;
68
68
  })).default, u = a.trim(), m = Math.min(280, Math.max(80, C));
69
69
  if (!u) {
@@ -85,7 +85,7 @@ __emailmaker__.define("static/core/5734d163.js", [
85
85
  M,
86
86
  C
87
87
  ]), Q = (0, n.useCallback)(async (e, a) => {
88
- const i = (await Promise.resolve().then(() => c("./2abd616a.js")).then(function(b) {
88
+ const i = (await Promise.resolve().then(() => c("./f34c0a04.js")).then(function(b) {
89
89
  return b.J;
90
90
  })).default, u = a.trim(), m = p ? "rgba(0,0,0,0)" : f, s = Math.min(72, Math.max(24, k)), L = Math.max(1, Math.round(s / 42)), O = Math.max(4, Math.round(.07 * s)), W = Math.max(10, Math.round(.15 * s));
91
91
  if (!u) {
@@ -116,7 +116,7 @@ __emailmaker__.define("static/core/5734d163.js", [
116
116
  let a = !1;
117
117
  return (async () => {
118
118
  try {
119
- h === "qr" ? await D(e, T) : await Q(e, T), a || v(null);
119
+ h === "qr" ? await D(e, E) : await Q(e, E), a || v(null);
120
120
  } catch (i) {
121
121
  const u = i instanceof Error ? i.message : String(i);
122
122
  if (!a) {
@@ -130,7 +130,7 @@ __emailmaker__.define("static/core/5734d163.js", [
130
130
  };
131
131
  }, [
132
132
  h,
133
- T,
133
+ E,
134
134
  Q,
135
135
  D,
136
136
  o
@@ -142,7 +142,7 @@ __emailmaker__.define("static/core/5734d163.js", [
142
142
  const a = typeof window > "u" ? 2 : Math.min(3, Math.max(2, window.devicePixelRatio || 2));
143
143
  if (h === "qr") {
144
144
  const w = Math.round(Math.min(600, Math.max(80, C)) * a), B = document.createElement("canvas");
145
- B.width = w, B.height = w, await (await Promise.resolve().then(() => c("./b76b2f0e.js")).then(function(H) {
145
+ B.width = w, B.height = w, await (await Promise.resolve().then(() => c("./3684652a.js")).then(function(H) {
146
146
  return H.b;
147
147
  })).default.toCanvas(B, e, {
148
148
  width: w,
@@ -156,7 +156,7 @@ __emailmaker__.define("static/core/5734d163.js", [
156
156
  if (!$) throw new Error("PNG export failed");
157
157
  return $;
158
158
  }
159
- const i = (await Promise.resolve().then(() => c("./2abd616a.js")).then(function(w) {
159
+ const i = (await Promise.resolve().then(() => c("./f34c0a04.js")).then(function(w) {
160
160
  return w.J;
161
161
  })).default, u = document.createElement("canvas"), m = p ? "rgba(0,0,0,0)" : f, s = Math.min(130, Math.max(24, k)), L = Math.max(6, Math.round(.1 * s)), O = Math.max(2, Math.round(s / 36)), W = Math.max(12, Math.round(.16 * s));
162
162
  i(u, e, {
@@ -210,7 +210,7 @@ __emailmaker__.define("static/core/5734d163.js", [
210
210
  h,
211
211
  g,
212
212
  R
213
- ]), oe = !!g.trim() && !E;
213
+ ]), oe = !!g.trim() && !T;
214
214
  return (0, t.jsx)("div", {
215
215
  className: r.root,
216
216
  children: (0, t.jsxs)("div", {
@@ -221,7 +221,7 @@ __emailmaker__.define("static/core/5734d163.js", [
221
221
  className: r.segmentedControl,
222
222
  value: h,
223
223
  onChange: (e) => {
224
- Z(e), v(null);
224
+ K(e), v(null);
225
225
  },
226
226
  options: [{
227
227
  label: o("QR code"),
@@ -231,10 +231,10 @@ __emailmaker__.define("static/core/5734d163.js", [
231
231
  value: "barcode"
232
232
  }]
233
233
  }),
234
- E && (0, t.jsx)(d.Alert, {
234
+ T && (0, t.jsx)(d.Alert, {
235
235
  type: "error",
236
236
  title: o("Validation error"),
237
- description: E,
237
+ description: T,
238
238
  showIcon: !0,
239
239
  closable: !0,
240
240
  onClose: () => v(null)
@@ -242,7 +242,7 @@ __emailmaker__.define("static/core/5734d163.js", [
242
242
  (0, t.jsx)(d.Input.TextArea, {
243
243
  value: g,
244
244
  onChange: (e) => {
245
- K(e.target.value), v(null);
245
+ X(e.target.value), v(null);
246
246
  },
247
247
  placeholder: o("Text or URL"),
248
248
  rows: 3,
@@ -262,7 +262,7 @@ __emailmaker__.define("static/core/5734d163.js", [
262
262
  step: 8,
263
263
  value: C,
264
264
  onChange: (e) => ae(typeof e != "number" || Number.isNaN(e) ? 200 : e),
265
- prefix: (0, t.jsx)(S, {
265
+ prefix: (0, t.jsx)(_, {
266
266
  size: 18,
267
267
  strokeWidth: A
268
268
  }),
@@ -278,7 +278,7 @@ __emailmaker__.define("static/core/5734d163.js", [
278
278
  step: 4,
279
279
  value: k,
280
280
  onChange: (e) => te(typeof e != "number" || Number.isNaN(e) ? 60 : e),
281
- prefix: (0, t.jsx)(S, {
281
+ prefix: (0, t.jsx)(_, {
282
282
  size: 18,
283
283
  strokeWidth: A
284
284
  }),
@@ -306,7 +306,7 @@ __emailmaker__.define("static/core/5734d163.js", [
306
306
  showText: !0,
307
307
  onChange: (e, a) => {
308
308
  const i = typeof e == "string" ? e : e?.toHexString ? e.toHexString() : a;
309
- X(i);
309
+ Y(i);
310
310
  }
311
311
  })]
312
312
  }),
@@ -325,7 +325,7 @@ __emailmaker__.define("static/core/5734d163.js", [
325
325
  disabled: p,
326
326
  onChange: (e, a) => {
327
327
  const i = typeof e == "string" ? e : e?.toHexString ? e.toHexString() : a;
328
- Y(i);
328
+ Z(i);
329
329
  }
330
330
  })]
331
331
  }),