@chaibuilder/sdk 2.0.0-beta.12 → 2.0.0-beta.13

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,18 +1,18 @@
1
1
  import { registerChaiBlockSchema as p, StylesProp as c, registerChaiBlock as u } from "@chaibuilder/runtime";
2
2
  import { j as r } from "./jsx-runtime-Sp0orL4X.js";
3
3
  import * as y from "react";
4
- import { c as L, G as E, g as w } from "./iconBase-Ief2hJUZ.js";
4
+ import { c as I, G as E, g as w } from "./iconBase-Ief2hJUZ.js";
5
5
  import { ButtonIcon as C, CodeIcon as T, HeadingIcon as $, TextIcon as N, CursorTextIcon as H, Link1Icon as z, ImageIcon as j, RowsIcon as R, ColumnsIcon as A, SketchLogoIcon as D, VideoIcon as q, DividerHorizontalIcon as F, MoonIcon as G, SpaceBetweenVerticallyIcon as V, InputIcon as S, RadiobuttonIcon as O, DropdownMenuIcon as U, CheckboxIcon as W, LetterCaseToggleIcon as X } from "@radix-ui/react-icons";
6
- import { isNull as Y, isEmpty as b, get as v, pick as Z, omit as J, map as I } from "lodash-es";
6
+ import { isNull as Y, isEmpty as b, get as v, pick as Z, omit as J, map as L } from "lodash-es";
7
7
  import { GlobeIcon as K, GroupIcon as Q } from "lucide-react";
8
8
  import "clsx";
9
9
  import "tailwind-merge";
10
- const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("div", { className: L("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ r.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ r.jsx("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, x = ee, te = (e) => {
11
- const { blockProps: o, inBuilder: t, backgroundImage: n, children: l, tag: s = "div", styles: i } = e;
10
+ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("div", { className: I("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ r.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ r.jsx("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, x = ee, te = (e) => {
11
+ const { blockProps: o, inBuilder: t, backgroundImage: n, children: l, tag: i = "div", styles: s } = e;
12
12
  let a = l;
13
13
  l || (a = /* @__PURE__ */ r.jsx(x, { inBuilder: t }));
14
14
  let d = {};
15
- return n && (d = { backgroundImage: `url(${n})` }), y.createElement(s, { ...o, ...i, style: d }, a);
15
+ return n && (d = { backgroundImage: `url(${n})` }), y.createElement(i, { ...o, ...s, style: d }, a);
16
16
  }, oe = {
17
17
  type: "Box",
18
18
  label: "Box",
@@ -55,7 +55,7 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
55
55
  }),
56
56
  canAcceptBlock: () => !0
57
57
  }, le = (e) => {
58
- const { blockProps: o, iconSize: t, icon: n, content: l, styles: s, children: i, iconPos: a } = e, d = n, g = i || /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
58
+ const { blockProps: o, iconSize: t, icon: n, content: l, styles: i, children: s, iconPos: a } = e, d = n, g = s || /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
59
59
  /* @__PURE__ */ r.jsx("span", { "data-ai-key": "content", children: l }),
60
60
  d && /* @__PURE__ */ r.jsx(
61
61
  "div",
@@ -70,7 +70,7 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
70
70
  "button",
71
71
  {
72
72
  ...o,
73
- ...s,
73
+ ...i,
74
74
  type: "button"
75
75
  },
76
76
  g
@@ -123,7 +123,7 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
123
123
  ...t,
124
124
  dangerouslySetInnerHTML: { __html: n }
125
125
  });
126
- }, se = {
126
+ }, ie = {
127
127
  type: "CustomHTML",
128
128
  label: "web_blocks.custom_html",
129
129
  category: "core",
@@ -139,7 +139,7 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
139
139
  }
140
140
  }
141
141
  })
142
- }, ie = (e) => {
142
+ }, se = (e) => {
143
143
  const { blockProps: o, styles: t, backgroundImage: n } = e;
144
144
  let l = {};
145
145
  return n && (l = { backgroundImage: `url(${n})` }), y.createElement("div", { ...o, ...t, style: l });
@@ -160,8 +160,8 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
160
160
  }
161
161
  })
162
162
  }, ce = (e) => {
163
- const { blockProps: o, styles: t, content: n, level: l = "h1", children: s = null } = e;
164
- return s ? y.createElement(l, { ...t, ...o }, s) : y.createElement(l, {
163
+ const { blockProps: o, styles: t, content: n, level: l = "h1", children: i = null } = e;
164
+ return i ? y.createElement(l, { ...t, ...o }, i) : y.createElement(l, {
165
165
  ...t,
166
166
  ...o,
167
167
  dangerouslySetInnerHTML: { __html: n }
@@ -222,8 +222,8 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
222
222
  aiProps: ["content"],
223
223
  canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
224
224
  }, ge = (e) => {
225
- const { blockProps: o, styles: t, content: n, children: l = null, tag: s } = e;
226
- return l ? y.createElement("span", { ...t, ...o }, l) : y.createElement(s || "span", {
225
+ const { blockProps: o, styles: t, content: n, children: l = null, tag: i } = e;
226
+ return l ? y.createElement("span", { ...t, ...o }, l) : y.createElement(i || "span", {
227
227
  ...t,
228
228
  ...o,
229
229
  dangerouslySetInnerHTML: { __html: n || "" }
@@ -270,16 +270,16 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
270
270
  aiProps: ["content"],
271
271
  i18nProps: ["content"]
272
272
  }, fe = (e) => {
273
- const { blockProps: o, link: t, children: n, styles: l, inBuilder: s, content: i } = e;
273
+ const { blockProps: o, link: t, children: n, styles: l, inBuilder: i, content: s } = e;
274
274
  let a = {};
275
- return !n && b(i) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), s ? n ? /* @__PURE__ */ r.jsx("span", { ...o, style: a, ...l, children: n }) : y.createElement(
275
+ return !n && b(s) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), i ? n ? /* @__PURE__ */ r.jsx("span", { ...o, style: a, ...l, children: n }) : y.createElement(
276
276
  "span",
277
277
  {
278
278
  ...o,
279
279
  ...l,
280
280
  style: a
281
281
  },
282
- i
282
+ s
283
283
  ) : n ? /* @__PURE__ */ r.jsx("a", { href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...o, ...l, children: n }) : y.createElement(
284
284
  "a",
285
285
  {
@@ -288,7 +288,7 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
288
288
  href: (t == null ? void 0 : t.href) || "#",
289
289
  target: (t == null ? void 0 : t.target) || "_self"
290
290
  },
291
- i
291
+ s
292
292
  );
293
293
  }, be = {
294
294
  type: "Link",
@@ -328,24 +328,24 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
328
328
  canAcceptBlock: (e) => e !== "Link"
329
329
  }, M = (e, ...o) => ({
330
330
  ...e,
331
- className: L(e.className, ...o)
331
+ className: I(e.className, ...o)
332
332
  }), ke = (e) => {
333
- const { blockProps: o, children: t, styles: n, inBuilder: l, content: s, href: i } = e, { hrefType: a, autoplay: d, maxWidth: g, backdropColor: h, galleryName: f } = e, m = M(n, "cb-lightbox");
334
- if (!t && b(n == null ? void 0 : n.className) && b(s))
333
+ const { blockProps: o, children: t, styles: n, inBuilder: l, content: i, href: s } = e, { hrefType: a, autoplay: d, maxWidth: g, backdropColor: h, galleryName: f } = e, m = M(n, "cb-lightbox");
334
+ if (!t && b(n == null ? void 0 : n.className) && b(i))
335
335
  return /* @__PURE__ */ r.jsx(x, { inBuilder: l });
336
336
  if (l)
337
337
  return t ? /* @__PURE__ */ r.jsx("span", { ...o, ...m, children: t }) : y.createElement("span", {
338
338
  ...o,
339
339
  ...m,
340
- dangerouslySetInnerHTML: { __html: s }
340
+ dangerouslySetInnerHTML: { __html: i }
341
341
  });
342
342
  const k = {};
343
- return k["data-vbtype"] = a, d && (k["data-autoplay"] = "true"), g && (k["data-maxwidth"] = g + "px"), h && (k["data-overlay"] = h), f && (k["data-gall"] = f), t ? /* @__PURE__ */ r.jsx("a", { ...k, href: i || "#/", ...o, ...m, children: t }) : y.createElement("a", {
343
+ return k["data-vbtype"] = a, d && (k["data-autoplay"] = "true"), g && (k["data-maxwidth"] = g + "px"), h && (k["data-overlay"] = h), f && (k["data-gall"] = f), t ? /* @__PURE__ */ r.jsx("a", { ...k, href: s || "#/", ...o, ...m, children: t }) : y.createElement("a", {
344
344
  ...o,
345
345
  ...m,
346
346
  ...k,
347
- href: i || "#",
348
- dangerouslySetInnerHTML: { __html: s }
347
+ href: s || "#",
348
+ dangerouslySetInnerHTML: { __html: i }
349
349
  });
350
350
  }, xe = {
351
351
  type: "LightBoxLink",
@@ -422,9 +422,9 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
422
422
  aiProps: ["content"],
423
423
  canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
424
424
  }, we = (e) => {
425
- const { blockProps: o, children: t, listType: n, styles: l, tag: s, inBuilder: i } = e, a = L(v(l, "className", ""), n);
426
- return !t && b(l == null ? void 0 : l.className) ? /* @__PURE__ */ r.jsx(x, { inBuilder: i }) : y.createElement(
427
- s || (n === "list-decimal" ? "ol" : "ul"),
425
+ const { blockProps: o, children: t, listType: n, styles: l, tag: i, inBuilder: s } = e, a = I(v(l, "className", ""), n);
426
+ return !t && b(l == null ? void 0 : l.className) ? /* @__PURE__ */ r.jsx(x, { inBuilder: s }) : y.createElement(
427
+ i || (n === "list-decimal" ? "ol" : "ul"),
428
428
  { ...o, ...l, className: a },
429
429
  t
430
430
  );
@@ -474,14 +474,14 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
474
474
  content: "Item 3"
475
475
  }
476
476
  ]
477
- }, Le = (e) => {
478
- const { blockProps: o, content: t, styles: n, children: l, tag: s } = e;
479
- return l ? y.createElement(s || "li", { ...n, ...o }, l) : y.createElement(s || "li", {
477
+ }, Ie = (e) => {
478
+ const { blockProps: o, content: t, styles: n, children: l, tag: i } = e;
479
+ return l ? y.createElement(i || "li", { ...n, ...o }, l) : y.createElement(i || "li", {
480
480
  ...n,
481
481
  ...o,
482
482
  dangerouslySetInnerHTML: { __html: t }
483
483
  });
484
- }, Ie = {
484
+ }, Le = {
485
485
  type: "ListItem",
486
486
  label: "List Item",
487
487
  icon: A,
@@ -505,9 +505,9 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
505
505
  canAcceptBlock: (e) => e !== "ListItem",
506
506
  canBeNested: (e) => e === "List"
507
507
  }, _e = (e) => {
508
- const { blockProps: o, icon: t, styles: n, width: l, inBuilder: s, height: i } = e, a = M(n, L(l ? `w-[${l}px]` : "", i ? `h-[${i}px]` : ""));
508
+ const { blockProps: o, icon: t, styles: n, width: l, inBuilder: i, height: s } = e, a = M(n, I(l ? `w-[${l}px]` : "", s ? `h-[${s}px]` : ""));
509
509
  if (b(t))
510
- return /* @__PURE__ */ r.jsx(x, { inBuilder: s, className: "h-8 w-14" });
510
+ return /* @__PURE__ */ r.jsx(x, { inBuilder: i, className: "h-8 w-14" });
511
511
  const d = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
512
512
  return y.createElement("span", {
513
513
  ...o,
@@ -542,15 +542,15 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
542
542
  }
543
543
  })
544
544
  }, Pe = (e) => {
545
- const { blockProps: o, image: t, styles: n, alt: l, height: s, width: i, lazyLoading: a } = e;
545
+ const { blockProps: o, image: t, styles: n, alt: l, height: i, width: s, lazyLoading: a } = e;
546
546
  return b(t) ? /* @__PURE__ */ r.jsx(x, { className: "h-36" }) : y.createElement("img", {
547
547
  ...o,
548
548
  ...n,
549
549
  src: t,
550
550
  alt: l,
551
551
  loading: a ? "lazy" : "eager",
552
- height: s,
553
- width: i
552
+ height: i,
553
+ width: s
554
554
  });
555
555
  }, Ce = {
556
556
  type: "Image",
@@ -565,38 +565,48 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
565
565
  type: "string",
566
566
  title: "Image",
567
567
  default: "https://fakeimg.pl/400x200?text=Choose&font=bebas",
568
- ui: {
569
- "ui:widget": "image"
570
- }
568
+ ui: { "ui:widget": "image" }
571
569
  },
572
570
  alt: {
573
571
  type: "string",
574
572
  title: "Alt text",
575
573
  default: "",
576
- ui: {
577
- "ui:placeholder": "Enter Here"
578
- }
574
+ ui: { "ui:placeholder": "Enter alt text" }
575
+ },
576
+ lazyLoading: {
577
+ type: "boolean",
578
+ title: "Lazy Load",
579
+ default: !0
580
+ },
581
+ width: {
582
+ type: "number",
583
+ title: "Width",
584
+ default: "",
585
+ ui: { "ui:placeholder": "Enter width" }
579
586
  },
580
587
  height: {
581
588
  type: "number",
582
589
  title: "Height",
583
590
  default: "",
584
- ui: {
585
- "ui:placeholder": "Enter Here"
586
- }
591
+ ui: { "ui:placeholder": "Enter height" }
587
592
  },
588
- width: {
593
+ mobileImage: {
594
+ type: "string",
595
+ title: "Mobile Image",
596
+ default: "",
597
+ ui: { "ui:widget": "image" }
598
+ },
599
+ mobileWidth: {
589
600
  type: "number",
590
- title: "Width",
601
+ title: "Mobile Width",
591
602
  default: "",
592
- ui: {
593
- "ui:placeholder": "Enter Here"
594
- }
603
+ ui: { "ui:placeholder": "Enter width" }
595
604
  },
596
- lazyLoading: {
597
- type: "boolean",
598
- title: "Lazy Load",
599
- default: !0
605
+ mobileHeight: {
606
+ type: "number",
607
+ title: "Mobile Height",
608
+ default: "",
609
+ ui: { "ui:placeholder": "Enter height" }
600
610
  }
601
611
  }
602
612
  }),
@@ -617,14 +627,14 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
617
627
  }
618
628
  return null;
619
629
  }, Se = y.memo((e) => {
620
- const { blockProps: o, inBuilder: t, styles: n, url: l, controls: s } = e, i = v(s, "autoPlay", !1), a = v(s, "controls", !1), d = i || v(s, "muted", !0), g = v(s, "loop", !1);
630
+ const { blockProps: o, inBuilder: t, styles: n, url: l, controls: i } = e, s = v(i, "autoPlay", !1), a = v(i, "controls", !1), d = s || v(i, "muted", !0), g = v(i, "loop", !1);
621
631
  if (b(l))
622
632
  return /* @__PURE__ */ r.jsx(x, { inBuilder: t, className: "h-36" });
623
633
  let h = je(l), f = null;
624
634
  if (h) {
625
635
  if (!b(h)) {
626
636
  const m = [];
627
- m.push(`autoplay=${i ? 1 : 0}`), m.push(`controls=${s ? 1 : 0}`), m.push(`mute=${d ? 1 : 0}&muted=${d ? 1 : 0}`), m.push(`loop=${g ? 1 : 0}`), h = `${h}?${m.join("&")}`;
637
+ m.push(`autoplay=${s ? 1 : 0}`), m.push(`controls=${i ? 1 : 0}`), m.push(`mute=${d ? 1 : 0}&muted=${d ? 1 : 0}`), m.push(`loop=${g ? 1 : 0}`), h = `${h}?${m.join("&")}`;
628
638
  }
629
639
  f = y.createElement("iframe", {
630
640
  ...o,
@@ -641,7 +651,7 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
641
651
  src: l,
642
652
  controls: a,
643
653
  muted: d,
644
- autoPlay: t ? !1 : i,
654
+ autoPlay: t ? !1 : s,
645
655
  loop: g
646
656
  });
647
657
  return /* @__PURE__ */ r.jsx("div", { ...Z(n, ["className"]), children: /* @__PURE__ */ r.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
@@ -717,7 +727,7 @@ function $e(e) {
717
727
  }
718
728
  const Ne = (e) => {
719
729
  const { scripts: o, inBuilder: t, blockProps: n } = e;
720
- return t ? /* @__PURE__ */ r.jsx("div", { ...n, children: /* @__PURE__ */ r.jsx("div", { className: L("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ r.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ r.jsx("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ r.jsx("div", { dangerouslySetInnerHTML: { __html: o } });
730
+ return t ? /* @__PURE__ */ r.jsx("div", { ...n, children: /* @__PURE__ */ r.jsx("div", { className: I("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ r.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ r.jsx("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ r.jsx("div", { dangerouslySetInnerHTML: { __html: o } });
721
731
  }, He = {
722
732
  type: "CustomScript",
723
733
  label: "web_blocks.custom_script",
@@ -844,9 +854,9 @@ const Ne = (e) => {
844
854
  aiProps: ["content"],
845
855
  i18nProps: ["content"]
846
856
  }, Ge = (e) => {
847
- const { blockProps: o, backgroundImage: t, children: n, styles: l, tag: s } = e;
848
- let i = {};
849
- return t && (i = { backgroundImage: `url(${t})` }), y.createElement(s || "div", { ...o, ...l, style: i }, n);
857
+ const { blockProps: o, backgroundImage: t, children: n, styles: l, tag: i } = e;
858
+ let s = {};
859
+ return t && (s = { backgroundImage: `url(${t})` }), y.createElement(i || "div", { ...o, ...l, style: s }, n);
850
860
  }, Ve = {
851
861
  type: "Body",
852
862
  label: "Body",
@@ -911,7 +921,7 @@ const Ne = (e) => {
911
921
  canMove: () => !1,
912
922
  canDuplicate: () => !1
913
923
  }, We = (e) => {
914
- const { children: o, blockProps: t, errorMessage: n, successMessage: l, action: s, styles: i } = e;
924
+ const { children: o, blockProps: t, errorMessage: n, successMessage: l, action: i, styles: s } = e;
915
925
  let a = o;
916
926
  o || (a = /* @__PURE__ */ r.jsx(x, {}));
917
927
  const d = {
@@ -928,9 +938,9 @@ const Ne = (e) => {
928
938
  "data-error": n,
929
939
  "data-success": l,
930
940
  method: "post",
931
- action: s,
941
+ action: i,
932
942
  ...t,
933
- ...i,
943
+ ...s,
934
944
  children: [
935
945
  /* @__PURE__ */ r.jsx("div", { ...g }),
936
946
  a
@@ -969,7 +979,7 @@ const Ne = (e) => {
969
979
  aiProps: ["errorMessage", "successMessage"],
970
980
  canAcceptBlock: () => !0
971
981
  }, Ye = (e) => {
972
- const { blockProps: o, inBuilder: t, label: n, styles: l, inputStyles: s, icon: i, iconSize: a, iconPos: d } = e, g = w(), h = {
982
+ const { blockProps: o, inBuilder: t, label: n, styles: l, inputStyles: i, icon: s, iconSize: a, iconPos: d } = e, g = w(), h = {
973
983
  "x-bind:disabled": "formLoading"
974
984
  };
975
985
  return /* @__PURE__ */ r.jsxs(
@@ -977,18 +987,18 @@ const Ne = (e) => {
977
987
  {
978
988
  id: g,
979
989
  ...h,
980
- ...s,
990
+ ...i,
981
991
  ...l,
982
992
  ...o || {},
983
993
  type: t ? "button" : "submit",
984
994
  children: [
985
995
  n,
986
- i && /* @__PURE__ */ r.jsx(
996
+ s && /* @__PURE__ */ r.jsx(
987
997
  "div",
988
998
  {
989
999
  style: { width: a + "px" },
990
1000
  className: d + " " + (d === "order-first" ? "mr-2" : "ml-2") || "",
991
- dangerouslySetInnerHTML: { __html: i }
1001
+ dangerouslySetInnerHTML: { __html: s }
992
1002
  }
993
1003
  )
994
1004
  ]
@@ -1035,14 +1045,14 @@ const Ne = (e) => {
1035
1045
  i18nProps: ["label"],
1036
1046
  aiProps: ["label"]
1037
1047
  }, Je = (e) => {
1038
- const { blockProps: o, fieldName: t, label: n, placeholder: l, styles: s, inputStyles: i, showLabel: a, required: d, inputType: g } = e, h = w();
1039
- return a ? /* @__PURE__ */ r.jsxs("div", { ...s, ...o, children: [
1048
+ const { blockProps: o, fieldName: t, label: n, placeholder: l, styles: i, inputStyles: s, showLabel: a, required: d, inputType: g } = e, h = w();
1049
+ return a ? /* @__PURE__ */ r.jsxs("div", { ...i, ...o, children: [
1040
1050
  a && /* @__PURE__ */ r.jsx("label", { htmlFor: h, children: n }),
1041
1051
  /* @__PURE__ */ r.jsx(
1042
1052
  "input",
1043
1053
  {
1044
1054
  name: t,
1045
- ...i,
1055
+ ...s,
1046
1056
  id: h,
1047
1057
  type: g,
1048
1058
  placeholder: l,
@@ -1055,8 +1065,8 @@ const Ne = (e) => {
1055
1065
  id: h,
1056
1066
  name: t,
1057
1067
  ...o,
1058
- ...i,
1059
1068
  ...s,
1069
+ ...i,
1060
1070
  type: g,
1061
1071
  placeholder: l,
1062
1072
  required: d
@@ -1118,19 +1128,19 @@ const Ne = (e) => {
1118
1128
  aiProps: ["label", "placeholder"],
1119
1129
  i18nProps: ["label", "placeholder"]
1120
1130
  }, Qe = (e) => {
1121
- const { blockProps: o, fieldName: t, label: n, styles: l, inputStyles: s, required: i, checked: a, showLabel: d = !0 } = e, g = w();
1131
+ const { blockProps: o, fieldName: t, label: n, styles: l, inputStyles: i, required: s, checked: a, showLabel: d = !0 } = e, g = w();
1122
1132
  return d ? /* @__PURE__ */ r.jsxs("div", { ...l, ...o, children: [
1123
- /* @__PURE__ */ r.jsx("input", { ...s, name: t, id: g, type: "radio", required: i, defaultChecked: a }),
1133
+ /* @__PURE__ */ r.jsx("input", { ...i, name: t, id: g, type: "radio", required: s, defaultChecked: a }),
1124
1134
  n && /* @__PURE__ */ r.jsx("label", { htmlFor: g, children: n })
1125
1135
  ] }) : /* @__PURE__ */ r.jsx(
1126
1136
  "input",
1127
1137
  {
1128
1138
  id: g,
1129
1139
  ...o,
1130
- ...s,
1140
+ ...i,
1131
1141
  ...l,
1132
1142
  type: "radio",
1133
- required: i,
1143
+ required: s,
1134
1144
  checked: a,
1135
1145
  name: t
1136
1146
  }
@@ -1170,16 +1180,16 @@ const Ne = (e) => {
1170
1180
  aiProps: ["label"],
1171
1181
  i18nProps: ["label"]
1172
1182
  }, tt = (e) => {
1173
- const { blockProps: o, fieldName: t, label: n, placeholder: l, styles: s, inputStyles: i, required: a, showLabel: d, _multiple: g, options: h } = e, f = w();
1174
- return d ? /* @__PURE__ */ r.jsxs("div", { ...s, ...o, children: [
1183
+ const { blockProps: o, fieldName: t, label: n, placeholder: l, styles: i, inputStyles: s, required: a, showLabel: d, _multiple: g, options: h } = e, f = w();
1184
+ return d ? /* @__PURE__ */ r.jsxs("div", { ...i, ...o, children: [
1175
1185
  d && /* @__PURE__ */ r.jsx("label", { htmlFor: f, children: n }),
1176
- /* @__PURE__ */ r.jsxs("select", { ...i, id: f, required: a, multiple: g, name: t, children: [
1186
+ /* @__PURE__ */ r.jsxs("select", { ...s, id: f, required: a, multiple: g, name: t, children: [
1177
1187
  /* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: l }),
1178
- I(h, (m) => /* @__PURE__ */ r.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
1188
+ L(h, (m) => /* @__PURE__ */ r.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
1179
1189
  ] })
1180
- ] }) : /* @__PURE__ */ r.jsxs("select", { id: f, ...s, ...o, required: a, multiple: g, name: t, children: [
1190
+ ] }) : /* @__PURE__ */ r.jsxs("select", { id: f, ...i, ...o, required: a, multiple: g, name: t, children: [
1181
1191
  /* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: l }),
1182
- I(h, (m) => /* @__PURE__ */ r.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
1192
+ L(h, (m) => /* @__PURE__ */ r.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
1183
1193
  ] });
1184
1194
  }, ot = {
1185
1195
  type: "Select",
@@ -1241,18 +1251,18 @@ const Ne = (e) => {
1241
1251
  aiProps: ["label", "placeholder"],
1242
1252
  i18nProps: ["label", "placeholder"]
1243
1253
  }, lt = (e) => {
1244
- const { blockProps: o, fieldName: t, label: n, placeholder: l, styles: s, inputStyles: i, _rows: a, showLabel: d } = e, g = w();
1245
- return d ? /* @__PURE__ */ r.jsxs("div", { ...s, ...o, children: [
1254
+ const { blockProps: o, fieldName: t, label: n, placeholder: l, styles: i, inputStyles: s, _rows: a, showLabel: d } = e, g = w();
1255
+ return d ? /* @__PURE__ */ r.jsxs("div", { ...i, ...o, children: [
1246
1256
  d && /* @__PURE__ */ r.jsx("label", { htmlFor: g, children: n }),
1247
- /* @__PURE__ */ r.jsx("textarea", { name: t, ...i, id: g, placeholder: l, rows: a })
1257
+ /* @__PURE__ */ r.jsx("textarea", { name: t, ...s, id: g, placeholder: l, rows: a })
1248
1258
  ] }) : /* @__PURE__ */ r.jsx(
1249
1259
  "textarea",
1250
1260
  {
1251
1261
  id: g,
1252
1262
  name: t,
1253
1263
  ...o,
1254
- ...i,
1255
1264
  ...s,
1265
+ ...i,
1256
1266
  placeholder: l,
1257
1267
  rows: a
1258
1268
  }
@@ -1293,16 +1303,16 @@ const Ne = (e) => {
1293
1303
  aiProps: ["label", "placeholder"],
1294
1304
  i18nProps: ["label", "placeholder"]
1295
1305
  }, rt = (e) => {
1296
- const { blockProps: o, fieldName: t, label: n, styles: l, inputStyles: s, required: i, checked: a, showLabel: d = !0 } = e, g = w();
1306
+ const { blockProps: o, fieldName: t, label: n, styles: l, inputStyles: i, required: s, checked: a, showLabel: d = !0 } = e, g = w();
1297
1307
  return d ? /* @__PURE__ */ r.jsxs("div", { ...l, ...o, children: [
1298
1308
  /* @__PURE__ */ r.jsx(
1299
1309
  "input",
1300
1310
  {
1301
- ...s,
1311
+ ...i,
1302
1312
  name: t,
1303
1313
  id: g,
1304
1314
  type: "checkbox",
1305
- required: i,
1315
+ required: s,
1306
1316
  defaultChecked: a
1307
1317
  }
1308
1318
  ),
@@ -1312,14 +1322,14 @@ const Ne = (e) => {
1312
1322
  {
1313
1323
  id: g,
1314
1324
  ...o,
1315
- ...s,
1325
+ ...i,
1316
1326
  ...l,
1317
1327
  type: "checkbox",
1318
- required: i,
1328
+ required: s,
1319
1329
  name: t
1320
1330
  }
1321
1331
  );
1322
- }, st = {
1332
+ }, it = {
1323
1333
  type: "Checkbox",
1324
1334
  label: "web_blocks.checkbox",
1325
1335
  category: "core",
@@ -1353,10 +1363,10 @@ const Ne = (e) => {
1353
1363
  }),
1354
1364
  aiProps: ["label"],
1355
1365
  i18nProps: ["label"]
1356
- }, it = (e) => {
1357
- const { blockProps: o, content: t, styles: n, children: l } = e, s = { ...n, ...o };
1358
- return l ? y.createElement("label", s, l) : y.createElement("label", {
1359
- ...s,
1366
+ }, st = (e) => {
1367
+ const { blockProps: o, content: t, styles: n, children: l } = e, i = { ...n, ...o };
1368
+ return l ? y.createElement("label", i, l) : y.createElement("label", {
1369
+ ...i,
1360
1370
  dangerouslySetInnerHTML: { __html: t }
1361
1371
  });
1362
1372
  }, at = {
@@ -1376,7 +1386,7 @@ const Ne = (e) => {
1376
1386
  }
1377
1387
  })
1378
1388
  }, ft = () => {
1379
- u(te, oe), u(ie, ae), u(le, ne), u(ce, de), u(ue, pe), u(ge, ye), u(me, he), u(fe, be), u(ke, xe), u(we, ve), u(Le, Ie), u(_e, Be), u(Pe, Ce), u(Se, Me), u(re, se), u(Ne, He), u(qe, Fe), u(We, Xe), u(Ye, Ze), u(Je, Ke), u(rt, st), u(Qe, et), u(tt, ot), u(lt, nt), u(it, at), u(Oe, Ue), u(Ge, Ve), u(Ee, Te), u(ze, Re), u(Ae, De);
1389
+ u(te, oe), u(se, ae), u(le, ne), u(ce, de), u(ue, pe), u(ge, ye), u(me, he), u(fe, be), u(ke, xe), u(we, ve), u(Ie, Le), u(_e, Be), u(Pe, Ce), u(Se, Me), u(re, ie), u(Ne, He), u(qe, Fe), u(We, Xe), u(Ye, Ze), u(Je, Ke), u(rt, it), u(Qe, et), u(tt, ot), u(lt, nt), u(st, at), u(Oe, Ue), u(Ge, Ve), u(Ee, Te), u(ze, Re), u(Ae, De);
1380
1390
  };
1381
1391
  export {
1382
1392
  ft as loadWebBlocks
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "author": "Suraj Air",
6
6
  "license": "BSD-3-Clause",
7
7
  "homepage": "https://chaibuilder.com",
8
- "version": "2.0.0-beta.12",
8
+ "version": "2.0.0-beta.13",
9
9
  "type": "module",
10
10
  "repository": {
11
11
  "type": "git",