@chaibuilder/sdk 1.2.92 → 1.2.93-beta.2

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 (43) hide show
  1. package/dist/CodeEditor-oXzf_WM-.cjs +1 -0
  2. package/dist/{CodeEditor-orTEdw7a.js → CodeEditor-p-F-Bwyu.js} +28 -30
  3. package/dist/{Topbar-OPlOc1Ha.js → Topbar-Ns8vNtP5.js} +19 -21
  4. package/dist/Topbar-RgbS4i_F.cjs +1 -0
  5. package/dist/{UnsplashImages-WaGyNL1z.js → UnsplashImages-Mc0XR9vF.js} +33 -35
  6. package/dist/UnsplashImages-pDkNL6f7.cjs +1 -0
  7. package/dist/{UploadImages-GiKofaXX.js → UploadImages-BF4_7sIk.js} +62 -37
  8. package/dist/UploadImages-KUCb9y7z.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-11fpvJA3.cjs +223 -0
  16. package/dist/{index-yJ1H6b2C.js → index-UmpQEfVx.js} +8977 -7762
  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/tailwind.cjs +1 -1
  24. package/dist/tailwind.js +6 -7
  25. package/dist/ui.cjs +1 -1
  26. package/dist/ui.js +112 -113
  27. package/dist/web-blocks.cjs +1 -1
  28. package/dist/web-blocks.js +237 -266
  29. package/package.json +1 -1
  30. package/dist/CodeEditor-awVVPqel.cjs +0 -1
  31. package/dist/Topbar--KOfsR94.cjs +0 -1
  32. package/dist/UnsplashImages-g-8MvB9W.cjs +0 -1
  33. package/dist/UploadImages-Ic_iZgWY.cjs +0 -1
  34. package/dist/_commonjsHelpers-f3sTPFkQ.js +0 -8
  35. package/dist/_commonjsHelpers-f52AuuUj.cjs +0 -1
  36. package/dist/button-9Duvj2dH.js +0 -42
  37. package/dist/button-oQgWN0j0.cjs +0 -1
  38. package/dist/context-menu-8MWP_Ikf.cjs +0 -1
  39. package/dist/iconBase-BnEC5_qG.js +0 -1583
  40. package/dist/iconBase-_bgMuxa5.cjs +0 -1
  41. package/dist/index-Hj8wMhx_.cjs +0 -223
  42. package/dist/plugin-02QsHeBE.cjs +0 -1
  43. 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,33 @@ 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
- 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 = {
609
+ globalBlock: b({ title: "global block", default: "" })
610
+ }
611
+ // propsEditor: GlobalBlockSettings,
612
+ }, Je = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ s.jsx("span", { "data-ai-key": "content", ...e.blockProps, children: e.content }) : `${e.content}`, Ke = {
642
613
  type: "Text",
643
614
  label: "web_blocks.text",
644
615
  hidden: !0,
@@ -648,11 +619,11 @@ const We = (e) => {
648
619
  props: {
649
620
  content: L({ title: "web_blocks.content", defaultValue: "" })
650
621
  }
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 = {
622
+ }, Qe = (e) => {
623
+ const { blockProps: l, backgroundImage: t, children: a, styles: o } = e;
624
+ let n = {};
625
+ return t && (n = { backgroundImage: `url(${t})` }), p.createElement("div", { ...l, ...o, style: n }, a);
626
+ }, et = {
656
627
  type: "Body",
657
628
  label: "Body",
658
629
  category: "core",
@@ -666,10 +637,10 @@ const We = (e) => {
666
637
  canDelete: () => !1,
667
638
  canMove: () => !1,
668
639
  canDuplicate: () => !1
669
- }, rt = (e) => {
640
+ }, tt = (e) => {
670
641
  const { blockProps: l, styles: t } = e;
671
642
  return p.createElement("br", { ...l, ...t });
672
- }, nt = {
643
+ }, lt = {
673
644
  type: "LineBreak",
674
645
  label: "Line Break",
675
646
  category: "core",
@@ -679,10 +650,10 @@ const We = (e) => {
679
650
  props: {
680
651
  styles: m({ default: "" })
681
652
  }
682
- }, ct = (e) => {
683
- const { blockProps: l, errorMessage: t, name: a, _type: s, successMessage: r, action: n, styles: i, children: c } = e;
653
+ }, ot = (e) => {
654
+ const { blockProps: l, errorMessage: t, name: a, _type: o, successMessage: n, action: r, styles: i, children: c } = e;
684
655
  let d = c;
685
- c || (d = /* @__PURE__ */ o.jsx(_, {}));
656
+ c || (d = /* @__PURE__ */ s.jsx(_, {}));
686
657
  const h = {
687
658
  "x-data": "{}",
688
659
  "x-on:submit.prevent": "post"
@@ -690,28 +661,28 @@ const We = (e) => {
690
661
  "x-html": "",
691
662
  ":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
692
663
  };
693
- return /* @__PURE__ */ o.jsxs(
664
+ return /* @__PURE__ */ s.jsxs(
694
665
  "form",
695
666
  {
696
667
  ...h,
697
668
  "data-error": t,
698
- "data-success": r,
669
+ "data-success": n,
699
670
  method: "post",
700
- action: n,
671
+ action: r,
701
672
  ...l,
702
673
  ...i,
703
674
  children: [
704
- /* @__PURE__ */ o.jsx("div", { ...f }),
705
- /* @__PURE__ */ o.jsx("input", { name: "formname", type: "hidden", value: a || s }),
675
+ /* @__PURE__ */ s.jsx("div", { ...f }),
676
+ /* @__PURE__ */ s.jsx("input", { name: "formname", type: "hidden", value: a || o }),
706
677
  d
707
678
  ]
708
679
  }
709
680
  );
710
- }, it = {
681
+ }, st = {
711
682
  type: "Form",
712
683
  label: "web_blocks.form",
713
684
  category: "core",
714
- icon: ae,
685
+ icon: le,
715
686
  group: "form",
716
687
  props: {
717
688
  styles: m({ default: "" }),
@@ -729,26 +700,26 @@ const We = (e) => {
729
700
  })
730
701
  },
731
702
  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 = {
703
+ }, at = (e) => {
704
+ const { blockProps: l, inBuilder: t, label: a, styles: o, inputStyles: n, icon: r, iconPos: i } = e, c = B(), d = {
734
705
  "x-bind:disabled": "formLoading"
735
706
  };
736
- return /* @__PURE__ */ o.jsxs(
707
+ return /* @__PURE__ */ s.jsxs(
737
708
  "button",
738
709
  {
739
710
  id: c,
740
711
  ...d,
741
- ...r,
742
- ...s,
712
+ ...n,
713
+ ...o,
743
714
  ...l || {},
744
715
  type: t ? "button" : "submit",
745
716
  children: [
746
717
  a,
747
- n && /* @__PURE__ */ o.jsx("span", { className: i, dangerouslySetInnerHTML: { __html: n } })
718
+ r && /* @__PURE__ */ s.jsx("span", { className: i, dangerouslySetInnerHTML: { __html: r } })
748
719
  ]
749
720
  }
750
721
  );
751
- }, ut = {
722
+ }, nt = {
752
723
  type: "FormButton",
753
724
  label: "web_blocks.submit_button",
754
725
  category: "core",
@@ -769,40 +740,40 @@ const We = (e) => {
769
740
  ]
770
741
  })
771
742
  }
772
- }, bt = (e) => {
743
+ }, rt = (e) => {
773
744
  const {
774
745
  blockProps: l,
775
746
  label: t,
776
747
  placeholder: a,
777
- styles: s,
778
- inputStyles: r,
779
- showLabel: n,
748
+ styles: o,
749
+ inputStyles: n,
750
+ showLabel: r,
780
751
  required: i,
781
752
  inputType: c = "text",
782
753
  inBuilder: d,
783
754
  fieldName: h
784
755
  } = e, f = B();
785
- return !n || c === "submit" ? (c === "submit" && (l.value = t), /* @__PURE__ */ o.jsx(
756
+ return !r || c === "submit" ? (c === "submit" && (l.value = t), /* @__PURE__ */ s.jsx(
786
757
  "input",
787
758
  {
788
759
  id: f,
789
760
  name: h,
790
761
  readOnly: d,
791
762
  ...l,
792
- ...r,
793
- ...s,
763
+ ...n,
764
+ ...o,
794
765
  type: c,
795
766
  placeholder: a,
796
767
  required: i
797
768
  }
798
- )) : /* @__PURE__ */ o.jsxs("div", { ...s, ...l, children: [
799
- n && /* @__PURE__ */ o.jsx("label", { htmlFor: f, children: t }),
800
- /* @__PURE__ */ o.jsx(
769
+ )) : /* @__PURE__ */ s.jsxs("div", { ...o, ...l, children: [
770
+ r && /* @__PURE__ */ s.jsx("label", { htmlFor: f, children: t }),
771
+ /* @__PURE__ */ s.jsx(
801
772
  "input",
802
773
  {
803
774
  name: h,
804
775
  readOnly: d,
805
- ...r,
776
+ ...n,
806
777
  id: f,
807
778
  type: c,
808
779
  placeholder: a,
@@ -810,7 +781,7 @@ const We = (e) => {
810
781
  }
811
782
  )
812
783
  ] });
813
- }, pt = {
784
+ }, ct = {
814
785
  type: "Input",
815
786
  label: "web_blocks.input",
816
787
  category: "core",
@@ -831,63 +802,63 @@ const We = (e) => {
831
802
  default: "text"
832
803
  }),
833
804
  value: b({ title: "web_blocks.value", default: "" }),
834
- showLabel: g({ title: "web_blocks.show_label", default: !0 }),
805
+ showLabel: k({ title: "web_blocks.show_label", default: !0 }),
835
806
  inputStyles: m({ default: "w-full p-1" }),
836
807
  label: b({ title: "web_blocks.label", default: "Label" }),
837
808
  placeholder: b({
838
809
  title: "web_blocks.placeholder",
839
810
  default: "Placeholder"
840
811
  }),
841
- required: g({ title: "web_blocks.required", default: !1 })
812
+ required: k({ title: "web_blocks.required", default: !1 })
842
813
  }
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(
814
+ }, it = (e) => {
815
+ const { blockProps: l, fieldName: t, label: a, styles: o, inputStyles: n, checked: r, required: i, showLabel: c = !0 } = e, d = B();
816
+ return c ? /* @__PURE__ */ s.jsxs("div", { ...o, ...l, children: [
817
+ /* @__PURE__ */ s.jsx("input", { ...n, name: t, id: d, type: "radio", required: i, defaultChecked: r }),
818
+ a && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: a })
819
+ ] }) : /* @__PURE__ */ s.jsx(
849
820
  "input",
850
821
  {
851
822
  id: d,
852
823
  ...l,
853
- ...r,
854
- ...s,
824
+ ...n,
825
+ ...o,
855
826
  type: "radio",
856
827
  required: i,
857
- checked: n,
828
+ checked: r,
858
829
  name: t
859
830
  }
860
831
  );
861
- }, ft = {
832
+ }, dt = {
862
833
  type: "Radio",
863
834
  label: "web_blocks.radio",
864
835
  category: "core",
865
- icon: re,
836
+ icon: oe,
866
837
  group: "form",
867
838
  props: {
868
839
  styles: m({ default: "flex items-center w-max gap-x-2" }),
869
840
  fieldName: b({ title: "web_blocks.field_name", default: "radio" }),
870
841
  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 })
842
+ checked: k({ title: "web_blocks.checked", default: !1 }),
843
+ required: k({ title: "web_blocks.required", default: !1 })
873
844
  }
874
- }, ht = (e) => {
845
+ }, ut = (e) => {
875
846
  const {
876
847
  blockProps: l,
877
848
  fieldName: t,
878
849
  label: a,
879
- placeholder: s,
880
- styles: r,
881
- inputStyles: n,
850
+ placeholder: o,
851
+ styles: n,
852
+ inputStyles: r,
882
853
  required: i,
883
854
  showLabel: c,
884
855
  _multiple: d = !1
885
856
  } = 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(
857
+ return c ? /* @__PURE__ */ s.jsxs("div", { ...n, children: [
858
+ c && /* @__PURE__ */ s.jsx("label", { htmlFor: h, children: a }),
859
+ /* @__PURE__ */ s.jsxs("select", { ...r, id: h, required: i, multiple: d, name: t, children: [
860
+ /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
861
+ M(e.options, (f) => /* @__PURE__ */ s.jsx(
891
862
  "option",
892
863
  {
893
864
  selected: x(f, "selected", !1),
@@ -897,18 +868,18 @@ const We = (e) => {
897
868
  f.value
898
869
  ))
899
870
  ] })
900
- ] }) : /* @__PURE__ */ o.jsxs(
871
+ ] }) : /* @__PURE__ */ s.jsxs(
901
872
  "select",
902
873
  {
903
874
  id: h,
904
- ...r,
875
+ ...n,
905
876
  ...l,
906
877
  required: i,
907
878
  multiple: d,
908
879
  name: t,
909
880
  children: [
910
- /* @__PURE__ */ o.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
911
- M(e.options, (f) => /* @__PURE__ */ o.jsx(
881
+ /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
882
+ M(e.options, (f) => /* @__PURE__ */ s.jsx(
912
883
  "option",
913
884
  {
914
885
  selected: x(f, "selected", !1),
@@ -920,25 +891,25 @@ const We = (e) => {
920
891
  ]
921
892
  }
922
893
  );
923
- }, gt = {
894
+ }, bt = {
924
895
  type: "Select",
925
896
  label: "web_blocks.select",
926
897
  category: "core",
927
- icon: ne,
898
+ icon: se,
928
899
  group: "form",
929
900
  props: {
930
901
  styles: m({ default: "" }),
931
902
  fieldName: b({ title: "web_blocks.field_name", default: "select" }),
932
- showLabel: g({ title: "web_blocks.show_label", default: !0 }),
903
+ showLabel: k({ title: "web_blocks.show_label", default: !0 }),
933
904
  inputStyles: m({ default: "w-full p-1" }),
934
905
  label: b({ title: "web_blocks.label", default: "Label" }),
935
906
  placeholder: b({
936
907
  title: "web_blocks.placeholder",
937
908
  default: "Placeholder"
938
909
  }),
939
- required: g({ title: "web_blocks.required", default: !1 }),
940
- _multiple: g({ title: "web_blocks.multiple", default: !1 }),
941
- options: W({
910
+ required: k({ title: "web_blocks.required", default: !1 }),
911
+ _multiple: k({ title: "web_blocks.multiple", default: !1 }),
912
+ options: O({
942
913
  title: "web_blocks.options",
943
914
  itemProperties: {
944
915
  label: b({ title: "web_blocks.label", default: "" }),
@@ -946,24 +917,24 @@ const We = (e) => {
946
917
  }
947
918
  })
948
919
  }
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(
920
+ }, pt = (e) => {
921
+ const { blockProps: l, fieldName: t, label: a, placeholder: o, styles: n, inputStyles: r, _rows: i, showLabel: c } = e, d = B();
922
+ return c ? /* @__PURE__ */ s.jsxs("div", { ...n, ...l, children: [
923
+ c && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: a }),
924
+ /* @__PURE__ */ s.jsx("textarea", { name: t, ...r, id: d, placeholder: o, rows: i })
925
+ ] }) : /* @__PURE__ */ s.jsx(
955
926
  "textarea",
956
927
  {
957
928
  id: d,
958
929
  name: t,
959
930
  ...l,
960
- ...n,
961
931
  ...r,
962
- placeholder: s,
932
+ ...n,
933
+ placeholder: o,
963
934
  rows: i
964
935
  }
965
936
  );
966
- }, yt = {
937
+ }, mt = {
967
938
  type: "TextArea",
968
939
  label: "web_blocks.textarea",
969
940
  category: "core",
@@ -971,7 +942,7 @@ const We = (e) => {
971
942
  group: "form",
972
943
  props: {
973
944
  fieldName: b({ title: "web_blocks.field_name", default: "textarea" }),
974
- showLabel: g({ title: "web_blocks.show_label", default: !0 }),
945
+ showLabel: k({ title: "web_blocks.show_label", default: !0 }),
975
946
  styles: m({ default: "" }),
976
947
  inputStyles: m({ default: "w-full p-1" }),
977
948
  label: b({ title: "web_blocks.label", default: "Label" }),
@@ -979,51 +950,51 @@ const We = (e) => {
979
950
  title: "web_blocks.placeholder",
980
951
  default: "Placeholder"
981
952
  }),
982
- _rows: j({ title: "web_blocks.rows", default: 3 })
953
+ _rows: I({ title: "web_blocks.rows", default: 3 })
983
954
  }
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(
955
+ }, ft = (e) => {
956
+ const { blockProps: l, fieldName: t, label: a, styles: o, inputStyles: n, required: r, checked: i, showLabel: c = !0 } = e, d = B();
957
+ return c ? /* @__PURE__ */ s.jsxs("div", { ...o, ...l, children: [
958
+ /* @__PURE__ */ s.jsx(
988
959
  "input",
989
960
  {
990
- ...r,
961
+ ...n,
991
962
  name: t,
992
963
  id: d,
993
964
  type: "checkbox",
994
- required: n,
965
+ required: r,
995
966
  defaultChecked: i
996
967
  }
997
968
  ),
998
- a && a !== "Label" && /* @__PURE__ */ o.jsx("label", { htmlFor: d, children: a })
999
- ] }) : /* @__PURE__ */ o.jsx(
969
+ a && a !== "Label" && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: a })
970
+ ] }) : /* @__PURE__ */ s.jsx(
1000
971
  "input",
1001
972
  {
1002
973
  id: d,
1003
974
  ...l,
1004
- ...r,
1005
- ...s,
975
+ ...n,
976
+ ...o,
1006
977
  type: "checkbox",
1007
- required: n,
978
+ required: r,
1008
979
  name: t
1009
980
  }
1010
981
  );
1011
- }, wt = {
982
+ }, ht = {
1012
983
  type: "Checkbox",
1013
984
  label: "web_blocks.checkbox",
1014
985
  category: "core",
1015
- icon: ce,
986
+ icon: ae,
1016
987
  group: "form",
1017
988
  props: {
1018
989
  fieldName: b({ title: "Field Name", default: "checkbox" }),
1019
990
  styles: m({ default: "flex items-center gap-x-2" }),
1020
991
  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 })
992
+ checked: k({ title: "web_blocks.checked", default: !1 }),
993
+ required: k({ title: "web_blocks.required", default: !1 })
1023
994
  }
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);
995
+ }, It = () => {
996
+ 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
997
  };
1027
998
  export {
1028
- At as loadWebBlocks
999
+ It as loadWebBlocks
1029
1000
  };