@chaibuilder/sdk 1.2.93 → 1.2.95

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.
Files changed (44) hide show
  1. package/dist/{CodeEditor-7AhH7ll8.js → CodeEditor-rsNTHAnV.js} +28 -30
  2. package/dist/CodeEditor-sMmjIL-u.cjs +1 -0
  3. package/dist/{Topbar-X_79oQQf.js → Topbar-TkCq6YMq.js} +19 -21
  4. package/dist/Topbar-f4B5oRp1.cjs +1 -0
  5. package/dist/{UnsplashImages-TlLU5BkT.js → UnsplashImages-Ax3Ik6fg.js} +33 -35
  6. package/dist/UnsplashImages-vCpHQ4up.cjs +1 -0
  7. package/dist/{UploadImages-GiKofaXX.js → UploadImages-Jar31A7w.js} +62 -37
  8. package/dist/UploadImages-KO8wFdE8.cjs +1 -0
  9. package/dist/{context-menu-yLeOsx9j.js → context-menu-9cWJcKdh.js} +463 -427
  10. package/dist/context-menu-sQn7ryJ6.cjs +1 -0
  11. package/dist/core.cjs +1 -1
  12. package/dist/core.js +77 -79
  13. package/dist/iconBase-HBZkvN04.js +330 -0
  14. package/dist/iconBase-kuD_VwQx.cjs +1 -0
  15. package/dist/index-cUydM1n4.cjs +223 -0
  16. package/dist/{index-GjgkZP8W.js → index-esmAeUzA.js} +9012 -7760
  17. package/dist/{plugin-BXpjdQxx.cjs → plugin-P0tpo_XZ.cjs} +1 -1
  18. package/dist/plugin-_F-KZp1i.cjs +1 -0
  19. package/dist/{plugin-DdKuAR7p.js → plugin-f5uJtdXY.js} +1 -1
  20. package/dist/plugin-sJ3Hzvpv.js +57 -0
  21. package/dist/render.cjs +2 -2
  22. package/dist/render.js +6 -7
  23. package/dist/style.css +1 -1
  24. package/dist/tailwind.cjs +1 -1
  25. package/dist/tailwind.js +6 -7
  26. package/dist/ui.cjs +1 -1
  27. package/dist/ui.js +112 -113
  28. package/dist/web-blocks.cjs +1 -1
  29. package/dist/web-blocks.js +235 -265
  30. package/package.json +1 -1
  31. package/dist/CodeEditor-Iy57NpaR.cjs +0 -1
  32. package/dist/Topbar-oXx57vCi.cjs +0 -1
  33. package/dist/UnsplashImages-smJeXVat.cjs +0 -1
  34. package/dist/UploadImages-Ic_iZgWY.cjs +0 -1
  35. package/dist/_commonjsHelpers-f3sTPFkQ.js +0 -8
  36. package/dist/_commonjsHelpers-f52AuuUj.cjs +0 -1
  37. package/dist/button-9Duvj2dH.js +0 -42
  38. package/dist/button-oQgWN0j0.cjs +0 -1
  39. package/dist/context-menu-8MWP_Ikf.cjs +0 -1
  40. package/dist/iconBase-BnEC5_qG.js +0 -1583
  41. package/dist/iconBase-_bgMuxa5.cjs +0 -1
  42. package/dist/index-f5CPA351.cjs +0 -223
  43. package/dist/plugin-02QsHeBE.cjs +0 -1
  44. package/dist/plugin-VDzc8jUO.js +0 -52
@@ -1,28 +1,19 @@
1
1
  import { registerChaiBlock as u } from "@chaibuilder/runtime";
2
- import { j as o } from "./jsx-runtime-Sp0orL4X.js";
2
+ import { j as s } from "./jsx-runtime-Sp0orL4X.js";
3
3
  import * as p from "react";
4
- import { B as I, W as m, y as v, X as C, Y as b, Z as N, z as j, _ as T, $ as L, a0 as S, a1 as D, a2 as g, a3 as F, G, v as U, U as O, n as V, g as B, a4 as W } from "./iconBase-BnEC5_qG.js";
5
- import "i18next";
6
- import { ButtonIcon as H, CodeIcon as X, HeadingIcon as Y, TextIcon as Z, CursorTextIcon as J, Link1Icon as K, ImageIcon as z, RowsIcon as Q, ColumnsIcon as ee, SketchLogoIcon as te, VideoIcon as le, DividerHorizontalIcon as oe, MoonIcon as se, SpaceBetweenVerticallyIcon as q, GroupIcon as ae, InputIcon as A, RadiobuttonIcon as re, DropdownMenuIcon as ne, CheckboxIcon as ce } from "@radix-ui/react-icons";
7
- import { isNull as ie, isEmpty as y, get as x, pick as de, omit as ue, map as M } from "lodash-es";
8
- import { GlobeIcon as be } from "lucide-react";
9
- import "react-i18next";
10
- import { B as pe } from "./button-9Duvj2dH.js";
11
- import "jotai";
4
+ import { c as j, T as m, f as v, o as C, b, q as N, y as I, l as T, d as L, m as S, v as R, r as k, e as F, G, g as B, S as O } from "./iconBase-HBZkvN04.js";
5
+ import { ButtonIcon as H, CodeIcon as U, HeadingIcon as V, TextIcon as W, CursorTextIcon as X, Link1Icon as Y, ImageIcon as z, RowsIcon as Z, ColumnsIcon as J, SketchLogoIcon as K, VideoIcon as Q, DividerHorizontalIcon as ee, MoonIcon as te, SpaceBetweenVerticallyIcon as q, GroupIcon as le, InputIcon as A, RadiobuttonIcon as oe, DropdownMenuIcon as se, CheckboxIcon as ae } from "@radix-ui/react-icons";
6
+ import { isNull as ne, isEmpty as y, get as x, pick as re, omit as ce, map as M } from "lodash-es";
7
+ import { GlobeIcon as ie } from "lucide-react";
12
8
  import "clsx";
13
9
  import "tailwind-merge";
14
- import "./_commonjsHelpers-f3sTPFkQ.js";
15
- import "@react-hookz/web";
16
- import "tree-model";
17
- import "@radix-ui/react-slot";
18
- import "class-variance-authority";
19
- const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("div", { className: I("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ o.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ o.jsx("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, _ = me, fe = (e) => {
20
- const { blockProps: l, inBuilder: t, backgroundImage: a, children: s, tag: r = "div", styles: n } = e;
21
- let i = s;
22
- s || (i = /* @__PURE__ */ o.jsx(_, { inBuilder: t }));
10
+ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("div", { className: j("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ s.jsx("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, _ = de, ue = (e) => {
11
+ const { blockProps: l, inBuilder: t, backgroundImage: a, children: o, tag: n = "div", styles: r } = e;
12
+ let i = o;
13
+ o || (i = /* @__PURE__ */ s.jsx(_, { inBuilder: t }));
23
14
  let c = {};
24
- return a && (c = { backgroundImage: `url(${a})` }), p.createElement(r, { ...l, ...n, style: c }, i);
25
- }, he = {
15
+ return a && (c = { backgroundImage: `url(${a})` }), p.createElement(n, { ...l, ...r, style: c }, i);
16
+ }, be = {
26
17
  type: "Box",
27
18
  label: "web_blocks.box",
28
19
  category: "core",
@@ -55,14 +46,14 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
55
46
  backgroundImage: C({ title: "web_blocks.background_image" })
56
47
  },
57
48
  canAcceptBlock: () => !0
58
- }, ge = (e) => {
59
- const { blockProps: l, iconSize: t, icon: a, content: s, iconPos: r, styles: n, children: i } = e, c = a, d = i || /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
60
- /* @__PURE__ */ o.jsx("span", { "data-ai-key": "content", children: s }),
61
- c && /* @__PURE__ */ o.jsx(
49
+ }, pe = (e) => {
50
+ const { blockProps: l, iconSize: t, icon: a, content: o, iconPos: n, styles: r, children: i } = e, c = a, d = i || /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
51
+ /* @__PURE__ */ s.jsx("span", { "data-ai-key": "content", children: o }),
52
+ c && /* @__PURE__ */ s.jsx(
62
53
  "div",
63
54
  {
64
55
  style: { width: t + "px" },
65
- className: r + " " + (r === "order-first" ? "mr-2" : "ml-2") || "",
56
+ className: n + " " + (n === "order-first" ? "mr-2" : "ml-2") || "",
66
57
  dangerouslySetInnerHTML: { __html: c }
67
58
  }
68
59
  )
@@ -71,12 +62,12 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
71
62
  "button",
72
63
  {
73
64
  ...l,
74
- ...n,
65
+ ...r,
75
66
  type: "button"
76
67
  },
77
68
  d
78
69
  );
79
- }, ke = {
70
+ }, me = {
80
71
  type: "Button",
81
72
  label: "web_blocks.button",
82
73
  category: "core",
@@ -86,7 +77,7 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
86
77
  content: b({ title: "web_blocks.label", default: "Button" }),
87
78
  styles: m({ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center" }),
88
79
  icon: N({ title: "web_blocks.icon", default: "" }),
89
- iconSize: j({ title: "web_blocks.icon_size", default: 24 }),
80
+ iconSize: I({ title: "web_blocks.icon_size", default: 24 }),
90
81
  iconPos: v({
91
82
  title: "web_blocks.icon_position",
92
83
  default: "order-last",
@@ -96,10 +87,10 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
96
87
  ]
97
88
  })
98
89
  }
99
- }, ye = (e) => {
100
- const { blockProps: l, styles: t, htmlCode: a, inBuilder: s } = e;
101
- return s ? /* @__PURE__ */ o.jsxs("div", { className: "relative", children: [
102
- s ? /* @__PURE__ */ o.jsx("div", { ...l, ...t, className: "absolute z-20 h-full w-full" }) : null,
90
+ }, fe = (e) => {
91
+ const { blockProps: l, styles: t, htmlCode: a, inBuilder: o } = e;
92
+ return o ? /* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
93
+ o ? /* @__PURE__ */ s.jsx("div", { ...l, ...t, className: "absolute z-20 h-full w-full" }) : null,
103
94
  p.createElement("div", {
104
95
  ...t,
105
96
  dangerouslySetInnerHTML: { __html: a.replace(/<script.*?>.*?<\/script>/g, "") }
@@ -109,11 +100,11 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
109
100
  ...t,
110
101
  dangerouslySetInnerHTML: { __html: a }
111
102
  });
112
- }, _e = {
103
+ }, he = {
113
104
  type: "CustomHTML",
114
105
  label: "web_blocks.custom_html",
115
106
  category: "core",
116
- icon: X,
107
+ icon: U,
117
108
  group: "advanced",
118
109
  props: {
119
110
  styles: m({ default: "" }),
@@ -123,12 +114,12 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
123
114
  placeholder: "web_blocks.placeholder"
124
115
  })
125
116
  }
126
- }, we = p.memo(
117
+ }, ke = p.memo(
127
118
  (e) => {
128
119
  const { blockProps: l, styles: t } = e;
129
120
  return p.createElement("div", { ...l, ...t });
130
121
  }
131
- ), xe = {
122
+ ), ge = {
132
123
  type: "EmptyBox",
133
124
  label: "web_blocks.empty_box",
134
125
  category: "core",
@@ -137,20 +128,20 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
137
128
  styles: m({ default: "" }),
138
129
  backgroundImage: C({ title: "web_blocks.background_image" })
139
130
  }
140
- }, ve = (e) => {
141
- const { blockProps: l, styles: t, content: a, level: s = "h1", children: r = null } = e;
142
- return r ? p.createElement(s, { ...t, ...l }, r) : p.createElement(s, {
131
+ }, ye = (e) => {
132
+ const { blockProps: l, styles: t, content: a, level: o = "h1", children: n = null } = e;
133
+ return n ? p.createElement(o, { ...t, ...l }, n) : p.createElement(o, {
143
134
  ...t,
144
135
  ...l,
145
136
  "data-ai-key": "content",
146
137
  "data-ai-type": "html",
147
138
  dangerouslySetInnerHTML: { __html: a }
148
139
  });
149
- }, Be = {
140
+ }, _e = {
150
141
  type: "Heading",
151
142
  label: "web_blocks.heading",
152
143
  category: "core",
153
- icon: Y,
144
+ icon: V,
154
145
  group: "typography",
155
146
  props: {
156
147
  level: v({
@@ -170,20 +161,20 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
170
161
  content: L({ title: "web_blocks.content", default: "Heading goes here" })
171
162
  },
172
163
  canAcceptBlock: (e) => e === "Span" || e === "Text"
173
- }, je = (e) => {
164
+ }, we = (e) => {
174
165
  const { blockProps: l, styles: t, content: a } = e;
175
- return ie(e.children) ? p.createElement("p", {
166
+ return ne(e.children) ? p.createElement("p", {
176
167
  ...t,
177
168
  ...l,
178
169
  "data-ai-key": "content",
179
170
  "data-ai-type": "html",
180
171
  dangerouslySetInnerHTML: { __html: a }
181
172
  }) : p.createElement("p", { ...t, ...l }, e.children);
182
- }, Ie = {
173
+ }, xe = {
183
174
  type: "Paragraph",
184
175
  label: "web_blocks.paragraph",
185
176
  category: "core",
186
- icon: Z,
177
+ icon: W,
187
178
  group: "typography",
188
179
  props: {
189
180
  styles: m({ default: "" }),
@@ -193,15 +184,15 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
193
184
  })
194
185
  },
195
186
  canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
196
- }, Le = (e) => {
197
- const { blockProps: l, styles: t, content: a, children: s = null, tag: r } = e;
198
- return s ? p.createElement("span", { ...t, ...l }, s) : p.createElement(r || "span", {
187
+ }, ve = (e) => {
188
+ const { blockProps: l, styles: t, content: a, children: o = null, tag: n } = e;
189
+ return o ? p.createElement("span", { ...t, ...l }, o) : p.createElement(n || "span", {
199
190
  ...t,
200
191
  ...l,
201
192
  "data-ai-key": "content",
202
193
  dangerouslySetInnerHTML: { __html: a }
203
194
  });
204
- }, Ce = {
195
+ }, Be = {
205
196
  type: "Span",
206
197
  label: "web_blocks.span",
207
198
  category: "core",
@@ -211,9 +202,9 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
211
202
  content: L({ title: "web_blocks.content", default: "" })
212
203
  },
213
204
  canAcceptBlock: () => !0
214
- }, Se = (e) => {
205
+ }, Ie = (e) => {
215
206
  const { blockProps: l, content: t, styles: a } = e;
216
- return /* @__PURE__ */ o.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ o.jsx(
207
+ return /* @__PURE__ */ s.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ s.jsx(
217
208
  "div",
218
209
  {
219
210
  "data-ai-key": "content",
@@ -223,11 +214,11 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
223
214
  dangerouslySetInnerHTML: { __html: t }
224
215
  }
225
216
  ) });
226
- }, Me = {
217
+ }, je = {
227
218
  type: "RichText",
228
219
  label: "web_blocks.richtext",
229
220
  category: "core",
230
- icon: J,
221
+ icon: X,
231
222
  group: "typography",
232
223
  props: {
233
224
  styles: m({ default: "" }),
@@ -236,57 +227,57 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
236
227
  default: "<p>This is a rich text block. You can add text, and other content here.</p>"
237
228
  })
238
229
  }
239
- }, Ne = (e) => {
240
- const { blockProps: l, link: t, children: a, styles: s, inBuilder: r, content: n } = e;
241
- return !a && y(s == null ? void 0 : s.className) && y(n) ? /* @__PURE__ */ o.jsx(_, { inBuilder: r }) : r ? a ? /* @__PURE__ */ o.jsx("span", { ...l, ...s, children: a }) : p.createElement("span", {
230
+ }, Le = (e) => {
231
+ const { blockProps: l, link: t, children: a, styles: o, inBuilder: n, content: r } = e;
232
+ return !a && y(o == null ? void 0 : o.className) && y(r) ? /* @__PURE__ */ s.jsx(_, { inBuilder: n }) : n ? a ? /* @__PURE__ */ s.jsx("span", { ...l, ...o, children: a }) : p.createElement("span", {
242
233
  ...l,
243
- ...s,
244
- dangerouslySetInnerHTML: { __html: n }
245
- }) : a ? /* @__PURE__ */ o.jsx("a", { href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...l, ...s, children: a }) : p.createElement("a", {
234
+ ...o,
235
+ dangerouslySetInnerHTML: { __html: r }
236
+ }) : a ? /* @__PURE__ */ s.jsx("a", { href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...l, ...o, children: a }) : p.createElement("a", {
246
237
  ...l,
247
- ...s,
238
+ ...o,
248
239
  "data-ai-key": "content",
249
240
  href: (t == null ? void 0 : t.href) || "#",
250
241
  target: (t == null ? void 0 : t.target) || "_self",
251
- dangerouslySetInnerHTML: { __html: n }
242
+ dangerouslySetInnerHTML: { __html: r }
252
243
  });
253
- }, $e = {
244
+ }, Ce = {
254
245
  type: "Link",
255
246
  label: "web_blocks.link",
256
247
  category: "core",
257
- icon: K,
248
+ icon: Y,
258
249
  group: "basic",
259
250
  props: {
260
251
  styles: m({ default: "" }),
261
252
  content: b({ title: "web_blocks.content", default: "" }),
262
- link: D({
253
+ link: R({
263
254
  title: "web_blocks.link",
264
255
  default: { type: "page", target: "_self", href: "#" }
265
256
  })
266
257
  },
267
258
  canAcceptBlock: (e) => e !== "Link"
268
- }, R = (e, ...l) => ({
259
+ }, D = (e, ...l) => ({
269
260
  ...e,
270
- className: I(e.className, ...l)
271
- }), Ee = (e) => {
272
- const { blockProps: l, children: t, styles: a, inBuilder: s, content: r, href: n } = e, { hrefType: i, autoplay: c, maxWidth: d, backdropColor: h, galleryName: f } = e, k = R(a, "cb-lightbox");
273
- if (!t && y(a == null ? void 0 : a.className) && y(r))
274
- return /* @__PURE__ */ o.jsx(_, { inBuilder: s });
275
- if (s)
276
- return t ? /* @__PURE__ */ o.jsx("span", { ...l, ...k, children: t }) : p.createElement("span", {
261
+ className: j(e.className, ...l)
262
+ }), Se = (e) => {
263
+ const { blockProps: l, children: t, styles: a, inBuilder: o, content: n, href: r } = e, { hrefType: i, autoplay: c, maxWidth: d, backdropColor: h, galleryName: f } = e, g = D(a, "cb-lightbox");
264
+ if (!t && y(a == null ? void 0 : a.className) && y(n))
265
+ return /* @__PURE__ */ s.jsx(_, { inBuilder: o });
266
+ if (o)
267
+ return t ? /* @__PURE__ */ s.jsx("span", { ...l, ...g, children: t }) : p.createElement("span", {
277
268
  ...l,
278
- ...k,
279
- dangerouslySetInnerHTML: { __html: r }
269
+ ...g,
270
+ dangerouslySetInnerHTML: { __html: n }
280
271
  });
281
272
  const w = {};
282
- return w["data-vbtype"] = i, c && (w["data-autoplay"] = "true"), d && (w["data-maxwidth"] = d + "px"), h && (w["data-overlay"] = h), f && (w["data-gall"] = f), t ? /* @__PURE__ */ o.jsx("a", { ...w, href: n || "#/", ...l, ...k, children: t }) : p.createElement("a", {
273
+ return w["data-vbtype"] = i, c && (w["data-autoplay"] = "true"), d && (w["data-maxwidth"] = d + "px"), h && (w["data-overlay"] = h), f && (w["data-gall"] = f), t ? /* @__PURE__ */ s.jsx("a", { ...w, href: r || "#/", ...l, ...g, children: t }) : p.createElement("a", {
283
274
  ...l,
284
- ...k,
275
+ ...g,
285
276
  ...w,
286
- href: n || "#",
287
- dangerouslySetInnerHTML: { __html: r }
277
+ href: r || "#",
278
+ dangerouslySetInnerHTML: { __html: n }
288
279
  });
289
- }, Pe = {
280
+ }, Me = {
290
281
  type: "LightBoxLink",
291
282
  label: "web_blocks.lightbox_link",
292
283
  category: "core",
@@ -306,23 +297,23 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
306
297
  { value: "ajax", title: "web_blocks.ajax" }
307
298
  ]
308
299
  }),
309
- autoplay: g({ title: "web_blocks.autoplay", default: !1 }),
310
- maxWidth: j({ title: "web_blocks.max_width", default: "" }),
300
+ autoplay: k({ title: "web_blocks.autoplay", default: !1 }),
301
+ maxWidth: I({ title: "web_blocks.max_width", default: "" }),
311
302
  backdropColor: b({ title: "backdrop_color", default: "" }),
312
303
  galleryName: b({ title: "web_blocks.gallery_name", default: "" })
313
304
  },
314
305
  canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
315
- }, Te = (e) => {
316
- const { blockProps: l, children: t, listType: a, styles: s, tag: r, inBuilder: n } = e, i = I(x(s, "className", ""), a);
317
- return !t && y(s == null ? void 0 : s.className) ? /* @__PURE__ */ o.jsx(_, { inBuilder: n }) : p.createElement(
318
- r || (a === "list-decimal" ? "ol" : "ul"),
319
- { ...l, ...s, className: i },
306
+ }, Ne = (e) => {
307
+ const { blockProps: l, children: t, listType: a, styles: o, tag: n, inBuilder: r } = e, i = j(x(o, "className", ""), a);
308
+ return !t && y(o == null ? void 0 : o.className) ? /* @__PURE__ */ s.jsx(_, { inBuilder: r }) : p.createElement(
309
+ n || (a === "list-decimal" ? "ol" : "ul"),
310
+ { ...l, ...o, className: i },
320
311
  t
321
312
  );
322
- }, He = {
313
+ }, $e = {
323
314
  type: "List",
324
315
  label: "web_blocks.list",
325
- icon: Q,
316
+ icon: Z,
326
317
  category: "core",
327
318
  group: "basic",
328
319
  props: {
@@ -362,18 +353,18 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
362
353
  content: "Item 3"
363
354
  }
364
355
  ]
365
- }, ze = (e) => {
366
- const { blockProps: l, content: t, styles: a, children: s, tag: r } = e;
367
- return s ? p.createElement(r || "li", { ...a, ...l }, s) : p.createElement(r || "li", {
356
+ }, Ee = (e) => {
357
+ const { blockProps: l, content: t, styles: a, children: o, tag: n } = e;
358
+ return o ? p.createElement(n || "li", { ...a, ...l }, o) : p.createElement(n || "li", {
368
359
  ...a,
369
360
  ...l,
370
361
  "data-ai-key": "content",
371
362
  dangerouslySetInnerHTML: { __html: t }
372
363
  });
373
- }, qe = {
364
+ }, Pe = {
374
365
  type: "ListItem",
375
366
  label: "web_blocks.listitem",
376
- icon: ee,
367
+ icon: J,
377
368
  category: "core",
378
369
  group: "basic",
379
370
  props: {
@@ -382,21 +373,21 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
382
373
  },
383
374
  canAcceptBlock: (e) => e !== "ListItem",
384
375
  canBeNested: (e) => e === "List"
385
- }, Ae = (e) => {
386
- const { blockProps: l, icon: t, styles: a, width: s, inBuilder: r, height: n } = e, i = R(a, I(s ? `w-[${s}px]` : "", n ? `h-[${n}px]` : ""));
376
+ }, Te = (e) => {
377
+ const { blockProps: l, icon: t, styles: a, width: o, inBuilder: n, height: r } = e, i = D(a, j(o ? `w-[${o}px]` : "", r ? `h-[${r}px]` : ""));
387
378
  if (y(t))
388
- return /* @__PURE__ */ o.jsx(_, { inBuilder: r, className: "h-8 w-14" });
379
+ return /* @__PURE__ */ s.jsx(_, { inBuilder: n, className: "h-8 w-14" });
389
380
  const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
390
381
  return p.createElement("span", {
391
382
  ...l,
392
383
  ...i,
393
384
  dangerouslySetInnerHTML: { __html: c }
394
385
  });
395
- }, Re = {
386
+ }, He = {
396
387
  type: "Icon",
397
388
  label: "web_blocks.icon",
398
389
  category: "core",
399
- icon: te,
390
+ icon: K,
400
391
  group: "media",
401
392
  props: {
402
393
  styles: m({ default: "text-black" }),
@@ -404,21 +395,21 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
404
395
  title: "web_blocks.icon",
405
396
  default: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>'
406
397
  }),
407
- width: j({ title: "web_blocks.width", default: "" }),
408
- height: j({ title: "web_blocks.height", default: "" })
398
+ width: I({ title: "web_blocks.width", default: "" }),
399
+ height: I({ title: "web_blocks.height", default: "" })
409
400
  }
410
- }, De = (e) => {
411
- const { blockProps: l, image: t, styles: a, alt: s, height: r, width: n } = e;
412
- return y(t) ? /* @__PURE__ */ o.jsx(_, { className: "h-36" }) : p.createElement("img", {
401
+ }, ze = (e) => {
402
+ const { blockProps: l, image: t, styles: a, alt: o, height: n, width: r } = e;
403
+ return y(t) ? /* @__PURE__ */ s.jsx(_, { className: "h-36" }) : p.createElement("img", {
413
404
  ...l,
414
405
  ...a,
415
406
  src: t,
416
- alt: s,
407
+ alt: o,
417
408
  loading: "lazy",
418
- height: r,
419
- width: n
409
+ height: n,
410
+ width: r
420
411
  });
421
- }, Fe = {
412
+ }, qe = {
422
413
  type: "Image",
423
414
  label: "web_blocks.image",
424
415
  category: "core",
@@ -434,7 +425,7 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
434
425
  width: b({ title: "web_blocks.width", default: "" }),
435
426
  height: b({ title: "web_blocks.height", default: "" })
436
427
  }
437
- }, $ = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, E = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, P = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Ge = (e) => {
428
+ }, $ = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, E = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, P = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Ae = (e) => {
438
429
  if ($.test(e)) {
439
430
  const l = e.match($);
440
431
  return l ? `https://www.youtube.com/embed/${l[4]}` : e;
@@ -448,16 +439,16 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
448
439
  return l ? `https://www.dailymotion.com/embed/video/${l[4]}` : e;
449
440
  }
450
441
  return null;
451
- }, Ue = p.memo(
442
+ }, De = p.memo(
452
443
  (e) => {
453
- const { blockProps: l, inBuilder: t, styles: a, url: s, controls: r } = e, n = x(r, "autoPlay", !1), i = x(r, "controls", !1), c = n || x(r, "muted", !0), d = x(r, "loop", !1);
454
- if (y(s))
455
- return /* @__PURE__ */ o.jsx(_, { inBuilder: t, className: "h-36" });
456
- let h = Ge(s), f = null;
444
+ const { blockProps: l, inBuilder: t, styles: a, url: o, controls: n } = e, r = x(n, "autoPlay", !1), i = x(n, "controls", !1), c = r || x(n, "muted", !0), d = x(n, "loop", !1);
445
+ if (y(o))
446
+ return /* @__PURE__ */ s.jsx(_, { inBuilder: t, className: "h-36" });
447
+ let h = Ae(o), f = null;
457
448
  if (h) {
458
449
  if (!y(h)) {
459
- const k = [];
460
- k.push(`autoplay=${n ? 1 : 0}`), k.push(`controls=${r ? 1 : 0}`), k.push(`mute=${c ? 1 : 0}&muted=${c ? 1 : 0}`), k.push(`loop=${d ? 1 : 0}`), h = `${h}?${k.join("&")}`;
450
+ const g = [];
451
+ g.push(`autoplay=${r ? 1 : 0}`), g.push(`controls=${n ? 1 : 0}`), g.push(`mute=${c ? 1 : 0}&muted=${c ? 1 : 0}`), g.push(`loop=${d ? 1 : 0}`), h = `${h}?${g.join("&")}`;
461
452
  }
462
453
  f = p.createElement("iframe", {
463
454
  ...l,
@@ -471,22 +462,22 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
471
462
  f = p.createElement("video", {
472
463
  ...l,
473
464
  className: "absolute inset-0 w-full h-full",
474
- src: s,
465
+ src: o,
475
466
  controls: i,
476
467
  muted: c,
477
- autoPlay: t ? !1 : n,
468
+ autoPlay: t ? !1 : r,
478
469
  loop: d
479
470
  });
480
- return /* @__PURE__ */ o.jsx("div", { ...de(a, ["className"]), children: /* @__PURE__ */ o.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
481
- t ? /* @__PURE__ */ o.jsx("div", { ...l, ...ue(a, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
471
+ return /* @__PURE__ */ s.jsx("div", { ...re(a, ["className"]), children: /* @__PURE__ */ s.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
472
+ t ? /* @__PURE__ */ s.jsx("div", { ...l, ...ce(a, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
482
473
  f
483
474
  ] }) });
484
475
  }
485
- ), Oe = {
476
+ ), Re = {
486
477
  type: "Video",
487
478
  label: "web_blocks.video",
488
479
  category: "core",
489
- icon: le,
480
+ icon: Q,
490
481
  group: "media",
491
482
  props: {
492
483
  styles: m({ default: "" }),
@@ -497,25 +488,25 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
497
488
  controls: F({
498
489
  title: "web_blocks.controls",
499
490
  properties: {
500
- autoPlay: g({ title: "web_blocks.autoplay", default: !0 }),
501
- controls: g({ title: "web_blocks.controls", default: !1 }),
502
- loop: g({ title: "web_blocks.loop", default: !1 }),
503
- muted: g({ title: "web_blocks.muted", default: !0 })
491
+ autoPlay: k({ title: "web_blocks.autoplay", default: !0 }),
492
+ controls: k({ title: "web_blocks.controls", default: !1 }),
493
+ loop: k({ title: "web_blocks.loop", default: !1 }),
494
+ muted: k({ title: "web_blocks.muted", default: !0 })
504
495
  }
505
496
  })
506
497
  }
507
498
  };
508
- function Ve(e) {
499
+ function Fe(e) {
509
500
  return G({ tag: "svg", attr: { version: "1.1", viewBox: "0 0 32 32" }, child: [{ tag: "path", attr: { d: "M4.698 3.419l2.057 23.073 9.231 2.563 9.256-2.566 2.059-23.069h-22.604zM13.226 9.394l-0.409 4.441 9.671 0.001-0.069 0.76-0.665 7.45-0.042 0.478-5.804 1.609-5.796-1.609-0.396-4.443h2.84l0.202 2.257 3.154 0.85 3.156-0.852 0.328-3.67-9.671-0.001 0.069-0.76 0.665-7.45 0.209-2.086h11.287l0.131 1.598 0.403 4.453h-2.841l-0.262-2.922-2.889-0.174h-0.515v-0.004l-2.755 0.074z" }, child: [] }] })(e);
510
501
  }
511
- const We = (e) => {
502
+ const Ge = (e) => {
512
503
  const { scripts: l, inBuilder: t, blockProps: a } = e;
513
- return t ? /* @__PURE__ */ o.jsx("div", { ...a, children: /* @__PURE__ */ o.jsx("div", { className: I("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ o.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ o.jsx("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ o.jsx("div", { dangerouslySetInnerHTML: { __html: l } });
514
- }, Xe = {
504
+ return t ? /* @__PURE__ */ s.jsx("div", { ...a, children: /* @__PURE__ */ s.jsx("div", { className: j("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ s.jsx("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ s.jsx("div", { dangerouslySetInnerHTML: { __html: l } });
505
+ }, Oe = {
515
506
  type: "CustomScript",
516
507
  label: "web_blocks.custom_script",
517
508
  category: "core",
518
- icon: Ve,
509
+ icon: Fe,
519
510
  group: "advanced",
520
511
  props: {
521
512
  scripts: T({
@@ -524,23 +515,23 @@ const We = (e) => {
524
515
  placeholder: "<script>console.log('Hello, world!');<\/script>"
525
516
  })
526
517
  }
527
- }, Ye = (e) => {
518
+ }, Ue = (e) => {
528
519
  const { blockProps: l, styles: t } = e;
529
520
  return p.createElement("hr", { ...t, ...l });
530
- }, Ze = {
521
+ }, Ve = {
531
522
  type: "Divider",
532
523
  label: "web_blocks.divider",
533
524
  category: "core",
534
- icon: oe,
525
+ icon: ee,
535
526
  group: "basic",
536
527
  props: {
537
528
  styles: m({ default: "bg-gray-900 h-0.5 py-2 my-1" })
538
529
  }
539
- }, Je = () => null, Ke = {
530
+ }, We = () => null, Xe = {
540
531
  type: "Dark Mode",
541
532
  label: "web_blocks.dark_mode",
542
533
  category: "core",
543
- icon: se,
534
+ icon: te,
544
535
  group: "advanced",
545
536
  props: {},
546
537
  blocks: () => [
@@ -592,53 +583,32 @@ const We = (e) => {
592
583
  icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='4'></circle><path d='M12 2v2'></path><path d='M12 20v2'></path><path d='m4.93 4.93 1.41 1.41'></path><path d='m17.66 17.66 1.41 1.41'></path><path d='M2 12h2'></path><path d='M20 12h2'></path><path d='m6.34 17.66-1.41 1.41'></path><path d='m19.07 4.93-1.41 1.41'></path></svg>"
593
584
  }
594
585
  ]
595
- }, Qe = () => {
596
- const e = U(), { data: l, refetch: t, isLoading: a } = O(), s = V();
597
- return /* @__PURE__ */ o.jsxs("div", { children: [
598
- /* @__PURE__ */ o.jsx("label", { className: "text-sm", children: "Choose a global block" }),
599
- /* @__PURE__ */ o.jsxs(
600
- "select",
601
- {
602
- className: "h-8 w-full rounded-md border border-gray-300 p-0 px-2 text-xs dark:border-gray-600",
603
- value: (e == null ? void 0 : e.globalBlock) || "",
604
- onChange: (r) => {
605
- s([e._id], { globalBlock: r.target.value });
606
- },
607
- children: [
608
- /* @__PURE__ */ o.jsx("option", { value: "", children: "Select a global block" }),
609
- Object.keys(l).map((r) => /* @__PURE__ */ o.jsx("option", { value: r, children: l[r].name || r }, r))
610
- ]
611
- }
612
- ),
613
- /* @__PURE__ */ o.jsx("div", { className: "mt-2 text-xs", children: /* @__PURE__ */ o.jsx(pe, { size: "sm", variant: "outline", onClick: t, className: "text-xs", children: a ? "Loading..." : "Refresh List" }) })
614
- ] });
615
- }, et = (e) => {
616
- const { blockProps: l, inBuilder: t, children: a, globalBlock: s } = e;
617
- return t && !s ? /* @__PURE__ */ o.jsxs(
586
+ }, Ye = (e) => {
587
+ const { blockProps: l, inBuilder: t, children: a, globalBlock: o } = e;
588
+ return t && !o ? /* @__PURE__ */ s.jsxs(
618
589
  "div",
619
590
  {
620
591
  className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
621
592
  ...l,
622
593
  children: [
623
- /* @__PURE__ */ o.jsxs("h1", { children: [
594
+ /* @__PURE__ */ s.jsxs("h1", { children: [
624
595
  "Global Block - ",
625
- s
596
+ o
626
597
  ] }),
627
- /* @__PURE__ */ o.jsx("p", { children: "Choose a block from the sidebar to add it to this page." })
598
+ /* @__PURE__ */ s.jsx("p", { children: "Choose a block from the sidebar to add it to this page." })
628
599
  ]
629
600
  }
630
601
  ) : p.createElement("div", { ...l }, a);
631
- }, tt = {
602
+ }, Ze = {
632
603
  type: "GlobalBlock",
633
604
  label: "Global Block",
634
- icon: be,
605
+ icon: ie,
635
606
  category: "core",
636
607
  group: "advanced",
637
608
  props: {
638
609
  globalBlock: b({ title: "global block", default: "", hidden: !0 })
639
- },
640
- propsEditor: Qe
641
- }, lt = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ o.jsx("span", { "data-ai-key": "content", ...e.blockProps, children: e.content }) : `${e.content}`, ot = {
610
+ }
611
+ }, Je = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ s.jsx("span", { "data-ai-key": "content", ...e.blockProps, children: e.content }) : `${e.content}`, Ke = {
642
612
  type: "Text",
643
613
  label: "web_blocks.text",
644
614
  hidden: !0,
@@ -648,11 +618,11 @@ const We = (e) => {
648
618
  props: {
649
619
  content: L({ title: "web_blocks.content", defaultValue: "" })
650
620
  }
651
- }, st = (e) => {
652
- const { blockProps: l, backgroundImage: t, children: a, styles: s } = e;
653
- let r = {};
654
- return t && (r = { backgroundImage: `url(${t})` }), p.createElement("div", { ...l, ...s, style: r }, a);
655
- }, at = {
621
+ }, Qe = (e) => {
622
+ const { blockProps: l, backgroundImage: t, children: a, styles: o } = e;
623
+ let n = {};
624
+ return t && (n = { backgroundImage: `url(${t})` }), p.createElement("div", { ...l, ...o, style: n }, a);
625
+ }, et = {
656
626
  type: "Body",
657
627
  label: "Body",
658
628
  category: "core",
@@ -666,10 +636,10 @@ const We = (e) => {
666
636
  canDelete: () => !1,
667
637
  canMove: () => !1,
668
638
  canDuplicate: () => !1
669
- }, rt = (e) => {
639
+ }, tt = (e) => {
670
640
  const { blockProps: l, styles: t } = e;
671
641
  return p.createElement("br", { ...l, ...t });
672
- }, nt = {
642
+ }, lt = {
673
643
  type: "LineBreak",
674
644
  label: "Line Break",
675
645
  category: "core",
@@ -679,10 +649,10 @@ const We = (e) => {
679
649
  props: {
680
650
  styles: m({ default: "" })
681
651
  }
682
- }, ct = (e) => {
683
- const { blockProps: l, errorMessage: t, name: a, _type: s, successMessage: r, action: n, styles: i, children: c } = e;
652
+ }, ot = (e) => {
653
+ const { blockProps: l, errorMessage: t, name: a, _type: o, successMessage: n, action: r, styles: i, children: c } = e;
684
654
  let d = c;
685
- c || (d = /* @__PURE__ */ o.jsx(_, {}));
655
+ c || (d = /* @__PURE__ */ s.jsx(_, {}));
686
656
  const h = {
687
657
  "x-data": "{}",
688
658
  "x-on:submit.prevent": "post"
@@ -690,28 +660,28 @@ const We = (e) => {
690
660
  "x-html": "",
691
661
  ":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
692
662
  };
693
- return /* @__PURE__ */ o.jsxs(
663
+ return /* @__PURE__ */ s.jsxs(
694
664
  "form",
695
665
  {
696
666
  ...h,
697
667
  "data-error": t,
698
- "data-success": r,
668
+ "data-success": n,
699
669
  method: "post",
700
- action: n,
670
+ action: r,
701
671
  ...l,
702
672
  ...i,
703
673
  children: [
704
- /* @__PURE__ */ o.jsx("div", { ...f }),
705
- /* @__PURE__ */ o.jsx("input", { name: "formname", type: "hidden", value: a || s }),
674
+ /* @__PURE__ */ s.jsx("div", { ...f }),
675
+ /* @__PURE__ */ s.jsx("input", { name: "formname", type: "hidden", value: a || o }),
706
676
  d
707
677
  ]
708
678
  }
709
679
  );
710
- }, it = {
680
+ }, st = {
711
681
  type: "Form",
712
682
  label: "web_blocks.form",
713
683
  category: "core",
714
- icon: ae,
684
+ icon: le,
715
685
  group: "form",
716
686
  props: {
717
687
  styles: m({ default: "" }),
@@ -729,26 +699,26 @@ const We = (e) => {
729
699
  })
730
700
  },
731
701
  canAcceptBlock: () => !0
732
- }, dt = (e) => {
733
- const { blockProps: l, inBuilder: t, label: a, styles: s, inputStyles: r, icon: n, iconPos: i } = e, c = B(), d = {
702
+ }, at = (e) => {
703
+ const { blockProps: l, inBuilder: t, label: a, styles: o, inputStyles: n, icon: r, iconPos: i } = e, c = B(), d = {
734
704
  "x-bind:disabled": "formLoading"
735
705
  };
736
- return /* @__PURE__ */ o.jsxs(
706
+ return /* @__PURE__ */ s.jsxs(
737
707
  "button",
738
708
  {
739
709
  id: c,
740
710
  ...d,
741
- ...r,
742
- ...s,
711
+ ...n,
712
+ ...o,
743
713
  ...l || {},
744
714
  type: t ? "button" : "submit",
745
715
  children: [
746
716
  a,
747
- n && /* @__PURE__ */ o.jsx("span", { className: i, dangerouslySetInnerHTML: { __html: n } })
717
+ r && /* @__PURE__ */ s.jsx("span", { className: i, dangerouslySetInnerHTML: { __html: r } })
748
718
  ]
749
719
  }
750
720
  );
751
- }, ut = {
721
+ }, nt = {
752
722
  type: "FormButton",
753
723
  label: "web_blocks.submit_button",
754
724
  category: "core",
@@ -769,40 +739,40 @@ const We = (e) => {
769
739
  ]
770
740
  })
771
741
  }
772
- }, bt = (e) => {
742
+ }, rt = (e) => {
773
743
  const {
774
744
  blockProps: l,
775
745
  label: t,
776
746
  placeholder: a,
777
- styles: s,
778
- inputStyles: r,
779
- showLabel: n,
747
+ styles: o,
748
+ inputStyles: n,
749
+ showLabel: r,
780
750
  required: i,
781
751
  inputType: c = "text",
782
752
  inBuilder: d,
783
753
  fieldName: h
784
754
  } = e, f = B();
785
- return !n || c === "submit" ? (c === "submit" && (l.value = t), /* @__PURE__ */ o.jsx(
755
+ return !r || c === "submit" ? (c === "submit" && (l.value = t), /* @__PURE__ */ s.jsx(
786
756
  "input",
787
757
  {
788
758
  id: f,
789
759
  name: h,
790
760
  readOnly: d,
791
761
  ...l,
792
- ...r,
793
- ...s,
762
+ ...n,
763
+ ...o,
794
764
  type: c,
795
765
  placeholder: a,
796
766
  required: i
797
767
  }
798
- )) : /* @__PURE__ */ o.jsxs("div", { ...s, ...l, children: [
799
- n && /* @__PURE__ */ o.jsx("label", { htmlFor: f, children: t }),
800
- /* @__PURE__ */ o.jsx(
768
+ )) : /* @__PURE__ */ s.jsxs("div", { ...o, ...l, children: [
769
+ r && /* @__PURE__ */ s.jsx("label", { htmlFor: f, children: t }),
770
+ /* @__PURE__ */ s.jsx(
801
771
  "input",
802
772
  {
803
773
  name: h,
804
774
  readOnly: d,
805
- ...r,
775
+ ...n,
806
776
  id: f,
807
777
  type: c,
808
778
  placeholder: a,
@@ -810,7 +780,7 @@ const We = (e) => {
810
780
  }
811
781
  )
812
782
  ] });
813
- }, pt = {
783
+ }, ct = {
814
784
  type: "Input",
815
785
  label: "web_blocks.input",
816
786
  category: "core",
@@ -831,63 +801,63 @@ const We = (e) => {
831
801
  default: "text"
832
802
  }),
833
803
  value: b({ title: "web_blocks.value", default: "" }),
834
- showLabel: g({ title: "web_blocks.show_label", default: !0 }),
804
+ showLabel: k({ title: "web_blocks.show_label", default: !0 }),
835
805
  inputStyles: m({ default: "w-full p-1" }),
836
806
  label: b({ title: "web_blocks.label", default: "Label" }),
837
807
  placeholder: b({
838
808
  title: "web_blocks.placeholder",
839
809
  default: "Placeholder"
840
810
  }),
841
- required: g({ title: "web_blocks.required", default: !1 })
811
+ required: k({ title: "web_blocks.required", default: !1 })
842
812
  }
843
- }, mt = (e) => {
844
- const { blockProps: l, fieldName: t, label: a, styles: s, inputStyles: r, checked: n, required: i, showLabel: c = !0 } = e, d = B();
845
- return c ? /* @__PURE__ */ o.jsxs("div", { ...s, ...l, children: [
846
- /* @__PURE__ */ o.jsx("input", { ...r, name: t, id: d, type: "radio", required: i, defaultChecked: n }),
847
- a && /* @__PURE__ */ o.jsx("label", { htmlFor: d, children: a })
848
- ] }) : /* @__PURE__ */ o.jsx(
813
+ }, it = (e) => {
814
+ const { blockProps: l, fieldName: t, label: a, styles: o, inputStyles: n, checked: r, required: i, showLabel: c = !0 } = e, d = B();
815
+ return c ? /* @__PURE__ */ s.jsxs("div", { ...o, ...l, children: [
816
+ /* @__PURE__ */ s.jsx("input", { ...n, name: t, id: d, type: "radio", required: i, defaultChecked: r }),
817
+ a && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: a })
818
+ ] }) : /* @__PURE__ */ s.jsx(
849
819
  "input",
850
820
  {
851
821
  id: d,
852
822
  ...l,
853
- ...r,
854
- ...s,
823
+ ...n,
824
+ ...o,
855
825
  type: "radio",
856
826
  required: i,
857
- checked: n,
827
+ checked: r,
858
828
  name: t
859
829
  }
860
830
  );
861
- }, ft = {
831
+ }, dt = {
862
832
  type: "Radio",
863
833
  label: "web_blocks.radio",
864
834
  category: "core",
865
- icon: re,
835
+ icon: oe,
866
836
  group: "form",
867
837
  props: {
868
838
  styles: m({ default: "flex items-center w-max gap-x-2" }),
869
839
  fieldName: b({ title: "web_blocks.field_name", default: "radio" }),
870
840
  label: b({ title: "web_blocks.label", default: "Label" }),
871
- checked: g({ title: "web_blocks.checked", default: !1 }),
872
- required: g({ title: "web_blocks.required", default: !1 })
841
+ checked: k({ title: "web_blocks.checked", default: !1 }),
842
+ required: k({ title: "web_blocks.required", default: !1 })
873
843
  }
874
- }, ht = (e) => {
844
+ }, ut = (e) => {
875
845
  const {
876
846
  blockProps: l,
877
847
  fieldName: t,
878
848
  label: a,
879
- placeholder: s,
880
- styles: r,
881
- inputStyles: n,
849
+ placeholder: o,
850
+ styles: n,
851
+ inputStyles: r,
882
852
  required: i,
883
853
  showLabel: c,
884
854
  _multiple: d = !1
885
855
  } = e, h = B();
886
- return c ? /* @__PURE__ */ o.jsxs("div", { ...r, children: [
887
- c && /* @__PURE__ */ o.jsx("label", { htmlFor: h, children: a }),
888
- /* @__PURE__ */ o.jsxs("select", { ...n, id: h, required: i, multiple: d, name: t, children: [
889
- /* @__PURE__ */ o.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
890
- M(e.options, (f) => /* @__PURE__ */ o.jsx(
856
+ return c ? /* @__PURE__ */ s.jsxs("div", { ...n, children: [
857
+ c && /* @__PURE__ */ s.jsx("label", { htmlFor: h, children: a }),
858
+ /* @__PURE__ */ s.jsxs("select", { ...r, id: h, required: i, multiple: d, name: t, children: [
859
+ /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
860
+ M(e.options, (f) => /* @__PURE__ */ s.jsx(
891
861
  "option",
892
862
  {
893
863
  selected: x(f, "selected", !1),
@@ -897,18 +867,18 @@ const We = (e) => {
897
867
  f.value
898
868
  ))
899
869
  ] })
900
- ] }) : /* @__PURE__ */ o.jsxs(
870
+ ] }) : /* @__PURE__ */ s.jsxs(
901
871
  "select",
902
872
  {
903
873
  id: h,
904
- ...r,
874
+ ...n,
905
875
  ...l,
906
876
  required: i,
907
877
  multiple: d,
908
878
  name: t,
909
879
  children: [
910
- /* @__PURE__ */ o.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
911
- M(e.options, (f) => /* @__PURE__ */ o.jsx(
880
+ /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
881
+ M(e.options, (f) => /* @__PURE__ */ s.jsx(
912
882
  "option",
913
883
  {
914
884
  selected: x(f, "selected", !1),
@@ -920,25 +890,25 @@ const We = (e) => {
920
890
  ]
921
891
  }
922
892
  );
923
- }, gt = {
893
+ }, bt = {
924
894
  type: "Select",
925
895
  label: "web_blocks.select",
926
896
  category: "core",
927
- icon: ne,
897
+ icon: se,
928
898
  group: "form",
929
899
  props: {
930
900
  styles: m({ default: "" }),
931
901
  fieldName: b({ title: "web_blocks.field_name", default: "select" }),
932
- showLabel: g({ title: "web_blocks.show_label", default: !0 }),
902
+ showLabel: k({ title: "web_blocks.show_label", default: !0 }),
933
903
  inputStyles: m({ default: "w-full p-1" }),
934
904
  label: b({ title: "web_blocks.label", default: "Label" }),
935
905
  placeholder: b({
936
906
  title: "web_blocks.placeholder",
937
907
  default: "Placeholder"
938
908
  }),
939
- required: g({ title: "web_blocks.required", default: !1 }),
940
- _multiple: g({ title: "web_blocks.multiple", default: !1 }),
941
- options: W({
909
+ required: k({ title: "web_blocks.required", default: !1 }),
910
+ _multiple: k({ title: "web_blocks.multiple", default: !1 }),
911
+ options: O({
942
912
  title: "web_blocks.options",
943
913
  itemProperties: {
944
914
  label: b({ title: "web_blocks.label", default: "" }),
@@ -946,24 +916,24 @@ const We = (e) => {
946
916
  }
947
917
  })
948
918
  }
949
- }, kt = (e) => {
950
- const { blockProps: l, fieldName: t, label: a, placeholder: s, styles: r, inputStyles: n, _rows: i, showLabel: c } = e, d = B();
951
- return c ? /* @__PURE__ */ o.jsxs("div", { ...r, ...l, children: [
952
- c && /* @__PURE__ */ o.jsx("label", { htmlFor: d, children: a }),
953
- /* @__PURE__ */ o.jsx("textarea", { name: t, ...n, id: d, placeholder: s, rows: i })
954
- ] }) : /* @__PURE__ */ o.jsx(
919
+ }, pt = (e) => {
920
+ const { blockProps: l, fieldName: t, label: a, placeholder: o, styles: n, inputStyles: r, _rows: i, showLabel: c } = e, d = B();
921
+ return c ? /* @__PURE__ */ s.jsxs("div", { ...n, ...l, children: [
922
+ c && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: a }),
923
+ /* @__PURE__ */ s.jsx("textarea", { name: t, ...r, id: d, placeholder: o, rows: i })
924
+ ] }) : /* @__PURE__ */ s.jsx(
955
925
  "textarea",
956
926
  {
957
927
  id: d,
958
928
  name: t,
959
929
  ...l,
960
- ...n,
961
930
  ...r,
962
- placeholder: s,
931
+ ...n,
932
+ placeholder: o,
963
933
  rows: i
964
934
  }
965
935
  );
966
- }, yt = {
936
+ }, mt = {
967
937
  type: "TextArea",
968
938
  label: "web_blocks.textarea",
969
939
  category: "core",
@@ -971,7 +941,7 @@ const We = (e) => {
971
941
  group: "form",
972
942
  props: {
973
943
  fieldName: b({ title: "web_blocks.field_name", default: "textarea" }),
974
- showLabel: g({ title: "web_blocks.show_label", default: !0 }),
944
+ showLabel: k({ title: "web_blocks.show_label", default: !0 }),
975
945
  styles: m({ default: "" }),
976
946
  inputStyles: m({ default: "w-full p-1" }),
977
947
  label: b({ title: "web_blocks.label", default: "Label" }),
@@ -979,51 +949,51 @@ const We = (e) => {
979
949
  title: "web_blocks.placeholder",
980
950
  default: "Placeholder"
981
951
  }),
982
- _rows: j({ title: "web_blocks.rows", default: 3 })
952
+ _rows: I({ title: "web_blocks.rows", default: 3 })
983
953
  }
984
- }, _t = (e) => {
985
- const { blockProps: l, fieldName: t, label: a, styles: s, inputStyles: r, required: n, checked: i, showLabel: c = !0 } = e, d = B();
986
- return c ? /* @__PURE__ */ o.jsxs("div", { ...s, ...l, children: [
987
- /* @__PURE__ */ o.jsx(
954
+ }, ft = (e) => {
955
+ const { blockProps: l, fieldName: t, label: a, styles: o, inputStyles: n, required: r, checked: i, showLabel: c = !0 } = e, d = B();
956
+ return c ? /* @__PURE__ */ s.jsxs("div", { ...o, ...l, children: [
957
+ /* @__PURE__ */ s.jsx(
988
958
  "input",
989
959
  {
990
- ...r,
960
+ ...n,
991
961
  name: t,
992
962
  id: d,
993
963
  type: "checkbox",
994
- required: n,
964
+ required: r,
995
965
  defaultChecked: i
996
966
  }
997
967
  ),
998
- a && a !== "Label" && /* @__PURE__ */ o.jsx("label", { htmlFor: d, children: a })
999
- ] }) : /* @__PURE__ */ o.jsx(
968
+ a && a !== "Label" && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: a })
969
+ ] }) : /* @__PURE__ */ s.jsx(
1000
970
  "input",
1001
971
  {
1002
972
  id: d,
1003
973
  ...l,
1004
- ...r,
1005
- ...s,
974
+ ...n,
975
+ ...o,
1006
976
  type: "checkbox",
1007
- required: n,
977
+ required: r,
1008
978
  name: t
1009
979
  }
1010
980
  );
1011
- }, wt = {
981
+ }, ht = {
1012
982
  type: "Checkbox",
1013
983
  label: "web_blocks.checkbox",
1014
984
  category: "core",
1015
- icon: ce,
985
+ icon: ae,
1016
986
  group: "form",
1017
987
  props: {
1018
988
  fieldName: b({ title: "Field Name", default: "checkbox" }),
1019
989
  styles: m({ default: "flex items-center gap-x-2" }),
1020
990
  label: b({ title: "web_blocks.label", default: "Label" }),
1021
- checked: g({ title: "web_blocks.checked", default: !1 }),
1022
- required: g({ title: "web_blocks.required", default: !1 })
991
+ checked: k({ title: "web_blocks.checked", default: !1 }),
992
+ required: k({ title: "web_blocks.required", default: !1 })
1023
993
  }
1024
- }, At = () => {
1025
- u(fe, he), u(we, xe), u(ge, ke), u(ve, Be), u(je, Ie), u(Le, Ce), u(Se, Me), u(Ne, $e), u(Ee, Pe), u(Te, He), u(ze, qe), u(Ae, Re), u(De, Fe), u(Ue, Oe), u(ye, _e), u(lt, ot), u(ct, it), u(dt, ut), u(bt, pt), u(_t, wt), u(mt, ft), u(ht, gt), u(kt, yt), u(rt, nt), u(st, at), u(We, Xe), u(Ye, Ze), u(Je, Ke), u(et, tt);
994
+ }, It = () => {
995
+ u(ue, be), u(ke, ge), u(pe, me), u(ye, _e), u(we, xe), u(ve, Be), u(Ie, je), u(Le, Ce), u(Se, Me), u(Ne, $e), u(Ee, Pe), u(Te, He), u(ze, qe), u(De, Re), u(fe, he), u(Je, Ke), u(ot, st), u(at, nt), u(rt, ct), u(ft, ht), u(it, dt), u(ut, bt), u(pt, mt), u(tt, lt), u(Qe, et), u(Ge, Oe), u(Ue, Ve), u(We, Xe), u(Ye, Ze);
1026
996
  };
1027
997
  export {
1028
- At as loadWebBlocks
998
+ It as loadWebBlocks
1029
999
  };