@chaibuilder/sdk 2.6.2 → 2.6.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.
@@ -1,17 +1,17 @@
1
- import { registerChaiBlockSchema as d, StylesProp as u, registerChaiBlock as p, stylesProp as _, closestBlockProp as z } from "@chaibuilder/runtime";
2
- import { jsx as i, jsxs as b, Fragment as D } from "react/jsx-runtime";
3
- import { c as P, g as I } from "./common-functions-BGzDsf1z.js";
1
+ import { registerChaiBlockSchema as d, StylesProp as u, registerChaiBlock as p, stylesProp as S, closestBlockProp as z } from "@chaibuilder/runtime";
2
+ import { jsx as a, jsxs as b, Fragment as D } from "react/jsx-runtime";
3
+ import { c as _, g as I } from "./common-functions-BGzDsf1z.js";
4
4
  import * as y from "react";
5
5
  import { createElement as w } from "react";
6
6
  import { ButtonIcon as A, CodeIcon as V, DividerHorizontalIcon as j, CheckboxIcon as F, InputIcon as M, LetterCaseToggleIcon as U, RadiobuttonIcon as q, DropdownMenuIcon as G, HeadingIcon as Z, TableIcon as O, BorderTopIcon as Y, BorderAllIcon as W, ViewHorizontalIcon as Q, DragHandleHorizontalIcon as J, SketchLogoIcon as X, ImageIcon as K, Link1Icon as ee, RowsIcon as te, ColumnsIcon as oe, TextIcon as le, CursorTextIcon as re, SpaceBetweenVerticallyIcon as ne, VideoIcon as ae, LoopIcon as E } from "@radix-ui/react-icons";
7
7
  import { isEmpty as C, get as h, map as T, isNull as ie, omit as se, pick as ce } from "lodash-es";
8
8
  import { FileCode as pe, GroupIcon as de, GlobeIcon as H, Columns as ue, Rows as me } from "lucide-react";
9
- const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div", { className: P("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ i("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, ye = (e) => {
10
- const { blockProps: o, inBuilder: t, backgroundImage: l, children: r, tag: n = "div", styles: a } = e;
9
+ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div", { className: _("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ a("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ a("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, ye = (e) => {
10
+ const { blockProps: o, inBuilder: t, backgroundImage: l, children: r, tag: n = "div", styles: i } = e;
11
11
  let s = r;
12
- r || (s = /* @__PURE__ */ i(v, { inBuilder: t }));
12
+ r || (s = /* @__PURE__ */ a(v, { inBuilder: t }));
13
13
  let c = {};
14
- return l && (c = { backgroundImage: `url(${l})` }), y.createElement(n, { ...o, ...a, style: c }, s);
14
+ return l && (c = { backgroundImage: `url(${l})` }), y.createElement(n, { ...o, ...i, style: c }, s);
15
15
  }, ge = {
16
16
  type: "Box",
17
17
  description: "Similar to a div or section elements in HTML",
@@ -55,9 +55,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
55
55
  }),
56
56
  canAcceptBlock: () => !0
57
57
  }, fe = (e) => {
58
- const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: a, iconPos: s, link: c, inBuilder: m } = e, k = l, g = a || /* @__PURE__ */ b(D, { children: [
59
- r && /* @__PURE__ */ i("span", { "data-ai-key": "content", children: r }),
60
- k && /* @__PURE__ */ i(
58
+ const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: i, iconPos: s, link: c, inBuilder: m } = e, k = l, g = i || /* @__PURE__ */ b(D, { children: [
59
+ r && /* @__PURE__ */ a("span", { "data-ai-key": "content", children: r }),
60
+ k && /* @__PURE__ */ a(
61
61
  "div",
62
62
  {
63
63
  style: { width: t + "px" },
@@ -75,7 +75,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
75
75
  },
76
76
  g
77
77
  );
78
- return C(h(c, "href")) ? x : m ? /* @__PURE__ */ i("span", { children: x }) : /* @__PURE__ */ i("a", { "aria-label": r, href: h(c, "href") || "/", target: h(c, "target", "_self"), children: x });
78
+ return C(h(c, "href")) ? x : m ? /* @__PURE__ */ a("span", { children: x }) : /* @__PURE__ */ a("a", { "aria-label": r, href: h(c, "href") || "/", target: h(c, "target", "_self"), children: x });
79
79
  }, be = {
80
80
  type: "Button",
81
81
  description: "similar to a button element in HTML",
@@ -136,7 +136,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
136
136
  }, he = (e) => {
137
137
  const { blockProps: o, styles: t, htmlCode: l, inBuilder: r } = e;
138
138
  return r ? /* @__PURE__ */ b("div", { className: "relative", children: [
139
- r ? /* @__PURE__ */ i("div", { ...o, ...t, className: "absolute z-20 h-full w-full" }) : null,
139
+ r ? /* @__PURE__ */ a("div", { ...o, ...t, className: "absolute z-20 h-full w-full" }) : null,
140
140
  y.createElement("div", {
141
141
  ...t,
142
142
  dangerouslySetInnerHTML: { __html: l.replace(/<script.*?>.*?<\/script>/g, "") }
@@ -166,7 +166,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
166
166
  i18nProps: ["htmlCode"]
167
167
  }, xe = (e) => {
168
168
  const { scripts: o, inBuilder: t, blockProps: l } = e;
169
- return t ? /* @__PURE__ */ i("div", { ...l, children: /* @__PURE__ */ i("div", { className: P("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ i("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__ */ i("div", { dangerouslySetInnerHTML: { __html: o } });
169
+ return t ? /* @__PURE__ */ a("div", { ...l, children: /* @__PURE__ */ a("div", { className: _("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ a("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ a("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__ */ a("div", { dangerouslySetInnerHTML: { __html: o } });
170
170
  }, we = {
171
171
  type: "CustomScript",
172
172
  description: "similar to a script element in HTML",
@@ -223,11 +223,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
223
223
  }
224
224
  })
225
225
  }, Pe = (e) => {
226
- const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: a, checked: s, showLabel: c = !0 } = e;
226
+ const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: s, showLabel: c = !0 } = e;
227
227
  return c ? /* @__PURE__ */ b("div", { ...r, ...o, children: [
228
- /* @__PURE__ */ i("input", { ...n, name: t, type: "checkbox", required: a, defaultChecked: s }),
229
- l && /* @__PURE__ */ i("label", { htmlFor: t, children: l })
230
- ] }) : /* @__PURE__ */ i(
228
+ /* @__PURE__ */ a("input", { ...n, name: t, type: "checkbox", required: i, defaultChecked: s }),
229
+ l && /* @__PURE__ */ a("label", { htmlFor: t, children: l })
230
+ ] }) : /* @__PURE__ */ a(
231
231
  "input",
232
232
  {
233
233
  name: t,
@@ -235,7 +235,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
235
235
  ...n,
236
236
  ...r,
237
237
  type: "checkbox",
238
- required: a,
238
+ required: i,
239
239
  defaultChecked: s
240
240
  }
241
241
  );
@@ -279,9 +279,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
279
279
  aiProps: ["label"],
280
280
  i18nProps: ["label"]
281
281
  }, Se = (e) => {
282
- const { children: o, blockProps: t, errorMessage: l, successMessage: r, action: n, styles: a, inBuilder: s } = e;
282
+ const { children: o, blockProps: t, errorMessage: l, successMessage: r, action: n, styles: i, inBuilder: s } = e;
283
283
  let c = o;
284
- return o || (c = /* @__PURE__ */ i(v, { inBuilder: s })), /* @__PURE__ */ b(
284
+ return o || (c = /* @__PURE__ */ a(v, { inBuilder: s })), /* @__PURE__ */ b(
285
285
  "form",
286
286
  {
287
287
  ...{
@@ -293,9 +293,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
293
293
  method: "post",
294
294
  action: n,
295
295
  ...t,
296
- ...a,
296
+ ...i,
297
297
  children: [
298
- /* @__PURE__ */ i("div", { ...{
298
+ /* @__PURE__ */ a("div", { ...{
299
299
  "x-html": "",
300
300
  ":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
301
301
  } }),
@@ -345,13 +345,13 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
345
345
  aiProps: ["errorMessage", "successMessage"],
346
346
  canAcceptBlock: () => !0
347
347
  }, Te = (e) => {
348
- const { blockProps: o, inBuilder: t, label: l, styles: r, icon: n, iconSize: a, iconPos: s } = e;
348
+ const { blockProps: o, inBuilder: t, label: l, styles: r, icon: n, iconSize: i, iconPos: s } = e;
349
349
  return /* @__PURE__ */ b("button", { ...r, ...o || {}, type: t ? "button" : "submit", "aria-label": l, children: [
350
350
  l,
351
- n && /* @__PURE__ */ i(
351
+ n && /* @__PURE__ */ a(
352
352
  "div",
353
353
  {
354
- style: { width: a + "px" },
354
+ style: { width: i + "px" },
355
355
  className: s + " " + (s === "order-first" ? "mr-2" : "ml-2") || "",
356
356
  dangerouslySetInnerHTML: { __html: n }
357
357
  }
@@ -471,32 +471,32 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
471
471
  label: l,
472
472
  placeholder: r,
473
473
  styles: n,
474
- inputStyles: a,
474
+ inputStyles: i,
475
475
  showLabel: s,
476
476
  required: c,
477
477
  inputType: m,
478
478
  defaultValue: k
479
479
  } = e, { type: g, autocomplete: x } = Re(m);
480
480
  return s ? /* @__PURE__ */ b("div", { ...n, ...o, children: [
481
- s && /* @__PURE__ */ i("label", { htmlFor: t, children: l }),
482
- /* @__PURE__ */ i(
481
+ s && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
482
+ /* @__PURE__ */ a(
483
483
  "input",
484
484
  {
485
485
  name: t,
486
486
  defaultValue: k,
487
- ...a,
487
+ ...i,
488
488
  type: g,
489
489
  placeholder: r,
490
490
  required: c,
491
491
  autoComplete: x
492
492
  }
493
493
  )
494
- ] }) : /* @__PURE__ */ i(
494
+ ] }) : /* @__PURE__ */ a(
495
495
  "input",
496
496
  {
497
497
  name: t,
498
498
  ...o,
499
- ...a,
499
+ ...i,
500
500
  ...n,
501
501
  type: g,
502
502
  placeholder: r,
@@ -645,11 +645,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
645
645
  aiProps: ["content"],
646
646
  i18nProps: ["content"]
647
647
  }, $e = (e) => {
648
- const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: a, checked: s, showLabel: c = !0 } = e;
648
+ const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: s, showLabel: c = !0 } = e;
649
649
  return c ? /* @__PURE__ */ b("div", { ...r, ...o, children: [
650
- /* @__PURE__ */ i("input", { ...n, name: t, type: "radio", required: a, defaultChecked: s }),
651
- l && /* @__PURE__ */ i("label", { htmlFor: t, children: l })
652
- ] }) : /* @__PURE__ */ i(
650
+ /* @__PURE__ */ a("input", { ...n, name: t, type: "radio", required: i, defaultChecked: s }),
651
+ l && /* @__PURE__ */ a("label", { htmlFor: t, children: l })
652
+ ] }) : /* @__PURE__ */ a(
653
653
  "input",
654
654
  {
655
655
  name: t,
@@ -657,7 +657,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
657
657
  ...n,
658
658
  ...r,
659
659
  type: "radio",
660
- required: a,
660
+ required: i,
661
661
  checked: s
662
662
  }
663
663
  );
@@ -707,7 +707,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
707
707
  label: l,
708
708
  placeholder: r,
709
709
  styles: n,
710
- inputStyles: a,
710
+ inputStyles: i,
711
711
  required: s,
712
712
  showLabel: c,
713
713
  _multiple: m,
@@ -715,18 +715,18 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
715
715
  defaultValue: g
716
716
  } = e, x = m && g ? g.split(",").map((f) => f.trim()) : g || "";
717
717
  return c ? /* @__PURE__ */ b("div", { ...n, ...o, children: [
718
- c && /* @__PURE__ */ i("label", { htmlFor: t, children: l }),
718
+ c && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
719
719
  /* @__PURE__ */ b(
720
720
  "select",
721
721
  {
722
- ...a,
722
+ ...i,
723
723
  required: s,
724
724
  multiple: m,
725
725
  name: t,
726
726
  defaultValue: x,
727
727
  children: [
728
- /* @__PURE__ */ i("option", { value: "", disabled: !0, hidden: !0, children: r }),
729
- T(k, (f) => /* @__PURE__ */ i("option", { value: f == null ? void 0 : f.value, children: f == null ? void 0 : f.label }, f == null ? void 0 : f.value))
728
+ /* @__PURE__ */ a("option", { value: "", disabled: !0, hidden: !0, children: r }),
729
+ T(k, (f) => /* @__PURE__ */ a("option", { value: f == null ? void 0 : f.value, children: f == null ? void 0 : f.label }, f == null ? void 0 : f.value))
730
730
  ]
731
731
  }
732
732
  )
@@ -740,8 +740,8 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
740
740
  name: t,
741
741
  defaultValue: x,
742
742
  children: [
743
- /* @__PURE__ */ i("option", { value: "", disabled: !0, hidden: !0, children: r }),
744
- T(k, (f) => /* @__PURE__ */ i("option", { value: f == null ? void 0 : f.value, children: f == null ? void 0 : f.label }, f == null ? void 0 : f.value))
743
+ /* @__PURE__ */ a("option", { value: "", disabled: !0, hidden: !0, children: r }),
744
+ T(k, (f) => /* @__PURE__ */ a("option", { value: f == null ? void 0 : f.value, children: f == null ? void 0 : f.label }, f == null ? void 0 : f.value))
745
745
  ]
746
746
  }
747
747
  );
@@ -815,26 +815,26 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
815
815
  aiProps: ["label", "placeholder"],
816
816
  i18nProps: ["label", "placeholder"]
817
817
  }, je = (e) => {
818
- const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: a, rows: s, showLabel: c, required: m, defaultValue: k } = e;
818
+ const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: i, rows: s, showLabel: c, required: m, defaultValue: k } = e;
819
819
  return c ? /* @__PURE__ */ b("div", { ...n, ...o, children: [
820
- c && /* @__PURE__ */ i("label", { htmlFor: t, children: l }),
821
- /* @__PURE__ */ i(
820
+ c && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
821
+ /* @__PURE__ */ a(
822
822
  "textarea",
823
823
  {
824
824
  name: t,
825
- ...a,
825
+ ...i,
826
826
  placeholder: r,
827
827
  rows: s,
828
828
  required: m,
829
829
  defaultValue: k
830
830
  }
831
831
  )
832
- ] }) : /* @__PURE__ */ i(
832
+ ] }) : /* @__PURE__ */ a(
833
833
  "textarea",
834
834
  {
835
835
  name: t,
836
836
  ...o,
837
- ...a,
837
+ ...i,
838
838
  ...n,
839
839
  placeholder: r,
840
840
  rows: s,
@@ -905,7 +905,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
905
905
  "Global Block - ",
906
906
  r
907
907
  ] }),
908
- /* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
908
+ /* @__PURE__ */ a("p", { children: "Choose a block from the sidebar to add it to this page." })
909
909
  ]
910
910
  }
911
911
  ) : y.createElement("span", { ...o }, l);
@@ -981,19 +981,19 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
981
981
  canDuplicate: () => !1
982
982
  }, We = (e) => {
983
983
  const { blockProps: o, children: t, styles: l } = e;
984
- return t ? w("table", { ...o, ...l }, t) : /* @__PURE__ */ i(v, {});
984
+ return t ? w("table", { ...o, ...l }, t) : /* @__PURE__ */ a(v, {});
985
985
  }, Qe = (e) => {
986
986
  const { blockProps: o, children: t, styles: l } = e;
987
- return t ? w("thead", { ...o, ...l }, t) : /* @__PURE__ */ i(v, {});
987
+ return t ? w("thead", { ...o, ...l }, t) : /* @__PURE__ */ a(v, {});
988
988
  }, Je = (e) => {
989
989
  const { blockProps: o, children: t, styles: l } = e;
990
- return t ? w("tbody", { ...o, ...l }, t) : /* @__PURE__ */ i(v, {});
990
+ return t ? w("tbody", { ...o, ...l }, t) : /* @__PURE__ */ a(v, {});
991
991
  }, Xe = (e) => {
992
992
  const { blockProps: o, children: t, styles: l } = e;
993
- return t ? w("tr", { ...o, ...l }, t) : /* @__PURE__ */ i(v, {});
993
+ return t ? w("tr", { ...o, ...l }, t) : /* @__PURE__ */ a(v, {});
994
994
  }, Ke = (e) => {
995
995
  const { blockProps: o, children: t, content: l, styles: r } = e;
996
- return !t && C(l) ? /* @__PURE__ */ i(v, {}) : t ? w("td", { ...o, ...r }, t) : w("td", {
996
+ return !t && C(l) ? /* @__PURE__ */ a(v, {}) : t ? w("td", { ...o, ...r }, t) : w("td", {
997
997
  ...o,
998
998
  ...r,
999
999
  dangerouslySetInnerHTML: { __html: l }
@@ -1078,33 +1078,33 @@ p(Ke, {
1078
1078
  aiProps: ["content"]
1079
1079
  });
1080
1080
  function L(e) {
1081
- const o = (n, a) => ({
1081
+ const o = (n, i) => ({
1082
1082
  _id: I(),
1083
1083
  _parent: n,
1084
1084
  _type: "TableCell",
1085
1085
  styles: "#styles:,",
1086
- content: `${e === "TableHead" ? "Table Head" : "Table Cell " + a}`
1086
+ content: `${e === "TableHead" ? "Table Head" : "Table Cell " + i}`
1087
1087
  }), t = (n) => {
1088
- const a = I(), s = {
1088
+ const i = I(), s = {
1089
1089
  _type: "TableRow",
1090
- _id: a,
1090
+ _id: i,
1091
1091
  styles: "#styles:,border-b"
1092
1092
  };
1093
- return n && (s._parent = n), [s, o(a, "1"), o(a, "2"), o(a, "3")];
1093
+ return n && (s._parent = n), [s, o(i, "1"), o(i, "2"), o(i, "3")];
1094
1094
  }, l = (n) => {
1095
- const a = I(), s = {
1096
- _id: a,
1095
+ const i = I(), s = {
1096
+ _id: i,
1097
1097
  _type: "TableHead",
1098
1098
  styles: "#styles:,font-medium"
1099
1099
  };
1100
- return n && (s._parent = n), [s, ...t(a)];
1100
+ return n && (s._parent = n), [s, ...t(i)];
1101
1101
  }, r = (n) => {
1102
- const a = I(), s = {
1103
- _id: a,
1102
+ const i = I(), s = {
1103
+ _id: i,
1104
1104
  _type: "TableBody",
1105
1105
  styles: "#styles:,"
1106
1106
  };
1107
- return n && (s._parent = n), [s, ...t(a), ...t(a)];
1107
+ return n && (s._parent = n), [s, ...t(i), ...t(i)];
1108
1108
  };
1109
1109
  if (e === "Table") {
1110
1110
  const n = I();
@@ -1122,18 +1122,18 @@ function L(e) {
1122
1122
  }
1123
1123
  const $ = (e, ...o) => ({
1124
1124
  ...e,
1125
- className: P(e.className, ...o)
1125
+ className: _(e.className, ...o)
1126
1126
  }), et = (e) => {
1127
- const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: a } = e, s = $(l, "");
1127
+ const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: i } = e, s = $(l, "");
1128
1128
  if (C(t))
1129
- return /* @__PURE__ */ i(v, { inBuilder: n, className: "h-8 w-14" });
1129
+ return /* @__PURE__ */ a(v, { inBuilder: n, className: "h-8 w-14" });
1130
1130
  const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
1131
1131
  return y.createElement("span", {
1132
1132
  ...o,
1133
1133
  ...s,
1134
1134
  style: {
1135
1135
  width: r ? `${r}px` : "auto",
1136
- height: a ? `${a}px` : "auto"
1136
+ height: i ? `${i}px` : "auto"
1137
1137
  },
1138
1138
  dangerouslySetInnerHTML: { __html: c }
1139
1139
  });
@@ -1165,10 +1165,10 @@ const $ = (e, ...o) => ({
1165
1165
  }
1166
1166
  })
1167
1167
  }, ot = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNiIgZmlsbD0iI2Q1ZDdkYSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkltYWdlIFBsYWNlaG9sZGVyPC90ZXh0Pjwvc3ZnPg==", lt = (e) => {
1168
- const { blockProps: o, image: t, mobileImage: l, styles: r, alt: n, height: a, width: s, lazyLoading: c } = e;
1169
- return C(t) ? /* @__PURE__ */ i(v, { className: "h-36" }) : /* @__PURE__ */ b("picture", { children: [
1170
- l && /* @__PURE__ */ i("source", { srcSet: l, media: "(max-width: 480px)" }),
1171
- /* @__PURE__ */ i(
1168
+ const { blockProps: o, image: t, mobileImage: l, styles: r, alt: n, height: i, width: s, lazyLoading: c } = e;
1169
+ return C(t) ? /* @__PURE__ */ a(v, { className: "h-36" }) : /* @__PURE__ */ b("picture", { children: [
1170
+ l && /* @__PURE__ */ a("source", { srcSet: l, media: "(max-width: 480px)" }),
1171
+ /* @__PURE__ */ a(
1172
1172
  "img",
1173
1173
  {
1174
1174
  ...o,
@@ -1177,7 +1177,7 @@ const $ = (e, ...o) => ({
1177
1177
  alt: n,
1178
1178
  loading: c ? "lazy" : "eager",
1179
1179
  width: s,
1180
- height: a
1180
+ height: i
1181
1181
  }
1182
1182
  )
1183
1183
  ] });
@@ -1231,9 +1231,9 @@ const $ = (e, ...o) => ({
1231
1231
  aiProps: ["alt"],
1232
1232
  i18nProps: ["alt", "image", "_imageId", "mobileImage", "_mobileImageId"]
1233
1233
  }, nt = (e) => {
1234
- const { blockProps: o, link: t, children: l, styles: r, inBuilder: n, content: a } = e;
1234
+ const { blockProps: o, link: t, children: l, styles: r, inBuilder: n, content: i } = e;
1235
1235
  let s = {};
1236
- return !l && C(a) && (s = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), n ? l ? /* @__PURE__ */ i("span", { role: "link", ...o, style: s, ...r, children: l }) : w(
1236
+ return !l && C(i) && (s = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), n ? l ? /* @__PURE__ */ a("span", { role: "link", ...o, style: s, ...r, children: l }) : w(
1237
1237
  "span",
1238
1238
  {
1239
1239
  ...o,
@@ -1241,17 +1241,17 @@ const $ = (e, ...o) => ({
1241
1241
  style: s,
1242
1242
  role: "link"
1243
1243
  },
1244
- a
1245
- ) : l ? /* @__PURE__ */ i("a", { "aria-label": a, href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...o, ...r, children: l }) : w(
1244
+ i
1245
+ ) : l ? /* @__PURE__ */ a("a", { "aria-label": i, href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...o, ...r, children: l }) : w(
1246
1246
  "a",
1247
1247
  {
1248
1248
  ...o,
1249
1249
  ...r,
1250
1250
  href: (t == null ? void 0 : t.href) || "#",
1251
1251
  target: (t == null ? void 0 : t.target) || "_self",
1252
- "aria-label": a
1252
+ "aria-label": i
1253
1253
  },
1254
- a
1254
+ i
1255
1255
  );
1256
1256
  }, at = {
1257
1257
  type: "Link",
@@ -1295,12 +1295,8 @@ const $ = (e, ...o) => ({
1295
1295
  i18nProps: ["content"],
1296
1296
  canAcceptBlock: (e) => e !== "Link"
1297
1297
  }, it = (e) => {
1298
- const { blockProps: o, children: t, listType: l, styles: r, tag: n, inBuilder: a } = e, s = P(h(r, "className", ""), l);
1299
- return !t && C(r == null ? void 0 : r.className) ? /* @__PURE__ */ i(v, { inBuilder: a }) : y.createElement(
1300
- n || (l === "list-decimal" ? "ol" : "ul"),
1301
- { ...o, ...r, className: s },
1302
- t
1303
- );
1298
+ const { blockProps: o, children: t, styles: l, tag: r, inBuilder: n } = e;
1299
+ return !t && C(l == null ? void 0 : l.className) ? /* @__PURE__ */ a(v, { inBuilder: n }) : y.createElement(r || "ul", { ...o, ...l }, t);
1304
1300
  }, st = {
1305
1301
  type: "List",
1306
1302
  description: "A list component",
@@ -1310,22 +1306,12 @@ const $ = (e, ...o) => ({
1310
1306
  group: "basic",
1311
1307
  ...d({
1312
1308
  properties: {
1313
- styles: u(""),
1314
- listType: {
1315
- type: "string",
1316
- title: "List Type",
1317
- default: "list-none",
1318
- oneOf: [
1319
- { enum: ["list-none"], title: "List None" },
1320
- { enum: ["list-disc"], title: "Disc" },
1321
- { enum: ["list-decimal"], title: "Decimal" }
1322
- ]
1323
- }
1309
+ styles: u("")
1324
1310
  }
1325
1311
  }),
1326
1312
  canAcceptBlock: (e) => e === "ListItem",
1327
1313
  blocks: [
1328
- { _type: "List", _id: "a", listType: "list-none", styles: "#styles:," },
1314
+ { _type: "List", _id: "a", styles: "#styles:," },
1329
1315
  {
1330
1316
  _type: "ListItem",
1331
1317
  _id: "b",
@@ -1419,7 +1405,7 @@ const $ = (e, ...o) => ({
1419
1405
  "Partial Block - ",
1420
1406
  r
1421
1407
  ] }),
1422
- /* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
1408
+ /* @__PURE__ */ a("p", { children: "Choose a block from the sidebar to add it to this page." })
1423
1409
  ]
1424
1410
  }
1425
1411
  ) : y.createElement("span", { ...o }, l);
@@ -1441,7 +1427,7 @@ const $ = (e, ...o) => ({
1441
1427
  }
1442
1428
  }
1443
1429
  })
1444
- }, B = {
1430
+ }, P = {
1445
1431
  SMALL: {
1446
1432
  1: "col-span-1",
1447
1433
  2: "col-span-2",
@@ -1485,13 +1471,13 @@ const $ = (e, ...o) => ({
1485
1471
  12: "lg:col-span-12"
1486
1472
  }
1487
1473
  }, gt = (e) => {
1488
- const { blockProps: o, children: t, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan: a } = e, c = { className: [
1474
+ const { blockProps: o, children: t, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan: i } = e, c = { className: [
1489
1475
  h(l, "className", ""),
1490
- h(B, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
1491
- n ? h(B, ["MEDIUM", n || r], "") : "",
1492
- a ? h(B, ["LARGE", n || r], "") : ""
1476
+ h(P, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
1477
+ n ? h(P, ["MEDIUM", n || r], "") : "",
1478
+ i ? h(P, ["LARGE", n || r], "") : ""
1493
1479
  ].join(" ") };
1494
- return /* @__PURE__ */ i("div", { ...o, ...l, ...c, children: t || /* @__PURE__ */ i("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
1480
+ return /* @__PURE__ */ a("div", { ...o, ...l, ...c, children: t || /* @__PURE__ */ a("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
1495
1481
  }, ft = {
1496
1482
  type: "Column",
1497
1483
  description: "A column component",
@@ -1529,8 +1515,8 @@ const $ = (e, ...o) => ({
1529
1515
  }
1530
1516
  })
1531
1517
  }, bt = (e) => {
1532
- const { blockProps: o, children: t, styles: l, gutter: r } = e, a = { className: [h(l, "className", ""), " grid grid-cols-12"].join() };
1533
- return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${r}px` : a.style = { gap: `${r}px` }, /* @__PURE__ */ i("div", { ...o, ...l, ...a, children: t });
1518
+ const { blockProps: o, children: t, styles: l, gutter: r } = e, i = { className: [h(l, "className", ""), " grid grid-cols-12"].join() };
1519
+ return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${r}px` : i.style = { gap: `${r}px` }, /* @__PURE__ */ a("div", { ...o, ...l, ...i, children: t });
1534
1520
  }, ht = {
1535
1521
  type: "Row",
1536
1522
  description: "A row component",
@@ -1568,7 +1554,7 @@ const $ = (e, ...o) => ({
1568
1554
  "prose dark:prose-invert prose-p:m-0 prose-p:min-h-[1rem] prose-blockquote:m-2 prose-blockquote:ml-4 prose-ul:m-0 prose-ol:m-0 prose-li:m-0",
1569
1555
  "max-w-full"
1570
1556
  );
1571
- return /* @__PURE__ */ i("div", { ...o, ...r, dangerouslySetInnerHTML: { __html: t } });
1557
+ return /* @__PURE__ */ a("div", { ...o, ...r, dangerouslySetInnerHTML: { __html: t } });
1572
1558
  }, xt = {
1573
1559
  type: "RichText",
1574
1560
  description: "A rich text block",
@@ -1616,7 +1602,7 @@ const $ = (e, ...o) => ({
1616
1602
  aiProps: ["content"],
1617
1603
  i18nProps: ["content"],
1618
1604
  canAcceptBlock: () => !0
1619
- }, vt = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ i("span", { ...e.blockProps, children: e.content }) : `${e.content}`, It = {
1605
+ }, vt = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ a("span", { ...e.blockProps, children: e.content }) : `${e.content}`, It = {
1620
1606
  type: "Text",
1621
1607
  description: "A text component with no styling",
1622
1608
  label: "Text",
@@ -1636,7 +1622,7 @@ const $ = (e, ...o) => ({
1636
1622
  }),
1637
1623
  aiProps: ["content"],
1638
1624
  i18nProps: ["content"]
1639
- }, S = {
1625
+ }, B = {
1640
1626
  type: "object",
1641
1627
  title: "Controls",
1642
1628
  default: {
@@ -1670,41 +1656,41 @@ const $ = (e, ...o) => ({
1670
1656
  }, N = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, R = /(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/, Lt = (e, o) => {
1671
1657
  const t = h(o, "autoplay", !1), l = h(o, "controls", !1), r = h(o, "loop", !1), n = t || h(o, "muted", !0);
1672
1658
  if (N.test(e)) {
1673
- const a = e.match(N);
1674
- if (a) {
1675
- const s = a[4];
1659
+ const i = e.match(N);
1660
+ if (i) {
1661
+ const s = i[4];
1676
1662
  let c = `https://www.youtube.com/embed/${s}`, m = t ? "autoplay=1" : "";
1677
1663
  return m += r ? `&loop=1&playlist=${s}` : "", m += n ? "&mute=1&muted=1" : "", m += l ? "&controls=1" : "&controls=0", `${c}?${m}`;
1678
1664
  }
1679
1665
  }
1680
1666
  if (R.test(e)) {
1681
- const a = e.match(R);
1682
- if (a) {
1683
- const s = a[1];
1667
+ const i = e.match(R);
1668
+ if (i) {
1669
+ const s = i[1];
1684
1670
  let c = "";
1685
1671
  return c += t ? "autoplay=1" : "", c += l ? "&controls=1" : "&controls=0", c += n ? "&muted=1" : "", c += r ? "&loop=1" : "", `https://player.vimeo.com/video/${s}?${c}`;
1686
1672
  }
1687
1673
  }
1688
1674
  return null;
1689
1675
  }, Pt = (e) => {
1690
- const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: a } = e, s = Lt(o, r);
1676
+ const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: i } = e, s = Lt(o, r);
1691
1677
  return /* @__PURE__ */ b("div", { ...se(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
1692
- !s && a ? /* @__PURE__ */ i("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: C(o) ? `Provided ${n} video link in settings Video URL.` : `Provided ${n} video link is invalid.` }) : /* @__PURE__ */ i("iframe", { width: "100%", src: s, ...ce(l, "className") }),
1693
- a && /* @__PURE__ */ i("div", { ...t, className: "absolute top-0 h-full w-full" })
1678
+ !s && i ? /* @__PURE__ */ a("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: C(o) ? `Provided ${n} video link in settings Video URL.` : `Provided ${n} video link is invalid.` }) : /* @__PURE__ */ a("iframe", { width: "100%", src: s, ...ce(l, "className") }),
1679
+ i && /* @__PURE__ */ a("div", { ...t, className: "absolute top-0 h-full w-full" })
1694
1680
  ] });
1695
1681
  }, Bt = (e) => {
1696
- const { url: o, styles: t, controls: l, sources: r, poster: n, blockProps: a } = e;
1682
+ const { url: o, styles: t, controls: l, sources: r, poster: n, blockProps: i } = e;
1697
1683
  let s = n;
1698
1684
  const c = [...h(r, "srcsets", []) || []];
1699
1685
  o && typeof o == "string" && c.push({ url: o, width: "9999" });
1700
1686
  const m = c.sort((g, x) => parseInt(g.width) - parseInt(x.width)).filter((g) => !C(g.url) && !C(g.width));
1701
1687
  m.length === 0 && !s && (s = "https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");
1702
1688
  const k = h(l, "autoplay", !1) || h(l, "muted", !0);
1703
- return (s || !C(m)) && /* @__PURE__ */ i("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: /* @__PURE__ */ w(
1689
+ return (s || !C(m)) && /* @__PURE__ */ a("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: /* @__PURE__ */ w(
1704
1690
  "video",
1705
1691
  {
1706
1692
  ...t,
1707
- ...a,
1693
+ ...i,
1708
1694
  key: JSON.stringify(m),
1709
1695
  controls: h(l, "controls", !1),
1710
1696
  autoPlay: h(l, "autoplay", !1),
@@ -1715,13 +1701,13 @@ const $ = (e, ...o) => ({
1715
1701
  m.map((g) => {
1716
1702
  if (!g.url || g.url.length < 4 || isNaN(g.width)) return null;
1717
1703
  const x = `(max-width: ${g.width}px)`;
1718
- return /* @__PURE__ */ i("source", { src: g.url, media: x, type: g.type }, g.url);
1704
+ return /* @__PURE__ */ a("source", { src: g.url, media: x, type: g.type }, g.url);
1719
1705
  }),
1720
1706
  "Your browser does not support the video tag."
1721
1707
  ) });
1722
1708
  }, St = (e) => {
1723
1709
  const { videoSource: o } = e;
1724
- return o === "Custom" ? /* @__PURE__ */ i(Bt, { ...e }) : o === "Youtube" || o === "Vimeo" ? /* @__PURE__ */ i(Pt, { ...e }) : /* @__PURE__ */ b("div", { children: [
1710
+ return o === "Custom" ? /* @__PURE__ */ a(Bt, { ...e }) : o === "Youtube" || o === "Vimeo" ? /* @__PURE__ */ a(Pt, { ...e }) : /* @__PURE__ */ b("div", { children: [
1725
1711
  "Invalid video source : ",
1726
1712
  o
1727
1713
  ] });
@@ -1764,7 +1750,7 @@ const $ = (e, ...o) => ({
1764
1750
  type: "object",
1765
1751
  default: { srcsets: [] }
1766
1752
  },
1767
- controls: { ...S }
1753
+ controls: { ...B }
1768
1754
  }
1769
1755
  }
1770
1756
  },
@@ -1781,7 +1767,7 @@ const $ = (e, ...o) => ({
1781
1767
  title: "Youtube Video URL",
1782
1768
  default: ""
1783
1769
  },
1784
- controls: { ...S }
1770
+ controls: { ...B }
1785
1771
  }
1786
1772
  }
1787
1773
  },
@@ -1798,7 +1784,7 @@ const $ = (e, ...o) => ({
1798
1784
  title: "Vimeo Video URL",
1799
1785
  default: ""
1800
1786
  },
1801
- controls: { ...S }
1787
+ controls: { ...B }
1802
1788
  }
1803
1789
  }
1804
1790
  }
@@ -1811,17 +1797,17 @@ const $ = (e, ...o) => ({
1811
1797
  }),
1812
1798
  i18nProps: ["url"]
1813
1799
  }, Tt = (e) => {
1814
- const { children: o, tag: t, styles: l, blockProps: r, inBuilder: n, $loading: a } = e;
1800
+ const { children: o, tag: t, styles: l, blockProps: r, inBuilder: n, $loading: i } = e;
1815
1801
  let s = o;
1816
- return C(s) && n && (s = /* @__PURE__ */ i("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground", children: "Choose a collection to display items" })), t === "none" ? a && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */ b("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
1817
- /* @__PURE__ */ i("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
1818
- /* @__PURE__ */ i("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
1802
+ return C(s) && n && (s = /* @__PURE__ */ a("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground", children: "Choose a collection to display items" })), t === "none" ? i && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */ b("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
1803
+ /* @__PURE__ */ a("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
1804
+ /* @__PURE__ */ a("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
1819
1805
  ] }, m)) : s : y.createElement(
1820
1806
  t,
1821
1807
  { ...r, ...l },
1822
- a && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */ b("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
1823
- /* @__PURE__ */ i("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
1824
- /* @__PURE__ */ i("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
1808
+ i && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */ b("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
1809
+ /* @__PURE__ */ a("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
1810
+ /* @__PURE__ */ a("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
1825
1811
  ] }, m)) : s
1826
1812
  );
1827
1813
  }, Nt = {
@@ -1846,7 +1832,7 @@ const $ = (e, ...o) => ({
1846
1832
  ],
1847
1833
  ...d({
1848
1834
  properties: {
1849
- styles: _("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),
1835
+ styles: S("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),
1850
1836
  repeaterItems: {
1851
1837
  title: "Collection",
1852
1838
  type: "string",
@@ -1903,7 +1889,7 @@ const $ = (e, ...o) => ({
1903
1889
  return !e && r ? y.createElement(
1904
1890
  n,
1905
1891
  { ...o, ...t },
1906
- /* @__PURE__ */ i("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground", children: "Add children to repeater item" })
1892
+ /* @__PURE__ */ a("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground", children: "Add children to repeater item" })
1907
1893
  ) : y.createElement(n, { ...o, ...t }, e);
1908
1894
  }, At = {
1909
1895
  type: "RepeaterItem",
@@ -1913,7 +1899,7 @@ const $ = (e, ...o) => ({
1913
1899
  group: "basic",
1914
1900
  ...d({
1915
1901
  properties: {
1916
- styles: _(""),
1902
+ styles: S(""),
1917
1903
  parentTag: z("Repeater", "tag")
1918
1904
  }
1919
1905
  }),
@@ -1931,7 +1917,7 @@ const $ = (e, ...o) => ({
1931
1917
  hidden: !0,
1932
1918
  group: "basic",
1933
1919
  ...d({
1934
- properties: { styles: _("p-5 flex items-center justify-center") }
1920
+ properties: { styles: S("p-5 flex items-center justify-center") }
1935
1921
  }),
1936
1922
  canAcceptBlock: () => !0,
1937
1923
  canDelete: () => !1,