@chaibuilder/sdk 3.0.14 → 3.0.16

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,10 +1,10 @@
1
- import { registerChaiBlockSchema as d, StylesProp as u, registerChaiBlock as p, getRegisteredChaiBlock as F, stylesProp as B, closestBlockProp as U } from "@chaibuilder/runtime";
1
+ import { registerChaiBlockSchema as p, StylesProp as u, registerChaiBlock as d, getRegisteredChaiBlock as U, stylesProp as L, closestBlockProp as q } from "@chaibuilder/runtime";
2
2
  import { jsx as i, jsxs as g, Fragment as _ } from "react/jsx-runtime";
3
3
  import { c as T, g as I } from "./common-functions-BGzDsf1z.js";
4
4
  import * as y from "react";
5
5
  import { createElement as w } from "react";
6
- import { ButtonIcon as E, CodeIcon as H, DividerHorizontalIcon as Z, CheckboxIcon as G, FileTextIcon as W, InputIcon as $, LetterCaseToggleIcon as O, RadiobuttonIcon as Y, DropdownMenuIcon as Q, FrameIcon as z, HeadingIcon as J, TableIcon as X, BorderTopIcon as K, BorderAllIcon as ee, ViewHorizontalIcon as te, DragHandleHorizontalIcon as oe, SketchLogoIcon as le, ImageIcon as re, Link1Icon as ne, RowsIcon as j, ColumnsIcon as ie, TextIcon as ae, LayoutIcon as se, CursorTextIcon as ce, SpaceBetweenVerticallyIcon as pe, VideoIcon as de, ChevronLeftIcon as ue, ChevronRightIcon as me, LoopIcon as D } from "@radix-ui/react-icons";
7
- import { isEmpty as v, get as k, map as R, isNull as ye, omit as V, pick as q } from "lodash-es";
6
+ import { ButtonIcon as E, CodeIcon as H, DividerHorizontalIcon as Z, CheckboxIcon as G, FileTextIcon as W, InputIcon as $, LetterCaseToggleIcon as O, RadiobuttonIcon as Y, DropdownMenuIcon as Q, FrameIcon as z, HeadingIcon as J, TableIcon as X, BorderTopIcon as K, BorderAllIcon as ee, ViewHorizontalIcon as te, DragHandleHorizontalIcon as oe, SketchLogoIcon as le, ImageIcon as re, Link1Icon as ne, RowsIcon as j, ColumnsIcon as ie, TextIcon as ae, LayoutIcon as se, CursorTextIcon as ce, SpaceBetweenVerticallyIcon as de, VideoIcon as pe, ChevronLeftIcon as ue, ChevronRightIcon as me, LoopIcon as D } from "@radix-ui/react-icons";
7
+ import { isEmpty as v, get as x, map as R, isNull as ye, omit as V, pick as F } from "lodash-es";
8
8
  const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div", { className: T("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, ge = (e) => {
9
9
  const { blockProps: o, inBuilder: t, backgroundImage: l, children: r, tag: n = "div", styles: a } = e;
10
10
  let s = r;
@@ -17,7 +17,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
17
17
  label: "Box",
18
18
  category: "core",
19
19
  group: "basic",
20
- ...d({
20
+ ...p({
21
21
  properties: {
22
22
  styles: u(""),
23
23
  tag: {
@@ -64,7 +64,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
64
64
  dangerouslySetInnerHTML: { __html: h }
65
65
  }
66
66
  )
67
- ] }), x = w(
67
+ ] }), k = w(
68
68
  "button",
69
69
  {
70
70
  ...o,
@@ -74,7 +74,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
74
74
  },
75
75
  b
76
76
  );
77
- return v(k(c, "href")) ? x : m ? /* @__PURE__ */ i("span", { children: x }) : /* @__PURE__ */ i("a", { "aria-label": r, href: k(c, "href") || "/", target: k(c, "target", "_self"), children: x });
77
+ return v(x(c, "href")) ? k : m ? /* @__PURE__ */ i("span", { children: k }) : /* @__PURE__ */ i("a", { "aria-label": r, href: x(c, "href") || "/", target: x(c, "target", "_self"), children: k });
78
78
  }, he = {
79
79
  type: "Button",
80
80
  description: "similar to a button element in HTML",
@@ -82,7 +82,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
82
82
  category: "core",
83
83
  icon: E,
84
84
  group: "basic",
85
- ...d({
85
+ ...p({
86
86
  properties: {
87
87
  styles: u("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),
88
88
  content: {
@@ -132,7 +132,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
132
132
  }),
133
133
  i18nProps: ["content", "link"],
134
134
  aiProps: ["content"]
135
- }, ke = (e) => {
135
+ }, xe = (e) => {
136
136
  const { blockProps: o, styles: t, htmlCode: l, inBuilder: r } = e;
137
137
  return r ? /* @__PURE__ */ g("div", { className: "relative", children: [
138
138
  r ? /* @__PURE__ */ i("div", { ...o, ...t, className: "absolute z-20 h-full w-full" }) : null,
@@ -145,14 +145,14 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
145
145
  ...t,
146
146
  dangerouslySetInnerHTML: { __html: l }
147
147
  });
148
- }, xe = {
148
+ }, ke = {
149
149
  type: "CustomHTML",
150
150
  description: "similar to a div or section elements in HTML",
151
151
  label: "Custom HTML",
152
152
  category: "core",
153
153
  icon: H,
154
154
  group: "advanced",
155
- ...d({
155
+ ...p({
156
156
  properties: {
157
157
  styles: u(""),
158
158
  htmlCode: {
@@ -173,7 +173,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
173
173
  category: "core",
174
174
  icon: H,
175
175
  group: "advanced",
176
- ...d({
176
+ ...p({
177
177
  properties: {
178
178
  scripts: {
179
179
  type: "string",
@@ -195,7 +195,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
195
195
  category: "core",
196
196
  icon: Z,
197
197
  group: "basic",
198
- ...d({
198
+ ...p({
199
199
  properties: {
200
200
  styles: u("bg-gray-900 h-0.5 py-2 my-1")
201
201
  }
@@ -210,7 +210,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
210
210
  label: "Empty Box",
211
211
  category: "core",
212
212
  group: "basic",
213
- ...d({
213
+ ...p({
214
214
  properties: {
215
215
  styles: u(""),
216
216
  backgroundImage: {
@@ -244,7 +244,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
244
244
  category: "core",
245
245
  icon: G,
246
246
  group: "form",
247
- ...d({
247
+ ...p({
248
248
  properties: {
249
249
  styles: u("flex items-center gap-x-2"),
250
250
  inputStyles: u(""),
@@ -318,7 +318,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
318
318
  styles: "#styles:bg-black text-white rounded px-3 py-1,"
319
319
  }
320
320
  ],
321
- ...d({
321
+ ...p({
322
322
  properties: {
323
323
  styles: u(""),
324
324
  action: {
@@ -362,7 +362,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
362
362
  category: "core",
363
363
  icon: E,
364
364
  group: "form",
365
- ...d({
365
+ ...p({
366
366
  properties: {
367
367
  styles: u(
368
368
  "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
@@ -475,7 +475,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
475
475
  required: c,
476
476
  inputType: m,
477
477
  defaultValue: h
478
- } = e, { type: b, autocomplete: x } = Ae(m);
478
+ } = e, { type: b, autocomplete: k } = Ae(m);
479
479
  return s ? /* @__PURE__ */ g("div", { ...n, ...o, children: [
480
480
  s && /* @__PURE__ */ i("label", { htmlFor: t, children: l }),
481
481
  /* @__PURE__ */ i(
@@ -487,7 +487,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
487
487
  type: b,
488
488
  placeholder: r,
489
489
  required: c,
490
- autoComplete: x
490
+ autoComplete: k
491
491
  }
492
492
  )
493
493
  ] }) : /* @__PURE__ */ i(
@@ -500,7 +500,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
500
500
  type: b,
501
501
  placeholder: r,
502
502
  required: c,
503
- autoComplete: x,
503
+ autoComplete: k,
504
504
  defaultValue: h
505
505
  }
506
506
  );
@@ -510,7 +510,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
510
510
  category: "core",
511
511
  icon: $,
512
512
  group: "form",
513
- ...d({
513
+ ...p({
514
514
  properties: {
515
515
  styles: u(""),
516
516
  inputStyles: u("w-full p-1"),
@@ -631,7 +631,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
631
631
  category: "core",
632
632
  icon: O,
633
633
  group: "form",
634
- ...d({
634
+ ...p({
635
635
  properties: {
636
636
  styles: u(),
637
637
  content: {
@@ -666,7 +666,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
666
666
  category: "core",
667
667
  icon: Y,
668
668
  group: "form",
669
- ...d({
669
+ ...p({
670
670
  properties: {
671
671
  styles: u("flex items-center gap-x-2"),
672
672
  inputStyles: u(""),
@@ -712,7 +712,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
712
712
  _multiple: m,
713
713
  options: h,
714
714
  defaultValue: b
715
- } = e, x = m && b ? b.split(",").map((f) => f.trim()) : b || "";
715
+ } = e, k = m && b ? b.split(",").map((f) => f.trim()) : b || "";
716
716
  return c ? /* @__PURE__ */ g("div", { ...n, ...o, children: [
717
717
  c && /* @__PURE__ */ i("label", { htmlFor: t, children: l }),
718
718
  /* @__PURE__ */ g(
@@ -722,7 +722,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
722
722
  required: s,
723
723
  multiple: m,
724
724
  name: t,
725
- defaultValue: x,
725
+ defaultValue: k,
726
726
  children: [
727
727
  /* @__PURE__ */ i("option", { value: "", disabled: !0, hidden: !0, children: r }),
728
728
  R(h, (f) => /* @__PURE__ */ i("option", { value: f == null ? void 0 : f.value, children: f == null ? void 0 : f.label }, f == null ? void 0 : f.value))
@@ -737,7 +737,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
737
737
  required: s,
738
738
  multiple: m,
739
739
  name: t,
740
- defaultValue: x,
740
+ defaultValue: k,
741
741
  children: [
742
742
  /* @__PURE__ */ i("option", { value: "", disabled: !0, hidden: !0, children: r }),
743
743
  R(h, (f) => /* @__PURE__ */ i("option", { value: f == null ? void 0 : f.value, children: f == null ? void 0 : f.label }, f == null ? void 0 : f.value))
@@ -750,7 +750,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
750
750
  category: "core",
751
751
  icon: Q,
752
752
  group: "form",
753
- ...d({
753
+ ...p({
754
754
  properties: {
755
755
  styles: u(""),
756
756
  inputStyles: u("w-full p-1"),
@@ -813,7 +813,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
813
813
  }),
814
814
  aiProps: ["label", "placeholder"],
815
815
  i18nProps: ["label", "placeholder"]
816
- }, qe = (e) => {
816
+ }, Fe = (e) => {
817
817
  const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: a, rows: s, showLabel: c, required: m, defaultValue: h } = e;
818
818
  return c ? /* @__PURE__ */ g("div", { ...n, ...o, children: [
819
819
  c && /* @__PURE__ */ i("label", { htmlFor: t, children: l }),
@@ -841,13 +841,13 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
841
841
  defaultValue: h
842
842
  }
843
843
  );
844
- }, Fe = {
844
+ }, Ue = {
845
845
  type: "TextArea",
846
846
  label: "web_blocks.textarea",
847
847
  category: "core",
848
848
  icon: $,
849
849
  group: "form",
850
- ...d({
850
+ ...p({
851
851
  properties: {
852
852
  fieldName: {
853
853
  type: "string",
@@ -892,7 +892,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
892
892
  }),
893
893
  aiProps: ["label", "placeholder"],
894
894
  i18nProps: ["label", "placeholder"]
895
- }, Ue = (e) => {
895
+ }, qe = (e) => {
896
896
  const { blockProps: o, inBuilder: t, children: l, globalBlock: r } = e;
897
897
  return t && !r ? /* @__PURE__ */ g(
898
898
  "div",
@@ -916,7 +916,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
916
916
  category: "core",
917
917
  group: "basic",
918
918
  hidden: !0,
919
- ...d({
919
+ ...p({
920
920
  properties: {
921
921
  globalBlock: {
922
922
  type: "string",
@@ -926,17 +926,13 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
926
926
  }
927
927
  }
928
928
  })
929
- }, P = (e, ...o) => ({
929
+ }, B = (e, ...o) => ({
930
930
  ...e,
931
931
  className: T(e.className, ...o)
932
932
  }), Ge = (e) => {
933
933
  const { blockProps: o, styles: t, content: l, tag: r = "h1", children: n = null } = e;
934
934
  if (n) return y.createElement(r, { ...t, ...o }, n);
935
- const a = P(
936
- t,
937
- "prose 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",
938
- "max-w-full"
939
- );
935
+ const a = B(t, "rte");
940
936
  return y.createElement(r, {
941
937
  ...a,
942
938
  ...o,
@@ -949,7 +945,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
949
945
  category: "core",
950
946
  icon: J,
951
947
  group: "typography",
952
- ...d({
948
+ ...p({
953
949
  properties: {
954
950
  tag: {
955
951
  type: "string",
@@ -978,7 +974,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
978
974
  category: "core",
979
975
  group: "basic",
980
976
  hidden: !0,
981
- ...d({
977
+ ...p({
982
978
  properties: {
983
979
  styles: u("")
984
980
  }
@@ -1007,70 +1003,70 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
1007
1003
  dangerouslySetInnerHTML: { __html: l }
1008
1004
  });
1009
1005
  };
1010
- p(Qe, {
1006
+ d(Qe, {
1011
1007
  type: "Table",
1012
1008
  label: "Table",
1013
1009
  category: "core",
1014
1010
  group: "table",
1015
1011
  hidden: !0,
1016
1012
  icon: X,
1017
- ...d({
1013
+ ...p({
1018
1014
  properties: {
1019
1015
  styles: u("")
1020
1016
  }
1021
1017
  }),
1022
- blocks: L("Table")
1018
+ blocks: P("Table")
1023
1019
  });
1024
- p(Je, {
1020
+ d(Je, {
1025
1021
  type: "TableHead",
1026
1022
  label: "Table Head",
1027
1023
  category: "core",
1028
1024
  group: "table",
1029
1025
  hidden: !0,
1030
1026
  icon: K,
1031
- ...d({
1027
+ ...p({
1032
1028
  properties: {
1033
1029
  styles: u("")
1034
1030
  }
1035
1031
  }),
1036
- blocks: L("TableHead")
1032
+ blocks: P("TableHead")
1037
1033
  });
1038
- p(Xe, {
1034
+ d(Xe, {
1039
1035
  type: "TableBody",
1040
1036
  label: "Table Body",
1041
1037
  category: "core",
1042
1038
  group: "table",
1043
1039
  hidden: !0,
1044
1040
  icon: ee,
1045
- ...d({
1041
+ ...p({
1046
1042
  properties: {
1047
1043
  styles: u("")
1048
1044
  }
1049
1045
  }),
1050
- blocks: L("TableBody")
1046
+ blocks: P("TableBody")
1051
1047
  });
1052
- p(Ke, {
1048
+ d(Ke, {
1053
1049
  type: "TableRow",
1054
1050
  label: "Table Row",
1055
1051
  category: "core",
1056
1052
  group: "table",
1057
1053
  hidden: !0,
1058
1054
  icon: te,
1059
- ...d({
1055
+ ...p({
1060
1056
  properties: {
1061
1057
  styles: u("")
1062
1058
  }
1063
1059
  }),
1064
- blocks: L("TableRow")
1060
+ blocks: P("TableRow")
1065
1061
  });
1066
- p(et, {
1062
+ d(et, {
1067
1063
  type: "TableCell",
1068
1064
  label: "Table Cell",
1069
1065
  category: "core",
1070
1066
  group: "table",
1071
1067
  hidden: !0,
1072
1068
  icon: oe,
1073
- ...d({
1069
+ ...p({
1074
1070
  properties: {
1075
1071
  styles: u(""),
1076
1072
  content: {
@@ -1081,11 +1077,11 @@ p(et, {
1081
1077
  }
1082
1078
  }
1083
1079
  }),
1084
- blocks: L("TableCell"),
1080
+ blocks: P("TableCell"),
1085
1081
  i18nProps: ["content"],
1086
1082
  aiProps: ["content"]
1087
1083
  });
1088
- function L(e) {
1084
+ function P(e) {
1089
1085
  const o = (n, a) => ({
1090
1086
  _id: I(),
1091
1087
  _parent: n,
@@ -1129,7 +1125,7 @@ function L(e) {
1129
1125
  return e === "TableRow" ? t() : e === "TableHead" ? l() : e === "TableBody" ? r() : [];
1130
1126
  }
1131
1127
  const tt = (e) => {
1132
- const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: a } = e, s = P(l, "");
1128
+ const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: a } = e, s = B(l, "");
1133
1129
  if (v(t))
1134
1130
  return /* @__PURE__ */ i(C, { inBuilder: n, className: "h-8 w-14" });
1135
1131
  const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
@@ -1148,7 +1144,7 @@ const tt = (e) => {
1148
1144
  category: "core",
1149
1145
  icon: le,
1150
1146
  group: "media",
1151
- ...d({
1147
+ ...p({
1152
1148
  properties: {
1153
1149
  styles: u(""),
1154
1150
  icon: {
@@ -1193,7 +1189,7 @@ const tt = (e) => {
1193
1189
  category: "core",
1194
1190
  icon: re,
1195
1191
  group: "media",
1196
- ...d({
1192
+ ...p({
1197
1193
  properties: {
1198
1194
  styles: u(""),
1199
1195
  image: {
@@ -1277,7 +1273,7 @@ const tt = (e) => {
1277
1273
  category: "core",
1278
1274
  icon: ne,
1279
1275
  group: "basic",
1280
- ...d({
1276
+ ...p({
1281
1277
  properties: {
1282
1278
  styles: u(""),
1283
1279
  content: {
@@ -1321,7 +1317,7 @@ const tt = (e) => {
1321
1317
  icon: j,
1322
1318
  category: "core",
1323
1319
  group: "basic",
1324
- ...d({
1320
+ ...p({
1325
1321
  properties: {
1326
1322
  styles: u("")
1327
1323
  }
@@ -1351,21 +1347,21 @@ const tt = (e) => {
1351
1347
  content: "Item 3"
1352
1348
  }
1353
1349
  ]
1354
- }, pt = (e) => {
1350
+ }, dt = (e) => {
1355
1351
  const { blockProps: o, content: t, styles: l, children: r, tag: n } = e;
1356
1352
  return r ? y.createElement(n || "li", { ...l, ...o }, r) : y.createElement(n || "li", {
1357
1353
  ...l,
1358
1354
  ...o,
1359
1355
  dangerouslySetInnerHTML: { __html: t }
1360
1356
  });
1361
- }, dt = {
1357
+ }, pt = {
1362
1358
  type: "ListItem",
1363
1359
  description: "A list item component",
1364
1360
  label: "List Item",
1365
1361
  icon: ie,
1366
1362
  category: "core",
1367
1363
  group: "basic",
1368
- ...d({
1364
+ ...p({
1369
1365
  properties: {
1370
1366
  styles: u(""),
1371
1367
  content: {
@@ -1385,11 +1381,7 @@ const tt = (e) => {
1385
1381
  }, ut = (e) => {
1386
1382
  const { blockProps: o, styles: t, content: l } = e;
1387
1383
  if (!ye(e.children)) return y.createElement("p", { ...t, ...o }, e.children);
1388
- const r = P(
1389
- t,
1390
- "prose 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",
1391
- "max-w-full"
1392
- );
1384
+ const r = B(t, "rte");
1393
1385
  return y.createElement("p", {
1394
1386
  ...r,
1395
1387
  ...o,
@@ -1402,7 +1394,7 @@ const tt = (e) => {
1402
1394
  category: "core",
1403
1395
  icon: ae,
1404
1396
  group: "typography",
1405
- ...d({
1397
+ ...p({
1406
1398
  properties: {
1407
1399
  styles: u(""),
1408
1400
  content: {
@@ -1440,7 +1432,7 @@ const tt = (e) => {
1440
1432
  category: "core",
1441
1433
  group: "basic",
1442
1434
  hidden: !0,
1443
- ...d({
1435
+ ...p({
1444
1436
  properties: {
1445
1437
  partialBlockId: {
1446
1438
  type: "string",
@@ -1495,10 +1487,10 @@ const tt = (e) => {
1495
1487
  }
1496
1488
  }, bt = (e) => {
1497
1489
  const { blockProps: o, children: t, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan: a } = e, c = { className: [
1498
- k(l, "className", ""),
1499
- k(S, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
1500
- n ? k(S, ["MEDIUM", n || r], "") : "",
1501
- a ? k(S, ["LARGE", n || r], "") : ""
1490
+ x(l, "className", ""),
1491
+ x(S, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
1492
+ n ? x(S, ["MEDIUM", n || r], "") : "",
1493
+ a ? x(S, ["LARGE", n || r], "") : ""
1502
1494
  ].join(" ") };
1503
1495
  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" }) });
1504
1496
  }, ft = {
@@ -1512,7 +1504,7 @@ const tt = (e) => {
1512
1504
  canDelete: () => !0,
1513
1505
  canAcceptBlock: () => !0,
1514
1506
  canBeNested: (e) => e === "Row",
1515
- ...d({
1507
+ ...p({
1516
1508
  properties: {
1517
1509
  styles: u(""),
1518
1510
  colSpan: {
@@ -1538,9 +1530,9 @@ const tt = (e) => {
1538
1530
  }
1539
1531
  })
1540
1532
  }, ht = (e) => {
1541
- const { blockProps: o, children: t, styles: l, gutter: r } = e, a = { className: [k(l, "className", ""), " grid grid-cols-12"].join() };
1533
+ const { blockProps: o, children: t, styles: l, gutter: r } = e, a = { className: [x(l, "className", ""), " grid grid-cols-12"].join() };
1542
1534
  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 });
1543
- }, kt = {
1535
+ }, xt = {
1544
1536
  type: "Row",
1545
1537
  description: "A row component",
1546
1538
  label: "Row",
@@ -1554,7 +1546,7 @@ const tt = (e) => {
1554
1546
  category: "core",
1555
1547
  wrapper: !0,
1556
1548
  canAcceptBlock: (e) => e === "Column",
1557
- ...d({
1549
+ ...p({
1558
1550
  properties: {
1559
1551
  styles: u(""),
1560
1552
  colCount: {
@@ -1571,12 +1563,8 @@ const tt = (e) => {
1571
1563
  }
1572
1564
  }
1573
1565
  })
1574
- }, xt = (e) => {
1575
- const { blockProps: o, content: t, styles: l } = e, r = P(
1576
- l,
1577
- "prose 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",
1578
- "max-w-full"
1579
- );
1566
+ }, kt = (e) => {
1567
+ const { blockProps: o, content: t, styles: l } = e, r = B(l, "rte");
1580
1568
  return /* @__PURE__ */ i("div", { ...o, ...r, dangerouslySetInnerHTML: { __html: t } });
1581
1569
  }, wt = {
1582
1570
  type: "RichText",
@@ -1585,7 +1573,7 @@ const tt = (e) => {
1585
1573
  category: "core",
1586
1574
  icon: ce,
1587
1575
  group: "typography",
1588
- ...d({
1576
+ ...p({
1589
1577
  properties: {
1590
1578
  styles: u(""),
1591
1579
  content: {
@@ -1600,14 +1588,8 @@ const tt = (e) => {
1600
1588
  i18nProps: ["content"]
1601
1589
  }, vt = (e) => {
1602
1590
  const { blockProps: o, styles: t, content: l, children: r = null, tag: n } = e;
1603
- if (r) return y.createElement("span", { ...t, ...o }, r);
1604
- const a = P(
1605
- t,
1606
- "prose 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",
1607
- "max-w-full"
1608
- );
1609
- return y.createElement(n || "span", {
1610
- ...a,
1591
+ return r ? y.createElement("span", { ...t, ...o }, r) : y.createElement(n || "span", {
1592
+ ...t,
1611
1593
  ...o,
1612
1594
  dangerouslySetInnerHTML: { __html: l || "" }
1613
1595
  });
@@ -1617,7 +1599,7 @@ const tt = (e) => {
1617
1599
  label: "Span",
1618
1600
  category: "core",
1619
1601
  group: "typography",
1620
- ...d({
1602
+ ...p({
1621
1603
  properties: {
1622
1604
  styles: u(""),
1623
1605
  content: {
@@ -1638,8 +1620,8 @@ const tt = (e) => {
1638
1620
  hidden: !0,
1639
1621
  category: "core",
1640
1622
  group: "typography",
1641
- icon: pe,
1642
- ...d({
1623
+ icon: de,
1624
+ ...p({
1643
1625
  properties: {
1644
1626
  styles: u("text-black"),
1645
1627
  content: {
@@ -1683,7 +1665,7 @@ const tt = (e) => {
1683
1665
  }
1684
1666
  }
1685
1667
  }, A = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, M = /(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/, Lt = (e, o) => {
1686
- const t = k(o, "autoplay", !1), l = k(o, "controls", !1), r = k(o, "loop", !1), n = t || k(o, "muted", !0);
1668
+ const t = x(o, "autoplay", !1), l = x(o, "controls", !1), r = x(o, "loop", !1), n = t || x(o, "muted", !0);
1687
1669
  if (A.test(e)) {
1688
1670
  const a = e.match(A);
1689
1671
  if (a) {
@@ -1704,33 +1686,33 @@ const tt = (e) => {
1704
1686
  }, Bt = (e) => {
1705
1687
  const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: a } = e, s = Lt(o, r);
1706
1688
  return /* @__PURE__ */ g("div", { ...V(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
1707
- !s && a ? /* @__PURE__ */ i("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__ */ i("iframe", { width: "100%", src: s, ...q(l, "className") }),
1689
+ !s && a ? /* @__PURE__ */ i("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__ */ i("iframe", { width: "100%", src: s, ...F(l, "className") }),
1708
1690
  a && /* @__PURE__ */ i("div", { ...t, className: "absolute top-0 h-full w-full" })
1709
1691
  ] });
1710
1692
  }, St = (e) => {
1711
1693
  const { url: o, styles: t, controls: l, sources: r, poster: n, blockProps: a } = e;
1712
1694
  let s = n;
1713
- const c = [...k(r, "srcsets", []) || []];
1695
+ const c = [...x(r, "srcsets", []) || []];
1714
1696
  o && typeof o == "string" && c.push({ url: o, width: "9999" });
1715
- const m = c.sort((b, x) => parseInt(b.width) - parseInt(x.width)).filter((b) => !v(b.url) && !v(b.width));
1697
+ const m = c.sort((b, k) => parseInt(b.width) - parseInt(k.width)).filter((b) => !v(b.url) && !v(b.width));
1716
1698
  m.length === 0 && !s && (s = "https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");
1717
- const h = k(l, "autoplay", !1) || k(l, "muted", !0);
1699
+ const h = x(l, "autoplay", !1) || x(l, "muted", !0);
1718
1700
  return (s || !v(m)) && /* @__PURE__ */ i("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: /* @__PURE__ */ w(
1719
1701
  "video",
1720
1702
  {
1721
1703
  ...t,
1722
1704
  ...a,
1723
1705
  key: JSON.stringify(m),
1724
- controls: k(l, "controls", !1),
1725
- autoPlay: k(l, "autoplay", !1),
1726
- loop: k(l, "loop", !1),
1706
+ controls: x(l, "controls", !1),
1707
+ autoPlay: x(l, "autoplay", !1),
1708
+ loop: x(l, "loop", !1),
1727
1709
  poster: s,
1728
1710
  ...h ? { muted: !0 } : {}
1729
1711
  },
1730
1712
  m.map((b) => {
1731
1713
  if (!b.url || b.url.length < 4 || isNaN(b.width)) return null;
1732
- const x = `(max-width: ${b.width}px)`;
1733
- return /* @__PURE__ */ i("source", { src: b.url, media: x, type: b.type }, b.url);
1714
+ const k = `(max-width: ${b.width}px)`;
1715
+ return /* @__PURE__ */ i("source", { src: b.url, media: k, type: b.type }, b.url);
1734
1716
  }),
1735
1717
  "Your browser does not support the video tag."
1736
1718
  ) });
@@ -1744,9 +1726,9 @@ const tt = (e) => {
1744
1726
  type: "Video",
1745
1727
  label: "Video",
1746
1728
  category: "core",
1747
- icon: de,
1729
+ icon: pe,
1748
1730
  group: "media",
1749
- ...d({
1731
+ ...p({
1750
1732
  properties: {
1751
1733
  styles: u("absolute h-full w-full object-cover"),
1752
1734
  videoSource: {
@@ -1826,7 +1808,7 @@ const tt = (e) => {
1826
1808
  }),
1827
1809
  i18nProps: ["url"]
1828
1810
  }, Tt = (e) => {
1829
- const { paginationStyles: o } = e, t = F("Pagination");
1811
+ const { paginationStyles: o } = e, t = U("Pagination");
1830
1812
  return /* @__PURE__ */ i("div", { ...o, children: t ? y.createElement(t.component, { ...V(e, ["paginationStyles"]), blockProps: {} }) : /* @__PURE__ */ g(_, { children: [
1831
1813
  /* @__PURE__ */ i(
1832
1814
  "button",
@@ -1861,7 +1843,7 @@ const tt = (e) => {
1861
1843
  a && /* @__PURE__ */ i(
1862
1844
  Tt,
1863
1845
  {
1864
- ...q(e, [
1846
+ ...F(e, [
1865
1847
  "limit",
1866
1848
  "totalItems",
1867
1849
  "paginationStrategy",
@@ -1884,10 +1866,10 @@ const tt = (e) => {
1884
1866
  { _id: "A", _type: "Repeater", tag: "ul" },
1885
1867
  { _id: "B", _name: "Repeater Item", _type: "RepeaterItem", parentTag: "ul", _parent: "A" }
1886
1868
  ],
1887
- ...d({
1869
+ ...p({
1888
1870
  properties: {
1889
- styles: B("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),
1890
- paginationStyles: B("flex items-center justify-center gap-2 p-4"),
1871
+ styles: L("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),
1872
+ paginationStyles: L("flex items-center justify-center gap-2 p-4"),
1891
1873
  repeaterItems: {
1892
1874
  title: "Collection",
1893
1875
  type: "string",
@@ -1996,10 +1978,10 @@ const tt = (e) => {
1996
1978
  icon: D,
1997
1979
  hidden: !0,
1998
1980
  group: "basic",
1999
- ...d({
1981
+ ...p({
2000
1982
  properties: {
2001
- styles: B(""),
2002
- parentTag: U("Repeater", "tag")
1983
+ styles: L(""),
1984
+ parentTag: q("Repeater", "tag")
2003
1985
  }
2004
1986
  }),
2005
1987
  canAcceptBlock: (e) => e !== "RepeaterItem",
@@ -2015,16 +1997,16 @@ const tt = (e) => {
2015
1997
  label: "Empty State",
2016
1998
  hidden: !0,
2017
1999
  group: "basic",
2018
- ...d({
2019
- properties: { styles: B("p-5 flex items-center justify-center") }
2000
+ ...p({
2001
+ properties: { styles: L("p-5 flex items-center justify-center") }
2020
2002
  }),
2021
2003
  canAcceptBlock: () => !0,
2022
2004
  canDelete: () => !1,
2023
2005
  canMove: () => !1,
2024
2006
  canDuplicate: () => !1
2025
- }, Ut = () => {
2026
- p(ge, be), p(Pe, Le), p(fe, he), p(Ge, We), p(ut, mt), p(vt, Ct), p(xt, wt), p(it, at), p(st, ct), p(pt, dt), p(tt, ot), p(rt, nt), p(Nt, _t), p(ke, xe), p(we, ve), p(It, Pt), p(Ne, _e), p(Te, Re), p(Me, Ee), p(Be, Se), p(ze, je), p(De, Ve), p(qe, Fe), p(He, $e), p(Oe, Ye), p(Ce, Ie), p(Ue, Ze), p(yt, gt), p(ht, kt), p(bt, ft), p(Rt, At), p(Mt, Et), p(Ht, $t);
2007
+ }, qt = () => {
2008
+ d(ge, be), d(Pe, Le), d(fe, he), d(Ge, We), d(ut, mt), d(vt, Ct), d(kt, wt), d(it, at), d(st, ct), d(dt, pt), d(tt, ot), d(rt, nt), d(Nt, _t), d(xe, ke), d(we, ve), d(It, Pt), d(Ne, _e), d(Te, Re), d(Me, Ee), d(Be, Se), d(ze, je), d(De, Ve), d(Fe, Ue), d(He, $e), d(Oe, Ye), d(Ce, Ie), d(qe, Ze), d(yt, gt), d(ht, xt), d(bt, ft), d(Rt, At), d(Mt, Et), d(Ht, $t);
2027
2009
  };
2028
2010
  export {
2029
- Ut as loadWebBlocks
2011
+ qt as loadWebBlocks
2030
2012
  };