@chaibuilder/sdk 2.0.0-beta.26 → 2.0.0-beta.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,19 @@
1
- import { registerChaiBlockSchema as u, StylesProp as c, registerChaiBlock as d, closestBlockProp as P, runtimeProp as N } from "@chaibuilder/runtime";
2
- import { j as r } from "./jsx-runtime-Sp0orL4X.js";
1
+ import { registerChaiBlockSchema as u, StylesProp as c, registerChaiBlock as d, closestBlockProp as P, runtimeProp as D } from "@chaibuilder/runtime";
2
+ import { j as s } from "./jsx-runtime-Sp0orL4X.js";
3
3
  import * as y from "react";
4
- import { c as _, G as D, g as v } from "./iconBase-Ief2hJUZ.js";
5
- import { ButtonIcon as S, CodeIcon as z, HeadingIcon as H, TextIcon as A, CursorTextIcon as R, Link1Icon as q, ImageIcon as M, RowsIcon as F, ColumnsIcon as G, SketchLogoIcon as V, VideoIcon as W, DividerHorizontalIcon as O, MoonIcon as U, SpaceBetweenVerticallyIcon as X, InputIcon as E, RadiobuttonIcon as Y, DropdownMenuIcon as T, CheckboxIcon as Z, LetterCaseToggleIcon as J } from "@radix-ui/react-icons";
6
- import { isEmpty as b, get as k, isNull as K, pick as Q, omit as ee, map as B } from "lodash-es";
7
- import { GlobeIcon as te, GroupIcon as oe } from "lucide-react";
4
+ import { c as _, G as A, g as v } from "./iconBase-Ief2hJUZ.js";
5
+ import { ButtonIcon as M, CodeIcon as z, HeadingIcon as H, TextIcon as R, CursorTextIcon as q, Link1Icon as G, ImageIcon as N, RowsIcon as F, ColumnsIcon as U, SketchLogoIcon as V, VideoIcon as O, DividerHorizontalIcon as W, MoonIcon as X, SpaceBetweenVerticallyIcon as Y, InputIcon as E, RadiobuttonIcon as Z, DropdownMenuIcon as $, CheckboxIcon as J, LetterCaseToggleIcon as K } from "@radix-ui/react-icons";
6
+ import { isEmpty as k, get as f, isNull as Q, pick as ee, omit as te, map as C } from "lodash-es";
7
+ import { GlobeIcon as oe, GroupIcon as le, Columns as ne, Rows as se } from "lucide-react";
8
8
  import "clsx";
9
9
  import "tailwind-merge";
10
- const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("div", { className: _("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ r.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ r.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, w = le, ne = (e) => {
11
- const { blockProps: o, inBuilder: t, backgroundImage: l, children: n, tag: s = "div", styles: i } = e;
10
+ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s.jsx("div", { className: _("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, w = re, ie = (e) => {
11
+ const { blockProps: o, inBuilder: t, backgroundImage: l, children: n, tag: r = "div", styles: i } = e;
12
12
  let a = n;
13
- n || (a = /* @__PURE__ */ r.jsx(w, { inBuilder: t }));
13
+ n || (a = /* @__PURE__ */ s.jsx(w, { inBuilder: t }));
14
14
  let p = {};
15
- return l && (p = { backgroundImage: `url(${l})` }), y.createElement(s, { ...o, ...i, style: p }, a);
16
- }, re = {
15
+ return l && (p = { backgroundImage: `url(${l})` }), y.createElement(r, { ...o, ...i, style: p }, a);
16
+ }, ae = {
17
17
  type: "Box",
18
18
  label: "Box",
19
19
  category: "core",
@@ -54,10 +54,10 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
54
54
  }
55
55
  }),
56
56
  canAcceptBlock: () => !0
57
- }, se = (e) => {
58
- const { blockProps: o, iconSize: t, icon: l, content: n, styles: s, children: i, iconPos: a, link: p, inBuilder: g } = e, h = l, f = i || /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
59
- /* @__PURE__ */ r.jsx("span", { "data-ai-key": "content", children: n }),
60
- h && /* @__PURE__ */ r.jsx(
57
+ }, ce = (e) => {
58
+ const { blockProps: o, iconSize: t, icon: l, content: n, styles: r, children: i, iconPos: a, link: p, inBuilder: g } = e, h = l, b = i || /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
59
+ /* @__PURE__ */ s.jsx("span", { "data-ai-key": "content", children: n }),
60
+ h && /* @__PURE__ */ s.jsx(
61
61
  "div",
62
62
  {
63
63
  style: { width: t + "px" },
@@ -69,17 +69,17 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
69
69
  "button",
70
70
  {
71
71
  ...o,
72
- ...s,
72
+ ...r,
73
73
  type: "button"
74
74
  },
75
- f
75
+ b
76
76
  );
77
- return b(k(p, "href")) ? m : g ? /* @__PURE__ */ r.jsx("span", { children: m }) : /* @__PURE__ */ r.jsx("a", { href: k(p, "href") || "/", target: k(p, "target", "_self"), children: m });
78
- }, ie = {
77
+ return k(f(p, "href")) ? m : g ? /* @__PURE__ */ s.jsx("span", { children: m }) : /* @__PURE__ */ s.jsx("a", { href: f(p, "href") || "/", target: f(p, "target", "_self"), children: m });
78
+ }, pe = {
79
79
  type: "Button",
80
80
  label: "Button",
81
81
  category: "core",
82
- icon: S,
82
+ icon: M,
83
83
  group: "basic",
84
84
  ...u({
85
85
  properties: {
@@ -126,10 +126,10 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
126
126
  }),
127
127
  i18nProps: ["content"],
128
128
  aiProps: ["content"]
129
- }, ae = (e) => {
129
+ }, de = (e) => {
130
130
  const { blockProps: o, styles: t, htmlCode: l, inBuilder: n } = e;
131
- return n ? /* @__PURE__ */ r.jsxs("div", { className: "relative", children: [
132
- n ? /* @__PURE__ */ r.jsx("div", { ...o, ...t, className: "absolute z-20 h-full w-full" }) : null,
131
+ return n ? /* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
132
+ n ? /* @__PURE__ */ s.jsx("div", { ...o, ...t, className: "absolute z-20 h-full w-full" }) : null,
133
133
  y.createElement("div", {
134
134
  ...t,
135
135
  dangerouslySetInnerHTML: { __html: l.replace(/<script.*?>.*?<\/script>/g, "") }
@@ -139,7 +139,7 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
139
139
  ...t,
140
140
  dangerouslySetInnerHTML: { __html: l }
141
141
  });
142
- }, ce = {
142
+ }, ue = {
143
143
  type: "CustomHTML",
144
144
  label: "web_blocks.custom_html",
145
145
  category: "core",
@@ -155,11 +155,11 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
155
155
  }
156
156
  }
157
157
  })
158
- }, pe = (e) => {
158
+ }, ge = (e) => {
159
159
  const { blockProps: o, styles: t, backgroundImage: l } = e;
160
160
  let n = {};
161
161
  return l && (n = { backgroundImage: `url(${l})` }), y.createElement("div", { ...o, ...t, style: n });
162
- }, de = {
162
+ }, ye = {
163
163
  type: "EmptyBox",
164
164
  label: "Empty Box",
165
165
  category: "core",
@@ -175,14 +175,14 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
175
175
  }
176
176
  }
177
177
  })
178
- }, ue = (e) => {
179
- const { blockProps: o, styles: t, content: l, tag: n = "h1", children: s = null } = e;
180
- return s ? y.createElement(n, { ...t, ...o }, s) : y.createElement(n, {
178
+ }, me = (e) => {
179
+ const { blockProps: o, styles: t, content: l, tag: n = "h1", children: r = null } = e;
180
+ return r ? y.createElement(n, { ...t, ...o }, r) : y.createElement(n, {
181
181
  ...t,
182
182
  ...o,
183
183
  dangerouslySetInnerHTML: { __html: l }
184
184
  });
185
- }, ge = {
185
+ }, he = {
186
186
  type: "Heading",
187
187
  label: "web_blocks.heading",
188
188
  category: "core",
@@ -208,18 +208,18 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
208
208
  aiProps: ["content"],
209
209
  i18nProps: ["content"],
210
210
  canAcceptBlock: (e) => e === "Span" || e === "Text"
211
- }, ye = (e) => {
211
+ }, fe = (e) => {
212
212
  const { blockProps: o, styles: t, content: l } = e;
213
- return K(e.children) ? y.createElement("p", {
213
+ return Q(e.children) ? y.createElement("p", {
214
214
  ...t,
215
215
  ...o,
216
216
  dangerouslySetInnerHTML: { __html: l }
217
217
  }) : y.createElement("p", { ...t, ...o }, e.children);
218
- }, me = {
218
+ }, be = {
219
219
  type: "Paragraph",
220
220
  label: "Paragraph",
221
221
  category: "core",
222
- icon: A,
222
+ icon: R,
223
223
  group: "typography",
224
224
  ...u({
225
225
  properties: {
@@ -237,14 +237,14 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
237
237
  i18nProps: ["content"],
238
238
  aiProps: ["content"],
239
239
  canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
240
- }, he = (e) => {
241
- const { blockProps: o, styles: t, content: l, children: n = null, tag: s } = e;
242
- return n ? y.createElement("span", { ...t, ...o }, n) : y.createElement(s || "span", {
240
+ }, ke = (e) => {
241
+ const { blockProps: o, styles: t, content: l, children: n = null, tag: r } = e;
242
+ return n ? y.createElement("span", { ...t, ...o }, n) : y.createElement(r || "span", {
243
243
  ...t,
244
244
  ...o,
245
245
  dangerouslySetInnerHTML: { __html: l || "" }
246
246
  });
247
- }, fe = {
247
+ }, xe = {
248
248
  type: "Span",
249
249
  label: "Span",
250
250
  category: "core",
@@ -263,14 +263,14 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
263
263
  aiProps: ["content"],
264
264
  i18nProps: ["content"],
265
265
  canAcceptBlock: () => !0
266
- }, be = (e) => {
266
+ }, we = (e) => {
267
267
  const { blockProps: o, content: t, styles: l } = e;
268
- return /* @__PURE__ */ r.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ r.jsx("div", { ...o, ...l, dangerouslySetInnerHTML: { __html: t } }) });
269
- }, ke = {
268
+ return /* @__PURE__ */ s.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ s.jsx("div", { ...o, ...l, dangerouslySetInnerHTML: { __html: t } }) });
269
+ }, ve = {
270
270
  type: "RichText",
271
271
  label: "Rich Text",
272
272
  category: "core",
273
- icon: R,
273
+ icon: q,
274
274
  group: "typography",
275
275
  ...u({
276
276
  properties: {
@@ -285,10 +285,10 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
285
285
  }),
286
286
  aiProps: ["content"],
287
287
  i18nProps: ["content"]
288
- }, xe = (e) => {
289
- const { blockProps: o, link: t, children: l, styles: n, inBuilder: s, content: i } = e;
288
+ }, _e = (e) => {
289
+ const { blockProps: o, link: t, children: l, styles: n, inBuilder: r, content: i } = e;
290
290
  let a = {};
291
- return !l && b(i) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), s ? l ? /* @__PURE__ */ r.jsx("span", { ...o, style: a, ...n, children: l }) : y.createElement(
291
+ return !l && k(i) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), r ? l ? /* @__PURE__ */ s.jsx("span", { ...o, style: a, ...n, children: l }) : y.createElement(
292
292
  "span",
293
293
  {
294
294
  ...o,
@@ -296,7 +296,7 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
296
296
  style: a
297
297
  },
298
298
  i
299
- ) : l ? /* @__PURE__ */ r.jsx("a", { href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...o, ...n, children: l }) : y.createElement(
299
+ ) : l ? /* @__PURE__ */ s.jsx("a", { href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...o, ...n, children: l }) : y.createElement(
300
300
  "a",
301
301
  {
302
302
  ...o,
@@ -306,11 +306,11 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
306
306
  },
307
307
  i
308
308
  );
309
- }, we = {
309
+ }, Ie = {
310
310
  type: "Link",
311
311
  label: "Link",
312
312
  category: "core",
313
- icon: q,
313
+ icon: G,
314
314
  group: "basic",
315
315
  ...u({
316
316
  properties: {
@@ -341,32 +341,32 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
341
341
  aiProps: ["content"],
342
342
  i18nProps: ["content"],
343
343
  canAcceptBlock: (e) => e !== "Link"
344
- }, $ = (e, ...o) => ({
344
+ }, T = (e, ...o) => ({
345
345
  ...e,
346
346
  className: _(e.className, ...o)
347
- }), ve = (e) => {
348
- const { blockProps: o, children: t, styles: l, inBuilder: n, content: s, href: i } = e, { hrefType: a, autoplay: p, maxWidth: g, backdropColor: h, galleryName: f } = e, m = $(l, "cb-lightbox");
349
- if (!t && b(l == null ? void 0 : l.className) && b(s))
350
- return /* @__PURE__ */ r.jsx(w, { inBuilder: n });
347
+ }), Le = (e) => {
348
+ const { blockProps: o, children: t, styles: l, inBuilder: n, content: r, href: i } = e, { hrefType: a, autoplay: p, maxWidth: g, backdropColor: h, galleryName: b } = e, m = T(l, "cb-lightbox");
349
+ if (!t && k(l == null ? void 0 : l.className) && k(r))
350
+ return /* @__PURE__ */ s.jsx(w, { inBuilder: n });
351
351
  if (n)
352
- return t ? /* @__PURE__ */ r.jsx("span", { ...o, ...m, children: t }) : y.createElement("span", {
352
+ return t ? /* @__PURE__ */ s.jsx("span", { ...o, ...m, children: t }) : y.createElement("span", {
353
353
  ...o,
354
354
  ...m,
355
- dangerouslySetInnerHTML: { __html: s }
355
+ dangerouslySetInnerHTML: { __html: r }
356
356
  });
357
357
  const x = {};
358
- return a !== "image" && (x["data-vbtype"] = a), p && (x["data-autoplay"] = "true"), g && (x["data-maxwidth"] = g + "px"), h && (x["data-overlay"] = h), f && (x["data-gall"] = f), t ? /* @__PURE__ */ r.jsx("a", { ...x, href: i || "#/", ...o, ...m, children: t }) : y.createElement("a", {
358
+ return a !== "image" && (x["data-vbtype"] = a), p && (x["data-autoplay"] = "true"), g && (x["data-maxwidth"] = g + "px"), h && (x["data-overlay"] = h), b && (x["data-gall"] = b), t ? /* @__PURE__ */ s.jsx("a", { ...x, href: i || "#/", ...o, ...m, children: t }) : y.createElement("a", {
359
359
  ...o,
360
360
  ...m,
361
361
  ...x,
362
362
  href: i || "#",
363
- dangerouslySetInnerHTML: { __html: s }
363
+ dangerouslySetInnerHTML: { __html: r }
364
364
  });
365
- }, _e = {
365
+ }, Ce = {
366
366
  type: "LightBoxLink",
367
367
  label: "Lightbox Link",
368
368
  category: "core",
369
- icon: M,
369
+ icon: N,
370
370
  group: "basic",
371
371
  ...u({
372
372
  properties: {
@@ -416,14 +416,14 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
416
416
  i18nProps: ["content"],
417
417
  aiProps: ["content"],
418
418
  canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
419
- }, Ie = (e) => {
420
- const { blockProps: o, children: t, listType: l, styles: n, tag: s, inBuilder: i } = e, a = _(k(n, "className", ""), l);
421
- return !t && b(n == null ? void 0 : n.className) ? /* @__PURE__ */ r.jsx(w, { inBuilder: i }) : y.createElement(
422
- s || (l === "list-decimal" ? "ol" : "ul"),
419
+ }, Be = (e) => {
420
+ const { blockProps: o, children: t, listType: l, styles: n, tag: r, inBuilder: i } = e, a = _(f(n, "className", ""), l);
421
+ return !t && k(n == null ? void 0 : n.className) ? /* @__PURE__ */ s.jsx(w, { inBuilder: i }) : y.createElement(
422
+ r || (l === "list-decimal" ? "ol" : "ul"),
423
423
  { ...o, ...n, className: a },
424
424
  t
425
425
  );
426
- }, Be = {
426
+ }, je = {
427
427
  type: "List",
428
428
  label: "web_blocks.list",
429
429
  icon: F,
@@ -469,17 +469,17 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
469
469
  content: "Item 3"
470
470
  }
471
471
  ]
472
- }, Le = (e) => {
473
- const { blockProps: o, content: t, styles: l, children: n, tag: s } = e;
474
- return n ? y.createElement(s || "li", { ...l, ...o }, n) : y.createElement(s || "li", {
472
+ }, Se = (e) => {
473
+ const { blockProps: o, content: t, styles: l, children: n, tag: r } = e;
474
+ return n ? y.createElement(r || "li", { ...l, ...o }, n) : y.createElement(r || "li", {
475
475
  ...l,
476
476
  ...o,
477
477
  dangerouslySetInnerHTML: { __html: t }
478
478
  });
479
- }, je = {
479
+ }, Pe = {
480
480
  type: "ListItem",
481
481
  label: "List Item",
482
- icon: G,
482
+ icon: U,
483
483
  category: "core",
484
484
  group: "basic",
485
485
  ...u({
@@ -499,17 +499,17 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
499
499
  aiProps: ["content"],
500
500
  canAcceptBlock: (e) => e !== "ListItem",
501
501
  canBeNested: (e) => e === "List"
502
- }, Ce = (e) => {
503
- const { blockProps: o, icon: t, styles: l, width: n, inBuilder: s, height: i } = e, a = $(l, _(n ? `w-[${n}px]` : "", i ? `h-[${i}px]` : ""));
504
- if (b(t))
505
- return /* @__PURE__ */ r.jsx(w, { inBuilder: s, className: "h-8 w-14" });
502
+ }, Me = (e) => {
503
+ const { blockProps: o, icon: t, styles: l, width: n, inBuilder: r, height: i } = e, a = T(l, _(n ? `w-[${n}px]` : "", i ? `h-[${i}px]` : ""));
504
+ if (k(t))
505
+ return /* @__PURE__ */ s.jsx(w, { inBuilder: r, className: "h-8 w-14" });
506
506
  const p = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
507
507
  return y.createElement("span", {
508
508
  ...o,
509
509
  ...a,
510
510
  dangerouslySetInnerHTML: { __html: p }
511
511
  });
512
- }, Pe = {
512
+ }, Ne = {
513
513
  type: "Icon",
514
514
  label: "web_blocks.icon",
515
515
  category: "core",
@@ -536,28 +536,28 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
536
536
  }
537
537
  }
538
538
  })
539
- }, Se = (e) => {
540
- const { blockProps: o, image: t, mobileImage: l, styles: n, alt: s, height: i, width: a, lazyLoading: p } = e;
541
- return b(t) ? /* @__PURE__ */ r.jsx(w, { className: "h-36" }) : /* @__PURE__ */ r.jsxs("picture", { children: [
542
- l && /* @__PURE__ */ r.jsx("source", { srcSet: l, media: "(max-width: 480px)" }),
543
- /* @__PURE__ */ r.jsx(
539
+ }, Ee = (e) => {
540
+ const { blockProps: o, image: t, mobileImage: l, styles: n, alt: r, height: i, width: a, lazyLoading: p } = e;
541
+ return k(t) ? /* @__PURE__ */ s.jsx(w, { className: "h-36" }) : /* @__PURE__ */ s.jsxs("picture", { children: [
542
+ l && /* @__PURE__ */ s.jsx("source", { srcSet: l, media: "(max-width: 480px)" }),
543
+ /* @__PURE__ */ s.jsx(
544
544
  "img",
545
545
  {
546
546
  ...o,
547
547
  ...n,
548
548
  src: t,
549
- alt: s,
549
+ alt: r,
550
550
  loading: p ? "lazy" : "eager",
551
551
  width: a,
552
552
  height: i
553
553
  }
554
554
  )
555
555
  ] });
556
- }, Me = {
556
+ }, $e = {
557
557
  type: "Image",
558
558
  label: "Image",
559
559
  category: "core",
560
- icon: M,
560
+ icon: N,
561
561
  group: "media",
562
562
  ...u({
563
563
  properties: {
@@ -601,31 +601,31 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
601
601
  }),
602
602
  aiProps: ["alt"],
603
603
  i18nProps: ["alt"]
604
- }, L = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, j = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, C = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Ee = (e) => {
605
- if (L.test(e)) {
606
- const o = e.match(L);
604
+ }, B = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, j = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, S = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Te = (e) => {
605
+ if (B.test(e)) {
606
+ const o = e.match(B);
607
607
  return o ? `https://www.youtube.com/embed/${o[4]}` : e;
608
608
  }
609
609
  if (j.test(e)) {
610
610
  const o = e.match(j);
611
611
  return o ? `https://player.vimeo.com/video/${o[3]}` : e;
612
612
  }
613
- if (C.test(e)) {
614
- const o = e.match(C);
613
+ if (S.test(e)) {
614
+ const o = e.match(S);
615
615
  return o ? `https://www.dailymotion.com/embed/video/${o[4]}` : e;
616
616
  }
617
617
  return null;
618
- }, Te = y.memo((e) => {
619
- const { blockProps: o, inBuilder: t, styles: l, url: n, controls: s } = e, i = k(s, "autoPlay", !1), a = k(s, "controls", !1), p = i || k(s, "muted", !0), g = k(s, "loop", !1);
620
- if (b(n))
621
- return /* @__PURE__ */ r.jsx(w, { inBuilder: t, className: "h-36" });
622
- let h = Ee(n), f = null;
618
+ }, De = y.memo((e) => {
619
+ const { blockProps: o, inBuilder: t, styles: l, url: n, controls: r } = e, i = f(r, "autoPlay", !1), a = f(r, "controls", !1), p = i || f(r, "muted", !0), g = f(r, "loop", !1);
620
+ if (k(n))
621
+ return /* @__PURE__ */ s.jsx(w, { inBuilder: t, className: "h-36" });
622
+ let h = Te(n), b = null;
623
623
  if (h) {
624
- if (!b(h)) {
624
+ if (!k(h)) {
625
625
  const m = [];
626
- m.push(`autoplay=${i ? 1 : 0}`), m.push(`controls=${s ? 1 : 0}`), m.push(`mute=${p ? 1 : 0}&muted=${p ? 1 : 0}`), m.push(`loop=${g ? 1 : 0}`), h = `${h}?${m.join("&")}`;
626
+ m.push(`autoplay=${i ? 1 : 0}`), m.push(`controls=${r ? 1 : 0}`), m.push(`mute=${p ? 1 : 0}&muted=${p ? 1 : 0}`), m.push(`loop=${g ? 1 : 0}`), h = `${h}?${m.join("&")}`;
627
627
  }
628
- f = y.createElement("iframe", {
628
+ b = y.createElement("iframe", {
629
629
  ...o,
630
630
  className: "absolute inset-0 w-full h-full",
631
631
  src: h,
@@ -634,7 +634,7 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
634
634
  frameBorder: 0
635
635
  });
636
636
  } else
637
- f = y.createElement("video", {
637
+ b = y.createElement("video", {
638
638
  ...o,
639
639
  className: "absolute inset-0 w-full h-full",
640
640
  src: n,
@@ -643,15 +643,15 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
643
643
  autoPlay: t ? !1 : i,
644
644
  loop: g
645
645
  });
646
- return /* @__PURE__ */ r.jsx("div", { ...Q(l, ["className"]), children: /* @__PURE__ */ r.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
647
- t ? /* @__PURE__ */ r.jsx("div", { ...o, ...ee(l, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
648
- f
646
+ return /* @__PURE__ */ s.jsx("div", { ...ee(l, ["className"]), children: /* @__PURE__ */ s.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
647
+ t ? /* @__PURE__ */ s.jsx("div", { ...o, ...te(l, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
648
+ b
649
649
  ] }) });
650
- }), $e = {
650
+ }), Ae = {
651
651
  type: "Video",
652
652
  label: "Video",
653
653
  category: "core",
654
- icon: W,
654
+ icon: O,
655
655
  group: "media",
656
656
  ...u({
657
657
  properties: {
@@ -696,14 +696,14 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
696
696
  }
697
697
  }),
698
698
  i18nProps: ["url"]
699
- }, Ne = (e) => {
699
+ }, ze = (e) => {
700
700
  const { blockProps: o, styles: t } = e;
701
701
  return y.createElement("hr", { ...t, ...o });
702
- }, De = {
702
+ }, He = {
703
703
  type: "Divider",
704
704
  label: "web_blocks.divider",
705
705
  category: "core",
706
- icon: O,
706
+ icon: W,
707
707
  group: "basic",
708
708
  ...u({
709
709
  properties: {
@@ -711,17 +711,17 @@ const le = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
711
711
  }
712
712
  })
713
713
  };
714
- function ze(e) {
715
- return D({ 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);
714
+ function Re(e) {
715
+ return A({ 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);
716
716
  }
717
- const He = (e) => {
717
+ const qe = (e) => {
718
718
  const { scripts: o, inBuilder: t, blockProps: l } = e;
719
- return t ? /* @__PURE__ */ r.jsx("div", { ...l, children: /* @__PURE__ */ r.jsx("div", { className: _("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ r.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ r.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__ */ r.jsx("div", { dangerouslySetInnerHTML: { __html: o } });
720
- }, Ae = {
719
+ return t ? /* @__PURE__ */ s.jsx("div", { ...l, children: /* @__PURE__ */ s.jsx("div", { className: _("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: o } });
720
+ }, Ge = {
721
721
  type: "CustomScript",
722
722
  label: "web_blocks.custom_script",
723
723
  category: "core",
724
- icon: ze,
724
+ icon: Re,
725
725
  group: "advanced",
726
726
  ...u({
727
727
  properties: {
@@ -734,11 +734,11 @@ const He = (e) => {
734
734
  }
735
735
  }
736
736
  })
737
- }, Re = (e) => null, qe = {
737
+ }, Fe = (e) => null, Ue = {
738
738
  type: "Dark Mode",
739
739
  label: "web_blocks.dark_mode",
740
740
  category: "core",
741
- icon: U,
741
+ icon: X,
742
742
  group: "advanced",
743
743
  ...u({
744
744
  properties: {}
@@ -792,26 +792,26 @@ const He = (e) => {
792
792
  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>"
793
793
  }
794
794
  ]
795
- }, Fe = (e) => {
795
+ }, Ve = (e) => {
796
796
  const { blockProps: o, inBuilder: t, children: l, globalBlock: n } = e;
797
- return t && !n ? /* @__PURE__ */ r.jsxs(
797
+ return t && !n ? /* @__PURE__ */ s.jsxs(
798
798
  "div",
799
799
  {
800
800
  className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
801
801
  ...o,
802
802
  children: [
803
- /* @__PURE__ */ r.jsxs("h1", { children: [
803
+ /* @__PURE__ */ s.jsxs("h1", { children: [
804
804
  "Global Block - ",
805
805
  n
806
806
  ] }),
807
- /* @__PURE__ */ r.jsx("p", { children: "Choose a block from the sidebar to add it to this page." })
807
+ /* @__PURE__ */ s.jsx("p", { children: "Choose a block from the sidebar to add it to this page." })
808
808
  ]
809
809
  }
810
810
  ) : y.createElement("div", { ...o }, l);
811
- }, Ge = {
811
+ }, Oe = {
812
812
  type: "GlobalBlock",
813
813
  label: "Global Block",
814
- icon: te,
814
+ icon: oe,
815
815
  category: "core",
816
816
  group: "advanced",
817
817
  ...u({
@@ -826,13 +826,13 @@ const He = (e) => {
826
826
  }
827
827
  }
828
828
  })
829
- }, Ve = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ r.jsx("span", { ...e.blockProps, children: e.content }) : `${e.content}`, We = {
829
+ }, We = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ s.jsx("span", { ...e.blockProps, children: e.content }) : `${e.content}`, Xe = {
830
830
  type: "Text",
831
831
  label: "Text",
832
832
  hidden: !0,
833
833
  category: "core",
834
834
  group: "typography",
835
- icon: X,
835
+ icon: Y,
836
836
  ...u({
837
837
  properties: {
838
838
  styles: c("text-black"),
@@ -844,11 +844,11 @@ const He = (e) => {
844
844
  }),
845
845
  aiProps: ["content"],
846
846
  i18nProps: ["content"]
847
- }, Oe = (e) => {
848
- const { blockProps: o, backgroundImage: t, children: l, styles: n, tag: s } = e;
847
+ }, Ye = (e) => {
848
+ const { blockProps: o, backgroundImage: t, children: l, styles: n, tag: r } = e;
849
849
  let i = {};
850
- return t && (i = { backgroundImage: `url(${t})` }), y.createElement(s || "div", { ...o, ...n, style: i }, l);
851
- }, Ue = {
850
+ return t && (i = { backgroundImage: `url(${t})` }), y.createElement(r || "div", { ...o, ...n, style: i }, l);
851
+ }, Ze = {
852
852
  type: "Body",
853
853
  label: "Body",
854
854
  category: "core",
@@ -893,10 +893,10 @@ const He = (e) => {
893
893
  canDelete: () => !1,
894
894
  canMove: () => !1,
895
895
  canDuplicate: () => !1
896
- }, Xe = (e) => {
896
+ }, Je = (e) => {
897
897
  const { blockProps: o, styles: t } = e;
898
898
  return y.createElement("br", { ...o, ...t });
899
- }, Ye = {
899
+ }, Ke = {
900
900
  type: "LineBreak",
901
901
  label: "Line Break",
902
902
  category: "core",
@@ -911,10 +911,10 @@ const He = (e) => {
911
911
  canDelete: () => !1,
912
912
  canMove: () => !1,
913
913
  canDuplicate: () => !1
914
- }, Ze = (e) => {
915
- const { children: o, blockProps: t, errorMessage: l, successMessage: n, action: s, styles: i } = e;
914
+ }, Qe = (e) => {
915
+ const { children: o, blockProps: t, errorMessage: l, successMessage: n, action: r, styles: i } = e;
916
916
  let a = o;
917
- o || (a = /* @__PURE__ */ r.jsx(w, {}));
917
+ o || (a = /* @__PURE__ */ s.jsx(w, {}));
918
918
  const p = {
919
919
  "x-data": "{}",
920
920
  "x-on:submit.prevent": "post"
@@ -922,27 +922,27 @@ const He = (e) => {
922
922
  "x-html": "",
923
923
  ":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
924
924
  };
925
- return /* @__PURE__ */ r.jsxs(
925
+ return /* @__PURE__ */ s.jsxs(
926
926
  "form",
927
927
  {
928
928
  ...p,
929
929
  "data-error": l,
930
930
  "data-success": n,
931
931
  method: "post",
932
- action: s,
932
+ action: r,
933
933
  ...t,
934
934
  ...i,
935
935
  children: [
936
- /* @__PURE__ */ r.jsx("div", { ...g }),
936
+ /* @__PURE__ */ s.jsx("div", { ...g }),
937
937
  a
938
938
  ]
939
939
  }
940
940
  );
941
- }, Je = {
941
+ }, et = {
942
942
  type: "Form",
943
943
  label: "Form",
944
944
  category: "core",
945
- icon: oe,
945
+ icon: le,
946
946
  group: "form",
947
947
  ...u({
948
948
  properties: {
@@ -969,22 +969,22 @@ const He = (e) => {
969
969
  i18nProps: ["errorMessage", "successMessage"],
970
970
  aiProps: ["errorMessage", "successMessage"],
971
971
  canAcceptBlock: () => !0
972
- }, Ke = (e) => {
973
- const { blockProps: o, inBuilder: t, label: l, styles: n, inputStyles: s, icon: i, iconSize: a, iconPos: p } = e, g = v(), h = {
972
+ }, tt = (e) => {
973
+ const { blockProps: o, inBuilder: t, label: l, styles: n, inputStyles: r, icon: i, iconSize: a, iconPos: p } = e, g = v(), h = {
974
974
  "x-bind:disabled": "formLoading"
975
975
  };
976
- return /* @__PURE__ */ r.jsxs(
976
+ return /* @__PURE__ */ s.jsxs(
977
977
  "button",
978
978
  {
979
979
  id: g,
980
980
  ...h,
981
- ...s,
981
+ ...r,
982
982
  ...n,
983
983
  ...o || {},
984
984
  type: t ? "button" : "submit",
985
985
  children: [
986
986
  l,
987
- i && /* @__PURE__ */ r.jsx(
987
+ i && /* @__PURE__ */ s.jsx(
988
988
  "div",
989
989
  {
990
990
  style: { width: a + "px" },
@@ -995,11 +995,11 @@ const He = (e) => {
995
995
  ]
996
996
  }
997
997
  );
998
- }, Qe = {
998
+ }, ot = {
999
999
  type: "FormButton",
1000
1000
  label: "Submit Button",
1001
1001
  category: "core",
1002
- icon: S,
1002
+ icon: M,
1003
1003
  group: "form",
1004
1004
  ...u({
1005
1005
  properties: {
@@ -1035,11 +1035,11 @@ const He = (e) => {
1035
1035
  }),
1036
1036
  i18nProps: ["label"],
1037
1037
  aiProps: ["label"]
1038
- }, et = (e) => {
1039
- const { blockProps: o, fieldName: t, label: l, placeholder: n, styles: s, inputStyles: i, showLabel: a, required: p, inputType: g } = e, h = v();
1040
- return a ? /* @__PURE__ */ r.jsxs("div", { ...s, ...o, children: [
1041
- a && /* @__PURE__ */ r.jsx("label", { htmlFor: h, children: l }),
1042
- /* @__PURE__ */ r.jsx(
1038
+ }, lt = (e) => {
1039
+ const { blockProps: o, fieldName: t, label: l, placeholder: n, styles: r, inputStyles: i, showLabel: a, required: p, inputType: g } = e, h = v();
1040
+ return a ? /* @__PURE__ */ s.jsxs("div", { ...r, ...o, children: [
1041
+ a && /* @__PURE__ */ s.jsx("label", { htmlFor: h, children: l }),
1042
+ /* @__PURE__ */ s.jsx(
1043
1043
  "input",
1044
1044
  {
1045
1045
  name: t,
@@ -1050,20 +1050,20 @@ const He = (e) => {
1050
1050
  required: p
1051
1051
  }
1052
1052
  )
1053
- ] }) : /* @__PURE__ */ r.jsx(
1053
+ ] }) : /* @__PURE__ */ s.jsx(
1054
1054
  "input",
1055
1055
  {
1056
1056
  id: h,
1057
1057
  name: t,
1058
1058
  ...o,
1059
1059
  ...i,
1060
- ...s,
1060
+ ...r,
1061
1061
  type: g,
1062
1062
  placeholder: n,
1063
1063
  required: p
1064
1064
  }
1065
1065
  );
1066
- }, tt = {
1066
+ }, nt = {
1067
1067
  type: "Input",
1068
1068
  label: "web_blocks.input",
1069
1069
  category: "core",
@@ -1118,17 +1118,17 @@ const He = (e) => {
1118
1118
  }),
1119
1119
  aiProps: ["label", "placeholder"],
1120
1120
  i18nProps: ["label", "placeholder"]
1121
- }, ot = (e) => {
1122
- const { blockProps: o, fieldName: t, label: l, styles: n, inputStyles: s, required: i, checked: a, showLabel: p = !0 } = e, g = v();
1123
- return p ? /* @__PURE__ */ r.jsxs("div", { ...n, ...o, children: [
1124
- /* @__PURE__ */ r.jsx("input", { ...s, name: t, id: g, type: "radio", required: i, defaultChecked: a }),
1125
- l && /* @__PURE__ */ r.jsx("label", { htmlFor: g, children: l })
1126
- ] }) : /* @__PURE__ */ r.jsx(
1121
+ }, st = (e) => {
1122
+ const { blockProps: o, fieldName: t, label: l, styles: n, inputStyles: r, required: i, checked: a, showLabel: p = !0 } = e, g = v();
1123
+ return p ? /* @__PURE__ */ s.jsxs("div", { ...n, ...o, children: [
1124
+ /* @__PURE__ */ s.jsx("input", { ...r, name: t, id: g, type: "radio", required: i, defaultChecked: a }),
1125
+ l && /* @__PURE__ */ s.jsx("label", { htmlFor: g, children: l })
1126
+ ] }) : /* @__PURE__ */ s.jsx(
1127
1127
  "input",
1128
1128
  {
1129
1129
  id: g,
1130
1130
  ...o,
1131
- ...s,
1131
+ ...r,
1132
1132
  ...n,
1133
1133
  type: "radio",
1134
1134
  required: i,
@@ -1136,11 +1136,11 @@ const He = (e) => {
1136
1136
  name: t
1137
1137
  }
1138
1138
  );
1139
- }, lt = {
1139
+ }, rt = {
1140
1140
  type: "Radio",
1141
1141
  label: "web_blocks.radio",
1142
1142
  category: "core",
1143
- icon: Y,
1143
+ icon: Z,
1144
1144
  group: "form",
1145
1145
  ...u({
1146
1146
  properties: {
@@ -1170,23 +1170,23 @@ const He = (e) => {
1170
1170
  }),
1171
1171
  aiProps: ["label"],
1172
1172
  i18nProps: ["label"]
1173
- }, nt = (e) => {
1174
- const { blockProps: o, fieldName: t, label: l, placeholder: n, styles: s, inputStyles: i, required: a, showLabel: p, _multiple: g, options: h } = e, f = v();
1175
- return p ? /* @__PURE__ */ r.jsxs("div", { ...s, ...o, children: [
1176
- p && /* @__PURE__ */ r.jsx("label", { htmlFor: f, children: l }),
1177
- /* @__PURE__ */ r.jsxs("select", { ...i, id: f, required: a, multiple: g, name: t, children: [
1178
- /* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: n }),
1179
- B(h, (m) => /* @__PURE__ */ r.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
1173
+ }, it = (e) => {
1174
+ const { blockProps: o, fieldName: t, label: l, placeholder: n, styles: r, inputStyles: i, required: a, showLabel: p, _multiple: g, options: h } = e, b = v();
1175
+ return p ? /* @__PURE__ */ s.jsxs("div", { ...r, ...o, children: [
1176
+ p && /* @__PURE__ */ s.jsx("label", { htmlFor: b, children: l }),
1177
+ /* @__PURE__ */ s.jsxs("select", { ...i, id: b, required: a, multiple: g, name: t, children: [
1178
+ /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: n }),
1179
+ C(h, (m) => /* @__PURE__ */ s.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
1180
1180
  ] })
1181
- ] }) : /* @__PURE__ */ r.jsxs("select", { id: f, ...s, ...o, required: a, multiple: g, name: t, children: [
1182
- /* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: n }),
1183
- B(h, (m) => /* @__PURE__ */ r.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
1181
+ ] }) : /* @__PURE__ */ s.jsxs("select", { id: b, ...r, ...o, required: a, multiple: g, name: t, children: [
1182
+ /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: n }),
1183
+ C(h, (m) => /* @__PURE__ */ s.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
1184
1184
  ] });
1185
- }, rt = {
1185
+ }, at = {
1186
1186
  type: "Select",
1187
1187
  label: "web_blocks.select",
1188
1188
  category: "core",
1189
- icon: T,
1189
+ icon: $,
1190
1190
  group: "form",
1191
1191
  ...u({
1192
1192
  properties: {
@@ -1241,24 +1241,24 @@ const He = (e) => {
1241
1241
  }),
1242
1242
  aiProps: ["label", "placeholder"],
1243
1243
  i18nProps: ["label", "placeholder"]
1244
- }, st = (e) => {
1245
- const { blockProps: o, fieldName: t, label: l, placeholder: n, styles: s, inputStyles: i, _rows: a, showLabel: p } = e, g = v();
1246
- return p ? /* @__PURE__ */ r.jsxs("div", { ...s, ...o, children: [
1247
- p && /* @__PURE__ */ r.jsx("label", { htmlFor: g, children: l }),
1248
- /* @__PURE__ */ r.jsx("textarea", { name: t, ...i, id: g, placeholder: n, rows: a })
1249
- ] }) : /* @__PURE__ */ r.jsx(
1244
+ }, ct = (e) => {
1245
+ const { blockProps: o, fieldName: t, label: l, placeholder: n, styles: r, inputStyles: i, _rows: a, showLabel: p } = e, g = v();
1246
+ return p ? /* @__PURE__ */ s.jsxs("div", { ...r, ...o, children: [
1247
+ p && /* @__PURE__ */ s.jsx("label", { htmlFor: g, children: l }),
1248
+ /* @__PURE__ */ s.jsx("textarea", { name: t, ...i, id: g, placeholder: n, rows: a })
1249
+ ] }) : /* @__PURE__ */ s.jsx(
1250
1250
  "textarea",
1251
1251
  {
1252
1252
  id: g,
1253
1253
  name: t,
1254
1254
  ...o,
1255
1255
  ...i,
1256
- ...s,
1256
+ ...r,
1257
1257
  placeholder: n,
1258
1258
  rows: a
1259
1259
  }
1260
1260
  );
1261
- }, it = {
1261
+ }, pt = {
1262
1262
  type: "TextArea",
1263
1263
  label: "web_blocks.textarea",
1264
1264
  category: "core",
@@ -1293,13 +1293,13 @@ const He = (e) => {
1293
1293
  }),
1294
1294
  aiProps: ["label", "placeholder"],
1295
1295
  i18nProps: ["label", "placeholder"]
1296
- }, at = (e) => {
1297
- const { blockProps: o, fieldName: t, label: l, styles: n, inputStyles: s, required: i, checked: a, showLabel: p = !0 } = e, g = v();
1298
- return p ? /* @__PURE__ */ r.jsxs("div", { ...n, ...o, children: [
1299
- /* @__PURE__ */ r.jsx(
1296
+ }, dt = (e) => {
1297
+ const { blockProps: o, fieldName: t, label: l, styles: n, inputStyles: r, required: i, checked: a, showLabel: p = !0 } = e, g = v();
1298
+ return p ? /* @__PURE__ */ s.jsxs("div", { ...n, ...o, children: [
1299
+ /* @__PURE__ */ s.jsx(
1300
1300
  "input",
1301
1301
  {
1302
- ...s,
1302
+ ...r,
1303
1303
  name: t,
1304
1304
  id: g,
1305
1305
  type: "checkbox",
@@ -1307,24 +1307,24 @@ const He = (e) => {
1307
1307
  defaultChecked: a
1308
1308
  }
1309
1309
  ),
1310
- l && /* @__PURE__ */ r.jsx("label", { htmlFor: g, children: l })
1311
- ] }) : /* @__PURE__ */ r.jsx(
1310
+ l && /* @__PURE__ */ s.jsx("label", { htmlFor: g, children: l })
1311
+ ] }) : /* @__PURE__ */ s.jsx(
1312
1312
  "input",
1313
1313
  {
1314
1314
  id: g,
1315
1315
  ...o,
1316
- ...s,
1316
+ ...r,
1317
1317
  ...n,
1318
1318
  type: "checkbox",
1319
1319
  required: i,
1320
1320
  name: t
1321
1321
  }
1322
1322
  );
1323
- }, ct = {
1323
+ }, ut = {
1324
1324
  type: "Checkbox",
1325
1325
  label: "web_blocks.checkbox",
1326
1326
  category: "core",
1327
- icon: Z,
1327
+ icon: J,
1328
1328
  group: "form",
1329
1329
  ...u({
1330
1330
  properties: {
@@ -1354,17 +1354,17 @@ const He = (e) => {
1354
1354
  }),
1355
1355
  aiProps: ["label"],
1356
1356
  i18nProps: ["label"]
1357
- }, pt = (e) => {
1358
- const { blockProps: o, content: t, styles: l, children: n } = e, s = { ...l, ...o };
1359
- return n ? y.createElement("label", s, n) : y.createElement("label", {
1360
- ...s,
1357
+ }, gt = (e) => {
1358
+ const { blockProps: o, content: t, styles: l, children: n } = e, r = { ...l, ...o };
1359
+ return n ? y.createElement("label", r, n) : y.createElement("label", {
1360
+ ...r,
1361
1361
  dangerouslySetInnerHTML: { __html: t }
1362
1362
  });
1363
- }, dt = {
1363
+ }, yt = {
1364
1364
  type: "Label",
1365
1365
  label: "Label",
1366
1366
  category: "core",
1367
- icon: J,
1367
+ icon: K,
1368
1368
  group: "form",
1369
1369
  ...u({
1370
1370
  properties: {
@@ -1376,25 +1376,25 @@ const He = (e) => {
1376
1376
  }
1377
1377
  }
1378
1378
  })
1379
- }, I = {
1379
+ }, L = {
1380
1380
  wrapper: { "x-data": "{ open: false }" },
1381
1381
  button: { "x-on:click": "open = !open" },
1382
1382
  menu: { "x-show": "open", "x-on:click.away": "open = false" }
1383
- }, ut = (e) => {
1384
- const { blockProps: o, content: t, icon: l, iconWidth: n, iconHeight: s, styles: i, show: a } = e;
1385
- return /* @__PURE__ */ r.jsxs("button", { ...o, ...I.button, ...i, children: [
1383
+ }, mt = (e) => {
1384
+ const { blockProps: o, content: t, icon: l, iconWidth: n, iconHeight: r, styles: i, show: a } = e;
1385
+ return /* @__PURE__ */ s.jsxs("button", { ...o, ...L.button, ...i, children: [
1386
1386
  t,
1387
- /* @__PURE__ */ r.jsx(
1387
+ /* @__PURE__ */ s.jsx(
1388
1388
  "span",
1389
1389
  {
1390
1390
  className: a ? "rotate-180" : "",
1391
1391
  dangerouslySetInnerHTML: { __html: l },
1392
- style: { width: n, height: s }
1392
+ style: { width: n, height: r }
1393
1393
  }
1394
1394
  )
1395
1395
  ] });
1396
1396
  };
1397
- d(ut, {
1397
+ d(mt, {
1398
1398
  type: "DropdownButton",
1399
1399
  label: "Dropdown Button",
1400
1400
  group: "advanced",
@@ -1413,11 +1413,11 @@ d(ut, {
1413
1413
  }
1414
1414
  })
1415
1415
  });
1416
- const gt = (e) => {
1417
- const { blockProps: o, children: t, styles: l, show: n, inBuilder: s } = e;
1418
- return s && !n ? null : /* @__PURE__ */ r.jsx("div", { ...o, ...I.menu, ...l, children: t });
1416
+ const ht = (e) => {
1417
+ const { blockProps: o, children: t, styles: l, show: n, inBuilder: r } = e;
1418
+ return r && !n ? null : /* @__PURE__ */ s.jsx("div", { ...o, ...L.menu, ...l, children: t });
1419
1419
  };
1420
- d(gt, {
1420
+ d(ht, {
1421
1421
  type: "DropdownContent",
1422
1422
  label: "Dropdown Content",
1423
1423
  hidden: !0,
@@ -1431,14 +1431,14 @@ d(gt, {
1431
1431
  }
1432
1432
  })
1433
1433
  });
1434
- const yt = (e) => {
1434
+ const ft = (e) => {
1435
1435
  const { blockProps: o, children: t, styles: l } = e;
1436
- return /* @__PURE__ */ r.jsx("div", { ...o, ...l, ...I.wrapper, children: t });
1437
- }, mt = {
1436
+ return /* @__PURE__ */ s.jsx("div", { ...o, ...l, ...L.wrapper, children: t });
1437
+ }, bt = {
1438
1438
  type: "Dropdown",
1439
1439
  label: "Dropdown",
1440
1440
  group: "basic",
1441
- icon: T,
1441
+ icon: $,
1442
1442
  blocks: () => [
1443
1443
  { _type: "Dropdown", _id: "dropdown" },
1444
1444
  {
@@ -1468,7 +1468,7 @@ const yt = (e) => {
1468
1468
  wrapper: !0,
1469
1469
  ...u({
1470
1470
  properties: {
1471
- showDropdown: N({
1471
+ showDropdown: D({
1472
1472
  type: "boolean",
1473
1473
  title: "Show Dropdown",
1474
1474
  default: !1
@@ -1476,9 +1476,130 @@ const yt = (e) => {
1476
1476
  styles: c("relative w-max")
1477
1477
  }
1478
1478
  })
1479
- }, It = () => {
1480
- d(ne, re), d(pe, de), d(se, ie), d(ue, ge), d(ye, me), d(he, fe), d(be, ke), d(xe, we), d(ve, _e), d(Ie, Be), d(Le, je), d(Ce, Pe), d(Se, Me), d(Te, $e), d(ae, ce), d(He, Ae), d(Ve, We), d(Ze, Je), d(Ke, Qe), d(et, tt), d(at, ct), d(ot, lt), d(nt, rt), d(st, it), d(pt, dt), d(Xe, Ye), d(Oe, Ue), d(Ne, De), d(Re, qe), d(Fe, Ge), d(yt, mt);
1479
+ }, I = {
1480
+ SMALL: {
1481
+ 1: "col-span-1",
1482
+ 2: "col-span-2",
1483
+ 3: "col-span-3",
1484
+ 4: "col-span-4",
1485
+ 5: "col-span-5",
1486
+ 6: "col-span-6",
1487
+ 7: "col-span-7",
1488
+ 8: "col-span-8",
1489
+ 9: "col-span-9",
1490
+ 10: "col-span-10",
1491
+ 11: "col-span-11",
1492
+ 12: "col-span-12"
1493
+ },
1494
+ MEDIUM: {
1495
+ 1: "md:col-span-1",
1496
+ 2: "md:col-span-2",
1497
+ 3: "md:col-span-3",
1498
+ 4: "md:col-span-4",
1499
+ 5: "md:col-span-5",
1500
+ 6: "md:col-span-6",
1501
+ 7: "md:col-span-7",
1502
+ 8: "md:col-span-8",
1503
+ 9: "md:col-span-9",
1504
+ 10: "md:col-span-10",
1505
+ 11: "md:col-span-11",
1506
+ 12: "md:col-span-12"
1507
+ },
1508
+ LARGE: {
1509
+ 1: "lg:col-span-1",
1510
+ 2: "lg:col-span-2",
1511
+ 3: "lg:col-span-3",
1512
+ 4: "lg:col-span-4",
1513
+ 5: "lg:col-span-5",
1514
+ 6: "lg:col-span-6",
1515
+ 7: "lg:col-span-7",
1516
+ 8: "lg:col-span-8",
1517
+ 9: "lg:col-span-9",
1518
+ 10: "lg:col-span-10",
1519
+ 11: "lg:col-span-11",
1520
+ 12: "lg:col-span-12"
1521
+ }
1522
+ }, kt = (e) => {
1523
+ const { blockProps: o, children: t, styles: l, colSpan: n, tabletColSpan: r, desktopColSpan: i } = e, p = { className: [
1524
+ f(l, "className", ""),
1525
+ f(I, ["SMALL", isNaN(n) || !n ? 6 : n], ""),
1526
+ r ? f(I, ["MEDIUM", r || n], "") : "",
1527
+ i ? f(I, ["LARGE", r || n], "") : ""
1528
+ ].join(" ") };
1529
+ return /* @__PURE__ */ s.jsx("div", { ...o, ...l, ...p, children: t || /* @__PURE__ */ s.jsx("div", { className: "min-h-12 h-full w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
1530
+ };
1531
+ d(kt, {
1532
+ type: "Column",
1533
+ label: "Column",
1534
+ hidden: !0,
1535
+ canMove: () => !1,
1536
+ canDelete: () => !0,
1537
+ icon: ne,
1538
+ wrapper: !0,
1539
+ canAcceptBlock: () => !0,
1540
+ ...u({
1541
+ properties: {
1542
+ styles: c(""),
1543
+ colSpan: {
1544
+ type: "number",
1545
+ title: "Column Span",
1546
+ default: 6,
1547
+ enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
1548
+ },
1549
+ tabletColSpan: {
1550
+ type: "number",
1551
+ title: "Column Span (Tablet)",
1552
+ default: null,
1553
+ enumNames: ["Default", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
1554
+ enum: [null, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
1555
+ },
1556
+ desktopColSpan: {
1557
+ type: "number",
1558
+ title: "Column Span (Desktop)",
1559
+ default: null,
1560
+ enumNames: ["Default", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
1561
+ enum: [null, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
1562
+ }
1563
+ }
1564
+ })
1565
+ });
1566
+ const xt = (e) => {
1567
+ const { blockProps: o, children: t, styles: l, gutter: n } = e, i = { className: [f(l, "className", ""), " grid grid-cols-12"].join() };
1568
+ return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${n}px` : i.style = { gap: `${n}px` }, /* @__PURE__ */ s.jsx("div", { ...o, ...l, ...i, children: t });
1569
+ }, wt = {
1570
+ type: "Row",
1571
+ label: "Row",
1572
+ group: "basic",
1573
+ icon: se,
1574
+ blocks: () => [
1575
+ { _type: "Row", _id: "row", styles: "#styles:,p-1" },
1576
+ { _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
1577
+ { _type: "Column", id: "column", _parent: "row", styles: "#styles:," }
1578
+ ],
1579
+ category: "core",
1580
+ wrapper: !0,
1581
+ canAcceptBlock: (e) => e === "Column",
1582
+ ...u({
1583
+ properties: {
1584
+ styles: c(""),
1585
+ colCount: {
1586
+ type: "number",
1587
+ title: "",
1588
+ default: 2,
1589
+ minimum: 0,
1590
+ ui: { "ui:widget": "colCount" }
1591
+ },
1592
+ gutter: {
1593
+ type: "number",
1594
+ title: "Gutter (in px)",
1595
+ default: 16,
1596
+ minimum: 0
1597
+ }
1598
+ }
1599
+ })
1600
+ }, Pt = () => {
1601
+ d(ie, ae), d(ge, ye), d(ce, pe), d(me, he), d(fe, be), d(ke, xe), d(we, ve), d(_e, Ie), d(Le, Ce), d(Be, je), d(Se, Pe), d(Me, Ne), d(Ee, $e), d(De, Ae), d(de, ue), d(qe, Ge), d(We, Xe), d(Qe, et), d(tt, ot), d(lt, nt), d(dt, ut), d(st, rt), d(it, at), d(ct, pt), d(gt, yt), d(Je, Ke), d(Ye, Ze), d(ze, He), d(Fe, Ue), d(Ve, Oe), d(ft, bt), d(xt, wt);
1481
1602
  };
1482
1603
  export {
1483
- It as loadWebBlocks
1604
+ Pt as loadWebBlocks
1484
1605
  };