@chaibuilder/sdk 2.1.4 → 2.1.6

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,24 +1,24 @@
1
- import { registerChaiBlockSchema as d, StylesProp as p, registerChaiBlock as u } from "@chaibuilder/runtime";
2
- import { jsx as i, jsxs as b, Fragment as N } from "react/jsx-runtime";
3
- import * as g from "react";
4
- import { createElement as C } from "react";
5
- import { c as v, g as x } from "./Functions-BGzDsf1z.js";
6
- import { ButtonIcon as M, CodeIcon as A, HeadingIcon as R, TextIcon as H, CursorTextIcon as z, DividerHorizontalIcon as q, SketchLogoIcon as F, ImageIcon as j, Link1Icon as D, RowsIcon as G, ColumnsIcon as U, SpaceBetweenVerticallyIcon as V, VideoIcon as O, CopyIcon as W, CheckboxIcon as X, InputIcon as $, LetterCaseToggleIcon as Y, RadiobuttonIcon as Z, DropdownMenuIcon as J } from "@radix-ui/react-icons";
7
- import { isEmpty as w, get as k, isNull as K, pick as Q, omit as ee, map as B } from "lodash-es";
8
- import { FileCode as te, GlobeIcon as T, GroupIcon as le, Columns as oe, Rows as ne } from "lucide-react";
9
- const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div", { className: v("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ i("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, re = (e) => {
10
- const { blockProps: t, inBuilder: l, backgroundImage: n, children: o, tag: r = "div", styles: s } = e;
11
- let a = o;
12
- o || (a = /* @__PURE__ */ i(L, { inBuilder: l }));
1
+ import { registerChaiBlockSchema as m, StylesProp as p, registerChaiBlock as d } from "@chaibuilder/runtime";
2
+ import { jsx as i, jsxs as b, Fragment as _ } from "react/jsx-runtime";
3
+ import * as h from "react";
4
+ import { createElement as v } from "react";
5
+ import { c as L, g as C } from "./Functions-BGzDsf1z.js";
6
+ import { ButtonIcon as N, CodeIcon as T, HeadingIcon as A, TextIcon as R, CursorTextIcon as H, DividerHorizontalIcon as z, SketchLogoIcon as V, ImageIcon as j, Link1Icon as q, RowsIcon as F, ColumnsIcon as U, SpaceBetweenVerticallyIcon as D, VideoIcon as G, CopyIcon as O, CheckboxIcon as Y, InputIcon as M, LetterCaseToggleIcon as W, RadiobuttonIcon as X, DropdownMenuIcon as J } from "@radix-ui/react-icons";
7
+ import { isEmpty as w, get as f, isNull as Q, omit as Z, pick as K, map as I } from "lodash-es";
8
+ import { FileCode as ee, GlobeIcon as $, GroupIcon as te, Columns as oe, Rows as le } from "lucide-react";
9
+ const x = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div", { className: L("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ i("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, ne = (e) => {
10
+ const { blockProps: t, inBuilder: o, backgroundImage: n, children: l, tag: r = "div", styles: s } = e;
11
+ let a = l;
12
+ l || (a = /* @__PURE__ */ i(x, { inBuilder: o }));
13
13
  let c = {};
14
- return n && (c = { backgroundImage: `url(${n})` }), g.createElement(r, { ...t, ...s, style: c }, a);
15
- }, ie = {
14
+ return n && (c = { backgroundImage: `url(${n})` }), h.createElement(r, { ...t, ...s, style: c }, a);
15
+ }, re = {
16
16
  type: "Box",
17
17
  description: "Similar to a div or section elements in HTML",
18
18
  label: "Box",
19
19
  category: "core",
20
20
  group: "basic",
21
- ...d({
21
+ ...m({
22
22
  properties: {
23
23
  styles: p(""),
24
24
  backgroundImage: {
@@ -54,36 +54,36 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
54
54
  }
55
55
  }),
56
56
  canAcceptBlock: () => !0
57
- }, se = (e) => {
58
- const { blockProps: t, iconSize: l, icon: n, content: o, styles: r, children: s, iconPos: a, link: c, inBuilder: y } = e, f = n, h = s || /* @__PURE__ */ b(N, { children: [
59
- /* @__PURE__ */ i("span", { "data-ai-key": "content", children: o }),
60
- f && /* @__PURE__ */ i(
57
+ }, ie = (e) => {
58
+ const { blockProps: t, iconSize: o, icon: n, content: l, styles: r, children: s, iconPos: a, link: c, inBuilder: u } = e, k = n, g = s || /* @__PURE__ */ b(_, { children: [
59
+ /* @__PURE__ */ i("span", { "data-ai-key": "content", children: l }),
60
+ k && /* @__PURE__ */ i(
61
61
  "div",
62
62
  {
63
- style: { width: l + "px" },
63
+ style: { width: o + "px" },
64
64
  className: a + " " + (a === "order-first" ? "mr-2" : "ml-2") || "",
65
- dangerouslySetInnerHTML: { __html: f }
65
+ dangerouslySetInnerHTML: { __html: k }
66
66
  }
67
67
  )
68
- ] }), m = C(
68
+ ] }), y = v(
69
69
  "button",
70
70
  {
71
71
  ...t,
72
72
  ...r,
73
73
  type: "button",
74
- "aria-label": o
74
+ "aria-label": l
75
75
  },
76
- h
76
+ g
77
77
  );
78
- return w(k(c, "href")) ? m : y ? /* @__PURE__ */ i("span", { children: m }) : /* @__PURE__ */ i("a", { "aria-label": o, href: k(c, "href") || "/", target: k(c, "target", "_self"), children: m });
79
- }, ae = {
78
+ return w(f(c, "href")) ? y : u ? /* @__PURE__ */ i("span", { children: y }) : /* @__PURE__ */ i("a", { "aria-label": l, href: f(c, "href") || "/", target: f(c, "target", "_self"), children: y });
79
+ }, se = {
80
80
  type: "Button",
81
81
  description: "similar to a button element in HTML",
82
82
  label: "Button",
83
83
  category: "core",
84
- icon: M,
84
+ icon: N,
85
85
  group: "basic",
86
- ...d({
86
+ ...m({
87
87
  properties: {
88
88
  styles: p("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),
89
89
  content: {
@@ -128,27 +128,27 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
128
128
  }),
129
129
  i18nProps: ["content"],
130
130
  aiProps: ["content"]
131
- }, ce = (e) => {
132
- const { blockProps: t, styles: l, htmlCode: n, inBuilder: o } = e;
133
- return o ? /* @__PURE__ */ b("div", { className: "relative", children: [
134
- o ? /* @__PURE__ */ i("div", { ...t, ...l, className: "absolute z-20 h-full w-full" }) : null,
135
- g.createElement("div", {
136
- ...l,
131
+ }, ae = (e) => {
132
+ const { blockProps: t, styles: o, htmlCode: n, inBuilder: l } = e;
133
+ return l ? /* @__PURE__ */ b("div", { className: "relative", children: [
134
+ l ? /* @__PURE__ */ i("div", { ...t, ...o, className: "absolute z-20 h-full w-full" }) : null,
135
+ h.createElement("div", {
136
+ ...o,
137
137
  dangerouslySetInnerHTML: { __html: n.replace(/<script.*?>.*?<\/script>/g, "") }
138
138
  })
139
- ] }) : g.createElement("div", {
139
+ ] }) : h.createElement("div", {
140
140
  ...t,
141
- ...l,
141
+ ...o,
142
142
  dangerouslySetInnerHTML: { __html: n }
143
143
  });
144
- }, pe = {
144
+ }, ce = {
145
145
  type: "CustomHTML",
146
146
  description: "similar to a div or section elements in HTML",
147
147
  label: "Custom HTML",
148
148
  category: "core",
149
- icon: A,
149
+ icon: T,
150
150
  group: "advanced",
151
- ...d({
151
+ ...m({
152
152
  properties: {
153
153
  styles: p(""),
154
154
  htmlCode: {
@@ -158,17 +158,17 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
158
158
  }
159
159
  }
160
160
  })
161
- }, ue = (e) => {
162
- const { blockProps: t, styles: l, backgroundImage: n } = e;
163
- let o = {};
164
- return n && (o = { backgroundImage: `url(${n})` }), g.createElement("div", { ...t, ...l, style: o });
165
- }, de = {
161
+ }, pe = (e) => {
162
+ const { blockProps: t, styles: o, backgroundImage: n } = e;
163
+ let l = {};
164
+ return n && (l = { backgroundImage: `url(${n})` }), h.createElement("div", { ...t, ...o, style: l });
165
+ }, ue = {
166
166
  type: "EmptyBox",
167
167
  description: "A box component with no children",
168
168
  label: "Empty Box",
169
169
  category: "core",
170
170
  group: "basic",
171
- ...d({
171
+ ...m({
172
172
  properties: {
173
173
  styles: p(""),
174
174
  backgroundImage: {
@@ -179,21 +179,21 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
179
179
  }
180
180
  }
181
181
  })
182
- }, me = (e) => {
183
- const { blockProps: t, styles: l, content: n, tag: o = "h1", children: r = null } = e;
184
- return r ? g.createElement(o, { ...l, ...t }, r) : g.createElement(o, {
185
- ...l,
182
+ }, de = (e) => {
183
+ const { blockProps: t, styles: o, content: n, tag: l = "h1", children: r = null } = e;
184
+ return r ? h.createElement(l, { ...o, ...t }, r) : h.createElement(l, {
185
+ ...o,
186
186
  ...t,
187
187
  dangerouslySetInnerHTML: { __html: n }
188
188
  });
189
- }, ye = {
189
+ }, me = {
190
190
  type: "Heading",
191
191
  description: "A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",
192
192
  label: "Heading",
193
193
  category: "core",
194
- icon: R,
194
+ icon: A,
195
195
  group: "typography",
196
- ...d({
196
+ ...m({
197
197
  properties: {
198
198
  tag: {
199
199
  type: "string",
@@ -213,21 +213,21 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
213
213
  aiProps: ["content"],
214
214
  i18nProps: ["content"],
215
215
  canAcceptBlock: (e) => e === "Span" || e === "Text"
216
- }, ge = (e) => {
217
- const { blockProps: t, styles: l, content: n } = e;
218
- return K(e.children) ? g.createElement("p", {
219
- ...l,
216
+ }, ye = (e) => {
217
+ const { blockProps: t, styles: o, content: n } = e;
218
+ return Q(e.children) ? h.createElement("p", {
219
+ ...o,
220
220
  ...t,
221
221
  dangerouslySetInnerHTML: { __html: n }
222
- }) : g.createElement("p", { ...l, ...t }, e.children);
223
- }, fe = {
222
+ }) : h.createElement("p", { ...o, ...t }, e.children);
223
+ }, ge = {
224
224
  type: "Paragraph",
225
225
  description: "A paragraph component",
226
226
  label: "Paragraph",
227
227
  category: "core",
228
- icon: H,
228
+ icon: R,
229
229
  group: "typography",
230
- ...d({
230
+ ...m({
231
231
  properties: {
232
232
  styles: p(""),
233
233
  content: {
@@ -245,22 +245,22 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
245
245
  canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
246
246
  }, E = (e, ...t) => ({
247
247
  ...e,
248
- className: v(e.className, ...t)
249
- }), be = (e) => {
250
- const { blockProps: t, content: l, styles: n } = e, o = E(
248
+ className: L(e.className, ...t)
249
+ }), fe = (e) => {
250
+ const { blockProps: t, content: o, styles: n } = e, l = E(
251
251
  n,
252
252
  "prose dark:prose-invert prose-p:m-0 prose-p:min-h-[1rem] prose-blockquote:m-2 prose-blockquote:ml-4 prose-ul:m-0 prose-ol:m-0 prose-li:m-0",
253
253
  "max-w-full"
254
254
  );
255
- return /* @__PURE__ */ i("div", { ...t, ...o, dangerouslySetInnerHTML: { __html: l } });
256
- }, he = {
255
+ return /* @__PURE__ */ i("div", { ...t, ...l, dangerouslySetInnerHTML: { __html: o } });
256
+ }, be = {
257
257
  type: "RichText",
258
258
  description: "A rich text block",
259
259
  label: "Rich Text",
260
260
  category: "core",
261
- icon: z,
261
+ icon: H,
262
262
  group: "typography",
263
- ...d({
263
+ ...m({
264
264
  properties: {
265
265
  styles: p(""),
266
266
  content: {
@@ -273,20 +273,20 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
273
273
  }),
274
274
  aiProps: ["content"],
275
275
  i18nProps: ["content"]
276
- }, ke = (e) => {
277
- const { blockProps: t, styles: l, content: n, children: o = null, tag: r } = e;
278
- return o ? g.createElement("span", { ...l, ...t }, o) : g.createElement(r || "span", {
279
- ...l,
276
+ }, he = (e) => {
277
+ const { blockProps: t, styles: o, content: n, children: l = null, tag: r } = e;
278
+ return l ? h.createElement("span", { ...o, ...t }, l) : h.createElement(r || "span", {
279
+ ...o,
280
280
  ...t,
281
281
  dangerouslySetInnerHTML: { __html: n || "" }
282
282
  });
283
- }, we = {
283
+ }, ke = {
284
284
  type: "Span",
285
285
  description: "A span component",
286
286
  label: "Span",
287
287
  category: "core",
288
288
  group: "typography",
289
- ...d({
289
+ ...m({
290
290
  properties: {
291
291
  styles: p(""),
292
292
  content: {
@@ -300,17 +300,17 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
300
300
  aiProps: ["content"],
301
301
  i18nProps: ["content"],
302
302
  canAcceptBlock: () => !0
303
- }, Ce = (e) => {
304
- const { scripts: t, inBuilder: l, blockProps: n } = e;
305
- return l ? /* @__PURE__ */ i("div", { ...n, children: /* @__PURE__ */ i("div", { className: v("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ i("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__ */ i("div", { dangerouslySetInnerHTML: { __html: t } });
306
- }, xe = {
303
+ }, we = (e) => {
304
+ const { scripts: t, inBuilder: o, blockProps: n } = e;
305
+ return o ? /* @__PURE__ */ i("div", { ...n, children: /* @__PURE__ */ i("div", { className: L("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ i("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__ */ i("div", { dangerouslySetInnerHTML: { __html: t } });
306
+ }, ve = {
307
307
  type: "CustomScript",
308
308
  description: "similar to a script element in HTML",
309
309
  label: "Custom Script",
310
310
  category: "core",
311
- icon: te,
311
+ icon: ee,
312
312
  group: "advanced",
313
- ...d({
313
+ ...m({
314
314
  properties: {
315
315
  scripts: {
316
316
  type: "string",
@@ -321,24 +321,24 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
321
321
  }
322
322
  }
323
323
  })
324
- }, Le = (e) => {
325
- const { blockProps: t, styles: l } = e;
326
- return C("hr", { ...l, ...t });
327
- }, ve = {
324
+ }, Ce = (e) => {
325
+ const { blockProps: t, styles: o } = e;
326
+ return v("hr", { ...o, ...t });
327
+ }, xe = {
328
328
  type: "Divider",
329
329
  description: "A horizontal line component",
330
330
  label: "Divider",
331
331
  category: "core",
332
- icon: q,
332
+ icon: z,
333
333
  group: "basic",
334
- ...d({
334
+ ...m({
335
335
  properties: {
336
336
  styles: p("bg-gray-900 h-0.5 py-2 my-1")
337
337
  }
338
338
  })
339
- }, Ie = (e) => {
340
- const { blockProps: t, inBuilder: l, children: n, globalBlock: o } = e;
341
- return l && !o ? /* @__PURE__ */ b(
339
+ }, Le = (e) => {
340
+ const { blockProps: t, inBuilder: o, children: n, globalBlock: l } = e;
341
+ return o && !l ? /* @__PURE__ */ b(
342
342
  "div",
343
343
  {
344
344
  className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
@@ -346,21 +346,21 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
346
346
  children: [
347
347
  /* @__PURE__ */ b("h1", { children: [
348
348
  "Global Block - ",
349
- o
349
+ l
350
350
  ] }),
351
351
  /* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
352
352
  ]
353
353
  }
354
- ) : g.createElement("span", { ...t }, n);
355
- }, Be = {
354
+ ) : h.createElement("span", { ...t }, n);
355
+ }, Pe = {
356
356
  type: "GlobalBlock",
357
357
  description: "A global block component",
358
358
  label: "Global Block",
359
- icon: T,
359
+ icon: $,
360
360
  category: "core",
361
361
  group: "basic",
362
362
  hidden: !0,
363
- ...d({
363
+ ...m({
364
364
  properties: {
365
365
  globalBlock: {
366
366
  type: "string",
@@ -370,16 +370,16 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
370
370
  }
371
371
  }
372
372
  })
373
- }, Pe = (e) => {
374
- const { blockProps: t, icon: l, styles: n, width: o, inBuilder: r, height: s } = e, a = E(n, "");
375
- if (w(l))
376
- return /* @__PURE__ */ i(L, { inBuilder: r, className: "h-8 w-14" });
377
- const c = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
378
- return g.createElement("span", {
373
+ }, Ie = (e) => {
374
+ const { blockProps: t, icon: o, styles: n, width: l, inBuilder: r, height: s } = e, a = E(n, "");
375
+ if (w(o))
376
+ return /* @__PURE__ */ i(x, { inBuilder: r, className: "h-8 w-14" });
377
+ const c = o.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
378
+ return h.createElement("span", {
379
379
  ...t,
380
380
  ...a,
381
381
  style: {
382
- width: o ? `${o}px` : "auto",
382
+ width: l ? `${l}px` : "auto",
383
383
  height: s ? `${s}px` : "auto"
384
384
  },
385
385
  dangerouslySetInnerHTML: { __html: c }
@@ -388,9 +388,9 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
388
388
  type: "Icon",
389
389
  label: "web_blocks.icon",
390
390
  category: "core",
391
- icon: F,
391
+ icon: V,
392
392
  group: "media",
393
- ...d({
393
+ ...m({
394
394
  properties: {
395
395
  styles: p(""),
396
396
  icon: {
@@ -411,16 +411,16 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
411
411
  }
412
412
  }
413
413
  })
414
- }, _e = (e) => {
415
- const { blockProps: t, image: l, mobileImage: n, styles: o, alt: r, height: s, width: a, lazyLoading: c } = e;
416
- return w(l) ? /* @__PURE__ */ i(L, { className: "h-36" }) : /* @__PURE__ */ b("picture", { children: [
414
+ }, Be = (e) => {
415
+ const { blockProps: t, image: o, mobileImage: n, styles: l, alt: r, height: s, width: a, lazyLoading: c } = e;
416
+ return w(o) ? /* @__PURE__ */ i(x, { className: "h-36" }) : /* @__PURE__ */ b("picture", { children: [
417
417
  n && /* @__PURE__ */ i("source", { srcSet: n, media: "(max-width: 480px)" }),
418
418
  /* @__PURE__ */ i(
419
419
  "img",
420
420
  {
421
421
  ...t,
422
- ...o,
423
- src: l,
422
+ ...l,
423
+ src: o,
424
424
  alt: r,
425
425
  loading: c ? "lazy" : "eager",
426
426
  width: a,
@@ -428,14 +428,14 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
428
428
  }
429
429
  )
430
430
  ] });
431
- }, Ne = {
431
+ }, _e = {
432
432
  type: "Image",
433
433
  description: "A image component",
434
434
  label: "Image",
435
435
  category: "core",
436
436
  icon: j,
437
437
  group: "media",
438
- ...d({
438
+ ...m({
439
439
  properties: {
440
440
  styles: p(""),
441
441
  image: {
@@ -477,36 +477,36 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
477
477
  }),
478
478
  aiProps: ["alt"],
479
479
  i18nProps: ["alt"]
480
- }, Me = (e) => {
481
- const { blockProps: t, link: l, children: n, styles: o, inBuilder: r, content: s } = e;
480
+ }, Ne = (e) => {
481
+ const { blockProps: t, link: o, children: n, styles: l, inBuilder: r, content: s } = e;
482
482
  let a = {};
483
- return !n && w(s) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), r ? n ? /* @__PURE__ */ i("span", { ...t, style: a, ...o, children: n }) : C(
483
+ return !n && w(s) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), r ? n ? /* @__PURE__ */ i("span", { ...t, style: a, ...l, children: n }) : v(
484
484
  "span",
485
485
  {
486
486
  ...t,
487
- ...o,
487
+ ...l,
488
488
  style: a
489
489
  },
490
490
  s
491
- ) : n ? /* @__PURE__ */ i("a", { "aria-label": s, href: (l == null ? void 0 : l.href) || "#/", target: l == null ? void 0 : l.target, ...t, ...o, children: n }) : C(
491
+ ) : n ? /* @__PURE__ */ i("a", { "aria-label": s, href: (o == null ? void 0 : o.href) || "#/", target: o == null ? void 0 : o.target, ...t, ...l, children: n }) : v(
492
492
  "a",
493
493
  {
494
494
  ...t,
495
- ...o,
496
- href: (l == null ? void 0 : l.href) || "#",
497
- target: (l == null ? void 0 : l.target) || "_self",
495
+ ...l,
496
+ href: (o == null ? void 0 : o.href) || "#",
497
+ target: (o == null ? void 0 : o.target) || "_self",
498
498
  "aria-label": s
499
499
  },
500
500
  s
501
501
  );
502
- }, $e = {
502
+ }, Me = {
503
503
  type: "Link",
504
504
  description: "A link component",
505
505
  label: "Link",
506
506
  category: "core",
507
- icon: D,
507
+ icon: q,
508
508
  group: "basic",
509
- ...d({
509
+ ...m({
510
510
  properties: {
511
511
  styles: p(""),
512
512
  content: {
@@ -535,21 +535,21 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
535
535
  aiProps: ["content"],
536
536
  i18nProps: ["content"],
537
537
  canAcceptBlock: (e) => e !== "Link"
538
- }, Te = (e) => {
539
- const { blockProps: t, children: l, listType: n, styles: o, tag: r, inBuilder: s } = e, a = v(k(o, "className", ""), n);
540
- return !l && w(o == null ? void 0 : o.className) ? /* @__PURE__ */ i(L, { inBuilder: s }) : g.createElement(
538
+ }, $e = (e) => {
539
+ const { blockProps: t, children: o, listType: n, styles: l, tag: r, inBuilder: s } = e, a = L(f(l, "className", ""), n);
540
+ return !o && w(l == null ? void 0 : l.className) ? /* @__PURE__ */ i(x, { inBuilder: s }) : h.createElement(
541
541
  r || (n === "list-decimal" ? "ol" : "ul"),
542
- { ...t, ...o, className: a },
543
- l
542
+ { ...t, ...l, className: a },
543
+ o
544
544
  );
545
545
  }, Ee = {
546
546
  type: "List",
547
547
  description: "A list component",
548
548
  label: "List",
549
- icon: G,
549
+ icon: F,
550
550
  category: "core",
551
551
  group: "basic",
552
- ...d({
552
+ ...m({
553
553
  properties: {
554
554
  styles: p(""),
555
555
  listType: {
@@ -589,21 +589,21 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
589
589
  content: "Item 3"
590
590
  }
591
591
  ]
592
- }, Ae = (e) => {
593
- const { blockProps: t, content: l, styles: n, children: o, tag: r } = e;
594
- return o ? g.createElement(r || "li", { ...n, ...t }, o) : g.createElement(r || "li", {
592
+ }, Te = (e) => {
593
+ const { blockProps: t, content: o, styles: n, children: l, tag: r } = e;
594
+ return l ? h.createElement(r || "li", { ...n, ...t }, l) : h.createElement(r || "li", {
595
595
  ...n,
596
596
  ...t,
597
- dangerouslySetInnerHTML: { __html: l }
597
+ dangerouslySetInnerHTML: { __html: o }
598
598
  });
599
- }, Re = {
599
+ }, Ae = {
600
600
  type: "ListItem",
601
601
  description: "A list item component",
602
602
  label: "List Item",
603
603
  icon: U,
604
604
  category: "core",
605
605
  group: "basic",
606
- ...d({
606
+ ...m({
607
607
  properties: {
608
608
  styles: p(""),
609
609
  content: {
@@ -620,15 +620,15 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
620
620
  aiProps: ["content"],
621
621
  canAcceptBlock: (e) => e !== "ListItem",
622
622
  canBeNested: (e) => e === "List"
623
- }, He = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ i("span", { ...e.blockProps, children: e.content }) : `${e.content}`, ze = {
623
+ }, Re = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ i("span", { ...e.blockProps, children: e.content }) : `${e.content}`, He = {
624
624
  type: "Text",
625
625
  description: "A text component with no styling",
626
626
  label: "Text",
627
627
  hidden: !0,
628
628
  category: "core",
629
629
  group: "typography",
630
- icon: V,
631
- ...d({
630
+ icon: D,
631
+ ...m({
632
632
  properties: {
633
633
  styles: p("text-black"),
634
634
  content: {
@@ -640,112 +640,190 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
640
640
  }),
641
641
  aiProps: ["content"],
642
642
  i18nProps: ["content"]
643
- }, P = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, S = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, _ = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, qe = (e) => {
644
- if (P.test(e)) {
645
- const t = e.match(P);
646
- return t ? `https://www.youtube.com/embed/${t[4]}` : e;
643
+ }, ze = {
644
+ type: "object",
645
+ title: "Controls",
646
+ default: {
647
+ autoplay: !0,
648
+ controls: !1,
649
+ loop: !0,
650
+ muted: !0
651
+ },
652
+ properties: {
653
+ autoplay: {
654
+ type: "boolean",
655
+ title: "Autoplay",
656
+ default: !1
657
+ },
658
+ controls: {
659
+ type: "boolean",
660
+ title: "Show Controls",
661
+ default: !0
662
+ },
663
+ loop: {
664
+ type: "boolean",
665
+ title: "Loop Video",
666
+ default: !1
667
+ },
668
+ muted: {
669
+ type: "boolean",
670
+ title: "Muted",
671
+ default: !1
672
+ }
647
673
  }
674
+ }, S = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, B = /(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/, Ve = (e, t) => {
675
+ const o = f(t, "autoplay", !1), n = f(t, "controls", !1), l = f(t, "loop", !1), r = o || f(t, "muted", !0);
648
676
  if (S.test(e)) {
649
- const t = e.match(S);
650
- return t ? `https://player.vimeo.com/video/${t[3]}` : e;
677
+ const s = e.match(S);
678
+ if (s) {
679
+ const a = s[4];
680
+ let c = `https://www.youtube.com/embed/${a}`, u = o ? "autoplay=1" : "";
681
+ return u += l ? `&loop=1&playlist=${a}` : "", u += r ? "&mute=1&muted=1" : "", u += n ? "&controls=1" : "&controls=0", `${c}?${u}`;
682
+ }
651
683
  }
652
- if (_.test(e)) {
653
- const t = e.match(_);
654
- return t ? `https://www.dailymotion.com/embed/video/${t[4]}` : e;
684
+ if (B.test(e)) {
685
+ const s = e.match(B);
686
+ if (s) {
687
+ const a = s[1];
688
+ let c = "";
689
+ return c += o ? "autoplay=1" : "", c += n ? "&controls=1" : "&controls=0", c += r ? "&muted=1" : "", c += l ? "&loop=1" : "", `https://player.vimeo.com/video/${a}?${c}`;
690
+ }
655
691
  }
656
692
  return null;
657
- }, Fe = g.memo((e) => {
658
- const { blockProps: t, inBuilder: l, styles: n, url: o, controls: r } = e, s = k(r, "autoPlay", !1), a = k(r, "controls", !1), c = s || k(r, "muted", !0), y = k(r, "loop", !1);
659
- if (w(o)) return /* @__PURE__ */ i(L, { inBuilder: l, className: "h-36" });
660
- let f = qe(o), h = null;
661
- if (f) {
662
- if (!w(f)) {
663
- const m = [];
664
- m.push(`autoplay=${s ? 1 : 0}`), m.push(`controls=${r ? 1 : 0}`), m.push(`mute=${c ? 1 : 0}&muted=${c ? 1 : 0}`), m.push(`loop=${y ? 1 : 0}`), f = `${f}?${m.join("&")}`;
665
- }
666
- h = g.createElement("iframe", {
667
- ...t,
668
- className: "absolute inset-0 w-full h-full",
669
- src: f,
670
- allow: l ? "" : "autoplay *; fullscreen *",
671
- allowFullScreen: !0,
672
- frameBorder: 0
673
- });
674
- } else
675
- h = g.createElement("video", {
676
- ...t,
677
- className: "absolute inset-0 w-full h-full",
678
- src: o,
679
- controls: a,
680
- muted: c,
681
- autoPlay: l ? !1 : s,
682
- loop: y
683
- });
684
- return /* @__PURE__ */ i("div", { ...Q(n, ["className"]), children: /* @__PURE__ */ b("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
685
- l ? /* @__PURE__ */ i("div", { ...t, ...ee(n, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
686
- h
687
- ] }) });
688
- }), je = {
693
+ }, je = (e) => {
694
+ const { url: t, blockProps: o, styles: n, controls: l, videoSource: r, inBuilder: s } = e, a = Ve(t, l);
695
+ return /* @__PURE__ */ b("div", { ...Z(n, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
696
+ !a && s ? /* @__PURE__ */ i("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: w(t) ? `Provided ${r} video link in settings Video URL.` : `Provided ${r} video link is invalid.` }) : /* @__PURE__ */ i("iframe", { width: "100%", src: a, ...K(n, "className") }),
697
+ s && /* @__PURE__ */ i("div", { ...o, className: "absolute top-0 h-full w-full" })
698
+ ] });
699
+ }, qe = (e) => {
700
+ const { url: t, styles: o, controls: n, sources: l, poster: r, blockProps: s } = e;
701
+ let a = r;
702
+ const c = [...f(l, "srcsets", []) || []];
703
+ t && typeof t == "string" && c.push({ url: t, width: "9999" });
704
+ const u = c.sort((g, y) => parseInt(g.width) - parseInt(y.width)).filter((g) => !w(g.url) && !w(g.width));
705
+ u.length === 0 && !a && (a = "https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");
706
+ const k = f(n, "autoplay", !1) || f(n, "muted", !0);
707
+ return (a || !w(u)) && /* @__PURE__ */ i("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: /* @__PURE__ */ v(
708
+ "video",
709
+ {
710
+ ...o,
711
+ ...s,
712
+ key: JSON.stringify(u),
713
+ controls: f(n, "controls", !1),
714
+ autoPlay: f(n, "autoplay", !1),
715
+ loop: f(n, "loop", !1),
716
+ poster: a,
717
+ ...k ? { muted: !0 } : {}
718
+ },
719
+ u.map((g) => {
720
+ if (!g.url || g.url.length < 4 || isNaN(g.width)) return null;
721
+ const y = `(max-width: ${g.width}px)`;
722
+ return /* @__PURE__ */ i("source", { src: g.url, media: y, type: g.type }, g.url);
723
+ }),
724
+ "Your browser does not support the video tag."
725
+ ) });
726
+ }, Fe = (e) => {
727
+ const { videoSource: t } = e;
728
+ return t === "Custom" ? /* @__PURE__ */ i(qe, { ...e }) : t === "Youtube" || t === "Vimeo" ? /* @__PURE__ */ i(je, { ...e }) : /* @__PURE__ */ b("div", { children: [
729
+ "Invalid video source : ",
730
+ t
731
+ ] });
732
+ }, Ue = {
689
733
  type: "Video",
690
734
  label: "Video",
691
735
  category: "core",
692
- icon: O,
736
+ icon: G,
693
737
  group: "media",
694
- ...d({
738
+ ...m({
695
739
  properties: {
696
- styles: p(""),
697
- url: {
740
+ styles: p("absolute h-full w-full object-cover"),
741
+ videoSource: {
698
742
  type: "string",
699
- title: "Video URL",
700
- default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
743
+ default: "Custom",
744
+ enum: ["Custom", "Youtube", "Vimeo"],
745
+ title: "Video source"
746
+ }
747
+ },
748
+ allOf: [
749
+ {
750
+ if: {
751
+ properties: {
752
+ videoSource: { const: "Custom" }
753
+ }
754
+ },
755
+ then: {
756
+ properties: {
757
+ url: {
758
+ type: "string",
759
+ title: "Video URL",
760
+ default: ""
761
+ },
762
+ poster: {
763
+ type: "string",
764
+ title: "Poster URL",
765
+ default: ""
766
+ },
767
+ sources: {
768
+ type: "object",
769
+ default: { srcsets: [] }
770
+ },
771
+ controls: { ...ze }
772
+ }
773
+ }
701
774
  },
702
- controls: {
703
- type: "object",
704
- title: "Controls",
705
- default: {
706
- autoplay: !1,
707
- controls: !0,
708
- loop: !1,
709
- muted: !1
775
+ {
776
+ if: {
777
+ properties: {
778
+ videoSource: { const: "Youtube" }
779
+ }
710
780
  },
711
- properties: {
712
- autoplay: {
713
- type: "boolean",
714
- title: "Autoplay",
715
- default: !1
716
- },
717
- controls: {
718
- type: "boolean",
719
- title: "Show Controls",
720
- default: !0
721
- },
722
- loop: {
723
- type: "boolean",
724
- title: "Loop Video",
725
- default: !1
726
- },
727
- muted: {
728
- type: "boolean",
729
- title: "Muted",
730
- default: !1
781
+ then: {
782
+ properties: {
783
+ url: {
784
+ type: "string",
785
+ title: "Youtube Video URL",
786
+ default: ""
787
+ }
788
+ }
789
+ }
790
+ },
791
+ {
792
+ if: {
793
+ properties: {
794
+ videoSource: { const: "Vimeo" }
795
+ }
796
+ },
797
+ then: {
798
+ properties: {
799
+ url: {
800
+ type: "string",
801
+ title: "Vimeo Video URL",
802
+ default: ""
803
+ }
731
804
  }
732
805
  }
733
806
  }
807
+ ],
808
+ ui: {
809
+ url: { "ui:placeholder": "Enter Video URL" },
810
+ sources: { "ui:field": "sources" },
811
+ poster: { "ui:placeholder": "Enter poster URL" }
734
812
  }
735
813
  }),
736
814
  i18nProps: ["url"]
737
815
  }, De = (e) => {
738
- const { blockProps: t, iconSize: l, icon: n, content: o, styles: r } = e, s = n, a = /* @__PURE__ */ b(N, { children: [
739
- /* @__PURE__ */ i("span", { "data-ai-key": "content", children: o }),
740
- s && /* @__PURE__ */ i("div", { style: { width: l + "px" }, dangerouslySetInnerHTML: { __html: s } })
816
+ const { blockProps: t, iconSize: o, icon: n, content: l, styles: r } = e, s = n, a = /* @__PURE__ */ b(_, { children: [
817
+ /* @__PURE__ */ i("span", { "data-ai-key": "content", children: l }),
818
+ s && /* @__PURE__ */ i("div", { style: { width: o + "px" }, dangerouslySetInnerHTML: { __html: s } })
741
819
  ] });
742
- return C(
820
+ return v(
743
821
  "button",
744
822
  {
745
823
  ...t,
746
824
  ...r,
747
825
  type: "button",
748
- "aria-label": o
826
+ "aria-label": l
749
827
  },
750
828
  a
751
829
  );
@@ -754,9 +832,9 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
754
832
  description: "A copy button component",
755
833
  label: "Copy Button",
756
834
  category: "core",
757
- icon: W,
835
+ icon: O,
758
836
  group: "basic",
759
- ...d({
837
+ ...m({
760
838
  properties: {
761
839
  styles: p("p-2 rounded-md flex items-center"),
762
840
  content: {
@@ -779,40 +857,40 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
779
857
  }),
780
858
  i18nProps: ["content"],
781
859
  aiProps: ["content"]
782
- }, Ue = (e) => {
783
- const { blockProps: t, fieldName: l, label: n, styles: o, inputStyles: r, required: s, checked: a, showLabel: c = !0 } = e, y = x();
784
- return c ? /* @__PURE__ */ b("div", { ...o, ...t, children: [
860
+ }, Oe = (e) => {
861
+ const { blockProps: t, fieldName: o, label: n, styles: l, inputStyles: r, required: s, checked: a, showLabel: c = !0 } = e, u = C();
862
+ return c ? /* @__PURE__ */ b("div", { ...l, ...t, children: [
785
863
  /* @__PURE__ */ i(
786
864
  "input",
787
865
  {
788
866
  ...r,
789
- name: l,
790
- id: y,
867
+ name: o,
868
+ id: u,
791
869
  type: "checkbox",
792
870
  required: s,
793
871
  defaultChecked: a
794
872
  }
795
873
  ),
796
- n && /* @__PURE__ */ i("label", { htmlFor: y, children: n })
874
+ n && /* @__PURE__ */ i("label", { htmlFor: u, children: n })
797
875
  ] }) : /* @__PURE__ */ i(
798
876
  "input",
799
877
  {
800
- id: y,
878
+ id: u,
801
879
  ...t,
802
880
  ...r,
803
- ...o,
881
+ ...l,
804
882
  type: "checkbox",
805
883
  required: s,
806
- name: l
884
+ name: o
807
885
  }
808
886
  );
809
- }, Ve = {
887
+ }, Ye = {
810
888
  type: "Checkbox",
811
889
  label: "web_blocks.checkbox",
812
890
  category: "core",
813
- icon: X,
891
+ icon: Y,
814
892
  group: "form",
815
- ...d({
893
+ ...m({
816
894
  properties: {
817
895
  styles: p("flex items-center gap-x-2"),
818
896
  inputStyles: p(""),
@@ -845,10 +923,10 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
845
923
  }),
846
924
  aiProps: ["label"],
847
925
  i18nProps: ["label"]
848
- }, Oe = (e) => {
849
- const { children: t, blockProps: l, errorMessage: n, successMessage: o, action: r, styles: s, inBuilder: a } = e;
926
+ }, We = (e) => {
927
+ const { children: t, blockProps: o, errorMessage: n, successMessage: l, action: r, styles: s, inBuilder: a } = e;
850
928
  let c = t;
851
- return t || (c = /* @__PURE__ */ i(L, { inBuilder: a })), /* @__PURE__ */ b(
929
+ return t || (c = /* @__PURE__ */ i(x, { inBuilder: a })), /* @__PURE__ */ b(
852
930
  "form",
853
931
  {
854
932
  ...{
@@ -856,10 +934,10 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
856
934
  "x-on:submit.prevent": "post"
857
935
  },
858
936
  "data-error": n,
859
- "data-success": o,
937
+ "data-success": l,
860
938
  method: "post",
861
939
  action: r,
862
- ...l,
940
+ ...o,
863
941
  ...s,
864
942
  children: [
865
943
  /* @__PURE__ */ i("div", { ...{
@@ -870,11 +948,11 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
870
948
  ]
871
949
  }
872
950
  );
873
- }, We = {
951
+ }, Xe = {
874
952
  type: "Form",
875
953
  label: "Form",
876
954
  category: "core",
877
- icon: le,
955
+ icon: te,
878
956
  group: "form",
879
957
  blocks: () => [
880
958
  { _type: "Form", _id: "form", styles: "#styles:p-1 space-y-2," },
@@ -886,7 +964,7 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
886
964
  styles: "#styles:bg-black text-white rounded px-3 py-1,"
887
965
  }
888
966
  ],
889
- ...d({
967
+ ...m({
890
968
  properties: {
891
969
  styles: p(""),
892
970
  action: {
@@ -911,19 +989,19 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
911
989
  i18nProps: ["errorMessage", "successMessage"],
912
990
  aiProps: ["errorMessage", "successMessage"],
913
991
  canAcceptBlock: () => !0
914
- }, Xe = (e) => {
915
- const { blockProps: t, inBuilder: l, label: n, styles: o, inputStyles: r, icon: s, iconSize: a, iconPos: c } = e, y = x();
992
+ }, Je = (e) => {
993
+ const { blockProps: t, inBuilder: o, label: n, styles: l, inputStyles: r, icon: s, iconSize: a, iconPos: c } = e, u = C();
916
994
  return /* @__PURE__ */ b(
917
995
  "button",
918
996
  {
919
- id: y,
997
+ id: u,
920
998
  ...{
921
999
  "x-bind:disabled": "formLoading"
922
1000
  },
923
1001
  ...r,
924
- ...o,
1002
+ ...l,
925
1003
  ...t || {},
926
- type: l ? "button" : "submit",
1004
+ type: o ? "button" : "submit",
927
1005
  "aria-label": n,
928
1006
  children: [
929
1007
  n,
@@ -938,13 +1016,13 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
938
1016
  ]
939
1017
  }
940
1018
  );
941
- }, Ye = {
1019
+ }, Qe = {
942
1020
  type: "FormButton",
943
1021
  label: "Submit Button",
944
1022
  category: "core",
945
- icon: M,
1023
+ icon: N,
946
1024
  group: "form",
947
- ...d({
1025
+ ...m({
948
1026
  properties: {
949
1027
  styles: p(
950
1028
  "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
@@ -981,51 +1059,51 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
981
1059
  }, Ze = (e) => {
982
1060
  const {
983
1061
  blockProps: t,
984
- fieldName: l,
1062
+ fieldName: o,
985
1063
  label: n,
986
- placeholder: o,
1064
+ placeholder: l,
987
1065
  styles: r,
988
1066
  inputStyles: s,
989
1067
  showLabel: a,
990
1068
  required: c,
991
- inputType: y,
992
- autocomplete: f
993
- } = e, h = x();
1069
+ inputType: u,
1070
+ autocomplete: k
1071
+ } = e, g = C();
994
1072
  return a ? /* @__PURE__ */ b("div", { ...r, ...t, children: [
995
- a && /* @__PURE__ */ i("label", { htmlFor: h, children: n }),
1073
+ a && /* @__PURE__ */ i("label", { htmlFor: g, children: n }),
996
1074
  /* @__PURE__ */ i(
997
1075
  "input",
998
1076
  {
999
- name: l,
1077
+ name: o,
1000
1078
  ...s,
1001
- id: h,
1002
- type: y,
1003
- placeholder: o,
1079
+ id: g,
1080
+ type: u,
1081
+ placeholder: l,
1004
1082
  required: c,
1005
- autoComplete: f ? "on" : "off"
1083
+ autoComplete: k ? "on" : "off"
1006
1084
  }
1007
1085
  )
1008
1086
  ] }) : /* @__PURE__ */ i(
1009
1087
  "input",
1010
1088
  {
1011
- id: h,
1012
- name: l,
1089
+ id: g,
1090
+ name: o,
1013
1091
  ...t,
1014
1092
  ...s,
1015
1093
  ...r,
1016
- type: y,
1017
- placeholder: o,
1094
+ type: u,
1095
+ placeholder: l,
1018
1096
  required: c,
1019
- autoComplete: f ? "on" : "off"
1097
+ autoComplete: k ? "on" : "off"
1020
1098
  }
1021
1099
  );
1022
- }, Je = {
1100
+ }, Ke = {
1023
1101
  type: "Input",
1024
1102
  label: "web_blocks.input",
1025
1103
  category: "core",
1026
- icon: $,
1104
+ icon: M,
1027
1105
  group: "form",
1028
- ...d({
1106
+ ...m({
1029
1107
  properties: {
1030
1108
  styles: p(""),
1031
1109
  inputStyles: p("w-full p-1"),
@@ -1071,19 +1149,19 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1071
1149
  }),
1072
1150
  aiProps: ["label", "placeholder"],
1073
1151
  i18nProps: ["label", "placeholder"]
1074
- }, Ke = (e) => {
1075
- const { blockProps: t, content: l, styles: n, children: o } = e, r = { ...n, ...t };
1076
- return o ? g.createElement("label", r, o) : g.createElement("label", {
1152
+ }, et = (e) => {
1153
+ const { blockProps: t, content: o, styles: n, children: l } = e, r = { ...n, ...t };
1154
+ return l ? h.createElement("label", r, l) : h.createElement("label", {
1077
1155
  ...r,
1078
- dangerouslySetInnerHTML: { __html: l }
1156
+ dangerouslySetInnerHTML: { __html: o }
1079
1157
  });
1080
- }, Qe = {
1158
+ }, tt = {
1081
1159
  type: "Label",
1082
1160
  label: "Label",
1083
1161
  category: "core",
1084
- icon: Y,
1162
+ icon: W,
1085
1163
  group: "form",
1086
- ...d({
1164
+ ...m({
1087
1165
  properties: {
1088
1166
  styles: p(),
1089
1167
  content: {
@@ -1095,31 +1173,31 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1095
1173
  }),
1096
1174
  aiProps: ["content"],
1097
1175
  i18nProps: ["content"]
1098
- }, et = (e) => {
1099
- const { blockProps: t, fieldName: l, label: n, styles: o, inputStyles: r, required: s, checked: a, showLabel: c = !0 } = e, y = x();
1100
- return c ? /* @__PURE__ */ b("div", { ...o, ...t, children: [
1101
- /* @__PURE__ */ i("input", { ...r, name: l, id: y, type: "radio", required: s, defaultChecked: a }),
1102
- n && /* @__PURE__ */ i("label", { htmlFor: y, children: n })
1176
+ }, ot = (e) => {
1177
+ const { blockProps: t, fieldName: o, label: n, styles: l, inputStyles: r, required: s, checked: a, showLabel: c = !0 } = e, u = C();
1178
+ return c ? /* @__PURE__ */ b("div", { ...l, ...t, children: [
1179
+ /* @__PURE__ */ i("input", { ...r, name: o, id: u, type: "radio", required: s, defaultChecked: a }),
1180
+ n && /* @__PURE__ */ i("label", { htmlFor: u, children: n })
1103
1181
  ] }) : /* @__PURE__ */ i(
1104
1182
  "input",
1105
1183
  {
1106
- id: y,
1184
+ id: u,
1107
1185
  ...t,
1108
1186
  ...r,
1109
- ...o,
1187
+ ...l,
1110
1188
  type: "radio",
1111
1189
  required: s,
1112
1190
  checked: a,
1113
- name: l
1191
+ name: o
1114
1192
  }
1115
1193
  );
1116
- }, tt = {
1194
+ }, lt = {
1117
1195
  type: "Radio",
1118
1196
  label: "web_blocks.radio",
1119
1197
  category: "core",
1120
- icon: Z,
1198
+ icon: X,
1121
1199
  group: "form",
1122
- ...d({
1200
+ ...m({
1123
1201
  properties: {
1124
1202
  styles: p("flex items-center gap-x-2"),
1125
1203
  inputStyles: p(""),
@@ -1152,25 +1230,25 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1152
1230
  }),
1153
1231
  aiProps: ["label"],
1154
1232
  i18nProps: ["label"]
1155
- }, lt = (e) => {
1156
- const { blockProps: t, fieldName: l, label: n, placeholder: o, styles: r, inputStyles: s, required: a, showLabel: c, _multiple: y, options: f } = e, h = x();
1233
+ }, nt = (e) => {
1234
+ const { blockProps: t, fieldName: o, label: n, placeholder: l, styles: r, inputStyles: s, required: a, showLabel: c, _multiple: u, options: k } = e, g = C();
1157
1235
  return c ? /* @__PURE__ */ b("div", { ...r, ...t, children: [
1158
- c && /* @__PURE__ */ i("label", { htmlFor: h, children: n }),
1159
- /* @__PURE__ */ b("select", { ...s, id: h, required: a, multiple: y, name: l, children: [
1160
- /* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
1161
- B(f, (m) => /* @__PURE__ */ i("option", { value: m == null ? void 0 : m.value, children: m == null ? void 0 : m.label }, m == null ? void 0 : m.value))
1236
+ c && /* @__PURE__ */ i("label", { htmlFor: g, children: n }),
1237
+ /* @__PURE__ */ b("select", { ...s, id: g, required: a, multiple: u, name: o, children: [
1238
+ /* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: l }),
1239
+ I(k, (y) => /* @__PURE__ */ i("option", { value: y == null ? void 0 : y.value, children: y == null ? void 0 : y.label }, y == null ? void 0 : y.value))
1162
1240
  ] })
1163
- ] }) : /* @__PURE__ */ b("select", { id: h, ...r, ...t, required: a, multiple: y, name: l, children: [
1164
- /* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
1165
- B(f, (m) => /* @__PURE__ */ i("option", { value: m == null ? void 0 : m.value, children: m == null ? void 0 : m.label }, m == null ? void 0 : m.value))
1241
+ ] }) : /* @__PURE__ */ b("select", { id: g, ...r, ...t, required: a, multiple: u, name: o, children: [
1242
+ /* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: l }),
1243
+ I(k, (y) => /* @__PURE__ */ i("option", { value: y == null ? void 0 : y.value, children: y == null ? void 0 : y.label }, y == null ? void 0 : y.value))
1166
1244
  ] });
1167
- }, ot = {
1245
+ }, rt = {
1168
1246
  type: "Select",
1169
1247
  label: "web_blocks.select",
1170
1248
  category: "core",
1171
1249
  icon: J,
1172
1250
  group: "form",
1173
- ...d({
1251
+ ...m({
1174
1252
  properties: {
1175
1253
  styles: p(""),
1176
1254
  inputStyles: p("w-full p-1"),
@@ -1228,41 +1306,41 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1228
1306
  }),
1229
1307
  aiProps: ["label", "placeholder"],
1230
1308
  i18nProps: ["label", "placeholder"]
1231
- }, nt = (e) => {
1232
- const { blockProps: t, fieldName: l, label: n, placeholder: o, styles: r, inputStyles: s, rows: a, showLabel: c, required: y } = e, f = x();
1309
+ }, it = (e) => {
1310
+ const { blockProps: t, fieldName: o, label: n, placeholder: l, styles: r, inputStyles: s, rows: a, showLabel: c, required: u } = e, k = C();
1233
1311
  return c ? /* @__PURE__ */ b("div", { ...r, ...t, children: [
1234
- c && /* @__PURE__ */ i("label", { htmlFor: f, children: n }),
1312
+ c && /* @__PURE__ */ i("label", { htmlFor: k, children: n }),
1235
1313
  /* @__PURE__ */ i(
1236
1314
  "textarea",
1237
1315
  {
1238
- name: l,
1316
+ name: o,
1239
1317
  ...s,
1240
- id: f,
1241
- placeholder: o,
1318
+ id: k,
1319
+ placeholder: l,
1242
1320
  rows: a,
1243
- required: y
1321
+ required: u
1244
1322
  }
1245
1323
  )
1246
1324
  ] }) : /* @__PURE__ */ i(
1247
1325
  "textarea",
1248
1326
  {
1249
- id: f,
1250
- name: l,
1327
+ id: k,
1328
+ name: o,
1251
1329
  ...t,
1252
1330
  ...s,
1253
1331
  ...r,
1254
- placeholder: o,
1332
+ placeholder: l,
1255
1333
  rows: a,
1256
- required: y
1334
+ required: u
1257
1335
  }
1258
1336
  );
1259
- }, rt = {
1337
+ }, st = {
1260
1338
  type: "TextArea",
1261
1339
  label: "web_blocks.textarea",
1262
1340
  category: "core",
1263
- icon: $,
1341
+ icon: M,
1264
1342
  group: "form",
1265
- ...d({
1343
+ ...m({
1266
1344
  properties: {
1267
1345
  fieldName: {
1268
1346
  type: "string",
@@ -1301,16 +1379,16 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1301
1379
  }),
1302
1380
  aiProps: ["label", "placeholder"],
1303
1381
  i18nProps: ["label", "placeholder"]
1304
- }, it = (e) => {
1305
- const { blockProps: t, styles: l } = e;
1306
- return C("br", { ...t, ...l });
1307
- }, st = {
1382
+ }, at = (e) => {
1383
+ const { blockProps: t, styles: o } = e;
1384
+ return v("br", { ...t, ...o });
1385
+ }, ct = {
1308
1386
  type: "LineBreak",
1309
1387
  label: "Line Break",
1310
1388
  category: "core",
1311
1389
  group: "basic",
1312
1390
  hidden: !0,
1313
- ...d({
1391
+ ...m({
1314
1392
  properties: {
1315
1393
  styles: p("")
1316
1394
  }
@@ -1319,9 +1397,9 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1319
1397
  canDelete: () => !1,
1320
1398
  canMove: () => !1,
1321
1399
  canDuplicate: () => !1
1322
- }, at = (e) => {
1323
- const { blockProps: t, inBuilder: l, children: n, partialBlockId: o } = e;
1324
- return l && !o ? /* @__PURE__ */ b(
1400
+ }, pt = (e) => {
1401
+ const { blockProps: t, inBuilder: o, children: n, partialBlockId: l } = e;
1402
+ return o && !l ? /* @__PURE__ */ b(
1325
1403
  "div",
1326
1404
  {
1327
1405
  className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
@@ -1329,21 +1407,21 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1329
1407
  children: [
1330
1408
  /* @__PURE__ */ b("h1", { children: [
1331
1409
  "Partial Block - ",
1332
- o
1410
+ l
1333
1411
  ] }),
1334
1412
  /* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
1335
1413
  ]
1336
1414
  }
1337
- ) : g.createElement("span", { ...t }, n);
1338
- }, ct = {
1415
+ ) : h.createElement("span", { ...t }, n);
1416
+ }, ut = {
1339
1417
  type: "PartialBlock",
1340
1418
  description: "A partial block component",
1341
1419
  label: "Partial Block",
1342
- icon: T,
1420
+ icon: $,
1343
1421
  category: "core",
1344
1422
  group: "basic",
1345
1423
  hidden: !0,
1346
- ...d({
1424
+ ...m({
1347
1425
  properties: {
1348
1426
  partialBlockId: {
1349
1427
  type: "string",
@@ -1353,7 +1431,7 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1353
1431
  }
1354
1432
  }
1355
1433
  })
1356
- }, I = {
1434
+ }, P = {
1357
1435
  SMALL: {
1358
1436
  1: "col-span-1",
1359
1437
  2: "col-span-2",
@@ -1396,15 +1474,15 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1396
1474
  11: "lg:col-span-11",
1397
1475
  12: "lg:col-span-12"
1398
1476
  }
1399
- }, pt = (e) => {
1400
- const { blockProps: t, children: l, styles: n, colSpan: o, tabletColSpan: r, desktopColSpan: s } = e, c = { className: [
1401
- k(n, "className", ""),
1402
- k(I, ["SMALL", isNaN(o) || !o ? 6 : o], ""),
1403
- r ? k(I, ["MEDIUM", r || o], "") : "",
1404
- s ? k(I, ["LARGE", r || o], "") : ""
1477
+ }, dt = (e) => {
1478
+ const { blockProps: t, children: o, styles: n, colSpan: l, tabletColSpan: r, desktopColSpan: s } = e, c = { className: [
1479
+ f(n, "className", ""),
1480
+ f(P, ["SMALL", isNaN(l) || !l ? 6 : l], ""),
1481
+ r ? f(P, ["MEDIUM", r || l], "") : "",
1482
+ s ? f(P, ["LARGE", r || l], "") : ""
1405
1483
  ].join(" ") };
1406
- return /* @__PURE__ */ i("div", { ...t, ...n, ...c, children: l || /* @__PURE__ */ i("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
1407
- }, ut = {
1484
+ return /* @__PURE__ */ i("div", { ...t, ...n, ...c, children: o || /* @__PURE__ */ i("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
1485
+ }, mt = {
1408
1486
  type: "Column",
1409
1487
  description: "A column component",
1410
1488
  label: "Column",
@@ -1415,7 +1493,7 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1415
1493
  canDelete: () => !0,
1416
1494
  canAcceptBlock: () => !0,
1417
1495
  canBeNested: (e) => e === "Row",
1418
- ...d({
1496
+ ...m({
1419
1497
  properties: {
1420
1498
  styles: p(""),
1421
1499
  colSpan: {
@@ -1440,15 +1518,15 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1440
1518
  }
1441
1519
  }
1442
1520
  })
1443
- }, dt = (e) => {
1444
- const { blockProps: t, children: l, styles: n, gutter: o } = e, s = { className: [k(n, "className", ""), " grid grid-cols-12"].join() };
1445
- return typeof (n == null ? void 0 : n.style) == "object" ? n.style.gap = `${o}px` : s.style = { gap: `${o}px` }, /* @__PURE__ */ i("div", { ...t, ...n, ...s, children: l });
1446
- }, mt = {
1521
+ }, yt = (e) => {
1522
+ const { blockProps: t, children: o, styles: n, gutter: l } = e, s = { className: [f(n, "className", ""), " grid grid-cols-12"].join() };
1523
+ return typeof (n == null ? void 0 : n.style) == "object" ? n.style.gap = `${l}px` : s.style = { gap: `${l}px` }, /* @__PURE__ */ i("div", { ...t, ...n, ...s, children: o });
1524
+ }, gt = {
1447
1525
  type: "Row",
1448
1526
  description: "A row component",
1449
1527
  label: "Row",
1450
1528
  group: "basic",
1451
- icon: ne,
1529
+ icon: le,
1452
1530
  blocks: () => [
1453
1531
  { _type: "Row", _id: "row", styles: "#styles:,p-1" },
1454
1532
  { _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
@@ -1457,7 +1535,7 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1457
1535
  category: "core",
1458
1536
  wrapper: !0,
1459
1537
  canAcceptBlock: (e) => e === "Column",
1460
- ...d({
1538
+ ...m({
1461
1539
  properties: {
1462
1540
  styles: p(""),
1463
1541
  colCount: {
@@ -1474,9 +1552,9 @@ const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1474
1552
  }
1475
1553
  }
1476
1554
  })
1477
- }, Ct = () => {
1478
- u(re, ie), u(ue, de), u(se, ae), u(me, ye), u(ge, fe), u(ke, we), u(be, he), u(Me, $e), u(Te, Ee), u(Ae, Re), u(Pe, Se), u(_e, Ne), u(Fe, je), u(ce, pe), u(Ce, xe), u(He, ze), u(Oe, We), u(Xe, Ye), u(Ze, Je), u(Ue, Ve), u(et, tt), u(lt, ot), u(nt, rt), u(Ke, Qe), u(it, st), u(Le, ve), u(Ie, Be), u(at, ct), u(dt, mt), u(pt, ut), u(De, Ge);
1555
+ }, xt = () => {
1556
+ d(ne, re), d(pe, ue), d(ie, se), d(de, me), d(ye, ge), d(he, ke), d(fe, be), d(Ne, Me), d($e, Ee), d(Te, Ae), d(Ie, Se), d(Be, _e), d(Fe, Ue), d(ae, ce), d(we, ve), d(Re, He), d(We, Xe), d(Je, Qe), d(Ze, Ke), d(Oe, Ye), d(ot, lt), d(nt, rt), d(it, st), d(et, tt), d(at, ct), d(Ce, xe), d(Le, Pe), d(pt, ut), d(yt, gt), d(dt, mt), d(De, Ge);
1479
1557
  };
1480
1558
  export {
1481
- Ct as loadWebBlocks
1559
+ xt as loadWebBlocks
1482
1560
  };