@chaibuilder/sdk 2.2.18 → 2.2.19

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,12 +1,12 @@
1
- import { registerChaiBlockSchema as u, StylesProp as p, registerChaiBlock as d, stylesProp as T, closestBlockProp as H } from "@chaibuilder/runtime";
1
+ import { registerChaiBlockSchema as d, StylesProp as u, registerChaiBlock as p, stylesProp as P, closestBlockProp as H } from "@chaibuilder/runtime";
2
2
  import { jsx as s, jsxs as h, Fragment as N } from "react/jsx-runtime";
3
- import { c as x, g as C } from "./common-functions-BGzDsf1z.js";
3
+ import { c as B, g as C } from "./common-functions-BGzDsf1z.js";
4
4
  import * as b from "react";
5
5
  import { createElement as w } from "react";
6
- import { ButtonIcon as R, CopyIcon as z, CodeIcon as V, DividerHorizontalIcon as D, CheckboxIcon as j, InputIcon as M, LetterCaseToggleIcon as q, RadiobuttonIcon as F, DropdownMenuIcon as U, HeadingIcon as G, TableIcon as O, BorderTopIcon as Y, BorderAllIcon as W, ViewHorizontalIcon as X, DragHandleHorizontalIcon as J, SketchLogoIcon as Q, ImageIcon as Z, Link1Icon as K, RowsIcon as ee, ColumnsIcon as te, TextIcon as oe, CursorTextIcon as le, SpaceBetweenVerticallyIcon as re, VideoIcon as ne, LoopIcon as $ } from "@radix-ui/react-icons";
7
- import { isEmpty as v, get as f, map as P, isNull as ie, omit as se, pick as ae } from "lodash-es";
8
- import { FileCode as ce, GroupIcon as pe, GlobeIcon as E, Columns as de, Rows as ue } from "lucide-react";
9
- const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div", { className: x("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ s("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ s("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) => {
6
+ import { ButtonIcon as R, CopyIcon as z, CodeIcon as D, DividerHorizontalIcon as j, CheckboxIcon as V, InputIcon as M, LetterCaseToggleIcon as q, RadiobuttonIcon as F, DropdownMenuIcon as U, HeadingIcon as G, TableIcon as O, BorderTopIcon as Y, BorderAllIcon as W, ViewHorizontalIcon as X, DragHandleHorizontalIcon as J, SketchLogoIcon as Q, ImageIcon as Z, Link1Icon as K, RowsIcon as ee, ColumnsIcon as te, TextIcon as oe, CursorTextIcon as le, SpaceBetweenVerticallyIcon as re, VideoIcon as ne, LoopIcon as E } from "@radix-ui/react-icons";
7
+ import { isEmpty as v, get as f, map as S, isNull as ie, omit as se, pick as ae } from "lodash-es";
8
+ import { FileCode as ce, GroupIcon as pe, GlobeIcon as $, Columns as ue, Rows as de } from "lucide-react";
9
+ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div", { className: B("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ s("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ s("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
10
  const { blockProps: o, inBuilder: t, backgroundImage: l, children: r, tag: n = "div", styles: i } = e;
11
11
  let a = r;
12
12
  r || (a = /* @__PURE__ */ s(I, { inBuilder: t }));
@@ -18,9 +18,9 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
18
18
  label: "Box",
19
19
  category: "core",
20
20
  group: "basic",
21
- ...u({
21
+ ...d({
22
22
  properties: {
23
- styles: p(""),
23
+ styles: u(""),
24
24
  backgroundImage: {
25
25
  type: "string",
26
26
  default: "",
@@ -83,9 +83,9 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
83
83
  category: "core",
84
84
  icon: R,
85
85
  group: "basic",
86
- ...u({
86
+ ...d({
87
87
  properties: {
88
- styles: p("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),
88
+ styles: u("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),
89
89
  content: {
90
90
  type: "string",
91
91
  title: "Button label",
@@ -150,9 +150,9 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
150
150
  category: "core",
151
151
  icon: z,
152
152
  group: "basic",
153
- ...u({
153
+ ...d({
154
154
  properties: {
155
- styles: p("p-2 rounded-md flex items-center"),
155
+ styles: u("p-2 rounded-md flex items-center"),
156
156
  content: {
157
157
  type: "string",
158
158
  title: "Button label",
@@ -191,11 +191,11 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
191
191
  description: "similar to a div or section elements in HTML",
192
192
  label: "Custom HTML",
193
193
  category: "core",
194
- icon: V,
194
+ icon: D,
195
195
  group: "advanced",
196
- ...u({
196
+ ...d({
197
197
  properties: {
198
- styles: p(""),
198
+ styles: u(""),
199
199
  htmlCode: {
200
200
  type: "string",
201
201
  default: "<div><p>Enter your HTML code here...</p></div>",
@@ -205,7 +205,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
205
205
  })
206
206
  }, Ce = (e) => {
207
207
  const { scripts: o, inBuilder: t, blockProps: l } = e;
208
- return t ? /* @__PURE__ */ s("div", { ...l, children: /* @__PURE__ */ s("div", { className: x("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ s("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ s("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__ */ s("div", { dangerouslySetInnerHTML: { __html: o } });
208
+ return t ? /* @__PURE__ */ s("div", { ...l, children: /* @__PURE__ */ s("div", { className: B("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ s("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ s("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__ */ s("div", { dangerouslySetInnerHTML: { __html: o } });
209
209
  }, ve = {
210
210
  type: "CustomScript",
211
211
  description: "similar to a script element in HTML",
@@ -213,7 +213,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
213
213
  category: "core",
214
214
  icon: ce,
215
215
  group: "advanced",
216
- ...u({
216
+ ...d({
217
217
  properties: {
218
218
  scripts: {
219
219
  type: "string",
@@ -227,19 +227,19 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
227
227
  }, Ie = (e) => {
228
228
  const { blockProps: o, styles: t } = e;
229
229
  return w("hr", { ...t, ...o });
230
- }, Be = {
230
+ }, xe = {
231
231
  type: "Divider",
232
232
  description: "A horizontal line component",
233
233
  label: "Divider",
234
234
  category: "core",
235
- icon: D,
235
+ icon: j,
236
236
  group: "basic",
237
- ...u({
237
+ ...d({
238
238
  properties: {
239
- styles: p("bg-gray-900 h-0.5 py-2 my-1")
239
+ styles: u("bg-gray-900 h-0.5 py-2 my-1")
240
240
  }
241
241
  })
242
- }, xe = (e) => {
242
+ }, Be = (e) => {
243
243
  const { blockProps: o, styles: t, backgroundImage: l } = e;
244
244
  let r = {};
245
245
  return l && (r = { backgroundImage: `url(${l})` }), b.createElement("div", { ...o, ...t, style: r });
@@ -249,9 +249,9 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
249
249
  label: "Empty Box",
250
250
  category: "core",
251
251
  group: "basic",
252
- ...u({
252
+ ...d({
253
253
  properties: {
254
- styles: p(""),
254
+ styles: u(""),
255
255
  backgroundImage: {
256
256
  type: "string",
257
257
  title: "Background Image",
@@ -287,16 +287,16 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
287
287
  name: t
288
288
  }
289
289
  );
290
- }, _e = {
290
+ }, Se = {
291
291
  type: "Checkbox",
292
292
  label: "web_blocks.checkbox",
293
293
  category: "core",
294
- icon: j,
294
+ icon: V,
295
295
  group: "form",
296
- ...u({
296
+ ...d({
297
297
  properties: {
298
- styles: p("flex items-center gap-x-2"),
299
- inputStyles: p(""),
298
+ styles: u("flex items-center gap-x-2"),
299
+ inputStyles: u(""),
300
300
  fieldName: {
301
301
  type: "string",
302
302
  title: "Field Name",
@@ -326,7 +326,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
326
326
  }),
327
327
  aiProps: ["label"],
328
328
  i18nProps: ["label"]
329
- }, Se = (e) => {
329
+ }, _e = (e) => {
330
330
  const { children: o, blockProps: t, errorMessage: l, successMessage: r, action: n, styles: i, inBuilder: a } = e;
331
331
  let c = o;
332
332
  return o || (c = /* @__PURE__ */ s(I, { inBuilder: a })), /* @__PURE__ */ h(
@@ -367,9 +367,9 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
367
367
  styles: "#styles:bg-black text-white rounded px-3 py-1,"
368
368
  }
369
369
  ],
370
- ...u({
370
+ ...d({
371
371
  properties: {
372
- styles: p(""),
372
+ styles: u(""),
373
373
  action: {
374
374
  type: "string",
375
375
  title: "Submit URL",
@@ -425,12 +425,12 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
425
425
  category: "core",
426
426
  icon: R,
427
427
  group: "form",
428
- ...u({
428
+ ...d({
429
429
  properties: {
430
- styles: p(
430
+ styles: u(
431
431
  "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
432
432
  ),
433
- inputStyles: p(""),
433
+ inputStyles: u(""),
434
434
  label: {
435
435
  type: "string",
436
436
  title: "Label",
@@ -500,16 +500,16 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
500
500
  autoComplete: k ? "on" : "off"
501
501
  }
502
502
  );
503
- }, $e = {
503
+ }, Ee = {
504
504
  type: "Input",
505
505
  label: "web_blocks.input",
506
506
  category: "core",
507
507
  icon: M,
508
508
  group: "form",
509
- ...u({
509
+ ...d({
510
510
  properties: {
511
- styles: p(""),
512
- inputStyles: p("w-full p-1"),
511
+ styles: u(""),
512
+ inputStyles: u("w-full p-1"),
513
513
  fieldName: {
514
514
  type: "string",
515
515
  title: "Field Name",
@@ -536,7 +536,20 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
536
536
  type: "string",
537
537
  title: "Input Type",
538
538
  default: "text",
539
- enum: ["text", "email", "password", "number", "tel", "hidden", "range", "color", "date", "time"]
539
+ enum: [
540
+ "text",
541
+ "email",
542
+ "password",
543
+ "number",
544
+ "tel",
545
+ "hidden",
546
+ "range",
547
+ "color",
548
+ "date",
549
+ "time",
550
+ "name",
551
+ "postal-code"
552
+ ]
540
553
  },
541
554
  required: {
542
555
  type: "boolean",
@@ -552,7 +565,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
552
565
  }),
553
566
  aiProps: ["label", "placeholder"],
554
567
  i18nProps: ["label", "placeholder"]
555
- }, Ee = (e) => {
568
+ }, $e = (e) => {
556
569
  const { blockProps: o, content: t, styles: l, children: r } = e, n = { ...l, ...o };
557
570
  return r ? b.createElement("label", n, r) : b.createElement("label", {
558
571
  ...n,
@@ -564,9 +577,9 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
564
577
  category: "core",
565
578
  icon: q,
566
579
  group: "form",
567
- ...u({
580
+ ...d({
568
581
  properties: {
569
- styles: p(),
582
+ styles: u(),
570
583
  content: {
571
584
  type: "string",
572
585
  title: "Content",
@@ -600,10 +613,10 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
600
613
  category: "core",
601
614
  icon: F,
602
615
  group: "form",
603
- ...u({
616
+ ...d({
604
617
  properties: {
605
- styles: p("flex items-center gap-x-2"),
606
- inputStyles: p(""),
618
+ styles: u("flex items-center gap-x-2"),
619
+ inputStyles: u(""),
607
620
  fieldName: {
608
621
  type: "string",
609
622
  title: "Field Name",
@@ -633,28 +646,28 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
633
646
  }),
634
647
  aiProps: ["label"],
635
648
  i18nProps: ["label"]
636
- }, Ve = (e) => {
649
+ }, De = (e) => {
637
650
  const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: i, required: a, showLabel: c, _multiple: y, options: k } = e, g = C();
638
651
  return c ? /* @__PURE__ */ h("div", { ...n, ...o, children: [
639
652
  c && /* @__PURE__ */ s("label", { htmlFor: g, children: l }),
640
653
  /* @__PURE__ */ h("select", { ...i, id: g, required: a, multiple: y, name: t, children: [
641
654
  /* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
642
- P(k, (m) => /* @__PURE__ */ s("option", { value: m == null ? void 0 : m.value, children: m == null ? void 0 : m.label }, m == null ? void 0 : m.value))
655
+ S(k, (m) => /* @__PURE__ */ s("option", { value: m == null ? void 0 : m.value, children: m == null ? void 0 : m.label }, m == null ? void 0 : m.value))
643
656
  ] })
644
657
  ] }) : /* @__PURE__ */ h("select", { id: g, ...n, ...o, required: a, multiple: y, name: t, children: [
645
658
  /* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
646
- P(k, (m) => /* @__PURE__ */ s("option", { value: m == null ? void 0 : m.value, children: m == null ? void 0 : m.label }, m == null ? void 0 : m.value))
659
+ S(k, (m) => /* @__PURE__ */ s("option", { value: m == null ? void 0 : m.value, children: m == null ? void 0 : m.label }, m == null ? void 0 : m.value))
647
660
  ] });
648
- }, De = {
661
+ }, je = {
649
662
  type: "Select",
650
663
  label: "web_blocks.select",
651
664
  category: "core",
652
665
  icon: U,
653
666
  group: "form",
654
- ...u({
667
+ ...d({
655
668
  properties: {
656
- styles: p(""),
657
- inputStyles: p("w-full p-1"),
669
+ styles: u(""),
670
+ inputStyles: u("w-full p-1"),
658
671
  fieldName: {
659
672
  type: "string",
660
673
  title: "Field Name",
@@ -709,7 +722,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
709
722
  }),
710
723
  aiProps: ["label", "placeholder"],
711
724
  i18nProps: ["label", "placeholder"]
712
- }, je = (e) => {
725
+ }, Ve = (e) => {
713
726
  const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: i, rows: a, showLabel: c, required: y } = e, k = C();
714
727
  return c ? /* @__PURE__ */ h("div", { ...n, ...o, children: [
715
728
  c && /* @__PURE__ */ s("label", { htmlFor: k, children: l }),
@@ -743,15 +756,15 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
743
756
  category: "core",
744
757
  icon: M,
745
758
  group: "form",
746
- ...u({
759
+ ...d({
747
760
  properties: {
748
761
  fieldName: {
749
762
  type: "string",
750
763
  title: "Field Name",
751
764
  default: "fieldName"
752
765
  },
753
- styles: p(""),
754
- inputStyles: p("w-full p-1"),
766
+ styles: u(""),
767
+ inputStyles: u("w-full p-1"),
755
768
  showLabel: {
756
769
  type: "boolean",
757
770
  title: "Show Label",
@@ -802,11 +815,11 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
802
815
  type: "GlobalBlock",
803
816
  description: "A global block component",
804
817
  label: "Global Block",
805
- icon: E,
818
+ icon: $,
806
819
  category: "core",
807
820
  group: "basic",
808
821
  hidden: !0,
809
- ...u({
822
+ ...d({
810
823
  properties: {
811
824
  globalBlock: {
812
825
  type: "string",
@@ -830,7 +843,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
830
843
  category: "core",
831
844
  icon: G,
832
845
  group: "typography",
833
- ...u({
846
+ ...d({
834
847
  properties: {
835
848
  tag: {
836
849
  type: "string",
@@ -838,7 +851,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
838
851
  title: "Level",
839
852
  enum: ["h1", "h2", "h3", "h4", "h5", "h6"]
840
853
  },
841
- styles: p("text-3xl"),
854
+ styles: u("text-3xl"),
842
855
  content: {
843
856
  type: "string",
844
857
  default: "Heading goes here",
@@ -859,9 +872,9 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
859
872
  category: "core",
860
873
  group: "basic",
861
874
  hidden: !0,
862
- ...u({
875
+ ...d({
863
876
  properties: {
864
- styles: p("")
877
+ styles: u("")
865
878
  }
866
879
  }),
867
880
  canAcceptBlock: () => !0,
@@ -888,72 +901,72 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
888
901
  dangerouslySetInnerHTML: { __html: l }
889
902
  });
890
903
  };
891
- d(Xe, {
904
+ p(Xe, {
892
905
  type: "Table",
893
906
  label: "Table",
894
907
  category: "core",
895
908
  group: "table",
896
909
  hidden: !0,
897
910
  icon: O,
898
- ...u({
911
+ ...d({
899
912
  properties: {
900
- styles: p("")
913
+ styles: u("")
901
914
  }
902
915
  }),
903
- blocks: B("Table")
916
+ blocks: x("Table")
904
917
  });
905
- d(Je, {
918
+ p(Je, {
906
919
  type: "TableHead",
907
920
  label: "Table Head",
908
921
  category: "core",
909
922
  group: "table",
910
923
  hidden: !0,
911
924
  icon: Y,
912
- ...u({
925
+ ...d({
913
926
  properties: {
914
- styles: p("")
927
+ styles: u("")
915
928
  }
916
929
  }),
917
- blocks: B("TableHead")
930
+ blocks: x("TableHead")
918
931
  });
919
- d(Qe, {
932
+ p(Qe, {
920
933
  type: "TableBody",
921
934
  label: "Table Body",
922
935
  category: "core",
923
936
  group: "table",
924
937
  hidden: !0,
925
938
  icon: W,
926
- ...u({
939
+ ...d({
927
940
  properties: {
928
- styles: p("")
941
+ styles: u("")
929
942
  }
930
943
  }),
931
- blocks: B("TableBody")
944
+ blocks: x("TableBody")
932
945
  });
933
- d(Ze, {
946
+ p(Ze, {
934
947
  type: "TableRow",
935
948
  label: "Table Row",
936
949
  category: "core",
937
950
  group: "table",
938
951
  hidden: !0,
939
952
  icon: X,
940
- ...u({
953
+ ...d({
941
954
  properties: {
942
- styles: p("")
955
+ styles: u("")
943
956
  }
944
957
  }),
945
- blocks: B("TableRow")
958
+ blocks: x("TableRow")
946
959
  });
947
- d(Ke, {
960
+ p(Ke, {
948
961
  type: "TableCell",
949
962
  label: "Table Cell",
950
963
  category: "core",
951
964
  group: "table",
952
965
  hidden: !0,
953
966
  icon: J,
954
- ...u({
967
+ ...d({
955
968
  properties: {
956
- styles: p(""),
969
+ styles: u(""),
957
970
  content: {
958
971
  type: "string",
959
972
  default: "Heading goes here",
@@ -962,11 +975,11 @@ d(Ke, {
962
975
  }
963
976
  }
964
977
  }),
965
- blocks: B("TableCell"),
978
+ blocks: x("TableCell"),
966
979
  i18nProps: ["content"],
967
980
  aiProps: ["content"]
968
981
  });
969
- function B(e) {
982
+ function x(e) {
970
983
  const o = (n, i) => ({
971
984
  _id: C(),
972
985
  _parent: n,
@@ -1011,7 +1024,7 @@ function B(e) {
1011
1024
  }
1012
1025
  const A = (e, ...o) => ({
1013
1026
  ...e,
1014
- className: x(e.className, ...o)
1027
+ className: B(e.className, ...o)
1015
1028
  }), et = (e) => {
1016
1029
  const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: i } = e, a = A(l, "");
1017
1030
  if (v(t))
@@ -1032,9 +1045,9 @@ const A = (e, ...o) => ({
1032
1045
  category: "core",
1033
1046
  icon: Q,
1034
1047
  group: "media",
1035
- ...u({
1048
+ ...d({
1036
1049
  properties: {
1037
- styles: p(""),
1050
+ styles: u(""),
1038
1051
  icon: {
1039
1052
  type: "string",
1040
1053
  title: "Icon",
@@ -1077,9 +1090,9 @@ const A = (e, ...o) => ({
1077
1090
  category: "core",
1078
1091
  icon: Z,
1079
1092
  group: "media",
1080
- ...u({
1093
+ ...d({
1081
1094
  properties: {
1082
- styles: p(""),
1095
+ styles: u(""),
1083
1096
  image: {
1084
1097
  type: "string",
1085
1098
  title: "Image",
@@ -1154,9 +1167,9 @@ const A = (e, ...o) => ({
1154
1167
  category: "core",
1155
1168
  icon: K,
1156
1169
  group: "basic",
1157
- ...u({
1170
+ ...d({
1158
1171
  properties: {
1159
- styles: p(""),
1172
+ styles: u(""),
1160
1173
  content: {
1161
1174
  type: "string",
1162
1175
  default: "Link goes here",
@@ -1184,7 +1197,7 @@ const A = (e, ...o) => ({
1184
1197
  i18nProps: ["content"],
1185
1198
  canAcceptBlock: (e) => e !== "Link"
1186
1199
  }, it = (e) => {
1187
- const { blockProps: o, children: t, listType: l, styles: r, tag: n, inBuilder: i } = e, a = x(f(r, "className", ""), l);
1200
+ const { blockProps: o, children: t, listType: l, styles: r, tag: n, inBuilder: i } = e, a = B(f(r, "className", ""), l);
1188
1201
  return !t && v(r == null ? void 0 : r.className) ? /* @__PURE__ */ s(I, { inBuilder: i }) : b.createElement(
1189
1202
  n || (l === "list-decimal" ? "ol" : "ul"),
1190
1203
  { ...o, ...r, className: a },
@@ -1197,9 +1210,9 @@ const A = (e, ...o) => ({
1197
1210
  icon: ee,
1198
1211
  category: "core",
1199
1212
  group: "basic",
1200
- ...u({
1213
+ ...d({
1201
1214
  properties: {
1202
- styles: p(""),
1215
+ styles: u(""),
1203
1216
  listType: {
1204
1217
  type: "string",
1205
1218
  title: "List Type",
@@ -1251,9 +1264,9 @@ const A = (e, ...o) => ({
1251
1264
  icon: te,
1252
1265
  category: "core",
1253
1266
  group: "basic",
1254
- ...u({
1267
+ ...d({
1255
1268
  properties: {
1256
- styles: p(""),
1269
+ styles: u(""),
1257
1270
  content: {
1258
1271
  type: "string",
1259
1272
  default: "List item",
@@ -1275,16 +1288,16 @@ const A = (e, ...o) => ({
1275
1288
  ...o,
1276
1289
  dangerouslySetInnerHTML: { __html: l }
1277
1290
  }) : b.createElement("p", { ...t, ...o }, e.children);
1278
- }, dt = {
1291
+ }, ut = {
1279
1292
  type: "Paragraph",
1280
1293
  description: "A paragraph component",
1281
1294
  label: "Paragraph",
1282
1295
  category: "core",
1283
1296
  icon: oe,
1284
1297
  group: "typography",
1285
- ...u({
1298
+ ...d({
1286
1299
  properties: {
1287
- styles: p(""),
1300
+ styles: u(""),
1288
1301
  content: {
1289
1302
  type: "string",
1290
1303
  title: "Content",
@@ -1298,7 +1311,7 @@ const A = (e, ...o) => ({
1298
1311
  i18nProps: ["content"],
1299
1312
  aiProps: ["content"],
1300
1313
  canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
1301
- }, ut = (e) => {
1314
+ }, dt = (e) => {
1302
1315
  const { blockProps: o, inBuilder: t, children: l, partialBlockId: r } = e;
1303
1316
  return t && !r ? /* @__PURE__ */ h(
1304
1317
  "div",
@@ -1318,11 +1331,11 @@ const A = (e, ...o) => ({
1318
1331
  type: "PartialBlock",
1319
1332
  description: "A partial block component",
1320
1333
  label: "Partial Block",
1321
- icon: E,
1334
+ icon: $,
1322
1335
  category: "core",
1323
1336
  group: "basic",
1324
1337
  hidden: !0,
1325
- ...u({
1338
+ ...d({
1326
1339
  properties: {
1327
1340
  partialBlockId: {
1328
1341
  type: "string",
@@ -1389,14 +1402,14 @@ const A = (e, ...o) => ({
1389
1402
  label: "Column",
1390
1403
  group: "basic",
1391
1404
  category: "core",
1392
- icon: de,
1405
+ icon: ue,
1393
1406
  wrapper: !0,
1394
1407
  canDelete: () => !0,
1395
1408
  canAcceptBlock: () => !0,
1396
1409
  canBeNested: (e) => e === "Row",
1397
- ...u({
1410
+ ...d({
1398
1411
  properties: {
1399
- styles: p(""),
1412
+ styles: u(""),
1400
1413
  colSpan: {
1401
1414
  type: "number",
1402
1415
  title: "Column Span",
@@ -1427,7 +1440,7 @@ const A = (e, ...o) => ({
1427
1440
  description: "A row component",
1428
1441
  label: "Row",
1429
1442
  group: "basic",
1430
- icon: ue,
1443
+ icon: de,
1431
1444
  blocks: () => [
1432
1445
  { _type: "Row", _id: "row", styles: "#styles:,p-1" },
1433
1446
  { _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
@@ -1436,9 +1449,9 @@ const A = (e, ...o) => ({
1436
1449
  category: "core",
1437
1450
  wrapper: !0,
1438
1451
  canAcceptBlock: (e) => e === "Column",
1439
- ...u({
1452
+ ...d({
1440
1453
  properties: {
1441
- styles: p(""),
1454
+ styles: u(""),
1442
1455
  colCount: {
1443
1456
  type: "number",
1444
1457
  default: 2,
@@ -1467,9 +1480,9 @@ const A = (e, ...o) => ({
1467
1480
  category: "core",
1468
1481
  icon: le,
1469
1482
  group: "typography",
1470
- ...u({
1483
+ ...d({
1471
1484
  properties: {
1472
- styles: p(""),
1485
+ styles: u(""),
1473
1486
  content: {
1474
1487
  type: "string",
1475
1488
  title: "Content",
@@ -1493,9 +1506,9 @@ const A = (e, ...o) => ({
1493
1506
  label: "Span",
1494
1507
  category: "core",
1495
1508
  group: "typography",
1496
- ...u({
1509
+ ...d({
1497
1510
  properties: {
1498
- styles: p(""),
1511
+ styles: u(""),
1499
1512
  content: {
1500
1513
  type: "string",
1501
1514
  title: "Content",
@@ -1515,9 +1528,9 @@ const A = (e, ...o) => ({
1515
1528
  category: "core",
1516
1529
  group: "typography",
1517
1530
  icon: re,
1518
- ...u({
1531
+ ...d({
1519
1532
  properties: {
1520
- styles: p("text-black"),
1533
+ styles: u("text-black"),
1521
1534
  content: {
1522
1535
  title: "Content",
1523
1536
  type: "string",
@@ -1527,7 +1540,7 @@ const A = (e, ...o) => ({
1527
1540
  }),
1528
1541
  aiProps: ["content"],
1529
1542
  i18nProps: ["content"]
1530
- }, Bt = {
1543
+ }, xt = {
1531
1544
  type: "object",
1532
1545
  title: "Controls",
1533
1546
  default: {
@@ -1558,7 +1571,7 @@ const A = (e, ...o) => ({
1558
1571
  default: !1
1559
1572
  }
1560
1573
  }
1561
- }, _ = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, S = /(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/, xt = (e, o) => {
1574
+ }, _ = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, T = /(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/, Bt = (e, o) => {
1562
1575
  const t = f(o, "autoplay", !1), l = f(o, "controls", !1), r = f(o, "loop", !1), n = t || f(o, "muted", !0);
1563
1576
  if (_.test(e)) {
1564
1577
  const i = e.match(_);
@@ -1568,8 +1581,8 @@ const A = (e, ...o) => ({
1568
1581
  return y += r ? `&loop=1&playlist=${a}` : "", y += n ? "&mute=1&muted=1" : "", y += l ? "&controls=1" : "&controls=0", `${c}?${y}`;
1569
1582
  }
1570
1583
  }
1571
- if (S.test(e)) {
1572
- const i = e.match(S);
1584
+ if (T.test(e)) {
1585
+ const i = e.match(T);
1573
1586
  if (i) {
1574
1587
  const a = i[1];
1575
1588
  let c = "";
@@ -1578,7 +1591,7 @@ const A = (e, ...o) => ({
1578
1591
  }
1579
1592
  return null;
1580
1593
  }, Lt = (e) => {
1581
- const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: i } = e, a = xt(o, r);
1594
+ const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: i } = e, a = Bt(o, r);
1582
1595
  return /* @__PURE__ */ h("div", { ...se(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
1583
1596
  !a && i ? /* @__PURE__ */ s("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: v(o) ? `Provided ${n} video link in settings Video URL.` : `Provided ${n} video link is invalid.` }) : /* @__PURE__ */ s("iframe", { width: "100%", src: a, ...ae(l, "className") }),
1584
1597
  i && /* @__PURE__ */ s("div", { ...t, className: "absolute top-0 h-full w-full" })
@@ -1610,21 +1623,21 @@ const A = (e, ...o) => ({
1610
1623
  }),
1611
1624
  "Your browser does not support the video tag."
1612
1625
  ) });
1613
- }, _t = (e) => {
1626
+ }, St = (e) => {
1614
1627
  const { videoSource: o } = e;
1615
1628
  return o === "Custom" ? /* @__PURE__ */ s(Pt, { ...e }) : o === "Youtube" || o === "Vimeo" ? /* @__PURE__ */ s(Lt, { ...e }) : /* @__PURE__ */ h("div", { children: [
1616
1629
  "Invalid video source : ",
1617
1630
  o
1618
1631
  ] });
1619
- }, St = {
1632
+ }, _t = {
1620
1633
  type: "Video",
1621
1634
  label: "Video",
1622
1635
  category: "core",
1623
1636
  icon: ne,
1624
1637
  group: "media",
1625
- ...u({
1638
+ ...d({
1626
1639
  properties: {
1627
- styles: p("absolute h-full w-full object-cover"),
1640
+ styles: u("absolute h-full w-full object-cover"),
1628
1641
  videoSource: {
1629
1642
  type: "string",
1630
1643
  default: "Custom",
@@ -1655,7 +1668,7 @@ const A = (e, ...o) => ({
1655
1668
  type: "object",
1656
1669
  default: { srcsets: [] }
1657
1670
  },
1658
- controls: { ...Bt }
1671
+ controls: { ...xt }
1659
1672
  }
1660
1673
  }
1661
1674
  },
@@ -1699,22 +1712,37 @@ const A = (e, ...o) => ({
1699
1712
  }
1700
1713
  }),
1701
1714
  i18nProps: ["url"]
1702
- }, Tt = ({ children: e, tag: o, blockProps: t, styles: l }) => b.createElement(o, { ...t, ...l }, e), Nt = {
1715
+ }, Tt = ({ children: e, tag: o, blockProps: t, styles: l, inBuilder: r }) => {
1716
+ let n = e;
1717
+ return v(n) && r && (n = /* @__PURE__ */ s("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5", children: "No items found" })), b.createElement(o, { ...t, ...l }, n);
1718
+ }, Nt = {
1703
1719
  type: "Repeater",
1704
1720
  label: "Repeater",
1705
- icon: $,
1721
+ icon: E,
1706
1722
  group: "basic",
1723
+ asyncProps: ["filter", "sort", "limit", "repeaterItems"],
1707
1724
  blocks: () => [
1708
1725
  { _id: "A", _type: "Repeater", tag: "ul" },
1709
- { _id: "B", _type: "RepeaterItem", parentTag: "ul", _parent: "A" }
1726
+ { _id: "B", _name: "Repeater Item", _type: "RepeaterItem", parentTag: "ul", _parent: "A" }
1727
+ // { _id: "C", _name: "Empty State", _type: "RepeaterEmptyState", _parent: "A" },
1728
+ // {
1729
+ // _id: "D",
1730
+ // _name: "Empty State Heading",
1731
+ // _type: "Heading",
1732
+ // _parent: "C",
1733
+ // styles: "#styles:,text-2xl text-center",
1734
+ // content: "No items",
1735
+ // },
1710
1736
  ],
1711
- ...u({
1737
+ ...d({
1712
1738
  properties: {
1739
+ styles: P("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),
1713
1740
  repeaterItems: {
1714
1741
  title: "Items",
1715
1742
  type: "string",
1716
1743
  binding: "array",
1717
- default: ""
1744
+ default: "",
1745
+ ui: { "ui:readonly": !0 }
1718
1746
  },
1719
1747
  tag: {
1720
1748
  title: "Tag",
@@ -1722,11 +1750,22 @@ const A = (e, ...o) => ({
1722
1750
  default: "ul",
1723
1751
  enum: ["div", "ul", "ol"]
1724
1752
  },
1725
- styles: T(""),
1726
1753
  limit: {
1727
1754
  title: "Limit",
1728
1755
  type: "number",
1729
- default: ""
1756
+ default: 3
1757
+ },
1758
+ filter: {
1759
+ title: "Filter by",
1760
+ type: "string",
1761
+ default: "",
1762
+ ui: { "ui:widget": "collectionSelect" }
1763
+ },
1764
+ sort: {
1765
+ title: "Sort by",
1766
+ type: "string",
1767
+ default: "",
1768
+ ui: { "ui:widget": "collectionSelect" }
1730
1769
  }
1731
1770
  }
1732
1771
  })
@@ -1751,12 +1790,12 @@ const A = (e, ...o) => ({
1751
1790
  }, Mt = {
1752
1791
  type: "RepeaterItem",
1753
1792
  label: "Repeater Item",
1754
- icon: $,
1793
+ icon: E,
1755
1794
  hidden: !0,
1756
1795
  group: "basic",
1757
- ...u({
1796
+ ...d({
1758
1797
  properties: {
1759
- styles: T(""),
1798
+ styles: P(""),
1760
1799
  parentTag: H("Repeater", "tag")
1761
1800
  }
1762
1801
  }),
@@ -1764,9 +1803,25 @@ const A = (e, ...o) => ({
1764
1803
  canDelete: () => !1,
1765
1804
  canMove: () => !1,
1766
1805
  canDuplicate: () => !1
1767
- }, jt = () => {
1768
- d(ye, me), d(xe, Le), d(ge, be), d(Ge, Oe), d(pt, dt), d(wt, Ct), d(ht, kt), d(rt, nt), d(it, st), d(at, ct), d(et, tt), d(ot, lt), d(_t, St), d(ke, we), d(Ce, ve), d(vt, It), d(Se, Te), d(Ne, Re), d(Me, $e), d(Pe, _e), d(He, ze), d(Ve, De), d(je, qe), d(Ee, Ae), d(Ye, We), d(Ie, Be), d(Fe, Ue), d(ut, yt), d(bt, ft), d(mt, gt), d(fe, he), d(Tt, Nt), d(Rt, Mt);
1806
+ }, Et = ({
1807
+ children: e,
1808
+ blockProps: o,
1809
+ styles: t
1810
+ }) => b.createElement("div", { ...o, ...t }, e), $t = {
1811
+ type: "RepeaterEmptyState",
1812
+ label: "Empty State",
1813
+ hidden: !0,
1814
+ group: "basic",
1815
+ ...d({
1816
+ properties: { styles: P("p-5 flex items-center justify-center") }
1817
+ }),
1818
+ canAcceptBlock: () => !0,
1819
+ canDelete: () => !1,
1820
+ canMove: () => !1,
1821
+ canDuplicate: () => !1
1822
+ }, Ft = () => {
1823
+ p(ye, me), p(Be, Le), p(ge, be), p(Ge, Oe), p(pt, ut), p(wt, Ct), p(ht, kt), p(rt, nt), p(it, st), p(at, ct), p(et, tt), p(ot, lt), p(St, _t), p(ke, we), p(Ce, ve), p(vt, It), p(_e, Te), p(Ne, Re), p(Me, Ee), p(Pe, Se), p(He, ze), p(De, je), p(Ve, qe), p($e, Ae), p(Ye, We), p(Ie, xe), p(Fe, Ue), p(dt, yt), p(bt, ft), p(mt, gt), p(fe, he), p(Tt, Nt), p(Rt, Mt), p(Et, $t);
1769
1824
  };
1770
1825
  export {
1771
- jt as loadWebBlocks
1826
+ Ft as loadWebBlocks
1772
1827
  };